Browse Source

Merge branch 'feature/jiayue' into debug

hsun 1 year ago
parent
commit
ce69c7e8e3
1 changed files with 1 additions and 1 deletions
  1. 1 1
      models/jiayue/dict.go

+ 1 - 1
models/jiayue/dict.go

@@ -53,7 +53,7 @@ func GetDictPageIndex(condition string, pars []interface{}, pageIndex, pageSize,
 	}
 
 	//sqlBase := fmt.Sprintf(`SELECT %s, no FROM (SELECT rownum no, a.* FROM %s a WHERE %s %s) WHERE no BETWEEN %d AND %d`, fields, IndexTableName, condition, order, (pageIndex-1)*pageSize+1, pageIndex*pageSize)
-	sqlBase := fmt.Sprintf(`SELECT * FROM (SELECT rownum no, tmp.* FROM (SELECT %s FROM %s WHERE %s %s) tmp) WHERE no BETWEEN %d AND %d`, fields, IndexTableName, condition, order, (pageIndex-1)*pageSize+1, pageIndex*pageSize)
+	sqlBase := fmt.Sprintf(`SELECT * FROM (SELECT tmp.*, rownum no FROM (SELECT %s FROM %s WHERE %s %s) tmp) WHERE no BETWEEN %d AND %d`, fields, IndexTableName, condition, order, (pageIndex-1)*pageSize+1, pageIndex*pageSize)
 	global.LOG.Info("GetDictPageIndex SQL: ", sqlBase)
 	dictIndexList, err = getDictIndex(sqlBase, pars)
 	if err != nil {