Browse Source

no message

xingzai 1 year ago
parent
commit
11f911ecc5
2 changed files with 8 additions and 18 deletions
  1. 5 0
      models/micro_roadshow.go
  2. 3 18
      services/micro_roadshow.go

+ 5 - 0
models/micro_roadshow.go

@@ -49,6 +49,7 @@ type MicroRoadShowPageList struct {
 	ResourceUrl         string `description:"链接"`
 	Type                int    `description:"类型: 1-活动音频; 2-活动视频; 3-产业视频; 4-问答系列"`
 	LabelType           int    `description:"标签类型: 1-路演回放; 2-调研反馈; 3-产业视频; 4-问答系列"`
+	ActivityFileType    int    `description:"活动音视频文件类型: 1-路演回放; 2-调研反馈"`
 	PublishTime         string `description:"发布时间"`
 	BackgroundImg       string `description:"背景图"`
 	ShareImg            string `description:"分享封面图"`
@@ -175,6 +176,7 @@ func GetMicroRoadShowVideoPageListV12(startSize, pageSize int, audioAct string,
 			"" AS industry_name,
 			0 AS  industry_id,
 			a.share_img,
+			a.file_type as activity_file_type,
 			a.activity_id 
 		FROM
 			cygx_activity_voice AS a
@@ -200,6 +202,7 @@ func GetMicroRoadShowVideoPageListV12(startSize, pageSize int, audioAct string,
 			"" AS industry_name,
 			0 AS  industry_id,
 			a.share_img,
+			a.file_type as activity_file_type,
 			a.activity_id
 		FROM
 			cygx_activity_video as a
@@ -224,6 +227,7 @@ func GetMicroRoadShowVideoPageListV12(startSize, pageSize int, audioAct string,
 			industry_name,
 			industry_id,
 			share_img_url AS share_img,
+			'' as activity_file_type,
 			"" as  activity_id
 		FROM
 			cygx_micro_roadshow_video  as a
@@ -250,6 +254,7 @@ func GetMicroRoadShowVideoPageListV12(startSize, pageSize int, audioAct string,
 			"" AS industry_name,
 			0 AS  industry_id,
 			a.share_img,
+			'' as activity_file_type,
 			0  as activity_id 
 		FROM
 			cygx_askserie_video AS a WHERE 1= 1 `

+ 3 - 18
services/micro_roadshow.go

@@ -394,20 +394,13 @@ func GetMicroRoadShowPageListV12(pageSize, currentIndex, sourceId, tableType int
 		err = errors.New("获取微路演音视频列表失败, Err: " + e.Error())
 		return
 	}
-	var activiiTyIds []int
 	for _, v := range videoList {
 		v.LabelType = v.Type
 		if v.Type == 1 || v.Type == 2 {
-			v.LabelType = 2 // 先将路演回放设置为调研反馈类型,再做处理
-			activiiTyIds = append(activiiTyIds, v.SourceId)
-		}
-	}
-	mapactiviiTyIds := GetActivityLYHFMapByActivityIds(activiiTyIds)
-	for _, v := range videoList {
-		if v.Type == 1 && mapactiviiTyIds[v.SourceId] {
-			v.LabelType = 1 // 处理路演回放
+			v.LabelType = v.ActivityFileType
 		}
 	}
+
 	respList = videoList
 	return
 }
@@ -830,18 +823,10 @@ func GetMicroRoadShowMycollectV12(pageSize, currentIndex int, audioIds, activity
 		}
 	}
 
-	var activiiTyIds []int
 	for _, v := range videoList {
 		v.LabelType = v.Type
 		if v.Type == 1 || v.Type == 2 {
-			v.LabelType = 2 // 先将路演回放设置为调研反馈类型,再做处理
-			activiiTyIds = append(activiiTyIds, v.SourceId)
-		}
-	}
-	mapactiviiTyIds := GetActivityLYHFMapByActivityIds(activiiTyIds)
-	for _, v := range videoList {
-		if v.Type == 1 && mapactiviiTyIds[v.SourceId] {
-			v.LabelType = 1 // 处理路演回放
+			v.LabelType = v.ActivityFileType
 		}
 	}