| | |
| | | if (pageSize < 1 || pageIndex < 1) { |
| | | return fail("每页页数或分页数小于1", null); |
| | | } |
| | | int count = tokenService.selectCount(name,type); |
| | | int count = tokenService.selectCount(name, type); |
| | | if (count == 0) { |
| | | return success(0, null); |
| | | } |
| | | List<TokenEntity> rs = tokenService.selectByPage(name,type, pageSize, pageSize * (pageIndex - 1)); |
| | | List<TokenEntity> rs = tokenService.selectByPage(name, type, pageSize, pageSize * (pageIndex - 1)); |
| | | return success(count, rs); |
| | | } catch (Exception ex) { |
| | | return fail(ex, null); |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "插入一条") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "entity", value = "实体类", dataType = "com.lf.server.entity.sys.TokenEntity", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "entity", value = "实体类", dataType = "TokenEntity", paramType = "body", example = "") |
| | | }) |
| | | @PostMapping(value = "/insertToken", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insertToken(@RequestBody TokenEntity entity, HttpServletRequest req) { |