From 06b8d49f0bfe0ead4473fefafdcf13a45ecd1a1d Mon Sep 17 00:00:00 2001 From: zhangxin Date: Sat, 24 Apr 2021 16:12:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=8E=B7=E5=8F=96=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E7=9A=84=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/models/c_surveysheet.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/models/c_surveysheet.go b/web/models/c_surveysheet.go index 65c2ddb..a502d42 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).Asc("subjecttype").Find(&datalist) + 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) } else { - err = e.Table("c_surveysheet_subjectlst").Where("cid = ? and cnr = ? and surveysheetid = ?", t.Cid, t.Cnr, t.Surveysheetid).Asc("subjecttype").Find(&datalist) + err = e.Table("c_surveysheet_subjectlst").Where("cid = ? and cnr = ? and surveysheetid = ?", t.Cid, t.Cnr, t.Surveysheetid).Desc("pos").Find(&datalist) } if err != nil { return data, err