|
@@ -21,29 +21,26 @@ type ReportBillboardListResp struct {
|
|
|
}
|
|
|
|
|
|
type HomeArticle struct {
|
|
|
- ArticleId int `description:"文章id"`
|
|
|
- Title string `description:"标题"`
|
|
|
- TitleEn string `description:"英文标题 "`
|
|
|
- UpdateFrequency string `description:"更新周期"`
|
|
|
- CreateDate string `description:"创建时间"`
|
|
|
- PublishDate string `description:"发布时间"`
|
|
|
- Body string `description:"内容"`
|
|
|
- BodyHtml string `description:"内容带有HTML标签"`
|
|
|
- Abstract string `description:"摘要"`
|
|
|
- CategoryName string `description:"一级分类"`
|
|
|
- SubCategoryName string `description:"二级分类"`
|
|
|
- ExpertBackground string `description:"专家背景"`
|
|
|
- IsResearch bool `description:"是否属于研选"`
|
|
|
- Pv int `description:"PV"`
|
|
|
- ImgUrlPc string `description:"图片链接"`
|
|
|
- CategoryId string `description:"文章分类"`
|
|
|
- HttpUrl string `description:"文章链接跳转地址"`
|
|
|
- IsNeedJump bool `description:"是否需要跳转链接地址"`
|
|
|
- Source int `description:"来源 1:文章, 2:图表"`
|
|
|
- Annotation string `description:"核心观点"`
|
|
|
- HomeType int `description:"数据类型:0-纪要(默认); 1-微路演音频"`
|
|
|
- MicroAudio *MicroAudioUnionList `description:"微路演音频"`
|
|
|
- List []*IndustrialManagementIdInt
|
|
|
+ ArticleId int `description:"文章id"`
|
|
|
+ Title string `description:"标题"`
|
|
|
+ TitleEn string `description:"英文标题 "`
|
|
|
+ PublishDate string `description:"发布时间"`
|
|
|
+ Body string `description:"内容"`
|
|
|
+ BodyHtml string `description:"内容带有HTML标签"`
|
|
|
+ Abstract string `description:"摘要"`
|
|
|
+ CategoryName string `description:"一级分类"`
|
|
|
+ SubCategoryName string `description:"二级分类"`
|
|
|
+ IsResearch bool `description:"是否属于研选"`
|
|
|
+ Pv int `description:"PV"`
|
|
|
+ ImgUrlPc string `description:"图片链接"`
|
|
|
+ CategoryId string `description:"文章分类"`
|
|
|
+ HttpUrl string `description:"文章链接跳转地址"`
|
|
|
+ IsNeedJump bool `description:"是否需要跳转链接地址"`
|
|
|
+ Source int `description:"来源 1:文章, 2:图表"`
|
|
|
+ Annotation string `description:"核心观点"`
|
|
|
+ HomeType int `description:"数据类型:0-纪要(默认); 1-微路演音频"`
|
|
|
+ MicroAudio *MicroAudioUnionList `description:"微路演音频"`
|
|
|
+ List []*IndustrialManagementIdInt
|
|
|
}
|
|
|
|
|
|
type ArticleListResp struct {
|
|
@@ -115,6 +112,19 @@ func GetHomeList(condition string, pars []interface{}, startSize, pageSize int)
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+func GetHomeListPublic(condition string, pars []interface{}, startSize, pageSize int) (items []*ArticleListResp, err error) {
|
|
|
+ o := orm.NewOrm()
|
|
|
+ sql := ` SELECT * ,(SELECT count(1) FROM cygx_article_history_record_newpv as h WHERE h.article_id = a.article_id ) as pv
|
|
|
+ FROM cygx_article AS a
|
|
|
+ WHERE a.publish_status=1 `
|
|
|
+ if condition != "" {
|
|
|
+ sql += condition
|
|
|
+ }
|
|
|
+ sql += ` ORDER BY publish_date DESC,article_id DESC LIMIT ?,? `
|
|
|
+ _, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
|
|
|
+ return
|
|
|
+}
|
|
|
+
|
|
|
func GetReportTacticsList(condition string, pars []interface{}, userId, startSize, pageSize int) (items []*HomeArticle, err error) {
|
|
|
o := orm.NewOrm()
|
|
|
sql := ` SELECT *
|