ziwen 2 năm trước cách đây
mục cha
commit
bfae80444c
2 tập tin đã thay đổi với 3 bổ sung35 xóa
  1. 1 7
      controllers/micro_roadshow.go
  2. 2 28
      services/micro_roadshow.go

+ 1 - 7
controllers/micro_roadshow.go

@@ -23,9 +23,6 @@ type MicroRoadShowController struct {
 // @Param   AudioId			query	int		false	"音频ID"
 // @Param   VideoId			query	int		false	"视频ID"
 // @Param   ActivityVideoId			query	int		false	"活动视频ID"
-// @Param   AudioIds			query	string		false	"活动音频IDs"
-// @Param   ActivityVideoIds	query	string		false	"活动视频IDs"
-// @Param   VideoIds			query	string		false	"视频IDs"
 // @Param   Filter			query	string		false	"筛选条件 为空:全部 1:视频 2:音频 3:逻辑解析 4:路演回放 多个用 , 隔开"
 // @Success 200 {object} models.HomeListResp
 // @router /list [get]
@@ -49,9 +46,6 @@ func (this *MicroRoadShowController) List() {
 	videoId, _ := this.GetInt("VideoId")
 	activityVideoId, _ := this.GetInt("ActivityVideoId")
 	filter := this.GetString("Filter")
-	audioIds := this.GetString("AudioIds")
-	videoIds := this.GetString("VideoIds")
-	activityVideoIds := this.GetString("ActivityVideoIds")
 
 	if pageSize <= 0 {
 		pageSize = utils.PageSize20
@@ -61,7 +55,7 @@ func (this *MicroRoadShowController) List() {
 	}
 
 	// 微路演列表
-	list, total, e := services.GetMicroRoadShowPageListV8(pageSize, currentIndex, audioId, videoId, activityVideoId, filter, keywords, audioIds, videoIds, activityVideoIds)
+	list, total, e := services.GetMicroRoadShowPageListV8(pageSize, currentIndex, audioId, videoId, activityVideoId, filter, keywords)
 	if e != nil {
 		br.Msg = "获取失败"
 		br.ErrMsg = "获取微路演列表失败, Err: " + e.Error()

+ 2 - 28
services/micro_roadshow.go

@@ -188,7 +188,7 @@ func GetMicroRoadshowVideoMap() (items map[int]int, err error) {
 }
 
 // GetMicroRoadShowPageList 获取微路演列表添加活动视频 更新与8.1版本
-func GetMicroRoadShowPageListV8(pageSize, currentIndex, audioId, videoId, activityVideoId int, filter, keywords, audioIds, videoIds, activityVideoIds string) (respList []*models.MicroRoadShowPageList, total int, err error) {
+func GetMicroRoadShowPageListV8(pageSize, currentIndex, audioId, videoId, activityVideoId int, filter, keywords string) (respList []*models.MicroRoadShowPageList, total int, err error) {
 	var e error
 	// 根据每页数据量获取音视频配比
 	startSize := utils.StartIndex(currentIndex, pageSize)
@@ -220,15 +220,6 @@ func GetMicroRoadShowPageListV8(pageSize, currentIndex, audioId, videoId, activi
 			audioCond += ` AND a.activity_voice_id = ?`
 			audioPars = append(audioPars, audioId)
 		}
-		if audioIds != "" {
-			sliceId := strings.Split(audioIds, ",")
-			var idSqlStr string
-			for _, v := range sliceId {
-				idSqlStr += "'" + v + "',"
-			}
-			idSqlStr = strings.TrimRight(idSqlStr, ",")
-			audioCond += ` AND a.activity_voice_id IN (` + idSqlStr + `)`
-		}
 	}
 	//活动视频的处理
 	var videoCondAct string
@@ -244,15 +235,6 @@ func GetMicroRoadShowPageListV8(pageSize, currentIndex, audioId, videoId, activi
 			videoCondAct += ` AND video_id = ?`
 			videoParsAct = append(videoParsAct, activityVideoId)
 		}
-		if activityVideoIds != "" {
-			sliceId := strings.Split(activityVideoIds, ",")
-			var idSqlStr string
-			for _, v := range sliceId {
-				idSqlStr += "'" + v + "',"
-			}
-			idSqlStr = strings.TrimRight(idSqlStr, ",")
-			videoCondAct += ` AND v.video_id IN (` + idSqlStr + `)`
-		}
 		videoCondAct += ` AND publish_status = 1`
 	}
 	//产业视频的处理
@@ -269,15 +251,7 @@ func GetMicroRoadShowPageListV8(pageSize, currentIndex, audioId, videoId, activi
 			videoCond += ` AND video_id = ?`
 			videoPars = append(videoPars, videoId)
 		}
-		if videoIds != "" {
-			sliceId := strings.Split(videoIds, ",")
-			var idSqlStr string
-			for _, v := range sliceId {
-				idSqlStr += "'" + v + "',"
-			}
-			idSqlStr = strings.TrimRight(idSqlStr, ",")
-			videoCond += ` AND video_id IN (` + idSqlStr + `)`
-		}
+
 		videoCond += ` AND publish_status = 1`
 	}
 	total, videoList, e = models.GetMicroRoadShowVideoPageListV8(startSize, pageSize, videoCond, videoPars, videoCondAct, videoParsAct, audioCond, audioPars, audioId, videoId, activityVideoId, 0)