inleft
2022-02-09 9bcb19959eeb9da9bde2561e7278f6d0a55eb151
commit | author | age
9bcb19 1 /*
I 2 Copyright [2020] [https://www.xiaonuo.vip]
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8   http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15
16 Snowy采用APACHE LICENSE 2.0开源协议,您在使用过程中,需要注意以下几点:
17
18 1.请不要删除和修改根目录下的LICENSE文件。
19 2.请不要删除和修改Snowy源码头部的版权声明。
20 3.请保留源码和相关描述文件的项目出处,作者声明等。
21 4.分发源码时候,请注明软件出处 https://gitee.com/xiaonuobase/snowy
22 5.在修改包名,模块名称,项目代码等时,请注明软件出处 https://gitee.com/xiaonuobase/snowy
23 6.若您的项目无法满足以上几点,可申请商业授权,获取Snowy商业授权许可,请在官网购买授权,地址为 https://www.xiaonuo.vip
24  */
25 package vip.xiaonuo.sys.modular.pos.controller;
26
27 import org.springframework.validation.annotation.Validated;
28 import org.springframework.web.bind.annotation.GetMapping;
29 import org.springframework.web.bind.annotation.PostMapping;
30 import org.springframework.web.bind.annotation.RequestBody;
31 import org.springframework.web.bind.annotation.RestController;
32 import vip.xiaonuo.core.annotion.BusinessLog;
33 import vip.xiaonuo.core.annotion.Permission;
34 import vip.xiaonuo.core.enums.LogAnnotionOpTypeEnum;
35 import vip.xiaonuo.core.pojo.response.ResponseData;
36 import vip.xiaonuo.core.pojo.response.SuccessResponseData;
37 import vip.xiaonuo.sys.modular.pos.param.SysPosParam;
38 import vip.xiaonuo.sys.modular.pos.service.SysPosService;
39
40 import javax.annotation.Resource;
41 import java.util.List;
42
43 /**
44  * 系统职位控制器
45  *
46  * @author xuyuxiang
47  * @date 2020/3/20 19:44
48  */
49 @RestController
50 public class SysPosController {
51
52     @Resource
53     private SysPosService sysPosService;
54
55     /**
56      * 查询系统职位
57      *
58      * @author xuyuxiang
59      * @date 2020/3/26 10:20
60      */
61     @Permission
62     @GetMapping("/sysPos/page")
63     @BusinessLog(title = "系统职位_查询", opType = LogAnnotionOpTypeEnum.QUERY)
64     public ResponseData page(SysPosParam sysPosParam) {
65         return new SuccessResponseData(sysPosService.page(sysPosParam));
66     }
67
68     /**
69      * 系统职位列表
70      *
71      * @author yubaoshan
72      * @date 2020/6/21 23:38
73      */
74     @Permission
75     @GetMapping("/sysPos/list")
76     @BusinessLog(title = "系统职位_列表", opType = LogAnnotionOpTypeEnum.QUERY)
77     public ResponseData list(SysPosParam sysPosParam) {
78         return new SuccessResponseData(sysPosService.list(sysPosParam));
79     }
80
81     /**
82      * 添加系统职位
83      *
84      * @author xuyuxiang
85      * @date 2020/3/26 19:03
86      */
87     @Permission
88     @PostMapping("/sysPos/add")
89     @BusinessLog(title = "系统职位_增加", opType = LogAnnotionOpTypeEnum.ADD)
90     public ResponseData add(@RequestBody @Validated(SysPosParam.add.class) SysPosParam sysPosParam) {
91         sysPosService.add(sysPosParam);
92         return new SuccessResponseData();
93     }
94
95     /**
96      * 删除系统职位
97      *
98      * @author xuyuxiang
99      * @date 2020/3/25 14:54
100      */
101     @Permission
102     @PostMapping("/sysPos/delete")
103     @BusinessLog(title = "系统职位_删除", opType = LogAnnotionOpTypeEnum.DELETE)
104     public ResponseData delete(@RequestBody @Validated(SysPosParam.delete.class) List<SysPosParam> sysPosParamList) {
105         sysPosService.delete(sysPosParamList);
106         return new SuccessResponseData();
107     }
108
109     /**
110      * 编辑系统职位
111      *
112      * @author xuyuxiang
113      * @date 2020/3/25 14:54
114      */
115     @Permission
116     @PostMapping("/sysPos/edit")
117     @BusinessLog(title = "系统职位_编辑", opType = LogAnnotionOpTypeEnum.EDIT)
118     public ResponseData edit(@RequestBody @Validated(SysPosParam.edit.class) SysPosParam sysPosParam) {
119         sysPosService.edit(sysPosParam);
120         return new SuccessResponseData();
121     }
122
123     /**
124      * 查看系统职位
125      *
126      * @author xuyuxiang
127      * @date 2020/3/26 9:49
128      */
129     @Permission
130     @GetMapping("/sysPos/detail")
131     @BusinessLog(title = "系统职位_查看", opType = LogAnnotionOpTypeEnum.DETAIL)
132     public ResponseData detail(@Validated(SysPosParam.detail.class) SysPosParam sysPosParam) {
133         return new SuccessResponseData(sysPosService.detail(sysPosParam));
134     }
135
136     /**
137      * 导出系统用户
138      *
139      * @author yubaoshan
140      * @date 2020/6/30 16:07
141      */
142     @Permission
143     @GetMapping("/sysPos/export")
144     @BusinessLog(title = "系统职位_导出", opType = LogAnnotionOpTypeEnum.EXPORT)
145     public void export(SysPosParam sysPosParam) {
146         sysPosService.export(sysPosParam);
147     }
148 }