Browse Source

no message

xingzai 1 year ago
parent
commit
6f31265a32
2 changed files with 11 additions and 0 deletions
  1. 3 0
      services/activity.go
  2. 8 0
      services/company_permission.go

+ 3 - 0
services/activity.go

@@ -416,6 +416,9 @@ func GetActivityDetailUserPower(user *models.WxUserItem, activityInfo *models.Ac
 		err = errors.New("GetCompanyPermissionUpgrade, Err: " + e.Error())
 		return
 	}
+	if permissionStr == "" {
+		return
+	}
 	if activityInfo.LimitPeopleNum > 0 {
 		mapUserType, e := GetActivityCcustomerTypeList()
 		if e != nil {

+ 8 - 0
services/company_permission.go

@@ -150,6 +150,14 @@ func GetUserHasPermissionActivity(user *models.WxUserItem, activityInfo *models.
 		return
 	}
 	popupMsg = "您暂无权限参加此活动,若想参加可以申请开通对应的试用权限"
+	if user.CompanyId == 1 {
+		if applyCount > 0 {
+			hasPermission = 4
+		} else {
+			hasPermission = 5
+		}
+		return
+	}
 	companyItem, err := models.GetCompanyDetailById(user.CompanyId)
 	if err != nil {
 		if err.Error() == utils.ErrNoRow() {