소스 검색

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