|
@@ -40,6 +40,7 @@ func GetResourceDataList(condition string, pars []interface{}, startSize, pageSi
|
|
|
var minutessummaryIds []int
|
|
|
var meetingreviewchaptIds []int
|
|
|
var productinteriorIds []int
|
|
|
+ var reportselectionIds []int // 报告精选
|
|
|
//Source string `description:"资源类型 报告 :article 、图表 :newchart、微路演 :roadshow、活动 :activity、活动视频:activityvideo、活动音频:activityvoice、专项调研活动:activityspecial 、 本周研究汇总: researchsummary 、 上周纪要汇总 :minutessummary 、晨会精华 :meetingreviewchapt "`
|
|
|
for _, v := range list {
|
|
|
if v.Source == "article" {
|
|
@@ -64,6 +65,8 @@ func GetResourceDataList(condition string, pars []interface{}, startSize, pageSi
|
|
|
meetingreviewchaptIds = append(meetingreviewchaptIds, v.SourceId)
|
|
|
} else if v.Source == "productinterior" {
|
|
|
productinteriorIds = append(productinteriorIds, v.SourceId)
|
|
|
+ } else if v.Source == "reportselection" {
|
|
|
+ reportselectionIds = append(reportselectionIds, v.SourceId)
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -417,6 +420,24 @@ func GetResourceDataList(condition string, pars []interface{}, startSize, pageSi
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ //处理报告精选
|
|
|
+ lenreportselectionIds := len(reportselectionIds)
|
|
|
+ if lenreportselectionIds > 0 {
|
|
|
+ pars = make([]interface{}, 0)
|
|
|
+ condition = ` AND article_id IN (` + utils.GetOrmInReplace(lenreportselectionIds) + `)`
|
|
|
+ pars = append(pars, lenreportselectionIds)
|
|
|
+
|
|
|
+ listreportselection, e := models.GetReportSelectionList(condition, pars, startSize, pageSize)
|
|
|
+ if e != nil {
|
|
|
+ err = errors.New("GetReportSelectionList, Err: " + e.Error())
|
|
|
+ return
|
|
|
+ }
|
|
|
+ for _, v := range listreportselection {
|
|
|
+ v.PublishDate = utils.TimeRemoveHms2(v.PublishDate)
|
|
|
+ mapItems[fmt.Sprint("reportselection", v.ArticleId)].ReportSelection = v
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
for _, vList := range list {
|
|
|
for _, v := range mapItems {
|
|
|
if v.SourceId == vList.SourceId {
|