|
@@ -934,6 +934,7 @@ func (this *UserController) ApplyTryOut() {
|
|
|
sourceId = detailId
|
|
|
source = tryType
|
|
|
redirectUrl := ""
|
|
|
+ redirectUrlYx := ""
|
|
|
var isResearch bool // 是否属于研选
|
|
|
if tryType == "Article" {
|
|
|
detail, err := models.GetArticleDetailById(detailId)
|
|
@@ -946,7 +947,8 @@ func (this *UserController) ApplyTryOut() {
|
|
|
if detail.ArticleTypeId > 0 {
|
|
|
isResearch = true
|
|
|
}
|
|
|
- redirectUrl = utils.WX_MSG_PATH_YX_ARTICLE_DETAIL + strconv.Itoa(detailId)
|
|
|
+ redirectUrl = utils.WX_MSG_PATH_ARTICLE_DETAIL + strconv.Itoa(detailId)
|
|
|
+ redirectUrlYx = utils.WX_MSG_PATH_YX_ARTICLE_DETAIL + strconv.Itoa(detailId)
|
|
|
} else if tryType == "Activity" {
|
|
|
detail, err := models.GetAddActivityInfoById(detailId)
|
|
|
if err != nil {
|
|
@@ -958,7 +960,8 @@ func (this *UserController) ApplyTryOut() {
|
|
|
if strings.Contains(detail.ChartPermissionName, utils.CHART_PERMISSION_NAME_YANXUAN) {
|
|
|
isResearch = true
|
|
|
}
|
|
|
- redirectUrl = utils.WX_MSG_PATH_YX_ACTIVITY_DETAIL + strconv.Itoa(detailId)
|
|
|
+ redirectUrl = utils.WX_MSG_PATH_ARTICLE_DETAIL + strconv.Itoa(detailId)
|
|
|
+ redirectUrlYx = utils.WX_MSG_PATH_YX_ARTICLE_DETAIL + strconv.Itoa(detailId)
|
|
|
} else if tryType == "MicroAudio" {
|
|
|
// 微路演音频
|
|
|
microAudio, e := models.GetCygxActivityVoiceById(detailId)
|
|
@@ -1211,9 +1214,9 @@ func (this *UserController) ApplyTryOut() {
|
|
|
CompanyIdType = 1
|
|
|
applyMethod = "潜在客户"
|
|
|
}
|
|
|
- if detailId > 0 {
|
|
|
- applyMethod = applyMethod + "," + title
|
|
|
- }
|
|
|
+ //if detailId > 0 {
|
|
|
+ // applyMethod = applyMethod + "," + title
|
|
|
+ //}
|
|
|
}
|
|
|
|
|
|
item := new(models.CygxApplyRecord)
|
|
@@ -1241,11 +1244,15 @@ func (this *UserController) ApplyTryOut() {
|
|
|
br.ErrMsg = "申请失败,Err:" + err.Error()
|
|
|
return
|
|
|
}
|
|
|
- go services.SendPermissionApplyTemplateMsg(req.RealName, req.CompanyName, mobile, applyMethod, redirectUrl, user) //权限申请模板消息推送
|
|
|
+
|
|
|
if isResearch {
|
|
|
//如果是研选的报告走研选的类目模版消息
|
|
|
- go services.SendPermissionApplyTemplateMsgAdminByYxCategory(req, user.CompanyId, mobile, redirectUrl)
|
|
|
+ go services.SendPermissionApplyTemplateMsgAdminByYxCategory(req, user.CompanyId, mobile, applyMethod, redirectUrlYx)
|
|
|
}
|
|
|
+ if detailId > 0 {
|
|
|
+ applyMethod = applyMethod + "," + title
|
|
|
+ }
|
|
|
+ go services.SendPermissionApplyTemplateMsg(req.RealName, req.CompanyName, mobile, applyMethod, redirectUrl, user) //权限申请模板消息推送
|
|
|
//添加成功后,设置5分钟缓存,不允许重复添加
|
|
|
//utils.Rc.SetNX(cacheKey, user.Mobile, time.Second*60)
|
|
|
|