package org.jeecg.modules.warningThreshold.controller;

import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.warningThreshold.entity.YjWohWarnValue;
import org.jeecg.modules.warningThreshold.params.YjWohWarnValuePageParams;
import org.jeecg.modules.warningThreshold.service.YjWohWarnValueService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * 钩载预警阈值管理;
 *
 * @author : http://www.chiner.pro
 * @date : 2025-1-7
 */
@RestController
@RequestMapping("/warningThreshold/wohWarn")
public class YjWohWarnValueController {

    @Resource
    private YjWohWarnValueService wohWarnValueService;

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

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