zhangchuanxing 3 місяців тому
батько
коміт
0c9c5bf94a

+ 8 - 1
controllers/cygx/report_selection.go

@@ -1030,7 +1030,11 @@ func (this *ReportSelectionController) History() {
 	}
 	mapSubjectHistory := make(map[string]int)    // 标的点击数量
 	mapIndustrialHistory := make(map[string]int) // 产业点击数量
+	mapThirdIdHistory := make(map[int]int)       // 三方产业点击数量
 	for _, v := range listSelectionSubjectHistory {
+		if v.ThirdId > 0 {
+			mapThirdIdHistory[v.ThirdId]++
+		}
 		mapSubjectHistory[v.IndustrialSubjectId]++
 		if v.IndustrialSubjectId == "0" && v.IndustrialManagementId > 0 {
 			mapIndustrialHistory[strconv.Itoa(v.IndustrialManagementId)]++
@@ -1044,7 +1048,10 @@ func (this *ReportSelectionController) History() {
 		for _, v2 := range listSelectionLog {
 			if v.ChartPermissionName == v2.PermissionName {
 				item := new(cygx.HistoryReportSelectionLogResp)
-				if (v2.IndustrialSubjectId == "" || v2.IndustrialSubjectId == "0") && v2.IndustrialManagementId != "" {
+				if v2.ThirdId > 0 {
+					item.SubjectName = v2.ThirdName
+					item.Count = mapThirdIdHistory[v2.ThirdId]
+				} else if (v2.IndustrialSubjectId == "" || v2.IndustrialSubjectId == "0") && v2.IndustrialManagementId != "" {
 					item.SubjectName = v2.IndustrialManagementNames
 					item.Count = mapIndustrialHistory[v2.IndustrialManagementId]
 				} else {

+ 2 - 0
models/cygx/report_selection_log.go

@@ -112,6 +112,8 @@ type CygxReportSelectionLoglist struct {
 	IndustrialManagementId    string    `description:"产业资源包Id  多个用 , 隔开"`
 	IndustrialManagementNames string    `description:"产业资源包名称  多个用 , 隔开"`
 	SubjectName               string    `description:"标的名称"`
+	ThirdId                   int       `description:"类似产业、标的的三方ID"`
+	ThirdName                 string    `description:"类似产业、标的的三方名称"`
 	IcoLink                   string    `orm:"column(image_url)"description:"图标链接"`
 	OverviewArticleId         int       `description:"关联的综述报告ID"`
 	IsNew                     int       `description:"是否为New标签"`

+ 1 - 0
models/cygx/report_selection_subject_history.go

@@ -17,6 +17,7 @@ type CygxReportSelectionSubjectHistory struct {
 	CompanyName            string    `description:"公司名称"`
 	IndustrialSubjectId    string    `description:"标的ID"`
 	IndustrialManagementId int       `description:"产业ID"`
+	ThirdId                int       `description:"类似产业、标的的三方ID"`
 }
 
 // 列表