提交 | 用户 | 时间
|
1ac2bc
|
1 |
package cn.stylefeng.guns.modular.zsx.bs.lineInfo.controller; |
懒 |
2 |
|
|
3 |
import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo; |
|
4 |
import cn.stylefeng.guns.modular.zsx.bs.lineInfo.entity.LineInfo; |
|
5 |
import cn.stylefeng.guns.modular.zsx.bs.lineInfo.model.params.LineInfoParam; |
|
6 |
import cn.stylefeng.guns.modular.zsx.bs.lineInfo.service.LineInfoService; |
|
7 |
import cn.stylefeng.roses.core.base.controller.BaseController; |
|
8 |
import cn.stylefeng.roses.core.mutidatasource.annotion.DataSource; |
|
9 |
import cn.stylefeng.roses.kernel.model.response.ResponseData; |
|
10 |
import org.springframework.beans.factory.annotation.Autowired; |
|
11 |
import org.springframework.stereotype.Controller; |
|
12 |
import org.springframework.web.bind.annotation.RequestMapping; |
|
13 |
import org.springframework.web.bind.annotation.ResponseBody; |
|
14 |
|
|
15 |
|
|
16 |
/** |
|
17 |
* 产线信息控制器1 |
|
18 |
* |
|
19 |
* @author ruimin |
|
20 |
* @Date 2023-08-19 15:11:29 |
|
21 |
*/ |
|
22 |
@Controller |
|
23 |
@RequestMapping("/lineInfo") |
|
24 |
public class LineInfoController extends BaseController { |
|
25 |
|
|
26 |
private String PREFIX = "/modular/bs/lineInfo"; |
|
27 |
|
|
28 |
@Autowired |
|
29 |
private LineInfoService lineInfoService; |
|
30 |
|
|
31 |
/** |
|
32 |
* 跳转到主页面 |
|
33 |
* |
|
34 |
* @author ruimin |
|
35 |
* @Date 2023-08-19 |
|
36 |
*/ |
|
37 |
@RequestMapping("") |
|
38 |
public String index() { |
|
39 |
return PREFIX + "/lineInfo.html"; |
|
40 |
} |
|
41 |
|
|
42 |
/** |
|
43 |
* 新增页面 |
|
44 |
* |
|
45 |
* @author ruimin |
|
46 |
* @Date 2023-08-19 |
|
47 |
*/ |
|
48 |
@RequestMapping("/add") |
|
49 |
public String add() { |
|
50 |
return PREFIX + "/lineInfo_add.html"; |
|
51 |
} |
|
52 |
|
|
53 |
/** |
|
54 |
* 编辑页面 |
|
55 |
* |
|
56 |
* @author ruimin |
|
57 |
* @Date 2023-08-19 |
|
58 |
*/ |
|
59 |
@RequestMapping("/edit") |
|
60 |
public String edit() { |
|
61 |
return PREFIX + "/lineInfo_edit.html"; |
|
62 |
} |
|
63 |
|
|
64 |
/** |
|
65 |
* 新增接口 |
|
66 |
* |
|
67 |
* @author ruimin |
|
68 |
* @Date 2023-08-19 |
|
69 |
*/ |
|
70 |
@RequestMapping("/addItem") |
|
71 |
@ResponseBody |
|
72 |
@DataSource(name = "self") |
|
73 |
public ResponseData addItem(LineInfoParam lineInfoParam) { |
|
74 |
this.lineInfoService.add(lineInfoParam); |
|
75 |
return ResponseData.success(); |
|
76 |
} |
|
77 |
|
|
78 |
/** |
|
79 |
* 编辑接口 |
|
80 |
* |
|
81 |
* @author ruimin |
|
82 |
* @Date 2023-08-19 |
|
83 |
*/ |
|
84 |
@RequestMapping("/editItem") |
|
85 |
@ResponseBody |
|
86 |
@DataSource(name = "self") |
|
87 |
public ResponseData editItem(LineInfoParam lineInfoParam) { |
|
88 |
this.lineInfoService.update(lineInfoParam); |
|
89 |
return ResponseData.success(); |
|
90 |
} |
|
91 |
|
|
92 |
/** |
|
93 |
* 删除接口 |
|
94 |
* |
|
95 |
* @author ruimin |
|
96 |
* @Date 2023-08-19 |
|
97 |
*/ |
|
98 |
@RequestMapping("/delete") |
|
99 |
@ResponseBody |
|
100 |
@DataSource(name = "self") |
|
101 |
public ResponseData delete(LineInfoParam lineInfoParam) { |
|
102 |
this.lineInfoService.delete(lineInfoParam); |
|
103 |
return ResponseData.success(); |
|
104 |
} |
|
105 |
|
|
106 |
/** |
|
107 |
* 查看详情接口 |
|
108 |
* |
|
109 |
* @author ruimin |
|
110 |
* @Date 2023-08-19 |
|
111 |
*/ |
|
112 |
@RequestMapping("/detail") |
|
113 |
@ResponseBody |
|
114 |
@DataSource(name = "self") |
|
115 |
public ResponseData detail(LineInfoParam lineInfoParam) { |
|
116 |
LineInfo detail = this.lineInfoService.getById(lineInfoParam.getId()); |
|
117 |
return ResponseData.success(detail); |
|
118 |
} |
|
119 |
|
|
120 |
/** |
|
121 |
* 查询列表 |
|
122 |
* |
|
123 |
* @author ruimin |
|
124 |
* @Date 2023-08-19 |
|
125 |
*/ |
|
126 |
@ResponseBody |
|
127 |
@RequestMapping("/list") |
|
128 |
@DataSource(name = "self") |
|
129 |
public LayuiPageInfo list(LineInfoParam lineInfoParam) { |
|
130 |
return this.lineInfoService.findPageBySpec(lineInfoParam); |
|
131 |
} |
|
132 |
|
|
133 |
} |
|
134 |
|
|
135 |
|