fix:支付
This commit is contained in:
@@ -217,16 +217,18 @@ func (d *defaultOrder) CloseList(ctx context.Context, in *CloseListReq) (res *Cl
|
||||
} else {
|
||||
dtime = time.Now().Add(time.Second * time.Duration(math.Abs(float64(dd))))
|
||||
}
|
||||
// 延时任务
|
||||
d.DelayQueue.AddTask(dtime, constants.QUEUE_NAME_ORDER, func(args ...interface{}) {
|
||||
ctx := context.Background()
|
||||
orderSn := args[0].(string)
|
||||
logc.Infof(ctx, "order close, orderSn: %s", orderSn)
|
||||
d.Close(ctx, &CloseReq{
|
||||
OrderSn: orderSn,
|
||||
Type: 1,
|
||||
})
|
||||
}, []interface{}{*orderInfo.OrderSn})
|
||||
if in.Type == 1 {
|
||||
// 延时任务
|
||||
d.DelayQueue.AddTask(dtime, constants.QUEUE_NAME_ORDER, func(args ...interface{}) {
|
||||
ctx := context.Background()
|
||||
orderSn := args[0].(string)
|
||||
logc.Infof(ctx, "order close, orderSn: %s", orderSn)
|
||||
d.Close(ctx, &CloseReq{
|
||||
OrderSn: orderSn,
|
||||
Type: 1,
|
||||
})
|
||||
}, []interface{}{*orderInfo.OrderSn})
|
||||
}
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user