|
@@ -1334,12 +1334,17 @@ func (this *MobileReportController) Timeline() {
|
|
}
|
|
}
|
|
//处理晨会精华关联的标的,以及要跳转的文章ID
|
|
//处理晨会精华关联的标的,以及要跳转的文章ID
|
|
var meetingreviewchaptIds []int
|
|
var meetingreviewchaptIds []int
|
|
- mapchaptIdAndArticleId := make(map[int]int) // 晨会精华ID与跳转文章ID的映射关系
|
|
|
|
- mapchaptIdListSubject := make(map[int][]*models.CygxIndustrialSubject) // 晨会精华ID与标的列表的映射关系
|
|
|
|
|
|
+ var articleIds []int
|
|
|
|
+ mapchaptIdAndArticleId := make(map[int]int) // 晨会精华ID与跳转文章ID的映射关系
|
|
|
|
+ mapchaptIdListSubject := make(map[int][]*models.CygxIndustrialSubject) // 晨会精华ID与标的列表的映射关系
|
|
|
|
+ mapArticleIdListSubject := make(map[int][]*models.CygxIndustrialSubject) // 报告ID与标的列表的映射关系
|
|
for _, v := range list {
|
|
for _, v := range list {
|
|
if v.Resource == 3 {
|
|
if v.Resource == 3 {
|
|
meetingreviewchaptIds = append(meetingreviewchaptIds, v.Id)
|
|
meetingreviewchaptIds = append(meetingreviewchaptIds, v.Id)
|
|
}
|
|
}
|
|
|
|
+ if v.Resource == 1 {
|
|
|
|
+ articleIds = append(articleIds, v.ArticleId)
|
|
|
|
+ }
|
|
}
|
|
}
|
|
if len(meetingreviewchaptIds) > 0 {
|
|
if len(meetingreviewchaptIds) > 0 {
|
|
listMeet, err := services.GetCygxMorningMeetingReviewChapterListByIds(meetingreviewchaptIds)
|
|
listMeet, err := services.GetCygxMorningMeetingReviewChapterListByIds(meetingreviewchaptIds)
|
|
@@ -1353,6 +1358,10 @@ func (this *MobileReportController) Timeline() {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if len(articleIds) > 0 {
|
|
|
|
+ mapArticleIdListSubject = services.GetArticleGroupSubjectMapByIndustrialManagementId(articleIds, industrialManagementId)
|
|
|
|
+ }
|
|
|
|
+
|
|
//查询用户今天是否看过时间线
|
|
//查询用户今天是否看过时间线
|
|
//count, err := models.GetTimeLineRecordCount(user.UserId, industrialManagementId)
|
|
//count, err := models.GetTimeLineRecordCount(user.UserId, industrialManagementId)
|
|
//if err != nil {
|
|
//if err != nil {
|
|
@@ -1391,6 +1400,9 @@ func (this *MobileReportController) Timeline() {
|
|
v.LinkArticleId = mapchaptIdAndArticleId[v.Id]
|
|
v.LinkArticleId = mapchaptIdAndArticleId[v.Id]
|
|
v.ListSubject = mapchaptIdListSubject[v.Id]
|
|
v.ListSubject = mapchaptIdListSubject[v.Id]
|
|
}
|
|
}
|
|
|
|
+ if v.Resource == 1 {
|
|
|
|
+ v.ListSubject = mapArticleIdListSubject[v.Id]
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
//添加我的日程访问记录
|
|
//添加我的日程访问记录
|