cygx_article.go 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. package data_manage
  2. import (
  3. "github.com/beego/beego/v2/client/orm"
  4. "time"
  5. )
  6. type CygxArticle struct {
  7. SummaryManageId int `orm:"column(id);pk"`
  8. CategoryName string `description:"行业分类名称"`
  9. CategoryId int `description:"行业分类ID"`
  10. CategoryIdTwo int `description:"分类id用作修改匹配类型使用"`
  11. ArticleId int `description:"文章ID"`
  12. Title string `description:"标题"`
  13. Abstract string `description:"摘要"`
  14. Body string `description:"内容"`
  15. BodyText string `description:"内容"`
  16. PublishStatus int `description:"发布状态,0未发布 ,1已发布"`
  17. PublishDate time.Time `description:"发布时间"`
  18. CreateDate time.Time `description:"创建时间"`
  19. LastUpdatedTime time.Time `description:"更新时间"`
  20. IsSummary int `description:"是否属于纪要库 1是、0否"`
  21. IsReport int `description:"是否属于报告 1是、0否"`
  22. ReportType int `description:"'报告类型,1行业报告,2产业报告'"`
  23. Source int `description:"来源 0策略平台同步,1小程序后台添加"`
  24. ArticleIdMd5 string `description:"ID,md5值"`
  25. UpdateFrequency string `description:"更新周期"`
  26. SellerAndMobile string `description:"销售和手机号"`
  27. Department string `description:"作者"`
  28. ExpertBackground string `description:"专家背景"`
  29. ExpertNumber string `description:"专家编号"`
  30. InterviewDate string `description:"访谈日期"`
  31. FileLink string `description:"下载预览链接"`
  32. ChartPermissionIds string `description:"行业ID ,多个用 , 隔开"`
  33. DepartmentId int `description:"作者ID"`
  34. Periods string `description:"期数"`
  35. ReportLink string `description:"报告链接"`
  36. ArticleType string `description:"文章类型 文章类型,lyjh:路演精华 "`
  37. HavePublish int `description:"是否发布过,1是 ,0 否"`
  38. IsClass int `description:"是否归类过,1是 ,0 否"`
  39. SubCategoryName string `description:"主题名称"`
  40. LinkArticleId int `description:"报告ID链接"`
  41. AdminId int `description:"销售/管理员ID"`
  42. AdminName string `description:"销售/管理员姓名"`
  43. ArticleTypeId int `description:"文章类型ID"`
  44. ArticleTypeName string `description:"文章类型名称"`
  45. Annotation string `description:"核心观点"`
  46. Stock string `description:"个股标签"`
  47. //NickName string `description:"作者昵称"`
  48. }
  49. func GetReportArticleList(condition string, pars []interface{}) (list []*CygxArticle, err error) {
  50. o := orm.NewOrmUsingDB("hz_cygx")
  51. sql := `SELECT * FROM cygx_article WHERE 1=1 AND publish_status = 1`
  52. if condition != "" {
  53. sql += condition
  54. }
  55. _, err = o.Raw(sql, pars).QueryRows(&list)
  56. return
  57. }