Browse Source

no message

xingzai 2 months ago
parent
commit
7b69429f6a
1 changed files with 4 additions and 1 deletions
  1. 4 1
      services/industrial_subject.go

+ 4 - 1
services/industrial_subject.go

@@ -68,7 +68,7 @@ func GetArticleGroupSubjectMapByIndustrialManagementId(articleIds []int, industr
 
 	var condition string
 	var pars []interface{}
-	condition += `  article_id IN (` + utils.GetOrmInReplace(len(articleIds)) + `) `
+	condition += ` AND  article_id IN (` + utils.GetOrmInReplace(len(articleIds)) + `) `
 	pars = append(pars, articleIds)
 	articleList, e := models.GetArticleList(condition, pars)
 	if e != nil {
@@ -83,6 +83,9 @@ func GetArticleGroupSubjectMapByIndustrialManagementId(articleIds []int, industr
 			sliceKuohao := strings.Split(vSubject, "(")           //过滤括号
 			sliceXiahuaxian := strings.Split(sliceKuohao[0], "-") //过滤下划线
 			subject := sliceXiahuaxian[0]
+			if mapSubject[subject] == 0 {
+				continue
+			}
 			item := models.CygxIndustrialSubject{
 				IndustrialSubjectId:    mapSubject[subject],
 				IndustrialManagementId: industrialManagementId,