|
@@ -305,7 +305,7 @@ func EditUserOutboundMobile(cont context.Context) (err error) {
|
|
|
//获取 用户类型 //1、永续客户 //2、大套餐客户(4个行业全开通的正式客户) //3、分行业套餐客户(开通对应行业的正式客户) //4、仅开通专家套餐的正式客户 //5、开通对应行业套餐或专家套餐的试用客户
|
|
|
func GetUserType(companyId int) (userType int, permissionStrnew string, err error) {
|
|
|
|
|
|
- var permissionStr string
|
|
|
+ var permissionStr, permissionZhegnshiStr string
|
|
|
if companyId <= 1 {
|
|
|
userType = 0
|
|
|
} else {
|
|
@@ -327,6 +327,12 @@ func GetUserType(companyId int) (userType int, permissionStrnew string, err erro
|
|
|
err = errs
|
|
|
return
|
|
|
}
|
|
|
+ permissionZhegnshiStr, errs = models.GetCompanyPermissionByUserZhengShi(companyId)
|
|
|
+ if errs != nil {
|
|
|
+ err = errs
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
//1、永续客户 //2、大套餐客户(4个行业全开通的正式客户) //3、分行业套餐客户(开通对应行业的正式客户) //4、仅开通专家套餐的正式客户 //5、开通对应行业套餐或专家套餐的试用客户
|
|
|
if companyDetail.Status == "永续" {
|
|
|
userType = 1
|
|
@@ -335,7 +341,7 @@ func GetUserType(companyId int) (userType int, permissionStrnew string, err erro
|
|
|
} else if companyDetail.Status == "正式" {
|
|
|
if permissionStr == "专家" {
|
|
|
userType = 4
|
|
|
- } else if strings.Contains(permissionStr, "医药") && strings.Contains(permissionStr, "消费") && strings.Contains(permissionStr, "科技") && strings.Contains(permissionStr, "智造") {
|
|
|
+ } else if strings.Contains(permissionZhegnshiStr, "医药") && strings.Contains(permissionZhegnshiStr, "消费") && strings.Contains(permissionZhegnshiStr, "科技") && strings.Contains(permissionZhegnshiStr, "智造") {
|
|
|
userType = 2
|
|
|
} else {
|
|
|
userType = 3
|