xieb
2023-05-17 dc4b025a2d7d5a918efe671dec81d91841942f7d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
package cn.gistack.sm.sjztmd.controller;
 
import cn.gistack.sm.exam.entity.ExamPlan;
import cn.gistack.sm.patrol.entity.PatrolConfig;
import cn.gistack.sm.sjztmd.entity.AttResBase;
import cn.gistack.sm.sjztmd.entity.AttResStagChar;
import cn.gistack.sm.sjztmd.service.IAttResBaseService;
import cn.gistack.sm.sjztmd.service.IAttResStagCharService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.StringUtil;
import org.springframework.web.bind.annotation.*;
 
/**
 * @ClassName AttAdBaseController
 * @Description TODO
 * @Author aix
 * @Date 2023/4/21 20:09
 * @Version 1.0
 */
@Slf4j
@Api(tags = "中台水库特征水位")
@RestController
@RequestMapping("/sjztmd/attResStagChar")
@AllArgsConstructor
public class AttResStagCharController extends BladeController {
 
    private final IAttResStagCharService attResStagCharService;
 
    /**
     * 通过resGuid查询
     *
     * @param resGuid
     * @return
     */
    @ApiOperation(value="水库特征水位-通过id查询", notes="水库特征水位-通过id查询")
    @GetMapping(value = "/queryById")
    public R queryById(@RequestParam(name="resGuid",required=true) String resGuid) {
        AttResStagChar attResStagChar = attResStagCharService.getByResGuid(resGuid);
        return R.data(attResStagChar);
    }
 
    /**
     * 编辑
     *
     * @param attResStagChar
     * @return
     */
    @ApiOperation(value = "水库特征水位-编辑", notes = "水库特征水位-编辑")
    @PostMapping(value = "/edit")
    public R edit(@RequestBody AttResStagChar attResStagChar) {
        if (StringUtil.isBlank(attResStagChar.getResGuid())) {
            return R.fail("参数不正确");
        }
        return R.data(attResStagCharService.customizeUpdateByGuid(attResStagChar));
//        return R.data(attResStagCharService.updateById(attResStagChar));
    }
 
}