|
@@ -312,7 +312,7 @@ func EditUserOutboundMobile(cont context.Context) (err error) {
|
|
|
//获取 用户类型 //1、永续客户 //2、大套餐客户(4个行业全开通的正式客户) //3、分行业套餐客户(开通对应行业的正式客户) //4、仅开通专家套餐的正式客户 //5、开通对应行业套餐或专家套餐的试用客户;6、冻结客户;7、流失客户
|
|
|
func GetUserType(companyId int) (userType int, permissionStrnew string, err error) {
|
|
|
|
|
|
- var permissionStr, permissionZhegnshiStr string
|
|
|
+ var permissionStr, permissionZhengShiStr string
|
|
|
if companyId <= 1 {
|
|
|
userType = 0
|
|
|
} else {
|
|
@@ -334,7 +334,7 @@ func GetUserType(companyId int) (userType int, permissionStrnew string, err erro
|
|
|
err = errs
|
|
|
return
|
|
|
}
|
|
|
- permissionZhegnshiStr, errs = models.GetCompanyPermissionByUserZhengShi(companyId)
|
|
|
+ permissionZhengShiStr, errs = models.GetCompanyPermissionByUserZhengShi(companyId)
|
|
|
if errs != nil {
|
|
|
err = errs
|
|
|
return
|
|
@@ -349,7 +349,7 @@ func GetUserType(companyId int) (userType int, permissionStrnew string, err erro
|
|
|
} else if companyDetail.Status == "正式" {
|
|
|
if permissionStr == "专家" {
|
|
|
userType = 4
|
|
|
- } else if strings.Count(permissionZhegnshiStr, "医药") == 2 && strings.Count(permissionZhegnshiStr, "消费") == 2 && strings.Count(permissionZhegnshiStr, "科技") == 2 && strings.Count(permissionZhegnshiStr, "智造") == 2 {
|
|
|
+ } else if strings.Count(permissionZhengShiStr, "医药") == 2 && strings.Count(permissionZhengShiStr, "消费") == 2 && strings.Count(permissionZhengShiStr, "科技") == 2 && strings.Count(permissionZhengShiStr, "智造") == 2 {
|
|
|
userType = 2
|
|
|
} else {
|
|
|
userType = 3
|
|
@@ -367,19 +367,19 @@ func GetUserType(companyId int) (userType int, permissionStrnew string, err erro
|
|
|
//大套餐客户定义:医药、消费、科技、智造、策略。5个行业中任意4个及以上是正式权限的,属于大套餐客户(医药、消费、科技、智造需要主客观都开)
|
|
|
if userType == 3 {
|
|
|
var permissionZhegnshiNum int
|
|
|
- if strings.Count(permissionZhegnshiStr, "医药") == 2 {
|
|
|
+ if strings.Count(permissionZhengShiStr, "医药") == 2 {
|
|
|
permissionZhegnshiNum++
|
|
|
}
|
|
|
- if strings.Count(permissionZhegnshiStr, "消费") == 2 {
|
|
|
+ if strings.Count(permissionZhengShiStr, "消费") == 2 {
|
|
|
permissionZhegnshiNum++
|
|
|
}
|
|
|
- if strings.Count(permissionZhegnshiStr, "科技") == 2 {
|
|
|
+ if strings.Count(permissionZhengShiStr, "科技") == 2 {
|
|
|
permissionZhegnshiNum++
|
|
|
}
|
|
|
- if strings.Count(permissionZhegnshiStr, "智造") == 2 {
|
|
|
+ if strings.Count(permissionZhengShiStr, "智造") == 2 {
|
|
|
permissionZhegnshiNum++
|
|
|
}
|
|
|
- if strings.Count(permissionZhegnshiStr, "策略") == 1 {
|
|
|
+ if strings.Count(permissionZhengShiStr, "策略") == 1 {
|
|
|
permissionZhegnshiNum++
|
|
|
}
|
|
|
if permissionZhegnshiNum >= 4 {
|