|
@@ -1184,7 +1184,7 @@ func (this *ArticleCommonController) DetailPublic() {
|
|
|
return
|
|
|
}
|
|
|
hasPermission := 0
|
|
|
-
|
|
|
+ uid := wxUser.UserId
|
|
|
detail, err := models.GetArticleDetailById(articleId)
|
|
|
if err != nil {
|
|
|
br.Msg = "获取信息失败"
|
|
@@ -1302,6 +1302,31 @@ func (this *ArticleCommonController) DetailPublic() {
|
|
|
detail.HttpUrl = utils.StrategyPlatform + strconv.Itoa(articleId) + "?token=" + chartUserTokenByMobile
|
|
|
detail.IsNeedJump = true
|
|
|
}
|
|
|
+ if detail.ArticleId < utils.SummaryArticleId {
|
|
|
+ chartUserTokenByMobile, _ := services.GetUserTokenByMobile(utils.HtgjPublicMobile)
|
|
|
+ detail.HttpUrl = utils.StrategyPlatform + strconv.Itoa(articleId) + "?token=" + chartUserTokenByMobile
|
|
|
+ detail.IsNeedJump = true
|
|
|
+ }
|
|
|
+ collectCount, err := models.GetArticleCollectCount(uid, articleId)
|
|
|
+ if err != nil && err.Error() != utils.ErrNoRow() {
|
|
|
+ br.Msg = "获取信息失败"
|
|
|
+ br.ErrMsg = "判断是否已收藏失败,Err:" + strconv.Itoa(uid) + ";articleId" + strconv.Itoa(articleId)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if collectCount > 0 {
|
|
|
+ detail.IsCollect = true
|
|
|
+ }
|
|
|
+ interviewApplyItem, err := models.GetArticleInterviewApply(uid, articleId)
|
|
|
+ if err != nil && err.Error() != utils.ErrNoRow() {
|
|
|
+ br.Msg = "获取信息失败"
|
|
|
+ br.ErrMsg = "判断是否已申请访谈失败,Err:" + strconv.Itoa(uid) + ";articleId" + strconv.Itoa(articleId)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if interviewApplyItem != nil && interviewApplyItem.InterviewApplyId > 0 {
|
|
|
+ detail.IsInterviewApply = true
|
|
|
+ detail.InterviewApplyStatus = interviewApplyItem.Status
|
|
|
+ }
|
|
|
+ resp.Detail = detail
|
|
|
}
|
|
|
resp.CompanyName = companyName
|
|
|
br.Ret = 200
|