From fd6df9412858c419689662d0ebd50f2cac231361 Mon Sep 17 00:00:00 2001
From: nidapeng <jp@doumee.com>
Date: 星期六, 06 四月 2024 14:26:53 +0800
Subject: [PATCH] 提交一把

---
 server/service/src/main/java/com/doumee/service/business/impl/UnionChangeServiceImpl.java |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/server/service/src/main/java/com/doumee/service/business/impl/UnionChangeServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/UnionChangeServiceImpl.java
index be2de67..d491222 100644
--- a/server/service/src/main/java/com/doumee/service/business/impl/UnionChangeServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/service/business/impl/UnionChangeServiceImpl.java
@@ -399,13 +399,16 @@
             throw new BusinessException(ResponseStatus.BAD_REQUEST);
         }
         LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
-        if(user.getType().equals(Constants.TWO)){
+        user.setType(Constants.formatIntegerNum(user.getType()));
+        if(!user.getType().equals(Constants.TWO)){
             throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"闈炲晢鎴风敤鎴凤紝鏃犳硶杩涜璇ユ搷浣滐紒");
         }
         UnionChange unionChange = unionChangeMapper.selectById(closeDTO.getId());
         if(Objects.isNull(unionChange)||!Constants.equalsInteger(unionChange.getIsdeleted(),Constants.ZERO)){
             throw new BusinessException(ResponseStatus.DATA_EMPTY);
         }
+        unionChange.setStatus(Constants.formatIntegerNum(unionChange.getStatus()));
+        unionChange.setShopId(Constants.formatIntegerNum(unionChange.getShopId()));
         if(!unionChange.getShopId().equals(user.getCompanyId())){
             throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(),"瀵逛笉璧烽潪鎮ㄧ殑鍚堝苟鍗曪紝鎮ㄦ棤娉曡繘琛屾搷浣滐紒");
         }
@@ -426,14 +429,14 @@
 
         applyChagneDetailJoinMapper.update(null,new UpdateWrapper<ApplyChagneDetail>().lambda()
                 .set(ApplyChagneDetail::getUnionChangeId,null)
-                .in(ApplyChagneDetail::getApplyId,unionChange.getId()));
+                .eq(ApplyChagneDetail::getUnionChangeId,unionChange.getId()));
 
         unionChangeMapper.update(null,new UpdateWrapper<UnionChange>().lambda()
-                .set(UnionChange::getStatus,Constants.UnionApplyStatus.CLOSE.getKey())
+                .set(UnionChange::getStatus,Constants.UnionChangeStatus.CLOSE.getKey())
                 .eq(UnionChange::getId,unionChange.getId())
         );
 
-        Constants.ApplyLogType applyLogType = Constants.ApplyLogType.CA_HBD_UPLOAD;
+        Constants.ApplyLogType applyLogType = Constants.ApplyLogType.CA_HBD_CLOSE;
         String info =applyLogType.getInfo();
         info = info.replace("${param}", closeDTO.getReason());
         ApplyLog log = new ApplyLog(unionChange,applyLogType.getName(), info
@@ -647,8 +650,6 @@
                 multifileMapper.insert(m);
             }
         }
-
-
         if(CollectionUtils.isNotEmpty(applyChangeList)){
             for (ApplyChange applyChange:applyChangeList) {
                 applyChange.setApplyStartTime(unionChangeBXDDTO.getApplyDate());

--
Gitblit v1.9.3