主题
根据学工号查询岗位 3.4.1.Beta2+
接口说明
请求URL:http[s]://{网关地址}/position/getPositionsByUserId
请求方式: POST
请求内容类型: form-data
响应内容类型: application/json
请求说明
请求体
| 字段名 | 参数名 | 必填 | 类型 | 描述 |
|---|---|---|---|---|
| 用户名/学工号 | userId | M | String | 用户名/学工号 |
请求示例
json
POST /position/getPositionsByUserId HTTP/1.1
Host: 172.16.34.144:9000
appId: 997457360940961792
accessToken: 83b54a75296e9a56164a61ff8ab426df
Content-Length: 76
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
----WebKitFormBoundary7MA4YWxkTrZu0gW
----WebKitFormBoundary7MA4YWxkTrZu0gW1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
响应说明
响应体
数据格式:
JSON
| 字段名 | 参数名 | 类型 | 描述 |
|---|---|---|---|
| 返回码 | errcode | String | 0 成功,其他为不成功 |
| 返回码描述 | errmsg | String | 返回码描述 |
| 返回对象 | data | Position | 返回的岗位信息 |
| 字段名 | 参数名 | 类型 | 描述 |
|---|---|---|---|
| 通用岗位列表 | normalPositionList | List<NormalPosition> | 通用岗位列表 |
| 校内机构岗位列表 | orgPositionList | List<OrgPosition> | 校内机构岗位列表 |
| 字段名 | 参数名 | 类型 | 描述 |
|---|---|---|---|
| 岗位ID | positionId | String | 岗位ID |
| 岗位名称 | positionName | String | 岗位名称 |
| 校内机构代码 | deptCode | String | 校内机构代码 |
| 校内机构名称 | deptName | String | 校内机构名称 |
| 岗位类型 | positionType | String | 岗位类型 |
| 岗位类型名称 | positionTypeName | String | 岗位类型名称 |
| 岗位级别 | positionLevel | String | 岗位级别 |
| 岗位级别名称 | positionLevelName | String | 岗位级别名称 |
| 岗位描述 | positionDesc | String | 岗位描述 |
| 字段名 | 参数名 | 类型 | 描述 |
|---|---|---|---|
| 岗位ID | positionId | String | 岗位ID |
| 岗位名称 | positionName | String | 岗位名称 |
| 校内机构代码 | deptCode | String | 校内机构代码 |
| 校内机构名称 | deptName | String | 校内机构名称 |
| 岗位类型 | positionType | String | 岗位类型 |
| 岗位类型名称 | positionTypeName | String | 岗位类型名称 |
| 岗位级别 | positionLevel | String | 岗位级别 |
| 岗位级别名称 | positionLevelName | String | 岗位级别名称 |
| 岗位描述 | positionDesc | String | 岗位描述 |
响应示例
json
{
"errcode": "0",
"errmsg": "success",
"data": {
"normalPositionList": [
{
"positionId": "956554162223296512",
"positionName": "一级负责人",
"deptCode": "957704158670860288",
"deptName": "奥德赛大2312",
"positionType": "1",
"positionTypeName": "无类型",
"positionLevel": "1",
"positionLevelName": "无级别",
"positionDesc": null
},
{
"positionId": "956575024552980480",
"positionName": "122",
"deptCode": "957704158670860288",
"deptName": "奥德赛大2312",
"positionType": "1",
"positionTypeName": "无类型",
"positionLevel": "1",
"positionLevelName": "无级别",
"positionDesc": null
}
],
"orgPositionList": [
{
"positionId": "958744697440681984",
"positionName": "0330岗位",
"deptCode": "957704158670860288",
"deptName": "奥德赛大2312",
"positionType": "1",
"positionTypeName": "无类型",
"positionLevel": "1",
"positionLevelName": "无级别",
"positionDesc": "123"
},
{
"positionId": "958744611063185408",
"positionName": "1",
"deptCode": "957704158670860288",
"deptName": "奥德赛大2312",
"positionType": "1",
"positionTypeName": "无类型",
"positionLevel": "1",
"positionLevelName": "无级别",
"positionDesc": null
}
]
}
}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
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
错误码
| 错误码 | 描述 |
|---|---|
| 111001 | 必填参数不能为空 |
| 116005 | 用户不存在 |
| 999 | 统一错误码,详细描述信息参见接口返回 |
Demo
java
// 创建客户端
Client client = new DefaultClient(BASE_URL, APP_ID, APP_SECRET);
// 创建请求对象
GetPositionsByUserIdRequest request = new GetPositionsByUserIdRequest();
request.setUserId("campususertest001");
BaseResponse response = client.execute(request);
//调用成功,则处理业务逻辑
if (response.isSuccess()) {
//.....
}1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11

