package data_manage import ( "github.com/beego/beego/v2/client/orm" "time" ) type CygxArticle struct { SummaryManageId int `orm:"column(id);pk"` CategoryName string `description:"行业分类名称"` CategoryId int `description:"行业分类ID"` CategoryIdTwo int `description:"分类id用作修改匹配类型使用"` ArticleId int `description:"文章ID"` Title string `description:"标题"` Abstract string `description:"摘要"` Body string `description:"内容"` BodyText string `description:"内容"` PublishStatus int `description:"发布状态,0未发布 ,1已发布"` PublishDate time.Time `description:"发布时间"` CreateDate time.Time `description:"创建时间"` LastUpdatedTime time.Time `description:"更新时间"` IsSummary int `description:"是否属于纪要库 1是、0否"` IsReport int `description:"是否属于报告 1是、0否"` ReportType int `description:"'报告类型,1行业报告,2产业报告'"` Source int `description:"来源 0策略平台同步,1小程序后台添加"` ArticleIdMd5 string `description:"ID,md5值"` UpdateFrequency string `description:"更新周期"` SellerAndMobile string `description:"销售和手机号"` Department string `description:"作者"` ExpertBackground string `description:"专家背景"` ExpertNumber string `description:"专家编号"` InterviewDate string `description:"访谈日期"` FileLink string `description:"下载预览链接"` ChartPermissionIds string `description:"行业ID ,多个用 , 隔开"` DepartmentId int `description:"作者ID"` Periods string `description:"期数"` ReportLink string `description:"报告链接"` ArticleType string `description:"文章类型 文章类型,lyjh:路演精华 "` HavePublish int `description:"是否发布过,1是 ,0 否"` IsClass int `description:"是否归类过,1是 ,0 否"` SubCategoryName string `description:"主题名称"` LinkArticleId int `description:"报告ID链接"` AdminId int `description:"销售/管理员ID"` AdminName string `description:"销售/管理员姓名"` ArticleTypeId int `description:"文章类型ID"` ArticleTypeName string `description:"文章类型名称"` Annotation string `description:"核心观点"` Stock string `description:"个股标签"` //NickName string `description:"作者昵称"` } func GetReportArticleList(condition string, pars []interface{}) (list []*CygxArticle, err error) { o := orm.NewOrmUsingDB("hz_cygx") sql := `SELECT * FROM cygx_article WHERE 1=1 AND publish_status = 1` if condition != "" { sql += condition } _, err = o.Raw(sql, pars).QueryRows(&list) return }