This commit is contained in:
Lemon
2024-03-26 15:35:16 +08:00
28 changed files with 1434 additions and 198 deletions

View File

@@ -343,8 +343,8 @@ public class PayController extends BaseController {
public void adapayCallback(HttpServletRequest request) {
try {
orderService.adapayCallback(request);
String type = request.getParameter("type");
logger.info("1汇付回调type:{}", type);
// String type = request.getParameter("type");
logger.info("1汇付回调type:{}", request.getParameter("type"));
} catch (Exception e) {
logger.error("1汇付支付回调失败 error", e);
}

View File

@@ -1090,9 +1090,6 @@ public class OrderService {
memberTransactionRecordService.insertSelective(record);
if (StringUtils.equals(scenarioType, ScenarioEnum.ORDER.getValue())) { // 1-订单支付
// JSONObject json = new JSONObject();
// json.put("paymentId", paymentId);
// json.put("amount", amount);
PaymentInfo paymentInfo = new PaymentInfo();
paymentInfo.setPaymentId(paymentId);
paymentInfo.setAmount(amount.toString());
@@ -1110,7 +1107,13 @@ public class OrderService {
orderPayRecordService.batchInsert(Lists.newArrayList(orderPayRecord));
// 更新冻结金额 支付成功后全部冻结
memberAdapayRecordService.updateFreezeAmount(paymentId, amount);
CompletableFuture.runAsync(() -> {
try {
memberAdapayRecordService.updateFreezeAmount(paymentId, amount);
} catch (Exception e) {
log.error("更新冻结金额 支付成功后全部冻结error", e);
}
});
// 支付订单成功
PayOrderSuccessCallbackDTO callbackDTO = PayOrderSuccessCallbackDTO.builder()