From 64d4993478b5ba6a91aa8c535482ae151acaceb2 Mon Sep 17 00:00:00 2001 From: nidapeng <jp@doumee.com> Date: 星期四, 11 四月 2024 09:35:25 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/1.0.1' into 1.0.1 --- server/service/src/main/java/com/doumee/service/business/impl/UnionChangeServiceImpl.java | 18 +++++++++++++++++- 1 files changed, 17 insertions(+), 1 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 a05336f..79b5655 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 @@ -36,6 +36,7 @@ import org.springframework.transaction.annotation.Transactional; import java.math.BigDecimal; +import java.math.RoundingMode; import java.util.Arrays; import java.util.Date; import java.util.List; @@ -187,7 +188,7 @@ fee = fee.subtract(new BigDecimal(maxDays).multiply(applyChagneDetail.getPrice())).add(applyChagneDetail.getFee()); } } - unionChange.setFee(fee); + unionChange.setFee(fee.setScale(2, RoundingMode.HALF_UP)); //鏌ヨ鎿嶄綔璁板綍 List<ApplyLog> applyLogList = applyLogJoinMapper.selectJoinList(ApplyLog.class, new MPJLambdaWrapper<ApplyLog>() @@ -389,6 +390,8 @@ UnionChange unionChange = new UnionChange(); unionChange.setCreateDate(new Date()); unionChange.setCreator(user.getId()); + unionChange.setEditDate(new Date()); + unionChange.setEditor(user.getId()); unionChange.setShopId(user.getCompanyId()); unionChange.setIsdeleted(Constants.ZERO); unionChange.setUnionApplyId(saveUnionChangeDTO.getUnionApplyId()); @@ -699,6 +702,7 @@ } if(CollectionUtils.isNotEmpty(applyChangeList)){ for (ApplyChange applyChange:applyChangeList) { + ApplyChange oldModel = applyChange; applyChange.setApplyStartTime(unionChangeBXDDTO.getApplyDate()); applyChange.setValidTime(unionChangeBXDDTO.getApplyDate()); applyChange.setEditDate(new Date()); @@ -727,6 +731,18 @@ .eq(ApplyChagneDetail::getApplyChangeId,applyChange.getId())); this.dealApplyChangeDetail(applyChange,allList); applyChangeJoinMapper.updateById(applyChange); + + //瀛樺偍鎵瑰崟瀹屾垚淇℃伅 + Constants.ApplyLogType applyLogType = Constants.ApplyLogType.CA_PLATFORM_APPROVE; + String info = ""; + if(applyChange.getValidTime()!=null && applyChange.getValidTime().getTime()/1000!= applyChange.getApplyStartTime().getTime()/1000){ + info =applyLogType.getInfo(); + info = info.replace("${param1}",DateUtil.getPlusTime2(applyChange.getValidTime())); + info = info.replace("${param2}",DateUtil.getPlusTime2(applyChange.getApplyStartTime())); + } + ApplyLog log = new ApplyLog(applyChange,applyLogType.getName(), info,applyChange.getId(),applyLogType.getKey(),JSONObject.toJSONString(oldModel), JSONObject.toJSONString(applyChange)); + applyLogMapper.insert(log); + } } unionChangeMapper.update(null,new UpdateWrapper<UnionChange>().lambda() -- Gitblit v1.9.3