|
@@ -312,6 +312,27 @@ Loop:
|
|
|
}
|
|
|
haveResearch = true
|
|
|
}
|
|
|
+ if hasPermission == 5 {
|
|
|
+ companyPermissionNoStatus, err := models.GetCompanyPermissionByUserNoStatus(user.CompanyId)
|
|
|
+ if err != nil {
|
|
|
+ br.Msg = "获取信息失败"
|
|
|
+ br.ErrMsg = "判断是否已申请访谈失败,Err:" + strconv.Itoa(uid) + ";articleId" + strconv.Itoa(articleId)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if companyPermissionNoStatus != "" {
|
|
|
+ sellerItemQy, err := models.GetSellerByCompanyIdCheckFicc(user.CompanyId, 2)
|
|
|
+ if err != nil && err.Error() != utils.ErrNoRow() {
|
|
|
+ br.Msg = "获取信息失败"
|
|
|
+ br.ErrMsg = "获取销售信息失败,Err:" + err.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if sellerItemQy != nil {
|
|
|
+ hasPermission = 3
|
|
|
+ detail.SellerMobile = sellerItemQy.Mobile
|
|
|
+ detail.SellerName = sellerItemQy.RealName
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
if hasPermission == 2 || hasPermission == 4 {
|
|
|
//获取销售手机号
|
|
@@ -327,6 +348,7 @@ Loop:
|
|
|
detail.SellerName = sellerItemQy.RealName
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
if detail.ArticleId < utils.SummaryArticleId {
|
|
|
if user.Mobile != "" {
|
|
|
chartUserTokenByMobile, _ := services.GetUserTokenByMobile(user.Mobile)
|
|
@@ -353,7 +375,6 @@ Loop:
|
|
|
chartUserTokenByMobile, _ := services.GetUserTokenByMobile(user.Mobile)
|
|
|
detail.ReportLink += "?token=" + chartUserTokenByMobile
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
resp := new(models.ArticleDetailResp)
|
|
|
resp.HasPermission = hasPermission
|