Commit 00b04817154438bc3edfc0a39d14a82e28ce1476
1 parent
74a0ab2b
基础数据按钮权限
Showing
16 changed files
with
91 additions
and
1 deletions
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/bomHeader/controller/BomHeaderController.java
1 | 1 | package org.jeecg.modules.wms.config.bomHeader.controller; |
2 | 2 | |
3 | +import org.apache.shiro.authz.annotation.RequiresPermissions; | |
3 | 4 | import org.jeecg.common.system.query.QueryGenerator; |
4 | 5 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
5 | 6 | import com.baomidou.mybatisplus.core.metadata.IPage; |
... | ... | @@ -88,6 +89,7 @@ public class BomHeaderController extends JeecgController<BomHeader, IBomHeaderSe |
88 | 89 | */ |
89 | 90 | @AutoLog(value = "bom主表-添加") |
90 | 91 | @ApiOperation(value="bom主表-添加", notes="bom主表-添加") |
92 | + @RequiresPermissions("bomHeader:add") | |
91 | 93 | @PostMapping(value = "/add") |
92 | 94 | public Result<String> add(@RequestBody BomHeader bomHeader, HttpServletRequest req) { |
93 | 95 | String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); |
... | ... | @@ -105,6 +107,7 @@ public class BomHeaderController extends JeecgController<BomHeader, IBomHeaderSe |
105 | 107 | */ |
106 | 108 | @AutoLog(value = "bom主表-编辑") |
107 | 109 | @ApiOperation(value="bom主表-编辑", notes="bom主表-编辑") |
110 | + @RequiresPermissions("bomHeader:edit") | |
108 | 111 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
109 | 112 | public Result<String> edit(@RequestBody BomHeader bomHeader) { |
110 | 113 | bomHeaderService.updateById(bomHeader); |
... | ... | @@ -118,6 +121,7 @@ public class BomHeaderController extends JeecgController<BomHeader, IBomHeaderSe |
118 | 121 | */ |
119 | 122 | @AutoLog(value = "bom主表-通过id删除") |
120 | 123 | @ApiOperation(value="bom主表-通过id删除", notes="bom主表-通过id删除") |
124 | + @RequiresPermissions("bomHeader:delete") | |
121 | 125 | @DeleteMapping(value = "/delete") |
122 | 126 | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
123 | 127 | bomHeaderService.delMain(id); |
... | ... | @@ -131,6 +135,7 @@ public class BomHeaderController extends JeecgController<BomHeader, IBomHeaderSe |
131 | 135 | */ |
132 | 136 | @AutoLog(value = "bom主表-批量删除") |
133 | 137 | @ApiOperation(value="bom主表-批量删除", notes="bom主表-批量删除") |
138 | + @RequiresPermissions("bomHeader:deleteBatch") | |
134 | 139 | @DeleteMapping(value = "/deleteBatch") |
135 | 140 | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
136 | 141 | this.bomHeaderService.delBatchMain(Arrays.asList(ids.split(","))); |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/carrier/controller/CarrierController.java
... | ... | @@ -12,6 +12,7 @@ import javax.servlet.http.HttpServletResponse; |
12 | 12 | |
13 | 13 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
14 | 14 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
15 | +import org.apache.shiro.authz.annotation.RequiresPermissions; | |
15 | 16 | import org.jeecg.common.api.vo.Result; |
16 | 17 | import org.jeecg.common.system.query.QueryGenerator; |
17 | 18 | import org.jeecg.common.system.util.JwtUtil; |
... | ... | @@ -88,6 +89,7 @@ public class CarrierController extends JeecgController<Carrier, ICarrierService> |
88 | 89 | */ |
89 | 90 | @AutoLog(value = "承运商管理-添加") |
90 | 91 | @ApiOperation(value="承运商管理-添加", notes="承运商管理-添加") |
92 | + @RequiresPermissions("carrier:add") | |
91 | 93 | @PostMapping(value = "/add") |
92 | 94 | public Result<String> add(@RequestBody Carrier carrier, HttpServletRequest req) { |
93 | 95 | String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); |
... | ... | @@ -106,6 +108,7 @@ public class CarrierController extends JeecgController<Carrier, ICarrierService> |
106 | 108 | */ |
107 | 109 | @AutoLog(value = "承运商管理-编辑") |
108 | 110 | @ApiOperation(value="承运商管理-编辑", notes="承运商管理-编辑") |
111 | + @RequiresPermissions("carrier:edit") | |
109 | 112 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
110 | 113 | public Result<String> edit(@RequestBody Carrier carrier) { |
111 | 114 | carrierService.updateById(carrier); |
... | ... | @@ -120,6 +123,7 @@ public class CarrierController extends JeecgController<Carrier, ICarrierService> |
120 | 123 | */ |
121 | 124 | @AutoLog(value = "承运商管理-通过id删除") |
122 | 125 | @ApiOperation(value="承运商管理-通过id删除", notes="承运商管理-通过id删除") |
126 | + @RequiresPermissions("carrier:delete") | |
123 | 127 | @DeleteMapping(value = "/delete") |
124 | 128 | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
125 | 129 | carrierService.removeById(id); |
... | ... | @@ -134,6 +138,7 @@ public class CarrierController extends JeecgController<Carrier, ICarrierService> |
134 | 138 | */ |
135 | 139 | @AutoLog(value = "承运商管理-批量删除") |
136 | 140 | @ApiOperation(value="承运商管理-批量删除", notes="承运商管理-批量删除") |
141 | + @RequiresPermissions("carrier:deleteBatch") | |
137 | 142 | @DeleteMapping(value = "/deleteBatch") |
138 | 143 | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
139 | 144 | this.carrierService.removeByIds(Arrays.asList(ids.split(","))); |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/company/controller/CompanyController.java
... | ... | @@ -12,6 +12,7 @@ import javax.servlet.http.HttpServletResponse; |
12 | 12 | |
13 | 13 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
14 | 14 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
15 | +import org.apache.shiro.authz.annotation.RequiresPermissions; | |
15 | 16 | import org.jeecg.common.api.vo.Result; |
16 | 17 | import org.jeecg.common.system.query.QueryGenerator; |
17 | 18 | import org.jeecg.common.system.util.JwtUtil; |
... | ... | @@ -89,6 +90,7 @@ public class CompanyController extends JeecgController<Company, ICompanyService> |
89 | 90 | @AutoLog(value = "货主-添加") |
90 | 91 | @ApiOperation(value="货主-添加", notes="货主-添加") |
91 | 92 | @PostMapping(value = "/add") |
93 | + @RequiresPermissions("company:add") | |
92 | 94 | public Result<String> add(@RequestBody Company company, HttpServletRequest req) { |
93 | 95 | String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); |
94 | 96 | if(StringUtils.isNotEmpty(warehouseCode)) { |
... | ... | @@ -106,6 +108,7 @@ public class CompanyController extends JeecgController<Company, ICompanyService> |
106 | 108 | */ |
107 | 109 | @AutoLog(value = "货主-编辑") |
108 | 110 | @ApiOperation(value="货主-编辑", notes="货主-编辑") |
111 | + @RequiresPermissions("company:edit") | |
109 | 112 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
110 | 113 | public Result<String> edit(@RequestBody Company company) { |
111 | 114 | companyService.updateById(company); |
... | ... | @@ -120,6 +123,7 @@ public class CompanyController extends JeecgController<Company, ICompanyService> |
120 | 123 | */ |
121 | 124 | @AutoLog(value = "货主-通过id删除") |
122 | 125 | @ApiOperation(value="货主-通过id删除", notes="货主-通过id删除") |
126 | + @RequiresPermissions("company:delete") | |
123 | 127 | @DeleteMapping(value = "/delete") |
124 | 128 | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
125 | 129 | companyService.removeById(id); |
... | ... | @@ -134,6 +138,7 @@ public class CompanyController extends JeecgController<Company, ICompanyService> |
134 | 138 | */ |
135 | 139 | @AutoLog(value = "货主-批量删除") |
136 | 140 | @ApiOperation(value="货主-批量删除", notes="货主-批量删除") |
141 | + @RequiresPermissions("company:deleteBatch") | |
137 | 142 | @DeleteMapping(value = "/deleteBatch") |
138 | 143 | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
139 | 144 | this.companyService.removeByIds(Arrays.asList(ids.split(","))); |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/container/controller/ContainerController.java
... | ... | @@ -15,6 +15,7 @@ import javax.servlet.http.HttpServletResponse; |
15 | 15 | import com.aliyun.oss.ServiceException; |
16 | 16 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
17 | 17 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
18 | +import org.apache.shiro.authz.annotation.RequiresPermissions; | |
18 | 19 | import org.jeecg.common.api.vo.Result; |
19 | 20 | import org.jeecg.common.system.query.QueryGenerator; |
20 | 21 | import org.jeecg.common.system.util.JwtUtil; |
... | ... | @@ -97,6 +98,7 @@ public class ContainerController extends JeecgController<Container, IContainerSe |
97 | 98 | @AutoLog(value = "容器管理-添加") |
98 | 99 | @ApiOperation(value="容器管理-添加", notes="容器管理-添加") |
99 | 100 | @PostMapping(value = "/add") |
101 | + @RequiresPermissions("container:add") | |
100 | 102 | public Result<String> add(@RequestBody Container container, HttpServletRequest req) { |
101 | 103 | String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); |
102 | 104 | if(StringUtils.isNotEmpty(warehouseCode)) { |
... | ... | @@ -115,6 +117,7 @@ public class ContainerController extends JeecgController<Container, IContainerSe |
115 | 117 | */ |
116 | 118 | @AutoLog(value = "容器管理-编辑") |
117 | 119 | @ApiOperation(value="容器管理-编辑", notes="容器管理-编辑") |
120 | + @RequiresPermissions("container:edit") | |
118 | 121 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
119 | 122 | public Result<String> edit(@RequestBody Container container) { |
120 | 123 | String locationCode = container.getLocationCode(); |
... | ... | @@ -140,6 +143,7 @@ public class ContainerController extends JeecgController<Container, IContainerSe |
140 | 143 | @AutoLog(value = "容器管理-通过id删除") |
141 | 144 | @ApiOperation(value="容器管理-通过id删除", notes="容器管理-通过id删除") |
142 | 145 | @DeleteMapping(value = "/delete") |
146 | + @RequiresPermissions("container:delete") | |
143 | 147 | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
144 | 148 | containerService.removeById(id); |
145 | 149 | return Result.OK("删除成功!"); |
... | ... | @@ -153,6 +157,7 @@ public class ContainerController extends JeecgController<Container, IContainerSe |
153 | 157 | */ |
154 | 158 | @AutoLog(value = "容器管理-批量删除") |
155 | 159 | @ApiOperation(value="容器管理-批量删除", notes="容器管理-批量删除") |
160 | + @RequiresPermissions("container:deleteBatch") | |
156 | 161 | @DeleteMapping(value = "/deleteBatch") |
157 | 162 | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
158 | 163 | this.containerService.removeByIds(Arrays.asList(ids.split(","))); |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/containerCapacity/controller/ContainerCapacityController.java
... | ... | @@ -9,6 +9,8 @@ import java.io.UnsupportedEncodingException; |
9 | 9 | import java.net.URLDecoder; |
10 | 10 | import javax.servlet.http.HttpServletRequest; |
11 | 11 | import javax.servlet.http.HttpServletResponse; |
12 | + | |
13 | +import org.apache.shiro.authz.annotation.RequiresPermissions; | |
12 | 14 | import org.jeecg.common.api.vo.Result; |
13 | 15 | import org.jeecg.common.system.query.QueryGenerator; |
14 | 16 | import org.jeecg.common.system.util.JwtUtil; |
... | ... | @@ -85,6 +87,7 @@ public class ContainerCapacityController extends JeecgController<ContainerCapaci |
85 | 87 | @AutoLog(value = "容器容量管理-添加") |
86 | 88 | @ApiOperation(value="容器容量管理-添加", notes="容器容量管理-添加") |
87 | 89 | @PostMapping(value = "/add") |
90 | + @RequiresPermissions("containerCapacity:add") | |
88 | 91 | public Result<String> add(@RequestBody ContainerCapacity containerCapacity, HttpServletRequest req) { |
89 | 92 | String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); |
90 | 93 | if(StringUtils.isNotEmpty(warehouseCode)) { |
... | ... | @@ -102,6 +105,7 @@ public class ContainerCapacityController extends JeecgController<ContainerCapaci |
102 | 105 | */ |
103 | 106 | @AutoLog(value = "容器容量管理-编辑") |
104 | 107 | @ApiOperation(value="容器容量管理-编辑", notes="容器容量管理-编辑") |
108 | + @RequiresPermissions("containerCapacity:edit") | |
105 | 109 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
106 | 110 | public Result<String> edit(@RequestBody ContainerCapacity containerCapacity) { |
107 | 111 | containerCapacityService.updateById(containerCapacity); |
... | ... | @@ -116,6 +120,7 @@ public class ContainerCapacityController extends JeecgController<ContainerCapaci |
116 | 120 | */ |
117 | 121 | @AutoLog(value = "容器容量管理-通过id删除") |
118 | 122 | @ApiOperation(value="容器容量管理-通过id删除", notes="容器容量管理-通过id删除") |
123 | + @RequiresPermissions("containerCapacity:delete") | |
119 | 124 | @DeleteMapping(value = "/delete") |
120 | 125 | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
121 | 126 | containerCapacityService.removeById(id); |
... | ... | @@ -131,6 +136,7 @@ public class ContainerCapacityController extends JeecgController<ContainerCapaci |
131 | 136 | @AutoLog(value = "容器容量管理-批量删除") |
132 | 137 | @ApiOperation(value="容器容量管理-批量删除", notes="容器容量管理-批量删除") |
133 | 138 | @DeleteMapping(value = "/deleteBatch") |
139 | + @RequiresPermissions("containerCapacity:deleteBatch") | |
134 | 140 | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
135 | 141 | this.containerCapacityService.removeByIds(Arrays.asList(ids.split(","))); |
136 | 142 | return Result.OK("批量删除成功!"); |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/containerType/controller/ContainerTypeController.java
... | ... | @@ -12,6 +12,7 @@ import javax.servlet.http.HttpServletResponse; |
12 | 12 | |
13 | 13 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
14 | 14 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
15 | +import org.apache.shiro.authz.annotation.RequiresPermissions; | |
15 | 16 | import org.jeecg.common.api.vo.Result; |
16 | 17 | import org.jeecg.common.system.query.QueryGenerator; |
17 | 18 | import org.jeecg.common.system.util.JwtUtil; |
... | ... | @@ -88,6 +89,7 @@ public class ContainerTypeController extends JeecgController<ContainerType, ICon |
88 | 89 | */ |
89 | 90 | @AutoLog(value = "容器类型-添加") |
90 | 91 | @ApiOperation(value="容器类型-添加", notes="容器类型-添加") |
92 | + @RequiresPermissions("containerType:add") | |
91 | 93 | @PostMapping(value = "/add") |
92 | 94 | public Result<String> add(@RequestBody ContainerType containerType, HttpServletRequest req) { |
93 | 95 | String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); |
... | ... | @@ -106,6 +108,7 @@ public class ContainerTypeController extends JeecgController<ContainerType, ICon |
106 | 108 | */ |
107 | 109 | @AutoLog(value = "容器类型-编辑") |
108 | 110 | @ApiOperation(value="容器类型-编辑", notes="容器类型-编辑") |
111 | + @RequiresPermissions("containerType:edit") | |
109 | 112 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
110 | 113 | public Result<String> edit(@RequestBody ContainerType containerType) { |
111 | 114 | containerTypeService.updateById(containerType); |
... | ... | @@ -120,6 +123,7 @@ public class ContainerTypeController extends JeecgController<ContainerType, ICon |
120 | 123 | */ |
121 | 124 | @AutoLog(value = "容器类型-通过id删除") |
122 | 125 | @ApiOperation(value="容器类型-通过id删除", notes="容器类型-通过id删除") |
126 | + @RequiresPermissions("containerType:delete") | |
123 | 127 | @DeleteMapping(value = "/delete") |
124 | 128 | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
125 | 129 | containerTypeService.removeById(id); |
... | ... | @@ -134,6 +138,7 @@ public class ContainerTypeController extends JeecgController<ContainerType, ICon |
134 | 138 | */ |
135 | 139 | @AutoLog(value = "容器类型-批量删除") |
136 | 140 | @ApiOperation(value="容器类型-批量删除", notes="容器类型-批量删除") |
141 | + @RequiresPermissions("containerType:deleteBatch") | |
137 | 142 | @DeleteMapping(value = "/deleteBatch") |
138 | 143 | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
139 | 144 | this.containerTypeService.removeByIds(Arrays.asList(ids.split(","))); |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/customer/controller/CustomerController.java
... | ... | @@ -13,6 +13,7 @@ import javax.servlet.http.HttpServletResponse; |
13 | 13 | |
14 | 14 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
15 | 15 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
16 | +import org.apache.shiro.authz.annotation.RequiresPermissions; | |
16 | 17 | import org.jeecg.common.api.vo.Result; |
17 | 18 | import org.jeecg.common.system.query.QueryGenerator; |
18 | 19 | import org.jeecg.common.system.util.JwtUtil; |
... | ... | @@ -91,6 +92,7 @@ public class CustomerController extends JeecgController<Customer, ICustomerServi |
91 | 92 | @AutoLog(value = "客户管理-添加") |
92 | 93 | @ApiOperation(value="客户管理-添加", notes="客户管理-添加") |
93 | 94 | @PostMapping(value = "/add") |
95 | + @RequiresPermissions("customer:add") | |
94 | 96 | public Result<String> add(@RequestBody Customer customer, HttpServletRequest req) { |
95 | 97 | String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); |
96 | 98 | if(StringUtils.isNotEmpty(warehouseCode)) { |
... | ... | @@ -108,6 +110,7 @@ public class CustomerController extends JeecgController<Customer, ICustomerServi |
108 | 110 | */ |
109 | 111 | @AutoLog(value = "客户管理-编辑") |
110 | 112 | @ApiOperation(value="客户管理-编辑", notes="客户管理-编辑") |
113 | + @RequiresPermissions("customer:edit") | |
111 | 114 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
112 | 115 | public Result<String> edit(@RequestBody Customer customer) { |
113 | 116 | customerService.updateById(customer); |
... | ... | @@ -121,6 +124,7 @@ public class CustomerController extends JeecgController<Customer, ICustomerServi |
121 | 124 | * @return |
122 | 125 | */ |
123 | 126 | @AutoLog(value = "客户管理-通过id删除") |
127 | + @RequiresPermissions("customer:delete") | |
124 | 128 | @ApiOperation(value="客户管理-通过id删除", notes="客户管理-通过id删除") |
125 | 129 | @DeleteMapping(value = "/delete") |
126 | 130 | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
... | ... | @@ -136,6 +140,7 @@ public class CustomerController extends JeecgController<Customer, ICustomerServi |
136 | 140 | */ |
137 | 141 | @AutoLog(value = "客户管理-批量删除") |
138 | 142 | @ApiOperation(value="客户管理-批量删除", notes="客户管理-批量删除") |
143 | + @RequiresPermissions("customer:deleteBatch") | |
139 | 144 | @DeleteMapping(value = "/deleteBatch") |
140 | 145 | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
141 | 146 | this.customerService.removeByIds(Arrays.asList(ids.split(","))); |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/material/controller/MaterialController.java
... | ... | @@ -14,6 +14,7 @@ import javax.servlet.http.HttpServletResponse; |
14 | 14 | |
15 | 15 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
16 | 16 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
17 | +import org.apache.shiro.authz.annotation.RequiresPermissions; | |
17 | 18 | import org.jeecg.common.api.vo.Result; |
18 | 19 | import org.jeecg.common.system.query.QueryGenerator; |
19 | 20 | import org.jeecg.common.system.util.JwtUtil; |
... | ... | @@ -91,6 +92,7 @@ public class MaterialController extends JeecgController<Material, IMaterialServi |
91 | 92 | * @return |
92 | 93 | */ |
93 | 94 | @AutoLog(value = "物料管理-添加") |
95 | + @RequiresPermissions("material:add") | |
94 | 96 | @ApiOperation(value="物料管理-添加", notes="物料管理-添加") |
95 | 97 | @PostMapping(value = "/add") |
96 | 98 | public Result<String> add(@RequestBody Material material, HttpServletRequest req) { |
... | ... | @@ -110,6 +112,7 @@ public class MaterialController extends JeecgController<Material, IMaterialServi |
110 | 112 | */ |
111 | 113 | @AutoLog(value = "物料管理-编辑") |
112 | 114 | @ApiOperation(value="物料管理-编辑", notes="物料管理-编辑") |
115 | + @RequiresPermissions("material:edit") | |
113 | 116 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
114 | 117 | public Result<String> edit(@RequestBody Material material) { |
115 | 118 | materialService.updateById(material); |
... | ... | @@ -125,6 +128,7 @@ public class MaterialController extends JeecgController<Material, IMaterialServi |
125 | 128 | @AutoLog(value = "物料管理-通过id删除") |
126 | 129 | @ApiOperation(value="物料管理-通过id删除", notes="物料管理-通过id删除") |
127 | 130 | @DeleteMapping(value = "/delete") |
131 | + @RequiresPermissions("material:delete") | |
128 | 132 | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
129 | 133 | materialService.removeById(id); |
130 | 134 | return Result.OK("删除成功!"); |
... | ... | @@ -139,6 +143,7 @@ public class MaterialController extends JeecgController<Material, IMaterialServi |
139 | 143 | @AutoLog(value = "物料管理-批量删除") |
140 | 144 | @ApiOperation(value="物料管理-批量删除", notes="物料管理-批量删除") |
141 | 145 | @DeleteMapping(value = "/deleteBatch") |
146 | + @RequiresPermissions("material:deleteBatch") | |
142 | 147 | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
143 | 148 | this.materialService.removeByIds(Arrays.asList(ids.split(","))); |
144 | 149 | return Result.OK("批量删除成功!"); |
... | ... | @@ -168,6 +173,7 @@ public class MaterialController extends JeecgController<Material, IMaterialServi |
168 | 173 | * @param material |
169 | 174 | */ |
170 | 175 | @RequestMapping(value = "/exportXls") |
176 | + @RequiresPermissions("material:exportXls") | |
171 | 177 | public ModelAndView exportXls(HttpServletRequest request, Material material) { |
172 | 178 | return super.exportXls(request, material, Material.class, "物料管理"); |
173 | 179 | } |
... | ... | @@ -180,6 +186,7 @@ public class MaterialController extends JeecgController<Material, IMaterialServi |
180 | 186 | */ |
181 | 187 | @AutoLog(value = "物料管理-获取打印数据") |
182 | 188 | @ApiOperation(value="物料管理-获取打印数据", notes="物料管理-获取打印数据") |
189 | + @RequiresPermissions("material:print") | |
183 | 190 | @PostMapping(value = "/getPrintContent") |
184 | 191 | @ResponseBody |
185 | 192 | public Result getPrintContent(@RequestParam(name="ids",required=true) String ids) { |
... | ... | @@ -196,7 +203,8 @@ public class MaterialController extends JeecgController<Material, IMaterialServi |
196 | 203 | * @return |
197 | 204 | */ |
198 | 205 | @RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
199 | - public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { | |
206 | + @RequiresPermissions("material:importExcel") | |
207 | + public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { | |
200 | 208 | return super.importExcel(request, response, Material.class); |
201 | 209 | } |
202 | 210 | |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/materialArea/controller/MaterialAreaController.java
... | ... | @@ -9,6 +9,8 @@ import java.io.UnsupportedEncodingException; |
9 | 9 | import java.net.URLDecoder; |
10 | 10 | import javax.servlet.http.HttpServletRequest; |
11 | 11 | import javax.servlet.http.HttpServletResponse; |
12 | + | |
13 | +import org.apache.shiro.authz.annotation.RequiresPermissions; | |
12 | 14 | import org.jeecg.common.api.vo.Result; |
13 | 15 | import org.jeecg.common.system.query.QueryGenerator; |
14 | 16 | import org.jeecg.common.system.util.JwtUtil; |
... | ... | @@ -83,6 +85,7 @@ public class MaterialAreaController extends JeecgController<MaterialArea, IMater |
83 | 85 | * @return |
84 | 86 | */ |
85 | 87 | @AutoLog(value = "物料分区-添加") |
88 | + @RequiresPermissions("materialArea:add") | |
86 | 89 | @ApiOperation(value="物料分区-添加", notes="物料分区-添加") |
87 | 90 | @PostMapping(value = "/add") |
88 | 91 | public Result<String> add(@RequestBody MaterialArea materialArea, HttpServletRequest req) { |
... | ... | @@ -101,6 +104,7 @@ public class MaterialAreaController extends JeecgController<MaterialArea, IMater |
101 | 104 | * @return |
102 | 105 | */ |
103 | 106 | @AutoLog(value = "物料分区-编辑") |
107 | + @RequiresPermissions("materialArea:edit") | |
104 | 108 | @ApiOperation(value="物料分区-编辑", notes="物料分区-编辑") |
105 | 109 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
106 | 110 | public Result<String> edit(@RequestBody MaterialArea materialArea) { |
... | ... | @@ -115,6 +119,7 @@ public class MaterialAreaController extends JeecgController<MaterialArea, IMater |
115 | 119 | * @return |
116 | 120 | */ |
117 | 121 | @AutoLog(value = "物料分区-通过id删除") |
122 | + @RequiresPermissions("materialArea:delete") | |
118 | 123 | @ApiOperation(value="物料分区-通过id删除", notes="物料分区-通过id删除") |
119 | 124 | @DeleteMapping(value = "/delete") |
120 | 125 | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
... | ... | @@ -130,6 +135,7 @@ public class MaterialAreaController extends JeecgController<MaterialArea, IMater |
130 | 135 | */ |
131 | 136 | @AutoLog(value = "物料分区-批量删除") |
132 | 137 | @ApiOperation(value="物料分区-批量删除", notes="物料分区-批量删除") |
138 | + @RequiresPermissions("materialArea:deleteBatch") | |
133 | 139 | @DeleteMapping(value = "/deleteBatch") |
134 | 140 | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
135 | 141 | this.materialAreaService.removeByIds(Arrays.asList(ids.split(","))); |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/materialMultiple/controller/MaterialMultipleController.java
... | ... | @@ -9,6 +9,8 @@ import java.io.UnsupportedEncodingException; |
9 | 9 | import java.net.URLDecoder; |
10 | 10 | import javax.servlet.http.HttpServletRequest; |
11 | 11 | import javax.servlet.http.HttpServletResponse; |
12 | + | |
13 | +import org.apache.shiro.authz.annotation.RequiresPermissions; | |
12 | 14 | import org.jeecg.common.api.vo.Result; |
13 | 15 | import org.jeecg.common.system.query.QueryGenerator; |
14 | 16 | import org.jeecg.common.system.util.JwtUtil; |
... | ... | @@ -84,6 +86,7 @@ public class MaterialMultipleController extends JeecgController<MaterialMultiple |
84 | 86 | */ |
85 | 87 | @AutoLog(value = "物料单位换算-添加") |
86 | 88 | @ApiOperation(value="物料单位换算-添加", notes="物料单位换算-添加") |
89 | + @RequiresPermissions("materialMultiple:add") | |
87 | 90 | @PostMapping(value = "/add") |
88 | 91 | public Result<String> add(@RequestBody MaterialMultiple materialMultiple, HttpServletRequest req) { |
89 | 92 | String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); |
... | ... | @@ -101,6 +104,7 @@ public class MaterialMultipleController extends JeecgController<MaterialMultiple |
101 | 104 | * @return |
102 | 105 | */ |
103 | 106 | @AutoLog(value = "物料单位换算-编辑") |
107 | + @RequiresPermissions("materialMultiple:deit") | |
104 | 108 | @ApiOperation(value="物料单位换算-编辑", notes="物料单位换算-编辑") |
105 | 109 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
106 | 110 | public Result<String> edit(@RequestBody MaterialMultiple materialMultiple) { |
... | ... | @@ -115,6 +119,7 @@ public class MaterialMultipleController extends JeecgController<MaterialMultiple |
115 | 119 | * @return |
116 | 120 | */ |
117 | 121 | @AutoLog(value = "物料单位换算-通过id删除") |
122 | + @RequiresPermissions("materialMultiple:delete") | |
118 | 123 | @ApiOperation(value="物料单位换算-通过id删除", notes="物料单位换算-通过id删除") |
119 | 124 | @DeleteMapping(value = "/delete") |
120 | 125 | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
... | ... | @@ -130,6 +135,7 @@ public class MaterialMultipleController extends JeecgController<MaterialMultiple |
130 | 135 | */ |
131 | 136 | @AutoLog(value = "物料单位换算-批量删除") |
132 | 137 | @ApiOperation(value="物料单位换算-批量删除", notes="物料单位换算-批量删除") |
138 | + @RequiresPermissions("materialMultiple:deleteBatch") | |
133 | 139 | @DeleteMapping(value = "/deleteBatch") |
134 | 140 | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
135 | 141 | this.materialMultipleService.removeByIds(Arrays.asList(ids.split(","))); |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/materialType/controller/MaterialTypeController.java
... | ... | @@ -9,6 +9,8 @@ import java.io.UnsupportedEncodingException; |
9 | 9 | import java.net.URLDecoder; |
10 | 10 | import javax.servlet.http.HttpServletRequest; |
11 | 11 | import javax.servlet.http.HttpServletResponse; |
12 | + | |
13 | +import org.apache.shiro.authz.annotation.RequiresPermissions; | |
12 | 14 | import org.jeecg.common.api.vo.Result; |
13 | 15 | import org.jeecg.common.system.query.QueryGenerator; |
14 | 16 | import org.jeecg.common.system.util.JwtUtil; |
... | ... | @@ -83,6 +85,7 @@ public class MaterialTypeController extends JeecgController<MaterialType, IMater |
83 | 85 | * @return |
84 | 86 | */ |
85 | 87 | @AutoLog(value = "物料类别-添加") |
88 | + @RequiresPermissions("materialType:add") | |
86 | 89 | @ApiOperation(value="物料类别-添加", notes="物料类别-添加") |
87 | 90 | @PostMapping(value = "/add") |
88 | 91 | public Result<String> add(@RequestBody MaterialType materialType, HttpServletRequest req) { |
... | ... | @@ -101,6 +104,7 @@ public class MaterialTypeController extends JeecgController<MaterialType, IMater |
101 | 104 | * @return |
102 | 105 | */ |
103 | 106 | @AutoLog(value = "物料类别-编辑") |
107 | + @RequiresPermissions("materialType:edit") | |
104 | 108 | @ApiOperation(value="物料类别-编辑", notes="物料类别-编辑") |
105 | 109 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
106 | 110 | public Result<String> edit(@RequestBody MaterialType materialType) { |
... | ... | @@ -115,6 +119,7 @@ public class MaterialTypeController extends JeecgController<MaterialType, IMater |
115 | 119 | * @return |
116 | 120 | */ |
117 | 121 | @AutoLog(value = "物料类别-通过id删除") |
122 | + @RequiresPermissions("materialType:delete") | |
118 | 123 | @ApiOperation(value="物料类别-通过id删除", notes="物料类别-通过id删除") |
119 | 124 | @DeleteMapping(value = "/delete") |
120 | 125 | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
... | ... | @@ -130,6 +135,7 @@ public class MaterialTypeController extends JeecgController<MaterialType, IMater |
130 | 135 | */ |
131 | 136 | @AutoLog(value = "物料类别-批量删除") |
132 | 137 | @ApiOperation(value="物料类别-批量删除", notes="物料类别-批量删除") |
138 | + @RequiresPermissions("materialType:deleteBatch") | |
133 | 139 | @DeleteMapping(value = "/deleteBatch") |
134 | 140 | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
135 | 141 | this.materialTypeService.removeByIds(Arrays.asList(ids.split(","))); |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/materialUnit/controller/MaterialUnitController.java
... | ... | @@ -9,6 +9,8 @@ import java.io.UnsupportedEncodingException; |
9 | 9 | import java.net.URLDecoder; |
10 | 10 | import javax.servlet.http.HttpServletRequest; |
11 | 11 | import javax.servlet.http.HttpServletResponse; |
12 | + | |
13 | +import org.apache.shiro.authz.annotation.RequiresPermissions; | |
12 | 14 | import org.jeecg.common.api.vo.Result; |
13 | 15 | import org.jeecg.common.system.query.QueryGenerator; |
14 | 16 | import org.jeecg.common.system.util.JwtUtil; |
... | ... | @@ -85,6 +87,7 @@ public class MaterialUnitController extends JeecgController<MaterialUnit, IMater |
85 | 87 | @AutoLog(value = "物料单位-添加") |
86 | 88 | @ApiOperation(value="物料单位-添加", notes="物料单位-添加") |
87 | 89 | @PostMapping(value = "/add") |
90 | + @RequiresPermissions("materialUnit:add") | |
88 | 91 | public Result<String> add(@RequestBody MaterialUnit materialUnit, HttpServletRequest req) { |
89 | 92 | String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); |
90 | 93 | if(StringUtils.isNotEmpty(warehouseCode)) { |
... | ... | @@ -102,6 +105,7 @@ public class MaterialUnitController extends JeecgController<MaterialUnit, IMater |
102 | 105 | */ |
103 | 106 | @AutoLog(value = "物料单位-编辑") |
104 | 107 | @ApiOperation(value="物料单位-编辑", notes="物料单位-编辑") |
108 | + @RequiresPermissions("materialUnit:edit") | |
105 | 109 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
106 | 110 | public Result<String> edit(@RequestBody MaterialUnit materialUnit) { |
107 | 111 | materialUnitService.updateById(materialUnit); |
... | ... | @@ -117,6 +121,7 @@ public class MaterialUnitController extends JeecgController<MaterialUnit, IMater |
117 | 121 | @AutoLog(value = "物料单位-通过id删除") |
118 | 122 | @ApiOperation(value="物料单位-通过id删除", notes="物料单位-通过id删除") |
119 | 123 | @DeleteMapping(value = "/delete") |
124 | + @RequiresPermissions("materialUnit:delete") | |
120 | 125 | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
121 | 126 | materialUnitService.removeById(id); |
122 | 127 | return Result.OK("删除成功!"); |
... | ... | @@ -131,6 +136,7 @@ public class MaterialUnitController extends JeecgController<MaterialUnit, IMater |
131 | 136 | @AutoLog(value = "物料单位-批量删除") |
132 | 137 | @ApiOperation(value="物料单位-批量删除", notes="物料单位-批量删除") |
133 | 138 | @DeleteMapping(value = "/deleteBatch") |
139 | + @RequiresPermissions("materialUnit:deleteBatch") | |
134 | 140 | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
135 | 141 | this.materialUnitService.removeByIds(Arrays.asList(ids.split(","))); |
136 | 142 | return Result.OK("批量删除成功!"); |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/materialWarning/controller/MaterialWarningController.java
... | ... | @@ -9,6 +9,8 @@ import java.io.UnsupportedEncodingException; |
9 | 9 | import java.net.URLDecoder; |
10 | 10 | import javax.servlet.http.HttpServletRequest; |
11 | 11 | import javax.servlet.http.HttpServletResponse; |
12 | + | |
13 | +import org.apache.shiro.authz.annotation.RequiresPermissions; | |
12 | 14 | import org.jeecg.common.api.vo.Result; |
13 | 15 | import org.jeecg.common.system.query.QueryGenerator; |
14 | 16 | import org.jeecg.common.system.util.JwtUtil; |
... | ... | @@ -83,6 +85,7 @@ public class MaterialWarningController extends JeecgController<MaterialWarning, |
83 | 85 | * @return |
84 | 86 | */ |
85 | 87 | @AutoLog(value = "物料预警-添加") |
88 | + @RequiresPermissions("materialWarning:add") | |
86 | 89 | @ApiOperation(value="物料预警-添加", notes="物料预警-添加") |
87 | 90 | @PostMapping(value = "/add") |
88 | 91 | public Result<String> add(@RequestBody MaterialWarning materialWarning, HttpServletRequest req) { |
... | ... | @@ -101,6 +104,7 @@ public class MaterialWarningController extends JeecgController<MaterialWarning, |
101 | 104 | * @return |
102 | 105 | */ |
103 | 106 | @AutoLog(value = "物料预警-编辑") |
107 | + @RequiresPermissions("materialWarning:edit") | |
104 | 108 | @ApiOperation(value="物料预警-编辑", notes="物料预警-编辑") |
105 | 109 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
106 | 110 | public Result<String> edit(@RequestBody MaterialWarning materialWarning) { |
... | ... | @@ -115,6 +119,7 @@ public class MaterialWarningController extends JeecgController<MaterialWarning, |
115 | 119 | * @return |
116 | 120 | */ |
117 | 121 | @AutoLog(value = "物料预警-通过id删除") |
122 | + @RequiresPermissions("materialWarning:delete") | |
118 | 123 | @ApiOperation(value="物料预警-通过id删除", notes="物料预警-通过id删除") |
119 | 124 | @DeleteMapping(value = "/delete") |
120 | 125 | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
... | ... | @@ -130,6 +135,7 @@ public class MaterialWarningController extends JeecgController<MaterialWarning, |
130 | 135 | */ |
131 | 136 | @AutoLog(value = "物料预警-批量删除") |
132 | 137 | @ApiOperation(value="物料预警-批量删除", notes="物料预警-批量删除") |
138 | + @RequiresPermissions("materialWarning:deleteBatch") | |
133 | 139 | @DeleteMapping(value = "/deleteBatch") |
134 | 140 | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
135 | 141 | this.materialWarningService.removeByIds(Arrays.asList(ids.split(","))); |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/port/controller/PortController.java
... | ... | @@ -9,6 +9,8 @@ import java.io.UnsupportedEncodingException; |
9 | 9 | import java.net.URLDecoder; |
10 | 10 | import javax.servlet.http.HttpServletRequest; |
11 | 11 | import javax.servlet.http.HttpServletResponse; |
12 | + | |
13 | +import org.apache.shiro.authz.annotation.RequiresPermissions; | |
12 | 14 | import org.jeecg.common.api.vo.Result; |
13 | 15 | import org.jeecg.common.system.query.QueryGenerator; |
14 | 16 | import org.jeecg.common.system.util.JwtUtil; |
... | ... | @@ -85,6 +87,7 @@ public class PortController extends JeecgController<Port, IPortService> { |
85 | 87 | @AutoLog(value = "出入口-添加") |
86 | 88 | @ApiOperation(value="出入口-添加", notes="出入口-添加") |
87 | 89 | @PostMapping(value = "/add") |
90 | + @RequiresPermissions("port:add") | |
88 | 91 | public Result<String> add(@RequestBody Port port, HttpServletRequest req) { |
89 | 92 | String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); |
90 | 93 | if(StringUtils.isNotEmpty(warehouseCode)) { |
... | ... | @@ -102,6 +105,7 @@ public class PortController extends JeecgController<Port, IPortService> { |
102 | 105 | */ |
103 | 106 | @AutoLog(value = "出入口-编辑") |
104 | 107 | @ApiOperation(value="出入口-编辑", notes="出入口-编辑") |
108 | + @RequiresPermissions("port:edit") | |
105 | 109 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
106 | 110 | public Result<String> edit(@RequestBody Port port) { |
107 | 111 | portService.updateById(port); |
... | ... | @@ -116,6 +120,7 @@ public class PortController extends JeecgController<Port, IPortService> { |
116 | 120 | */ |
117 | 121 | @AutoLog(value = "出入口-通过id删除") |
118 | 122 | @ApiOperation(value="出入口-通过id删除", notes="出入口-通过id删除") |
123 | + @RequiresPermissions("port:delete") | |
119 | 124 | @DeleteMapping(value = "/delete") |
120 | 125 | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
121 | 126 | portService.removeById(id); |
... | ... | @@ -130,6 +135,7 @@ public class PortController extends JeecgController<Port, IPortService> { |
130 | 135 | */ |
131 | 136 | @AutoLog(value = "出入口-批量删除") |
132 | 137 | @ApiOperation(value="出入口-批量删除", notes="出入口-批量删除") |
138 | + @RequiresPermissions("port:deleteBatch") | |
133 | 139 | @DeleteMapping(value = "/deleteBatch") |
134 | 140 | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
135 | 141 | this.portService.removeByIds(Arrays.asList(ids.split(","))); |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/supplier/controller/SupplierController.java
... | ... | @@ -12,6 +12,7 @@ import javax.servlet.http.HttpServletResponse; |
12 | 12 | |
13 | 13 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
14 | 14 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
15 | +import org.apache.shiro.authz.annotation.RequiresPermissions; | |
15 | 16 | import org.jeecg.common.api.vo.Result; |
16 | 17 | import org.jeecg.common.system.query.QueryGenerator; |
17 | 18 | import org.jeecg.common.system.util.JwtUtil; |
... | ... | @@ -89,6 +90,7 @@ public class SupplierController extends JeecgController<Supplier, ISupplierServi |
89 | 90 | @AutoLog(value = "供应商管理-添加") |
90 | 91 | @ApiOperation(value="供应商管理-添加", notes="供应商管理-添加") |
91 | 92 | @PostMapping(value = "/add") |
93 | + @RequiresPermissions("supplier:add") | |
92 | 94 | public Result<String> add(@RequestBody Supplier supplier, HttpServletRequest req) { |
93 | 95 | String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); |
94 | 96 | if(StringUtils.isNotEmpty(warehouseCode)) { |
... | ... | @@ -106,6 +108,7 @@ public class SupplierController extends JeecgController<Supplier, ISupplierServi |
106 | 108 | */ |
107 | 109 | @AutoLog(value = "供应商管理-编辑") |
108 | 110 | @ApiOperation(value="供应商管理-编辑", notes="供应商管理-编辑") |
111 | + @RequiresPermissions("supplier:edit") | |
109 | 112 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
110 | 113 | public Result<String> edit(@RequestBody Supplier supplier) { |
111 | 114 | supplierService.updateById(supplier); |
... | ... | @@ -120,6 +123,7 @@ public class SupplierController extends JeecgController<Supplier, ISupplierServi |
120 | 123 | */ |
121 | 124 | @AutoLog(value = "供应商管理-通过id删除") |
122 | 125 | @ApiOperation(value="供应商管理-通过id删除", notes="供应商管理-通过id删除") |
126 | + @RequiresPermissions("supplier:delete") | |
123 | 127 | @DeleteMapping(value = "/delete") |
124 | 128 | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
125 | 129 | supplierService.removeById(id); |
... | ... | @@ -134,6 +138,7 @@ public class SupplierController extends JeecgController<Supplier, ISupplierServi |
134 | 138 | */ |
135 | 139 | @AutoLog(value = "供应商管理-批量删除") |
136 | 140 | @ApiOperation(value="供应商管理-批量删除", notes="供应商管理-批量删除") |
141 | + @RequiresPermissions("supplier:deleteBatch") | |
137 | 142 | @DeleteMapping(value = "/deleteBatch") |
138 | 143 | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
139 | 144 | this.supplierService.removeByIds(Arrays.asList(ids.split(","))); |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/zone/controller/ZoneController.java
... | ... | @@ -12,6 +12,7 @@ import javax.servlet.http.HttpServletResponse; |
12 | 12 | |
13 | 13 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
14 | 14 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
15 | +import org.apache.shiro.authz.annotation.RequiresPermissions; | |
15 | 16 | import org.jeecg.common.api.vo.Result; |
16 | 17 | import org.jeecg.common.system.query.QueryGenerator; |
17 | 18 | import org.jeecg.common.system.util.JwtUtil; |
... | ... | @@ -87,6 +88,7 @@ public class ZoneController extends JeecgController<Zone, IZoneService> { |
87 | 88 | */ |
88 | 89 | @AutoLog(value = "库区管理-添加") |
89 | 90 | @ApiOperation(value="库区管理-添加", notes="库区管理-添加") |
91 | + @RequiresPermissions("zone:add") | |
90 | 92 | @PostMapping(value = "/add") |
91 | 93 | public Result<String> add(@RequestBody Zone zone, HttpServletRequest req) { |
92 | 94 | String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); |
... | ... | @@ -105,6 +107,7 @@ public class ZoneController extends JeecgController<Zone, IZoneService> { |
105 | 107 | */ |
106 | 108 | @AutoLog(value = "库区管理-编辑") |
107 | 109 | @ApiOperation(value="库区管理-编辑", notes="库区管理-编辑") |
110 | + @RequiresPermissions("zone:edit") | |
108 | 111 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
109 | 112 | public Result<String> edit(@RequestBody Zone zone) { |
110 | 113 | zoneService.updateById(zone); |
... | ... | @@ -119,6 +122,7 @@ public class ZoneController extends JeecgController<Zone, IZoneService> { |
119 | 122 | */ |
120 | 123 | @AutoLog(value = "库区管理-通过id删除") |
121 | 124 | @ApiOperation(value="库区管理-通过id删除", notes="库区管理-通过id删除") |
125 | + @RequiresPermissions("zone:delete") | |
122 | 126 | @DeleteMapping(value = "/delete") |
123 | 127 | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
124 | 128 | zoneService.removeById(id); |
... | ... | @@ -133,6 +137,7 @@ public class ZoneController extends JeecgController<Zone, IZoneService> { |
133 | 137 | */ |
134 | 138 | @AutoLog(value = "库区管理-批量删除") |
135 | 139 | @ApiOperation(value="库区管理-批量删除", notes="库区管理-批量删除") |
140 | + @RequiresPermissions("zone:deleteBatch") | |
136 | 141 | @DeleteMapping(value = "/deleteBatch") |
137 | 142 | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
138 | 143 | this.zoneService.removeByIds(Arrays.asList(ids.split(","))); |
... | ... |