# acl提供给web的接口 ## 鉴权接口 ```http POST HTTP://127.0.0.1:12128/api/verification Content-Type: application/json { "token": "token", "system": "web", "fromSystem": "test" } ``` ```json { "success": true, "code": 1, "message": "成功", "data": { "userName": "张三", "list": [ { "id": 1, "name": "工单处理", "url": "url", "webIcon": "webIcon", "priority": 0 }, { "id": 2, "name": "工单答复", "url": "url", "webIcon": "webIcon", "priority": 0 } ] } } ``` ### 输出参数说明 id: 功能id name: 功能名称 url: 功能链接 webIcon: web图标链接 priority: 显示优先级,值越大越靠前 ### 特殊情况 - 无任何权限 ```json { "success": true, "code": 1, "message": "成功", "data": { "userName": "张三", "list": null } } ``` ## 查询角色说明接口 ```http POST HTTP://127.0.0.1:12128/rest/api/role/list Content-Type: application/json { "current": 1, "pageSize": 10, "roleName": "工单查询", "system": "flow" } ``` ```json { "success": true, "code": 1, "message": "成功", "data": [ { "roleName": "工单查询", "system": "flow", "systemName": "流程" }, { "roleName": "工单答复", "system": "flow", "systemName": "流程" } ] } ``` ### 输入参数说明 roleName: 角色名称 system: 系统 current: 页码 pageSize: 每页个数 ### 输出参数说明 total: 数据总数 roleName: 角色名称 system: 系统 systemName: 系统中文名称 ## 查询模块列表接口 ```http POST HTTP://127.0.0.1:12128/rest/api/function/list Content-Type: application/json { "current": 1, "pageSize": 10, "functionName": "工单查询", "client": 1, "system": "flow" } ``` ```json { "success": true, "code": 1, "message": "成功", "data": { "total": 100, "list": [ { "functionId": 1, "functionName": "工单查询", "systemName": "流程", "clientName": "所有", "priority": 0, "url": "url", "webIcon": "webIcon", "appIcon": "appIcon" }, { "functionId": 2, "functionName": "工单答复", "systemName": "流程", "clientName": "app", "priority": 0, "url": "url", "webIcon": "webIcon", "appIcon": "appIcon" } ] } } ``` ### 输入参数说明 functionName: 功能名称 client: 客户端,0:所有,1:app,2:web system: 系统 current: 页码 pageSize: 每页个数 ### 输出参数说明 total: 数据总数 functionId: 模块id functionName: 模块名称 systemName: 系统中文名称 clientName: 客户端名称 priority: 显示优先级 url: 模块链接 webIcon: web图标链接 appIcon: app图标链接 ## 添加模块接口 ```http POST HTTP://127.0.0.1:12128/rest/api/function/add Content-Type: application/json { "functionName": "工单查询", "system": "flow", "client": 1, "priority": 0, "url": "url", "webIcon": "webIcon", "appIcon": "appIcon" } ``` ```json { "success": true, "code": 1, "message": "成功", "data": null } ``` ### 输入参数说明 functionName: 功能名称 system: 系统 client: 客户端,0:所有,1:app,2:web priority: 显示优先级 url: 模块链接 webIcon: web图标链接 appIcon: app图标链接 ### 输出参数说明 ## 修改模块接口 ```http POST HTTP://127.0.0.1:12128/rest/api/function/update Content-Type: application/json { "functionId": 1, "functionName": "工单查询", "system": "flow", "client": 1, "priority": 0, "url": "url", "webIcon": "webIcon", "appIcon": "appIcon" } ``` ```json { "success": true, "code": 1, "message": "成功", "data": null } ``` ### 输入参数说明 functionId: 模块id functionName: 功能名称 system: 系统 client: 客户端,0:所有,1:app,2:web priority: 显示优先级 url: 模块链接 webIcon: web图标链接 appIcon: app图标链接 ### 输出参数说明 ## 删除模块接口 ```http POST HTTP://127.0.0.1:12128/rest/api/function/del Content-Type: application/json { "functionId": 1 } ``` ```json { "success": true, "code": 1, "message": "成功", "data": null } ``` ### 输入参数说明 functionId: 模块id ### 输出参数说明 ## 查询top用户信息接口 ```http POST HTTP://127.0.0.1:12128/rest/api/user/getTopUserByLoginName Content-Type: application/json { "loginName": "zhangsan" } ``` ```json { "success": true, "code": 1, "message": "成功", "data": { "userId": 7, "loginName": "zhangsan", "userName": "张三", "phone": "12345678909", "org": "河北省分公司云网运营中心", "provinceId": -1, "cityId": 130300, "areaId": 130302, "provinceName": "河北省", "cityName": "石家庄市", "areaName": "长安区" } } ``` ### 输入参数说明 loginName: 账号 ### 输出参数说明 userId: 用户id loginName: 账号 phone: 手机号 org: 组织 provinceId: 省份id cityId: 地市id areaId: 区县id provinceName: 省份名称 cityName: 地市名称 areaName: 区县名称 ### 特殊情况 - 用户已存在 ```json { "success": false, "code": 0, "message": "用户已存在", "data": null } ``` - top用户不存在 ```json { "success": false, "code": 0, "message": "top用户不存在", "data": null } ``` ## 查询所有权限列表接口 ```http POST HTTP://127.0.0.1:12128/rest/api/role/all Content-Type: application/json {} ``` ```json { "success": true, "code": 1, "message": "成功", "data": [ { "roleId": 42, "roleName": "工单查询", "functionId": 1, "system": "flow", "systemName": "流程" }, { "roleId": 43, "roleName": "工单答复", "functionId": 2, "system": "flow", "systemName": "流程" } ] } ``` ### 输出参数说明 roleId: 角色id roleName: 角色名称 functionId: 模块id system: 系统 systemName: 系统中文名称 ## 查询地市列表接口 ```http POST HTTP://127.0.0.1:12128/rest/api/area/listCity Content-Type: application/json {} ``` ```json { "success": true, "code": 1, "message": "成功", "data": [ { "areaId": 130100, "areaName": "石家庄市" }, { "areaId": 130200, "areaName": "唐山市" } ] } ``` ### 输出参数说明 areaId: 地市id areaName: 地市名称 ## 查询省市区树形接口 ```http POST HTTP://127.0.0.1:12128/rest/api/area/treeArea Content-Type: application/json {} ``` ```json { "success": true, "code": 1, "message": "成功", "data": [ { "label": "河北省", "value": -1, "children": [ { "label": "石家庄市", "value": 130100, "children": [ { "label": "长安区", "value": 130102 }, { "label": "桥西区", "value": 130104 } ] }, { "label": "唐山市", "value": 130100, "children": [ { "label": "长安区", "value": 130102 }, { "label": "桥西区", "value": 130104 } ] } ] } ] } ``` ### 输出参数说明 value: 省市区id label: 省市区名称 children: 地市或区县列表 ## 查询用户权限接口 ```http POST HTTP://127.0.0.1:12128/rest/api/user/getRoleByLoginName Content-Type: application/json { "loginName": "zhangsan" } ``` ```json { "success": true, "code": 1, "message": "成功", "data": [ { "roleId": 42, "cityId": 130300 }, { "roleId": 42, "cityId": 130300 } ] } ``` ### 输入参数说明 loginName: 账号 ### 输出参数说明 roleId: 角色id cityId: 地市id ## 查询用户列表接口 ```http POST HTTP://127.0.0.1:12128/rest/api/user/list Content-Type: application/json { "current": 1, "pageSize": 10, "loginName": "zhangsan", "userName": "张三", "org": "河北省分公司云网运营中心", "areaId": 130302 } ``` ```json { "success": true, "code": 1, "message": "成功", "data": { "total": 100, "list": [ { "userId": 1, "loginName": "zhangsan", "userName": "张三", "phone": "12345678909", "email": "a@qq.com", "org": "河北省分公司云网运营中心", "provinceName": "河北省", "cityName": "石家庄市", "areaName": "长安区" } ] } } ``` ### 输入参数说明 loginName: 账号 userName: 用户名 org: 组织 areaId: 省市区id current: 页码 pageSize: 每页个数 ### 输出参数说明 total: 数据总数 userId: 用户id loginName: 账号 userName: 用户名 phone: 手机号 email: 邮箱 org: 组织 provinceName: 省份名称 cityName: 地市名称 areaName: 区县名称 ## 添加用户接口 ```http POST HTTP://127.0.0.1:12128/rest/api/user/add Content-Type: application/json { "loginName": "zhangsan", "userName": "张三", "phone": "12345678909", "email": "a@qq.com", "org": "河北省分公司云网运营中心", "provinceId": -1, "cityId": 130300, "areaId": 130302, "roles": [ { "roleId": 42, "cityId": 130300, "functionId": 1 }, { "roleId": 42, "cityId": 130300, "functionId": 1 } ] } ``` ```json { "success": true, "code": 1, "message": "成功", "data": null } ``` ### 输入参数说明 loginName: 账号 userName: 用户名 phone: 手机号 email: 邮箱 org: 组织 provinceId: 省份id cityId: 地市id areaId: 区县id roleId: 角色id functionId: 模块id ### 输出参数说明 ### 特殊情况 - 用户已存在 ```json { "success": false, "code": 0, "message": "用户已存在", "data": null } ``` - top用户不存在 ```json { "success": false, "code": 0, "message": "top用户不存在", "data": null } ``` ## 修改用户接口 ```http POST HTTP://127.0.0.1:12128/rest/api/user/update Content-Type: application/json { "userId": 1, "email": "a@qq.com", "roles": [ { "roleId": 42, "cityId": 130300, "functionId": 1 }, { "roleId": 42, "cityId": 130300, "functionId": 1 } ] } ``` ```json { "success": true, "code": 1, "message": "成功", "data": null } ``` ### 输入参数说明 userId: 用户id email: 邮箱 cityId: 地市id roleId: 角色id functionId: 模块id ### 输出参数说明 ## 删除用户接口 ```http POST HTTP://127.0.0.1:12128/rest/api/user/del Content-Type: application/json { "userId": 1 } ``` ```json { "success": true, "code": 1, "message": "成功", "data": null } ``` ### 输入参数说明 userId: 用户id ### 输出参数说明 ## 查询用户详情接口 ```http POST HTTP://127.0.0.1:12128/rest/api/user/detail Content-Type: application/json { "userId": 1 } ``` ```json { "success": true, "code": 1, "message": "成功", "data": [ { "userId": 1, "loginName": "zhangsan", "userName": "张三", "phone": "12345678909", "email": "a@qq.com", "org": "河北省分公司云网运营中心", "provinceName": "河北省", "cityName": "石家庄市", "areaName": "长安区", "roles": [ { "roleName": "工单查询", "cityName": "石家庄市", "system": "liucheng", "systemName": "流程" }, { "roleName": "黑点库查询", "cityName": "石家庄市", "system": "heidianku", "systemName": "黑点库" } ] } ] } ``` ### 输入参数说明 userId: 用户id ### 输出参数说明 userId: 用户id loginName: 账号 userName: 用户名 phone: 手机号 email: 邮箱 org: 组织 provinceName: 省份名称 cityName: 地市名称 areaName: 区县名称 roleName: 角色名称 cityName: 地市名称 system: 系统 systemName: 系统中文名称 ## 批量复制权限接口 ```http POST HTTP://127.0.0.1:12128/rest/api/role/copy Content-Type: application/json { "userIds": [1, 2], "roles": [ { "roleId": 42, "cityId": 130300, "functionId": 1 }, { "roleId": 42, "cityId": 130300, "functionId": 1 } ] } ``` ```json { "success": true, "code": 1, "message": "成功", "data": null } ``` ### 输入参数说明 userIds: 用户id列表 cityId: 地市id roleId: 角色id functionId: 模块id ### 输出参数说明 ## 查询操作日志列表接口 ```http POST HTTP://127.0.0.1:12128/rest/api/log/operationLog Content-Type: application/json { "current": 1, "pageSize": 10, "operatorId": 1, "operatorAccount": "zhangsan", "operatorName": "张三", "operationName": "修改用户", "operationContent": "操作内容", "startTime": "2022-11-01 13:00:00", "endTime": "2022-11-01 13:00:00" } ``` ```json { "success": true, "code": 1, "message": "成功", "data": { "total": 100, "list": [ { "operatorId": 1, "operatorAccount": "zhangsan", "operatorName": "张三", "operationName": "修改用户", "operationContent": "操作内容", "operationTime": "2022-11-01 13:00:00" }, { "operatorId": 1, "operatorAccount": "zhangsan", "operatorName": "张三", "operationName": "修改用户", "operationContent": "操作内容", "operationTime": "2022-11-01 13:00:00" } ] } } ``` ### 输入参数说明 operatorId: 操作人id operatorAccount: 操作人账号 operatorName: 操作人姓名 operationName: 操作名称 operationContent: 操作内容 startTime: 起始时间 endTime: 截至时间 current: 页码 pageSize: 每页个数 ### 输出参数说明 total: 数据总数 operatorId: 操作人id operatorAccount: 操作人账号 operatorName: 操作人姓名 operationName: 操作名称 operationContent: 操作内容 operationTime: 操作时间 ## 查询登录日志列表接口 ```http POST HTTP://127.0.0.1:12128/rest/api/log/verificationLog Content-Type: application/json { "current": 1, "pageSize": 10, "userId": 1, "loginName": "zhangsan", "userName": "张三", "system": "liucheng", "cityId": 130300, "startTime": "2022-11-25T16:30:15.160", "endTime": "2022-11-25T16:30:15.160" } ``` ```json { "success": true, "code": 1, "message": "成功", "data": { "total": 100, "list": [ { "userId": 1, "loginName": "zhangsan", "userName": "张三", "cityName": "石家庄市", "systemName": "流程", "loginTime": "2022-11-01 13:00:00" }, { "userId": 1, "loginName": "zhangsan", "userName": "张三", "cityName": "石家庄市", "systemName": "流程", "loginTime": "2022-11-01 13:00:00" } ] } } ``` ### 输入参数说明 userId: 用户id loginName: 账号 userName: 用户名 system: 系统 cityId: 地市id startTime: 起始时间 endTime: 截至时间 current: 页码 pageSize: 每页个数 ### 输出参数说明 total: 数据总数 userId: 用户id loginName: 账号 userName: 用户名 cityName: 地市名称 systemName: 系统中文名称 loginTime: 登录时间