|
@@ -82,10 +82,14 @@ func GetActivityLabelSpecialList(user *models.WxUserItem, chartPermissionIds str
|
|
|
return
|
|
|
}
|
|
|
companyDetail, e := models.GetCompanyDetailByIdGroupTrip(user.CompanyId)
|
|
|
- if e != nil {
|
|
|
+ fmt.Println(e)
|
|
|
+ if e != nil && e.Error() != utils.ErrNoRow() {
|
|
|
err = errors.New("GetCompanyDetailByIdGroupTrip, Err: " + e.Error())
|
|
|
return
|
|
|
}
|
|
|
+ if companyDetail == nil {
|
|
|
+ return
|
|
|
+ }
|
|
|
//如果是永续的就按照普通的权限逻辑来查,如果不是就按照升级的逻辑来查
|
|
|
var condition string
|
|
|
if companyDetail.Status == "永续" {
|
|
@@ -592,10 +596,13 @@ func GetActivitySpecialUserType(companyId int) (userType int, permissionStrnew s
|
|
|
func GetSpecialUserType(user *models.WxUserItem) (userType int, err error) {
|
|
|
companyId := user.CompanyId
|
|
|
companyDetail, e := models.GetCompanyDetailByIdGroupTrip(companyId)
|
|
|
- if e != nil {
|
|
|
+ if e != nil && e.Error() != utils.ErrNoRow() {
|
|
|
err = errors.New("GetCompanyDetailByIdGroupTrip, Err: " + e.Error())
|
|
|
return
|
|
|
}
|
|
|
+ if companyDetail == nil {
|
|
|
+ return
|
|
|
+ }
|
|
|
if companyId <= 1 {
|
|
|
userType = 0
|
|
|
} else {
|