xingzai 1 rok pred
rodič
commit
8f07b47b99
2 zmenil súbory, kde vykonal 28 pridanie a 0 odobranie
  1. 25 0
      controllers/article.go
  2. 3 0
      utils/constants.go

+ 25 - 0
controllers/article.go

@@ -86,6 +86,31 @@ func (this *ArticleController) Detail() {
 	if _, ok := lyjhTypeMap[detail.CategoryId]; ok {
 		detail.IsRoadShow = true
 	}
+
+	// 高毅资产的联系人,有权限的行业也不能查看报告详情页。提示无权限页面
+	if detail.ArticleTypeId == 0 && user.CompanyId == utils.GAO_YI_ZI_CHAN_COMPANY_ID {
+		_, sellerName, sellerMobile, popupMsg, err := services.GetUserHasPermissionArticle(user)
+		if err != nil {
+			br.Msg = "获取信息失败"
+			br.ErrMsg = "判断是否已申请过试用失败,Err:" + err.Error()
+			return
+		}
+		resp.PopupMsg = popupMsg
+		resp.HasPermission = 3
+		resp.SellerName = sellerName
+		resp.SellerMobile = sellerMobile
+		detail.Body = ""
+		detail.Abstract = ""
+		detail.BodyText = ""
+		detail.SellerName = sellerName
+		detail.SellerMobile = sellerMobile
+		resp.Detail = detail
+		br.Ret = 200
+		br.Success = true
+		br.Msg = "获取成功"
+		br.Data = resp
+		return
+	}
 	articleCollectMap, _ := services.GetCygxArticleCollectMap(user.UserId)
 	detail.IsCollect = articleCollectMap[detail.ArticleId]
 	if isSendWx == 1 {

+ 3 - 0
utils/constants.go

@@ -167,5 +167,8 @@ const (
 const (
 	ACtIVITY_SPECIAL_EXPLAIN      = "此类调研具体行程尚未确定,待预报名人数满10人后弘则会确定行程并推送给您活动日期,只有在确定行程中再次报名才完成占位。"                        //专项调研说明
 	ACtIVITY_SPECIAL_TRIP_EXPLAIN = "此类调研时间安排已经确定,点击报名后按人次扣除对应机构的服务点数。由于每场活动人数有限,如果不能参加请提前48小时取消,未及时取消导致影响其他客户报名将会维持扣点。" //专项调研说明
+)
 
+const (
+	GAO_YI_ZI_CHAN_COMPANY_ID = 5285 // 高毅资产ID
 )