use of net.jeebiz.boot.demo.web.vo.DemoVo in project spring-boot-starter-samples by vindell.
the class DemoController method list.
@ApiOperation(value = "获取xxx列表", notes = "分页查询xxx信息")
@ApiImplicitParams({ @ApiImplicitParam(name = "pageNo", value = "当前页码", required = true, dataType = "Integer"), @ApiImplicitParam(name = "limit", value = "每页记录数", required = true, dataType = "Integer"), @ApiImplicitParam(name = "sortName", value = "排序字段名称", required = true, dataType = "String"), @ApiImplicitParam(name = "sortOrder", value = "排序类型 asc \\ desc", required = true, dataType = "String"), @ApiImplicitParam(name = "demoVo", value = "用户详细实体user", required = true, dataType = "UserVo") })
@ApiResponses({ @ApiResponse(code = HttpStatus.SC_OK, message = "操作成功"), @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = "请求要求身份验证"), @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = "请求资源不存在"), @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = "服务器内部异常"), @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = "权限不足") })
@BusinessLog(module = LogConstant.Module.N01, business = LogConstant.BUSINESS.N010001, opt = BusinessType.SELECT)
@PostMapping(value = "list")
@ResponseBody
public Object list(Integer pageNo, Integer limit, String sortName, String sortOrder, DemoVo demoVo, HttpServletRequest request) throws Exception {
try {
Page<DemoModel> pageResult = getDemoService().getPagedList(null);
List<DemoVo> retList = new ArrayList<DemoVo>();
for (DemoModel model : pageResult.getRecords()) {
retList.add(getBeanMapper().map(model, DemoVo.class));
}
return new Result<DemoVo>(pageResult, retList);
} catch (Exception e) {
logException(this, e);
return error("");
}
}
Aggregations