zhangchuanxing 6 місяців тому
батько
коміт
71f68d7f07
2 змінених файлів з 8 додано та 1 видалено
  1. 7 0
      services/tag.go
  2. 1 1
      utils/config.go

+ 7 - 0
services/tag.go

@@ -63,6 +63,7 @@ func GetConditionInitByTagIds(tagIds string, chartPermissionId int) (conditionIn
 	}
 
 	var tagType int // 定义特殊标签的类型,判断传过来的参数是否有固定标签的搜索
+	var tagName string
 	for _, tagInfo := range listTag {
 		//ActivityTypes 与 ArticleTypes 进行合并
 		if tagInfo.ActivityTypes != "" {
@@ -95,6 +96,7 @@ func GetConditionInitByTagIds(tagIds string, chartPermissionId int) (conditionIn
 		if tagType == 0 && tagInfo.TagType > 0 {
 			tagType = tagInfo.TagType
 		}
+		tagName = tagInfo.TagName
 	}
 
 	switch tagType {
@@ -184,6 +186,11 @@ func GetConditionInitByTagIds(tagIds string, chartPermissionId int) (conditionIn
 			}
 			conditionInit += " AND id IN  (" + strings.Join(resourceDataIdStrs, ",") + ")   "
 		}
+
+		var tagNames = []string{"纪要", "深度", "概览", "点评"}
+		if utils.InArrayByStr(tagNames, tagName) { //如果是这个四个类型的标签搜索单独针对FICC研报的周期行业进行筛选
+			conditionInit += " OR (  tag_name IN ('" + tagName + "')   AND  chart_permission_id =   " + strconv.Itoa(chartPermissionId) + ")  "
+		}
 	case 1: // 热门活动
 		conf, e := models.GetConfigByCode(utils.CYGX_TAG_HOT_ACTIVITY_ID)
 		if e != nil {

+ 1 - 1
utils/config.go

@@ -335,7 +335,7 @@ func YiDongApiConfig() {
 	}
 }
 
-// 行业ID信息 易董开放api配置
+// 行业ID信息
 func ChartPermissionId() {
 	if RunMode == "release" {
 		ZHOU_QI_ID = 62