package org.jeecg.modules.warningThreshold.controller;

import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.warningThreshold.entity.YjTorqueWarnValue;
import org.jeecg.modules.warningThreshold.params.YjTorqueWarnValuePageParams;
import org.jeecg.modules.warningThreshold.service.YjTorqueWarnValueService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * 扭矩预警阈值;
 *
 * @author : http://www.chiner.pro
 * @date : 2025-1-7
 */
@RestController
@RequestMapping("/warningThreshold/torqueWarn")
public class YjTorqueWarnValueController {

    @Resource
    private YjTorqueWarnValueService torqueWarnValueService;

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

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