|
@@ -202,7 +202,7 @@ func GetMicroRoadShowPageListV8(pageSize, currentIndex, audioId, videoId, activi
|
|
|
var audioPars []interface{}
|
|
|
// 如果筛选条件为指定视频ID或只看视频则不做音频查询
|
|
|
// @Param Filter query string false "筛选条件 为空:全部 1:视频 2:音频 3:逻辑解析 4:路演回放 多个用 , 隔开"
|
|
|
- if (videoId > 0 || activityVideoId > 0 || !strings.Contains(filter, "1") || !strings.Contains(filter, "4")) && filter != "" {
|
|
|
+ if (videoId > 0 || activityVideoId > 0 || (!strings.Contains(filter, "2") && !strings.Contains(filter, "4"))) && filter != "" {
|
|
|
audioCond += ` AND a.activity_voice_id = 0 `
|
|
|
} else {
|
|
|
// 活动已发布且已结束
|
|
@@ -224,7 +224,7 @@ func GetMicroRoadShowPageListV8(pageSize, currentIndex, audioId, videoId, activi
|
|
|
//活动视频的处理
|
|
|
var videoCondAct string
|
|
|
var videoParsAct []interface{}
|
|
|
- if (audioId > 0 || videoId > 0 || !strings.Contains(filter, "2") || !strings.Contains(filter, "4")) && filter != "" {
|
|
|
+ if (audioId > 0 || videoId > 0 || (!strings.Contains(filter, "1") && !strings.Contains(filter, "4"))) && filter != "" {
|
|
|
videoCondAct = "AND video_id = 0 "
|
|
|
} else {
|
|
|
if keywords != "" {
|
|
@@ -240,7 +240,7 @@ func GetMicroRoadShowPageListV8(pageSize, currentIndex, audioId, videoId, activi
|
|
|
//产业视频的处理
|
|
|
var videoCond string
|
|
|
var videoPars []interface{}
|
|
|
- if (audioId > 0 || videoId > 0 || !strings.Contains(filter, "2") || !strings.Contains(filter, "3")) && filter != "" {
|
|
|
+ if (audioId > 0 || videoId > 0 || (!strings.Contains(filter, "1") && !strings.Contains(filter, "3"))) && filter != "" {
|
|
|
videoCond += ` AND video_id = 0 `
|
|
|
} else {
|
|
|
if keywords != "" {
|
|
@@ -259,6 +259,36 @@ func GetMicroRoadShowPageListV8(pageSize, currentIndex, audioId, videoId, activi
|
|
|
err = errors.New("获取微路演音视频列表失败, Err: " + e.Error())
|
|
|
return
|
|
|
}
|
|
|
+ if total == 0 {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ var activityIds []int
|
|
|
+ for _, v := range videoList {
|
|
|
+ if v.Type == 2 {
|
|
|
+ activityIds = append(activityIds, v.ActivityId)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if len(activityIds) > 0 {
|
|
|
+ // 获取活动关联的产业
|
|
|
+ var groupCond string
|
|
|
+ var groupPars []interface{}
|
|
|
+ groupCond += ` AND a.activity_id IN (` + utils.GetOrmInReplace(len(activityIds)) + `)`
|
|
|
+ groupPars = append(groupPars, activityIds)
|
|
|
+ groups, e := models.GetActivityIndustryRelationList(groupCond, groupPars)
|
|
|
+ if e != nil {
|
|
|
+ err = errors.New("获取活动产业关联列表失败, Err: " + e.Error())
|
|
|
+ return
|
|
|
+ }
|
|
|
+ activityIndustryMap := make(map[int]int, 0)
|
|
|
+ for _, v := range groups {
|
|
|
+ activityIndustryMap[v.ActivityId] = v.IndustrialManagementId
|
|
|
+ }
|
|
|
+ for _, v := range videoList {
|
|
|
+ if v.Type == 2 {
|
|
|
+ v.IndustrialManagementId = activityIndustryMap[v.ActivityId]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
respList = videoList
|
|
|
return
|
|
|
}
|