Эх сурвалжийг харах

Merge branch 'cygx_10.7' of http://8.136.199.33:3000/hongze/hongze_cygx into debug

xingzai 1 жил өмнө
parent
commit
0f7af0d204

+ 8 - 8
controllers/activity.go

@@ -1682,7 +1682,7 @@ func (this *ActivityCoAntroller) LabelMoreList() {
 // @Param   Filter			query	int		false	"筛选条件 0:全部 1:视频 2:音频"
 // @Param   TypeName   query   string  false       "电话会类型 ,1专家电话会 2分析师电话会"
 // @Param   IsExternalLabel   query   int  false       "是否仅展示外部资源 1:是、0:否 默认0"
-// @Param   IsResearchPoints   query   int  false       "是否仅展示研选扣点 1:是、0:否 默认0"
+// @Param   IsResearchPoints   query   string  false       "是否仅展示研选扣点 1:展示研选扣点、2:展示外部资源 ,1,2两者都展示" //兼容前端
 // @Success 200 {object} models.GetCygxActivityListRep
 // @router /listNew [get]
 func (this *ActivityCoAntroller) ActivityListNew() {
@@ -1714,7 +1714,7 @@ func (this *ActivityCoAntroller) ActivityListNew() {
 	isPower, _ := this.GetInt("IsPower")
 	activityId, _ := this.GetInt("ActivityId")             // 仅用于判断【新】标签
 	isExternalLabel, _ := this.GetInt("IsExternalLabel")   //
-	isResearchPoints, _ := this.GetInt("IsResearchPoints") //
+	isResearchPoints := this.GetString("IsResearchPoints") //
 
 	if label == "undefined" {
 		label = ""
@@ -1847,17 +1847,17 @@ func (this *ActivityCoAntroller) ActivityListNew() {
 		conditioninit += ` AND art.activity_id IN ( ` + videoOrVoiceActivityIds + `) `
 	}
 	//外部资源,研选扣点的并集搜索
-	if isExternalLabel == 1 && isResearchPoints == 1 {
+	if isResearchPoints == "1,2" || isResearchPoints == "2,1" {
 		conditioninit += ` AND ( art.is_external_label = 1  OR art.is_research_points = 1 )`
 	} else {
-		//是否为外部资源
-		if isExternalLabel == 1 {
-			conditioninit += ` AND art.is_external_label = 1 `
-		}
 		// 是否为研选扣点
-		if isResearchPoints == 1 {
+		if isResearchPoints == "1" {
 			conditioninit += ` AND art.is_research_points = 1 `
 		}
+		//是否为外部资源
+		if isResearchPoints == "2" {
+			conditioninit += ` AND art.is_external_label = 1 `
+		}
 	}
 
 	//活动可见限制