|
@@ -311,6 +311,7 @@ func GetResourceDataEsList(list []*SearchComprehensiveItem, user *models.WxUserI
|
|
var yanxuanSpecialIds []int // 研选专栏
|
|
var yanxuanSpecialIds []int // 研选专栏
|
|
var askserieVideoIds []string //问答系列视频
|
|
var askserieVideoIds []string //问答系列视频
|
|
var reportselectionIds []int //报告精选
|
|
var reportselectionIds []int //报告精选
|
|
|
|
+ var ficcreporrtIds []string //FICC研报
|
|
//Source string `description:"资源类型 报告 :article 、图表 :newchart、微路演 :roadshow、活动 :activity、活动视频:activityvideo、活动音频:activityvoice、专项调研活动:activityspecial 、 本周研究汇总: researchsummary 、 上周纪要汇总 :minutessummary 、晨会精华 :meetingreviewchapt 、 产品内测:productinterior
|
|
//Source string `description:"资源类型 报告 :article 、图表 :newchart、微路演 :roadshow、活动 :activity、活动视频:activityvideo、活动音频:activityvoice、专项调研活动:activityspecial 、 本周研究汇总: researchsummary 、 上周纪要汇总 :minutessummary 、晨会精华 :meetingreviewchapt 、 产品内测:productinterior
|
|
for _, v := range list {
|
|
for _, v := range list {
|
|
if v.Source == "article" {
|
|
if v.Source == "article" {
|
|
@@ -346,6 +347,8 @@ func GetResourceDataEsList(list []*SearchComprehensiveItem, user *models.WxUserI
|
|
askserieVideoIds = append(askserieVideoIds, strconv.Itoa(v.SourceId))
|
|
askserieVideoIds = append(askserieVideoIds, strconv.Itoa(v.SourceId))
|
|
} else if v.Source == "reportselection" {
|
|
} else if v.Source == "reportselection" {
|
|
reportselectionIds = append(reportselectionIds, v.SourceId)
|
|
reportselectionIds = append(reportselectionIds, v.SourceId)
|
|
|
|
+ } else if v.Source == utils.CYGX_OBJ_FICC_REPORT {
|
|
|
|
+ ficcreporrtIds = append(ficcreporrtIds, strconv.Itoa(v.SourceId))
|
|
}
|
|
}
|
|
}
|
|
}
|
|
detail, e := models.GetConfigByCode("city_img_url")
|
|
detail, e := models.GetConfigByCode("city_img_url")
|
|
@@ -803,49 +806,35 @@ 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)
|
|
|
|
+ articleList, e := models.GetHomeListPublic(condition, pars, 0, len(ficcreporrtIds))
|
|
|
|
+ if e != nil {
|
|
|
|
+ err = errors.New("GetHomeListPublic, Err: " + e.Error())
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ articleList, e = HandleArticleCategoryImg(articleList, user)
|
|
|
|
+ if e != nil {
|
|
|
|
+ err = errors.New("HandleArticleCategoryImg, Err: " + e.Error())
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ for _, v := range articleList {
|
|
|
|
+ v.Body = ""
|
|
|
|
+ mapItems[fmt.Sprint("ficcreport", v.ReportId)].FiccReport = v
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
for _, vList := range list {
|
|
for _, vList := range list {
|
|
for _, v := range mapItems {
|
|
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
|
|
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.Source == vList.Source {
|
|
|
|
- // v.IndustrialResource.UpdateTime = strings.Replace(vList.PublishDate, "00:00:00", "", -1)
|
|
|
|
- //}
|
|
|
|
- //if v.YanxuanSpecial != nil && v.SourceId == vList.SourceId {
|
|
|
|
- // v.YanxuanSpecial.Title = vList.Title
|
|
|
|
- //}
|
|
|
|
|
|
+
|
|
if v.SourceId == vList.SourceId && v.Source == vList.Source {
|
|
if v.SourceId == vList.SourceId && v.Source == vList.Source {
|
|
items = append(items, v)
|
|
items = append(items, v)
|
|
}
|
|
}
|