Browse Source

no message

zhangchuanxing 3 tháng trước cách đây
mục cha
commit
5b72e6d4a6

+ 11 - 24
controllers/report_selection.go

@@ -172,14 +172,22 @@ func (this *ReportSelectionController) Detail() {
 						v2.ShowName = v2.SubjectName
 					}
 				}
+				if v2.ThirdName != "" {
+					v2.ShowName = v2.ThirdName
+				}
 				subjectItem := new(models.ReportSelectionChartLogSubjectName)
 				subjectItem.SubjectName = v2.SubjectName
 				subjectItem.IsNew = v2.IsNew
 				subjectItem.IndustrialSubjectId = v2.IndustrialSubjectId
 				subjectItem.IndustrialManagementId, _ = strconv.Atoi(v2.IndustrialManagementId)
 				subjectItem.IndustrialManagementName = v2.IndustrialManagementNames
-				if subjectItem.SubjectName == "" {
-					subjectItem.SubjectName = subjectItem.IndustrialManagementName
+				subjectItem.ThirdId = v2.ThirdId
+				if v2.ThirdName != "" {
+					subjectItem.SubjectName = v2.ThirdName
+				} else {
+					if subjectItem.SubjectName == "" {
+						subjectItem.SubjectName = subjectItem.IndustrialManagementName
+					}
 				}
 				subjectItem.Md5String = utils.MD5(fmt.Sprint("IN_ID", v2.IndustrialManagementId, "S_ID", v2.IndustrialSubjectId))
 				v2.Md5String = subjectItem.Md5String
@@ -196,28 +204,6 @@ func (this *ReportSelectionController) Detail() {
 		}
 		existMap[v.ChartPermissionId] = v.ChartPermissionId
 	}
-
-	//historyRecord := new(models.CygxReportHistoryRecord)
-	//historyRecord.UserId = uid
-	//historyRecord.ArticleId = articleId
-	//historyRecord.CreateTime = time.Now()
-	//historyRecord.Mobile = user.Mobile
-	//historyRecord.Email = user.Email
-	//historyRecord.CompanyId = user.CompanyId
-	//historyRecord.CompanyName = user.CompanyName
-	//historyRecord.ReportType = "bgjx"
-	//sellerItem, err := models.GetSellerByCompanyIdCheckFicc(user.CompanyId, 2)
-	//if err != nil && err.Error() != utils.ErrNoRow() {
-	//	br.Msg = "获取信息失败"
-	//	br.ErrMsg = "获取销售信息失败,Err:" + err.Error()
-	//	return
-	//}
-	//historyRecord.RealName = user.RealName
-	//if sellerItem != nil {
-	//	historyRecord.SellerName = sellerItem.RealName
-	//}
-	//
-	//go models.AddCygxReportHistoryRecord(historyRecord)
 	resp.List = items
 	resp.ListPermissionSubject = itemsSubject
 	resp.Detail = detail
@@ -271,6 +257,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)

+ 4 - 0
models/report_selection.go

@@ -71,6 +71,8 @@ type ReportSelectionChartLogSubjectName struct {
 	IndustrialSubjectId      int    `description:"标的ID"`
 	IndustrialManagementId   int    `description:"产业Id"`
 	IndustrialManagementName string `description:"产业资源包名称"`
+	ThirdId                  int    `description:"类似产业、标的的三方ID"`
+	ThirdName                string `description:"类似产业、标的的三方名称"`
 	IsNew                    bool   `description:"是否展示新标签"`
 	Md5String                string `description:"Md5唯一标识"`
 }
@@ -87,6 +89,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

@@ -18,12 +18,14 @@ type CygxReportSelectionSubjectHistory struct {
 	IndustrialSubjectId    int       `description:"标的ID"`
 	IndustrialManagementId int       `description:"产业Id"`
 	RegisterPlatform       int       `description:"来源 1小程序,2:网页"`
+	ThirdId                int       `description:"类似产业、标的的三方ID"`
 }
 
 type AddCygxReportSelectionSubjectHistoryReq struct {
 	ArticleId              int `description:"文章id"`
 	IndustrialSubjectId    int `description:"标的ID"`
 	IndustrialManagementId int `description:"产业Id"`
+	ThirdId                int `description:"类似产业、标的的三方ID"`
 }
 
 // 添加