|
@@ -335,6 +335,18 @@ func GetUserType(companyId int) (userType int, permissionStrnew string, err erro
|
|
err = errs
|
|
err = errs
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
+ //大套餐客户,数据库添加标识,
|
|
|
|
+ companyUserTypeDetail, errs := models.GetCygxCompanyUserType(companyId)
|
|
|
|
+ if errs != nil && errs.Error() != utils.ErrNoRow() {
|
|
|
|
+ err = errs
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if companyUserTypeDetail != nil {
|
|
|
|
+ if companyUserTypeDetail.CustomerTypeId != 0 {
|
|
|
|
+ userType = companyUserTypeDetail.CustomerTypeId
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
permissionZhengShiStr, errs = models.GetCompanyPermissionByUserZhengShi(companyId)
|
|
permissionZhengShiStr, errs = models.GetCompanyPermissionByUserZhengShi(companyId)
|
|
if errs != nil {
|
|
if errs != nil {
|
|
err = errs
|
|
err = errs
|
|
@@ -372,9 +384,11 @@ func GetUserType(companyId int) (userType int, permissionStrnew string, err erro
|
|
if strings.Count(permissionZhengShiStr, "路演服务") == 1 {
|
|
if strings.Count(permissionZhengShiStr, "路演服务") == 1 {
|
|
permissionZhegnshiNum++
|
|
permissionZhegnshiNum++
|
|
}
|
|
}
|
|
- if permissionZhegnshiNum == 6 {
|
|
|
|
- userType = 2
|
|
|
|
- } else if permissionZhegnshiNum == 4 || permissionZhegnshiNum == 5 {
|
|
|
|
|
|
+ //if permissionZhegnshiNum == 6 {
|
|
|
|
+ // userType = 2
|
|
|
|
+ //} else
|
|
|
|
+ //大套餐客户,数据库添加标识,条件大于等于四的都是 30W套餐客户
|
|
|
|
+ if permissionZhegnshiNum >= 4 {
|
|
userType = 10
|
|
userType = 10
|
|
} else {
|
|
} else {
|
|
userType = 3
|
|
userType = 3
|
|
@@ -408,9 +422,9 @@ func GetActivityDetailUserPower(user *models.WxUserItem, activityInfo *models.Ac
|
|
userTypeStr = mapUserType[userType]
|
|
userTypeStr = mapUserType[userType]
|
|
// 永续客户、大套餐客户、30W套餐客户可以查看行业升级套餐客户 权限
|
|
// 永续客户、大套餐客户、30W套餐客户可以查看行业升级套餐客户 权限
|
|
if userTypeStr == "1" || userTypeStr == "2" || userTypeStr == "AA" {
|
|
if userTypeStr == "1" || userTypeStr == "2" || userTypeStr == "AA" {
|
|
- if !strings.Contains(activityInfo.CustomerTypeIds, userTypeStr) && !strings.Contains(activityInfo.CustomerTypeIds, "8") {
|
|
|
|
|
|
+ if strings.Contains(activityInfo.CustomerTypeIds, userTypeStr) && strings.Contains(activityInfo.CustomerTypeIds, "8") {
|
|
havePower = true
|
|
havePower = true
|
|
- return
|
|
|
|
|
|
+ //return
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -462,7 +476,7 @@ func GetActivityDetailUserPower(user *models.WxUserItem, activityInfo *models.Ac
|
|
havePower = true
|
|
havePower = true
|
|
}
|
|
}
|
|
|
|
|
|
- permissionShengji, errs := models.GetCompanyPermissionByUserZhengShiTrip(user.CompanyId)
|
|
|
|
|
|
+ permissionShengji, errs := models.GetCompanyPermissionByUserTrip(user.CompanyId)
|
|
if errs != nil {
|
|
if errs != nil {
|
|
err = errs
|
|
err = errs
|
|
return
|
|
return
|