优化交易取消逻辑并更新相关数据结构;修复套餐用量统计接口问题

This commit is contained in:
2025-06-23 18:32:20 +08:00
parent 20aa3d929c
commit 2fd17dde22
6 changed files with 49 additions and 24 deletions

View File

@@ -233,7 +233,10 @@ func (s *tradeService) CreateTrade(q *q.Query, uid int32, now time.Time, data *T
}
// 提交异步任务更新订单状态
_, err = g.Asynq.Enqueue(tasks.NewUpdateTrade(tradeNo, method))
_, err = g.Asynq.Enqueue(tasks.NewCancelTrade(tasks.CancelTradeData{
TradeNo: tradeNo,
Method: method,
}))
if err != nil {
return nil, err
}