Browse Source

限制报告类型

xiexiaoyuan 2 years ago
parent
commit
363891ffb4
2 changed files with 5 additions and 1 deletions
  1. 1 1
      controllers/english_report.go
  2. 4 0
      services/english_policy_report.go

+ 1 - 1
controllers/english_report.go

@@ -22,7 +22,7 @@ func (c *EnglishReportController) PublishNotify()  {
 		return
 	}
 	if id == 0 {
-		go services.PullEnglishPolicyReportAll()
+		//go services.PullEnglishPolicyReportAll()
 		c.FailWithMessage("请输入id")
 		return
 	}

+ 4 - 0
services/english_policy_report.go

@@ -191,6 +191,10 @@ func PullEnglishPolicyReportSingle(sourceId int) (ret tables.PullEnglishPolicyDa
 		err = e
 		return
 	}
+	if originDetail.IndustryId != 1 || originDetail.FieldId != 1 || originDetail.TypeId !=9 {
+		// 类型不匹配,当前只获取英文策略报告
+		return
+	}
 	tmp := &tables.EnglishPolicyReport{
 		ClassifyIdFirst:    originDetail.Industry.Id,
 		ClassifyNameFirst:  originDetail.Industry.Description,