|
@@ -4,6 +4,50 @@ import (
|
|
|
"github.com/beego/beego/v2/client/orm"
|
|
|
)
|
|
|
|
|
|
+type CygxArticle struct {
|
|
|
+ Id int `orm:"column(id);pk"`
|
|
|
+ ArticleId int `description:"文章id"`
|
|
|
+ Title string `description:"标题"`
|
|
|
+ TitleEn string `description:"英文标题 "`
|
|
|
+ UpdateFrequency string `description:"更新周期"`
|
|
|
+ CreateDate string `description:"创建时间"`
|
|
|
+ PublishDate string `description:"发布时间"`
|
|
|
+ Body string `description:"内容"`
|
|
|
+ BodyText string `description:"内容"`
|
|
|
+ Abstract string `description:"摘要"`
|
|
|
+ CategoryName string `description:"一级分类"`
|
|
|
+ SubCategoryName string `description:"二级分类"`
|
|
|
+ PublishStatus int `description:"发布状态"`
|
|
|
+ CategoryId int `description:"分类id"`
|
|
|
+ CategoryIdTwo int `description:"分类id用作修改匹配类型使用"`
|
|
|
+ ExpertBackground string `description:"专家背景"`
|
|
|
+ ExpertNumber string `description:"专家编号"`
|
|
|
+ InterviewDate string `description:"访谈日期"`
|
|
|
+ Department string `description:"作者"`
|
|
|
+ ArticleIdMd5 string `description:"ID,md5值"`
|
|
|
+ IsClass int `description:"是否归类,1是,0否"`
|
|
|
+ IsSummary int `description:"是否是纪要库,1是,0否"`
|
|
|
+ IsReport int `description:"是否属于报告,1是,0否"`
|
|
|
+ ReportType int `description:"报告类型,1行业报告,2产业报告,0无"`
|
|
|
+ FileLink string `description:"下载预览链接"`
|
|
|
+ MatchTypeName string `description:"匹配类型"`
|
|
|
+ Periods string `description:"期数"`
|
|
|
+ ReportLink string `description:"报告链接"`
|
|
|
+ ArticleType string `description:"文章类型 文章类型,lyjh:路演精华 "`
|
|
|
+ HavePublish int `description:"是否发布过,1是 ,0 否"`
|
|
|
+ Source int `description:"来源 0策略平台同步,1小程序后台添加"`
|
|
|
+ SellerAndMobile string `description:"销售和手机号"`
|
|
|
+ VideoUrl string `description:"音频文件URL"`
|
|
|
+ VideoName string `description:"音频文件名称"`
|
|
|
+ VideoPlaySeconds string `description:"音频播放时长"`
|
|
|
+ Stock string `description:"个股标签"`
|
|
|
+ FieldName string `description:"产业标签"`
|
|
|
+ Annotation string `description:"核心观点"`
|
|
|
+ TypeName string `description:"策略平台报告类型"`
|
|
|
+ ModifyTimeByCl string `description:"策略平台报告更新时间"`
|
|
|
+ CeLueFieldId int `description:"策略平台领域ID"`
|
|
|
+}
|
|
|
+
|
|
|
type ArticleDetail struct {
|
|
|
ArticleId int `description:"报告id"`
|
|
|
ArticleIdMd5 string `description:"报告MD5id"`
|
|
@@ -258,3 +302,26 @@ func GetArticleStock() (items []*SummaryArticleStock, err error) {
|
|
|
_, err = o.Raw(sql).QueryRows(&items)
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+func GetCygxCygxArticleList(condition string, pars []interface{}, startSize, pageSize int) (items []*CygxArticle, err error) {
|
|
|
+ o := orm.NewOrm()
|
|
|
+ sql := `SELECT * FROM cygx_article as art WHERE 1= 1 `
|
|
|
+ if condition != "" {
|
|
|
+ sql += condition
|
|
|
+ }
|
|
|
+ sql += ` LIMIT ?,? `
|
|
|
+ _, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
|
|
|
+ return
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+func GetCygxArticleCount(condition string, pars []interface{}) (count int, err error) {
|
|
|
+ sqlCount := ` SELECT COUNT(1) AS count FROM cygx_article as art WHERE 1= 1 `
|
|
|
+ if condition != "" {
|
|
|
+ sqlCount += condition
|
|
|
+ }
|
|
|
+ o := orm.NewOrm()
|
|
|
+ err = o.Raw(sqlCount, pars).QueryRow(&count)
|
|
|
+ return
|
|
|
+}
|