package com.fastbee.data.controller.userRecharge.hanZhen;

import com.fastbee.common.core.controller.BaseController;
import com.fastbee.common.core.domain.AjaxResult;
import com.fastbee.common.core.domain.AjaxResultPro;
import com.fastbee.common.core.page.TableDataInfo;
import com.fastbee.rechargecard.domain.NgIrrigationArea;
import com.fastbee.rechargecard.mapper.NgWaterPumpUsageRecordsMapper;
import com.fastbee.rechargecard.service.impl.NgWaterPumpUsageRecordsServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.repository.query.Param;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Controller
 *设备瞬时数据
 * @author kerwincui
 * @date 2024-12-19
 */
@RestController
@RequestMapping("/pump/usage")
@Api(tags = "设备瞬时数据")
public class HanZhenWaterRecordsController extends BaseController {


    @Autowired
    private NgWaterPumpUsageRecordsServiceImpl ngWaterPumpUsageRecordsService;
    @GetMapping("/realtimeData")
    public AjaxResult realtimeData(@Param("deviceNumber") String deviceNumber) {

        ngWaterPumpUsageRecordsService.selectNgWaterPumpUsageDeviceNumber(deviceNumber);
        return toAjax(ngWaterPumpUsageRecordsService.selectNgWaterPumpUsageDeviceNumber(deviceNumber));
    }
}
