增加订单超时系统配置,WebFooter 增加公安备案号

This commit is contained in:
GeekMaster
2025-09-05 10:42:02 +08:00
parent 52d297624d
commit 26f3db09a7
8 changed files with 72 additions and 32 deletions

View File

@@ -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)
}
}