|
@@ -52,6 +52,13 @@ type TacticsListResp struct {
|
|
List []*HomeArticle
|
|
List []*HomeArticle
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+type TacticsListTimeResp struct {
|
|
|
|
+ Paging *paging.PagingItem
|
|
|
|
+ MatchTypeName string `description:"匹配类型"`
|
|
|
|
+ CategoryImgUrlPc string `description:"图片"`
|
|
|
|
+ List []*TimeLineReportItem
|
|
|
|
+}
|
|
|
|
+
|
|
// 报告搜索start
|
|
// 报告搜索start
|
|
type ReoprtSearchResp struct {
|
|
type ReoprtSearchResp struct {
|
|
Paging *paging.PagingItem
|
|
Paging *paging.PagingItem
|
|
@@ -417,9 +424,10 @@ func GetTimeLineReportIndustrialList(industrialManagementId, startSize, pageSize
|
|
}
|
|
}
|
|
|
|
|
|
type TimeLineReportItem struct {
|
|
type TimeLineReportItem struct {
|
|
- Id int `description:"文章或晨报点评id"`
|
|
|
|
- Title string `description:"标题"`
|
|
|
|
- PublishTime string `description:"发布时间"`
|
|
|
|
|
|
+ Id int `description:"文章或晨报点评id"`
|
|
|
|
+ Title string `description:"标题"`
|
|
|
|
+ //PublishTime string `description:"发布时间"`
|
|
|
|
+ PublishDate string `description:"发布时间"`
|
|
Content string `description:"内容"`
|
|
Content string `description:"内容"`
|
|
VideoUrl string `description:"视频链接"`
|
|
VideoUrl string `description:"视频链接"`
|
|
IsHaveVideo bool `description:"是否包含视频"`
|
|
IsHaveVideo bool `description:"是否包含视频"`
|
|
@@ -429,6 +437,52 @@ type TimeLineReportItem struct {
|
|
Readnum int `description:"阅读数量"`
|
|
Readnum int `description:"阅读数量"`
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+// 获取产业报告+晨会点评列表
|
|
|
|
+func GetTimeLineReportIndustrialListTime(userId, industrialManagementId, startSize, pageSize int) (items []*TimeLineReportItem, total int, err error) {
|
|
|
|
+ o := orm.NewOrm()
|
|
|
|
+ sql := `SELECT
|
|
|
|
+ *
|
|
|
|
+FROM
|
|
|
|
+ (
|
|
|
|
+ SELECT
|
|
|
|
+ a.article_id AS id,
|
|
|
|
+ a.title,
|
|
|
|
+ a.publish_date,
|
|
|
|
+ a.video_url,
|
|
|
|
+ a.sub_category_name,
|
|
|
|
+ '' AS content,
|
|
|
|
+ ( SELECT COUNT( 1 ) FROM cygx_article_history_record AS rec WHERE rec.user_id = ` + strconv.Itoa(userId) + ` AND rec.article_id = a.article_id ) AS readnum
|
|
|
|
+ FROM
|
|
|
|
+ cygx_article AS a
|
|
|
|
+ INNER JOIN cygx_industrial_article_group_management AS man_g ON man_g.article_id = a.article_id
|
|
|
|
+ WHERE
|
|
|
|
+ a.publish_status = 1
|
|
|
|
+ AND a.is_class = 1
|
|
|
|
+ AND man_g.industrial_management_id = ? GROUP BY id UNION ALL
|
|
|
|
+ SELECT
|
|
|
|
+ mmc.id,
|
|
|
|
+ '' AS title,
|
|
|
|
+ mm.publish_time AS publish_date,
|
|
|
|
+ '' AS video_url,
|
|
|
|
+ '时间线' AS sub_category_name,
|
|
|
|
+ mmc.content,
|
|
|
|
+ 0 AS readnum
|
|
|
|
+ FROM
|
|
|
|
+ cygx_morning_meeting_review_chapter AS mmc
|
|
|
|
+ INNER JOIN cygx_morning_meeting_reviews AS mm
|
|
|
|
+ WHERE
|
|
|
|
+ mm.id = mmc.meeting_id
|
|
|
|
+ AND mm.STATUS = 1
|
|
|
|
+ AND mmc.industry_id = ?
|
|
|
|
+ ) AS t`
|
|
|
|
+ totalSql := `SELECT COUNT(1) total FROM (` + sql + `) z `
|
|
|
|
+ err = o.Raw(totalSql, industrialManagementId, industrialManagementId).QueryRow(&total)
|
|
|
|
+ sql += ` ORDER BY
|
|
|
|
+ t.publish_date DESC LIMIT ?,? `
|
|
|
|
+ _, err = o.Raw(sql, industrialManagementId, industrialManagementId, startSize, pageSize).QueryRows(&items)
|
|
|
|
+ return
|
|
|
|
+}
|
|
|
|
+
|
|
// 获取产业报告+晨会点评列表
|
|
// 获取产业报告+晨会点评列表
|
|
func GetTimeLineReportIndustrialListRed(userId, industrialManagementId, startSize, pageSize int) (items []*TimeLineReportItem, err error) {
|
|
func GetTimeLineReportIndustrialListRed(userId, industrialManagementId, startSize, pageSize int) (items []*TimeLineReportItem, err error) {
|
|
o := orm.NewOrm()
|
|
o := orm.NewOrm()
|
|
@@ -439,7 +493,7 @@ FROM
|
|
SELECT
|
|
SELECT
|
|
a.article_id AS id,
|
|
a.article_id AS id,
|
|
a.title,
|
|
a.title,
|
|
- a.publish_date AS publish_time,
|
|
|
|
|
|
+ a.publish_date ,
|
|
a.video_url,
|
|
a.video_url,
|
|
a.sub_category_name,
|
|
a.sub_category_name,
|
|
'' AS content,
|
|
'' AS content,
|
|
@@ -454,7 +508,7 @@ FROM
|
|
SELECT
|
|
SELECT
|
|
mmc.id,
|
|
mmc.id,
|
|
'' AS title,
|
|
'' AS title,
|
|
- mm.publish_time AS publish_time,
|
|
|
|
|
|
+ mm.publish_time AS publish_date,
|
|
'' AS video_url,
|
|
'' AS video_url,
|
|
'时间线' AS sub_category_name,
|
|
'时间线' AS sub_category_name,
|
|
mmc.content,
|
|
mmc.content,
|
|
@@ -469,7 +523,7 @@ FROM
|
|
) AS t
|
|
) AS t
|
|
`
|
|
`
|
|
sql += ` ORDER BY
|
|
sql += ` ORDER BY
|
|
- t.publish_time DESC LIMIT ?,? `
|
|
|
|
|
|
+ t.publish_date DESC LIMIT ?,? `
|
|
_, err = o.Raw(sql, industrialManagementId, industrialManagementId, startSize, pageSize).QueryRows(&items)
|
|
_, err = o.Raw(sql, industrialManagementId, industrialManagementId, startSize, pageSize).QueryRows(&items)
|
|
return
|
|
return
|
|
}
|
|
}
|