| | |
| | | return service.getAllLockInf(lockName,lockType,lockState,areaId,pageNum,pageSize); |
| | | } |
| | | |
| | | @ApiOperation(value = "授权时查询所有锁信息(不分页)") |
| | | @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){ |
| | | public Response addLock(@RequestParam(required = false) Integer areaId, @RequestParam String lockName, @RequestParam(required = false) Integer lockType, @RequestParam(required = false) Integer num){ |
| | | return service.addLock(areaId,lockName,lockType,num); |
| | | } |
| | | |
| | |
| | | @ApiModelProperty(value = "锁名称") |
| | | private String lockName; |
| | | |
| | | @ApiModelProperty(value = "锁类型(无源,蓝牙)") |
| | | private String lockType; |
| | | @ApiModelProperty(value = "锁类型(蓝牙1,id卡2,实体3)") |
| | | private Integer lockType; |
| | | |
| | | @ApiModelProperty(value = "锁状态:-1未安装,0闭锁,1开锁") |
| | | private Integer lockState; |
| | |
| | | @Autowired(required = false) |
| | | private AuthiruzeInfMapper authMapper; |
| | | //添加锁 |
| | | public Response addLock(Integer areaId, String lockName, String lockType,Integer num) { |
| | | public Response addLock(Integer areaId, String lockName, Integer lockType,Integer num) { |
| | | if(num==null){ |
| | | num=1; |
| | | } |
| | |
| | | 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,"授权时查询所有锁信息(不分页)"); |
| | | QueryWrapper wrapper=new QueryWrapper(); |
| | | wrapper.eq("lock_type",1); |
| | | List<LockInf> list=mapper.selectList(wrapper); |
| | | return new Response().setII(1,list!=null,list,"授权时查询所有蓝牙锁信息(不分页)"); |
| | | } |
| | | //获取区域下所有锁的状态 |
| | | public Response getLockRt(int areaId) { |