package org.jeecg.modules.warningThreshold.controller;

import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.warningThreshold.entity.YjTotalPoolWarnValue;
import org.jeecg.modules.warningThreshold.params.YjTotalPoolWarnValuePageParams;
import org.jeecg.modules.warningThreshold.service.YjTotalPoolWarnValueService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * 总池体积预警阈值;
 *
 * @author : http://www.chiner.pro
 * @date : 2025-1-7
 */
@RestController
@RequestMapping("/warningThreshold/totalPoolWarn")
public class YjTotalPoolWarnValueController {

    @Resource
    private YjTotalPoolWarnValueService totalPoolWarnValueService;

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

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