@Controller @RequestMapping(value="wecom") public class WecomController extends WecomContollerBase
WecomContollerBase.WecomParamBase
限定符和类型 | 字段和说明 |
---|---|
(专用程序包) WecomService |
wecomService |
DOWNLOAD_ID_COOKIE_EXPIRY, DOWNLOAD_ID_NAME
构造器和说明 |
---|
WecomController() |
限定符和类型 | 方法和说明 |
---|---|
void |
event(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.String orgcode)
企业微信的事件回调
|
RetVo |
getAccessToken()
获取AccessToken
|
RetVo |
getDepartList(java.lang.Long depid)
获取部门
官方API:https://work.weixin.qq.com/api/doc#90000/90135/90208
|
RetVo |
getUserByDeptId(java.lang.Long depid,
java.lang.Boolean fetchChild,
java.lang.Integer status)
获取员工信息
官方API:http://qydev.weixin.qq.com/wiki/index.php?
|
RetVo |
getUserDtlInfoByDeprtId(java.lang.Long departId,
java.lang.Boolean fetchChild,
java.lang.Integer status)
获取员工详细的信息
官方API:https://work.weixin.qq.com/api/doc/90000/90135/90201
|
RetVo |
refreshAccessToken()
刷新accessToken
|
RetVo |
upload(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
上传资源文件 返回文件资源的路径 一般用于识别的文件图片识别
|
saveOrgIdAgendId
commonsDownloadEx, commonsUploadEx, getUploadNewFileName, setResponseContentType, setResponseContentTypeAndStatus, setResponseHttpStatus, writeJsonToResponse
@Autowired WecomService wecomService
@ResponseBody @RequestMapping(value="getAccessToken") public RetVo getAccessToken() throws java.lang.Exception
java.lang.Exception
- 出错会抛出异常@ResponseBody @RequestMapping(value="refreshAccessToken") public RetVo refreshAccessToken() throws java.lang.Exception
java.lang.Exception
- 出错会抛出异常@RequestMapping(value="event_callback/{orgcode}") public void event(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, @PathVariable java.lang.String orgcode) throws java.lang.Exception
request
- 请求对象response
- 响应对象orgcode
- 机构编码java.lang.Exception
- 出错会抛出异常@ResponseBody @RequestMapping(value="getDeparts") public RetVo getDepartList(java.lang.Long depid) throws java.lang.Exception
depid
- 部门idjava.lang.Exception
- 出错会抛出异常@ResponseBody @RequestMapping(value="getUserByDeptId") public RetVo getUserByDeptId(java.lang.Long depid, java.lang.Boolean fetchChild, java.lang.Integer status) throws java.lang.Exception
depid
- 必填。部门idfetchChild
- 非必填。获取方式: 1/0:是否递归获取子部门下面的成员status
- 非必填。员工的状态: 0获取全部员工,1获取已关注成员列表,2获取禁用成员列表,4获取未关注成员列表。status可叠加java.lang.Exception
- 出错会抛出异常@ResponseBody @RequestMapping(value="getUserDtlInfoByDeprtId") public RetVo getUserDtlInfoByDeprtId(java.lang.Long departId, java.lang.Boolean fetchChild, java.lang.Integer status) throws java.lang.Exception
departId
- 必填。部门idfetchChild
- 非必填。获取方式: 1/0:是否递归获取子部门下面的成员status
- 非必填。员工的状态: 0获取全部员工,1获取已关注成员列表,2获取禁用成员列表,4获取未关注成员列表。status可叠加java.lang.Exception
- 出错会抛出异常@RequestMapping(value="upload", method=POST) public RetVo upload(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.lang.Exception
request
- 请求对象response
- 响应对象java.lang.Exception
- 出错抛出异常