zhangchuanxing 3 ay önce
ebeveyn
işleme
d374a9b350

+ 6 - 3
controllers/report_selection.go

@@ -162,7 +162,9 @@ func (this *ReportSelectionController) Detail() {
 							v2.CompanyLabel = append(v2.CompanyLabel, vCompanyLabel+"#")
 						}
 					}
-					if v2.SubjectName == "" {
+					if v2.ThirdName != "" {
+						v2.ShowName = v2.ThirdName
+					} else if v2.SubjectName == "" {
 						v2.ShowName = v2.IndustrialManagementNames
 					} else {
 						v2.ShowName = v2.SubjectName
@@ -177,7 +179,7 @@ func (this *ReportSelectionController) Detail() {
 				if subjectItem.SubjectName == "" {
 					subjectItem.SubjectName = subjectItem.IndustrialManagementName
 				}
-				subjectItem.Md5String = utils.MD5(fmt.Sprint("IN_ID", v2.IndustrialManagementId, "S_ID", v2.IndustrialSubjectId))
+				subjectItem.Md5String = utils.MD5(fmt.Sprint("IN_ID", v2.IndustrialManagementId, "S_ID", v2.IndustrialSubjectId, "T_ID", v2.ThirdId))
 				v2.Md5String = subjectItem.Md5String
 
 				itemSubject.ListSubject = append(itemSubject.ListSubject, subjectItem)
@@ -251,7 +253,7 @@ func (this *ReportSelectionController) ClickHistory() {
 		br.ErrMsg = "文章不存在,文章ID错误"
 		return
 	}
-	if req.IndustrialSubjectId+req.IndustrialManagementId <= 0 {
+	if req.IndustrialSubjectId+req.IndustrialManagementId+req.ThirdId <= 0 {
 		br.Msg = "标的ID不存在"
 		br.ErrMsg = "产业或标的ID不存在"
 		return
@@ -267,6 +269,7 @@ func (this *ReportSelectionController) ClickHistory() {
 		CompanyName:            user.CompanyName,
 		IndustrialSubjectId:    req.IndustrialSubjectId,
 		IndustrialManagementId: req.IndustrialManagementId,
+		ThirdId:                req.ThirdId,
 		RegisterPlatform:       utils.REGISTER_PLATFORM,
 	}
 	err = models.AddCygxReportSelectionSubjectHistory(&item)

+ 2 - 0
models/report_selection.go

@@ -87,6 +87,8 @@ type CygxReportSelectionLogDetail struct {
 	Label                     string   `description:"公司标签"`
 	OverviewArticleId         int      `description:"综述报告Id"`
 	IsShowOverviewArticle     int      `description:"是否展示综述报告 1展示,0隐藏"`
+	ThirdId                   int      `description:"类似产业、标的的三方ID"`
+	ThirdName                 string   `description:"类似产业、标的的三方名称"`
 	Md5String                 string   `description:"Md5唯一标识"`
 	ShowName                  string   `description:"展示名称"`
 	List                      []*IndustriaReportSelection

+ 2 - 0
models/report_selection_subject_history.go

@@ -17,6 +17,7 @@ type CygxReportSelectionSubjectHistory struct {
 	CompanyName            string    `description:"公司名称"`
 	IndustrialSubjectId    int       `description:"标的ID"`
 	IndustrialManagementId int       `description:"产业Id"`
+	ThirdId                int       `description:"类似产业、标的的三方ID"`
 	RegisterPlatform       int       `description:"来源 1小程序,2:网页"`
 }
 
@@ -24,6 +25,7 @@ type AddCygxReportSelectionSubjectHistoryReq struct {
 	ArticleId              int `description:"文章id"`
 	IndustrialSubjectId    int `description:"标的ID"`
 	IndustrialManagementId int `description:"产业Id"`
+	ThirdId                int `description:"类似产业、标的的三方ID"`
 }
 
 // 添加