mirror of
https://github.com/yangjian102621/geekai.git
synced 2026-04-12 14:14:25 +08:00
增加订单超时系统配置,WebFooter 增加公安备案号
This commit is contained in:
@@ -129,8 +129,8 @@ func (h *OrderHandler) Clear(c *gin.Context) {
|
||||
}
|
||||
deleteIds := make([]uint, 0)
|
||||
for _, order := range orders {
|
||||
// 只删除 5 分钟内的未支付订单
|
||||
if time.Now().After(order.CreatedAt.Add(time.Minute * 5)) {
|
||||
// 只删除超时的未支付订单
|
||||
if time.Now().After(order.CreatedAt.Add(time.Minute * time.Duration(h.App.SysConfig.Base.OrderPayTimeout))) {
|
||||
deleteIds = append(deleteIds, order.Id)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user