xiaoyong931011
2022-08-31 b61110af489ad1278732bf91ed239fcca8567ac8
src/main/java/cc/mrbird/febs/pay/controller/XcxPayController.java
@@ -131,19 +131,22 @@
                                RoundingMode.HALF_UP);
                        if (ObjectUtil.isNotEmpty(mallMoneyFlow)) {
                                log.debug("检查支付金额payMoney={},mallMoneyFlow.getPayMoney()={}", payMoney, mallMoneyFlow.getAmount());
                                memberWalletService.addBalance(payMoney,memberId);
                                RechargeWalletMessageSendDto rechargeWalletMessageSendDto = new RechargeWalletMessageSendDto();
                                rechargeWalletMessageSendDto.setRechargeNo(rechargeNo);
                                rechargeWalletMessageSendDto.setRechargeAmount(payMoney.toString());
                            log.debug("检查支付金额payMoney={},mallMoneyFlow.getPayMoney()={}", payMoney, mallMoneyFlow.getAmount());
                            memberWalletService.addBalance(payMoney,memberId);
                            mallMoneyFlow.setStatus(2);
                            mallMoneyFlowMapper.updateById(mallMoneyFlow);
                                MallMemberWallet mallMemberWallet = mallMemberWalletMapper.selectWalletByMemberId(memberId);
                                rechargeWalletMessageSendDto.setBalance(mallMemberWallet.getBalance().toString());
                                rechargeWalletMessageSendDto.setCreateTime(DateUtil.now());
                                rechargeWalletMessageSendDto.setOpenId(mallMemberMapper.selectById(memberId).getOpenId());
                                DataDictionaryCustom dataDictionaryCustom = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(DataDictionaryEnum.WX_TEMPLATE_ID_TWO.getType(), DataDictionaryEnum.WX_TEMPLATE_ID_TWO.getCode());
                                rechargeWalletMessageSendDto.setTemplateId(dataDictionaryCustom.getValue());
                                iXcxPayService.rechargeWalletMessageSend(rechargeWalletMessageSendDto);
                            RechargeWalletMessageSendDto rechargeWalletMessageSendDto = new RechargeWalletMessageSendDto();
                            rechargeWalletMessageSendDto.setRechargeNo(rechargeNo);
                            rechargeWalletMessageSendDto.setRechargeAmount(payMoney.toString());
                            MallMemberWallet mallMemberWallet = mallMemberWalletMapper.selectWalletByMemberId(memberId);
                            rechargeWalletMessageSendDto.setBalance(mallMemberWallet.getBalance().toString());
                            rechargeWalletMessageSendDto.setCreateTime(DateUtil.now());
                            rechargeWalletMessageSendDto.setOpenId(mallMemberMapper.selectById(memberId).getOpenId());
                            DataDictionaryCustom dataDictionaryCustom = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(DataDictionaryEnum.WX_TEMPLATE_ID_TWO.getType(), DataDictionaryEnum.WX_TEMPLATE_ID_TWO.getCode());
                            rechargeWalletMessageSendDto.setTemplateId(dataDictionaryCustom.getValue());
                            iXcxPayService.rechargeWalletMessageSend(rechargeWalletMessageSendDto);
                            threadResult.success().message("充值成功");
                        } else {
                            log.info("充值失败", attrStr);