Browse Source

fix”审核通过不能修改数据“为“审核通过不能删除数据”

LLL 10 months ago
parent
commit
3b7d3f21a3

+ 6 - 5
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/weituo/controller/ItdmWeituoInfoController.java

@@ -10,6 +10,7 @@ import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang.StringUtils;
 import org.apache.shiro.SecurityUtils;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.aspect.annotation.AutoLog;
 import org.jeecg.common.system.base.controller.JeecgController;
@@ -160,7 +161,7 @@ public class ItdmWeituoInfoController extends JeecgController<ItdmWeituoInfo, II
      */
     @AutoLog(value = "委托信息-添加——提交")
     @ApiOperation(value = "委托信息-添加——提交", notes = "委托信息-添加——提交")
-    //@RequiresPermissions("org.jeecg.modules:itdm_weituo_info:add")
+    @RequiresPermissions("org.jeecg.modules:itdm_weituo_info:add")
     @PostMapping(value = "/add")
     public Result<String> add(@RequestBody WeituoInsertCommand itdmWeituoInfo) {
         itdmWeituoInfoService.saveWeituo(itdmWeituoInfo);
@@ -175,7 +176,7 @@ public class ItdmWeituoInfoController extends JeecgController<ItdmWeituoInfo, II
      */
     @AutoLog(value = "委托信息-编辑")
     @ApiOperation(value = "委托信息-编辑", notes = "委托信息-编辑")
-    //@RequiresPermissions("org.jeecg.modules:itdm_weituo_info:edit")
+    @RequiresPermissions("org.jeecg.modules:itdm_weituo_info:edit")
     @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
     public Result<String> edit(@RequestBody WeituoUpdateCommand itdmWeituoInfo) {
         itdmWeituoInfoService.updateWeituo(itdmWeituoInfo);
@@ -183,9 +184,9 @@ public class ItdmWeituoInfoController extends JeecgController<ItdmWeituoInfo, II
         return Result.OK("编辑成功!");
     }
 
-    @AutoLog(value = "委托信息-暂存")
+    @AutoLog(value = "委托信息-暂存(新增编辑)")
     @ApiOperation(value = "委托信息-暂存", notes = "委托信息-暂存")
-    //@RequiresPermissions("org.jeecg.modules:itdm_weituo_info:add")
+    @RequiresPermissions("org.jeecg.modules:itdm_weituo_info:staging")
     @PostMapping(value = "/staging")
     public Result<String> Staging(@RequestBody WeituoUpdateCommand itdmWeituoInfo) {
         itdmWeituoInfoService.stagingWeituo(itdmWeituoInfo);
@@ -199,7 +200,7 @@ public class ItdmWeituoInfoController extends JeecgController<ItdmWeituoInfo, II
      */
     @AutoLog(value = "委托信息-通过id删除")
     @ApiOperation(value = "委托信息-通过id删除", notes = "委托信息-通过id删除")
-    //@RequiresPermissions("org.jeecg.modules:itdm_weituo_info:delete")
+    @RequiresPermissions("org.jeecg.modules:itdm_weituo_info:delete")
     @DeleteMapping(value = "/delete")
     public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
         itdmWeituoInfoService.deleteById(id);

+ 1 - 1
itdmServer/module-iTDM/src/main/java/org/jeecg/modules/weituo/service/impl/ItdmWeituoInfoServiceImpl.java

@@ -255,7 +255,7 @@ public class ItdmWeituoInfoServiceImpl extends ServiceImpl<ItdmWeituoInfoMapper,
 
         ItdmWeituoInfo itdmWeituoInfo = this.baseMapper.selectById(id);
         if (Objects.equals(itdmWeituoInfo.getShenheStatus(), ShenheStatus.t.getCode())) {
-            throw new JeecgBootException("审核通过不能修改数据");
+            throw new JeecgBootException("审核通过不能删除数据");
         }
         this.baseMapper.deleteById(id);
         this.yangpinMapper.delete(Wrappers.lambdaQuery(ItdmWeituoYangpin.class).eq(ItdmWeituoYangpin::getWeituoId, id));