소스 검색

no message

xingzai 9 달 전
부모
커밋
1c66fa0725
1개의 변경된 파일31개의 추가작업 그리고 1개의 파일을 삭제
  1. 31 1
      controllers/cygx/user.go

+ 31 - 1
controllers/cygx/user.go

@@ -1753,6 +1753,7 @@ func (this *UserController) InteractionRelevant() {
 // @Param   StartDate   query   string  true       "开始时间"
 // @Param   EndDate   query   string  true       "结束时间"
 // @Param   KeyWord   query   string  true       "搜索关键词"
+// @Param  ClassType   query   int  true       "列表类型,1:权益,2:研选,默认1"
 // @Success 200 {object} cygx.CygxUserTableStatusListRep
 // @router /user/export/interaction [get]
 func (this *UserController) ExportInteraction() {
@@ -1775,6 +1776,7 @@ func (this *UserController) ExportInteraction() {
 	endDate := this.GetString("EndDate")
 	keyWord := this.GetString("KeyWord")
 	source, _ := this.GetInt("Source")
+	classType, _ := this.GetInt("ClassType", 1)
 	if userId < 1 {
 		br.Msg = "用户不存在"
 		return
@@ -1811,6 +1813,11 @@ func (this *UserController) ExportInteraction() {
 		//	br.ErrMsg = "获取用户阅读记录总数失败,Err:" + err.Error()
 		//	return
 		//}
+		if classType == 1 {
+			condition += "  AND  art.chart_permission_id  != 31 "
+		} else {
+			condition += "  AND  art.chart_permission_id  = 31 "
+		}
 
 		condition += " 	AND (r.mobile = '" + wxUser.Mobile + "'  OR  r.email = '" + wxUser.Mobile + "')  "
 		_, list, err = cygx.GetCygxArticleHistoryRecordByUserNew(condition, 0, 9999)
@@ -2906,6 +2913,7 @@ func (this *UserController) CompanyTableDetail() {
 // @Param   EndDate   query   string  true       "结束时间"
 // @Param   KeyWord   query   string  true       "搜索关键词"
 // @Param   ActivityName   query   string  true       "活动名称"
+// @Param  ClassType   query   int  true       "列表类型,1:权益,2:研选,默认1"
 // @Success 200 {object} cygx.CygxUserTableStatusListRep
 // @router /user/company/export/interaction [get]
 func (this *UserController) CompanyExportInteraction() {
@@ -2929,6 +2937,7 @@ func (this *UserController) CompanyExportInteraction() {
 	keyWord := this.GetString("KeyWord")
 	activityName := this.GetString("ActivityName")
 	source, _ := this.GetInt("Source")
+	classType, _ := this.GetInt("ClassType", 1)
 	if companyId < 1 {
 		br.Msg = "用户不存在"
 		return
@@ -2955,6 +2964,11 @@ func (this *UserController) CompanyExportInteraction() {
 		condition += ` AND ( r.mobile LIKE '%` + keyWord + `%' OR r.email LIKE '%` + keyWord + `%' OR r.real_name LIKE '%` + keyWord + `%')`
 	}
 	if source == 1 {
+		if classType == 1 {
+			condition += "  AND  art.chart_permission_id  != 31 "
+		} else {
+			condition += "  AND  art.chart_permission_id  = 31 "
+		}
 		if startDate != "" {
 			startDate += " 00:00:00"
 			condition += ` AND r.create_time >= '` + startDate + `' `
@@ -3028,6 +3042,11 @@ func (this *UserController) CompanyExportInteraction() {
 			}
 		}
 	} else if source == 2 {
+		if classType == 1 {
+			condition += "  AND  a.chart_permission_id  != 31 "
+		} else {
+			condition += "  AND  a.chart_permission_id  = 31 "
+		}
 		if isMeeting == "1" {
 			condition += ` AND r.is_meeting = 1 `
 		}
@@ -4102,6 +4121,7 @@ func (this *UserController) CompanyList() {
 // @Param   EndDate   query   string  true       "结束时间"
 // @Param   KeyWord   query   string  true       "搜索关键词"
 // @Param   ActivityName   query   string  true       "活动名称"
+// @Param  ClassType   query   int  true       "列表类型,1:权益,2:研选,默认1"
 // @Success 200 {object} cygx.CygxUserTableStatusListRep
 // @router /user/companyList/export/interaction [get]
 func (this *UserController) CompanyExportInteractionList() {
@@ -4128,7 +4148,7 @@ func (this *UserController) CompanyExportInteractionList() {
 	activityName := this.GetString("ActivityName")
 	source, _ := this.GetInt("Source")
 	status := this.GetString("Status")
-
+	classType, _ := this.GetInt("ClassType", 1)
 	// 套餐类型
 	//packageType, _ := this.GetInt("PackageType")
 	keyWord = strings.Trim(keyWord, " ")
@@ -4381,6 +4401,11 @@ func (this *UserController) CompanyExportInteractionList() {
 		isAdminRole = true
 	}
 	if source == 1 {
+		if classType == 1 {
+			condition += "  AND  art.chart_permission_id  != 31 "
+		} else {
+			condition += "  AND  art.chart_permission_id  = 31 "
+		}
 		if startDate != "" {
 			startDate += " 00:00:00"
 			condition += ` AND r.create_time >= '` + startDate + `' `
@@ -4456,6 +4481,11 @@ func (this *UserController) CompanyExportInteractionList() {
 			}
 		}
 	} else if source == 2 {
+		if classType == 1 {
+			condition += "  AND  a.chart_permission_id  != 31 "
+		} else {
+			condition += "  AND  a.chart_permission_id  = 31 "
+		}
 		if isMeeting == "1" {
 			condition += ` AND r.is_meeting = 1 `
 		}