| | |
| | | package cc.mrbird.febs.pay.controller; |
| | | |
| | | import cc.mrbird.febs.common.entity.FebsResponse; |
| | | import cc.mrbird.febs.common.enumerates.DataDictionaryEnum; |
| | | import cc.mrbird.febs.common.enumerates.OrderDeliveryStateEnum; |
| | | import cc.mrbird.febs.common.enumerates.OrderStatusEnum; |
| | | import cc.mrbird.febs.common.enumerates.*; |
| | | import cc.mrbird.febs.common.properties.XcxProperties; |
| | | import cc.mrbird.febs.common.utils.RedisUtils; |
| | | import cc.mrbird.febs.common.utils.SpringContextHolder; |
| | |
| | | import cc.mrbird.febs.mall.mapper.*; |
| | | import cc.mrbird.febs.mall.service.IApiMallMemberService; |
| | | import cc.mrbird.febs.mall.service.IApiMallMemberWalletService; |
| | | import cc.mrbird.febs.mall.service.IMallMoneyFlowService; |
| | | import cc.mrbird.febs.pay.model.NotifyData; |
| | | import cc.mrbird.febs.pay.model.OrderStateDto; |
| | | import cc.mrbird.febs.pay.model.OrderStateMsgVo; |
| | |
| | | MallMemberMapper mallMemberMapper; |
| | | @Autowired |
| | | DataDictionaryCustomMapper dataDictionaryCustomMapper; |
| | | @Autowired |
| | | IMallMoneyFlowService mallMoneyFlowService; |
| | | @Autowired |
| | | RedisUtils redisUtils; |
| | | @Autowired |
| | |
| | | mallMoneyFlow.setStatus(2); |
| | | mallMoneyFlowMapper.updateById(mallMoneyFlow); |
| | | |
| | | /** |
| | | * 充值赠送金额 |
| | | */ |
| | | DataDictionaryCustom giveStateDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode( |
| | | DataDictionaryEnum.GIVE_STATE.getType(), |
| | | DataDictionaryEnum.GIVE_STATE.getCode()); |
| | | |
| | | DataDictionaryCustom giveAmountDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode( |
| | | DataDictionaryEnum.GIVE_AMOUNT.getType(), |
| | | DataDictionaryEnum.GIVE_AMOUNT.getCode()); |
| | | if(ObjectUtil.isNotEmpty(giveStateDic) |
| | | && "1" == giveStateDic.getValue() |
| | | && ObjectUtil.isNotEmpty(giveAmountDic)){ |
| | | BigDecimal giveAmount = ObjectUtil.isEmpty(giveAmountDic.getValue()) ? |
| | | BigDecimal.ZERO : |
| | | new BigDecimal(giveAmountDic.getValue()).abs().setScale(2,BigDecimal.ROUND_DOWN); |
| | | |
| | | mallMoneyFlowService.addMoneyFlow( |
| | | memberId, |
| | | giveAmount, |
| | | MoneyFlowTypeEnum.RECHARGE.getValue(), |
| | | rechargeNo+"ZS", |
| | | FlowTypeEnum.BALANCE.getValue()); |
| | | |
| | | memberWalletService.addBalance(giveAmount,memberId); |
| | | } |
| | | |
| | | RechargeWalletMessageSendDto rechargeWalletMessageSendDto = new RechargeWalletMessageSendDto(); |
| | | rechargeWalletMessageSendDto.setRechargeNo(rechargeNo); |
| | | rechargeWalletMessageSendDto.setRechargeAmount(payMoney.toString()); |