2637309949 %!s(int64=4) %!d(string=hai) anos
pai
achega
b47e9b9b57
Modificáronse 1 ficheiros con 1 adicións e 3 borrados
  1. 1 3
      model/i2bill_user_model.go

+ 1 - 3
model/i2bill_user_model.go

@@ -232,7 +232,6 @@ func GetAcquirePerm(userId int64, rpcClient transformclient.Transform, engine *x
 		return nil, err
 	}
 	if partUser.Id != 0 && partUser.MkId != "" {
-		fmt.Println("----------1", err)
 		res, err = GetErpUser("", partUser.MkId, rpcClient, ctx)
 		if err != nil {
 			return nil, err
@@ -245,11 +244,10 @@ func GetAcquirePerm(userId int64, rpcClient transformclient.Transform, engine *x
 	}
 
 	resMobile, err := GetErpUser(user.Mobile, "", rpcClient, ctx)
-	fmt.Println("----------2", resMobile)
 	if err != nil {
 		return nil, err
 	}
-	if resMobile.UserId != "" {
+	if resMobile != nil && resMobile.UserId != "" {
 		res = resMobile
 	}
 	return res, nil