|
@@ -851,6 +851,7 @@ type ArticleResearchResp struct {
|
|
|
IndustryTags []string `description:"研选专栏行业标签"`
|
|
|
CompanyTags []string `description:"研选专栏公司标签"`
|
|
|
SpecialColumnId int `description:"专栏栏目id"`
|
|
|
+ TopTime int `description:"置顶时间"`
|
|
|
}
|
|
|
|
|
|
// 获取数量
|
|
@@ -891,7 +892,8 @@ func GetArticleResearchList(condition string, pars []interface{}, startSize, pag
|
|
|
0 AS special_type,
|
|
|
0 AS special_column_id,
|
|
|
'' AS company_tags,
|
|
|
- '' AS industry_tags
|
|
|
+ '' AS industry_tags,
|
|
|
+ a.top_time
|
|
|
FROM
|
|
|
cygx_article AS a
|
|
|
LEFT JOIN cygx_industrial_article_group_management AS mg ON mg.article_id = a.article_id
|
|
@@ -922,7 +924,8 @@ func GetArticleResearchList(condition string, pars []interface{}, startSize, pag
|
|
|
a.type AS special_type,
|
|
|
b.id AS special_column_id,
|
|
|
a.company_tags AS company_tags,
|
|
|
- a.industry_tags AS industry_tags
|
|
|
+ a.industry_tags AS industry_tags,
|
|
|
+ 0 as top_time
|
|
|
FROM
|
|
|
cygx_yanxuan_special AS a
|
|
|
JOIN cygx_yanxuan_special_author AS b ON a.user_id = b.user_id
|
|
@@ -931,7 +934,7 @@ func GetArticleResearchList(condition string, pars []interface{}, startSize, pag
|
|
|
sql += ` GROUP BY article_id ORDER BY publish_date DESC LIMIT ?,? `
|
|
|
_, err = o.Raw(sql, userId, userId, pars, startSize, pageSize).QueryRows(&items)
|
|
|
} else {
|
|
|
- sql += ` GROUP BY a.article_id ORDER BY a.publish_date DESC LIMIT ?,? `
|
|
|
+ sql += ` GROUP BY a.article_id ORDER BY top_time DESC , a.publish_date DESC LIMIT ?,? `
|
|
|
_, err = o.Raw(sql, userId, pars, startSize, pageSize).QueryRows(&items)
|
|
|
}
|
|
|
return
|