Commit 18399a96 authored by shangtx's avatar shangtx

fix: 支付成功保存日志放在方法最后

parent 9a9165e8
...@@ -229,15 +229,13 @@ public class ServiceOrderBizService extends AbstractMapper<ServiceOrder> { ...@@ -229,15 +229,13 @@ public class ServiceOrderBizService extends AbstractMapper<ServiceOrder> {
public void paySuccess(String outTradeNo, String orderNo) { public void paySuccess(String outTradeNo, String orderNo) {
log.info("支付成功 outTradeNo: {}, orderNo: {}", outTradeNo, orderNo); log.info("支付成功 outTradeNo: {}, orderNo: {}", outTradeNo, orderNo);
var order = selectOneByProperty("orderNo", outTradeNo); var order = selectOneByProperty("orderNo", orderNo);
order.setOrderStatus(ServiceOrderStatusEnum.PAY.getStatus()); order.setOrderStatus(ServiceOrderStatusEnum.PAY.getStatus());
int result = serviceOrderMapper.updateByPrimaryKeySelective(order); int result = serviceOrderMapper.updateByPrimaryKeySelective(order);
if (result == 1) {
recordComponent.recordProcess(order.getId(), ServiceOrderStatusEnum.PAY.getStatus(), ServiceOrderStatusEnum.PAY.getMsg(), ServiceOrderOpSourceEnum.MINI_APP, null, null, null);
}
// 通知客服 // 通知客服
var logCondition = new ServiceOrderLog(); var logCondition = new ServiceOrderLog();
logCondition.setOrderId(order.getId()); logCondition.setOrderId(order.getId());
...@@ -266,6 +264,9 @@ public class ServiceOrderBizService extends AbstractMapper<ServiceOrder> { ...@@ -266,6 +264,9 @@ public class ServiceOrderBizService extends AbstractMapper<ServiceOrder> {
} }
} }
} }
if (result == 1) {
recordComponent.recordProcess(order.getId(), ServiceOrderStatusEnum.PAY.getStatus(), ServiceOrderStatusEnum.PAY.getMsg(), ServiceOrderOpSourceEnum.MINI_APP, null, null, null);
}
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment