添加 api 单元测试模板.
This commit is contained in:
@@ -47,27 +47,9 @@ GET {{baseUrl}}/infra/system-menu/list?idList=1,2,3
|
||||
Authorization: {{token}}
|
||||
|
||||
|
||||
### 分页查询菜单
|
||||
POST {{baseUrl}}/infra/system-menu/query
|
||||
Content-Type: application/json
|
||||
Authorization: {{token}}
|
||||
|
||||
{
|
||||
"id": "",
|
||||
"parentId": "",
|
||||
"name": "",
|
||||
"permission": "",
|
||||
"type": "",
|
||||
"sort": "",
|
||||
"status": "",
|
||||
"cache": "",
|
||||
"icon": "",
|
||||
"path": "",
|
||||
"component": ""
|
||||
}
|
||||
|
||||
|
||||
### 通过 id 删除菜单
|
||||
DELETE {{baseUrl}}/infra/system-menu/delete?id=1
|
||||
Authorization: {{token}}
|
||||
|
||||
|
||||
###
|
||||
|
||||
@@ -50,6 +50,8 @@ Content-Type: application/json
|
||||
Authorization: {{token}}
|
||||
|
||||
{
|
||||
"page": 1,
|
||||
"limit": 10,
|
||||
"id": "",
|
||||
"name": "",
|
||||
"code": "",
|
||||
@@ -60,3 +62,6 @@ Authorization: {{token}}
|
||||
### 通过 id 删除角色
|
||||
DELETE {{baseUrl}}/infra/system-role/delete?id=1
|
||||
Authorization: {{token}}
|
||||
|
||||
|
||||
###
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.orion.ops.module.infra.controller;
|
||||
|
||||
import com.orion.lang.define.wrapper.DataGrid;
|
||||
import com.orion.lang.define.wrapper.IPageRequest;
|
||||
import com.orion.ops.framework.common.annotation.IgnoreLog;
|
||||
import com.orion.ops.framework.common.annotation.RestWrapper;
|
||||
import com.orion.ops.framework.common.constant.IgnoreLogMode;
|
||||
@@ -87,7 +88,7 @@ public class SystemRoleController {
|
||||
@PostMapping("/query")
|
||||
@Operation(summary = "分页查询角色")
|
||||
@PreAuthorize("@ss.hasPermission('infra:system-role:query')")
|
||||
public DataGrid<SystemRoleVO> getSystemRolePage(@Validated @RequestBody SystemRoleQueryRequest request) {
|
||||
public DataGrid<SystemRoleVO> getSystemRolePage(@Validated(IPageRequest.class) @RequestBody SystemRoleQueryRequest request) {
|
||||
return systemRoleService.getSystemRolePage(request);
|
||||
}
|
||||
|
||||
|
||||
@@ -49,6 +49,8 @@ Content-Type: application/json
|
||||
Authorization: {{token}}
|
||||
|
||||
{
|
||||
"page": 1,
|
||||
"limit": 10,
|
||||
"id": "",
|
||||
"username": "",
|
||||
"password": "",
|
||||
@@ -65,3 +67,5 @@ Authorization: {{token}}
|
||||
DELETE {{baseUrl}}/infra/system-user/delete?id=1
|
||||
Authorization: {{token}}
|
||||
|
||||
|
||||
###
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.orion.ops.module.infra.controller;
|
||||
|
||||
import com.orion.lang.define.wrapper.DataGrid;
|
||||
import com.orion.lang.define.wrapper.HttpWrapper;
|
||||
import com.orion.lang.define.wrapper.IPageRequest;
|
||||
import com.orion.lang.utils.collect.Lists;
|
||||
import com.orion.ops.framework.common.annotation.IgnoreLog;
|
||||
import com.orion.ops.framework.common.annotation.RestWrapper;
|
||||
@@ -116,7 +117,7 @@ public class SystemUserController {
|
||||
@PostMapping("/query")
|
||||
@Operation(summary = "分页查询用户")
|
||||
@PreAuthorize("@ss.hasPermission('infra:system-user:query')")
|
||||
public DataGrid<SystemUserVO> getSystemUserPage(@Validated @RequestBody SystemUserQueryRequest request) {
|
||||
public DataGrid<SystemUserVO> getSystemUserPage(@Validated(IPageRequest.class) @RequestBody SystemUserQueryRequest request) {
|
||||
return systemUserService.getSystemUserPage(request);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user