whyclxw
2024-12-19 b2dae77a90fff8c41537b9cf6ab01ca4b283528f
授权时查询所有的锁和钥匙
4个文件已修改
25 ■■■■■ 已修改文件
src/main/java/com/whyc/controller/KeyInfController.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/controller/LockInfController.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/service/KeyInfService.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/service/LockInfService.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/controller/KeyInfController.java
@@ -22,6 +22,12 @@
        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){
src/main/java/com/whyc/controller/LockInfController.java
@@ -26,6 +26,13 @@
        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){
src/main/java/com/whyc/service/KeyInfService.java
@@ -28,7 +28,7 @@
        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,"查询所有钥匙信息");
    }
@@ -89,4 +89,9 @@
        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,"授权时查询所有钥匙信息(不分页)");
    }
}
src/main/java/com/whyc/service/LockInfService.java
@@ -80,4 +80,9 @@
        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,"授权时查询所有锁信息(不分页)");
    }
}