|
|
@@ -43,6 +43,13 @@ func GoodsPayCreate(c *gin.Context) { |
|
|
|
sess := db.Db.NewSession() |
|
|
|
defer sess.Close() |
|
|
|
sess.Begin() |
|
|
|
sysCfgDb := db.SysCfgDb{} |
|
|
|
sysCfgDb.Set() |
|
|
|
beforeHourShowOrder, _ := sysCfgDb.SysCfgGetOne("before_hour_show_order") |
|
|
|
if utils.StrToInt(beforeHourShowOrder.Val) > time.Now().Hour() { |
|
|
|
e.OutErr(c, 400, e.NewErr(400, "请"+beforeHourShowOrder.Val+"点后再下单")) |
|
|
|
return |
|
|
|
} |
|
|
|
today := utils.GetTimeRange("today") |
|
|
|
count, _ := sess.Where("create_at>=?", time.Unix(today["start"], 0).Format("2006-01-02 15:04:05")).Count(&model.Order{}) |
|
|
|
i := utils.IntToStr(int(count + 1)) |
|
|
|