|
|
@@ -97,16 +97,16 @@ func CentralKitchenForSchoolOrderRefund(req md.CentralKitchenForSchoolOrderRefun |
|
|
|
//2、判断是否为可退餐时间段 |
|
|
|
now := time.Now() |
|
|
|
today, _ := time.ParseInLocation("2006-01-02", time.Now().Format("2006-01-02"), time.Local) |
|
|
|
tomorrowDay := today.AddDate(0, 0, 1) |
|
|
|
//tomorrowDay := today.AddDate(0, 0, 1) |
|
|
|
|
|
|
|
date, _ := time.ParseInLocation("2006-01-02", centralKitchenForSchoolUserWithDay.Date, time.Local) |
|
|
|
if today.After(date) || today.Equal(date) { |
|
|
|
if today.After(date) { |
|
|
|
//2.2、判断是否小于今天 |
|
|
|
err = errors.New("当前订餐不在可退订时间范围内") |
|
|
|
return |
|
|
|
} |
|
|
|
if tomorrowDay.Equal(date) { |
|
|
|
//2.3、判断是否过了明日可订餐时间 |
|
|
|
if today.Equal(date) { |
|
|
|
//2.3、判断是否过了今日可订餐时间 |
|
|
|
var centralKitchenForSchoolCancelMealTime time.Time |
|
|
|
var cfg *model.SysCfg |
|
|
|
if centralKitchenForSchoolUserWithDay.Kind == enum.CentralKitchenForSchoolUserWithDayKindForBreakfast { |
|
|
|