|
@@ -504,6 +504,11 @@ func SetCentralKitchenForSchoolWithSpecByMealLabel(c *gin.Context) { |
|
|
now := time.Now() |
|
|
now := time.Now() |
|
|
mealLabelDb := db.MealLabelDb{} |
|
|
mealLabelDb := db.MealLabelDb{} |
|
|
mealLabelDb.Set(req.EnterpriseId) |
|
|
mealLabelDb.Set(req.EnterpriseId) |
|
|
|
|
|
labels, err := mealLabelDb.FindMealLabel(req.GradeId, req.Kind) |
|
|
|
|
|
if err != nil { |
|
|
|
|
|
e.OutErr(c, e.ERR_DB_ORM, err.Error()) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
var nowIds = map[int]bool{} |
|
|
var nowIds = map[int]bool{} |
|
|
for _, v := range req.MealLabelList { |
|
|
for _, v := range req.MealLabelList { |
|
@@ -539,11 +544,6 @@ func SetCentralKitchenForSchoolWithSpecByMealLabel(c *gin.Context) { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
labels, err := mealLabelDb.FindMealLabel(req.GradeId, req.Kind) |
|
|
|
|
|
if err != nil { |
|
|
|
|
|
e.OutErr(c, e.ERR_DB_ORM, err.Error()) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
var needDelIds []int |
|
|
var needDelIds []int |
|
|
for _, v := range *labels { |
|
|
for _, v := range *labels { |
|
|
if !nowIds[v.Id] { |
|
|
if !nowIds[v.Id] { |
|
|