From 8eb351a50b7bcdf8faaf99cedce3b6bbc0125c4b Mon Sep 17 00:00:00 2001 From: chenjiahe <763432473@qq.com> Date: 星期日, 29 九月 2024 17:16:10 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/cjh-stander-老带新赠送积分' into master-stander --- phi_platform_user/src/main/java/com/hx/phip/controller/order/OrderControllerV2.java | 8 +++++--- phi_platform_user/src/main/java/com/hx/phip/service/order/impl/OrderRefundServiceImpl.java | 21 +++++++++++++++++++++ 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/phi_platform_user/src/main/java/com/hx/phip/controller/order/OrderControllerV2.java b/phi_platform_user/src/main/java/com/hx/phip/controller/order/OrderControllerV2.java index eeada72..2799c84 100644 --- a/phi_platform_user/src/main/java/com/hx/phip/controller/order/OrderControllerV2.java +++ b/phi_platform_user/src/main/java/com/hx/phip/controller/order/OrderControllerV2.java @@ -26,6 +26,7 @@ import com.hx.phiappt.model.order.*; import com.hx.phiappt.model.performance.PerformanceInfo; import com.hx.phiappt.model.userStatus.UserStatusLog; +import com.hx.phiappt.util.TimerHandleItemTool; import com.hx.phip.config.CustomParameter; import com.hx.phip.config.PlatformConfig; import com.hx.phip.service.ShopService; @@ -412,10 +413,11 @@ threadPool.getThreadPool().execute(()->{ - //绯荤粺娑堣垂璧犻�佺Н鍒� try { - TimerHandleItem timerHandleItem = new TimerHandleItem(TimerHandleItem.CONSUME_GIVE_INTEGRAL,ordersTotal.getId()); - commonService.insert(TimerHandleItemMapper.class,timerHandleItem); + //绯荤粺娑堣垂璧犻�佺Н鍒� + TimerHandleItemTool.addTimer(TimerHandleItem.CONSUME_GIVE_INTEGRAL,ordersTotal.getId(),commonService); + //绯荤粺娑堣垂璧犻�佺Н鍒�-鑰佸甫鏂� + TimerHandleItemTool.addTimer(TimerHandleItem.CONSUME_OLD_GIVE_INTEGRAL,ordersTotal.getId(),commonService); }catch (Exception e){ logger.info("澶勭悊娑堣垂閫佺Н鍒嗗嚭閿�:{}",e.getMessage(),e); } diff --git a/phi_platform_user/src/main/java/com/hx/phip/service/order/impl/OrderRefundServiceImpl.java b/phi_platform_user/src/main/java/com/hx/phip/service/order/impl/OrderRefundServiceImpl.java index 63b14bc..49306b5 100644 --- a/phi_platform_user/src/main/java/com/hx/phip/service/order/impl/OrderRefundServiceImpl.java +++ b/phi_platform_user/src/main/java/com/hx/phip/service/order/impl/OrderRefundServiceImpl.java @@ -7,6 +7,7 @@ import com.hx.exception.TipsException; import com.hx.mybatisTool.SqlSentence; import com.hx.phiappt.common.*; +import com.hx.phiappt.common.enums.OrderGiveIntegralEnum; import com.hx.phiappt.constants.tool.PerformanceInfoTool; import com.hx.phiappt.constants.tool.TimerHandleTool; import com.hx.phiappt.dao.mapper.*; @@ -24,6 +25,8 @@ import com.hx.phiappt.model.user.UserCard; import com.hx.phiappt.model.user.UserProjectItem; import com.hx.phiappt.model.userMoney.UserMoneyUnclaimed; +import com.hx.phiappt.util.SystemParameterUtil; +import com.hx.phiappt.vo.parameter.IntegralOldGiveRuleVo; import com.hx.phiappt.vo.refund.RefundCashItemVo; import com.hx.phiappt.vo.refund.RefundCashVo; import com.hx.phip.config.BotoxClubConfig; @@ -155,6 +158,8 @@ private UserCluebMemberServiceTool userCluebMemberServiceTool; @Resource private UserMoneyService userMoneyService; + @Resource + private OrderGiveIntegralMapper orderGiveIntegralMapper; /** @@ -1266,6 +1271,22 @@ orderNodeBuilder.append("锛屾墸鍑忔垚鍔�"); refundUserAssets.setAmountStatus(RefundUserAssets.AMOUNT_STATUS_NORMAL); }else { + + //--鐗规畩澶勭悊锛岃�佸甫鏂拌禒閫佺殑绉垎闇�瑕佸垽鏂��娆捐鍒� + if(StringUtils.noNull(userMoneyUnclaimed.getCommonId())){ + if (orderGiveIntegralMapper.selectExist(OrderGiveIntegralEnum.CONVENTION_OLD_GIVE.getType(),userMoneyUnclaimed.getCommonId()) > 0) { + //娑堣垂鑰佸甫鏂拌禒閫佺Н鍒嗛厤缃� + IntegralOldGiveRuleVo integralOldGiveRuleVo = SystemParameterUtil.selectByNameObj(SystemParameter.CONSUME_OLD_GIVE_INTEGRAL_RULE,IntegralOldGiveRuleVo.class,commonService); + if(integralOldGiveRuleVo == null){ + integralOldGiveRuleVo = new IntegralOldGiveRuleVo(); + } + if(integralOldGiveRuleVo.getRefundReturn() == null + || integralOldGiveRuleVo.getRefundReturn() == IntegralOldGiveRuleVo.REFUND_RETURN_MUST){ + throw new TipsException("閫�娆惧け璐ワ紝璧勪骇涓嶈冻鍥為��鑰佸甫鏂拌禒閫佺Н鍒嗭紒"); + } + } + } + orderNodeBuilder.append("锛屼綑棰濅笉瓒筹紝鎵e噺澶辫触"); //鐢ㄦ埛璧勪骇涓嶅鍑� refundUserAssets.setAmountStatus(RefundUserAssets.AMOUNT_STATUS_NOT); -- Gitblit v1.8.0