|
@@ -702,10 +702,10 @@ FROM
|
|
|
cam.industrial_management_id = ? AND cam.source = 1
|
|
|
) AS t`
|
|
|
totalSql := `SELECT COUNT(1) total FROM (` + sql + `) z `
|
|
|
- err = o.Raw(totalSql, industrialManagementId, industrialManagementId, industrialManagementId, industrialManagementId,industrialManagementId).QueryRow(&total)
|
|
|
+ err = o.Raw(totalSql, industrialManagementId, industrialManagementId, industrialManagementId, industrialManagementId, industrialManagementId).QueryRow(&total)
|
|
|
sql += ` ORDER BY
|
|
|
t.publish_date DESC LIMIT ?,? `
|
|
|
- _, err = o.Raw(sql, industrialManagementId, industrialManagementId, industrialManagementId, industrialManagementId,industrialManagementId, startSize, pageSize).QueryRows(&items)
|
|
|
+ _, err = o.Raw(sql, industrialManagementId, industrialManagementId, industrialManagementId, industrialManagementId, industrialManagementId, startSize, pageSize).QueryRows(&items)
|
|
|
return
|
|
|
}
|
|
|
|
|
@@ -782,16 +782,16 @@ func GetTimeLineReportIndustrialPublishdateList(industrialIdArr []int) (items []
|
|
|
|
|
|
// 报告榜单start
|
|
|
type ArticleReportBillboardResp struct {
|
|
|
- ArticleId int `description:"文章id"`
|
|
|
- Title string `description:"标题"`
|
|
|
- PublishDate string `description:"发布时间"`
|
|
|
- PermissionName string `description:"行业名称"`
|
|
|
- DepartmentId int `description:"作者Id"`
|
|
|
- NickName string `description:"作者昵称"`
|
|
|
- IsCollect bool `description:"本人是否收藏"`
|
|
|
- Pv int `description:"PV"`
|
|
|
- CollectNum int `description:"收藏人数"`
|
|
|
- Source int `description:"来源 1:弘则资源包(报告)、2:研选主题(报告)"`
|
|
|
+ ArticleId int `description:"文章id"`
|
|
|
+ Title string `description:"标题"`
|
|
|
+ PublishDate string `description:"发布时间"`
|
|
|
+ PermissionName string `description:"行业名称"`
|
|
|
+ DepartmentId int `description:"作者Id"`
|
|
|
+ NickName string `description:"作者昵称"`
|
|
|
+ IsCollect bool `description:"本人是否收藏"`
|
|
|
+ Pv int `description:"PV"`
|
|
|
+ CollectNum int `description:"收藏人数"`
|
|
|
+ Source int `description:"来源 1:弘则资源包(报告)、2:研选主题(报告)"`
|
|
|
ArticleTypeId int `description:"文章类型ID"`
|
|
|
ArticleTypeName string `description:"文章类型名称"`
|
|
|
IsSpecial int `description:"是否为研选专栏"`
|
|
@@ -799,7 +799,7 @@ type ArticleReportBillboardResp struct {
|
|
|
MyCollectNum int `description:"本人是否收藏"`
|
|
|
SpecialType int `description:"专栏类型 1:笔记,2:观点"`
|
|
|
UserId int `description:"作者id"`
|
|
|
- List []*IndustrialManagementIdInt
|
|
|
+ List []*IndustrialManagementIdInt
|
|
|
}
|
|
|
|
|
|
type ArticleReportBillboardLIstPageResp struct {
|
|
@@ -830,20 +830,20 @@ type ArticleResearchResp struct {
|
|
|
ImgUrlPc string `description:"图片链接"`
|
|
|
List []*IndustrialManagementIdInt `description:"产业列表"`
|
|
|
ListSubject []*IndustrialSubject `description:"标的列表"`
|
|
|
- IsSpecial int `description:"是否为研选专栏"`
|
|
|
- SpecialTags string `description:"研选专栏标签"`
|
|
|
- UserId int `description:"作者id"`
|
|
|
+ IsSpecial int `description:"是否为研选专栏"`
|
|
|
+ SpecialTags string `description:"研选专栏标签"`
|
|
|
+ SpecialColumnId int `description:"专栏栏目id"`
|
|
|
}
|
|
|
|
|
|
// 获取数量
|
|
|
-func GetArticleResearchCount(condition string, pars []interface{},needYanxuanSpecial bool) (count int, err error) {
|
|
|
+func GetArticleResearchCount(condition string, pars []interface{}, needYanxuanSpecial bool) (count int, err error) {
|
|
|
o := orm.NewOrm()
|
|
|
sqlCount := `SELECT COUNT( 1 ) AS count FROM
|
|
|
cygx_article AS a
|
|
|
WHERE
|
|
|
1 = 1 AND a.publish_status = 1` + condition
|
|
|
- if needYanxuanSpecial{
|
|
|
- sqlCount = `SELECT SUM(count) AS count FROM (`+sqlCount+`
|
|
|
+ if needYanxuanSpecial {
|
|
|
+ sqlCount = `SELECT SUM(count) AS count FROM (` + sqlCount + `
|
|
|
UNION ALL
|
|
|
SELECT COUNT( 1 ) AS count FROM
|
|
|
cygx_yanxuan_special AS a WHERE
|
|
@@ -871,7 +871,7 @@ func GetArticleResearchList(condition string, pars []interface{}, startSize, pag
|
|
|
( 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,
|
|
|
0 AS special_type,
|
|
|
- 0 AS user_id,
|
|
|
+ 0 AS special_column_id,
|
|
|
'' AS special_tags
|
|
|
FROM
|
|
|
cygx_article AS a
|
|
@@ -901,7 +901,7 @@ func GetArticleResearchList(condition string, pars []interface{}, startSize, pag
|
|
|
( 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,
|
|
|
a.type AS special_type,
|
|
|
- a.user_id AS user_id,
|
|
|
+ b.id AS special_column_id,
|
|
|
a.tags AS special_tags
|
|
|
FROM
|
|
|
cygx_yanxuan_special AS a
|