| | |
| | | |
| | | @ApiOperation(value = "查询记录数") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "userid", value = "登录人ID", dataType = "Integer", paramType = "query", required = false, example = "sys_login") |
| | | @ApiImplicitParam(name = "userid", value = "登录人ID", dataType = "String", paramType = "query", required = false, example = "sys_login") |
| | | }) |
| | | @GetMapping({"/selectCount"}) |
| | | public ResponseMsg<Integer> selectCount(int userid) { |
| | | public ResponseMsg<Integer> selectCount(String userid) { |
| | | try { |
| | | int count = loginService.selectCount(userid); |
| | | |
| | |
| | | |
| | | @ApiOperation(value = "分页查询") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "userid", value = "登录人ID", dataType = "Integer", paramType = "query", example = "sys_login"), |
| | | @ApiImplicitParam(name = "userid", value = "登录人ID", dataType = "String", paramType = "query", example = "sys_login"), |
| | | @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "Integer", paramType = "query", example = "10"), |
| | | @ApiImplicitParam(name = "pageIndex", value = "分页数(从1开始)", dataType = "Integer", paramType = "query", example = "1") |
| | | }) |
| | | @GetMapping(value = "/selectByPage") |
| | | public ResponseMsg<List<LoginEntity>> selectByPage(int userid, Integer pageSize, Integer pageIndex) { |
| | | public ResponseMsg<List<LoginEntity>> selectByPage(String userid, Integer pageSize, Integer pageIndex) { |
| | | try { |
| | | if (pageSize < 1 || pageIndex < 1) { |
| | | return fail("每页页数或分页数小于1", null); |
| | |
| | | |
| | | @ApiOperation(value = "分页查询并返回记录数") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "userid", value = "登录人ID", dataType = "Integer", paramType = "query", example = "1"), |
| | | @ApiImplicitParam(name = "userid", value = "登录人ID", dataType = "String", paramType = "query", example = "1"), |
| | | @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "Integer", paramType = "query", example = "10"), |
| | | @ApiImplicitParam(name = "pageIndex", value = "分页数(从1开始)", dataType = "Integer", paramType = "query", example = "1") |
| | | }) |
| | | @GetMapping(value = "/selectByPageAndCount") |
| | | public ResponseMsg<List<LoginEntity>> selectByPageAndCount(int userid, Integer pageSize, Integer pageIndex) { |
| | | public ResponseMsg<List<LoginEntity>> selectByPageAndCount(String userid, Integer pageSize, Integer pageIndex) { |
| | | try { |
| | | if (pageSize < 1 || pageIndex < 1) { |
| | | return fail("每页页数或分页数小于1", null); |
| | |
| | | @ApiImplicitParam(name = "ids", value = "字典ID集合", dataType = "List<Integer>", paramType = "query", example = "1,2") |
| | | }) |
| | | @GetMapping(value = "/deleteLogins") |
| | | public ResponseMsg<Integer> deleteLogins(List<Integer> ids) { |
| | | public ResponseMsg<Integer> deleteLogins(@RequestParam List<Integer> ids) { |
| | | try { |
| | | if (ids == null || ids.isEmpty()) { |
| | | return fail("id数组不能为空", -1); |