|
@@ -672,8 +672,7 @@ func GetArticleListByApi(cont context.Context) (err error) {
|
|
|
}
|
|
|
|
|
|
//func init() {
|
|
|
-//
|
|
|
-// HandleArticleListByApi(7214)
|
|
|
+// HandleArticleListByApi(7164)
|
|
|
//}
|
|
|
|
|
|
//处理同步过来的文章
|
|
@@ -989,6 +988,7 @@ func HandleArticleListByApi(artcleId int) (err error) {
|
|
|
var keyword4 string
|
|
|
sliceSubjects := strings.Split(v.Stock, "/")
|
|
|
mapManagementForSubject := make(map[string]string)
|
|
|
+ mapIndustrialId := make(map[int]int)
|
|
|
if len(sliceSubjects) > 0 {
|
|
|
for _, vSubject := range sliceSubjects {
|
|
|
sliceKuohao := strings.Split(vSubject, "(") //过滤括号
|
|
@@ -1014,10 +1014,14 @@ func HandleArticleListByApi(artcleId int) (err error) {
|
|
|
subjectStr = "【" + subjectStr + "】"
|
|
|
if len(listIndustrial) > 0 {
|
|
|
for _, vIndustrial := range listIndustrial {
|
|
|
- industrialManagementIdStr += strconv.Itoa(vIndustrial.IndustrialManagementId) + ","
|
|
|
+ if _, ok := mapIndustrialId[vIndustrial.IndustrialManagementId]; !ok {
|
|
|
+ industrialManagementIdStr += strconv.Itoa(vIndustrial.IndustrialManagementId) + ","
|
|
|
+ }
|
|
|
+ mapIndustrialId[vIndustrial.IndustrialManagementId] = vIndustrial.IndustrialManagementId
|
|
|
industrialSubjectIdStr += strconv.Itoa(vIndustrial.IndustrialSubjectId) + ","
|
|
|
mapManagementForSubject[vIndustrial.IndustryName] += vIndustrial.SubjectName + "/"
|
|
|
}
|
|
|
+
|
|
|
industrialManagementIdStr = strings.TrimRight(industrialManagementIdStr, ",")
|
|
|
industrialSubjectIdStr = strings.TrimRight(industrialSubjectIdStr, ",")
|
|
|
if industrialManagementIdStr != "" {
|