diff --git a/web/models/c_surveysheet.go b/web/models/c_surveysheet.go index a502d42..6787e26 100644 --- a/web/models/c_surveysheet.go +++ b/web/models/c_surveysheet.go @@ -414,9 +414,9 @@ func (t *CSurveysheet) SelectOne(level int) (CSurveysheet, error) { } datalist := make([]CSurveysheetSubjectlst, 0) if level > 0 { - err = e.Table("c_surveysheet_subjectlst").Where("cid = ? and cnr = ? and surveysheetid = ? and level != 1", t.Cid, t.Cnr, t.Surveysheetid).Desc("pos").Find(&datalist) + err = e.Table("c_surveysheet_subjectlst").Where("cid = ? and cnr = ? and surveysheetid = ? and level != 1", t.Cid, t.Cnr, t.Surveysheetid).Asc("pos").Find(&datalist) } else { - err = e.Table("c_surveysheet_subjectlst").Where("cid = ? and cnr = ? and surveysheetid = ?", t.Cid, t.Cnr, t.Surveysheetid).Desc("pos").Find(&datalist) + err = e.Table("c_surveysheet_subjectlst").Where("cid = ? and cnr = ? and surveysheetid = ?", t.Cid, t.Cnr, t.Surveysheetid).Asc("pos").Find(&datalist) } if err != nil { return data, err