|
@@ -500,6 +500,7 @@ type ArticleCollectionResp struct {
|
|
|
Source int `description:"来源 1:弘则资源包(报告)、2:研选主题(报告)"`
|
|
|
ArticleTypeId int `description:"文章类型ID"`
|
|
|
List []*IndustrialManagementResp `description:"产业列表"`
|
|
|
+ IsSpecial int `description:"是否为研选专栏"`
|
|
|
}
|
|
|
|
|
|
type IndustrialManagementResp struct {
|
|
@@ -595,6 +596,7 @@ type ArticleResearchResp struct {
|
|
|
ArticleTypeId int `description:"文章类型ID"`
|
|
|
ArticleTypeName string `description:"类型名称"`
|
|
|
ButtonStyle string `description:"按钮展示样式"`
|
|
|
+ IsSpecial int `description:"是否为研选专栏"`
|
|
|
List []*IndustrialManagementResp `description:"产业列表"`
|
|
|
}
|
|
|
|
|
@@ -621,7 +623,8 @@ func GetArticleResearchList(condition string, pars []interface{}, startSize, pag
|
|
|
( SELECT count( 1 ) FROM cygx_article_history_record_newpv AS h WHERE h.article_id = a.article_id ) AS pv,
|
|
|
( SELECT count( 1 ) FROM cygx_article_collect AS ac INNER JOIN wx_user as u ON u.user_id = ac.user_id WHERE ac.article_id = a.article_id ) AS collect_num,
|
|
|
( SELECT count( 1 ) FROM cygx_article_collect AS ac INNER JOIN wx_user as u ON u.user_id = ac.user_id WHERE ac.article_id = a.article_id AND DATE_SUB( CURDATE(), INTERVAL 30 DAY ) <= date( ac.create_time ) ) AS collect_num_order,
|
|
|
- ( SELECT count( 1 ) FROM cygx_article_collect AS ac WHERE ac.article_id = a.article_id AND user_id = ? ) AS my_collect_num
|
|
|
+ ( SELECT count( 1 ) FROM cygx_article_collect AS ac WHERE ac.article_id = a.article_id AND user_id = ? ) AS my_collect_num,
|
|
|
+ 0 AS is_special
|
|
|
FROM
|
|
|
cygx_article AS a
|
|
|
INNER JOIN cygx_industrial_article_group_management AS mg ON mg.article_id = a.article_id
|
|
@@ -645,7 +648,8 @@ func GetArticleResearchList(condition string, pars []interface{}, startSize, pag
|
|
|
( SELECT count( 1 ) FROM cygx_yanxuan_special_record AS h WHERE h.yanxuan_special_id = a.id ) AS pv,
|
|
|
( SELECT count( 1 ) FROM cygx_yanxuan_special_collect AS ac INNER JOIN wx_user as u ON u.user_id = ac.user_id WHERE ac.yanxuan_special_id = a.id ) AS collect_num,
|
|
|
0 AS collect_num_order,
|
|
|
- ( SELECT count( 1 ) FROM cygx_yanxuan_special_collect AS ac WHERE ac.yanxuan_special_id = a.id AND user_id = ? ) AS my_collect_num
|
|
|
+ ( SELECT count( 1 ) FROM cygx_yanxuan_special_collect AS ac WHERE ac.yanxuan_special_id = a.id AND user_id = ? ) AS my_collect_num,
|
|
|
+ 1 AS is_special
|
|
|
FROM
|
|
|
cygx_yanxuan_special AS a
|
|
|
JOIN cygx_yanxuan_special_author AS b ON a.user_id = b.user_id
|
|
@@ -653,7 +657,7 @@ func GetArticleResearchList(condition string, pars []interface{}, startSize, pag
|
|
|
1 = 1 AND a.status = 3 `
|
|
|
|
|
|
sql += ` ORDER BY publish_date DESC LIMIT ?,? `
|
|
|
- _, err = o.Raw(sql, userId,userId, pars, startSize, pageSize).QueryRows(&items)
|
|
|
+ _, err = o.Raw(sql, userId, userId, pars, startSize, pageSize).QueryRows(&items)
|
|
|
return
|
|
|
}
|
|
|
|