fix:支付
This commit is contained in:
parent
e991ee3966
commit
821c2063c9
|
@ -34,7 +34,7 @@ func main() {
|
||||||
ctx := svc.NewServiceContext(c)
|
ctx := svc.NewServiceContext(c)
|
||||||
handler.RegisterHandlers(server, ctx)
|
handler.RegisterHandlers(server, ctx)
|
||||||
|
|
||||||
go ctx.Repositories.NewOrder.CloseList(context.Background(), &repositories.CloseListReq{})
|
go ctx.Repositories.NewOrder.CloseList(context.Background(), &repositories.CloseListReq{Type: 1})
|
||||||
|
|
||||||
fmt.Printf("Starting server at %s:%d...\n", c.Host, c.Port)
|
fmt.Printf("Starting server at %s:%d...\n", c.Host, c.Port)
|
||||||
server.Start()
|
server.Start()
|
||||||
|
|
|
@ -217,6 +217,7 @@ func (d *defaultOrder) CloseList(ctx context.Context, in *CloseListReq) (res *Cl
|
||||||
} else {
|
} else {
|
||||||
dtime = time.Now().Add(time.Second * time.Duration(math.Abs(float64(dd))))
|
dtime = time.Now().Add(time.Second * time.Duration(math.Abs(float64(dd))))
|
||||||
}
|
}
|
||||||
|
if in.Type == 1 {
|
||||||
// 延时任务
|
// 延时任务
|
||||||
d.DelayQueue.AddTask(dtime, constants.QUEUE_NAME_ORDER, func(args ...interface{}) {
|
d.DelayQueue.AddTask(dtime, constants.QUEUE_NAME_ORDER, func(args ...interface{}) {
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
|
@ -228,6 +229,7 @@ func (d *defaultOrder) CloseList(ctx context.Context, in *CloseListReq) (res *Cl
|
||||||
})
|
})
|
||||||
}, []interface{}{*orderInfo.OrderSn})
|
}, []interface{}{*orderInfo.OrderSn})
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user