fadd
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user