| | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import cn.hutool.json.JSONObject; |
| | | import cn.hutool.json.JSONUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | |
| | | order.setPayOrderNo(transaction_id); |
| | | mallOrderInfoMapper.updateById(order); |
| | | |
| | | |
| | | //先支付积分部分 |
| | | if(order.getScoreAmount().compareTo(BigDecimal.ZERO) > 0){ |
| | | memberWalletService.reduce(order.getScoreAmount(), order.getMemberId(), "prizeScore"); |
| | | mallMoneyFlowService.addMoneyFlow( |
| | | order.getMemberId(), |
| | | order.getScoreAmount().negate(), |
| | | ScoreFlowTypeEnum.PAY.getValue(), |
| | | order.getOrderNo(), |
| | | FlowTypeEnum.PRIZE_SCORE.getValue(), |
| | | StrUtil.format(ScoreFlowTypeEnum.PAY.getDesc(),order.getScoreAmount()), |
| | | 2 |
| | | ); |
| | | } |
| | | |
| | | agentProducer.sendOrderCoupon(order.getId()); |
| | | // agentProducer.sendGetScoreMsg(order.getId()); |
| | | |
| | | mallMoneyFlowService.addMoneyFlow( |
| | | order.getMemberId(), |
| | | order.getAmount().negate(), |
| | | MoneyFlowTypeEnum.WECHAT_PAY.getValue(), |
| | | ScoreFlowTypeEnum.WECHAT_PAY.getValue(), |
| | | order.getOrderNo(), |
| | | FlowTypeEnum.WECHAT.getValue(), |
| | | "微信支付", |
| | | 2); |
| | | FlowTypeEnum.BALANCE.getValue(), |
| | | StrUtil.format(ScoreFlowTypeEnum.WECHAT_PAY.getDesc(),order.getAmount()), |
| | | 2 |
| | | ); |
| | | // mallMoneyFlowService.addMoneyFlow( |
| | | // order.getMemberId(), |
| | | // order.getAmount().negate(), |
| | | // MoneyFlowTypeEnum.WECHAT_PAY.getValue(), |
| | | // order.getOrderNo(), |
| | | // FlowTypeEnum.WECHAT.getValue(), |
| | | // "微信支付", |
| | | // 2); |
| | | threadResult.success().message("支付成功"); |
| | | } else { |
| | | log.info("订单状态不为待付款,order status=", order.getStatus()); |