package org.jeecg.modules.warningThreshold.controller;


import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.warningThreshold.entity.YjPumpingWarnValue;
import org.jeecg.modules.warningThreshold.params.YjPumpingWarnValuePageParams;
import org.jeecg.modules.warningThreshold.service.YjPumpingWarnValueService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * 泵压预警阈值;
 *
 * @author : http://www.chiner.pro
 * @date : 2025-1-7
 */
@RestController
@RequestMapping("/warningThreshold/pumpingWarn")
public class YjPumpingWarnValueController {

    @Resource
    private YjPumpingWarnValueService pumpingWarnValueService;

    @GetMapping("/page")
    public Result<?> page(YjPumpingWarnValuePageParams pageParams) {
        return Result.OK(pumpingWarnValueService.page(pageParams));
    }

    @PostMapping("/saveOrUpd")
    public Result<?> saveOrUpd(@RequestBody YjPumpingWarnValue model){
        pumpingWarnValueService.saveOrUpd(model);
        return Result.OK();
    }

}
