rdluck 3 anni fa
parent
commit
91a474d332
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      models/home.go

+ 1 - 1
models/home.go

@@ -26,7 +26,7 @@ func GetHomeList(condition string, pars []interface{}, startSize, pageSize int)
 	if condition != "" {
 		sql += condition
 	}
-	sql += ` ORDER BY publish_date DESC LIMIT ?,? `
+	sql += ` ORDER BY publish_date DESC LIMIT,article_id DESC ?,? `
 	fmt.Println(sql)
 	_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
 	return