|
@@ -335,6 +335,7 @@ func GetUserType(companyId int) (userType int, permissionStrnew string, err erro
|
|
|
err = errs
|
|
|
return
|
|
|
}
|
|
|
+ permissionStrnew = permissionStr
|
|
|
//大套餐客户,数据库添加标识,
|
|
|
companyUserTypeDetail, errs := models.GetCygxCompanyUserType(companyId)
|
|
|
if errs != nil && errs.Error() != utils.ErrNoRow() {
|
|
@@ -527,18 +528,18 @@ func GetShareNoPowe(activityInfo *models.ActivityDetail, permissionStr string, u
|
|
|
// noPower = true
|
|
|
//}
|
|
|
//1、永续客户 //2、大套餐客户(4个行业全开通的正式客户) //3、分行业套餐客户(开通对应行业的正式客户) //4、仅开通专家套餐的正式客户 //5、开通对应行业套餐或专家套餐的试用客户
|
|
|
- if userType == 2 && strings.Contains(permissionStr, "专家") && !strings.Contains(activityInfo.CustomerTypeIds, strconv.Itoa(2)) && !strings.Contains(activityInfo.CustomerTypeIds, strconv.Itoa(3)) && !strings.Contains(activityInfo.CustomerTypeIds, strconv.Itoa(4)) {
|
|
|
- noPower = true
|
|
|
- }
|
|
|
- if userType == 2 && !strings.Contains(permissionStr, "专家") && !strings.Contains(activityInfo.CustomerTypeIds, strconv.Itoa(2)) && !strings.Contains(activityInfo.CustomerTypeIds, strconv.Itoa(3)) {
|
|
|
- noPower = true
|
|
|
- }
|
|
|
- if userType == 3 && strings.Contains(permissionStr, "专家") && !strings.Contains(activityInfo.CustomerTypeIds, strconv.Itoa(3)) && !strings.Contains(activityInfo.CustomerTypeIds, strconv.Itoa(4)) {
|
|
|
- noPower = true
|
|
|
- }
|
|
|
- if userType == 3 && !strings.Contains(permissionStr, "专家") && !strings.Contains(activityInfo.CustomerTypeIds, strconv.Itoa(3)) {
|
|
|
- noPower = true
|
|
|
- }
|
|
|
+ //if userType == 2 && strings.Contains(permissionStr, "专家") && !strings.Contains(activityInfo.CustomerTypeIds, strconv.Itoa(2)) && !strings.Contains(activityInfo.CustomerTypeIds, strconv.Itoa(3)) && !strings.Contains(activityInfo.CustomerTypeIds, strconv.Itoa(4)) {
|
|
|
+ // noPower = true
|
|
|
+ //}
|
|
|
+ //if userType == 2 && !strings.Contains(permissionStr, "专家") && !strings.Contains(activityInfo.CustomerTypeIds, strconv.Itoa(2)) && !strings.Contains(activityInfo.CustomerTypeIds, strconv.Itoa(3)) {
|
|
|
+ // noPower = true
|
|
|
+ //}
|
|
|
+ //if userType == 3 && strings.Contains(permissionStr, "专家") && !strings.Contains(activityInfo.CustomerTypeIds, strconv.Itoa(3)) && !strings.Contains(activityInfo.CustomerTypeIds, strconv.Itoa(4)) {
|
|
|
+ // noPower = true
|
|
|
+ //}
|
|
|
+ //if userType == 3 && !strings.Contains(permissionStr, "专家") && !strings.Contains(activityInfo.CustomerTypeIds, strconv.Itoa(3)) {
|
|
|
+ // noPower = true
|
|
|
+ //}
|
|
|
if userType == 8 {
|
|
|
permissionShengji, errs := models.GetCompanyPermissionByUserZhengShiTrip(user.CompanyId)
|
|
|
if errs != nil {
|