dengbiao 2 months ago
parent
commit
f8b78508ed
1 changed files with 12 additions and 12 deletions
  1. +12
    -12
      app/customer/svc/svc_central_kitchen_for_school_package.go

+ 12
- 12
app/customer/svc/svc_central_kitchen_for_school_package.go View File

@@ -37,7 +37,7 @@ func CalcBySchoolTerm(uid int, isTeacher bool, buyPackageReq md2.BuyPackageReq)
mealLabelDb := db.MealLabelDb{}
mealLabelDb.Set(buyPackageReq.EnterpriseId)
var mealLabelForBreakfast, mealLabelForLunch, mealLabelForDinner *model.MealLabel
if buyPackageReq.IsBuyBreakfast == 1 {
if !isTeacher && buyPackageReq.IsBuyBreakfast == 1{
mealLabelForBreakfast, err = mealLabelDb.GetMealLabel(buyPackageReq.MealLabelIdForBreakfast)
if err != nil {
return
@@ -47,7 +47,7 @@ func CalcBySchoolTerm(uid int, isTeacher bool, buyPackageReq md2.BuyPackageReq)
return
}
}
if buyPackageReq.IsBuyLunch == 1 {
if !isTeacher && buyPackageReq.IsBuyLunch == 1 {
mealLabelForLunch, err = mealLabelDb.GetMealLabel(buyPackageReq.MealLabelIdForLunch)
if err != nil {
return
@@ -57,7 +57,7 @@ func CalcBySchoolTerm(uid int, isTeacher bool, buyPackageReq md2.BuyPackageReq)
return
}
}
if buyPackageReq.IsBuyDinner == 1 {
if !isTeacher && buyPackageReq.IsBuyDinner == 1 {
mealLabelForDinner, err = mealLabelDb.GetMealLabel(buyPackageReq.MealLabelIdForDinner)
if err != nil {
return
@@ -198,7 +198,7 @@ func CalcByMonth(uid int, isTeacher bool, buyPackageReq md2.BuyPackageReq) (tota
mealLabelDb := db.MealLabelDb{}
mealLabelDb.Set(buyPackageReq.EnterpriseId)
var mealLabelForBreakfast, mealLabelForLunch, mealLabelForDinner *model.MealLabel
if buyPackageReq.IsBuyBreakfast == 1 {
if !isTeacher && buyPackageReq.IsBuyBreakfast == 1 {
mealLabelForBreakfast, err = mealLabelDb.GetMealLabel(buyPackageReq.MealLabelIdForBreakfast)
if err != nil {
return
@@ -208,7 +208,7 @@ func CalcByMonth(uid int, isTeacher bool, buyPackageReq md2.BuyPackageReq) (tota
return
}
}
if buyPackageReq.IsBuyLunch == 1 {
if !isTeacher && buyPackageReq.IsBuyLunch == 1 {
mealLabelForLunch, err = mealLabelDb.GetMealLabel(buyPackageReq.MealLabelIdForLunch)
if err != nil {
return
@@ -218,7 +218,7 @@ func CalcByMonth(uid int, isTeacher bool, buyPackageReq md2.BuyPackageReq) (tota
return
}
}
if buyPackageReq.IsBuyDinner == 1 {
if !isTeacher && buyPackageReq.IsBuyDinner == 1 {
mealLabelForDinner, err = mealLabelDb.GetMealLabel(buyPackageReq.MealLabelIdForDinner)
if err != nil {
return
@@ -358,7 +358,7 @@ func CalcByDay(uid int, isTeacher bool, buyPackageReq md2.BuyPackageReq) (totalP
mealLabelDb := db.MealLabelDb{}
mealLabelDb.Set(buyPackageReq.EnterpriseId)
var mealLabelForBreakfast, mealLabelForLunch, mealLabelForDinner *model.MealLabel
if buyPackageReq.IsBuyBreakfast == 1 {
if !isTeacher && buyPackageReq.IsBuyBreakfast == 1 {
mealLabelForBreakfast, err = mealLabelDb.GetMealLabel(buyPackageReq.MealLabelIdForBreakfast)
if err != nil {
return
@@ -368,7 +368,7 @@ func CalcByDay(uid int, isTeacher bool, buyPackageReq md2.BuyPackageReq) (totalP
return
}
}
if buyPackageReq.IsBuyLunch == 1 {
if !isTeacher && buyPackageReq.IsBuyLunch == 1 {
mealLabelForLunch, err = mealLabelDb.GetMealLabel(buyPackageReq.MealLabelIdForLunch)
if err != nil {
return
@@ -378,7 +378,7 @@ func CalcByDay(uid int, isTeacher bool, buyPackageReq md2.BuyPackageReq) (totalP
return
}
}
if buyPackageReq.IsBuyDinner == 1 {
if !isTeacher && buyPackageReq.IsBuyDinner == 1 {
mealLabelForDinner, err = mealLabelDb.GetMealLabel(buyPackageReq.MealLabelIdForDinner)
if err != nil {
return
@@ -498,7 +498,7 @@ func CalcSupplementaryByDay(uid int, isTeacher bool, buyPackageReq md2.BuyPackag
mealLabelDb := db.MealLabelDb{}
mealLabelDb.Set(buyPackageReq.EnterpriseId)
var mealLabelForBreakfast, mealLabelForLunch, mealLabelForDinner *model.MealLabel
if buyPackageReq.IsBuyBreakfast == 1 {
if !isTeacher && buyPackageReq.IsBuyBreakfast == 1 {
mealLabelForBreakfast, err = mealLabelDb.GetMealLabel(buyPackageReq.MealLabelIdForBreakfast)
if err != nil {
return
@@ -508,7 +508,7 @@ func CalcSupplementaryByDay(uid int, isTeacher bool, buyPackageReq md2.BuyPackag
return
}
}
if buyPackageReq.IsBuyLunch == 1 {
if !isTeacher && buyPackageReq.IsBuyLunch == 1 {
mealLabelForLunch, err = mealLabelDb.GetMealLabel(buyPackageReq.MealLabelIdForLunch)
if err != nil {
return
@@ -518,7 +518,7 @@ func CalcSupplementaryByDay(uid int, isTeacher bool, buyPackageReq md2.BuyPackag
return
}
}
if buyPackageReq.IsBuyDinner == 1 {
if !isTeacher && buyPackageReq.IsBuyDinner == 1 {
mealLabelForDinner, err = mealLabelDb.GetMealLabel(buyPackageReq.MealLabelIdForDinner)
if err != nil {
return


Loading…
Cancel
Save