| | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Locale; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Service |
| | |
| | | return new Response().set(1,true); |
| | | } |
| | | //根据mac检测蓝牙锁是否有权限 |
| | | public Response getAuthByUidAndMac(Integer mac) { |
| | | public Response getAuthByUidAndMac(String mac) { |
| | | UserInf uinf= ActionUtil.getUser(); |
| | | List areaList=areaInfService.getAllAreaUser(uinf.getUid(),uinf.getUrole()); |
| | | //获取锁是否在人管理的区域下面 |
| | | QueryWrapper wrapper=new QueryWrapper(); |
| | | wrapper.eq("lock_mac",mac); |
| | | wrapper.eq("lock_mac",mac.toUpperCase(Locale.ROOT)); |
| | | wrapper.last("limit 1"); |
| | | wrapper.in("area_id",areaList); |
| | | LockInf linf=lockInfMapper.selectOne(wrapper); |