xingzai 1 ano atrás
pai
commit
6108c28451
1 arquivos alterados com 2 adições e 2 exclusões
  1. 2 2
      models/report.go

+ 2 - 2
models/report.go

@@ -743,10 +743,10 @@ func GetArticleResearchList(condition string, pars []interface{}, startSize, pag
 	JOIN cygx_yanxuan_special_author AS b ON a.user_id = b.user_id
 	WHERE
 	1 = 1  AND a.status = 3 `
-		sql += ` ORDER  BY publish_time DESC  LIMIT ?,? `
+		sql += ` ORDER  BY top_time DESC,  publish_time DESC  LIMIT ?,? `
 		_, err = o.Raw(sql, userId, userId, pars, startSize, pageSize).QueryRows(&items)
 	} else {
-		sql += ` ORDER  BY publish_time DESC  LIMIT ?,? `
+		sql += ` ORDER  BY top_time DESC, publish_time DESC  LIMIT ?,? `
 		_, err = o.Raw(sql, userId, pars, startSize, pageSize).QueryRows(&items)
 	}