# acl提供给流程的接口

部署环境 133.96.94.176:12128
本地环境 127.0.0.1:12128

## 鉴权接口 -开发环境

```http
POST http://127.0.0.1:12128/api/verification
Content-Type: application/json

{
  "token": "test_token_abc",
  "fromSystem": "test",
  "system": "liucheng"
}
```

```json
HTTP/1.1 200 
Content-Type: application/json
Transfer-Encoding: chunked
Date: Fri, 15 Jul 2022 01:57:35 GMT
Connection: close

{
  "success": true,
  "code": 1,
  "message": "成功",
  "data": {
    "account": "test_handan",
    "userId": 21,
    "userName": "测试用户_邯郸市"
  }
}
```

## 角色列表接口

入参：
callType  findRoleList
userName  用户名，支持模糊搜索

```http
POST http://133.96.94.176:12128/rest/flow/api
Content-Type: application/json

{
  "callType": "findRoleList",
  "userName": "王"
}
```

```json
HTTP/1.1 200 
Content-Type: application/json
Transfer-Encoding: chunked
Date: Fri, 15 Jul 2022 02:07:39 GMT
Connection: close

{
  "success": true,
  "code": 1,
  "message": "成功",
  "data": [
    {
      "roleId": 4,
      "roleName": "分析组",
      "cities": []
    },
    {
      "roleId": 3,
      "roleName": "管理"
    }
  ]
}

```

## 用户列表接口

入参：
callType  findToPage

```http
POST http://127.0.0.1:12128/rest/flow/api
Content-Type: application/json

{
  "callType": "findToPage"
}
```

## 根据登录账号获取用户

```http
POST http://133.96.94.176:12128/rest/flow/api
Content-Type: application/json

{
  "callType": "getByLoginId",
  "loginId": "test_handan"
}
```

```json
HTTP/1.1 200 
Content-Type: application/json
Transfer-Encoding: chunked
Date: Fri, 15 Jul 2022 03:39:35 GMT
Connection: close

{
  "success": true,
  "code": 1,
  "message": "成功",
  "data": {
    "userId": 21,
    "loginId": "test_handan",
    "userName": "测试用户_邯郸市",
    "mobile": "13231899751",
    "email": null,
    "org": {
      "orgId": 130400,
      "orgName": "邯郸市"
    },
    "district": null
  }
}

```

## 根据用户ID获取用户接口

```http
POST http://133.96.94.176:12128/rest/flow/api
Content-Type: application/json

{
  "callType": "get",
  "userId": "4"
}
```

```json
HTTP/1.1 200 
Content-Type: application/json
Transfer-Encoding: chunked
Date: Fri, 15 Jul 2022 03:44:42 GMT
Connection: close

{
  "success": true,
  "code": 1,
  "message": "成功",
  "data": {
    "userId": 3,
    "loginId": "13111111111",
    "userName": "张三",
    "mobile": "13111111111",
    "email": null,
    "org": {
      "orgId": 130100,
      "orgName": "石家庄市"
    },
    "district": null
  }
}

```

## 根据用户id获取角色id列表

```http
POST http://133.96.94.176:12128/rest/flow/api
Content-Type: application/json

{
  "callType": "findRoleIdByUserId",
  "userId": "4"
}
```

```json
HTTP/1.1 200 
Content-Type: application/json
Transfer-Encoding: chunked
Date: Fri, 15 Jul 2022 03:45:44 GMT
Connection: close

{
  "success": true,
  "code": 1,
  "message": "成功",
  "data": [
    3,
    4
  ]
}

```

## 根据角色id获取用户id列表

```http
POST http://133.96.94.176:12128/rest/flow/api
Content-Type: application/json

{
  "callType": "findUserIdByRoleId",
  "roleId": "3"
}
```

## 多条件搜索用户

入参说明：
callType findAuthorizedUser
roleId 可选 为空字符串与不传这个参数相同处理
userName 可选 为空字符串与不传这个参数相同处理  可模糊查询
loginId  可选 为空字符串与不传这个参数相同处理

```http
POST http://133.96.94.176:12128/rest/flow/api
Content-Type: application/json

{
  "callType": "findAuthorizedUser",
  "roleId": "3"
}
```

```json
HTTP/1.1 200 
Content-Type: application/json
Transfer-Encoding: chunked
Date: Fri, 15 Jul 2022 04:02:33 GMT
Connection: close

{
  "success": true,
  "code": 1,
  "message": "成功",
  "data": [
    {
      "userId": 3,
      "loginId": "13111111111",
      "userName": "张三",
      "mobile": "13111111111",
      "email": null,
      "org": {
        "orgId": 130100,
        "orgName": "石家庄市"
      },
      "district": null
    },
    {
      "userId": 7,
      "loginId": "13866666666",
      "userName": "赵六宝",
      "mobile": "13866666666",
      "email": "6324124512@163.com",
      "org": {
        "orgId": -1,
        "orgName": "河北省"
      },
      "district": null
    },
    {
      "userId": 1,
      "loginId": "flowSystem",
      "userName": "系统用户",
      "mobile": "",
      "email": "",
      "org": {
        "orgId": -1,
        "orgName": "河北省"
      },
      "district": null
    },
    {
      "userId": 4,
      "loginId": "test_abc",
      "userName": "李四喜",
      "mobile": "13444444444",
      "email": "@163.com",
      "org": {
        "orgId": 130200,
        "orgName": "唐山市"
      },
      "district": null
    }
  ]
}

```

## 根据用户查找角色+城市信息

```http
POST http://127.0.0.1:12128/rest/flow/api
Content-Type: application/json

{
  "callType": "getRoleCityByUserId",
  "userId": "13"
}
```

```json
HTTP/1.1 200 
Content-Type: application/json
Transfer-Encoding: chunked
Date: Fri, 22 Jul 2022 09:02:33 GMT
Connection: close

{
  "success": true,
  "code": 1,
  "message": "成功",
  "data": [
    {
      "roleId": 5,
      "roleName": "工单处理(优化处理)",
      "cities": [
        130200
      ]
    },
    {
      "roleId": 12,
      "roleName": "工单答复",
      "cities": [
        130200
      ]
    },
    {
      "roleId": 6,
      "roleName": "工单处理(维护处理)",
      "cities": [
        130200
      ]
    },
    {
      "roleId": 13,
      "roleName": "工单处理(处理审核)",
      "cities": [
        130200
      ]
    },
    {
      "roleId": 4,
      "roleName": "工单处理(投诉分析)",
      "cities": [
        130200
      ]
    },
    {
      "roleId": 3,
      "roleName": "工单查询",
      "cities": [
        130200
      ]
    },
    {
      "roleId": 7,
      "roleName": "工单处理(建设处理)",
      "cities": [
        130200
      ]
    },
    {
      "roleId": 8,
      "roleName": "工单处理(工单审核)",
      "cities": [
        130200
      ]
    }
  ]
}

```

## 用户树形结构接口

- 开发环境

```http
POST http://127.0.0.1:12128/rest/flow/api/userTree
Content-Type: application/json

{
  "city": 130200,
  "role": [],
  "user": []
}
```
