提交 cf29369b authored 作者: 胡宁宁's avatar 胡宁宁

调整支付返回唯一属性

上级 0f491453
......@@ -92,12 +92,16 @@ public class PayNotifyController {
String paymentItem = PayUnitTypeEnum.FREEZE_PLATFORM_FEE.getCode()+"";
int operation = PayOperationStatusEnum.FREEZE.getValue();
if (notify.getCode() != 0) {
paymentService.updateOrderPaymentStatusById(notify.getOrderNo(),PaymentStatusEnum.FAIL.getValue());
paymentService.updateOrderPaymentFail(notify.getOrderNo(), notify.getMsg(),
operation,
paymentItem
);
// 支付失败处理
log.info("支付失败处理 唯一id {}", notify.getOrderNo());
} else {
analysisSuccess(notify.getData().toString(), operation, paymentItem);
paymentService.updateOrderPaymentStatusById(notify.getOrderNo(),PaymentStatusEnum.SUCCESS.getValue());
paymentService.updateOrderPaymentSuccess(notify.getOrderNo(), operation,
paymentItem);
// 支付支付成功处理
log.info(" 支付支付成功处理 唯一id {}", notify.getOrderNo());
......@@ -113,18 +117,13 @@ public class PayNotifyController {
if (Objects.isNull(notify) || Objects.isNull(notify.getCode()) || Objects.isNull(notify.getAction())) {
return new Result<>();
}
String paymentItem = PayUnitTypeEnum.FREEZE_PLATFORM_FEE.getCode()+"";
int operation = PayOperationStatusEnum.ADJUSTMENT.getValue();
if (notify.getCode() != 0) {
paymentService.updateOrderPaymentFail(notify.getOrderNo(), notify.getMsg(),
operation,
paymentItem
);
paymentService.updateOrderPaymentStatusById(notify.getOrderNo(),PaymentStatusEnum.FAIL.getValue());
// 支付失败处理
log.info("支付失败处理 唯一id {}", notify.getOrderNo());
// 支付失败处理
} else {
paymentService.updateOrderPaymentSuccess(notify.getOrderNo(), operation,
paymentItem);
paymentService.updateOrderPaymentStatusById(notify.getOrderNo(),PaymentStatusEnum.SUCCESS.getValue());
// 支付支付成功处理
log.info(" 支付支付成功处理 唯一id {}", notify.getOrderNo());
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论