|
@@ -1009,6 +1009,7 @@ func GetResourceDataEsList(list []*SearchComprehensiveItem, user *models.WxUserI
|
|
|
var yanxuanSpecialIds []int // 研选专栏
|
|
|
var askserieVideoIds []string //问答系列视频
|
|
|
var reportselectionIds []int //报告精选
|
|
|
+ var ficcreporrtIds []string //FICC研报
|
|
|
//Source string `description:"资源类型 报告 :article 、图表 :newchart、微路演 :roadshow、活动 :activity、活动视频:activityvideo、活动音频:activityvoice、专项调研活动:activityspecial 、 本周研究汇总: researchsummary 、 上周纪要汇总 :minutessummary 、晨会精华 :meetingreviewchapt "`
|
|
|
for _, v := range list {
|
|
|
if v.Source == "article" {
|
|
@@ -1044,6 +1045,8 @@ func GetResourceDataEsList(list []*SearchComprehensiveItem, user *models.WxUserI
|
|
|
askserieVideoIds = append(askserieVideoIds, strconv.Itoa(v.SourceId))
|
|
|
} else if v.Source == "reportselection" {
|
|
|
reportselectionIds = append(reportselectionIds, v.SourceId)
|
|
|
+ } else if v.Source == utils.CYGX_OBJ_FICC_REPORT {
|
|
|
+ ficcreporrtIds = append(ficcreporrtIds, strconv.Itoa(v.SourceId))
|
|
|
}
|
|
|
}
|
|
|
//处理文章
|
|
@@ -1495,50 +1498,53 @@ func GetResourceDataEsList(list []*SearchComprehensiveItem, user *models.WxUserI
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ //处理FICC研报
|
|
|
+ if len(ficcreporrtIds) > 0 {
|
|
|
+ pars = make([]interface{}, 0)
|
|
|
+ condition = ` AND a.report_id IN (` + utils.GetOrmInReplace(len(ficcreporrtIds)) + `)`
|
|
|
+ pars = append(pars, ficcreporrtIds)
|
|
|
+
|
|
|
+ listArticle, e := models.GetHomeList(condition, pars, 0, len(ficcreporrtIds))
|
|
|
+ if e != nil {
|
|
|
+ err = errors.New("GetHomeList, Err: " + e.Error())
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ listArticle, e = HandleArticleCategoryImg(listArticle)
|
|
|
+ if e != nil {
|
|
|
+ err = errors.New("HandleArticleCategoryImg, Err: " + e.Error())
|
|
|
+ return
|
|
|
+ }
|
|
|
+ for _, v := range listArticle {
|
|
|
+ //fmt.Println(v.ArticleId)
|
|
|
+ v.Body = ""
|
|
|
+ v.Source = 0 //配合前端这里强制改为 0
|
|
|
+ v.ArticleResponse = 0 //配合前端这里强制改为 0
|
|
|
+ //v.Source = utils.CYGX_OBJ_YANXUANSPECIAL
|
|
|
+ mapItems[fmt.Sprint("ficcreport", v.ReportId)].FiccReport = v
|
|
|
+ }
|
|
|
+
|
|
|
+ //listArticle, e = HandleArticleCategoryImg(listArticle)
|
|
|
+ //if e != nil {
|
|
|
+ // err = errors.New("HandleArticleCategoryImg, Err: " + e.Error())
|
|
|
+ // return
|
|
|
+ //}
|
|
|
+ //for _, v := range listArticle {
|
|
|
+ // //reportInfoItem := new(ficc_report.ReportDetail)
|
|
|
+ // //reportInfoItem.ReportInfo.ReportId = v.ReportId
|
|
|
+ // //reportInfoItem.ReportInfo.PublishTime = utils.StrTimeToTime(v.PublishDate)
|
|
|
+ // //reportInfoItem.ReportInfo.Title = v.Title
|
|
|
+ // mapItems[fmt.Sprint("ficcreport", v.ArticleId)].FiccReport = v
|
|
|
+ //
|
|
|
+ //}
|
|
|
+ }
|
|
|
+
|
|
|
for _, vList := range list {
|
|
|
for _, v := range mapItems {
|
|
|
//如果这些类型都为空,那么就不合并
|
|
|
- if v.Article == nil && v.Newchart == nil && v.Roadshow == nil && v.Activity == nil && v.Activityvideo == nil && v.Activityvoice == nil && v.Activityspecial == nil && v.Researchsummary == nil && v.Minutessummary == nil && v.Meetingreviewchapt == nil && v.ProductInterior == nil && v.IndustrialResource == nil && v.YanxuanSpecial == nil && v.AskserieVideo == nil && v.ReportSelection == nil {
|
|
|
+ if v.Article == nil && v.Newchart == nil && v.Roadshow == nil && v.Activity == nil && v.Activityvideo == nil && v.Activityvoice == nil && v.Activityspecial == nil && v.Researchsummary == nil && v.Minutessummary == nil && v.Meetingreviewchapt == nil && v.ProductInterior == nil && v.IndustrialResource == nil && v.YanxuanSpecial == nil && v.AskserieVideo == nil && v.ReportSelection == nil && v.FiccReport == nil {
|
|
|
continue
|
|
|
}
|
|
|
- //if v.Article != nil && v.SourceId == vList.SourceId {
|
|
|
- // v.Article.Title = vList.Title
|
|
|
- //}
|
|
|
- //if v.Newchart != nil && v.SourceId == vList.SourceId {
|
|
|
- // v.Newchart.Title = vList.Title
|
|
|
- //}
|
|
|
- //if v.Roadshow != nil && v.SourceId == vList.SourceId {
|
|
|
- // v.Roadshow.Title = vList.Title
|
|
|
- //}
|
|
|
- //if v.Activity != nil && v.SourceId == vList.SourceId {
|
|
|
- // v.Activity.ActivityName = vList.Title
|
|
|
- //}
|
|
|
- //if v.Activityvideo != nil && v.SourceId == vList.SourceId {
|
|
|
- // v.Activityvideo.Title = vList.Title
|
|
|
- //}
|
|
|
- //if v.Activityvoice != nil && v.SourceId == vList.SourceId {
|
|
|
- // v.Activityvoice.Title = vList.Title
|
|
|
- //}
|
|
|
- //
|
|
|
- //if v.Activityspecial != nil && v.SourceId == vList.SourceId {
|
|
|
- // v.Activityspecial.ResearchTheme = vList.Title
|
|
|
- //}
|
|
|
- //if v.Researchsummary != nil && v.SourceId == vList.SourceId {
|
|
|
- // v.Researchsummary.Title = vList.Title
|
|
|
- //}
|
|
|
- //if v.Minutessummary != nil && v.SourceId == vList.SourceId {
|
|
|
- // v.Minutessummary.Title = vList.Title
|
|
|
- //}
|
|
|
- //if v.ProductInterior != nil && v.SourceId == vList.SourceId {
|
|
|
- // v.ProductInterior.Title = vList.Title
|
|
|
- //}
|
|
|
- //if v.IndustrialResource != nil && v.SourceId == vList.SourceId {
|
|
|
- // v.IndustrialResource.UpdateTime = vList.PublishDate
|
|
|
- //}
|
|
|
-
|
|
|
- //if v.YanxuanSpecial != nil && v.SourceId == vList.SourceId {
|
|
|
- // v.YanxuanSpecial.Title = vList.Title
|
|
|
- //}
|
|
|
if v.SourceId == vList.SourceId && v.Source == vList.Source {
|
|
|
items = append(items, v)
|
|
|
}
|