fadd
This commit is contained in:
@@ -91,6 +91,16 @@ func (l *WechatPayCallbackLogic) handleQueryOrderPayment(w http.ResponseWriter,
|
||||
return nil
|
||||
}
|
||||
|
||||
// 更新 query_user_record 的 platform_order_id(见 query_user_record.sql 说明 3)
|
||||
if notification.OutTradeNo != nil {
|
||||
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.TransactionId)
|
||||
_, _ = 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