潘志宝
2024-12-10 a440ec3bfaa1363f5841100b8948d852971a2eb1
iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/sche/controller/admin/StScheduleModelController.java
@@ -59,7 +59,7 @@
    @GetMapping("/get")
    @Operation(summary = "获得详情")
    @PreAuthorize("@ss.hasPermission('sche:model:query')")
    public CommonResult<StScheduleModelRespVO> get(@RequestParam("id") String id){
    public CommonResult<StScheduleModelRespVO> get(@RequestParam("id") String id) {
        StScheduleModelEntity data = stScheduleModelService.get(id);
        StScheduleModelRespVO result = BeanUtils.toBean(data, StScheduleModelRespVO.class);
        List<StScheduleModelParamEntity> paramList = stScheduleModelParamService.getByModelId(data.getId());
@@ -72,7 +72,7 @@
    @PostMapping("/create")
    @Operation(summary = "创建模型")
    @PreAuthorize("@ss.hasPermission('sche:model:create')")
    public CommonResult<Boolean> save(@Valid @RequestBody StScheduleModelSaveReqVO reqVO){
    public CommonResult<Boolean> save(@Valid @RequestBody StScheduleModelSaveReqVO reqVO) {
        Long count = stScheduleModelService.check(reqVO);
        if (count > 0) {
            return error(999, "名称或编号重复");
@@ -84,7 +84,7 @@
    @PutMapping("/update")
    @Operation(summary = "更新模型")
    @PreAuthorize("@ss.hasPermission('sche:model:update')")
    public CommonResult<Boolean> update(@Valid @RequestBody StScheduleModelSaveReqVO reqVO){
    public CommonResult<Boolean> update(@Valid @RequestBody StScheduleModelSaveReqVO reqVO) {
        Long count = stScheduleModelService.check(reqVO);
        if (count > 0) {
            return error(999, "名称或编号重复");
@@ -96,7 +96,7 @@
    @DeleteMapping("/delete")
    @Operation(summary = "删除模型")
    @PreAuthorize("@ss.hasPermission('sche:model:delete')")
    public CommonResult<Boolean> delete(@RequestParam("id") String id){
    public CommonResult<Boolean> delete(@RequestParam("id") String id) {
        stScheduleModelService.delete(id);
        return success(true);
    }