From b38d1b4973bc4416a47b4df6f8a6e5b234e9b888 Mon Sep 17 00:00:00 2001 From: dengbiao <“1239118001@qq.com”> Date: Sat, 31 Aug 2024 19:13:58 +0800 Subject: [PATCH] 1 --- .../svc/svc_central_kitchen_for_school_package.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/customer/svc/svc_central_kitchen_for_school_package.go b/app/customer/svc/svc_central_kitchen_for_school_package.go index 376d7a3..78aeffa 100644 --- a/app/customer/svc/svc_central_kitchen_for_school_package.go +++ b/app/customer/svc/svc_central_kitchen_for_school_package.go @@ -36,7 +36,7 @@ func CalcBySchoolTerm(uid int, isTeacher bool, buyPackageReq md2.BuyPackageReq) //} mealLabelDb := db.MealLabelDb{} mealLabelDb.Set(buyPackageReq.EnterpriseId) - var mealLabelForBreakfast, mealLabelForLunch, mealLabelForDinner *model.MealLabel + var mealLabelForBreakfast, mealLabelForLunch, mealLabelForDinner = model.MealLabel{}, model.MealLabel{}, model.MealLabel{} if !isTeacher && buyPackageReq.IsBuyBreakfast == 1{ mealLabelForBreakfast, err = mealLabelDb.GetMealLabel(buyPackageReq.MealLabelIdForBreakfast) if err != nil { @@ -197,7 +197,7 @@ func CalcByMonth(uid int, isTeacher bool, buyPackageReq md2.BuyPackageReq) (tota //} mealLabelDb := db.MealLabelDb{} mealLabelDb.Set(buyPackageReq.EnterpriseId) - var mealLabelForBreakfast, mealLabelForLunch, mealLabelForDinner *model.MealLabel + var mealLabelForBreakfast, mealLabelForLunch, mealLabelForDinner = model.MealLabel{}, model.MealLabel{}, model.MealLabel{} if !isTeacher && buyPackageReq.IsBuyBreakfast == 1 { mealLabelForBreakfast, err = mealLabelDb.GetMealLabel(buyPackageReq.MealLabelIdForBreakfast) if err != nil { @@ -357,7 +357,7 @@ func CalcByDay(uid int, isTeacher bool, buyPackageReq md2.BuyPackageReq) (totalP //} mealLabelDb := db.MealLabelDb{} mealLabelDb.Set(buyPackageReq.EnterpriseId) - var mealLabelForBreakfast, mealLabelForLunch, mealLabelForDinner *model.MealLabel + var mealLabelForBreakfast, mealLabelForLunch, mealLabelForDinner = model.MealLabel{}, model.MealLabel{}, model.MealLabel{} if !isTeacher && buyPackageReq.IsBuyBreakfast == 1 { mealLabelForBreakfast, err = mealLabelDb.GetMealLabel(buyPackageReq.MealLabelIdForBreakfast) if err != nil { @@ -497,7 +497,7 @@ func CalcSupplementaryByDay(uid int, isTeacher bool, buyPackageReq md2.BuyPackag //} mealLabelDb := db.MealLabelDb{} mealLabelDb.Set(buyPackageReq.EnterpriseId) - var mealLabelForBreakfast, mealLabelForLunch, mealLabelForDinner *model.MealLabel + var mealLabelForBreakfast, mealLabelForLunch, mealLabelForDinner = model.MealLabel{}, model.MealLabel{}, model.MealLabel{} if !isTeacher && buyPackageReq.IsBuyBreakfast == 1 { mealLabelForBreakfast, err = mealLabelDb.GetMealLabel(buyPackageReq.MealLabelIdForBreakfast) if err != nil {