|
@@ -6,23 +6,6 @@ import (
|
|
"time"
|
|
"time"
|
|
)
|
|
)
|
|
|
|
|
|
-type CygxReportSelection struct {
|
|
|
|
- ArticleId int `orm:"column(article_id);pk"description:"报告id"`
|
|
|
|
- AddType string `description:"更新方式 1重新编辑 ,2 继承往期"`
|
|
|
|
- Title string `description:"标题"`
|
|
|
|
- Department string `description:"作者"`
|
|
|
|
- PublishStatus int `description:"发布状态,1已发布,0未发布"`
|
|
|
|
- PublishDate time.Time `description:"发布时间"`
|
|
|
|
- CreateTime time.Time `description:"创建时间"`
|
|
|
|
- LastUpdatedTime time.Time `description:"最后一次更新时间"`
|
|
|
|
- Periods string `description:"期数"`
|
|
|
|
- HavePublish int `description:"是否发布过,1是,0否"`
|
|
|
|
- InheritPeriods string `description:"继承期数"`
|
|
|
|
- ProductDescription string `description:"产品说明"`
|
|
|
|
- UpdateDescription string `description:"更新说明"`
|
|
|
|
- FocusOn string `description:"近期重点关注方向"`
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
type CygxReportSelectionRep struct {
|
|
type CygxReportSelectionRep struct {
|
|
ArticleId int `orm:"column(article_id);pk"description:"报告id"`
|
|
ArticleId int `orm:"column(article_id);pk"description:"报告id"`
|
|
Title string `description:"标题"`
|
|
Title string `description:"标题"`
|
|
@@ -39,32 +22,20 @@ type CygxReportSelectionListPublicRep struct {
|
|
List []*CygxReportSelectionRep
|
|
List []*CygxReportSelectionRep
|
|
}
|
|
}
|
|
|
|
|
|
-type AddCygxReportSelection struct {
|
|
+type DetailCygxReportSelectionRep struct {
|
|
- ArticleId int `description:"报告Id ,传0时新增,大于0时修改"`
|
|
+ ArticleId int `description:"报告Id"`
|
|
- AddType string `description:"更新方式 1重新编辑 ,2 继承往期"`
|
|
|
|
- InheritPeriods string `description:"继承期数"`
|
|
|
|
Title string `description:"标题"`
|
|
Title string `description:"标题"`
|
|
Department string `description:"作者"`
|
|
Department string `description:"作者"`
|
|
PublishDate string `description:"发布时间"`
|
|
PublishDate string `description:"发布时间"`
|
|
|
|
+ CreateTime string `description:"创建时间"`
|
|
|
|
+ LastUpdatedTime string `description:"最后一次更新时间"`
|
|
|
|
+ Periods string `description:"期数"`
|
|
|
|
+ VideoUrl string `description:"链接"`
|
|
|
|
+ VideoPlaySeconds string `description:"时长"`
|
|
|
|
+ VideoName string `description:"音频名称"`
|
|
ProductDescription string `description:"产品说明"`
|
|
ProductDescription string `description:"产品说明"`
|
|
UpdateDescription string `description:"更新说明"`
|
|
UpdateDescription string `description:"更新说明"`
|
|
FocusOn string `description:"近期重点关注方向"`
|
|
FocusOn string `description:"近期重点关注方向"`
|
|
- DoType int `description:"操作方式,1发布,0保存"`
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-type DetailCygxReportSelectionRep struct {
|
|
|
|
- ArticleId int `description:"报告Id"`
|
|
|
|
- Title string `description:"标题"`
|
|
|
|
- Department string `description:"作者"`
|
|
|
|
- PublishDate string `description:"发布时间"`
|
|
|
|
- CreateTime string `description:"创建时间"`
|
|
|
|
- LastUpdatedTime string `description:"最后一次更新时间"`
|
|
|
|
- Periods string `description:"期数"`
|
|
|
|
- VideoUrl string `description:"链接"`
|
|
|
|
- VideoPlaySeconds float64 `description:"时长"`
|
|
|
|
- ProductDescription string `description:"产品说明"`
|
|
|
|
- UpdateDescription string `description:"更新说明"`
|
|
|
|
- FocusOn string `description:"近期重点关注方向"`
|
|
|
|
}
|
|
}
|
|
|
|
|
|
type ReportSelectionLetailResp struct {
|
|
type ReportSelectionLetailResp struct {
|
|
@@ -94,7 +65,7 @@ type ReportSelectionId struct {
|
|
|
|
|
|
|
|
|
|
func GetCygxReportSelectionPublic(condition, tbdb string, pars []interface{}) (count int, err error) {
|
|
func GetCygxReportSelectionPublic(condition, tbdb string, pars []interface{}) (count int, err error) {
|
|
- sqlCount := ` SELECT COUNT(1) AS count FROM ` + tbdb + ` as art WHERE 1= 1 `
|
|
+ sqlCount := ` SELECT COUNT(1) AS count FROM ` + tbdb + ` as art WHERE 1= 1 AND art.publish_status = 1 `
|
|
if condition != "" {
|
|
if condition != "" {
|
|
sqlCount += condition
|
|
sqlCount += condition
|
|
}
|
|
}
|
|
@@ -106,7 +77,7 @@ func GetCygxReportSelectionPublic(condition, tbdb string, pars []interface{}) (c
|
|
|
|
|
|
func GetCygxReportSelectionInfoById(articleId int) (item *DetailCygxReportSelectionRep, err error) {
|
|
func GetCygxReportSelectionInfoById(articleId int) (item *DetailCygxReportSelectionRep, err error) {
|
|
o := orm.NewOrm()
|
|
o := orm.NewOrm()
|
|
- sql := `SELECT * FROM cygx_report_selection WHERE article_id=?`
|
|
+ sql := `SELECT * FROM cygx_report_selection WHERE article_id=? AND publish_status = 1 `
|
|
err = o.Raw(sql, articleId).QueryRow(&item)
|
|
err = o.Raw(sql, articleId).QueryRow(&item)
|
|
return
|
|
return
|
|
}
|
|
}
|
|
@@ -114,7 +85,7 @@ func GetCygxReportSelectionInfoById(articleId int) (item *DetailCygxReportSelect
|
|
|
|
|
|
func GetReportSelectionListPublic(condition, tbdb string, pars []interface{}, startSize, pageSize int) (items []*CygxReportSelectionRep, err error) {
|
|
func GetReportSelectionListPublic(condition, tbdb string, pars []interface{}, startSize, pageSize int) (items []*CygxReportSelectionRep, err error) {
|
|
o := orm.NewOrm()
|
|
o := orm.NewOrm()
|
|
- sql := `SELECT * FROM ` + tbdb + ` as art WHERE 1= 1 `
|
|
+ sql := `SELECT * FROM ` + tbdb + ` as art WHERE 1= 1 AND art.publish_status = 1 `
|
|
if condition != "" {
|
|
if condition != "" {
|
|
sql += condition
|
|
sql += condition
|
|
}
|
|
}
|