-
-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Expand file tree
/
Copy pathWxCpHrService.java
More file actions
60 lines (54 loc) · 2.35 KB
/
WxCpHrService.java
File metadata and controls
60 lines (54 loc) · 2.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
package me.chanjar.weixin.cp.api;
import me.chanjar.weixin.common.error.WxErrorException;
import me.chanjar.weixin.cp.bean.hr.WxCpHrEmployeeFieldData;
import me.chanjar.weixin.cp.bean.hr.WxCpHrEmployeeFieldDataResp;
import me.chanjar.weixin.cp.bean.hr.WxCpHrEmployeeFieldInfoResp;
import java.util.List;
/**
* 人事助手相关接口.
* 官方文档:https://developer.work.weixin.qq.com/document/path/99132
*
* @author <a href="https://github.com/leejoker">leejoker</a> created on 2024-01-01
*/
public interface WxCpHrService {
/**
* 获取员工档案字段信息.
* <p>
* 请求方式:POST(HTTPS)
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/hr/get_fields?access_token=ACCESS_TOKEN
* 权限说明:
* 需要配置人事助手的secret,调用接口前需给对应成员赋予人事小助手应用的权限。
*
* @param fields 指定字段key列表,不填则返回全部字段
* @return 字段信息响应 wx cp hr employee field info resp
* @throws WxErrorException the wx error exception
*/
WxCpHrEmployeeFieldInfoResp getFieldInfo(List<String> fields) throws WxErrorException;
/**
* 获取员工档案数据.
* <p>
* 请求方式:POST(HTTPS)
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/hr/get_staff_info?access_token=ACCESS_TOKEN
* 权限说明:
* 需要配置人事助手的secret,调用接口前需给对应成员赋予人事小助手应用的权限。
*
* @param userid 员工userid
* @param fields 指定字段key列表,不填则返回全部字段
* @return 员工档案数据响应 wx cp hr employee field data resp
* @throws WxErrorException the wx error exception
*/
WxCpHrEmployeeFieldDataResp getEmployeeFieldInfo(String userid, List<String> fields) throws WxErrorException;
/**
* 更新员工档案数据.
* <p>
* 请求方式:POST(HTTPS)
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/hr/update_staff_info?access_token=ACCESS_TOKEN
* 权限说明:
* 需要配置人事助手的secret,调用接口前需给对应成员赋予人事小助手应用的权限。
*
* @param userid 员工userid
* @param fieldList 字段数据列表
* @throws WxErrorException the wx error exception
*/
void updateEmployeeFieldInfo(String userid, List<WxCpHrEmployeeFieldData.FieldItem> fieldList) throws WxErrorException;
}