|
@@ -714,7 +714,7 @@ func GetUserhasPermission(user *models.WxUserItem) (hasPermission int, err error
|
|
//}
|
|
//}
|
|
|
|
|
|
// 研选类目模板消息
|
|
// 研选类目模板消息
|
|
-func SendPermissionApplyTemplateMsgAdminByYxCategory(req models.ApplyTryReq, companyId int) (err error) {
|
|
|
|
|
|
+func SendPermissionApplyTemplateMsgAdminByYxCategory(req models.ApplyTryReq, companyId int, usermobile string) (err error) {
|
|
defer func() {
|
|
defer func() {
|
|
if err != nil {
|
|
if err != nil {
|
|
go utils.SendAlarmMsg("研选类目模板消息消息失败, SendPermissionApplyTemplateMsgAdminByYxCategoryErrMsg: "+err.Error(), 3)
|
|
go utils.SendAlarmMsg("研选类目模板消息消息失败, SendPermissionApplyTemplateMsgAdminByYxCategoryErrMsg: "+err.Error(), 3)
|
|
@@ -722,7 +722,7 @@ func SendPermissionApplyTemplateMsgAdminByYxCategory(req models.ApplyTryReq, com
|
|
}()
|
|
}()
|
|
|
|
|
|
//潜在客户、未开权益,已开FICC的客户推给王芳,开通权益的客户推给对应销售
|
|
//潜在客户、未开权益,已开FICC的客户推给王芳,开通权益的客户推给对应销售
|
|
- mobile := utils.WxMsgTemplateIdAskMsgMobilePublic
|
|
|
|
|
|
+ mobileOpneid := utils.WxMsgTemplateIdAskMsgMobilePublic
|
|
if companyId > 1 {
|
|
if companyId > 1 {
|
|
raiCount, e := models.GetCompanyProductCount(companyId, utils.COMPANY_PRODUCT_RAI_ID)
|
|
raiCount, e := models.GetCompanyProductCount(companyId, utils.COMPANY_PRODUCT_RAI_ID)
|
|
if e != nil {
|
|
if e != nil {
|
|
@@ -737,10 +737,10 @@ func SendPermissionApplyTemplateMsgAdminByYxCategory(req models.ApplyTryReq, com
|
|
err = errors.New("GetRaiSellerByCompanyId, Err: " + e.Error())
|
|
err = errors.New("GetRaiSellerByCompanyId, Err: " + e.Error())
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- mobile = sealldetail.Mobile
|
|
|
|
|
|
+ mobileOpneid = sealldetail.Mobile
|
|
}
|
|
}
|
|
|
|
|
|
- openIdList, e := models.GetMfyxWxOpenIdByMobileList(mobile)
|
|
|
|
|
|
+ openIdList, e := models.GetMfyxWxOpenIdByMobileList(mobileOpneid)
|
|
if e != nil {
|
|
if e != nil {
|
|
err = errors.New("GetMfyxWxOpenIdByMobileList, Err: " + e.Error())
|
|
err = errors.New("GetMfyxWxOpenIdByMobileList, Err: " + e.Error())
|
|
return err
|
|
return err
|
|
@@ -766,9 +766,9 @@ func SendPermissionApplyTemplateMsgAdminByYxCategory(req models.ApplyTryReq, com
|
|
for _, v := range openIdList {
|
|
for _, v := range openIdList {
|
|
openIdArr = append(openIdArr, v.OpenId)
|
|
openIdArr = append(openIdArr, v.OpenId)
|
|
}
|
|
}
|
|
- detail, e := models.GetCygxApplyRecordByMobile(mobile)
|
|
|
|
|
|
+ detail, e := models.GetCygxApplyRecordByMobile(usermobile)
|
|
if e != nil {
|
|
if e != nil {
|
|
- err = errors.New("GetActivitySignupNomeetingCountList" + e.Error())
|
|
|
|
|
|
+ err = errors.New("GetCygxApplyRecordByMobile" + e.Error())
|
|
return
|
|
return
|
|
}
|
|
}
|
|
redirectUrl := ""
|
|
redirectUrl := ""
|