|
@@ -308,6 +308,7 @@ func (this *ResearchController) ThemeDetail() {
|
|
|
|
|
|
var itemsNull []*models.GetThemeAericleListResp
|
|
|
subjectMap := make(map[string]string)
|
|
|
+ articleMap := make(map[int]int)
|
|
|
for _, v := range list {
|
|
|
resp.IndustryName = v.IndustryName
|
|
|
resp.IndustrialManagementId = v.IndustrialManagementId
|
|
@@ -322,6 +323,7 @@ func (this *ResearchController) ThemeDetail() {
|
|
|
if v.FllowNum > 0 {
|
|
|
resp.IsFollw = true
|
|
|
}
|
|
|
+
|
|
|
if v.SubjectName == "" {
|
|
|
item := new(models.GetThemeAericleListResp)
|
|
|
item.ArticleId = v.ArticleId
|
|
@@ -333,13 +335,14 @@ func (this *ResearchController) ThemeDetail() {
|
|
|
item.Pv = v.Pv
|
|
|
item.CollectNum = v.CollectNum
|
|
|
itemsNull = append(itemsNull, item)
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
|
|
|
for _, v := range resp.ListSubject {
|
|
|
subjetcGroup := new(models.GetThemeAericleListBuSubjectResp)
|
|
|
for _, v2 := range list {
|
|
|
- if v2.IndustrialSubjectId == v.IndustrialSubjectId {
|
|
|
+ if v2.IndustrialSubjectId == v.IndustrialSubjectId && articleMap[v2.ArticleId] == 0 {
|
|
|
item := new(models.GetThemeAericleListResp)
|
|
|
item.ArticleId = v2.ArticleId
|
|
|
item.Title = v2.Title
|
|
@@ -360,6 +363,7 @@ func (this *ResearchController) ThemeDetail() {
|
|
|
item.IsCollect = true
|
|
|
}
|
|
|
resp.List = append(resp.List, item)
|
|
|
+ articleMap[v2.ArticleId] = v2.ArticleId
|
|
|
//subjetcGroup.List = append(subjetcGroup.List, item)
|
|
|
}
|
|
|
subjetcGroup.SubjectName = v.SubjectName
|