Browse Source

Merge branch 'hotfix/english_report_policy' of hongze/hongze_open_api into master

xyxie 1 year ago
parent
commit
f3d12db373
1 changed files with 7 additions and 7 deletions
  1. 7 7
      services/english_policy_report.go

+ 7 - 7
services/english_policy_report.go

@@ -92,7 +92,7 @@ type EnPolicyReportDataListItemAuthor struct {
 }
 
 // PullEnglishPolicyReportSingle 根据报告ID 拉取报告
-func PullEnglishPolicyReportSingle(sourceId int) (ret tables.PullEnglishPolicyDataResp, err error, msg string)  {
+func PullEnglishPolicyReportSingle(sourceId int) (ret tables.PullEnglishPolicyDataResp, err error, msg string) {
 	defer func() {
 		if err != nil {
 			go alarm_msg.SendAlarmMsg("拉取单个英文策略报告失败,Err:"+err.Error()+";msg:"+msg, 3)
@@ -104,11 +104,11 @@ func PullEnglishPolicyReportSingle(sourceId int) (ret tables.PullEnglishPolicyDa
 	if err != nil {
 		if err.Error() == utils.ErrNoRow() {
 			err = nil
-		}else{
+		} else {
 			msg = "查询已存在的英文策略报告列表接口失败"
 			return
 		}
-	}else{
+	} else {
 		// 该报告已存在
 		return
 	}
@@ -118,7 +118,7 @@ func PullEnglishPolicyReportSingle(sourceId int) (ret tables.PullEnglishPolicyDa
 		err = e
 		return
 	}
-	if originDetail.IndustryId != 1 || originDetail.FieldId != 1 || originDetail.TypeId !=9 {
+	if originDetail.IndustryId != 1 || originDetail.FieldId != 1 || originDetail.TypeId != 9 {
 		// 类型不匹配,当前只获取英文策略报告
 		return
 	}
@@ -194,8 +194,8 @@ func EnglishPolicyReportSync(id int) (err error, errMsg string) {
 		return
 	}
 	//新增英文研报
-	classifyNameFirst := "Macro"
-	classifySecondName := "China A-share Daily Check-in"
+	classifyNameFirst := "Equity"
+	classifySecondName := "A-share Daily"
 
 	// 根据分类名称查询分类ID
 	classifyInfo, err := tables.GetEnglishClassifyByClassifyNameAndParentName(classifyNameFirst, classifySecondName)
@@ -312,4 +312,4 @@ func TestDebugEnglishPolicyReport(id int) (err error) {
 		return
 	}
 	return
-}
+}