xingzai 1 tahun lalu
induk
melakukan
f645b674e1
3 mengubah file dengan 7 tambahan dan 18 penghapusan
  1. 5 0
      models/micro_roadshow.go
  2. 1 9
      services/micro_roadshow.go
  3. 1 9
      services/user.go

+ 5 - 0
models/micro_roadshow.go

@@ -41,6 +41,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:"分享封面图"`
@@ -345,6 +346,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
@@ -370,6 +372,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
@@ -394,6 +397,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
@@ -420,6 +424,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 `

+ 1 - 9
services/micro_roadshow.go

@@ -420,18 +420,10 @@ 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

+ 1 - 9
services/user.go

@@ -638,18 +638,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
 		}
 	}
 	respList = videoList