|
@@ -253,13 +253,13 @@ func (this *ReportController) IndustryList() {
|
|
|
|
|
|
//查询产业视频
|
|
|
industrialVideoMap := make(map[int]*models.MicroVideoSimpleInfo)
|
|
|
- var industrialManagementIds string
|
|
|
+ var industrialManagementIds []int
|
|
|
for _, v := range list {
|
|
|
if v.IndustrialManagementId > 0 {
|
|
|
- industrialManagementIds += strconv.Itoa(v.IndustrialManagementId) +","
|
|
|
+ industrialManagementIds = append(industrialManagementIds, v.IndustrialManagementId)
|
|
|
}
|
|
|
}
|
|
|
- if industrialManagementIds != "" {
|
|
|
+ if len(industrialManagementIds) >0 {
|
|
|
// 获取默认图配置
|
|
|
_, videoMap, _, _, e := services.GetMicroRoadShowDefaultImgConfig()
|
|
|
if e != nil {
|
|
@@ -267,8 +267,6 @@ func (this *ReportController) IndustryList() {
|
|
|
br.ErrMsg = "获取视频默认配置图失败, Err: " + e.Error()
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
- industrialManagementIds = strings.Trim(industrialManagementIds, ",")
|
|
|
videoList, err := models.GetMicroRoadshowVideoByIndustryIds(industrialManagementIds)
|
|
|
if err != nil {
|
|
|
br.Msg = "产业视频列表失败"
|
|
@@ -2710,9 +2708,53 @@ func (this *ReportController) SearchReportAndResource() {
|
|
|
listYxResource[k].IsFollw = true
|
|
|
}
|
|
|
industrialIdArr = append(industrialIdArr, v.IndustrialManagementId)
|
|
|
+
|
|
|
}
|
|
|
|
|
|
if len(industrialIdArr) > 0 {
|
|
|
+ //查询产业视频
|
|
|
+ industrialVideoMap := make(map[int]*models.MicroVideoSimpleInfo)
|
|
|
+ // 获取默认图配置
|
|
|
+ _, videoMap, _, _, e := services.GetMicroRoadShowDefaultImgConfig()
|
|
|
+ if e != nil {
|
|
|
+ br.Msg = "获取视频默认配置图失败"
|
|
|
+ br.ErrMsg = "获取视频默认配置图失败, Err: " + e.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ videoList, err := models.GetMicroRoadshowVideoByIndustryIds(industrialIdArr)
|
|
|
+ if err != nil {
|
|
|
+ br.Msg = "产业视频列表失败"
|
|
|
+ br.ErrMsg = "产业视频列表失败, Err: " + err.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ for _, v := range videoList {
|
|
|
+ tmp := &models.MicroVideoSimpleInfo{
|
|
|
+ Id: v.VideoId,
|
|
|
+ Title: "5min逻辑【"+v.IndustryName+"】解析",
|
|
|
+ ResourceUrl: v.VideoUrl,
|
|
|
+ BackgroundImg: v.ImgUrl,
|
|
|
+ PlaySeconds: v.VideoDuration,
|
|
|
+ }
|
|
|
+ if tmp.BackgroundImg == "" {
|
|
|
+ tmp.BackgroundImg = videoMap[v.ChartPermissionId]
|
|
|
+ }
|
|
|
+ industrialVideoMap[v.IndustryId] = tmp
|
|
|
+ }
|
|
|
+
|
|
|
+ for k, v := range listYxResource {
|
|
|
+ //展示产业视频
|
|
|
+ if video, ok := industrialVideoMap[v.IndustrialManagementId]; ok {
|
|
|
+ listYxResource[k].IndustryVideo = video
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ for k, v := range listHzResource {
|
|
|
+ //展示产业视频
|
|
|
+ if video, ok := industrialVideoMap[v.IndustrialManagementId]; ok {
|
|
|
+ listHzResource[k].IndustryVideo = video
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
//合并产业关联的标的
|
|
|
listSubjcet, err = models.GetIndustrialSubjectAllByIndustrialId(industrialIdArr)
|
|
|
if err != nil {
|
|
@@ -2735,6 +2777,7 @@ func (this *ReportController) SearchReportAndResource() {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
|
|
|
resp := new(models.SearchReportAndResourceResp)
|