| | |
| | | @Autowired |
| | | private MallMoneyFlowMapper mallMoneyFlowMapper; |
| | | |
| | | private final IApiMallMemberWalletService iApiMallMemberWalletService; |
| | | |
| | | @GetMapping(value = "/unipayCallBack") |
| | | public String unipayCallBack(HttpServletRequest request, UniPayCallBackDto uniPayCallBackDto){ |
| | | log.info("进入汇聚支付聚合支付回调"+ JSONUtil.parseObj(uniPayCallBackDto)); |
| | |
| | | } |
| | | |
| | | mallMoneyFlowService.addMoneyFlow(mallMember.getId(), orderInfo.getAmount().negate(), MoneyFlowTypeEnum.PAY.getValue(), orderInfo.getOrderNo(), FlowTypeEnum.BALANCE.getValue()); |
| | | agentProducer.sendAutoLevelUpMsg(mallMember.getId()); |
| | | agentProducer.sendOrderReturn(orderInfo.getId()); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | mallMoneyFlowService.addMoneyFlow(mallMember.getId(), orderInfo.getAmount().negate(), MoneyFlowTypeEnum.PAY.getValue(), orderInfo.getOrderNo(), FlowTypeEnum.BALANCE.getValue()); |
| | | agentProducer.sendAutoLevelUpMsg(mallMember.getId()); |
| | | agentProducer.sendOrderReturn(orderInfo.getId()); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | @PostMapping(value = "/singlePayCallBack") |
| | | public SinglePayCallBackVo singlePayCallBack(@RequestBody SinglePayCallBackDto singlePayCallBackDto){ |
| | | public JSONObject singlePayCallBack(@RequestBody SinglePayCallBackDto singlePayCallBackDto){ |
| | | log.info("进入汇聚支付代付回调"+ JSONUtil.parseObj(singlePayCallBackDto)); |
| | | String status = singlePayCallBackDto.getStatus(); |
| | | BigDecimal paidAmount = singlePayCallBackDto.getPaidAmount(); |
| | | BigDecimal paidAmountFee = singlePayCallBackDto.getFee(); |
| | | String errorCode = singlePayCallBackDto.getErrorCode(); |
| | | String errorCodeDesc = singlePayCallBackDto.getErrorCodeDesc(); |
| | | String merchantOrderNo = singlePayCallBackDto.getMerchantOrderNo(); |
| | | |
| | | log.info("进入汇聚支付代付回调"+status+";"+paidAmount+";"+paidAmountFee+";"); |
| | |
| | | mallMoneyFlowMapper.updateById(mallMoneyFlow); |
| | | } |
| | | } |
| | | }else{ |
| | | QueryWrapper<MallMemberWithdraw> objectQueryWrapper = new QueryWrapper<>(); |
| | | objectQueryWrapper.eq("withdraw_no",merchantOrderNo); |
| | | MallMemberWithdraw mallMemberWithdraw = mallMemberWithdrawMapper.selectOne(objectQueryWrapper); |
| | | if(ObjectUtil.isNotEmpty(mallMemberWithdraw)){ |
| | | mallMemberWithdraw.setRemark(errorCodeDesc); |
| | | mallMemberWithdrawMapper.updateById(mallMemberWithdraw); |
| | | } |
| | | } |
| | | |
| | | SinglePayCallBackVo singlePayCallBackVo = new SinglePayCallBackVo(); |
| | | singlePayCallBackVo.setStatusCode("2001"); |
| | | singlePayCallBackVo.setMessage("成功"); |
| | | return singlePayCallBackVo; |
| | | JSONObject jsonObject = JSONUtil.parseObj(singlePayCallBackVo); |
| | | return jsonObject; |
| | | } |
| | | |
| | | } |