|
|
@@ -35,7 +35,7 @@ func CheckIsOpenLimitOrderFood(enterpriseId int) (err error) { |
|
|
|
if set != nil && set.IsOpenLimitOrderFood == 1 { |
|
|
|
//TODO::判断每月25日至最后一日不可以订餐 |
|
|
|
day := time.Now().Day() |
|
|
|
if day >= set.OrderFoodStartDate && day <= set.OrderFoodEndDate { |
|
|
|
if day < set.OrderFoodStartDate || day > set.OrderFoodEndDate { |
|
|
|
return errors.New(fmt.Sprintf("每月%d日至%d日可以订餐!", set.OrderFoodStartDate, set.OrderFoodEndDate)) |
|
|
|
} |
|
|
|
} |
|
|
|