Browse Source

Merge branch 'master' of http://8.136.199.33:3000/hongze/hongze_cygx into crm/crm_16.5

zhangchuanxing 1 month ago
parent
commit
754a89ae6c

+ 446 - 412
controllers/report.go

@@ -2,7 +2,6 @@ package controllers
 
 import (
 	"encoding/json"
-	"errors"
 	"fmt"
 	"github.com/medivhzhan/weapp/v2"
 	"github.com/rdlucklib/rdluck_tools/paging"
@@ -2960,26 +2959,28 @@ func (this *ReportController) SearchReportAndResource() {
 	}
 	//匹配报告标题、
 	//condition = `AND ( a.title LIKE '%` + keyWord + `%' OR  a.body LIKE '%` + keyWord + `%' OR  a.annotation LIKE '%` + keyWord + `%' OR  a.abstract LIKE '%` + keyWord + `%') AND a.publish_status = 1 `
-	condition = `AND ( a.title LIKE '%` + keyWord + `%' OR  a.annotation LIKE '%` + keyWord + `%' OR  a.abstract LIKE '%` + keyWord + `%') AND a.publish_status = 1 `
+	condition = `AND ( a.title LIKE '%` + keyWord + `%'   OR  a.annotation LIKE '%` + keyWord + `%' OR  a.abstract LIKE '%` + keyWord + `%') AND a.publish_status = 1 `
 	sqlGroup = ` GROUP BY  a.article_id  ORDER BY a.publish_date DESC  `
-	if pageSize > 0 {
-		sqlGroup += ` LIMIT 5 `
-	} else {
-		sqlGroup += ` LIMIT 100 `
-	}
+	//if pageSize > 0 {
+	//	sqlGroup += ` LIMIT 5 `
+	//} else {
+	sqlGroup += ` LIMIT 100 `
+	//}
 	conditionSpecial = ` AND ( a.title LIKE  '%` + keyWord + `%' OR  a.content LIKE '%` + keyWord + `%' )`
-	ListYxReport, err := models.GetArticleAndYxSpecialList(` AND a.article_type_id IN (`+articleTypeIds+`) `+condition, conditionSpecial, user.UserId)
+	//ListYxReport, err := models.GetArticleAndYxSpecialList(` AND a.article_type_id IN (`+articleTypeIds+`) `+condition, conditionSpecial, user.UserId)
+	ListYxReport, err := models.GetArticleAndYxSpecialList(condition, conditionSpecial, user.UserId)
 	if err != nil {
 		br.Msg = "获取信息失败"
 		br.ErrMsg = "获取研选文章列表失败,Err:" + err.Error()
 		return
 	}
-	ListHzReport, err := models.GetReoprtSearchList(` AND a.article_type_id NOT IN (`+articleTypeIds+`) `+condition+sqlGroup, user.UserId)
-	if err != nil {
-		br.Msg = "获取信息失败"
-		br.ErrMsg = "获取弘则报告文章列表失败,Err:" + err.Error()
-		return
-	}
+
+	//ListHzReport, err := models.GetReoprtSearchList(` AND a.article_type_id NOT IN (`+articleTypeIds+`) `+condition+sqlGroup, user.UserId)
+	//if err != nil {
+	//	br.Msg = "获取信息失败"
+	//	br.ErrMsg = "获取弘则报告文章列表失败,Err:" + err.Error()
+	//	return
+	//}
 
 	keyWordArr, err := services.GetIndustryMapNameSliceV3(keyWord)
 	if err != nil {
@@ -2987,6 +2988,7 @@ func (this *ReportController) SearchReportAndResource() {
 		br.ErrMsg = "获取分词失败,GetIndustryMapNameSliceV3 Err: " + err.Error()
 		return
 	}
+
 	keyWordArr = services.RemoveDuplicatesAndEmpty(keyWordArr)
 	var keyWordIk string
 	if len(keyWordArr) > 1 {
@@ -3003,7 +3005,8 @@ func (this *ReportController) SearchReportAndResource() {
 		//conditionIk += ` AND ( a.title NOT LIKE '%` + keyWord + `%' AND  a.body NOT LIKE '%` + keyWord + `%' AND  a.annotation NOT LIKE '%` + keyWord + `%' AND  a.abstract NOT LIKE '%` + keyWord + `%') `
 		conditionIk += ` AND ( a.title NOT LIKE '%` + keyWord + `%'  AND  a.annotation NOT LIKE '%` + keyWord + `%' AND  a.abstract NOT LIKE '%` + keyWord + `%') `
 		//研选的联想词列表
-		ListYxReportIk, err := models.GetArticleCollectionList(` AND a.article_type_id IN (`+articleTypeIds+`) `+conditionIk+sqlGroupIk, user.UserId)
+		//ListYxReportIk, err := models.GetArticleCollectionList(` AND a.article_type_id IN (`+articleTypeIds+`) `+conditionIk+sqlGroupIk, user.UserId)
+		ListYxReportIk, err := models.GetArticleCollectionList(conditionIk+sqlGroupIk, user.UserId)
 		if err != nil && err.Error() != utils.ErrNoRow() {
 			br.Msg = "获取信息失败"
 			br.ErrMsg = "获取研选IK文章列表失败,Err:" + err.Error()
@@ -3014,29 +3017,29 @@ func (this *ReportController) SearchReportAndResource() {
 				ListYxReport = append(ListYxReport, v)
 			}
 		}
-		//弘则的联想词列表
-		ListHzReportIk, err := models.GetReoprtSearchList(`  AND a.article_type_id NOT IN (`+articleTypeIds+`) `+conditionIk+sqlGroupIk, user.UserId)
-		if err != nil && err.Error() != utils.ErrNoRow() {
-			br.Msg = "获取信息失败"
-			br.ErrMsg = "获取研选IK文章列表失败,Err:" + err.Error()
-			return
-		}
-		if len(ListHzReportIk) > 0 {
-			for _, v := range ListHzReportIk {
-				ListHzReport = append(ListHzReport, v)
-			}
-		}
+		////弘则的联想词列表
+		//ListHzReportIk, err := models.GetReoprtSearchList(`  AND a.article_type_id NOT IN (`+articleTypeIds+`) `+conditionIk+sqlGroupIk, user.UserId)
+		//if err != nil && err.Error() != utils.ErrNoRow() {
+		//	br.Msg = "获取信息失败"
+		//	br.ErrMsg = "获取研选IK文章列表失败,Err:" + err.Error()
+		//	return
+		//}
+		//if len(ListHzReportIk) > 0 {
+		//	for _, v := range ListHzReportIk {
+		//		ListHzReport = append(ListHzReport, v)
+		//	}
+		//}
 	}
 
 	var articleIdsArr []int
 	var articleIdsSpecialArr []int // 研选专栏ID
-	for k, v := range ListHzReport {
-		ListHzReport[k].Source = 1
-		//if v.MyCollectNum > 0 {
-		//	ListHzReport[k].IsCollect = true
-		//}
-		articleIdsArr = append(articleIdsArr, v.ArticleId)
-	}
+	//for k, v := range ListHzReport {
+	//	ListHzReport[k].Source = 1
+	//	//if v.MyCollectNum > 0 {
+	//	//	ListHzReport[k].IsCollect = true
+	//	//}
+	//	articleIdsArr = append(articleIdsArr, v.ArticleId)
+	//}
 	for k, v := range ListYxReport {
 		ListYxReport[k].Source = 2
 		//if v.MyCollectNum > 0 {
@@ -3050,9 +3053,9 @@ func (this *ReportController) SearchReportAndResource() {
 	}
 
 	var articleIds string
-	for _, v := range ListHzReport {
-		articleIds += strconv.Itoa(v.ArticleId) + ","
-	}
+	//for _, v := range ListHzReport {
+	//	articleIds += strconv.Itoa(v.ArticleId) + ","
+	//}
 
 	articleMapPv := services.GetArticleHistoryByArticleId(articleIdsArr)                       //文章Pv
 	articleCollectMap, _ := services.GetCygxArticleCollectMap(user.UserId)                     //用户收藏的文章
@@ -3085,6 +3088,24 @@ func (this *ReportController) SearchReportAndResource() {
 			v.SpecialTags += v.IndustryTags
 		}
 		v.SpecialTags = v.SpecialTags
+
+		if v.IsSpecial == 1 {
+			v.Resource = 2
+			v.ResourceObj = "articlespecial"
+		} else {
+			if v.ReportId > 0 {
+				v.Resource = 3
+				v.ReportId = v.ReportId
+				v.ResourceObj = "articleficc"
+			} else {
+				v.Resource = 1
+				if v.ArticleTypeId > 0 {
+					v.ResourceObj = "articleyx"
+				} else {
+					v.ResourceObj = "articlevmp"
+				}
+			}
+		}
 	}
 	articleIds = strings.TrimRight(articleIds, ",")
 	silcearticleIds := strings.Split(articleIds, ",")
@@ -3111,19 +3132,19 @@ func (this *ReportController) SearchReportAndResource() {
 			industrialMap[v.ArticleId] = append(industrialMap[v.ArticleId], item)
 		}
 	}
-	for k, v := range ListHzReport {
-		if len(industrialMap[v.ArticleId]) > 0 {
-			ListHzReport[k].List = industrialMap[v.ArticleId]
-		} else {
-			ListHzReport[k].List = make([]*models.IndustrialManagementResp, 0)
-		}
-		v.Pv = articleMapPv[v.ArticleId]
-		v.CollectNum = articleCollectNumMap[v.ArticleId]
-		v.IsCollect = articleCollectMap[v.ArticleId]
-		if v.ReportId > 0 {
-			v.Resource = 3
-		}
-	}
+	//for k, v := range ListHzReport {
+	//	if len(industrialMap[v.ArticleId]) > 0 {
+	//		ListHzReport[k].List = industrialMap[v.ArticleId]
+	//	} else {
+	//		ListHzReport[k].List = make([]*models.IndustrialManagementResp, 0)
+	//	}
+	//	v.Pv = articleMapPv[v.ArticleId]
+	//	v.CollectNum = articleCollectNumMap[v.ArticleId]
+	//	v.IsCollect = articleCollectMap[v.ArticleId]
+	//	if v.ReportId > 0 {
+	//		v.Resource = 3
+	//	}
+	//}
 	for k, v := range ListYxReport {
 		if len(industrialMap[v.ArticleId]) > 0 {
 			ListYxReport[k].List = industrialMap[v.ArticleId]
@@ -3136,9 +3157,9 @@ func (this *ReportController) SearchReportAndResource() {
 	if len(ListYxReport) == 0 {
 		ListYxReport = make([]*models.ArticleCollectionResp, 0)
 	}
-	if len(ListHzReport) == 0 {
-		ListHzReport = make([]*models.ArticleCollectionResp, 0)
-	}
+	//if len(ListHzReport) == 0 {
+	//	ListHzReport = make([]*models.ArticleCollectionResp, 0)
+	//}
 
 	fllowList, err := models.GetUserFllowIndustrialList(uid)
 	if err != nil {
@@ -3153,377 +3174,390 @@ func (this *ReportController) SearchReportAndResource() {
 		}
 	}
 
-	condition = `  AND a.publish_status = 1 AND a.article_type_id NOT IN (` + articleTypeIds + `)  AND (m.industry_name LIKE '%` + keyWord + `%' OR m.subject_names LIKE '%` + keyWord + `%'  )  `
+	//condition = `  AND a.publish_status = 1 AND a.article_type_id NOT IN (` + articleTypeIds + `)  AND (m.industry_name LIKE '%` + keyWord + `%' OR m.subject_names LIKE '%` + keyWord + `%'  )  `
+	condition = `  AND a.publish_status = 1   AND (m.industry_name LIKE '%` + keyWord + `%' OR m.subject_names LIKE '%` + keyWord + `%'  )  `
 
-	listHzResource, err := models.GetSearchResourceList(user.UserId, condition, 0, pageSize)
+	listHzResource, err := models.GetSearchResourceListcondition(condition, 0, pageSize)
 	if err != nil {
 		br.Msg = "获取信息失败"
 		br.ErrMsg = "获取品种信息失败,Err:" + err.Error()
 		return
 	}
 
-	condition = `  AND a.publish_status = 1 AND a.article_type_id IN (` + articleTypeIds + `)  AND (m.industry_name LIKE '%` + keyWord + `%' OR m.subject_names LIKE '%` + keyWord + `%'  )  `
-
-	hotMapindustrial, e := services.IndustrialManagementHotMapGropuPermission()
-	if e != nil {
-		br.Msg = "获取信息失败"
-		br.ErrMsg = "获取hot标签失败,IndustrialManagementHotMapGropuPermission ,Err:" + err.Error()
-		return
-	}
-	listYxResource, err := models.GetSearchResourceList(user.UserId, condition, 0, pageSize)
-	if err != nil {
-		br.Msg = "获取信息失败"
-		br.ErrMsg = "获取文章列表失败,Err:" + err.Error()
-		return
-	}
-	//合并产业关联的标的
-	listSubjcet, err := models.GetThemeHeatSubjectList("")
-	if err != nil {
-		br.Msg = "获取信息失败"
-		br.ErrMsg = "获取标的信息失败,Err:" + err.Error()
-		return
-	}
-	industrialIdArr := make([]int, 0)
-	nowTime := time.Now().Local()
-	threeMonBefore := nowTime.AddDate(0, -3, 0)
-	mapHot := make(map[int]bool)
-
-	//if themeType == 2 {
-	mapHot, err = services.GetYanXuanIndustrialManagementIdHotMap(articleTypeIds)
-	if err != nil {
-		br.Msg = "获取信息失败"
-		br.ErrMsg = "GetYanXuanIndustrialManagementIdNewMap,Err:" + err.Error()
-		return
-	}
-
-	//conditionOrder := ` ORDER BY sum_num DESC  `
-	//listHot, err := models.GetThemeHeatList(user.UserId, condition, conditionOrder, 0, 3)
-	//if err != nil {
-	//	br.Msg = "获取信息失败"
-	//	br.ErrMsg = "获取品种信息失败,Err:" + err.Error()
-	//	return
-	//}
-	for k, _ := range mapHot {
-		industrialIdArr = append(industrialIdArr, k)
-	}
-	orderSrt := "man.recommended_index DESC,update_time DESC"
-	for k, v := range listHzResource {
-		// 关联报告发布时间均在3个月内则标记New
-		if v.MinReportTime != "" {
-			t, e := time.Parse(utils.FormatDateTime, v.MinReportTime)
-			if e != nil {
-				err = errors.New("报告最早发布时间有误,GetindustryVideo " + e.Error())
-				return
-			}
-			if t.After(threeMonBefore) {
-				listHzResource[k].IsNew = true
-			}
-		}
-		//弘则资源包不展示hot标签
-		//if mapHot[v.IndustryName] > 0 {
-		//	listHzResource[k].IsHot = true
-		//}
-		listHzResource[k].Source = 1
-		if fllowMap[v.IndustrialManagementId] > 0 {
-			listHzResource[k].IsFollw = true
-		}
-		v.IsHot = hotMapindustrial[v.IndustrialManagementId]
-		industrialIdSlice := make([]int, 0)
-		articleIdArr := make([]int, 0)
-		industrialIdSlice = append(industrialIdSlice, v.IndustrialManagementId)
-		listUpdateTime, err := models.GetNewArticleDetailByIndustrialIds(industrialIdSlice)
-		if err != nil && err.Error() != utils.ErrNoRow() {
-			return
-		}
-		for _, v := range listUpdateTime {
-			articleIdArr = append(articleIdArr, v.ArticleId)
-		}
-
-		if err != nil {
-			return
-		}
-		mapHistroyArticleId := make(map[int]int)
-
-		if user.UserId > 0 {
-			listArticleHistory, e := models.GetUserToArticleHistory(user.UserId, articleIdArr)
-			if e != nil && e.Error() != utils.ErrNoRow() {
-				err = errors.New("获取产业关联的视频失败,GetindustryVideo " + e.Error())
-				return
-			}
-			for _, v := range listArticleHistory {
-				mapHistroyArticleId[v.ArticleId] = v.ArticleId
-			}
-		}
-		condition2 := ` AND man.industry_name LIKE '%` + keyWord + `%' `
-		list, err := models.GetIndustrialManagementAll(uid, condition2, orderSrt, 0, 20)
+	if len(listHzResource) > 0 {
+		listHzResource, err = services.HandleIndustryListHzAndYx(listHzResource, user, "Hz")
 		if err != nil {
 			br.Msg = "获取信息失败"
-			br.ErrMsg = "获取品种信息失败,Err:" + err.Error()
-			return
-		}
-
-		mapUPdateTime := make(map[int]string)
-		//获取这些产业下最新更新的文章
-
-		//时间线的更新时间
-		//	maptimelineUPdateTime := make(map[int]string)
-		listtimelinePublishdate, err := models.GetTimeLineReportIndustrialPublishdateList(industrialIdArr)
-		if err != nil && err.Error() != utils.ErrNoRow() {
-			br.Msg = "获取信息失败"
-			br.ErrMsg = "GetTimeLineReportIndustrialPublishdateList,Err:" + err.Error()
-			return
-		}
-		for _, v := range listtimelinePublishdate {
-			if mapUPdateTime[v.IndustrialManagementId] != "" {
-				if utils.StrTimeToTime(v.PublishDate).After(utils.StrTimeToTime(mapUPdateTime[v.IndustrialManagementId])) {
-					mapUPdateTime[v.IndustrialManagementId] = v.PublishDate
-				}
-			}
-		}
-
-		//mapHistroyArticleId := make(map[int]int)
-
-		//if userId > 0 {
-		//	listArticleHistory, e := models.GetUserToArticleHistory(userId, articleIdArr)
-		//	if e != nil && e.Error() != utils.ErrNoRow() {
-		//		err = errors.New("获取产业关联的视频失败,GetindustryVideo " + e.Error())
-		//		return
-		//	}
-		//	for _, v := range listArticleHistory {
-		//		mapHistroyArticleId[v.ArticleId] = v.ArticleId
-		//	}
-		//}
-		var industrialIds string
-		for _, id := range industrialIdArr {
-			industrialIds += strconv.Itoa(id) + ","
-		}
-		industrialIds = strings.TrimRight(industrialIds, ",")
-		articleList, err := models.GetReportIndustrialReadNumList(user.UserId, industrialIds, user.CreatedTime)
-		if err != nil && err.Error() != utils.ErrNoRow() {
-			br.Msg = "获取信息失败"
-			br.ErrMsg = "GetReportIndustrialReadNumList,Err:" + err.Error()
-			return
-		}
-		mapHistroyindustrialId := make(map[int]int)
-		for _, v := range articleList {
-			mapHistroyindustrialId[v.IndustrialManagementId] = v.Readnum
-		}
-		//nowTime := time.Now().Local()
-		//threeMonBefore := nowTime.AddDate(0, -3, 0)
-
-		//查询用户今天是否看过时间线
-		//haveMorningMeeting := false
-		//var morningMeetingTime string
-		recrodList, err := models.GetTimeLineRecordAllCount(user.UserId, time.Now().Format(utils.FormatDate))
-		if err != nil {
-			br.Msg = "获取信息失败"
-			br.ErrMsg = "GetTimeLineRecordAllCount,Err:" + err.Error()
-			return
-		}
-		var industrialManagementIdstr string
-		industrialIdMap := make(map[string]time.Time)
-		for _, v := range recrodList {
-			industrialManagementIdstr = strings.TrimLeft(v.Parameter, "PageSize=10&CurrentIndex=1&CategoryId=99999&IndustrialManagementId=")
-			if createTime, ok := industrialIdMap[industrialManagementIdstr]; ok {
-				if createTime.Before(v.CreateTime) {
-					industrialIdMap[industrialManagementIdstr] = v.CreateTime
-				}
-			} else {
-				industrialIdMap[industrialManagementIdstr] = v.CreateTime
-			}
-		}
-
-		mmList, err := models.GetCygxMorningMeetingReviewsListByIndustrialIds(industrialIds)
-		if err != nil {
+			br.ErrMsg = "获取信息失败,Err:" + err.Error()
 			return
 		}
-		morningMeetingTimeMap := make(map[int]time.Time)
-		for _, v := range mmList {
-			morningMeetingTimeMap[v.IndustryId] = v.CreateTime
-		}
-		timeLineRedMap := make(map[int]bool, 0)
-
-		for _, industrialId := range industrialIdArr {
-			if createTime, ok := industrialIdMap[strconv.Itoa(industrialId)]; ok {
-				if createTime.Before(morningMeetingTimeMap[industrialId]) {
-					timeLineRedMap[industrialId] = true
-				}
-			}
-		}
-
-		for k, v := range list {
-			list[k].UpdateTime = utils.TimeRemoveHms(mapUPdateTime[v.IndustrialManagementId])
-			if user.UserId > 0 {
-				//如果文章没有阅读,而且,文章的发布时间晚于项目的上线时间,而且文章的发布时间晚于用户的注册时间,就进行标红处理
-				if mapHistroyindustrialId[v.IndustrialManagementId] == 0 || timeLineRedMap[v.IndustrialManagementId] {
-					if user.CreatedTime.Before(utils.StrTimeToTime(mapUPdateTime[v.IndustrialManagementId])) && utils.StrTimeToTime(utils.OnlineTime).Before(utils.StrTimeToTime(mapUPdateTime[v.IndustrialManagementId])) {
-						list[k].IsRed = true
-					}
-				}
-			} else {
-				if utils.StrTimeToTime(utils.OnlineTime).Before(utils.StrTimeToTime(mapUPdateTime[v.IndustrialManagementId])) {
-					list[k].IsRed = true
-				}
-				list[k].IsFollow = 0
-			}
-
-			list[k].UpdateTime = utils.TimeRemoveHms(mapUPdateTime[v.IndustrialManagementId])
-			if user.UserId > 0 {
-				//如果文章没有阅读,而且,文章的发布时间晚于项目的上线时间,而且文章的发布时间晚于用户的注册时间,就进行标红处理
-				if mapHistroyindustrialId[v.IndustrialManagementId] == 0 || timeLineRedMap[v.IndustrialManagementId] {
-					if user.CreatedTime.Before(utils.StrTimeToTime(mapUPdateTime[v.IndustrialManagementId])) && utils.StrTimeToTime(utils.OnlineTime).Before(utils.StrTimeToTime(mapUPdateTime[v.IndustrialManagementId])) {
-						list[k].IsRed = true
-					}
-				}
-			} else {
-				if utils.StrTimeToTime(utils.OnlineTime).Before(utils.StrTimeToTime(mapUPdateTime[v.IndustrialManagementId])) {
-					list[k].IsRed = true
-				}
-				list[k].IsFollow = 0
-			}
-		}
-
-		industrialIdArr = append(industrialIdArr, v.IndustrialManagementId)
-	}
-
-	for k, v := range listYxResource {
-		// 关联报告发布时间均在3个月内则标记New
-		if v.MinReportTime != "" {
-			t, e := time.Parse(utils.FormatDateTime, v.MinReportTime)
-			if e != nil {
-				err = errors.New("报告最早发布时间有误,GetindustryVideo " + e.Error())
-				return
-			}
-			if t.After(threeMonBefore) {
-				listYxResource[k].IsNew = true
-			}
-		}
-		listYxResource[k].IsHot = mapHot[v.IndustrialManagementId]
-		listYxResource[k].Source = 2
-		if fllowMap[v.IndustrialManagementId] > 0 {
-			listYxResource[k].IsFollw = true
-		}
-		v.IsHot = hotMapindustrial[v.IndustrialManagementId]
-		industrialIdArr = append(industrialIdArr, v.IndustrialManagementId)
+	} else {
+		listHzResource = make([]*models.IndustrialManagement, 0)
 	}
 
-	if len(industrialIdArr) > 0 {
-		//查询产业视频
-		industrialVideoMap := make(map[int]*models.MicroVideoSimpleInfo)
-		// 获取默认图配置
-		_, videoMap, _, _, e := services.GetMicroRoadShowDefaultImgConfig()
-		if e != nil {
-			br.Msg = "获取视频默认配置图失败"
-			br.ErrMsg = "获取视频默认配置图失败, Err: " + e.Error()
-			return
-		}
-		videoList, err := models.GetMicroRoadshowVideoByIndustryIds(industrialIdArr)
-		if err != nil {
-			br.Msg = "产业视频列表失败"
-			br.ErrMsg = "产业视频列表失败, Err: " + err.Error()
-			return
-		}
-		for _, v := range videoList {
-			tmp := &models.MicroVideoSimpleInfo{
-				Id:                  v.VideoId,
-				Title:               "5min逻辑【" + v.IndustryName + "】解析",
-				ResourceUrl:         v.VideoUrl,
-				BackgroundImg:       v.ImgUrl,
-				PlaySeconds:         v.VideoDuration,
-				DetailImgUrl:        v.DetailImgUrl,
-				ChartPermissionName: v.ChartPermissionName,
-				ChartPermissionId:   v.ChartPermissionId,
-			}
-			if tmp.BackgroundImg == "" {
-				tmp.BackgroundImg = videoMap[v.ChartPermissionId]
-			}
-			industrialVideoMap[v.IndustryId] = tmp
-		}
-
-		//查询权限
-		// 用户权限
-		authInfo, permissionArr, e := services.GetUserRaiPermissionInfo(user.UserId, user.CompanyId)
-		if e != nil {
-			br.Msg = "获取失败"
-			br.ErrMsg = "获取用户权限失败, Err: " + e.Error()
-			return
-		}
-
-		for k, v := range listHzResource {
-			//展示产业视频
-			if video, ok := industrialVideoMap[v.IndustrialManagementId]; ok {
-				au := new(models.UserPermissionAuthInfo)
-				au.SellerName = authInfo.SellerName
-				au.SellerMobile = authInfo.SellerMobile
-				au.HasPermission = authInfo.HasPermission
-				au.OperationMode = authInfo.OperationMode
-				if au.HasPermission == 1 {
-					// 非宏观权限进一步判断是否有权限
-					if video.ChartPermissionId != utils.HONG_GUAN_ID && !utils.InArrayByStr(permissionArr, video.ChartPermissionName) {
-						au.HasPermission = 2
-					}
-				}
-				// 无权限的弹框提示
-				if au.HasPermission != 1 {
-					if au.OperationMode == services.UserPermissionOperationModeCall {
-						au.PopupMsg = services.UserPermissionPopupMsgCallMicroVideo
-					} else {
-						au.PopupMsg = services.UserPermissionPopupMsgApplyMicroVideo
-					}
-					video.ResourceUrl = ""
-				}
-				listHzResource[k].AuthInfo = au
-				listHzResource[k].IndustryVideo = video
-			}
-		}
-
-		//合并产业关联的标的
-		listSubjcet, err = models.GetIndustrialSubjectAllByIndustrialId(industrialIdArr)
-		if err != nil {
-			br.Msg = "获取信息失败"
-			br.ErrMsg = "获取标的信息失败,Err:" + err.Error()
-			return
-		}
-		//严选的产业只关联研选下面的标的
-		var yxcondition string
-		var yxPer []interface{}
-		yxcondition = ` AND ag.article_id >= ?`
-		yxPer = append(yxPer, utils.SummaryArticleId)
-		listYxAticleSubject, err := models.GetSubjectArticleGroupManagementList(yxcondition, yxPer)
-		if err != nil && err.Error() != utils.ErrNoRow() {
-			br.Msg = "获取信息失败"
-			br.ErrMsg = "获取研选报告关联的标的信息失败,GetSubjectArticleGroupManagementListErr:" + err.Error()
-			return
-		}
-		mapYxSubject := make(map[int]int)
-		for _, v := range listYxAticleSubject {
-			mapYxSubject[v.IndustrialSubjectId] = v.IndustrialSubjectId
-		}
-
-		mapIndustrial := make(map[string]int)
-		for _, v := range listSubjcet {
-			for k2, v2 := range listYxResource {
-				if v2.IndustrialManagementId == v.IndustrialManagementId && mapIndustrial[fmt.Sprint(v2.IndustrialManagementId, "Yx", v.SubjectName)] == 0 && mapYxSubject[v.IndustrialSubjectId] > 0 {
-					listYxResource[k2].IndustrialSubjectList = append(listYxResource[k2].IndustrialSubjectList, v)
-					mapIndustrial[fmt.Sprint(v2.IndustrialManagementId, "Yx", v.SubjectName)] = v2.IndustrialManagementId
-				}
-			}
-			for k2, v2 := range listHzResource {
-				if v2.IndustrialManagementId == v.IndustrialManagementId && mapIndustrial[fmt.Sprint(v2.IndustrialManagementId, "Hz", v.SubjectName)] == 0 {
-					listHzResource[k2].IndustrialSubjectList = append(listHzResource[k2].IndustrialSubjectList, v)
-					mapIndustrial[fmt.Sprint(v2.IndustrialManagementId, "Hz", v.SubjectName)] = v2.IndustrialManagementId
-				}
-			}
-		}
-	}
+	//condition = `  AND a.publish_status = 1 AND a.article_type_id IN (` + articleTypeIds + `)  AND (m.industry_name LIKE '%` + keyWord + `%' OR m.subject_names LIKE '%` + keyWord + `%'  )  `
+	//
+	//hotMapindustrial, e := services.IndustrialManagementHotMapGropuPermission()
+	//if e != nil {
+	//	br.Msg = "获取信息失败"
+	//	br.ErrMsg = "获取hot标签失败,IndustrialManagementHotMapGropuPermission ,Err:" + err.Error()
+	//	return
+	//}
+	//listYxResource, err := models.GetSearchResourceList(user.UserId, condition, 0, pageSize)
+	//if err != nil {
+	//	br.Msg = "获取信息失败"
+	//	br.ErrMsg = "获取文章列表失败,Err:" + err.Error()
+	//	return
+	//}
+	////合并产业关联的标的
+	//listSubjcet, err := models.GetThemeHeatSubjectList("")
+	//if err != nil {
+	//	br.Msg = "获取信息失败"
+	//	br.ErrMsg = "获取标的信息失败,Err:" + err.Error()
+	//	return
+	//}
+	//industrialIdArr := make([]int, 0)
+	//nowTime := time.Now().Local()
+	//threeMonBefore := nowTime.AddDate(0, -3, 0)
+	//mapHot := make(map[int]bool)
+	//
+	////if themeType == 2 {
+	//mapHot, err = services.GetYanXuanIndustrialManagementIdHotMap(articleTypeIds)
+	//if err != nil {
+	//	br.Msg = "获取信息失败"
+	//	br.ErrMsg = "GetYanXuanIndustrialManagementIdNewMap,Err:" + err.Error()
+	//	return
+	//}
+	//
+	////conditionOrder := ` ORDER BY sum_num DESC  `
+	////listHot, err := models.GetThemeHeatList(user.UserId, condition, conditionOrder, 0, 3)
+	////if err != nil {
+	////	br.Msg = "获取信息失败"
+	////	br.ErrMsg = "获取品种信息失败,Err:" + err.Error()
+	////	return
+	////}
+	//for k, _ := range mapHot {
+	//	industrialIdArr = append(industrialIdArr, k)
+	//}
+	//orderSrt := "man.recommended_index DESC,update_time DESC"
+	//for k, v := range listHzResource {
+	//	// 关联报告发布时间均在3个月内则标记New
+	//	if v.MinReportTime != "" {
+	//		t, e := time.Parse(utils.FormatDateTime, v.MinReportTime)
+	//		if e != nil {
+	//			err = errors.New("报告最早发布时间有误,GetindustryVideo " + e.Error())
+	//			return
+	//		}
+	//		if t.After(threeMonBefore) {
+	//			listHzResource[k].IsNew = true
+	//		}
+	//	}
+	//	//弘则资源包不展示hot标签
+	//	//if mapHot[v.IndustryName] > 0 {
+	//	//	listHzResource[k].IsHot = true
+	//	//}
+	//	listHzResource[k].Source = 1
+	//	if fllowMap[v.IndustrialManagementId] > 0 {
+	//		listHzResource[k].IsFollw = true
+	//	}
+	//	v.IsHot = hotMapindustrial[v.IndustrialManagementId]
+	//	industrialIdSlice := make([]int, 0)
+	//	articleIdArr := make([]int, 0)
+	//	industrialIdSlice = append(industrialIdSlice, v.IndustrialManagementId)
+	//	listUpdateTime, err := models.GetNewArticleDetailByIndustrialIds(industrialIdSlice)
+	//	if err != nil && err.Error() != utils.ErrNoRow() {
+	//		return
+	//	}
+	//	for _, v := range listUpdateTime {
+	//		articleIdArr = append(articleIdArr, v.ArticleId)
+	//	}
+	//
+	//	if err != nil {
+	//		return
+	//	}
+	//	mapHistroyArticleId := make(map[int]int)
+	//
+	//	if user.UserId > 0 {
+	//		listArticleHistory, e := models.GetUserToArticleHistory(user.UserId, articleIdArr)
+	//		if e != nil && e.Error() != utils.ErrNoRow() {
+	//			err = errors.New("获取产业关联的视频失败,GetindustryVideo " + e.Error())
+	//			return
+	//		}
+	//		for _, v := range listArticleHistory {
+	//			mapHistroyArticleId[v.ArticleId] = v.ArticleId
+	//		}
+	//	}
+	//	condition2 := ` AND man.industry_name LIKE '%` + keyWord + `%' `
+	//	list, err := models.GetIndustrialManagementAll(uid, condition2, orderSrt, 0, 20)
+	//	if err != nil {
+	//		br.Msg = "获取信息失败"
+	//		br.ErrMsg = "获取品种信息失败,Err:" + err.Error()
+	//		return
+	//	}
+	//
+	//	mapUPdateTime := make(map[int]string)
+	//	//获取这些产业下最新更新的文章
+	//
+	//	//时间线的更新时间
+	//	//	maptimelineUPdateTime := make(map[int]string)
+	//	listtimelinePublishdate, err := models.GetTimeLineReportIndustrialPublishdateList(industrialIdArr)
+	//	if err != nil && err.Error() != utils.ErrNoRow() {
+	//		br.Msg = "获取信息失败"
+	//		br.ErrMsg = "GetTimeLineReportIndustrialPublishdateList,Err:" + err.Error()
+	//		return
+	//	}
+	//	for _, v := range listtimelinePublishdate {
+	//		if mapUPdateTime[v.IndustrialManagementId] != "" {
+	//			if utils.StrTimeToTime(v.PublishDate).After(utils.StrTimeToTime(mapUPdateTime[v.IndustrialManagementId])) {
+	//				mapUPdateTime[v.IndustrialManagementId] = v.PublishDate
+	//			}
+	//		}
+	//	}
+	//
+	//	//mapHistroyArticleId := make(map[int]int)
+	//
+	//	//if userId > 0 {
+	//	//	listArticleHistory, e := models.GetUserToArticleHistory(userId, articleIdArr)
+	//	//	if e != nil && e.Error() != utils.ErrNoRow() {
+	//	//		err = errors.New("获取产业关联的视频失败,GetindustryVideo " + e.Error())
+	//	//		return
+	//	//	}
+	//	//	for _, v := range listArticleHistory {
+	//	//		mapHistroyArticleId[v.ArticleId] = v.ArticleId
+	//	//	}
+	//	//}
+	//	var industrialIds string
+	//	for _, id := range industrialIdArr {
+	//		industrialIds += strconv.Itoa(id) + ","
+	//	}
+	//	industrialIds = strings.TrimRight(industrialIds, ",")
+	//	articleList, err := models.GetReportIndustrialReadNumList(user.UserId, industrialIds, user.CreatedTime)
+	//	if err != nil && err.Error() != utils.ErrNoRow() {
+	//		br.Msg = "获取信息失败"
+	//		br.ErrMsg = "GetReportIndustrialReadNumList,Err:" + err.Error()
+	//		return
+	//	}
+	//	mapHistroyindustrialId := make(map[int]int)
+	//	for _, v := range articleList {
+	//		mapHistroyindustrialId[v.IndustrialManagementId] = v.Readnum
+	//	}
+	//	//nowTime := time.Now().Local()
+	//	//threeMonBefore := nowTime.AddDate(0, -3, 0)
+	//
+	//	//查询用户今天是否看过时间线
+	//	//haveMorningMeeting := false
+	//	//var morningMeetingTime string
+	//	recrodList, err := models.GetTimeLineRecordAllCount(user.UserId, time.Now().Format(utils.FormatDate))
+	//	if err != nil {
+	//		br.Msg = "获取信息失败"
+	//		br.ErrMsg = "GetTimeLineRecordAllCount,Err:" + err.Error()
+	//		return
+	//	}
+	//	var industrialManagementIdstr string
+	//	industrialIdMap := make(map[string]time.Time)
+	//	for _, v := range recrodList {
+	//		industrialManagementIdstr = strings.TrimLeft(v.Parameter, "PageSize=10&CurrentIndex=1&CategoryId=99999&IndustrialManagementId=")
+	//		if createTime, ok := industrialIdMap[industrialManagementIdstr]; ok {
+	//			if createTime.Before(v.CreateTime) {
+	//				industrialIdMap[industrialManagementIdstr] = v.CreateTime
+	//			}
+	//		} else {
+	//			industrialIdMap[industrialManagementIdstr] = v.CreateTime
+	//		}
+	//	}
+	//
+	//	mmList, err := models.GetCygxMorningMeetingReviewsListByIndustrialIds(industrialIds)
+	//	if err != nil {
+	//		return
+	//	}
+	//	morningMeetingTimeMap := make(map[int]time.Time)
+	//	for _, v := range mmList {
+	//		morningMeetingTimeMap[v.IndustryId] = v.CreateTime
+	//	}
+	//	timeLineRedMap := make(map[int]bool, 0)
+	//
+	//	for _, industrialId := range industrialIdArr {
+	//		if createTime, ok := industrialIdMap[strconv.Itoa(industrialId)]; ok {
+	//			if createTime.Before(morningMeetingTimeMap[industrialId]) {
+	//				timeLineRedMap[industrialId] = true
+	//			}
+	//		}
+	//	}
+	//
+	//	for k, v := range list {
+	//		list[k].UpdateTime = utils.TimeRemoveHms(mapUPdateTime[v.IndustrialManagementId])
+	//		if user.UserId > 0 {
+	//			//如果文章没有阅读,而且,文章的发布时间晚于项目的上线时间,而且文章的发布时间晚于用户的注册时间,就进行标红处理
+	//			if mapHistroyindustrialId[v.IndustrialManagementId] == 0 || timeLineRedMap[v.IndustrialManagementId] {
+	//				if user.CreatedTime.Before(utils.StrTimeToTime(mapUPdateTime[v.IndustrialManagementId])) && utils.StrTimeToTime(utils.OnlineTime).Before(utils.StrTimeToTime(mapUPdateTime[v.IndustrialManagementId])) {
+	//					list[k].IsRed = true
+	//				}
+	//			}
+	//		} else {
+	//			if utils.StrTimeToTime(utils.OnlineTime).Before(utils.StrTimeToTime(mapUPdateTime[v.IndustrialManagementId])) {
+	//				list[k].IsRed = true
+	//			}
+	//			list[k].IsFollow = 0
+	//		}
+	//
+	//		list[k].UpdateTime = utils.TimeRemoveHms(mapUPdateTime[v.IndustrialManagementId])
+	//		if user.UserId > 0 {
+	//			//如果文章没有阅读,而且,文章的发布时间晚于项目的上线时间,而且文章的发布时间晚于用户的注册时间,就进行标红处理
+	//			if mapHistroyindustrialId[v.IndustrialManagementId] == 0 || timeLineRedMap[v.IndustrialManagementId] {
+	//				if user.CreatedTime.Before(utils.StrTimeToTime(mapUPdateTime[v.IndustrialManagementId])) && utils.StrTimeToTime(utils.OnlineTime).Before(utils.StrTimeToTime(mapUPdateTime[v.IndustrialManagementId])) {
+	//					list[k].IsRed = true
+	//				}
+	//			}
+	//		} else {
+	//			if utils.StrTimeToTime(utils.OnlineTime).Before(utils.StrTimeToTime(mapUPdateTime[v.IndustrialManagementId])) {
+	//				list[k].IsRed = true
+	//			}
+	//			list[k].IsFollow = 0
+	//		}
+	//	}
+	//
+	//	industrialIdArr = append(industrialIdArr, v.IndustrialManagementId)
+	//}
+	//
+	//for k, v := range listYxResource {
+	//	// 关联报告发布时间均在3个月内则标记New
+	//	if v.MinReportTime != "" {
+	//		t, e := time.Parse(utils.FormatDateTime, v.MinReportTime)
+	//		if e != nil {
+	//			err = errors.New("报告最早发布时间有误,GetindustryVideo " + e.Error())
+	//			return
+	//		}
+	//		if t.After(threeMonBefore) {
+	//			listYxResource[k].IsNew = true
+	//		}
+	//	}
+	//	listYxResource[k].IsHot = mapHot[v.IndustrialManagementId]
+	//	listYxResource[k].Source = 2
+	//	if fllowMap[v.IndustrialManagementId] > 0 {
+	//		listYxResource[k].IsFollw = true
+	//	}
+	//	v.IsHot = hotMapindustrial[v.IndustrialManagementId]
+	//	industrialIdArr = append(industrialIdArr, v.IndustrialManagementId)
+	//}
+	//
+	//if len(industrialIdArr) > 0 {
+	//	//查询产业视频
+	//	industrialVideoMap := make(map[int]*models.MicroVideoSimpleInfo)
+	//	// 获取默认图配置
+	//	_, videoMap, _, _, e := services.GetMicroRoadShowDefaultImgConfig()
+	//	if e != nil {
+	//		br.Msg = "获取视频默认配置图失败"
+	//		br.ErrMsg = "获取视频默认配置图失败, Err: " + e.Error()
+	//		return
+	//	}
+	//	videoList, err := models.GetMicroRoadshowVideoByIndustryIds(industrialIdArr)
+	//	if err != nil {
+	//		br.Msg = "产业视频列表失败"
+	//		br.ErrMsg = "产业视频列表失败, Err: " + err.Error()
+	//		return
+	//	}
+	//	for _, v := range videoList {
+	//		tmp := &models.MicroVideoSimpleInfo{
+	//			Id:                  v.VideoId,
+	//			Title:               "5min逻辑【" + v.IndustryName + "】解析",
+	//			ResourceUrl:         v.VideoUrl,
+	//			BackgroundImg:       v.ImgUrl,
+	//			PlaySeconds:         v.VideoDuration,
+	//			DetailImgUrl:        v.DetailImgUrl,
+	//			ChartPermissionName: v.ChartPermissionName,
+	//			ChartPermissionId:   v.ChartPermissionId,
+	//		}
+	//		if tmp.BackgroundImg == "" {
+	//			tmp.BackgroundImg = videoMap[v.ChartPermissionId]
+	//		}
+	//		industrialVideoMap[v.IndustryId] = tmp
+	//	}
+	//
+	//	//查询权限
+	//	// 用户权限
+	//	authInfo, permissionArr, e := services.GetUserRaiPermissionInfo(user.UserId, user.CompanyId)
+	//	if e != nil {
+	//		br.Msg = "获取失败"
+	//		br.ErrMsg = "获取用户权限失败, Err: " + e.Error()
+	//		return
+	//	}
+	//
+	//	for k, v := range listHzResource {
+	//		//展示产业视频
+	//		if video, ok := industrialVideoMap[v.IndustrialManagementId]; ok {
+	//			au := new(models.UserPermissionAuthInfo)
+	//			au.SellerName = authInfo.SellerName
+	//			au.SellerMobile = authInfo.SellerMobile
+	//			au.HasPermission = authInfo.HasPermission
+	//			au.OperationMode = authInfo.OperationMode
+	//			if au.HasPermission == 1 {
+	//				// 非宏观权限进一步判断是否有权限
+	//				if video.ChartPermissionId != utils.HONG_GUAN_ID && !utils.InArrayByStr(permissionArr, video.ChartPermissionName) {
+	//					au.HasPermission = 2
+	//				}
+	//			}
+	//			// 无权限的弹框提示
+	//			if au.HasPermission != 1 {
+	//				if au.OperationMode == services.UserPermissionOperationModeCall {
+	//					au.PopupMsg = services.UserPermissionPopupMsgCallMicroVideo
+	//				} else {
+	//					au.PopupMsg = services.UserPermissionPopupMsgApplyMicroVideo
+	//				}
+	//				video.ResourceUrl = ""
+	//			}
+	//			listHzResource[k].AuthInfo = au
+	//			listHzResource[k].IndustryVideo = video
+	//		}
+	//	}
+	//
+	//	//合并产业关联的标的
+	//	listSubjcet, err = models.GetIndustrialSubjectAllByIndustrialId(industrialIdArr)
+	//	if err != nil {
+	//		br.Msg = "获取信息失败"
+	//		br.ErrMsg = "获取标的信息失败,Err:" + err.Error()
+	//		return
+	//	}
+	//	//严选的产业只关联研选下面的标的
+	//	var yxcondition string
+	//	var yxPer []interface{}
+	//	yxcondition = ` AND ag.article_id >= ?`
+	//	yxPer = append(yxPer, utils.SummaryArticleId)
+	//	listYxAticleSubject, err := models.GetSubjectArticleGroupManagementList(yxcondition, yxPer)
+	//	if err != nil && err.Error() != utils.ErrNoRow() {
+	//		br.Msg = "获取信息失败"
+	//		br.ErrMsg = "获取研选报告关联的标的信息失败,GetSubjectArticleGroupManagementListErr:" + err.Error()
+	//		return
+	//	}
+	//	mapYxSubject := make(map[int]int)
+	//	for _, v := range listYxAticleSubject {
+	//		mapYxSubject[v.IndustrialSubjectId] = v.IndustrialSubjectId
+	//	}
+	//
+	//	mapIndustrial := make(map[string]int)
+	//	for _, v := range listSubjcet {
+	//		for k2, v2 := range listYxResource {
+	//			if v2.IndustrialManagementId == v.IndustrialManagementId && mapIndustrial[fmt.Sprint(v2.IndustrialManagementId, "Yx", v.SubjectName)] == 0 && mapYxSubject[v.IndustrialSubjectId] > 0 {
+	//				listYxResource[k2].IndustrialSubjectList = append(listYxResource[k2].IndustrialSubjectList, v)
+	//				mapIndustrial[fmt.Sprint(v2.IndustrialManagementId, "Yx", v.SubjectName)] = v2.IndustrialManagementId
+	//			}
+	//		}
+	//		for k2, v2 := range listHzResource {
+	//			if v2.IndustrialManagementId == v.IndustrialManagementId && mapIndustrial[fmt.Sprint(v2.IndustrialManagementId, "Hz", v.SubjectName)] == 0 {
+	//				listHzResource[k2].IndustrialSubjectList = append(listHzResource[k2].IndustrialSubjectList, v)
+	//				mapIndustrial[fmt.Sprint(v2.IndustrialManagementId, "Hz", v.SubjectName)] = v2.IndustrialManagementId
+	//			}
+	//		}
+	//	}
+	//}
 
 	resp := new(models.SearchReportAndResourceResp)
-	if len(listYxResource) == 0 {
-		listYxResource = make([]*models.IndustrialManagementHotResp, 0)
-	}
-	if len(listHzResource) == 0 {
-		listHzResource = make([]*models.IndustrialManagementHotResp, 0)
-	}
+	//if len(listYxResource) == 0 {
+	//	listYxResource = make([]*models.IndustrialManagementHotResp, 0)
+	//}
+	//if len(listHzResource) == 0 {
+	//	listHzResource =
+	//	listHzResource = make([]*models.IndustrialManagement,0)
+	//}
 
 	if keyWord != "" {
 		keyWordItem := new(models.CygxUserSearchKeyWord)
@@ -3536,9 +3570,9 @@ func (this *ReportController) SearchReportAndResource() {
 	}
 
 	resp.ListHzResource = listHzResource
-	resp.ListYxResource = listYxResource
-	resp.ListYxReport = ListYxReport
-	resp.ListHzReport = ListHzReport
+	resp.ListYxResource = make([]*models.IndustrialManagementHotResp, 0)
+	resp.ListYxReport = make([]*models.ArticleCollectionResp, 0)
+	resp.ListHzReport = ListYxReport
 	br.Ret = 200
 	br.Success = true
 	br.Msg = "获取成功"

+ 8 - 0
models/activity.go

@@ -1414,3 +1414,11 @@ func UpdateCygxActivityyidongActivityId(yidongActivityId, activityTime, yidongTi
 	_, err = o.Raw(sql, yidongActivityId, activityTime, yidongTitle).Exec()
 	return
 }
+
+// 获取所有未开始、进行中的活动ID
+func GetActivityIdListNoEnd() (items []*CygxActivity, err error) {
+	o := orm.NewOrm()
+	sql := `SELECT activity_id  FROM cygx_activity WHERE  active_state IN (1,2) `
+	_, err = o.Raw(sql).QueryRows(&items)
+	return
+}

+ 68 - 47
models/article.go

@@ -8,53 +8,54 @@ import (
 )
 
 type CygxArticle struct {
-	Id                  int       `orm:"column(id);pk"`
-	ArticleId           int       `description:"文章id"`
-	Title               string    `description:"标题"`
-	TitleEn             string    `description:"英文标题 "`
-	UpdateFrequency     string    `description:"更新周期"`
-	CreateDate          string    `description:"创建时间"`
-	PublishDate         string    `description:"发布时间"`
-	Body                string    `description:"内容"`
-	BodyText            string    `description:"内容"`
-	Abstract            string    `description:"摘要"`
-	CategoryName        string    `description:"一级分类"`
-	SubCategoryName     string    `description:"二级分类"`
-	PublishStatus       int       `description:"发布状态"`
-	CategoryId          int       `description:"分类id"`
-	CategoryIdTwo       int       `description:"分类id用作修改匹配类型使用"`
-	ExpertBackground    string    `description:"专家背景"`
-	ExpertNumber        string    `description:"专家编号"`
-	InterviewDate       string    `description:"访谈日期"`
-	Department          string    `description:"作者"`
-	ArticleIdMd5        string    `description:"ID,md5值"`
-	IsClass             int       `description:"是否归类,1是,0否"`
-	IsSummary           int       `description:"是否是纪要库,1是,0否"`
-	IsReport            int       `description:"是否属于报告,1是,0否"`
-	ReportType          int       `description:"报告类型,1行业报告,2产业报告,0无"`
-	FileLink            string    `description:"下载预览链接"`
-	MatchTypeName       string    `description:"匹配类型"`
-	Periods             string    `description:"期数"`
-	ReportLink          string    `description:"报告链接"`
-	ArticleType         string    `description:"文章类型 文章类型,lyjh:路演精华 "`
-	HavePublish         int       `description:"是否发布过,1是 ,0 否"`
-	Source              int       `description:"来源 0策略平台同步,1小程序后台添加"`
-	SellerAndMobile     string    `description:"销售和手机号"`
-	VideoUrl            string    `description:"音频文件URL"`
-	VideoName           string    `description:"音频文件名称"`
-	VideoPlaySeconds    string    `description:"音频播放时长"`
-	Stock               string    `description:"个股标签"`
-	FieldName           string    `description:"产业标签"`
-	SeriesName          string    `description:"系列名称"`
-	Annotation          string    `description:"核心观点"`
-	TypeName            string    `description:"策略平台报告类型"`
-	ModifyTimeByCl      string    `description:"策略平台报告更新时间"`
-	CeLueFieldId        int       `description:"策略平台领域ID"`
-	Cover               string    `description:"封面图片"`
-	ReportId            int       `description:"FICC研报ID"`
-	CreateTime          time.Time `description:"创建时间"`
-	ChartPermissionId   int       `description:"行业id"`
-	ChartPermissionName string    `description:"行业名称"`
+	Id                   int       `orm:"column(id);pk"`
+	ArticleId            int       `description:"文章id"`
+	Title                string    `description:"标题"`
+	TitleEn              string    `description:"英文标题 "`
+	UpdateFrequency      string    `description:"更新周期"`
+	CreateDate           string    `description:"创建时间"`
+	PublishDate          string    `description:"发布时间"`
+	Body                 string    `description:"内容"`
+	BodyText             string    `description:"内容"`
+	Abstract             string    `description:"摘要"`
+	CategoryName         string    `description:"一级分类"`
+	SubCategoryName      string    `description:"二级分类"`
+	PublishStatus        int       `description:"发布状态"`
+	CategoryId           int       `description:"分类id"`
+	CategoryIdTwo        int       `description:"分类id用作修改匹配类型使用"`
+	ExpertBackground     string    `description:"专家背景"`
+	ExpertNumber         string    `description:"专家编号"`
+	InterviewDate        string    `description:"访谈日期"`
+	Department           string    `description:"作者"`
+	ArticleIdMd5         string    `description:"ID,md5值"`
+	IsClass              int       `description:"是否归类,1是,0否"`
+	IsSummary            int       `description:"是否是纪要库,1是,0否"`
+	IsReport             int       `description:"是否属于报告,1是,0否"`
+	ReportType           int       `description:"报告类型,1行业报告,2产业报告,0无"`
+	FileLink             string    `description:"下载预览链接"`
+	MatchTypeName        string    `description:"匹配类型"`
+	Periods              string    `description:"期数"`
+	ReportLink           string    `description:"报告链接"`
+	ArticleType          string    `description:"文章类型 文章类型,lyjh:路演精华 "`
+	HavePublish          int       `description:"是否发布过,1是 ,0 否"`
+	Source               int       `description:"来源 0策略平台同步,1小程序后台添加"`
+	SellerAndMobile      string    `description:"销售和手机号"`
+	VideoUrl             string    `description:"音频文件URL"`
+	VideoName            string    `description:"音频文件名称"`
+	VideoPlaySeconds     string    `description:"音频播放时长"`
+	Stock                string    `description:"个股标签"`
+	FieldName            string    `description:"产业标签"`
+	SeriesName           string    `description:"系列名称"`
+	Annotation           string    `description:"核心观点"`
+	TypeName             string    `description:"策略平台报告类型"`
+	ModifyTimeByCl       string    `description:"策略平台报告更新时间"`
+	CeLueFieldId         int       `description:"策略平台领域ID"`
+	Cover                string    `description:"封面图片"`
+	ReportId             int       `description:"FICC研报ID"`
+	CreateTime           time.Time `description:"创建时间"`
+	ChartPermissionId    int       `description:"行业id"`
+	ChartPermissionName  string    `description:"行业名称"`
+	ArticleSearchContent string    `description:"搜索匹配用的内容"`
 }
 
 type CygxArticleEs struct {
@@ -194,6 +195,7 @@ type ArticleDetail struct {
 	MatchTypeName            string `description:"匹配类型"`
 	Stock                    string `description:"个股标签"`
 	Frequency                string `description:"更新周期(策略平台字段)"`
+	SeriesName               string `description:"系列名称(策略平台字段)"`
 }
 
 type ArticleDetailFileLink struct {
@@ -1066,3 +1068,22 @@ func GetCygxCygxArticleFiccReportList() (items []*CygxArticle, err error) {
 	_, err = o.Raw(sql).QueryRows(&items)
 	return
 }
+
+// UpdateCygxCygxArticleBillMulti  批量修改文章搜索内容字段
+func UpdateCygxCygxArticleBillMulti(items []*CygxArticle) (err error) {
+	o := orm.NewOrm()
+	p, err := o.Raw("UPDATE cygx_article SET article_search_content = ? WHERE article_id = ?  ").Prepare()
+	if err != nil {
+		return
+	}
+	defer func() {
+		_ = p.Close() // 别忘记关闭 statement
+	}()
+	for _, v := range items {
+		_, err = p.Exec(v.ArticleSearchContent, v.ArticleId)
+		if err != nil {
+			return
+		}
+	}
+	return
+}

+ 20 - 6
models/article_history_record.go

@@ -27,7 +27,7 @@ type CygxArticleHistoryResp struct {
 	Num       int `description:"数量"`
 }
 
-//添加历史信息
+// 添加历史信息
 func AddCygxArticleHistoryRecord(item *CygxArticleHistoryRecord) (lastId int64, err error) {
 	o, err := orm.NewOrm().Begin()
 	if err != nil {
@@ -62,7 +62,7 @@ func AddCygxArticleHistoryRecord(item *CygxArticleHistoryRecord) (lastId int64,
 	return
 }
 
-//获取用户阅读记录
+// 获取用户阅读记录
 func GetUserToArticleCount(uid, articleId int) (count int, err error) {
 	sqlCount := `SELECT COUNT(1) AS count FROM cygx_article_history_record WHERE user_id=? AND article_id=? `
 	o := orm.NewOrm()
@@ -107,7 +107,7 @@ func UpdateArticleStopTime(item *AddStopTimeNewRep) (err error) {
 	return
 }
 
-//获取最新的一条阅读记录
+// 获取最新的一条阅读记录
 func GetNewArticleHistoryRecord(uid, articleId int) (item *AddStopTimeNewRep, err error) {
 	o := orm.NewOrm()
 	sql := `SELECT * FROM  cygx_article_history_record WHERE user_id = ? AND article_id = ? ORDER BY id DESC LIMIT 1;`
@@ -115,7 +115,7 @@ func GetNewArticleHistoryRecord(uid, articleId int) (item *AddStopTimeNewRep, er
 	return
 }
 
-//获取用户阅读记录
+// 获取用户阅读记录
 func GetNoAddStoptimeArticleCount(uid, articleId int) (count int, err error) {
 	sqlCount := `SELECT COUNT(1) AS count FROM cygx_article_history_record WHERE user_id=? AND article_id=? AND create_time > '` + utils.OnlineTime + `' AND stop_time = 0 `
 	o := orm.NewOrm()
@@ -123,7 +123,7 @@ func GetNoAddStoptimeArticleCount(uid, articleId int) (count int, err error) {
 	return
 }
 
-//最新标的列表
+// 最新标的列表
 func GetArticleHistoryList() (items []*CygxArticleHistoryRecordNewpv, err error) {
 	o := orm.NewOrm()
 	sql := `SELECT *  FROM cygx_article_history_record WHERE company_id != 16 `
@@ -131,7 +131,7 @@ func GetArticleHistoryList() (items []*CygxArticleHistoryRecordNewpv, err error)
 	return
 }
 
-//获取用户阅读记录
+// 获取用户阅读记录
 func GetUserToArticleHistory(uid int, articleIdArr []int) (items []*CygxArticleHistoryResp, err error) {
 	arrLen := len(articleIdArr)
 	if arrLen == 0 {
@@ -151,3 +151,17 @@ func GetUserToArticleHistory(uid int, articleIdArr []int) (items []*CygxArticleH
 	_, err = o.Raw(sql, uid, articleIdArr).QueryRows(&items)
 	return
 }
+
+// GetArticleHistoryRecord 或用户阅读过的文章ID
+func GetArticleHistoryRecord(condition string, pars []interface{}) (item []*CygxArticleHistoryRecord, err error) {
+	if condition == "" {
+		return
+	}
+	o := orm.NewOrm()
+	sql := `SELECT *
+			FROM
+			cygx_article_history_record  
+			WHERE 1 = 1 ` + condition + `  GROUP BY article_id`
+	_, err = o.Raw(sql, pars).QueryRows(&item)
+	return
+}

+ 25 - 0
models/industrial_article_group_management.go

@@ -101,3 +101,28 @@ func GetIndustrialArticleGroupManagementListByArticleId(articleId int) (items []
 	_, err = o.Raw(sql, articleId).QueryRows(&items)
 	return
 }
+
+type CygxIndustrialArticleGroupManagementResp struct {
+	ArticleId              int       `description:"文章ID"`
+	IndustrialManagementId int       `description:"cygx_industrial_management表的主键ID"`
+	PublishDate            time.Time `description:"发布时间"`
+}
+
+// GetCygxIndustrialArticleGroupManagement  获取产业关联的所有文章
+func GetCygxIndustrialArticleGroupManagement(condition string, pars []interface{}) (list []*CygxIndustrialArticleGroupManagementResp, err error) {
+	sql := `SELECT
+			mg.industrial_management_id,
+			a.article_id,
+			a.publish_date
+		FROM
+			cygx_industrial_article_group_management AS mg
+			INNER JOIN cygx_article AS a ON a.article_id = mg.article_id 
+		WHERE
+			1 = 1 
+			AND a.publish_status = 1 `
+	if condition != `` {
+		sql += condition
+	}
+	_, err = orm.NewOrm().Raw(sql, pars).QueryRows(&list)
+	return
+}

+ 53 - 0
models/industrial_management.go

@@ -874,3 +874,56 @@ func UpdateIndustrialManagementOneMonthFollowNumMulti(items []*CygxIndustryFllow
 	}
 	return
 }
+
+// 标的列表
+func GetIndustrialSubjectAllByIndustrialIdcondition(pars []interface{}, condition string) (items []*IndustrialSubject, err error) {
+	o := orm.NewOrm()
+	sql := `SELECT
+			m.subject_name,
+			m.industrial_management_id,
+			m.industrial_subject_id 
+		FROM
+			cygx_article AS a
+			INNER JOIN cygx_industrial_article_group_subject AS mg ON mg.article_id = a.article_id
+			INNER JOIN cygx_industrial_subject AS m ON m.industrial_subject_id = mg.industrial_subject_id 
+		WHERE
+			1 = 1
+			AND a.publish_status = 1  ` + condition + `
+		GROUP BY
+			m.industrial_subject_id 
+ORDER BY
+	a.publish_date DESC  `
+	_, err = o.Raw(sql, pars).QueryRows(&items)
+	return
+}
+
+// 获取该产业下最新的文章详情
+func GetNewArticleDetailByIndustrialIdscondition(pars []interface{}, condition string) (items []*IndustrialManagementArticle, err error) {
+	//arrLen := len(industrialIdArr)
+	//if arrLen == 0 {
+	//	return
+	//}
+	o := orm.NewOrm()
+	sql := `SELECT
+			mg.industrial_management_id,
+			MAX( a.article_id ) AS article_id,
+			a.title,
+			MAX( a.publish_date ) AS publish_date 
+		FROM
+			cygx_industrial_article_group_management AS mg
+			INNER JOIN cygx_article AS a ON mg.article_id = a.article_id 
+		WHERE
+			1 = 1   ` + condition + `
+		GROUP BY
+			mg.industrial_management_id `
+	_, err = o.Raw(sql, pars).QueryRows(&items)
+	return
+}
+
+// UpdateIndustrialManagementTimeLineData   更新时间线关联对应最新文章的数据信息
+func UpdateIndustrialManagementTimeLineData(industrialManagementId int, timeLineData string) (err error) {
+	o := orm.NewOrm()
+	sql := `UPDATE cygx_industrial_management SET time_line_data = ? WHERE  industrial_management_id = ?   `
+	_, err = o.Raw(sql, timeLineData, industrialManagementId).Exec()
+	return
+}

+ 43 - 5
models/report.go

@@ -20,6 +20,7 @@ type IndustrialManagement struct {
 	CategoryId             int                  `description:"文章分类ID"`
 	LayoutTime             string               `description:"布局时间"`
 	UpdateTime             string               `description:"更新时间"`
+	PublishDate            string               `description:"更新时间"`
 	MinReportTime          string               `description:"报告最早发布时间"`
 	IsRed                  bool                 `description:"是否标记红点"`
 	IsTop                  bool                 `description:"是否置顶"`
@@ -33,12 +34,19 @@ type IndustrialManagement struct {
 	IndustrialSubjectList  []*IndustrialSubject `description:"标的列表"`
 	ChartPermissionId      int                  `description:"行业ID"`
 	PermissionName         string               `description:"行业名称"`
+	TimeLineData           string               `description:"时间线所关联最新三篇文章的json数据"`
+	ListTimeLine           []TimeLineReportResp `description:"时间线所关联最新三篇文章列表"`
 	IndustryVideo          *MicroVideoSimpleInfo
 	AuthInfo               *UserPermissionAuthInfo
 	ArticleId              int `description:"文章id"`
 	Source                 int `description:"来源 1:弘则资源包(报告)、2:研选主题(报告)"`
 }
 
+type TimeLineReportResp struct {
+	Title       string `description:"标题"`
+	PublishDate string `description:"发布时间"`
+}
+
 type MicroVideoSimpleInfo struct {
 	Id                  int    `description:"视频ID"`
 	Title               string `description:"标题"`
@@ -520,6 +528,7 @@ type ArticleCollectionResp struct {
 	TopTime                int                         `description:"置顶时间"`
 	ReportId               int                         `description:"FICC研报ID"`
 	Resource               int                         `description:"来源类型,1:文章、2:产品内测、3:FICC研报"`
+	ResourceObj            string                      `description:"articleficc:FICC研报、articlevmp:上海策略平台报告、articleyx:研选报告、articlespecial:研选专栏"`
 }
 
 type IndustrialManagementResp struct {
@@ -584,9 +593,9 @@ func GetArticleCollectionList(condition string, userId int) (items []*ArticleCol
 			( SELECT count( 1 ) FROM cygx_article_collect AS ac WHERE ac.article_id = a.article_id  AND user_id = ? ) AS my_collect_num
 		FROM
 			cygx_article AS a
-			INNER JOIN cygx_industrial_article_group_management AS mg ON mg.article_id = a.article_id
-			INNER JOIN cygx_industrial_management AS m ON m.industrial_management_id = mg.industrial_management_id
-			INNER JOIN cygx_article_department AS d ON d.department_id = a.department_id 
+			LEFT JOIN cygx_industrial_article_group_management AS mg ON mg.article_id = a.article_id
+			LEFT  JOIN cygx_industrial_management AS m ON m.industrial_management_id = mg.industrial_management_id
+			LEFT JOIN cygx_article_department AS d ON d.department_id = a.department_id 
 		WHERE
 			1 = 1  AND a.publish_status = 1  `
 	if condition != "" {
@@ -674,7 +683,7 @@ func GetArticleAndYxSpecialList(condition, conditionSpecial string, userId int)
 			'' AS create_time 
 		FROM
 			cygx_article AS a
-			INNER JOIN cygx_article_department AS d ON d.department_id = a.department_id 
+			LEFT  JOIN cygx_article_department AS d ON d.department_id = a.department_id 
 		WHERE
 			1 = 1 
 			AND a.publish_status = 1 ` + condition + `  GROUP BY article_id 
@@ -883,6 +892,8 @@ type IndustrialManagementHotResp struct {
 	MinReportTime          string                `description:"报告最早发布时间"`
 	ArticleReadNum         int                   `description:"文章阅读数量"`
 	Source                 int                   `description:"来源 1:弘则资源包(报告)、2:研选主题(报告)"`
+	TimeLineData           string                `description:"时间线所关联最新三篇文章的json数据"`
+	ListTimeLine           []TimeLineReportResp  `description:"时间线所关联最新三篇文章列表"`
 	IndustrialSubjectList  []*IndustrialSubject  `description:"标的列表"`
 	IndustryVideo          *MicroVideoSimpleInfo `description:"产业视频"`
 	AuthInfo               *UserPermissionAuthInfo
@@ -1231,7 +1242,7 @@ type SearchResourceResp struct {
 
 // 搜索资源包 start
 type SearchReportAndResourceResp struct {
-	ListHzResource []*IndustrialManagementHotResp `description:"弘则资源包"`
+	ListHzResource []*IndustrialManagement        `description:"弘则资源包"`
 	ListYxResource []*IndustrialManagementHotResp `description:"研选资源包"`
 	ListYxReport   []*ArticleCollectionResp       `description:"研选报告"`
 	ListHzReport   []*ArticleCollectionResp       `description:"弘则报告"`
@@ -1241,6 +1252,7 @@ type SearchReportAndResourceResp struct {
 func GetSearchResourceList(userId int, condition string, startSize, pageSize int) (items []*IndustrialManagementHotResp, err error) {
 	o := orm.NewOrm()
 	sql := `SELECT
+   			m.time_line_data,
 			m.industry_name,
 			m.industrial_management_id,
  			MAX( a.publish_date ) as publish_date_order,
@@ -1262,6 +1274,32 @@ func GetSearchResourceList(userId int, condition string, startSize, pageSize int
 	return
 }
 
+// 列表
+func GetSearchResourceListcondition(condition string, startSize, pageSize int) (items []*IndustrialManagement, err error) {
+	o := orm.NewOrm()
+	sql := `SELECT
+			m.time_line_data,
+			m.industry_name,
+			m.chart_permission_id,
+			m.industrial_management_id,
+ 			MAX( a.publish_date ) as publish_date_order,
+			MIN( a.publish_date ) AS min_report_time,
+			date_format( MAX( a.publish_date ), '%Y-%m-%d' ) AS publish_date 
+		FROM
+			cygx_industrial_management AS m
+			INNER JOIN cygx_industrial_article_group_management AS mg ON mg.industrial_management_id = m.industrial_management_id
+			INNER JOIN cygx_article AS a ON a.article_id = mg.article_id  AND  a.article_type != 'lyjh'
+		WHERE
+			1 = 1
+			AND publish_status = 1 ` + condition + `  GROUP BY m.industrial_management_id  ORDER BY publish_date_order DESC `
+
+	if startSize > 0 || pageSize > 0 {
+		sql += ` LIMIT ` + strconv.Itoa(startSize) + "," + strconv.Itoa(pageSize)
+	}
+	_, err = o.Raw(sql).QueryRows(&items)
+	return
+}
+
 // 切换列表
 type ReportBillboardTableResp struct {
 	Name   string `description:"名称"`

+ 2 - 1
models/resource_data.go

@@ -22,6 +22,7 @@ type CygxResourceData struct {
 	SearchContent     string    `description:"搜索匹配用的内容"`
 	SearchOrderTime   string    `description:"搜索排序时间"`
 	TagName           string    `description:"标签名"`
+	Sort              int       `description:"排序"`
 }
 
 // FICC研报小程序
@@ -90,7 +91,7 @@ func GetResourceDataListCondition(condition string, pars []interface{}, startSiz
 	if condition != "" {
 		sql += condition
 	}
-	sql += `  ORDER BY search_order_time DESC   LIMIT ?,? `
+	sql += `  ORDER BY  sort DESC , search_order_time DESC   LIMIT ?,? `
 	_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
 	return
 }

+ 73 - 0
services/article.go

@@ -872,6 +872,11 @@ func HandleArticleListByApi(artcleId int) (err error) {
 							keyword3 = v.Title
 							keyword4 = v.PublishDate.Format(utils.FormatDateTime)
 							SendWxMsgWithArticleClassToAdmin(keyword1, keyword2, keyword3, keyword4, openIdList, articleIdInt)
+
+							for _, vIndustrial := range listIndustrial {
+								IndustrialManagementTimeLineDateList3(vIndustrial.IndustrialManagementId) // 更新时间线报告内容
+							}
+
 						} else {
 							keyword1 = "新报告产业标签:【" + v.FieldName + "】,个股标签:" + subjectStr
 							keyword2 = "未归类"
@@ -1919,3 +1924,71 @@ func GetYxArticleIdMap(articleIds []int) (mapResp map[int]bool) {
 	}
 	return
 }
+
+// GetUserArticleHistoryRecord 获取用户已经阅读的文章ID
+func GetUserArticleHistoryRecord(user *models.WxUserItem) (articleIdMap map[int]bool, err error) {
+	var condition string
+	var pars []interface{}
+	condition = " AND user_id = ? "
+	pars = append(pars, user.UserId)
+	articleIdMap = make(map[int]bool, 0)
+	list, err := models.GetArticleHistoryRecord(condition, pars)
+	if err != nil && err.Error() != utils.ErrNoRow() {
+		return
+	}
+	for _, v := range list {
+		articleIdMap[v.ArticleId] = true
+	}
+	return
+}
+
+// GetUserArticleHistoryIndustrialNewPublishDate  获取产业关联的的文章用户是否阅读
+func GetUserArticleHistoryIndustrialNewPublishDate(user *models.WxUserItem, industrialIdArr []int, articleTypeIds, resource string) (mapIndustrialArticleHistory map[int]bool, err error) {
+	if len(industrialIdArr) == 0 {
+		return
+	}
+	var condition string
+	var pars []interface{}
+	articleIdMap, err := GetUserArticleHistoryRecord(user)
+	if err != nil {
+		return
+	}
+	if resource == utils.REOURCE_YX {
+		condition = ` AND a.publish_status = 1 AND a.article_type_id  IN (` + articleTypeIds + `)	`
+	} else {
+		condition = ` AND a.article_type_id  = 0	 AND  a.article_id < ` + strconv.Itoa(utils.SummaryArticleId)
+	}
+	var startTime time.Time
+	if utils.StrTimeToTime(utils.OnlineTime).After(user.CreatedTime) {
+		startTime = utils.StrTimeToTime(utils.OnlineTime)
+	} else {
+		startTime = user.CreatedTime
+	}
+
+	condition += ` AND mg.industrial_management_id  IN (` + utils.GetOrmInReplace(len(industrialIdArr)) + `) AND a.publish_date > ? `
+	pars = append(pars, industrialIdArr, startTime)
+
+	list, err := models.GetCygxIndustrialArticleGroupManagement(condition, pars)
+	if err != nil {
+		return
+	}
+	mapIndustrialArticle := make(map[int][]*models.CygxIndustrialArticleGroupManagementResp)
+	//mapIndustrialArticleMax := make(map[int]int, 0)
+	mapIndustrialArticleHistory = make(map[int]bool, 0)
+	//mapIndustrialArticleMaxTime := make(map[int]time.Time)
+	for _, v := range list {
+		item := new(models.CygxIndustrialArticleGroupManagementResp)
+		item.IndustrialManagementId = v.IndustrialManagementId
+		item.ArticleId = v.ArticleId
+		item.PublishDate = v.PublishDate
+		mapIndustrialArticle[v.IndustrialManagementId] = append(mapIndustrialArticle[v.IndustrialManagementId], item)
+	}
+	for k, v := range mapIndustrialArticle {
+		for _, item := range v {
+			if !articleIdMap[item.ArticleId] {
+				mapIndustrialArticleHistory[k] = true
+			}
+		}
+	}
+	return
+}

+ 18 - 2
services/es_comprehensive.go

@@ -1282,6 +1282,14 @@ func GetResourceDataEsList(list []*SearchComprehensiveItem, user *models.WxUserI
 			}
 		}
 		for _, v := range listIndustrialResourceIds {
+			if v.TimeLineData == "" {
+				v.ListTimeLine = make([]models.TimeLineReportResp, 0)
+			} else {
+				if err = json.Unmarshal([]byte(v.TimeLineData), &v.ListTimeLine); err != nil {
+					e = errors.New("Unmarshal, Err: " + e.Error())
+					//return
+				}
+			}
 			v.Source = 1
 			mapItems[fmt.Sprint("industrialsourceHz", v.IndustrialManagementId)].IndustrialResource = v
 		}
@@ -1560,10 +1568,18 @@ func GetResourceDataEsList(list []*SearchComprehensiveItem, user *models.WxUserI
 }
 
 func SqlComprehensiveSearch(keyWord string, startSize, pageSize int) (result []*SearchComprehensiveItem, total int, err error) {
+	listListNoEnd, e := models.GetActivityIdListNoEnd()
+	var activityIds []string
+	for _, v := range listListNoEnd {
+		activityIds = append(activityIds, strconv.Itoa(v.ActivityId))
+	}
+	activityIds = append(activityIds, "0")
+
+	conditionActivity := " AND IF   ( source IN('activity') , source_id IN (" + strings.Join(activityIds, ",") + ")  ,1=1 )"
 	keyWord = "%" + keyWord + "%"
 	var conditionTitle string
 	var parsTitle []interface{}
-	conditionTitle = " AND is_hide = 0  AND search_title LIKE ? AND IF   ( source IN('activityvoice','activityvideo') , chart_permission_id != 31 ,1=1 ) "
+	conditionTitle = " AND is_hide = 0  AND search_title LIKE ? AND IF   ( source IN('activityvoice','activityvideo') , chart_permission_id != 31 ,1=1 ) " + conditionActivity
 	parsTitle = append(parsTitle, keyWord)
 	totalTitle, e := models.GetResourceDataCount(conditionTitle, parsTitle)
 	if e != nil {
@@ -1574,7 +1590,7 @@ func SqlComprehensiveSearch(keyWord string, startSize, pageSize int) (result []*
 	var conditionContent string
 	var parsContent []interface{}
 
-	conditionContent = " AND is_hide = 0 AND search_content LIKE ? AND search_title  NOT LIKE ?  AND IF   ( source IN('activityvoice','activityvideo') , chart_permission_id != 31 ,1=1 ) "
+	conditionContent = " AND is_hide = 0 AND search_content LIKE ? AND search_title  NOT LIKE ?  AND IF   ( source IN('activityvoice','activityvideo') , chart_permission_id != 31 ,1=1 ) " + conditionActivity
 	parsContent = append(parsContent, keyWord, keyWord)
 	totalContent, e := models.GetResourceDataCount(conditionContent, parsContent)
 	if e != nil {

+ 428 - 0
services/industrial_management.go

@@ -2,8 +2,10 @@ package services
 
 import (
 	"context"
+	"encoding/json"
 	"errors"
 	"fmt"
+	"golang.org/x/net/html"
 	"hongze/hongze_cygx/models"
 	"hongze/hongze_cygx/utils"
 	"strconv"
@@ -612,6 +614,295 @@ func HandleIndustryList(list []*models.IndustrialManagement, user *models.WxUser
 	return
 }
 
+// HandleIndustryList预处理产业列表字段
+func HandleIndustryListResource(list []*models.IndustrialManagement, user *models.WxUserItem, resource string) (items []*models.IndustrialManagement, err error) {
+	userId := user.UserId
+	fllowList, err := models.GetUserFllowIndustrialList(userId)
+	if err != nil {
+		return
+	}
+	fllowMap := make(map[int]int)
+	if len(fllowList) > 0 {
+		for _, v := range fllowList {
+			fllowMap[v.IndustrialManagementId] = v.IndustrialManagementId
+		}
+	}
+
+	hotMap, e := IndustrialManagementHotMapGropuPermission()
+	if e != nil {
+		err = errors.New("获取hot标签失败,IndustrialManagementHotMapGropuPermission " + e.Error())
+		return
+	}
+	var condition string
+	var pars []interface{}
+	articleTypeIds, _ := GetYanXuanArticleTypeIds()
+	//给默认值
+	if resource != "Yx" {
+		resource = "Hz"
+	}
+	if articleTypeIds != "" {
+		if resource == "Yx" {
+			condition = ` AND a.publish_status = 1 AND a.article_type_id  IN (` + articleTypeIds + `)	`
+		} else {
+			condition = ` AND a.article_type_id  NOT  IN (` + articleTypeIds + `)  	`
+		}
+	}
+
+	mapindustrialId, e := GetMicroRoadshowVideoMap()
+	if e != nil {
+		err = e
+		return
+	}
+	//合并产业关联的标的
+	listSubjcet, err := models.GetThemeHeatSubjectList("")
+	if err != nil {
+		return
+	}
+	industrialIdArr := make([]int, 0)
+	for k, v := range list {
+		list[k].Source = 1
+		if fllowMap[v.IndustrialManagementId] > 0 {
+			list[k].IsFollow = 1
+		}
+		v.IsHot = hotMap[v.IndustrialManagementId]
+		industrialIdArr = append(industrialIdArr, v.IndustrialManagementId)
+		if _, ok := mapindustrialId[v.IndustrialManagementId]; !ok {
+			continue
+		}
+		videoSimple, au, e := GetindustryVideo(user, v.IndustrialManagementId)
+		if e != nil {
+			err = errors.New("获取产业关联的视频失败,GetindustryVideo " + e.Error())
+			return
+		}
+		if videoSimple != nil && videoSimple.Id > 0 {
+			v.IndustryVideo = videoSimple
+		}
+		v.AuthInfo = au
+		v.PublishDate = v.UpdateTime
+	}
+	if len(industrialIdArr) > 0 {
+		//合并产业关联的标的
+		conditionSubject := condition + ` AND 	m.industrial_management_id  IN (` + utils.GetOrmInReplace(len(industrialIdArr)) + `)`
+		pars = append(pars, industrialIdArr)
+		listSubjcet, err = models.GetIndustrialSubjectAllByIndustrialIdcondition(pars, conditionSubject)
+		if err != nil {
+			return
+		}
+		mapIndustrial := make(map[string]int)
+		for _, v := range listSubjcet {
+			for k2, v2 := range list {
+				if v2.IndustrialManagementId == v.IndustrialManagementId && mapIndustrial[fmt.Sprint(v2.IndustrialManagementId, "Hz", v.SubjectName)] == 0 {
+					list[k2].IndustrialSubjectList = append(list[k2].IndustrialSubjectList, v)
+					mapIndustrial[fmt.Sprint(v2.IndustrialManagementId, "Hz", v.SubjectName)] = v2.IndustrialManagementId
+				}
+			}
+		}
+	}
+	//获取产业关联的的文章用户是否阅读
+	mapIndustrialArticleHistory, err := GetUserArticleHistoryIndustrialNewPublishDate(user, industrialIdArr, articleTypeIds, resource)
+	if err != nil {
+		err = errors.New("获取产业关联的的文章用户是否阅读失败 " + err.Error())
+		return
+	}
+	mapUPdateTime := make(map[int]string)
+	articleIdArr := make([]int, 0)
+	//获取这些产业下最新更新的文章
+	var conditionindustrial string
+	var parsindustrial []interface{}
+	var industrialIds string
+	if len(industrialIdArr) > 0 {
+		conditionindustrial = condition + ` AND mg.industrial_management_id  IN (` + utils.GetOrmInReplace(len(industrialIdArr)) + `)`
+		parsindustrial = append(parsindustrial, industrialIdArr)
+		listUpdateTime, e := models.GetNewArticleDetailByIndustrialIdscondition(parsindustrial, conditionindustrial)
+		if e != nil && e.Error() != utils.ErrNoRow() {
+			err = errors.New("GetNewArticleDetailByIndustrialIds Err " + e.Error())
+			return
+		}
+		for _, v := range listUpdateTime {
+			mapUPdateTime[v.IndustrialManagementId] = v.PublishDate
+			articleIdArr = append(articleIdArr, v.ArticleId)
+		}
+		//时间线的更新时间
+		//	maptimelineUPdateTime := make(map[int]string)
+		listtimelinePublishdate, e := models.GetTimeLineReportIndustrialPublishdateList(industrialIdArr)
+		if e != nil && e.Error() != utils.ErrNoRow() {
+			err = e
+			return
+		}
+		for _, v := range listtimelinePublishdate {
+			if mapUPdateTime[v.IndustrialManagementId] != "" {
+				if utils.StrTimeToTime(v.PublishDate).After(utils.StrTimeToTime(mapUPdateTime[v.IndustrialManagementId])) {
+					mapUPdateTime[v.IndustrialManagementId] = v.PublishDate
+				}
+			}
+		}
+		//产品内测的更新时间线
+		listtProductInterior, e := models.GetNewProductInteriorByIndustrialIds(industrialIdArr)
+		if e != nil && e.Error() != utils.ErrNoRow() {
+			err = e
+			return
+		}
+		for _, v := range listtProductInterior {
+			if mapUPdateTime[v.IndustrialManagementId] != "" {
+				if utils.StrTimeToTime(v.PublishDate).After(utils.StrTimeToTime(mapUPdateTime[v.IndustrialManagementId])) {
+					mapUPdateTime[v.IndustrialManagementId] = v.PublishDate
+				}
+			}
+		}
+		for _, id := range industrialIdArr {
+			industrialIds += strconv.Itoa(id) + ","
+		}
+		industrialIds = strings.TrimRight(industrialIds, ",")
+		articleList, e := models.GetReportIndustrialReadNumList(userId, industrialIds, user.CreatedTime)
+		if e != nil && e.Error() != utils.ErrNoRow() {
+			err = e
+			return
+		}
+		mapHistroyindustrialId := make(map[int]int)
+		for _, v := range articleList {
+			mapHistroyindustrialId[v.IndustrialManagementId] = v.Readnum
+		}
+	}
+	nowTime := time.Now().Local()
+	threeMonBefore := nowTime.AddDate(0, -3, 0)
+
+	//查询用户今天是否看过时间线
+	//haveMorningMeeting := false
+	//var morningMeetingTime string
+	recrodList, err := models.GetCygxTimelineLogCount(user.UserId, industrialIdArr)
+	if err != nil && err.Error() != utils.ErrNoRow() {
+		return
+	}
+	var industrialManagementIdstr string
+	industrialIdMap := make(map[string]time.Time)
+	for _, v := range recrodList {
+		//fmt.Println(v.Router)
+		//sliceindustrial := strings.Split(v.Router, "=")
+		//industrialManagementIdstr = strings.TrimLeft(v.Router, utils.TIME_LINE_ROUTE)
+		industrialManagementIdstr = strconv.Itoa(v.IndustrialManagementId)
+		industrialIdMap[industrialManagementIdstr] = v.ModifyTime
+		//fmt.Println(industrialManagementIdstr)
+		//if createTime, ok := industrialIdMap[industrialManagementIdstr]; ok {
+		//	if createTime.Before(v.CreateTime) {
+		//		industrialIdMap[industrialManagementIdstr] = v.CreateTime
+		//	}
+		//} else {
+		//	industrialIdMap[industrialManagementIdstr] = v.CreateTime
+		//}
+	}
+	morningMeetingTimeMap := make(map[int]time.Time)
+	if industrialIds != "" {
+		mmList, e := models.GetCygxMorningMeetingReviewsListByIndustrialIds(industrialIds)
+		if e != nil {
+			err = e
+			return
+		}
+		for _, v := range mmList {
+			morningMeetingTimeMap[v.IndustryId] = v.CreateTime
+		}
+	}
+	timeLineRedMap := make(map[int]bool, 0)
+	for _, industrialId := range industrialIdArr {
+		//if createTime, ok := industrialIdMap[strconv.Itoa(industrialId)]; ok {
+		//	if createTime.Before(morningMeetingTimeMap[industrialId]) {
+		//		timeLineRedMap[industrialId] = true
+		//	}
+		//}
+		if industrialIdMap[strconv.Itoa(industrialId)].Before(morningMeetingTimeMap[industrialId]) {
+			timeLineRedMap[industrialId] = true
+		}
+	}
+	//fmt.Println(industrialIdMap["90"])
+	//fmt.Println(timeLineRedMap[90])
+	//fmt.Println(mapIndustrialArticleHistory[90])
+	for k, v := range list {
+		list[k].UpdateTime = utils.TimeRemoveHms(mapUPdateTime[v.IndustrialManagementId])
+		if userId > 0 {
+			//如果文章没有阅读,而且,文章的发布时间晚于项目的上线时间,而且文章的发布时间晚于用户的注册时间,就进行标红处理
+			if mapIndustrialArticleHistory[v.IndustrialManagementId] || timeLineRedMap[v.IndustrialManagementId] {
+				//if mapHistroyindustrialId[v.IndustrialManagementId] == 0 || timeLineRedMap[v.IndustrialManagementId] {
+				if user.CreatedTime.Before(utils.StrTimeToTime(mapUPdateTime[v.IndustrialManagementId])) && utils.StrTimeToTime(utils.OnlineTime).Before(utils.StrTimeToTime(mapUPdateTime[v.IndustrialManagementId])) {
+					list[k].IsRed = true
+				}
+			}
+		} else {
+			if utils.StrTimeToTime(utils.OnlineTime).Before(utils.StrTimeToTime(mapUPdateTime[v.IndustrialManagementId])) {
+				list[k].IsRed = true
+			}
+			list[k].IsFollow = 1
+		}
+		list[k].UpdateTime = utils.TimeRemoveHms(mapUPdateTime[v.IndustrialManagementId])
+
+		if resource == "Yx" {
+			list[k].IsRed = false
+		}
+		// 关联报告发布时间均在3个月内则标记New
+		if v.MinReportTime != "" {
+			t, e := time.Parse(utils.FormatDateTime, v.MinReportTime)
+			if e != nil {
+				err = errors.New("报告最早发布时间有误,GetindustryVideo " + e.Error())
+				return
+			}
+			if t.After(threeMonBefore) {
+				list[k].IsNew = true
+			}
+		}
+		if v.ChartPermissionId == utils.CHART_PERMISSION_ID_YANXUAN {
+			v.Source = 2
+		} else {
+			v.Source = 1
+		}
+
+		if v.TimeLineData == "" {
+			v.ListTimeLine = make([]models.TimeLineReportResp, 0)
+		} else {
+			if err = json.Unmarshal([]byte(v.TimeLineData), &v.ListTimeLine); err != nil {
+				e = errors.New("Unmarshal, Err: " + e.Error())
+				return
+			}
+		}
+	}
+	items = list
+	return
+}
+
+func HandleIndustryListHzAndYx(list []*models.IndustrialManagement, user *models.WxUserItem, resource string) (items []*models.IndustrialManagement, err error) {
+	var listHz []*models.IndustrialManagement
+	var lisYx []*models.IndustrialManagement
+	for _, v := range list {
+		if v.ChartPermissionId == utils.CHART_PERMISSION_ID_YANXUAN {
+			lisYx = append(lisYx, v)
+		} else {
+			listHz = append(listHz, v)
+		}
+	}
+	listHz, err = HandleIndustryListResource(listHz, user, "Hz")
+	if err != nil {
+		return
+	}
+	lisYx, err = HandleIndustryListResource(lisYx, user, "Yx")
+	if err != nil {
+		return
+	}
+	maplistHz := make(map[int]*models.IndustrialManagement)
+	maplistYx := make(map[int]*models.IndustrialManagement)
+	for _, v := range listHz {
+		maplistHz[v.IndustrialManagementId] = v
+	}
+	for _, v := range lisYx {
+		maplistYx[v.IndustrialManagementId] = v
+	}
+	for _, v := range list {
+		if maplistHz[v.IndustrialManagementId] != nil {
+			items = append(items, maplistHz[v.IndustrialManagementId])
+		}
+		if maplistYx[v.IndustrialManagementId] != nil {
+			items = append(items, maplistYx[v.IndustrialManagementId])
+		}
+	}
+	return
+}
+
 // 通过文章ID获取文章所关联的产业
 func GetArticleIndustrialByArticleId(articleIds []int) (itemMap map[int][]*models.IndustrialManagementResp, err error) {
 	lenarticleIds := len(articleIds)
@@ -852,3 +1143,140 @@ func UpdateIndustrialManagementOneMonthFollowNum(cont context.Context) (err erro
 	}
 	return
 }
+
+//func init_14-2() {
+//	//IndustrialManagementTimeLineDateList3(127)
+//
+//	list, err := models.IndustrialManagementAll()
+//	if err != nil {
+//		fmt.Println("Error marshaling to JSON:", err)
+//		return
+//	}
+//	fmt.Println(len(list))
+//	for k, v := range list {
+//		fmt.Println(k)
+//		time.Sleep(200 * time.Millisecond)
+//		if v.ChartPermissionId == utils.CHART_PERMISSION_ID_YANXUAN {
+//			continue
+//		}
+//		IndustrialManagementTimeLineDateList3(v.IndustrialManagementId)
+//	}
+//}
+
+//func init() {
+//	init_14_2()
+//}
+
+//初始化文章搜索匹配内容
+//func init_14_2() {
+//	//IndustrialManagementTimeLineDateList3(127)
+//	var conditionContent string
+//	var parsContent []interface{}
+//
+//	conditionContent = "   AND source = 'article'  "
+//	list, e := models.GetResourceDataListCondition(conditionContent, parsContent, 0, 99999)
+//	if e != nil && e.Error() != utils.ErrNoRow() {
+//		fmt.Println(e)
+//		return
+//	}
+//
+//	var itemsUpdate []*models.CygxArticle
+//	for k, v := range list {
+//		fmt.Println(k)
+//		item := new(models.CygxArticle)
+//		item.ArticleId = v.SourceId
+//		item.ArticleSearchContent = v.SearchContent
+//		itemsUpdate = append(itemsUpdate, item)
+//	}
+//	e = models.UpdateCygxCygxArticleBillMulti(itemsUpdate)
+//	if e != nil && e.Error() != utils.ErrNoRow() {
+//		fmt.Println(e)
+//		return
+//	}
+//	fmt.Println("end")
+//}
+
+// 时间线关联文章的三条数据
+func IndustrialManagementTimeLineDateList3(industrialManagementId int) (err error) {
+	defer func() {
+		if err != nil {
+			fmt.Println(err)
+			go utils.SendAlarmMsg("修改时间线关联文章的三条数据信息失败"+err.Error(), 2)
+		}
+	}()
+
+	list, e := models.GetTimeLineReportIndustrialList(0, industrialManagementId, 0, 3)
+	if e != nil {
+		err = errors.New("GetCompanySellerAndShareMobileByRai, Err: " + e.Error())
+		return
+	}
+
+	type TimeLineReportItem struct {
+		Title       string `description:"标题"`
+		PublishDate string `description:"发布时间"`
+	}
+
+	var listData []*TimeLineReportItem
+	for _, v := range list {
+		item := new(TimeLineReportItem)
+		if v.Resource == 3 {
+			item.Title, _ = extractTextBeforePeriodOrNewline(v.Content)
+			fmt.Println("Title", item.Title)
+		} else {
+			item.Title = v.Title
+		}
+		item.PublishDate = utils.TimeRemoveHms2(v.PublishTime)
+		listData = append(listData, item)
+	}
+
+	jsonData, err := json.Marshal(listData)
+	if err != nil {
+		fmt.Println("Error marshaling to JSON:", err)
+		return
+	}
+	err = models.UpdateIndustrialManagementTimeLineData(industrialManagementId, string(jsonData))
+	return err
+}
+
+func extractTextBeforePeriodOrNewline(htmlContent string) (string, error) {
+	var builder strings.Builder
+	reader := strings.NewReader(htmlContent)
+	z := html.NewTokenizer(reader)
+
+	for {
+		tokenType := z.Next()
+		switch tokenType {
+		case html.ErrorToken:
+			// End of document
+			return builder.String(), nil
+		case html.TextToken:
+			text := string(z.Text())
+			//fmt.Println("text", text)
+			if idx := strings.Index(text, "。"); idx != -1 {
+				builder.WriteString(text[:idx+len("。")])
+				return builder.String(), nil
+			} else {
+				return text, nil
+			}
+			builder.WriteString(text)
+		}
+	}
+}
+
+// 处理产业管理时间线相关内容的数据
+func UpdateIndustrialManagementTimeLineDateList3ByRedis() (err error) {
+	for {
+		utils.Rc.Brpop(utils.CYGX_ARTICLE_TIME_LINE_KEY, func(b []byte) {
+			var log models.IndustrialManagementCount
+			if err := json.Unmarshal(b, &log); err != nil {
+				fmt.Println("json unmarshal wrong!")
+				go utils.SendAlarmMsg("处理产业管理时间线相关内容的数据处理Redis队列消息失败: UpdateIndustrialManagementTimeLineDateList3ByRedis "+err.Error()+string(b), 2)
+			}
+			IndustrialManagementTimeLineDateList3(log.IndustrialManagementId)
+		})
+	}
+}
+
+//func init_14_2() {
+//SELECT  * FROM cygx_resource_data WHERE  source_id  IN (SELECT article_id  FROM   cygx_article WHERE series_name IN ('行业深度','季度策略') )   AND source = 'article'
+//}

+ 2 - 2
services/rai_company_user_bill.go

@@ -258,7 +258,7 @@ func UpdateCygxRaiCompanyUserBill() (err error) {
 
 		mapActivityeBill := make(map[string]bool)
 		for _, v := range listBillByActivity {
-			mapActivityeBill[fmt.Sprint("UID_", v.UserId, "SID_", v.SourceId)] = true
+			mapActivityeBill[fmt.Sprint("UID_", v.Mobile, "SID_", v.SourceId)] = true
 		}
 
 		mapArticleBillDel := make(map[string]bool)
@@ -277,7 +277,7 @@ func UpdateCygxRaiCompanyUserBill() (err error) {
 		}
 
 		for _, v := range signUpDetailList {
-			if mapActivityeBill[fmt.Sprint("UID_", v.UserId, "SID_", v.ActivityId)] { // 如果内容存在就不插入
+			if mapActivityeBill[fmt.Sprint("UID_", v.Mobile, "SID_", v.ActivityId)] { // 如果内容存在就不插入
 				continue
 			}
 			item := new(rai_serve.CygxRaiCompanyUserBill)

+ 3 - 4
services/resource_data.go

@@ -633,10 +633,6 @@ func Deletenewchart(chartIdsDelete []int) (err error) {
 	return
 }
 
-//func init() {
-//	UpdateArticleResourceData(9050)
-//}
-
 // 更新文章
 func UpdateArticleResourceData(sourceId int) {
 	time.Sleep(1 * time.Second)
@@ -726,6 +722,9 @@ func UpdateArticleResourceData(sourceId int) {
 		item.PublishDate = publishDate
 		item.CreateTime = time.Now()
 		item.SearchTitle = detail.Title
+		if detail.SeriesName == "行业深度" || detail.SeriesName == "季度策略" {
+			item.Sort = 100 // 这两个类型优先展示
+		}
 		annotation, e := utils.GetHtmlContentText(detail.Annotation)
 		if e != nil && e.Error() != utils.ErrNoRow() {
 			err = errors.New("GetHtmlContentText, Err: " + e.Error() + "sourceId:" + strconv.Itoa(sourceId))

+ 5 - 4
services/task.go

@@ -178,10 +178,11 @@ func Task() {
 	//	task.AddTask("getArticleListByApi", getArticleListByApi)
 	//}
 
-	go UserLabelLogReduce()              // 处理用户标签的队列消息
-	go YanXuanActivityPointsBillReduce() // 处理研选活动扣点
-	go UpdateArticleByRedis()            // 处理策略平台同步过来的文章
-	go UpdateWxUserRaiLabelRedis()       // 处理用户标签队列消息CRM_16.5
+	go UserLabelLogReduce()                                 // 处理用户标签的队列消息
+	go YanXuanActivityPointsBillReduce()                    // 处理研选活动扣点
+	go UpdateArticleByRedis()                               // 处理策略平台同步过来的文章
+	go UpdateWxUserRaiLabelRedis()                          // 处理用户标签队列消息CRM_16.5
+	go UpdateIndustrialManagementTimeLineDateList3ByRedis() // 处理产业管理时间线相关内容的数据
 
 	//GetCygxActivityAttendanceDetail()
 	//CreateIndexNameArticleHistory()

+ 2 - 0
utils/constants.go

@@ -119,6 +119,7 @@ const (
 	ACTEGORY_ID_AI_QY                int    = 61                              // AI前沿自定义ID
 	ZHUAN_JIA_NAME                   string = "专家"
 	ZHUAN_JIA_ID                     int    = 29
+	REOURCE_YX                       string = "Yx"
 )
 
 const (
@@ -136,6 +137,7 @@ const (
 	CYGX_USER_KEY_LABEL              = "CYGX_USER_KEY_LABEL"              //查研观向用户标签
 	CYGX_YANXUAN_POINTS_KEY          = "CYGX_YANXUAN_POINTS_KEY"          //查研观向研选活动扣点KEY
 	CYGX_ARTICLE_UPDATE_KEY          = "CYGX_ARTICLE_UPDATE_KEY"          //策略平台更新文章key
+	CYGX_ARTICLE_TIME_LINE_KEY       = "CYGX_ARTICLE_TIME_LINE_KEY"       //产业时间线关联的文章key
 	//CYGX_RAI_SERVE_BILL_KEY          = "CYGX_RAI_SERVE_BILL_KEY"          //权益服务记录明细key
 )