Parcourir la source

fix:扣款管理添加判断

ly il y a 9 mois
Parent
commit
734fd374bd

+ 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());