VirtualThread

This commit is contained in:
2025-06-17 17:09:34 +08:00
parent 5f8c4fd6e6
commit 7d6c87cc74
8 changed files with 17 additions and 11 deletions

View File

@@ -96,7 +96,7 @@ public class WxPayServiceImpl implements WxPayService {
log.info("[微信支付]parse = {}", callbackResponse);
// 更新订单信息
new Thread(() -> {
Thread.ofVirtual().start(() -> {
long orderId = Long.parseLong(callbackResponse.getOrderNo());
if (callbackResponse.isPay()) {
orderBiz.paidOrder(orderId);
@@ -105,7 +105,7 @@ public class WxPayServiceImpl implements WxPayService {
} else if (callbackResponse.isRefund()) {
orderBiz.refundOrder(orderId);
}
}).start();
});
} catch (Exception e) {
throw new AppException(BizCodeEnum.ADVANCE_PAYMENT_CALLBACK_FAILED, e.toString());
}