Roc 1 月之前
父节点
当前提交
c4c2f2f426
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      models/rag/question.go

+ 1 - 1
models/rag/question.go

@@ -103,7 +103,7 @@ func (m *Question) GetByCondition(condition string, pars []interface{}) (item *Q
 }
 
 func (m *Question) GetListByCondition(condition string, pars []interface{}, startSize, pageSize int) (items []*Question, err error) {
-	sqlStr := fmt.Sprintf(`SELECT * FROM %s WHERE 1=1 %s order by question_id asc LIMIT ?,?`, m.TableName(), condition)
+	sqlStr := fmt.Sprintf(`SELECT * FROM %s WHERE 1=1 %s order by question_id desc LIMIT ?,?`, m.TableName(), condition)
 	pars = append(pars, startSize, pageSize)
 	err = global.DbMap[utils.DbNameAI].Raw(sqlStr, pars...).Find(&items).Error