Compare commits

...

2 Commits

Author SHA1 Message Date
a7135b440a Merge pull request '微信支付(日志)' (#73) from khy1 into master
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #73
2024-10-24 19:03:19 +08:00
khy
dcff7fc4a5 微信支付(日志) 2024-10-24 18:57:03 +08:00

View File

@ -334,11 +334,12 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService {
KeyValue<TradeOrderDO, PayOrderRespDTO> orderResult = validateOrderPayable(id, payOrderId);
TradeOrderDO order = orderResult.getKey();
PayOrderRespDTO payOrder = orderResult.getValue();
System.out.println("交易订单成功id"+id+"和payOrderId"+payOrderId);
//会员用户信息支付状态修改
TradeMemberUserDO tradeMemberUserDO = tradeMemberUserService.getUser(getLoginUserId());
TradePaidMemberUserDO tradePaidMemberUserDO = tradePaidMemberUserService.getByIdAndPayOrderId(id,payOrderId);
if(tradePaidMemberUserDO != null && tradeMemberUserDO != null){
System.out.println("进入会员支付修改操作paid"+tradePaidMemberUserDO+"和member"+tradeMemberUserDO);
tradePaidMemberUserDO.setPayTime(LocalDateTime.now());
tradePaidMemberUserDO.setPaid(true);
//过期时间
@ -350,10 +351,12 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService {
tradePaidMemberUserDO.setPayType(payType);
//更新会员订单
tradePaidMemberUserService.update(tradePaidMemberUserDO);
System.out.println("成功更新会员订单paid"+tradePaidMemberUserDO);
//更新用户会员状态
tradeMemberUserService.updateActivate(tradePaidMemberUserDO.getPayMemberType());
System.out.println("成功更新用户的会员状态member"+tradeMemberUserDO);
}
System.out.println("会员修改操作结束!!!");
// 2. 更新 TradeOrderDO 状态为已支付等待发货
int updateCount = tradeOrderMapper.updateByIdAndStatus(id, order.getStatus(),
new TradeOrderDO().setStatus(TradeOrderStatusEnum.UNDELIVERED.getStatus()).setPayStatus(true)