com.github.sd4324530.fastweixin.company.api
类 QYUserAPI

java.lang.Object
  继承者 com.github.sd4324530.fastweixin.company.api.QYBaseAPI
      继承者 com.github.sd4324530.fastweixin.company.api.QYUserAPI

public class QYUserAPI
extends QYBaseAPI

==================================================================== 上海聚攒软件开发有限公司 --------------------------------------------------------------------

版本:
1.0.beta ====================================================================
作者:
Nottyjay

字段摘要
 
从类 com.github.sd4324530.fastweixin.company.api.QYBaseAPI 继承的字段
BASE_API_URL, config
 
构造方法摘要
QYUserAPI(QYAPIConfig config)
          构造方法,设置apiConfig
 
方法摘要
 QYResultType batchdelete(String[] userIds)
          批量删除用户
 QYResultType create(QYUser user)
          创建一个新用户
 QYResultType delete(String userId)
          删除用户
 GetQYUserInfoResponse get(String userId)
          获取用户信息
 GetQYUserInfo4DepartmentResponse getList(Integer departmentId, boolean isLoop, Integer status)
          通过部门列表获取部门成员信息
 GetOauthUserInfoResponse getOauthUserInfo(String code)
          通过Oauth授权获得的CODE获取成员信息。
 GetQYUserInviteResponse invite(String userid)
          邀请成员关注。
 GetQYUserInfo4DepartmentResponse simpleList(Integer departmentId, boolean isLoop, Integer status)
          通过部门列表获取部门成员摘要。
 QYResultType update(QYUser user)
          更新用户信息
 
从类 com.github.sd4324530.fastweixin.company.api.QYBaseAPI 继承的方法
executeGet, executePost, executePost, isSuccess
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

QYUserAPI

public QYUserAPI(QYAPIConfig config)
构造方法,设置apiConfig

参数:
config - 微信API配置对象
方法详细信息

create

public QYResultType create(QYUser user)
创建一个新用户

参数:
user - 用户
返回:
创建结果

update

public QYResultType update(QYUser user)
更新用户信息

参数:
user - 用户
返回:
更新结果

delete

public QYResultType delete(String userId)
删除用户

参数:
userId - 用户ID
返回:
删除结果

batchdelete

public QYResultType batchdelete(String[] userIds)
批量删除用户

参数:
userIds - 要删除的用户ID数组
返回:
删除结果

get

public GetQYUserInfoResponse get(String userId)
获取用户信息

参数:
userId - 用户ID
返回:
用户信息

simpleList

public GetQYUserInfo4DepartmentResponse simpleList(Integer departmentId,
                                                   boolean isLoop,
                                                   Integer status)
通过部门列表获取部门成员摘要。仅包含userid与name

参数:
departmentId - 部门ID
isLoop - 是否递归获取子部门下面的成员
status - 0获取全部成员,1获取已关注成员列表,2获取禁用成员列表,4获取未关注成员列表。status可叠加,未填写则默认为4
返回:
部门成员

getList

public GetQYUserInfo4DepartmentResponse getList(Integer departmentId,
                                                boolean isLoop,
                                                Integer status)
通过部门列表获取部门成员信息

参数:
departmentId - 部门ID
isLoop - 是否递归获取子部门下面的成员
status - 0获取全部成员,1获取已关注成员列表,2获取禁用成员列表,4获取未关注成员列表。status可叠加,未填写则默认为4
返回:
部门成员详情信息

invite

public GetQYUserInviteResponse invite(String userid)
邀请成员关注。返回值type为1时表示微信邀请,2为邮件邀请

参数:
userid - 用户ID
返回:
邀请结果

getOauthUserInfo

public GetOauthUserInfoResponse getOauthUserInfo(String code)
通过Oauth授权获得的CODE获取成员信息。仅包含UserId、OpenId、DeviceId三个。 企业成员授权时会获得UserId,非企业成员授权会获得OpenId。 DeviceId为设备编号,重装微信时会发生变更,升级时不变

参数:
code - code
返回:
用户信息


Copyright © 2017. All rights reserved.