Quellcode durchsuchen

wip:行业其它

wangshan vor 1 Jahr
Ursprung
Commit
be62ee764b
1 geänderte Dateien mit 16 neuen und 0 gelöschten Zeilen
  1. 16 0
      common/src/qfw/util/jy/jy.go

+ 16 - 0
common/src/qfw/util/jy/jy.go

@@ -460,3 +460,19 @@ func KeywordsProcessing(keywords, sep string) string {
 	}
 	return strings.Join(newWords, sep)
 }
+
+// 行业分类 其它分类处理
+var industryQT = "其它"
+
+func IndustryHandle(industry string) (it []string) {
+	for _, v := range strings.Split(industry, ",") {
+		if strings.Contains(v, "其他") {
+			var iqt = industryQT
+			if len(strings.Split(v, "_")) > 1 {
+				iqt = fmt.Sprintf("%s_%s", strings.Split(v, "_")[0], industryQT)
+			}
+			it = append(it, iqt)
+		}
+	}
+	return
+}