guoshilong
2024-03-15 cc8bf2663afaf34aef48d7bda688d95c92d83ae9
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
package cn.gistack.sm.sjztmd.controller;
 
import cn.gistack.sm.sjztmd.entity.AttAdBase;
import cn.gistack.sm.sjztmd.entity.TbResDyke;
import cn.gistack.sm.sjztmd.service.IAttAdBaseService;
import cn.gistack.sm.sjztmd.service.ITbResDykeService;
import cn.gistack.sm.sjztmd.vo.AttAdBaseVO;
import cn.gistack.sm.sjztmd.vo.TbResDykeVO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
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.node.ForestNodeMerger;
import org.springblade.core.tool.utils.ObjectUtil;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
 
import java.util.Arrays;
import java.util.List;
import java.util.Map;
 
/**
 * @ClassName AttAdBaseController
 * @Description TODO
 * @Author aix
 * @Date 2023/4/21 20:09
 * @Version 1.0
 */
@Slf4j
@Api(tags = "堤防")
@RestController
@RequestMapping("/sjztmd/tbResDyke")
@AllArgsConstructor
public class TbResDykeController extends BladeController {
 
    private final ITbResDykeService tbResDykeService;
 
    @ApiOperation(value = "堤防-添加", notes = "堤防-添加")
    @PostMapping(value = "/save")
    public R add(TbResDyke tbResDyke) {
        return R.data(tbResDykeService.save(tbResDyke));
    }
 
    @ApiOperation(value = "堤防-修改", notes = "堤防-修改")
    @PostMapping(value = "/edit")
    public R edit(TbResDyke tbResDyke) {
        return R.data(tbResDykeService.updateById(tbResDyke));
    }
 
    @ApiOperation(value = "堤防-添加修改", notes = "堤防-添加修改")
    @PostMapping(value = "/submit")
    public R submit(TbResDyke tbResDyke) {
        return R.data(tbResDykeService.saveOrUpdate(tbResDyke));
    }
 
    @ApiOperation(value = "堤防-删除", notes = "堤防-删除")
    @GetMapping(value = "/remove")
    public R edit(String ids) {
        boolean b = tbResDykeService.removeBatchByIds(Arrays.asList(ids));
        return R.data(b);
    }
 
    @ApiOperation(value = "堤防-查询详情", notes = "堤防-查询详情")
    @GetMapping(value = "/getDetail")
    public R getDetail(TbResDyke resDyke) {
        TbResDykeVO one = tbResDykeService.getDetail(resDyke);
        return R.data(one);
    }
 
    @ApiOperation(value = "堤防-列表查询", notes = "堤防-分页列表查询")
    @GetMapping(value = "/list")
    public R getPage(TbResDykeVO tbResDykeVO, Query query) {
        Object list  = tbResDykeService.getList(Condition.getPage(query), tbResDykeVO);
        return R.data(list);
    }
 
 
}