|
@@ -525,7 +525,7 @@ func (this *UserController) ApplyTryOut() {
|
|
req.RealName = user.RealName
|
|
req.RealName = user.RealName
|
|
req.CompanyName = user.CompanyName
|
|
req.CompanyName = user.CompanyName
|
|
}
|
|
}
|
|
- go services.SendPermissionApplyTemplateMsg(req.RealName, req.CompanyName, mobile, applyMethod, openIpItem)
|
|
|
|
|
|
+ //go services.SendPermissionApplyTemplateMsg(req.RealName, req.CompanyName, mobile, applyMethod, openIpItem)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
@@ -556,10 +556,8 @@ func (this *UserController) ApplyTryOut() {
|
|
// utils.FileLog.Info("推送消息 %s %s,%s,%s,%s", req.RealName, req.CompanyName, mobile, openIpItem.OpenId, applyMethod)
|
|
// 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.SendPermissionApplyTemplateMsg(req.RealName, req.CompanyName, mobile, applyMethod, openIpItem)
|
|
//}
|
|
//}
|
|
- //如果对应销售不存在就给王芳,汪洋推模版消息
|
|
|
|
- if sellerItem == nil {
|
|
|
|
- go services.SendPermissionApplyTemplateMsgAdmin(req, mobile, applyMethod, isResearch)
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
|
|
+ //go services.SendPermissionApplyTemplateMsgAdmin(req, mobile, applyMethod, isResearch)
|
|
|
|
|
|
err = models.AddApplyRecord(&req, user.Mobile, user.CompanyName, uid, user.CompanyId, CompanyIdType)
|
|
err = models.AddApplyRecord(&req, user.Mobile, user.CompanyName, uid, user.CompanyId, CompanyIdType)
|
|
if err != nil {
|
|
if err != nil {
|
|
@@ -567,6 +565,14 @@ func (this *UserController) ApplyTryOut() {
|
|
br.ErrMsg = "申请失败,Err:" + err.Error()
|
|
br.ErrMsg = "申请失败,Err:" + err.Error()
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
+ 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, openIpItem)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
//添加成功后,设置5分钟缓存,不允许重复添加
|
|
//添加成功后,设置5分钟缓存,不允许重复添加
|
|
//utils.Rc.SetNX(cacheKey, user.Mobile, time.Second*60)
|
|
//utils.Rc.SetNX(cacheKey, user.Mobile, time.Second*60)
|
|
|
|
|