|
@@ -40,7 +40,7 @@ func GetMyChartListCountById(userId int) (count int, err error) {
|
|
|
|
|
|
func GetMyChartListById(userId int, startSize, pageSize int) (items []*MyChart, err error) {
|
|
|
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)
|
|
|
return
|
|
|
}
|