| | |
| | | |
| | | @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 = "loginEntity", value = "字典实体类", dataType = "com.lf.server.entity.data.LoginEntity", paramType = "body", example = "") |
| | | }) |
| | | @PostMapping(value = "/insertLogin", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insertLogin(LoginEntity loginEntity) { |
| | | public ResponseMsg<Integer> insertLogin(@RequestBody LoginEntity loginEntity) { |
| | | try { |
| | | int count = loginService.insertLogin(loginEntity); |
| | | |
| | |
| | | @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); |
| | |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/updateLogin", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> updateLogin(LoginEntity loginEntity) { |
| | | public ResponseMsg<Integer> updateLogin(@RequestBody LoginEntity loginEntity) { |
| | | try { |
| | | int count = loginService.updateLogin(loginEntity); |
| | | |