|
@@ -769,8 +769,9 @@ func GetResourceDataEsList(list []*SearchComprehensiveItem, user *models.WxUserI
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- mapSourceId := make(map[string]bool)
|
|
|
+ //mapSourceId := make(map[string]bool)
|
|
|
for _, vList := range list {
|
|
|
+ fmt.Println(vList.Source)
|
|
|
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 {
|
|
@@ -808,17 +809,17 @@ func GetResourceDataEsList(list []*SearchComprehensiveItem, user *models.WxUserI
|
|
|
v.ProductInterior.Title = vList.Title
|
|
|
}
|
|
|
if v.IndustrialResource != nil && v.SourceId == vList.SourceId {
|
|
|
- v.IndustrialResource.UpdateTime = v.PublishDate
|
|
|
-
|
|
|
+ v.IndustrialResource.UpdateTime = vList.PublishDate
|
|
|
}
|
|
|
- if v.SourceId == vList.SourceId && !mapSourceId[fmt.Sprint(v.Source, "_", v.SourceId)] {
|
|
|
- if v.IndustrialResource != nil {
|
|
|
- v.Source = "industrialsource"
|
|
|
- }
|
|
|
+ if v.SourceId == vList.SourceId && v.Source == vList.Source {
|
|
|
items = append(items, v)
|
|
|
- mapSourceId[fmt.Sprint(v.Source, "_", v.SourceId)] = true
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ for _, v := range items {
|
|
|
+ if v.IndustrialResource != nil {
|
|
|
+ v.Source = "industrialsource"
|
|
|
+ }
|
|
|
+ }
|
|
|
return
|
|
|
}
|