diff --git a/app/db/db_meal_label.go b/app/db/db_meal_label.go index 95b9389..b3b32ca 100644 --- a/app/db/db_meal_label.go +++ b/app/db/db_meal_label.go @@ -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) }