| | |
| | | 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.*; |
| | |
| | | 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; |
| | |
| | | private UserCluebMemberServiceTool userCluebMemberServiceTool; |
| | | @Resource |
| | | private UserMoneyService userMoneyService; |
| | | @Resource |
| | | private OrderGiveIntegralMapper orderGiveIntegralMapper; |
| | | |
| | | |
| | | /** |
| | |
| | | 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(",余额不足,扣减失败"); |
| | | //用户资产不够减 |
| | | refundUserAssets.setAmountStatus(RefundUserAssets.AMOUNT_STATUS_NOT); |