ソースを参照

Merge branch 'master' of http://8.136.199.33:3000/cxzhang/hongze_clpt into mfyx_3.6

xingzai 6 ヶ月 前
コミット
51478fb154
4 ファイル変更32 行追加29 行削除
  1. 25 22
      controllers/activity.go
  2. 1 1
      controllers/home.go
  3. 2 2
      services/es_comprehensive.go
  4. 4 4
      services/micro_roadshow.go

+ 25 - 22
controllers/activity.go

@@ -840,29 +840,32 @@ func (this *ActivityController) Detail() {
 		//处理音频回放
 		var mapActivityId []int
 		mapActivityId = append(mapActivityId, activityId)
-		mapActivityVoice, err := services.GetActivityVoiceResp(mapActivityId)
-		if err != nil {
-			br.Msg = "获取信息失败"
-			br.ErrMsg = "GetActivityVoiceResp,Err:" + err.Error() + "activityId:" + strconv.Itoa(activityId)
-			return
-		}
-		if mapActivityVoice[activityId] != nil {
-			detailResp.FileType = 1
-			detailResp.AudioLink = true
-			detailResp.VoiceDetail = mapActivityVoice[activityId]
-		}
-		//处理视频回放
-		mapActivityVideo, err := services.GetActivityVideoResp(mapActivityId)
-		if err != nil {
-			br.Msg = "获取信息失败"
-			br.ErrMsg = "GetActivityVideoResp,Err:" + err.Error()
-			return
-		}
 
-		if mapActivityVideo[activityId] != nil {
-			detailResp.FileType = 2
-			detailResp.AudioLink = true
-			detailResp.VideoDetail = mapActivityVideo[activityId]
+		if activityInfo.ChartPermissionId != utils.CHART_PERMISSION_ID_YANXUAN { // 研选的音视频不在查研展示
+			mapActivityVoice, err := services.GetActivityVoiceResp(mapActivityId)
+			if err != nil {
+				br.Msg = "获取信息失败"
+				br.ErrMsg = "GetActivityVoiceResp,Err:" + err.Error() + "activityId:" + strconv.Itoa(activityId)
+				return
+			}
+			if mapActivityVoice[activityId] != nil {
+				detailResp.FileType = 1
+				detailResp.AudioLink = true
+				detailResp.VoiceDetail = mapActivityVoice[activityId]
+			}
+			//处理视频回放
+			mapActivityVideo, err := services.GetActivityVideoResp(mapActivityId)
+			if err != nil {
+				br.Msg = "获取信息失败"
+				br.ErrMsg = "GetActivityVideoResp,Err:" + err.Error()
+				return
+			}
+
+			if mapActivityVideo[activityId] != nil {
+				detailResp.FileType = 2
+				detailResp.AudioLink = true
+				detailResp.VideoDetail = mapActivityVideo[activityId]
+			}
 		}
 
 		//处理不同的报名方式按钮回显

+ 1 - 1
controllers/home.go

@@ -320,7 +320,7 @@ func (this *MobileHomeController) NewList() {
 	//	startSize = 0
 	//	pageSize = utils.PageSize5
 	//} else {
-	condition += ` AND source NOT IN ('activity','activityspecial','newchart','industrialsourceHz','industrialsourceYx') ` + conditionInit
+	condition += ` AND source NOT IN ('activity','activityspecial','newchart','industrialsourceHz','industrialsourceYx')  AND IF   ( source IN('activityvoice','activityvideo') , chart_permission_id != 31 ,1=1 ) ` + conditionInit
 	//conditionActivity, err := services.GetActivityonditionList(user, "", "", "", "1,2,3", "", 0, 0, "", 0, 1)
 	conditionActivity, err := services.ActivityConditioninitSql(user, "", 0)
 	if err != nil && err.Error() != utils.ErrNoRow() {

+ 2 - 2
services/es_comprehensive.go

@@ -863,7 +863,7 @@ func SqlComprehensiveSearch(keyWord string, startSize, pageSize int) (result []*
 	keyWord = "%" + keyWord + "%"
 	var conditionTitle string
 	var parsTitle []interface{}
-	conditionTitle = " AND search_title LIKE ? "
+	conditionTitle = " AND search_title LIKE ? AND IF   ( source IN('activityvoice','activityvideo') , chart_permission_id != 31 ,1=1 ) "
 	parsTitle = append(parsTitle, keyWord)
 	totalTitle, e := models.GetResourceDataCount(conditionTitle, parsTitle)
 	if e != nil {
@@ -874,7 +874,7 @@ func SqlComprehensiveSearch(keyWord string, startSize, pageSize int) (result []*
 	var conditionContent string
 	var parsContent []interface{}
 
-	conditionContent = " AND search_content LIKE ? AND search_title  NOT LIKE ?  "
+	conditionContent = " AND search_content LIKE ? AND search_title  NOT LIKE ?   AND IF   ( source IN('activityvoice','activityvideo') , chart_permission_id != 31 ,1=1 )   "
 	parsContent = append(parsContent, keyWord, keyWord)
 	totalContent, e := models.GetResourceDataCount(conditionContent, parsContent)
 	if e != nil {

+ 4 - 4
services/micro_roadshow.go

@@ -410,10 +410,10 @@ func GetMicroRoadShowPageListV12(pageSize, currentIndex, sourceId, tableType int
 		conditionAskserie += ` AND a.chart_permission_id IN (` + chartPermissionIds + `)`
 	}
 	//发布状态
-	audioAct += ` AND  b.publish_status = 1 `
-	videoAct += ` AND  b.publish_status = 1 `
-	videoMico += ` AND  a.publish_status = 1 `
-	conditionAskserie += ` AND  a.publish_status = 1 `
+	audioAct += ` AND  b.publish_status = 1 AND  b.chart_permission_id  != 31 `
+	videoAct += ` AND  b.publish_status = 1  AND  b.chart_permission_id  != 31 `
+	videoMico += ` AND  a.publish_status = 1 AND  a.chart_permission_id  != 31 `
+	conditionAskserie += ` AND  a.publish_status = 1  AND  a.chart_permission_id  != 31 `
 
 	total, videoList, e = models.GetMicroRoadShowVideoPageListV12(startSize, pageSize, audioAct, audioActPars, videoAct, videoActPars, videoMico, videoMicoPars, conditionAskserie, askseriePars)
 	if e != nil {