Selaa lähdekoodia

Merge branch 'cygx_user_need_05-27' of http://8.136.199.33:3000/hongze/hz_crm_api into debug

xingzai 10 kuukautta sitten
vanhempi
commit
071c6c9cd3
1 muutettua tiedostoa jossa 11 lisäystä ja 0 poistoa
  1. 11 0
      controllers/cygx/user.go

+ 11 - 0
controllers/cygx/user.go

@@ -1819,6 +1819,7 @@ func (this *UserController) ExportInteraction() {
 			br.ErrMsg = "获取用户阅读记录,Err:" + err.Error()
 			return
 		}
+		var articleIds []int
 		if len(list) > 0 {
 			for k, v := range list {
 				if v.ArticleId >= utils.SummaryArticleId {
@@ -1829,8 +1830,18 @@ func (this *UserController) ExportInteraction() {
 				if list[k].PermissionName == "" {
 					list[k].PermissionName = v.CategoryName
 				}
+				if v.SpecialType == 0 {
+					articleIds = append(articleIds, v.ArticleId)
+				}
+			}
+			mapIndustrialLabel := cygxService.GetArticleIndustrialLabelByArticleId(articleIds) // 关联产业
+			mapSubjectLabel := cygxService.GetArticleSubjectLabelByArticleId(articleIds)       // 关联标的
+			for _, v := range list {
+				v.IndustryName = strings.Join(mapIndustrialLabel[v.ArticleId], "/")
+				v.SubjectNames = strings.Join(mapSubjectLabel[v.ArticleId], "/")
 			}
 		}
+
 	} else if source == 2 {
 		sheetName = "到会管理名单"
 		if mobile != "" {