Explorar el Código

Merge branch 'bzq/dev' of eta_mini/eta_mini_api into debug

鲍自强 hace 1 año
padre
commit
9bf5b6cf31
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      models/my_chart.go

+ 1 - 1
models/my_chart.go

@@ -40,7 +40,7 @@ func GetMyChartListCountById(userId int) (count int, err error) {
 
 
 func GetMyChartListById(userId int, startSize, pageSize int) (items []*MyChart, err error) {
 func GetMyChartListById(userId int, startSize, pageSize int) (items []*MyChart, err error) {
 	o := orm.NewOrm()
 	o := orm.NewOrm()
-	sql := `SELECT * FROM my_chart WHERE user_id=? ORDER BY create_time LIMIT ?,?`
+	sql := `SELECT * FROM my_chart WHERE user_id=? ORDER BY create_time DESC LIMIT ?,?`
 	_, err = o.Raw(sql, userId, startSize, pageSize).QueryRows(&items)
 	_, err = o.Raw(sql, userId, startSize, pageSize).QueryRows(&items)
 	return
 	return
 }
 }