@Test public void testDelete() throws Exception { String id = "{}"; mockMvc.perform(delete("/monitor/requestLog/1" + id) .header(HttpHeaders.AUTHORIZATION, String.join(" ", accessToken.getTokenType(), accessToken.getValue())) .contentType(MediaType.APPLICATION_JSON_UTF8) .accept(MediaType.APPLICATION_JSON_UTF8)) .andExpect(status().isOk()); }
@Override @DeleteMapping("/{id:^[a-zA-Z0-9]+_[a-zA-Z0-9]+_[a-zA-Z0-9]+$}") @ApiOperation("删除请求日志") @PreAuthorize("hasAnyAuthority('" + DELETE_PERM + "')") public Result<Void> delete(@ApiParam(value = "主键id", required = true) @PathVariable("id") String id) { return super.delete(id); }
RequestLogController extends BaseControllerImpl<RequestLog> { @Override @DeleteMapping("/{id:^[a-zA-Z0-9]+_[a-zA-Z0-9]+_[a-zA-Z0-9]+$}") @ApiOperation("删除请求日志") @PreAuthorize("hasAnyAuthority('" + DELETE_PERM + "')") public Result<Void> delete(@ApiParam(value = "主键id", required = true) @PathVariable("id") String id) { return super.delete(id); } }
RequestLogController extends BaseControllerImpl<RequestLog> { @Override @DeleteMapping("/{id:^[a-zA-Z0-9]+_[a-zA-Z0-9]+_[a-zA-Z0-9]+$}") @ApiOperation("删除请求日志") @PreAuthorize("hasAnyAuthority('" + DELETE_PERM + "')") public Result<Void> delete(@ApiParam(value = "主键id", required = true) @PathVariable("id") String id) { return super.delete(id); }  }
RequestLogController extends BaseControllerImpl<RequestLog> { @Override @DeleteMapping("/{id:^[a-zA-Z0-9]+_[a-zA-Z0-9]+_[a-zA-Z0-9]+$}") @ApiOperation("删除请求日志") @PreAuthorize("hasAnyAuthority('" + DELETE_PERM + "')") public Result<Void> delete(@ApiParam(value = "主键id", required = true) @PathVariable("id") String id) { return super.delete(id); }  @Autowired void setRequestLogService(RequestLogService requestLogService); @Override @GetMapping("/dict") @ApiOperation("获取请求日志的数据字典") @PreAuthorize("hasAnyAuthority('" + LIST_PERM + "')") Result<TableInfo> getTableInfo(); @Override @DeleteMapping("/{id:^[a-zA-Z0-9]+_[a-zA-Z0-9]+_[a-zA-Z0-9]+$}") @ApiOperation("删除请求日志") @PreAuthorize("hasAnyAuthority('" + DELETE_PERM + "')") Result<Void> delete(@ApiParam(value = "主键id", required = true) @PathVariable("id") String id) {; @Override @GetMapping @ApiOperation("查询所有请求日志") @PreAuthorize("hasAnyAuthority('" + QUERY_PERM + "')") Result<List<RequestLog>> findAll(RequestLog model); @Override @GetMapping("/{page:[0-9]+}/{size:[0-9]+}") @ApiOperation("分页查询请求日志列表") @PreAuthorize("hasAnyAuthority('" + QUERY_PERM + "')") Result<QueryResult<RequestLog>> query(@ApiParam(value = "页码", required = true) @PathVariable("page") int page, @ApiParam(value = "每页数据条数", required = true) @PathVariable("size") int size, RequestLog model) {; @Override @GetMapping("/{id:^[a-zA-Z0-9]+_[a-zA-Z0-9]+_[a-zA-Z0-9]+$}") @ApiOperation("根据ID查询请求日志") @PreAuthorize("hasAnyAuthority('" + QUERY_PERM + "')") Result<RequestLog> findById(@ApiParam(value = "主键id", required = true) @PathVariable("id") String id) {; @Override @GetMapping("/export") @ApiOperation("导出请求日志到文件") @PreAuthorize("permitAll()") void exportData(@RequestBody(required = false) List<String> ids, HttpServletResponse response); }
RequestLogController extends BaseControllerImpl<RequestLog> { @Override @DeleteMapping("/{id:^[a-zA-Z0-9]+_[a-zA-Z0-9]+_[a-zA-Z0-9]+$}") @ApiOperation("删除请求日志") @PreAuthorize("hasAnyAuthority('" + DELETE_PERM + "')") public Result<Void> delete(@ApiParam(value = "主键id", required = true) @PathVariable("id") String id) { return super.delete(id); }  @Autowired void setRequestLogService(RequestLogService requestLogService); @Override @GetMapping("/dict") @ApiOperation("获取请求日志的数据字典") @PreAuthorize("hasAnyAuthority('" + LIST_PERM + "')") Result<TableInfo> getTableInfo(); @Override @DeleteMapping("/{id:^[a-zA-Z0-9]+_[a-zA-Z0-9]+_[a-zA-Z0-9]+$}") @ApiOperation("删除请求日志") @PreAuthorize("hasAnyAuthority('" + DELETE_PERM + "')") Result<Void> delete(@ApiParam(value = "主键id", required = true) @PathVariable("id") String id) {; @Override @GetMapping @ApiOperation("查询所有请求日志") @PreAuthorize("hasAnyAuthority('" + QUERY_PERM + "')") Result<List<RequestLog>> findAll(RequestLog model); @Override @GetMapping("/{page:[0-9]+}/{size:[0-9]+}") @ApiOperation("分页查询请求日志列表") @PreAuthorize("hasAnyAuthority('" + QUERY_PERM + "')") Result<QueryResult<RequestLog>> query(@ApiParam(value = "页码", required = true) @PathVariable("page") int page, @ApiParam(value = "每页数据条数", required = true) @PathVariable("size") int size, RequestLog model) {; @Override @GetMapping("/{id:^[a-zA-Z0-9]+_[a-zA-Z0-9]+_[a-zA-Z0-9]+$}") @ApiOperation("根据ID查询请求日志") @PreAuthorize("hasAnyAuthority('" + QUERY_PERM + "')") Result<RequestLog> findById(@ApiParam(value = "主键id", required = true) @PathVariable("id") String id) {; @Override @GetMapping("/export") @ApiOperation("导出请求日志到文件") @PreAuthorize("permitAll()") void exportData(@RequestBody(required = false) List<String> ids, HttpServletResponse response);  }