|
|
@@ -19,7 +19,7 @@ func (MealLabelDb *MealLabelDb) Set(enterpriseId int) { // set方法 |
|
|
|
|
|
|
|
func (MealLabelDb *MealLabelDb) FindMealLabel(gradeId int, kind int32) (*[]model.MealLabel, error) { |
|
|
|
var m []model.MealLabel |
|
|
|
if err := MealLabelDb.Db.Desc("id").Where("enterprise_id =?", MealLabelDb.EnterpriseId).And("grade_id =?", gradeId). |
|
|
|
if err := MealLabelDb.Db.Asc("id").Where("enterprise_id =?", MealLabelDb.EnterpriseId).And("grade_id =?", gradeId). |
|
|
|
And("kind =?", kind).Find(&m); err != nil { |
|
|
|
return nil, logx.Error(err) |
|
|
|
} |
|
|
|