瀏覽代碼

fix:扣款管理添加判断

ly 9 月之前
父節點
當前提交
734fd374bd
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      src/main/java/cn/ezhizao/project/business/deduct/controller/BizDeductController.java

+ 3 - 0
src/main/java/cn/ezhizao/project/business/deduct/controller/BizDeductController.java

@@ -624,6 +624,9 @@ public class BizDeductController extends BaseController {
     @distributedLock(prefix = "entrustDeductEdit",key = "#bizDeduct.id",errorMsg = "你的同事正在修改请您稍后刷新页面")
     public AjaxResult edit(@RequestBody BizDeduct bizDeduct) throws NoSuchFieldException, IllegalAccessException {
         boolean status = bizDeductService.updateById(bizDeduct);
+        if(!status){
+            throw new ServiceException("扣款失败,请刷新页面获取最新数据");
+        }
         bizDeduct.getCollect().forEach(l -> {
             l.setDeductId(bizDeduct.getId());
             l.setTenantId(bizDeduct.getTenantId());