|
@@ -308,6 +308,7 @@ func (this *UserController) ApplyTryOut() {
|
|
|
detailId := req.DetailId
|
|
|
sourceId = detailId
|
|
|
source = tryType
|
|
|
+ redirectUrl := ""
|
|
|
var isResearch bool // 是否属于研选
|
|
|
if tryType == "Article" {
|
|
|
detail, err := models.GetArticleDetailById(detailId)
|
|
@@ -320,6 +321,7 @@ func (this *UserController) ApplyTryOut() {
|
|
|
if detail.ArticleTypeId > 0 {
|
|
|
isResearch = true
|
|
|
}
|
|
|
+ redirectUrl = utils.WX_MSG_PATH_YX_ARTICLE_DETAIL + strconv.Itoa(detailId)
|
|
|
} else if tryType == "Activity" {
|
|
|
detail, err := models.GetAddActivityInfoById(detailId)
|
|
|
if err != nil {
|
|
@@ -331,6 +333,7 @@ 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)
|
|
|
} else if tryType == "MicroAudio" {
|
|
|
// 微路演音频
|
|
|
microAudio, e := models.GetCygxActivityVoiceById(detailId)
|
|
@@ -596,17 +599,6 @@ func (this *UserController) ApplyTryOut() {
|
|
|
applyMethod = applyMethod + "," + title
|
|
|
}
|
|
|
}
|
|
|
- //openIpItem, _ := models.GetUserRecordByMobile(4, cnf.ConfigValue)
|
|
|
- //if openIpItem != nil && openIpItem.OpenId != "" {
|
|
|
- // if req.ApplyMethod != 2 {
|
|
|
- // req.RealName = user.RealName
|
|
|
- // req.CompanyName = user.CompanyName
|
|
|
- // }
|
|
|
- // utils.FileLog.Info("推送消息 %s %s,%s,%s,%s", req.RealName, req.CompanyName, mobile, openIpItem.OpenId, applyMethod)
|
|
|
- // go services.SendPermissionApplyTemplateMsg(req.RealName, req.CompanyName, mobile, applyMethod, openIpItem)
|
|
|
- //}
|
|
|
-
|
|
|
- //go services.SendPermissionApplyTemplateMsgAdmin(req, mobile, applyMethod, isResearch)
|
|
|
|
|
|
item := new(models.CygxApplyRecord)
|
|
|
item.UserId = user.UserId
|
|
@@ -635,18 +627,10 @@ func (this *UserController) ApplyTryOut() {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- go services.SendPermissionApplyTemplateMsg(req.RealName, req.CompanyName, mobile, applyMethod, user) //权限申请模板消息推送
|
|
|
- //if sellerItem == nil {
|
|
|
- // go services.SendPermissionApplyTemplateMsgAdmin(req, mobile, applyMethod, isResearch)
|
|
|
- //} else {
|
|
|
- // openIpItem, _ := models.GetUserRecordByMobile(4, sellerItem.Mobile)
|
|
|
- // if openIpItem != nil && openIpItem.OpenId != "" {
|
|
|
- //
|
|
|
- // }
|
|
|
- //}
|
|
|
+ go services.SendPermissionApplyTemplateMsg(req.RealName, req.CompanyName, mobile, applyMethod, redirectUrl, user) //权限申请模板消息推送
|
|
|
if isResearch {
|
|
|
//如果是研选的报告走研选的类目模版消息
|
|
|
- go services.SendPermissionApplyTemplateMsgAdminByYxCategory(req, user.CompanyId, mobile)
|
|
|
+ go services.SendPermissionApplyTemplateMsgAdminByYxCategory(req, user.CompanyId, mobile, redirectUrl)
|
|
|
}
|
|
|
|
|
|
//添加成功后,设置5分钟缓存,不允许重复添加
|