Răsfoiți Sursa

Merge branch 'master' of http://8.136.199.33:3000/cxzhang/hongze_clpt

xingzai 1 an în urmă
părinte
comite
7d53688cd9
3 a modificat fișierele cu 28 adăugiri și 0 ștergeri
  1. 23 0
      controllers/article.go
  2. 1 0
      models/article.go
  3. 4 0
      utils/constants.go

+ 23 - 0
controllers/article.go

@@ -64,6 +64,29 @@ func (this *ArticleController) Detail() {
 		br.ErrMsg = "获取信息失败,Err:" + err.Error()
 		return
 	}
+	// 高毅资产的联系人,有权限的行业也不能查看报告详情页。提示无权限页面
+	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.Seller.SellerName = sellerName
+		detail.Seller.SellerMobile = sellerMobile
+		resp.Detail = detail
+		br.Ret = 200
+		br.Success = true
+		br.Msg = "获取成功"
+		br.Data = resp
+		return
+	}
 	//是否属于专项调研报告
 	if detail.SubCategoryName == "专项调研" {
 		detail.IsSpecialArticle = true

+ 1 - 0
models/article.go

@@ -32,6 +32,7 @@ type ArticleDetail struct {
 	Disclaimers          string          `description:"免责声明"`
 	IsSpecialArticle     bool            `description:"是否属于专项调研报告"`
 	SubCategoryName      string          `description:"二级分类"`
+	ArticleTypeId        int             `description:"文章类型ID"`
 }
 
 type SellerResp struct {

+ 4 - 0
utils/constants.go

@@ -183,3 +183,7 @@ const (
 	ABOUT_US_URL   = "https://hzstatic.hzinsights.com/static/yb/video/8617330c2a76e0c35999f6466b4470c4.mp4"
 	ABOUT_US_TITLE = "关于我们--三分钟了解弘则研究体系和方法论"
 )
+
+const (
+	GAO_YI_ZI_CHAN_COMPANY_ID = 5285 // 高毅资产ID
+)