zhangchuanxing 3 veckor sedan
förälder
incheckning
c19ba1aef0
3 ändrade filer med 79 tillägg och 5 borttagningar
  1. 3 0
      controllers/home.go
  2. 46 4
      controllers/research.go
  3. 30 1
      controllers/yanxuan_special.go

+ 3 - 0
controllers/home.go

@@ -647,6 +647,9 @@ func (this *HomeController) NewList() {
 		conditionInit += " AND chart_permission_id  =  " + strconv.Itoa(chartPermissionId)
 		condition += " AND chart_permission_id  =  " + strconv.Itoa(chartPermissionId)
 	}
+	if user.CompanyId == utils.GAO_YI_ZI_CHAN_COMPANY_ID {
+		conditionInit += ` AND source != 'yanxuanspecial'   AND IF   ( source IN('article') , chart_permission_id != 31 ,1=1 )    `
+	}
 
 	//if tagIds == "" && chartPermissionId == 0 {
 	//	//查询近一个月的数据

+ 46 - 4
controllers/research.go

@@ -97,6 +97,15 @@ func (this *ResearchController) CollectionList() {
 	}
 
 	pageSize, _ := this.GetInt("PageSize", 15)
+	resp := new(models.ArticleCollectionLIstResp)
+	if user.CompanyId == utils.GAO_YI_ZI_CHAN_COMPANY_ID {
+		resp.List = make([]*models.ArticleCollectionResp, 0)
+		br.Ret = 200
+		br.Success = true
+		br.Msg = "获取成功"
+		br.Data = resp
+		return
+	}
 	var condition string
 	var pars []interface{}
 	articleTypeIds, err := services.GetYanXuanArticleTypeIds()
@@ -153,7 +162,7 @@ func (this *ResearchController) CollectionList() {
 		list[k].PublishDate = utils.StrTimeToTime(v.PublishDate).Format(utils.FormatDate) //时间字符串格式转时间格式
 		list[k].Pv = articleMapPv[v.ArticleId]
 	}
-	resp := new(models.ArticleCollectionLIstResp)
+
 	resp.List = list
 	br.Ret = 200
 	br.Success = true
@@ -192,6 +201,16 @@ func (this *ResearchController) HotList() {
 		currentIndex = 1
 	}
 	startSize = utils.StartIndex(currentIndex, pageSize)
+	resp := new(models.IndustrialManagementHotListResp)
+	if user.CompanyId == utils.GAO_YI_ZI_CHAN_COMPANY_ID {
+		resp.List = make([]*models.IndustrialManagementHotResp, 0)
+		resp.Paging = paging.GetPaging(currentIndex, pageSize, 0)
+		br.Ret = 200
+		br.Success = true
+		br.Msg = "获取成功"
+		br.Data = resp
+		return
+	}
 	var condition string
 	var conditionOrder string
 	articleTypeIds, err := services.GetYanXuanArticleTypeIds()
@@ -258,7 +277,7 @@ func (this *ResearchController) HotList() {
 		}
 	}
 	page := paging.GetPaging(currentIndex, pageSize, total)
-	resp := new(models.IndustrialManagementHotListResp)
+
 	resp.Paging = page
 	resp.List = list
 	br.Ret = 200
@@ -298,6 +317,18 @@ func (this *ResearchController) KolList() {
 		currentIndex = 1
 	}
 	startSize = utils.StartIndex(currentIndex, pageSize)
+
+	resp := new(models.DepartmentListResp)
+	if user.CompanyId == utils.GAO_YI_ZI_CHAN_COMPANY_ID {
+		resp.List = make([]*models.DepartmentResp, 0)
+		resp.Paging = paging.GetPaging(currentIndex, pageSize, 0)
+		br.Ret = 200
+		br.Success = true
+		br.Msg = "获取成功"
+		br.Data = resp
+		return
+	}
+
 	articleTypeIds, err := services.GetYanXuanArticleTypeIds()
 	if err != nil {
 		br.Msg = "获取信息失败"
@@ -368,7 +399,7 @@ func (this *ResearchController) KolList() {
 		v.IsHot = mapHot[v.DepartmentId]
 		//}
 	}
-	resp := new(models.DepartmentListResp)
+
 	page := paging.GetPaging(currentIndex, pageSize, total)
 	resp.Paging = page
 	resp.List = list
@@ -725,6 +756,17 @@ func (this *ResearchController) ArticleNewList() {
 		currentIndex = 1
 	}
 	startSize = paging.StartIndex(currentIndex, pageSize)
+	resp := new(models.ArticleResearchListResp)
+	if user.CompanyId == utils.GAO_YI_ZI_CHAN_COMPANY_ID {
+		resp.List = make([]*models.ArticleResearchResp, 0)
+		resp.Paging = paging.GetPaging(currentIndex, pageSize, 0)
+		br.Ret = 200
+		br.Success = true
+		br.Msg = "获取成功"
+		br.Data = resp
+		return
+	}
+
 	var condition string
 	var conditiontype string
 	var pars []interface{}
@@ -819,7 +861,7 @@ func (this *ResearchController) ArticleNewList() {
 		return
 	}
 	page := paging.GetPaging(currentIndex, pageSize, total)
-	resp := new(models.ArticleResearchListResp)
+
 	for _, v := range list {
 		item := models.ArticleResearchResp{
 			ArticleId:       v.ArticleId,

+ 30 - 1
controllers/yanxuan_special.go

@@ -50,6 +50,15 @@ func (this *YanxuanSpecialController) List() {
 	}
 	startSize = utils.StartIndex(currentIndex, pageSize)
 	resp := new(models.SpecialListResp)
+	if sysUser.CompanyId == utils.GAO_YI_ZI_CHAN_COMPANY_ID {
+		resp.List = make([]*models.CygxYanxuanSpecialCenterResp, 0)
+		resp.Paging = paging.GetPaging(currentIndex, pageSize, 0)
+		br.Ret = 200
+		br.Success = true
+		br.Msg = "获取成功"
+		br.Data = resp
+		return
+	}
 	var condition string
 	var pars []interface{}
 
@@ -178,6 +187,15 @@ func (this *YanxuanSpecialController) Detail() {
 	}
 	item.Pv += item.HzPv // 添加弘则PV
 	var resp models.CygxYanxuanSpecialResp
+	// 高毅资产的联系人,有权限的行业也不能查看报告详情页。提示无权限页面
+	if user.CompanyId == utils.GAO_YI_ZI_CHAN_COMPANY_ID {
+		resp.HasPermission = 3
+		br.Ret = 200
+		br.Success = true
+		br.Msg = "获取成功"
+		br.Data = resp
+		return
+	}
 
 	resp.HasPermission = 1
 	resp.CygxYanxuanSpecialItem = *item
@@ -1034,6 +1052,17 @@ func (this *YanxuanSpecialController) AuthorList() {
 		currentIndex = 1
 	}
 	startSize = utils.StartIndex(currentIndex, pageSize)
+	resp := new(models.SpecialAuthorListResp)
+	if sysUser.CompanyId == utils.GAO_YI_ZI_CHAN_COMPANY_ID {
+		resp.List = make([]*models.CygxYanxuanSpecialAuthorItem, 0)
+		resp.Paging = paging.GetPaging(currentIndex, pageSize, 0)
+		br.Ret = 200
+		br.Success = true
+		br.Msg = "获取成功"
+		br.Data = resp
+		return
+	}
+
 	var condition string
 	var pars []interface{}
 	condition += ` AND  a.nick_name <> ''   `
@@ -1062,7 +1091,7 @@ func (this *YanxuanSpecialController) AuthorList() {
 	for _, v := range list {
 		v.YanxuanSpecialCenter = bestNew[v.UserId]
 	}
-	resp := new(models.SpecialAuthorListResp)
+
 	isAuthor, _ := services.GetYanxuanSpecialAuthorInfo(sysUser) //用户是否没开通研选专栏以及,专栏信息是否完善
 	resp.IsAuthor = isAuthor
 	page := paging.GetPaging(currentIndex, pageSize, total)