Package com.foxinmy.weixin4j.qy.api
Class PartyApi
- java.lang.Object
-
- com.foxinmy.weixin4j.api.BaseApi
-
- com.foxinmy.weixin4j.qy.api.QyApi
-
- com.foxinmy.weixin4j.qy.api.PartyApi
-
-
Field Summary
-
Fields inherited from class com.foxinmy.weixin4j.api.BaseApi
weixinExecutor
-
-
Constructor Summary
Constructors Constructor Description PartyApi(TokenManager tokenManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
createParty(Party party)
创建部门(根部门的parentid为1)ApiResult
deleteParty(int partId)
删除部门(不能删除根部门;不能删除含有子部门、成员的部门)List<Party>
listParty(int partId)
查询部门列表(以部门的order字段从小到大排列)ApiResult
updateParty(Party party)
更新部门(如果非必须的字段未指定 则不更新该字段之前的设置值)-
Methods inherited from class com.foxinmy.weixin4j.qy.api.QyApi
weixinBundle
-
Methods inherited from class com.foxinmy.weixin4j.api.BaseApi
getRequestUri
-
-
-
-
Constructor Detail
-
PartyApi
public PartyApi(TokenManager tokenManager)
-
-
Method Detail
-
createParty
public int createParty(Party party) throws WeixinException
创建部门(根部门的parentid为1)- Parameters:
party
- 部门对象- Returns:
- 部门ID
- Throws:
WeixinException
- See Also:
Party
, 创建部门说明
-
updateParty
public ApiResult updateParty(Party party) throws WeixinException
更新部门(如果非必须的字段未指定 则不更新该字段之前的设置值)- Parameters:
party
- 部门对象- Returns:
- 处理结果
- Throws:
WeixinException
- See Also:
Party
, 更新部门说明
-
listParty
public List<Party> listParty(int partId) throws WeixinException
查询部门列表(以部门的order字段从小到大排列)- Parameters:
partId
- 部门ID。获取指定部门ID下的子部门 传入0表示获取全部子部门- Returns:
- 部门列表
- Throws:
WeixinException
- See Also:
Party
, 获取部门列表
-
deleteParty
public ApiResult deleteParty(int partId) throws WeixinException
删除部门(不能删除根部门;不能删除含有子部门、成员的部门)- Parameters:
partId
- 部门ID- Returns:
- 处理结果
- Throws:
WeixinException
- See Also:
- 删除部门说明
-
-