| | |
| | | return service.getAllKeyInf(keyName,uname,pageNum,pageSize); |
| | | } |
| | | |
| | | @ApiOperation(value = "授权时查询所有钥匙信息(不分页)") |
| | | @GetMapping("getKeyInfAuth") |
| | | public Response getKeyInfAuth(){ |
| | | return service.getKeyInfAuth(); |
| | | } |
| | | |
| | | @ApiOperation(value = "添加钥匙") |
| | | @PostMapping("addKey") |
| | | public Response addKey(@RequestBody KeyInf kinf){ |
| | |
| | | return service.getAllLockInf(lockName,lockType,lockState,pageNum,pageSize); |
| | | } |
| | | |
| | | @ApiOperation(value = "授权时查询所有锁信息(不分页)") |
| | | @GetMapping("getLockInfAuth") |
| | | public Response getLockInfAuth(){ |
| | | return service.getLockInfAuth(); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "添加锁(批量)") |
| | | @GetMapping("addLock") |
| | | public Response addLock(@RequestParam(required = false) Integer areaId, @RequestParam String lockName, @RequestParam(required = false) String lockType, @RequestParam(required = false) Integer num){ |
| | |
| | | if(uname!=null){ |
| | | wrapper.like("uname",uname); |
| | | } |
| | | List<LockInf> list=mapper.selectList(wrapper); |
| | | List<KeyInf> list=mapper.selectList(wrapper); |
| | | PageInfo pageInfo=new PageInfo(list); |
| | | return new Response().setII(1,list!=null,pageInfo,"查询所有钥匙信息"); |
| | | } |
| | |
| | | mapper.update(null,wrapper); |
| | | return new Response().set(1,true); |
| | | } |
| | | //授权时查询所有钥匙信息(不分页) |
| | | public Response getKeyInfAuth() { |
| | | List<KeyInf> list=mapper.selectList(null); |
| | | return new Response().setII(1,list!=null,list,"授权时查询所有钥匙信息(不分页)"); |
| | | } |
| | | } |
| | |
| | | mapper.update(null,wrapper); |
| | | return new Response().set(1,true); |
| | | } |
| | | //授权时查询所有锁信息(不分页) |
| | | public Response getLockInfAuth() { |
| | | List<LockInf> list=mapper.selectList(null); |
| | | return new Response().setII(1,list!=null,list,"授权时查询所有锁信息(不分页)"); |
| | | } |
| | | } |