|
@@ -1110,8 +1110,17 @@ WHERE
|
|
|
WHERE
|
|
|
mm.id = mmc.meeting_id
|
|
|
AND mm.status = 1
|
|
|
- AND mmc.industry_id = ? ) AS t `
|
|
|
- err = o.Raw(sql, industrialManagementId, industrialManagementId).QueryRow(&count)
|
|
|
+ AND mmc.industry_id = ? UNION ALL
|
|
|
+ SELECT
|
|
|
+ COUNT( 1 ) count
|
|
|
+ FROM
|
|
|
+ cygx_product_interior AS p
|
|
|
+ INNER JOIN cygx_product_interior_industrial_group_management AS pm
|
|
|
+ WHERE
|
|
|
+ p.product_interior_id = pm.product_interior_id
|
|
|
+ AND p.visible_range = 1
|
|
|
+ AND pm.industrial_management_id = ? ) AS t `
|
|
|
+ err = o.Raw(sql, industrialManagementId, industrialManagementId, industrialManagementId).QueryRow(&count)
|
|
|
return
|
|
|
}
|
|
|
|
|
@@ -1126,6 +1135,7 @@ type TimeLineReportItem struct {
|
|
|
SubCategoryName string `description:"二级分类"`
|
|
|
IsRed bool `description:"是否标红"`
|
|
|
Readnum int `description:"阅读数量"`
|
|
|
+ Resource int `description:"来源类型,1:文章、2:产品内测、3:晨报点评"`
|
|
|
}
|
|
|
|
|
|
// 获取产业报告+晨会点评列表
|
|
@@ -1142,6 +1152,7 @@ FROM
|
|
|
a.video_url,
|
|
|
a.sub_category_name,
|
|
|
'' AS content,
|
|
|
+ 1 AS resource,
|
|
|
( 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
|
|
@@ -1157,6 +1168,7 @@ FROM
|
|
|
'' AS video_url,
|
|
|
'时间线' AS sub_category_name,
|
|
|
mmc.content,
|
|
|
+ 3 AS resource,
|
|
|
0 AS readnum
|
|
|
FROM
|
|
|
cygx_morning_meeting_review_chapter AS mmc
|
|
@@ -1164,12 +1176,28 @@ FROM
|
|
|
WHERE
|
|
|
mm.id = mmc.meeting_id
|
|
|
AND mm.STATUS = 1
|
|
|
- AND mmc.industry_id = ?
|
|
|
+ AND mmc.industry_id = ? UNION ALL
|
|
|
+ SELECT
|
|
|
+ p.product_interior_id AS id,
|
|
|
+ p.title,
|
|
|
+ p.publish_time,
|
|
|
+ '' AS video_url,
|
|
|
+ '' AS sub_category_name,
|
|
|
+ '' AS content,
|
|
|
+ 2 AS resource,
|
|
|
+ 0 AS readnum
|
|
|
+ FROM
|
|
|
+ cygx_product_interior AS p
|
|
|
+ INNER JOIN cygx_product_interior_industrial_group_management AS pm
|
|
|
+ WHERE
|
|
|
+ p.product_interior_id = pm.product_interior_id
|
|
|
+ AND p.visible_range = 1
|
|
|
+ AND pm.industrial_management_id = ?
|
|
|
) AS t
|
|
|
`
|
|
|
sql += ` ORDER BY
|
|
|
t.publish_time DESC LIMIT ?,? `
|
|
|
- _, err = o.Raw(sql, industrialManagementId, industrialManagementId, startSize, pageSize).QueryRows(&items)
|
|
|
+ _, err = o.Raw(sql, industrialManagementId, industrialManagementId, industrialManagementId, startSize, pageSize).QueryRows(&items)
|
|
|
return
|
|
|
}
|
|
|
|