修复售后订单问题 修复支付问题

This commit is contained in:
徐唯轩
2023-11-15 20:06:07 +08:00
parent c0f370e8cd
commit e49f2a5d24
33 changed files with 206 additions and 337 deletions

View File

@ -43,13 +43,17 @@ public class AliPayMessageHandler implements PayMessageHandler<AliPayMessage, Al
//交易完成
if ("TRADE_SUCCESS".equals(trade_status) || "TRADE_FINISHED".equals(trade_status)) {
String orderId = (String) payMessage.getPayMessage().get("out_trade_no");
log.info("支付宝回调消息处理发送处理消息orderId={}",orderId);
//消息队列处理
payNoticeProducer.sendPayNoticeMessage(orderId, PayTypeEnum.ALI.getValue());
log.info("支付宝回调消息发送完毕");
return payService.getPayOutMessage("success", "成功");
String orderNo = (String) payMessage.getPayMessage().get("out_trade_no");
//截取订单编号
String[] split = orderNo.split("-");
if (split.length > 0) {
String orderId = split[0];
log.info("支付宝回调消息处理发送处理消息orderId={}", split[0]);
//消息队列处理
payNoticeProducer.sendPayNoticeMessage(orderId, PayTypeEnum.ALI.getValue());
log.info("支付宝回调消息发送完毕");
return payService.getPayOutMessage("success", "成功");
}
}
return payService.getPayOutMessage("fail", "失败");

View File

@ -19,6 +19,8 @@ import java.util.stream.Stream;
public enum PayTypeEnum {
ALI("alipay","支付宝支付"),
ALI_H5("alipay_h5","微信支付"),
ALI_APP("alipay_app","微信支付"),
WEIXIN("weixin","微信支付"),
WEIXIN_H5("weixin_h5","微信H5支付"),
WEIXIN_APPLET("weixin_applet","微信小程序支付"),