|
@@ -596,17 +596,19 @@ type TimeLineReportItem struct {
|
|
|
ArticleId int `description:"文章id"`
|
|
|
Title string `description:"标题"`
|
|
|
//PublishTime string `description:"发布时间"`
|
|
|
- PublishDate string `description:"发布时间"`
|
|
|
- Content string `description:"内容"`
|
|
|
- VideoUrl string `description:"视频链接"`
|
|
|
- VoiceUrl string `description:"音频链接"`
|
|
|
- IsHaveVideo bool `description:"是否包含视频"`
|
|
|
- ImgUrlPc string `description:"pc图片"`
|
|
|
- SubCategoryName string `description:"二级分类"`
|
|
|
- IsRed bool `description:"是否标红"`
|
|
|
- Readnum int `description:"阅读数量"`
|
|
|
- Resource int `description:"来源类型,1:文章、2:产品内测、3:晨报点评 4:活动回放视频 5:活动回放音频 "`
|
|
|
- Type int `description:"类型: 1-音频; 2-活动视频; 3-产业视频 、 4-系列问答视频"`
|
|
|
+ PublishDate string `description:"发布时间"`
|
|
|
+ Content string `description:"内容"`
|
|
|
+ VideoUrl string `description:"视频链接"`
|
|
|
+ VoiceUrl string `description:"音频链接"`
|
|
|
+ IsHaveVideo bool `description:"是否包含视频"`
|
|
|
+ ImgUrlPc string `description:"pc图片"`
|
|
|
+ SubCategoryName string `description:"二级分类"`
|
|
|
+ IsRed bool `description:"是否标红"`
|
|
|
+ Readnum int `description:"阅读数量"`
|
|
|
+ Resource int `description:"来源类型,1:文章、2:产品内测、3:晨报点评 4:活动回放视频 5:活动回放音频 "`
|
|
|
+ Type int `description:"类型: 1-音频; 2-活动视频; 3-产业视频 、 4-系列问答视频"`
|
|
|
+ LinkArticleId int `description:"晨会精华报告ID链接"`
|
|
|
+ ListSubject []*CygxIndustrialSubject `description:"标的列表"`
|
|
|
}
|
|
|
|
|
|
// 获取产业报告+晨会点评列表
|
|
@@ -638,12 +640,12 @@ FROM
|
|
|
SELECT
|
|
|
mmc.id,
|
|
|
0 as article_id,
|
|
|
- mmc.content AS title,
|
|
|
+ mmc.title,
|
|
|
mm.publish_time AS publish_date,
|
|
|
'' AS video_url,
|
|
|
'' AS voice_url,
|
|
|
'时间线' AS sub_category_name,
|
|
|
- '' AS content,
|
|
|
+ mmc.content,
|
|
|
3 AS resource,
|
|
|
0 AS type,
|
|
|
0 AS readnum
|
|
@@ -850,6 +852,7 @@ type ArticleResearchResp struct {
|
|
|
IndustryTags []string `description:"研选专栏行业标签"`
|
|
|
CompanyTags []string `description:"研选专栏公司标签"`
|
|
|
SpecialColumnId int `description:"专栏栏目id"`
|
|
|
+ TopTime int `description:"置顶时间"`
|
|
|
}
|
|
|
|
|
|
// 获取数量
|
|
@@ -890,7 +893,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
|
|
@@ -921,16 +925,17 @@ 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
|
|
|
WHERE
|
|
|
1 = 1 AND a.status = 3 `
|
|
|
- sql += ` GROUP BY article_id ORDER BY publish_date DESC LIMIT ?,? `
|
|
|
+ sql += ` GROUP BY article_id ORDER BY top_time DESC , 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
|
|
@@ -954,7 +959,8 @@ func GetArticleResearchListYx(condition string, pars []interface{}, startSize, p
|
|
|
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
|
|
|
INNER JOIN cygx_article_department AS d ON d.department_id = a.department_id
|
|
@@ -963,8 +969,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,
|
|
@@ -981,18 +987,15 @@ func GetArticleResearchListYx(condition string, pars []interface{}, startSize, p
|
|
|
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
|
|
|
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 article_id ORDER BY top_time DESC , publish_date DESC LIMIT ?,? `
|
|
|
+ _, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
|
|
|
return
|
|
|
}
|
|
|
|