瀏覽代碼

no message

xingzai 1 年之前
父節點
當前提交
ac1baacff8

+ 15 - 2
controllers/activity.go

@@ -700,7 +700,7 @@ func (this *ActivityNoLoginController) ActivityListNew() {
 // @Param   ActivityId   query   int  true       "活动ID"
 // @Success Ret=200 {object} models.CygxActivityResp
 // @router /detail [get]
-func (this *ActivityController) Detail() {
+func (this *ActivityNoLoginController) Detail() {
 	br := new(models.BaseResponse).Init()
 	defer func() {
 		this.Data["json"] = br
@@ -890,6 +890,18 @@ func (this *ActivityController) Detail() {
 	if strings.Contains(activityInfo.ChartPermissionName, utils.CHART_PERMISSION_NAME_YANXUAN) {
 		resp.IsResearch = true
 	}
+
+	if uid == 0 {
+		detailResp := services.ActivityButtonShow(activityInfo, user, make([]string, 0))
+		detailResp, err = services.ActivityDetaailShow(detailResp)
+		if err != nil {
+			br.Msg = "获取信息失败"
+			br.ErrMsg = "ActivityDetaailShow Err:" + err.Error() + "activityId:" + strconv.Itoa(activityId)
+			return
+		}
+		resp.Detail = detailResp
+		resp.HasPermission = 1
+	}
 	br.Ret = 200
 	br.Success = true
 	br.Msg = "获取成功"
@@ -2200,6 +2212,7 @@ func (this *ActivityController) ScheduleList() {
 		br.ErrMsg = "获取失败,Err:" + err.Error()
 		return
 	}
+
 	var list []*models.ActivityDetail
 	//全部都是进行中的活动
 	if totalCount > currentIndex*pageSize {
@@ -2227,7 +2240,7 @@ func (this *ActivityController) ScheduleList() {
 			return
 		}
 		pageSize = pageSize - len(listHave)
-		condition = ` AND art.publish_status = 1 AND art.active_state IN(1,3)  art.AND chart_permission_id  =  31`
+		condition = ` AND art.publish_status = 1 AND art.active_state IN(1,3)  AND art.chart_permission_id = 31 `
 		//if source == 1 {
 		//	condition += ` AND art.yidong_activity_id = '' `
 		//}

+ 12 - 30
controllers/article.go

@@ -19,12 +19,16 @@ type ArticleCommonController struct {
 	BaseCommonController
 }
 
+type ArticleNoLoginController struct {
+	BaseAuthMobileController
+}
+
 // @Title 获取报告详情
 // @Description 获取报告详情接口
 // @Param   ArticleId   query   int  true       "报告ID"
 // @Success 200 {object} models.ArticleDetailResp
 // @router /detail [get]
-func (this *ArticleController) Detail() {
+func (this *ArticleNoLoginController) Detail() {
 	br := new(models.BaseResponse).Init()
 	defer func() {
 		this.Data["json"] = br
@@ -113,8 +117,8 @@ func (this *ArticleController) Detail() {
 			resp.HasPermission = hasPermission
 			resp.SellerName = sellerName
 			resp.SellerMobile = sellerMobile
-			detail.Body = ""
-			detail.Abstract = ""
+			//detail.Body = ""
+			//detail.Abstract = ""
 			detail.Seller.SellerName = sellerName
 			detail.Seller.SellerMobile = sellerMobile
 			resp.Detail = detail
@@ -194,32 +198,7 @@ func (this *ArticleController) Detail() {
 			if userType == 1 && strings.Contains(detail.CategoryName, "研选") && mfyxUserPermissionTotal == 0 {
 				hasPersion = false
 			}
-			//if detail.IsReport == 1 {
-			//	detailCategory, err := models.GetdetailByCategoryIdSando(detail.CategoryId)
-			//	if err != nil && err.Error() != utils.ErrNoRow() {
-			//		br.Msg = "获取信息失败"
-			//		br.ErrMsg = "获取信息失败,Err:" + err.Error() + "categoryID 不存在:" + strconv.Itoa(detail.CategoryId)
-			//		return
-			//	}
-			//	permissionStr, err := models.GetCompanyPermissionByUser(user.CompanyId)
-			//	if err != nil {
-			//		br.Msg = "获取信息失败"
-			//		br.ErrMsg = "获取客户信息失败,Err:" + err.Error()
-			//		return
-			//	}
-			//	if detailCategory != nil {
-			//		if detailCategory.PermissionType == 1 {
-			//			if !strings.Contains(permissionStr, detailCategory.ChartPermissionName+"(主观)") {
-			//				hasPersion = false
-			//			}
-			//		} else if detailCategory.PermissionType == 2 {
-			//			if !strings.Contains(permissionStr, detailCategory.ChartPermissionName+"(客观)") {
-			//				hasPersion = false
-			//			}
-			//		}
-			//	}
-			//}
-			//大行业通过权限校验,再校验主客观权限。只有医药、消费、科技、智造,才会校验主客观权限,热点问答这个匹配类型下的所有报告,也不做主客观校验
+
 			if hasPersion && utils.InArrayByStr([]string{utils.YI_YAO_NAME, utils.XIAO_FEI_NAME, utils.KE_JI_NAME, utils.ZHI_ZAO_NAME}, articlePermissionName) && matchTypeName != "热点问答" {
 				hasPersion = services.CheckArticlePermissionType(articleId, user)
 			}
@@ -277,7 +256,7 @@ func (this *ArticleController) Detail() {
 	}
 Loop:
 	if hasPermission != 1 {
-		detail.Body = ""
+		//detail.Body = ""
 	} else {
 		articleFollowdetail, err := models.GetArticleFollowDetail(articleId, uid)
 		if err != nil {
@@ -333,6 +312,9 @@ Loop:
 	if detail.SubCategoryName == "专项调研" {
 		detail.IsSpecialArticle = true
 	}
+	if user.UserId == 0 {
+		hasPermission = 1
+	}
 	resp.HasPermission = hasPermission
 	resp.IsSpecialArticle = detail.IsSpecialArticle
 	resp.Detail = detail

+ 5 - 39
models/activity.go

@@ -155,6 +155,7 @@ type ActivityDetail struct {
 	CancelDeadline            string                     `description:"取消报名截止时间"`
 	ChartPermissionNameDeputy string                     `description:"副行业名称"`
 	TopTime                   int                        `description:"置顶时间"`
+	LabelKeywordImgLink       string                     `description:"标签关键词ico"`
 }
 
 // 活动详情
@@ -234,6 +235,7 @@ type ActivityListResp struct {
 	CancelDeadline          string                     `description:"取消报名截止时间"`
 	IsYidongActivity        bool                       `description:"是否属于易董同步过来的活动"`
 	TopTime                 int                        `description:"置顶时间"`
+	LabelKeywordImgLink     string                     `description:"标签关键词ico"`
 }
 
 type ActivityCheck struct {
@@ -549,7 +551,7 @@ func GetScheduleList(condition string, pars []interface{}, uid, startSize, pageS
 }
 
 // 我的日程列表 活动以及专项调研一起
-func GetScheduleAndSpecilList(condition string, pars []interface{}, conditionSpecil string, parsSpecil []interface{}, startSize, pageSize int) (items []*ActivityDetail, err error) {
+func GetScheduleAndSpecilList(condition string, pars []interface{}, startSize, pageSize int) (items []*ActivityDetail, err error) {
 	o := orm.NewOrm()
 	sql := `SELECT
 			art.activity_id,
@@ -588,45 +590,9 @@ func GetScheduleAndSpecilList(condition string, pars []interface{}, conditionSpe
 	if condition != `` {
 		sql += condition
 	}
-	sql += ` UNION ALL
-		SELECT
-			art.activity_id,
-			art.activity_time_text_by_day AS activity_time_text,
-			art.research_theme AS activity_name,
-			art.chart_permission_id,
-			"",
-			art.special_type AS activity_type,
-			art.chart_permission_name,
-			"",
-			"",
-			"",
-			art.trip_img_link_fix AS trip_img_link,
-			art.activity_time_end,
-			"",
-			"",
-			"",
-			"",
-			"",
-			2 AS source_type,
-			art.activity_time,
-			art.days,
-			art.city,
-			"",
-			"",
-			"",
-			"",
-			"",
-			art.host 
-		FROM
-			cygx_activity_special AS art
-			INNER JOIN cygx_activity_special_trip AS my ON my.activity_id = art.activity_id 
-		WHERE
-			1 = 1`
-	if conditionSpecil != "" {
-		sql += conditionSpecil
-	}
+
 	sql += ` ORDER BY activity_time DESC   LIMIT ?,?`
-	_, err = o.Raw(sql, pars, parsSpecil, startSize, pageSize).QueryRows(&items)
+	_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
 	return
 }
 

+ 37 - 36
models/cygx_yanxuan_special.go

@@ -25,42 +25,43 @@ type CygxYanxuanSpecial struct {
 }
 
 type CygxYanxuanSpecialItem struct {
-	Id              int      `orm:"column(id);pk"`
-	UserId          int      // 用户ID
-	SpecialColumnId int      // 专栏栏目ID
-	CreateTime      string   // 创建时间
-	ModifyTime      string   // 修改时间
-	PublishTime     string   // 提审过审或驳回时间
-	Content         string   // 内容
-	Tags            string   // 标签
-	TagList         []string // 标签
-	Status          int      // 1:未发布,2:审核中 3:已发布 4:驳回
-	ImgUrl          string   // 图片链接
-	ImgUrlList      []string // 图片链接
-	DocUrl          string   // 文档链接
-	SpecialName     string   // 专栏名称
-	Introduction    string   // 介绍
-	Label           string   // 标签
-	NickName        string   // 昵称
-	RealName        string   // 姓名
-	Mobile          string   // 手机号
-	HeadImg         string   // 头像
-	BgImg           string   // 背景图
-	Reason          string   // 理由
-	Title           string   // 标题
-	AuthorStatus    int      // 作者状态
-	Type            int      // 类型1:笔记,2:观点
-	CollectNum      int
-	MyCollectNum    int
-	IsCollect       int
-	ContentHasImg   int //正文是否包含图片 1包含 0不包含
-	CompanyTags     string
-	IndustryTags    string
-	Docs            []Doc
-	Annotation      string   `description:"核心观点"`
-	Pv              string   `description:"Pv"`
-	Uv              string   `description:"Uv"`
-	BodyHighlight   []string `description:"搜索高亮展示结果"`
+	Id                  int      `orm:"column(id);pk"`
+	UserId              int      // 用户ID
+	SpecialColumnId     int      // 专栏栏目ID
+	CreateTime          string   // 创建时间
+	ModifyTime          string   // 修改时间
+	PublishTime         string   // 提审过审或驳回时间
+	Content             string   // 内容
+	Tags                string   // 标签
+	TagList             []string // 标签
+	Status              int      // 1:未发布,2:审核中 3:已发布 4:驳回
+	ImgUrl              string   // 图片链接
+	ImgUrlList          []string // 图片链接
+	DocUrl              string   // 文档链接
+	SpecialName         string   // 专栏名称
+	Introduction        string   // 介绍
+	Label               string   // 标签
+	NickName            string   // 昵称
+	RealName            string   // 姓名
+	Mobile              string   // 手机号
+	HeadImg             string   // 头像
+	BgImg               string   // 背景图
+	Reason              string   // 理由
+	Title               string   // 标题
+	AuthorStatus        int      // 作者状态
+	Type                int      // 类型1:笔记,2:观点
+	CollectNum          int
+	MyCollectNum        int
+	IsCollect           int
+	ContentHasImg       int //正文是否包含图片 1包含 0不包含
+	CompanyTags         string
+	IndustryTags        string
+	Docs                []Doc
+	Annotation          string   `description:"核心观点"`
+	Pv                  string   `description:"Pv"`
+	Uv                  string   `description:"Uv"`
+	BodyHighlight       []string `description:"搜索高亮展示结果"`
+	LabelKeywordImgLink string   `description:"标签关键词ico"`
 }
 
 type CygxYanxuanSpecialResp struct {

+ 2 - 1
models/home.go

@@ -84,7 +84,8 @@ type ArticleListResp struct {
 	SpecialColumnId     int      `description:"专栏栏目id"`
 	SpecialType         int      `description:"专栏类型 1:笔记,2:观点"`
 	List                []*IndustrialManagementIdInt
-	TopTime             int `description:"置顶时间"`
+	TopTime             int    `description:"置顶时间"`
+	LabelKeywordImgLink string `description:"标签关键词ico"`
 }
 
 type HomeChartListResp struct {

+ 18 - 18
routers/commentsRouter.go

@@ -52,15 +52,6 @@ func init() {
             Filters: nil,
             Params: nil})
 
-    beego.GlobalControllerRouter["hongze/hongze_web_mfyx/controllers:ActivityController"] = append(beego.GlobalControllerRouter["hongze/hongze_web_mfyx/controllers:ActivityController"],
-        beego.ControllerComments{
-            Method: "Detail",
-            Router: `/detail`,
-            AllowHTTPMethods: []string{"get"},
-            MethodParams: param.Make(),
-            Filters: nil,
-            Params: nil})
-
     beego.GlobalControllerRouter["hongze/hongze_web_mfyx/controllers:ActivityController"] = append(beego.GlobalControllerRouter["hongze/hongze_web_mfyx/controllers:ActivityController"],
         beego.ControllerComments{
             Method: "DetailVideo",
@@ -151,6 +142,15 @@ func init() {
             Filters: nil,
             Params: nil})
 
+    beego.GlobalControllerRouter["hongze/hongze_web_mfyx/controllers:ActivityNoLoginController"] = append(beego.GlobalControllerRouter["hongze/hongze_web_mfyx/controllers:ActivityNoLoginController"],
+        beego.ControllerComments{
+            Method: "Detail",
+            Router: `/detail`,
+            AllowHTTPMethods: []string{"get"},
+            MethodParams: param.Make(),
+            Filters: nil,
+            Params: nil})
+
     beego.GlobalControllerRouter["hongze/hongze_web_mfyx/controllers:ActivityNoLoginController"] = append(beego.GlobalControllerRouter["hongze/hongze_web_mfyx/controllers:ActivityNoLoginController"],
         beego.ControllerComments{
             Method: "LabelTypeList",
@@ -214,15 +214,6 @@ func init() {
             Filters: nil,
             Params: nil})
 
-    beego.GlobalControllerRouter["hongze/hongze_web_mfyx/controllers:ArticleController"] = append(beego.GlobalControllerRouter["hongze/hongze_web_mfyx/controllers:ArticleController"],
-        beego.ControllerComments{
-            Method: "Detail",
-            Router: `/detail`,
-            AllowHTTPMethods: []string{"get"},
-            MethodParams: param.Make(),
-            Filters: nil,
-            Params: nil})
-
     beego.GlobalControllerRouter["hongze/hongze_web_mfyx/controllers:ArticleController"] = append(beego.GlobalControllerRouter["hongze/hongze_web_mfyx/controllers:ArticleController"],
         beego.ControllerComments{
             Method: "ArticleHotList",
@@ -241,6 +232,15 @@ func init() {
             Filters: nil,
             Params: nil})
 
+    beego.GlobalControllerRouter["hongze/hongze_web_mfyx/controllers:ArticleNoLoginController"] = append(beego.GlobalControllerRouter["hongze/hongze_web_mfyx/controllers:ArticleNoLoginController"],
+        beego.ControllerComments{
+            Method: "Detail",
+            Router: `/detail`,
+            AllowHTTPMethods: []string{"get"},
+            MethodParams: param.Make(),
+            Filters: nil,
+            Params: nil})
+
     beego.GlobalControllerRouter["hongze/hongze_web_mfyx/controllers:BannerController"] = append(beego.GlobalControllerRouter["hongze/hongze_web_mfyx/controllers:BannerController"],
         beego.ControllerComments{
             Method: "YxSurvey",

+ 1 - 0
routers/router.go

@@ -59,6 +59,7 @@ func init() {
 		web.NSNamespace("/article",
 			web.NSInclude(
 				&controllers.ArticleController{},
+				&controllers.ArticleNoLoginController{},
 			),
 		),
 		web.NSNamespace("/search",

+ 11 - 0
services/activity.go

@@ -1006,6 +1006,16 @@ func ActivityArrButtonShow(items []*models.ActivityDetail, user *models.WxUserIt
 
 		activityDetail.IsResearchPoints = activityPointsByUserAllMap[activityDetail.ActivityId]
 
+		if activityDetail.ActivityTypeName == "买方线下交流" {
+			activityDetail.LabelKeywordImgLink = utils.LABEL_ICO_1
+		}
+		if activityDetail.ActivityTypeName == "专家电话会" || activityDetail.ActivityTypeName == "专家线下沙龙" {
+			activityDetail.LabelKeywordImgLink = utils.LABEL_ICO_2
+		}
+		if activityDetail.ActivityTypeName == "公司调研电话会" {
+			activityDetail.LabelKeywordImgLink = utils.LABEL_ICO_3
+		}
+
 		v := activityDetail
 		itemActivity := &models.ActivityListResp{
 			ActivityId:              v.ActivityId,
@@ -1078,6 +1088,7 @@ func ActivityArrButtonShow(items []*models.ActivityDetail, user *models.WxUserIt
 			CancelDeadline:          v.CancelDeadline,
 			IsYidongActivity:        v.IsYidongActivity,
 			TopTime:                 v.TopTime,
+			LabelKeywordImgLink:     v.LabelKeywordImgLink,
 		}
 		au := new(models.UserPermissionAuthInfo)
 		au.SellerName = authInfo.SellerName

+ 5 - 38
services/activity_my_schedule.go

@@ -3,20 +3,17 @@ package services
 import (
 	"errors"
 	"hongze/hongze_web_mfyx/models"
-	"hongze/hongze_web_mfyx/utils"
-	"strconv"
-	"time"
 )
 
 // 我的日程 GetScheduleAndSpecilList
 func GetScheduleAndSpecilList(user *models.WxUserItem, condition string, startSize, pageSize int) (items []*models.ActivityDetail, err error) {
-	var conditionSpecil string
-	var pars, parsSpecil []interface{}
+	//var conditionSpecil string
+	var pars []interface{}
 	condition += ` AND my.user_id = ?`
 	pars = append(pars, user.UserId)
-	conditionSpecil += ` AND my.user_id = ? AND my.is_cancel = 0 `
-	parsSpecil = append(parsSpecil, user.UserId)
-	list, e := models.GetScheduleAndSpecilList(condition, pars, conditionSpecil, parsSpecil, startSize, pageSize)
+	//conditionSpecil += ` AND my.user_id = ? AND my.is_cancel = 0 `
+	//parsSpecil = append(parsSpecil, user.UserId)
+	list, e := models.GetScheduleAndSpecilList(condition, pars, startSize, pageSize)
 	if e != nil {
 		err = errors.New("GetScheduleAndSpecilList, Err: " + e.Error())
 		return
@@ -78,36 +75,6 @@ func GetScheduleAndSpecilList(user *models.WxUserItem, condition string, startSi
 		}
 	}
 
-	//处理专项产业调研
-	if len(activitySpecilalIds) > 0 {
-		//处理用户是否报名
-		UserMap, e := GetSpecialTripUserMap(activitySpecilalIds, user.UserId)
-		if e != nil {
-			err = errors.New("GetSpecialTripUserMap, Err: " + e.Error())
-			return
-		}
-		for k, v := range list {
-			if v.SourceType == 2 {
-				if _, ok := UserMap[v.ActivityId]; ok {
-					list[k].IsSignup = 1
-				}
-			}
-		}
-
-		for k, v := range list {
-			if v.SourceType == 2 {
-				resultTimeStart := utils.StrTimeToTime(v.ActivityTime)  //时间字符串格式转时间格式
-				resultTimeEnd := utils.StrTimeToTime(v.ActivityTimeEnd) //时间字符串格式转时间格式
-				if resultTimeStart.After(time.Now()) {
-					list[k].ActiveState = strconv.Itoa(1)
-				} else if time.Now().After(resultTimeEnd) {
-					list[k].ActiveState = strconv.Itoa(3)
-				} else {
-					list[k].ActiveState = strconv.Itoa(2)
-				}
-			}
-		}
-	}
 	items = list
 	return
 }

+ 10 - 0
services/article.go

@@ -162,6 +162,16 @@ func HandleArticleCategoryImg(list []*models.ArticleListResp, user *models.WxUse
 		if v.ArticleTypeId > 0 {
 			list[k].IsResearch = true
 		}
+
+		//是不是研选报告
+		if v.ArticleTypeId > 0 {
+			list[k].IsResearch = true
+			if v.ArticleTypeId == 12 {
+				list[k].LabelKeywordImgLink = utils.LABEL_ICO_6
+			} else {
+				list[k].LabelKeywordImgLink = utils.LABEL_ICO_5
+			}
+		}
 	}
 
 	articleIds := make([]int, 0)

+ 1 - 231
services/es_comprehensive.go

@@ -13,7 +13,6 @@ import (
 	"errors"
 	"html"
 	"strings"
-	"time"
 )
 
 type SearchComprehensiveItem struct {
@@ -412,95 +411,6 @@ func GetResourceDataEsList(list []*SearchComprehensiveItem, user *models.WxUserI
 		}
 	}
 
-	//处理晨会精华
-	if len(meetingreviewchaptIds) > 0 {
-		//pars = make([]interface{}, 0)
-		//condition = ` AND c.id IN (` + utils.GetOrmInReplace(len(meetingreviewchaptIds)) + `)`
-		//pars = append(pars, meetingreviewchaptIds)
-
-		listrMeet, e := GetCygxMorningMeetingReviewChapterListByIds(meetingreviewchaptIds)
-		if e != nil {
-			err = errors.New("GetCygxMorningMeetingReviewChapterListByIds, Err: " + e.Error())
-			return
-		}
-		for _, v := range listrMeet {
-			v.Content = AnnotationHtml(v.Content)
-			v.PublishTime = utils.TimeRemoveHms2(v.PublishTime)
-			mapItems[fmt.Sprint("meetingreviewchapt", v.Id)].Meetingreviewchapt = v
-		}
-	}
-
-	//处理上周纪要汇总
-	if len(minutessummaryIds) > 0 {
-		pars = make([]interface{}, 0)
-		condition = ` AND article_id IN (` + utils.GetOrmInReplace(len(minutessummaryIds)) + `)`
-		pars = append(pars, minutessummaryIds)
-
-		listresearchsummary, e := models.GetReportSelectionListHome(condition, "cygx_minutes_summary", pars, 0, len(minutessummaryIds))
-		if e != nil {
-			err = errors.New("GetResourceDataList, Err: " + e.Error())
-			return
-		}
-		for _, v := range listresearchsummary {
-			v.PublishDate = utils.TimeRemoveHms2(v.PublishDate)
-			mapItems[fmt.Sprint("minutessummary", v.ArticleId)].Minutessummary = v
-		}
-	}
-
-	//处理本周纪要汇总
-	if len(researchsummaryIds) > 0 {
-		pars = make([]interface{}, 0)
-		condition = ` AND article_id IN (` + utils.GetOrmInReplace(len(researchsummaryIds)) + `)`
-		pars = append(pars, researchsummaryIds)
-
-		listresearchsummary, e := models.GetReportSelectionListHome(condition, "cygx_research_summary", pars, 0, len(researchsummaryIds))
-		if e != nil {
-			err = errors.New("GetReportSelectionListHome, Err: " + e.Error())
-			return
-		}
-		for _, v := range listresearchsummary {
-			v.PublishDate = utils.TimeRemoveHms2(v.PublishDate)
-			mapItems[fmt.Sprint("researchsummary", v.ArticleId)].Researchsummary = v
-		}
-	}
-
-	//处理产品内测
-	if len(productinteriorIds) > 0 {
-		pars = make([]interface{}, 0)
-		condition = `  AND art.status = 1 AND art.product_interior_id  IN (` + utils.GetOrmInReplace(len(productinteriorIds)) + `)`
-		pars = append(pars, productinteriorIds)
-		listProductInterior, e := models.GetCygxProductInteriorList(condition, pars, 0, len(productinteriorIds))
-		if e != nil {
-			err = errors.New("GetCygxProductInteriorList, Err: " + e.Error())
-			return
-		}
-		for _, v := range listProductInterior {
-			v.Body = ProductInteriorHtml(v.Body)
-			v.PublishTime = utils.TimeRemoveHms2(v.PublishTime)
-			mapItems[fmt.Sprint("productinterior", v.ProductInteriorId)].ProductInterior = v
-		}
-	}
-	//处理报告精选
-	lenreportselectionIds := len(reportselectionIds)
-	if lenreportselectionIds > 0 {
-		pars = make([]interface{}, 0)
-		condition = ` AND article_id IN (` + utils.GetOrmInReplace(lenreportselectionIds) + `)`
-		pars = append(pars, reportselectionIds)
-		listreportselection, e := models.GetReportSelectionList(condition, pars, 0, lenreportselectionIds)
-		if e != nil {
-			err = errors.New("GetReportSelectionList, Err: " + e.Error())
-			return
-		}
-		mapPv := GetCygxReportHistoryRecordListMap(reportselectionIds, "bgjx")
-		for _, v := range listreportselection {
-			v.Title += "(第" + v.Periods + "期)"
-			v.MarketStrategy = AnnotationHtml(v.MarketStrategy)
-			v.PublishDate = utils.TimeRemoveHms2(v.PublishDate)
-			v.Pv = mapPv[v.ArticleId]
-			mapItems[fmt.Sprint("reportselection", v.ArticleId)].ReportSelection = v
-		}
-	}
-
 	//处理活动
 	if len(activityIds) > 0 {
 		for _, vss := range activityIds {
@@ -547,147 +457,6 @@ func GetResourceDataEsList(list []*SearchComprehensiveItem, user *models.WxUserI
 		}
 	}
 
-	//产业资源包
-	if len(industrialResourceIdsHz) > 0 {
-		pars = make([]interface{}, 0)
-
-		var industrialResourceIdstring []string
-		for _, v := range industrialResourceIdsHz {
-			industrialResourceIdstring = append(industrialResourceIdstring, strconv.Itoa(v))
-		}
-		industrialId := strings.Join(industrialResourceIdstring, ",")
-		condition = ` AND  m.industrial_management_id IN  (` + industrialId + `)  AND a.article_type_id = 0 `
-		listIndustrialResourceIds, e := models.GetSearchResourceList(condition)
-		if e != nil {
-			err = errors.New("GetSearchResourceList, Err: " + e.Error())
-			return
-		}
-		conditionSubject := condition + ` AND 	m.industrial_management_id  IN (` + utils.GetOrmInReplace(len(industrialResourceIdsHz)) + `)`
-		pars = append(pars, industrialResourceIdsHz)
-		listSubjcet, e := models.GetIndustrialSubjectAllByIndustrialId(pars, conditionSubject)
-		//合并产业关联的标的
-		if e != nil {
-			e = errors.New("GetIndustrialSubjectAllByIndustrialId, Err: " + e.Error())
-			return
-		}
-		mapIndustrial := make(map[string]int)
-		for _, v := range listSubjcet {
-			for k2, v2 := range listIndustrialResourceIds {
-				if v2.IndustrialManagementId == v.IndustrialManagementId && mapIndustrial[fmt.Sprint(v2.IndustrialManagementId, v.SubjectName)] == 0 {
-					listIndustrialResourceIds[k2].IndustrialSubjectList = append(listIndustrialResourceIds[k2].IndustrialSubjectList, v)
-					mapIndustrial[fmt.Sprint(v2.IndustrialManagementId, v.SubjectName)] = 1
-				}
-			}
-		}
-		//listIndustrialResourceIds, _ = HandleIndustryList(listIndustrialResourceIds, user, "Hz")
-		for _, v := range listIndustrialResourceIds {
-			v.Source = 1
-			v.UpdateTime = v.PublishDate
-			mapItems[fmt.Sprint("industrialsourceHz", v.IndustrialManagementId)].IndustrialResource = v
-		}
-	}
-
-	//产业资源包
-	if len(industrialResourceIdsYx) > 0 {
-		pars = make([]interface{}, 0)
-
-		var industrialResourceIdstring []string
-		for _, v := range industrialResourceIdsYx {
-			industrialResourceIdstring = append(industrialResourceIdstring, strconv.Itoa(v))
-		}
-		industrialId := strings.Join(industrialResourceIdstring, ",")
-		condition = ` AND  m.industrial_management_id IN  (` + industrialId + `)  AND a.article_type_id > 0 `
-		listIndustrialResourceIds, e := models.GetSearchResourceList(condition)
-		if e != nil {
-			err = errors.New("GetSearchResourceList, Err: " + e.Error())
-			return
-		}
-		fmt.Println(listIndustrialResourceIds)
-		conditionSubject := condition + ` AND 	m.industrial_management_id  IN (` + utils.GetOrmInReplace(len(industrialResourceIdsYx)) + `)`
-		pars = append(pars, industrialResourceIdsYx)
-		listSubjcet, e := models.GetIndustrialSubjectAllByIndustrialId(pars, conditionSubject)
-		//合并产业关联的标的
-		if e != nil {
-			e = errors.New("GetIndustrialSubjectAllByIndustrialId, Err: " + e.Error())
-			return
-		}
-		mapIndustrial := make(map[string]int)
-		for _, v := range listSubjcet {
-			for k2, v2 := range listIndustrialResourceIds {
-				if v2.IndustrialManagementId == v.IndustrialManagementId && mapIndustrial[fmt.Sprint(v2.IndustrialManagementId, v.SubjectName)] == 0 {
-					listIndustrialResourceIds[k2].IndustrialSubjectList = append(listIndustrialResourceIds[k2].IndustrialSubjectList, v)
-					mapIndustrial[fmt.Sprint(v2.IndustrialManagementId, v.SubjectName)] = 1
-				}
-			}
-		}
-		//listIndustrialResourceIds, _ = HandleIndustryList(listIndustrialResourceIds, user, "Yx")
-		for _, v := range listIndustrialResourceIds {
-			v.Source = 2
-			v.UpdateTime = v.PublishDate
-			mapItems[fmt.Sprint("industrialsourceYx", v.IndustrialManagementId)].IndustrialResource = v
-		}
-	}
-
-	//处理图表
-	if len(newchartIds) > 0 {
-		pars = make([]interface{}, 0)
-		condition = ` AND a.chart_id IN (` + utils.GetOrmInReplace(len(newchartIds)) + `)`
-		pars = append(pars, newchartIds)
-		chartDateList, e := models.GetChartListCollection(condition, pars, uid, 0, len(newchartIds))
-		if e != nil {
-			err = errors.New("GetResourceDataList, Err: " + e.Error())
-			return
-		}
-		for _, v := range chartDateList {
-			mapItems[fmt.Sprint("newchart", v.ChartId)].Newchart = v
-		}
-	}
-
-	//处理专项调研
-	if len(activityspecialIds) > 0 {
-		pars = make([]interface{}, 0)
-		condition = ` AND art.activity_id IN (` + utils.GetOrmInReplace(len(activityspecialIds)) + `)`
-		pars = append(pars, activityspecialIds)
-		activitySpeciallist, e := models.GetCygxActivitySpecialDetailList(condition, pars, user.UserId, 0, len(activityspecialIds))
-		if e != nil {
-			err = errors.New("GetCygxActivitySpecialDetailList, Err: " + e.Error())
-			return
-		}
-		UserMap, e := GetSpecialTripUserMap(activityspecialIds, user.UserId)
-		if e != nil {
-			err = errors.New("GetSpecialTripUserMap, Err: " + e.Error())
-			return
-		}
-		for _, v := range activitySpeciallist {
-			if mapChart[v.ChartPermissionName] != "" {
-				imgUrlResp = mapChart[v.ChartPermissionName]
-			}
-			if _, ok := UserMap[v.ActivityId]; ok {
-				v.IsTrip = 1
-			}
-			if v.Days == 0 {
-				v.TripStatus = 1
-				v.TripImgLink = v.TripImgLink
-			} else {
-				v.TripStatus = 2
-				v.TripImgLink = v.TripImgLinkFix
-				v.ActivityTimeText = v.ActivityTimeTextByDay
-			}
-			resultTimeStart := utils.StrTimeToTime(v.ActivityTime)  //时间字符串格式转时间格式
-			resultTimeEnd := utils.StrTimeToTime(v.ActivityTimeEnd) //时间字符串格式转时间格式
-			if resultTimeStart.After(time.Now()) {
-				v.ActiveState = "1"
-			} else if time.Now().After(resultTimeEnd) {
-				v.ActiveState = "3"
-			} else {
-				v.ActiveState = "2"
-			}
-			v.ImgUrl = imgUrlResp
-			mapItems[fmt.Sprint("activityspecial", v.ActivityId)].Activityspecial = v
-
-		}
-	}
-
 	//处理路演 处理路活动视频 处理路活音频
 	if len(roadshowIds)+len(activityvideoIds)+len(activityvoiceIds)+len(askserieVideoIds) > 0 {
 
@@ -799,6 +568,7 @@ func GetResourceDataEsList(list []*SearchComprehensiveItem, user *models.WxUserI
 				v.BodyHighlight = append(v.BodyHighlight, v.Annotation)
 			}
 			v.Annotation = "" //强制置空,兼容前端优先级
+			v.LabelKeywordImgLink = utils.LABEL_ICO_4
 			mapItems[fmt.Sprint(utils.CYGX_OBJ_YANXUANSPECIAL, v.Id)].YanxuanSpecial = v
 		}
 	}

+ 9 - 0
utils/constants.go

@@ -285,3 +285,12 @@ const (
 	LABEL_L3_2 string = "主题b"     // 主题b
 	LABEL_L3_3 string = "主题c"     // 主题c
 )
+
+const (
+	LABEL_ICO_1 string = "https://hzstatic.hzinsights.com/mfyx/config/maifangjiaoliu.png"           // 买方交流
+	LABEL_ICO_2 string = "https://hzstatic.hzinsights.com/mfyx/config/zhuanjiadiaoyan.png"          // 专家访谈
+	LABEL_ICO_3 string = "https://hzstatic.hzinsights.com/mfyx/config/shangshigongsixiaofanwei.png" // 上市公司小范围
+	LABEL_ICO_4 string = "https://hzstatic.hzinsights.com/mfyx/config/zhuanlan.png"                 // 专栏
+	LABEL_ICO_5 string = "https://hzstatic.hzinsights.com/mfyx/config/jiyao.png"                    // 纪要
+	LABEL_ICO_6 string = "https://hzstatic.hzinsights.com/mfyx/config/maifangshalong.png"           // 买方沙龙
+)