Kaynağa Gözat

Merge branch 'master' of http://8.136.199.33:3000/hongze/hongze_cygx into cygx_12.8

xingzai 1 yıl önce
ebeveyn
işleme
4bb1437c28
3 değiştirilmiş dosya ile 13 ekleme ve 22 silme
  1. 4 3
      controllers/activity.go
  2. 6 1
      models/micro_roadshow.go
  3. 3 18
      services/micro_roadshow.go

+ 4 - 3
controllers/activity.go

@@ -2602,13 +2602,14 @@ func (this *ActivityCoAntroller) LabelTypeListV5() {
 	}
 	//研选互动不展示专项产业调研
 	if !isResearch {
-		conditionActivitySpecial := services.ActivityLabelSpecialSql(chartPermissionIds, whichDay, activeState)
-		//查询专项产业调研展示权限 仅对大套餐客户跟永续客户展示
-		//if whichDay == "" {
 		//专项产业调研未开始状态不查询
 		if activeState == "1" {
 			activeState = ""
 		}
+		conditionActivitySpecial := services.ActivityLabelSpecialSql(chartPermissionIds, whichDay, activeState)
+		//查询专项产业调研展示权限 仅对大套餐客户跟永续客户展示
+		//if whichDay == "" {
+
 		//speciaItem, err := services.GetActivityLabelSpecialList(user, isPower, chartPermissionIds, permissionNameStr)
 		speciaItem, err := services.GetActivityLabelSpecialList(user, conditionActivitySpecial, activeState)
 		if err != nil {

+ 6 - 1
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
@@ -195,11 +197,12 @@ func GetMicroRoadShowVideoPageListV12(startSize, pageSize int, audioAct string,
 	    	b.activity_time as publish_time,
 			b.chart_permission_id,
 			b.chart_permission_name,
-			"" AS play_seconds,
+			a.video_duration AS play_seconds,
 			a.background_img,
 			"" 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
 		}
 	}