|
@@ -30,31 +30,52 @@ type DetailCygxReportSelectionRep struct {
|
|
|
PublishDate string `description:"发布时间"`
|
|
|
CreateTime string `description:"创建时间"`
|
|
|
LastUpdatedTime string `description:"最后一次更新时间"`
|
|
|
- Periods string `description:"期数"`
|
|
|
+ Periods int `description:"期数"`
|
|
|
VideoUrl string `description:"链接"`
|
|
|
VideoPlaySeconds string `description:"时长"`
|
|
|
VideoName string `description:"音频名称"`
|
|
|
ProductDescription string `description:"产品说明"`
|
|
|
UpdateDescription string `description:"更新说明"`
|
|
|
FocusOn string `description:"近期重点关注方向"`
|
|
|
+ MarketStrategy string `description:"市场策略核心逻辑汇总"`
|
|
|
+ ReportLink string `description:"报告链接"`
|
|
|
+ CeLueArticleId int `description:"策略报告详情"`
|
|
|
}
|
|
|
|
|
|
type ReportSelectionLetailResp struct {
|
|
|
- Detail *DetailCygxReportSelectionRep
|
|
|
- HasPermission int `description:"1:有该行业权限,正常展示,2:无该行业权限,不存在权益客户下,3:无该品类权限,已提交过申请,4:无该行业权限,未提交过申请,5:潜在客户,未提交过申请,6:潜在客户,已提交过申请"`
|
|
|
- List []*ReportSelectionChartPermission
|
|
|
+ Detail *DetailCygxReportSelectionRep
|
|
|
+ HasPermission int `description:"1:有该行业权限,正常展示,2:无该行业权限,不存在权益客户下,3:无该品类权限,已提交过申请,4:无该行业权限,未提交过申请,5:潜在客户,未提交过申请,6:潜在客户,已提交过申请"`
|
|
|
+ List []*ReportSelectionChartPermission
|
|
|
+ ListPermissionSubject []*ReportSelectionChartLogPermission `description:"行业列表"`
|
|
|
}
|
|
|
|
|
|
type ReportSelectionChartPermission struct {
|
|
|
- PermissionName string `description:"权限名称"`
|
|
|
- IcoLink string `orm:"column(image_url)"description:"图标链接"`
|
|
|
- List []*CygxReportSelectionLogDetail
|
|
|
+ PermissionName string `description:"权限名称"`
|
|
|
+ IcoLink string `orm:"column(image_url)"description:"图标链接"`
|
|
|
+ List []*CygxReportSelectionLogDetail
|
|
|
+ BodyChartSummary string `description:"行业核心逻辑汇总"`
|
|
|
+}
|
|
|
+
|
|
|
+type ReportSelectionChartLogPermission struct {
|
|
|
+ PermissionName string `description:"权限名称"`
|
|
|
+ ListSubject []*ReportSelectionChartLogSubjectName `description:"标的列表"`
|
|
|
+}
|
|
|
+
|
|
|
+type ReportSelectionChartLogSubjectName struct {
|
|
|
+ SubjectName string `description:"标的名称"`
|
|
|
+ IndustrialSubjectId int `description:"标的ID"`
|
|
|
+ IsNew bool `description:"是否展示新标签"`
|
|
|
}
|
|
|
|
|
|
type CygxReportSelectionLogDetail struct {
|
|
|
- IndustrialManagementId string `description:"产业Id"`
|
|
|
- SubjectName string `description:"标的名称"`
|
|
|
- Body string `description:"内容"`
|
|
|
+ IndustrialManagementId string `description:"产业Id"`
|
|
|
+ IndustrialSubjectId int `description:"标的ID"`
|
|
|
+ SubjectName string `description:"标的名称"`
|
|
|
+ IsNew bool `description:"是否展示新标签"`
|
|
|
+ Body string `description:"内容"`
|
|
|
+ CompanyLabel []string `description:"公司标签"`
|
|
|
+ Label string `description:"公司标签"`
|
|
|
+ OverviewArticleId int `description:"综述报告Id"`
|
|
|
List []*IndustriaReportSelection
|
|
|
}
|
|
|
type IndustriaReportSelection struct {
|
|
@@ -66,7 +87,7 @@ type ReportSelectionId struct {
|
|
|
ArticleId int `description:"报告I"`
|
|
|
}
|
|
|
|
|
|
-//获取数量
|
|
|
+// 获取数量
|
|
|
func GetCygxReportSelectionPublic(condition, tbdb string, pars []interface{}) (count int, err error) {
|
|
|
sqlCount := ` SELECT COUNT(1) AS count FROM ` + tbdb + ` as art WHERE 1= 1 AND art.publish_status = 1 `
|
|
|
if condition != "" {
|
|
@@ -77,7 +98,7 @@ func GetCygxReportSelectionPublic(condition, tbdb string, pars []interface{}) (c
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-//通过纪要ID获取活动详情
|
|
|
+// 通过ID获取详情
|
|
|
func GetCygxReportSelectionInfoById(articleId int) (item *DetailCygxReportSelectionRep, err error) {
|
|
|
o := orm.NewOrm()
|
|
|
sql := `SELECT * FROM cygx_report_selection WHERE article_id=? AND publish_status = 1 `
|
|
@@ -85,7 +106,15 @@ func GetCygxReportSelectionInfoById(articleId int) (item *DetailCygxReportSelect
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-//列表
|
|
|
+// 通过期数获取详情
|
|
|
+func GetCygxReportSelectionInfoByperiods(periods int) (item *DetailCygxReportSelectionRep, err error) {
|
|
|
+ o := orm.NewOrm()
|
|
|
+ sql := `SELECT * FROM cygx_report_selection WHERE periods=? `
|
|
|
+ err = o.Raw(sql, periods).QueryRow(&item)
|
|
|
+ return
|
|
|
+}
|
|
|
+
|
|
|
+// 列表
|
|
|
func GetReportSelectionListPublic(condition, readSql, tbdb string, pars []interface{}, startSize, pageSize int) (items []*CygxReportSelectionRep, err error) {
|
|
|
o := orm.NewOrm()
|
|
|
sql := `SELECT * ,` + readSql + ` FROM ` + tbdb + ` as art WHERE 1= 1 AND art.publish_status = 1 `
|
|
@@ -104,13 +133,16 @@ type CygxReportSelectionLog struct {
|
|
|
PermissionName string `description:"行业ID"`
|
|
|
CreateTime time.Time `description:"创建时间"`
|
|
|
Body string `description:"内容"`
|
|
|
- IndustrialSubjectId string `description:"标的ID"`
|
|
|
+ IndustrialSubjectId int `description:"标的ID"`
|
|
|
IndustrialManagementId string `description:"产业资源包Id 多个用 , 隔开"`
|
|
|
SubjectName string `description:"标的名称"`
|
|
|
IcoLink string `orm:"column(image_url)"description:"图标链接"`
|
|
|
+ CompanyLabel []string `description:"公司标签"`
|
|
|
+ Label string `description:"公司标签"`
|
|
|
+ OverviewArticleId int `description:"综述报告Id"`
|
|
|
}
|
|
|
|
|
|
-//列表
|
|
|
+// 列表
|
|
|
func GetReportSelectionlogListAll(articleId int) (items []*CygxReportSelectionLog, err error) {
|
|
|
o := orm.NewOrm()
|
|
|
sql := `SELECT c.permission_name ,c.image_url,s.subject_name , l.*
|
|
@@ -123,10 +155,10 @@ func GetReportSelectionlogListAll(articleId int) (items []*CygxReportSelectionLo
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-//列表
|
|
|
+// 列表
|
|
|
func GetReportSelectionlogSonListAll(articleId, chartPermissionId int) (items []*CygxReportSelectionLogDetail, err error) {
|
|
|
o := orm.NewOrm()
|
|
|
- sql := `SELECT c.permission_name , l.*
|
|
|
+ sql := `SELECT c.permission_name , l.* ,l.company_label as label
|
|
|
FROM
|
|
|
cygx_report_selection_log AS l
|
|
|
INNER JOIN chart_permission AS c ON c.chart_permission_id = l.chart_permission_id
|