|
@@ -628,6 +628,10 @@ func ReportSelectionWxUserRaiLabelRedisAddReduce(log models.WxUserRaiLabelRedis)
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+//func init() {
|
|
|
+// GetArticlelabelArrByArticleId(11796)
|
|
|
+//}
|
|
|
+
|
|
|
func GetArticlelabelArrByArticleId(articleId int) (labelArr []string, sourceType int) {
|
|
|
articleDetail, e := models.GetArticleDetailTestById(articleId)
|
|
|
if e != nil {
|
|
@@ -667,26 +671,26 @@ func GetArticlelabelArrByArticleId(articleId int) (labelArr []string, sourceType
|
|
|
return
|
|
|
}
|
|
|
articlePermissionName := articlePermission.PermissionName
|
|
|
- matchTypeName := articlePermission.MatchTypeName
|
|
|
+ subCategoryName := articleDetail.SubCategoryName
|
|
|
matchTypeNameArr := []string{"季度策略", "科技前沿(周报)", "本周荟", "智造精粹"}
|
|
|
|
|
|
//1;四大行业汇总类报告:季度策略、科技前沿(周报)、本周荟、智造精粹以报告类型做标签
|
|
|
//2:策略、固收的所有报告,以报告类型做标签
|
|
|
//var labelArr []string
|
|
|
- if articlePermissionName == utils.CE_LUE_NAME || articlePermissionName == utils.GU_SHOU_NAME || utils.InArrayByStr(matchTypeNameArr, matchTypeName) { // 策略、固收的所有报告,以报告类型做标签
|
|
|
- if matchTypeName == "季度策略" {
|
|
|
- matchTypeName = articlePermissionName + matchTypeName //其中季度策略以:xx行业季度策略 呈现
|
|
|
+ if articlePermissionName == utils.CE_LUE_NAME || articlePermissionName == utils.GU_SHOU_NAME || utils.InArrayByStr(matchTypeNameArr, subCategoryName) { // 策略、固收的所有报告,以报告类型做标签
|
|
|
+ if subCategoryName == "季度策略" {
|
|
|
+ subCategoryName = articlePermissionName + subCategoryName //其中季度策略以:xx行业季度策略 呈现
|
|
|
}
|
|
|
- labelArr = append(labelArr, matchTypeName)
|
|
|
+ labelArr = append(labelArr, subCategoryName)
|
|
|
sourceType = 8
|
|
|
} else if articlePermissionName == utils.ZHOU_QI_NAME {
|
|
|
//周期的行业深度、调研纪要、产业跟踪这些系列的报告用领域做标签,其余的周期报告,都用报告类型(也就是ficc定义的类型)做标签
|
|
|
//其中周期的周度观点,以 周期周度观点 呈现
|
|
|
matchTypeNameArrZhouqi := []string{"行业深度", "调研纪要", "产业跟踪"}
|
|
|
- if utils.InArrayByStr(matchTypeNameArrZhouqi, matchTypeName) {
|
|
|
- matchTypeName = articleDetail.FieldName
|
|
|
+ if utils.InArrayByStr(matchTypeNameArrZhouqi, subCategoryName) {
|
|
|
+ subCategoryName = articleDetail.FieldName
|
|
|
}
|
|
|
- labelArr = append(labelArr, matchTypeName)
|
|
|
+ labelArr = append(labelArr, subCategoryName)
|
|
|
sourceType = 8
|
|
|
} else {
|
|
|
|