|
@@ -46,8 +46,8 @@ type ElasticComprehensiveDetail struct {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
@@ -404,7 +404,7 @@ func AddComprehensiveActivityVideo() {
|
|
|
|
|
|
for _, v := range list {
|
|
|
item := new(ElasticComprehensiveDetail)
|
|
|
- item.SourceId = v.ActivityId
|
|
|
+ item.SourceId = v.Id
|
|
|
item.Source = "activityvideo"
|
|
|
item.Title = v.Title
|
|
|
item.PublishDate = v.ActivityTime
|
|
@@ -490,7 +490,7 @@ func AddComprehensiveActivityVoice() {
|
|
|
|
|
|
for _, v := range list {
|
|
|
item := new(ElasticComprehensiveDetail)
|
|
|
- item.SourceId = v.ActivityId
|
|
|
+ item.SourceId = v.ActivityVoiceId
|
|
|
item.Source = "activityvoice"
|
|
|
item.Title = v.VoiceName
|
|
|
item.PublishDate = v.ActivityTime
|
|
@@ -634,235 +634,6 @@ func EsDeleteComprehensiveData(item *ElasticComprehensiveDetail) (err error) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|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
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
func EsComprehensiveSearch(keyWord string, startSize, pageSize int) (result []*SearchComprehensiveItem, total int64, err error) {
|
|
|
indexName := utils.IndexNameComprehensive
|
|
|
client := utils.Client
|
|
@@ -1159,7 +930,7 @@ func GetResourceDataEsList(list []*SearchComprehensiveItem, user *models.WxUserI
|
|
|
} else if v.Source == "industrialsourceHz" {
|
|
|
industrialResourceIdsHz = append(industrialResourceIdsHz, v.SourceId)
|
|
|
} else if v.Source == "industrialResourceIdsYx" {
|
|
|
- industrialResourceIdsHz = append(industrialResourceIdsYx, v.SourceId)
|
|
|
+ industrialResourceIdsYx = append(industrialResourceIdsYx, v.SourceId)
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -1352,7 +1123,7 @@ func GetResourceDataEsList(list []*SearchComprehensiveItem, user *models.WxUserI
|
|
|
industrialResourceIdstring = append(industrialResourceIdstring, strconv.Itoa(v))
|
|
|
}
|
|
|
industrialId := strings.Join(industrialResourceIdstring, ",")
|
|
|
- condition = ` AND m.industrial_management_id IN (` + industrialId + `) AND a.article_type = 0 `
|
|
|
+ condition = ` AND m.industrial_management_id IN (` + industrialId + `) AND a.article_type_id = 0 `
|
|
|
listIndustrialResourceIds, e := models.GetSearchResourceList(user.UserId, condition, 0, len(industrialResourceIdsHz))
|
|
|
if e != nil {
|
|
|
err = errors.New("GetSearchResourceList, Err: " + e.Error())
|
|
@@ -1386,7 +1157,7 @@ func GetResourceDataEsList(list []*SearchComprehensiveItem, user *models.WxUserI
|
|
|
industrialResourceIdstring = append(industrialResourceIdstring, strconv.Itoa(v))
|
|
|
}
|
|
|
industrialId := strings.Join(industrialResourceIdstring, ",")
|
|
|
- condition = ` AND m.industrial_management_id IN (` + industrialId + `) AND a.article_type > 0 `
|
|
|
+ condition = ` AND m.industrial_management_id IN (` + industrialId + `) AND a.article_type_id > 0 `
|
|
|
listIndustrialResourceIds, e := models.GetSearchResourceList(user.UserId, condition, 0, len(industrialResourceIdsYx))
|
|
|
if e != nil {
|
|
|
err = errors.New("GetSearchResourceList, Err: " + e.Error())
|