|
@@ -968,8 +968,8 @@ func GetArticleResearchListYx(condition string, pars []interface{}, startSize, p
|
|
|
if condition != "" {
|
|
|
sql += condition
|
|
|
}
|
|
|
- if needYanxuanSpecial {
|
|
|
- sql += `UNION ALL
|
|
|
+
|
|
|
+ sql += `UNION ALL
|
|
|
SELECT
|
|
|
a.id AS article_id,
|
|
|
a.title AS title,
|
|
@@ -992,12 +992,8 @@ func GetArticleResearchListYx(condition string, pars []interface{}, startSize, p
|
|
|
JOIN cygx_yanxuan_special_author AS b ON a.user_id = b.user_id
|
|
|
WHERE
|
|
|
1 = 1 AND a.status = 3 `
|
|
|
- sql += ` GROUP BY article_id ORDER BY publish_date DESC LIMIT ?,? `
|
|
|
- _, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
|
|
|
- } else {
|
|
|
- sql += ` GROUP BY a.article_id ORDER BY a.publish_date DESC LIMIT ?,? `
|
|
|
- _, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
|
|
|
- }
|
|
|
+ sql += ` GROUP BY a.article_id ORDER BY top_time DESC , a.publish_date DESC LIMIT ?,? `
|
|
|
+ _, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
|
|
|
return
|
|
|
}
|
|
|
|