Browse Source

修改获取问题的排序

pull/1/head
zhangxin 3 years ago
parent
commit
06b8d49f0b
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      web/models/c_surveysheet.go

+ 2
- 2
web/models/c_surveysheet.go View File

@ -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


Loading…
Cancel
Save