This commit is contained in:
Mrx
2026-01-30 11:39:28 +08:00
parent c64b22ab05
commit 76784c3c1b
19 changed files with 717 additions and 46 deletions

View File

@@ -94,6 +94,14 @@ func (l *AlipayCallbackLogic) handleQueryOrderPayment(w http.ResponseWriter, not
return nil
}
// 更新 query_user_record 的 platform_order_id见 query_user_record.sql 说明 3
qb := l.svcCtx.QueryUserRecordModel.SelectBuilder().Where("query_no = ?", notification.OutTradeNo)
records, _ := l.svcCtx.QueryUserRecordModel.FindAll(l.ctx, qb, "")
for _, rec := range records {
rec.PlatformOrderId = lzUtils.StringToNullString(notification.TradeNo)
_, _ = l.svcCtx.QueryUserRecordModel.Update(l.ctx, nil, rec)
}
if order.Status == "paid" {
if asyncErr := l.svcCtx.AsynqService.SendQueryTask(order.Id); asyncErr != nil {
logx.Errorf("异步任务调度失败: %v", asyncErr)