cl
2024-01-19 e0fac38b26845f25de479783e0c76cf12a5311e0
提交 | 用户 | 时间
71e81e 1 package cn.stylefeng.guns.modular.kb.poorBoard.controller;
2
3 import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo;
4 import cn.stylefeng.guns.modular.kb.utils.IPUtil;
5 import cn.stylefeng.guns.modular.sc.kanbanConf.model.params.KanbanConfParam;
6 import cn.stylefeng.guns.modular.sc.kanbanConf.service.KanbanConfService;
7 import cn.stylefeng.roses.kernel.model.response.ResponseData;
8 import org.springframework.beans.factory.annotation.Autowired;
9 import org.springframework.stereotype.Controller;
10 import org.springframework.web.bind.annotation.RequestMapping;
11 import org.springframework.web.bind.annotation.ResponseBody;
12
13 import javax.servlet.http.HttpServletRequest;
14
15 @Controller
16 @RequestMapping("/poorBoard")
17 public class poorBoardController {
18     private String PREFIX = "modular/kb/poorBoard";
19     @Autowired
20     private KanbanConfService kanbanConfService;
21     /**
22      * 跳转到主页面
23      *
24      * @author cl
25      * @Date 2022-10-27
26      */
27     @RequestMapping("")
28     public String index() {
29         return PREFIX + "/poorBoard.html";
30     }
31
32
33     /**
34      * 新增看板配置页面
35      *
36      * @author cl
37      * @Date 2022-10-31
38      */
39     @RequestMapping("/add")
40     public String add() {
41         return PREFIX + "/kanbanConf_add.html";
42     }
43
44     /**
45      * 编辑页面
46      *
47      * @author cl
48      * @Date 2022-10-31
49      */
50     @RequestMapping("/edit")
51     public String edit() {
52         return PREFIX + "/kanbanConf_edit.html";
53     }
54
55     @RequestMapping("/orderEdit")
56     public String orderEdit() {
57         return PREFIX + "/kanbanConf_orderEdit.html";
58     }
59
60     /**
61      * 新增接口
62      *
63      * @author cl
64      * @Date 2022-10-31
65      */
66     @RequestMapping("/addKanBanConfItem")
67     @ResponseBody
68     public ResponseData addItem(KanbanConfParam kanbanConfParam, HttpServletRequest request) {
69         String realIp = IPUtil.getRealIp(request);
70         kanbanConfParam.setIpAddress(realIp);
71
72         this.kanbanConfService.add(kanbanConfParam);
73         return ResponseData.success();
74     }
75
76     /**
77      * 编辑接口
78      *
79      * @author cl
80      * @Date 2022-10-31
81      */
82     @RequestMapping("/editKanBanConfItem")
83     @ResponseBody
84     public ResponseData editItem(KanbanConfParam kanbanConfParam) {
85         this.kanbanConfService.update(kanbanConfParam);
86         return ResponseData.success();
87     }
88
89     /**
90      * 查询列表
91      *
92      * @author cl
93      * @Date 2022-10-31
94      */
95     @ResponseBody
96     @RequestMapping("/qryKBConflist")
97     public LayuiPageInfo list(KanbanConfParam kanbanConfParam, HttpServletRequest request) {
98         String realIp = IPUtil.getRealIp(request);
99         kanbanConfParam.setIpAddress(realIp);
100
101         return this.kanbanConfService.findPageBySpec(kanbanConfParam);
102     }
103 }