diff --git a/app/customer/svc/svc_pay.go b/app/customer/svc/svc_pay.go index daafec8..82e4af6 100644 --- a/app/customer/svc/svc_pay.go +++ b/app/customer/svc/svc_pay.go @@ -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)) } }