| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @Api(tags = "授权管理") |
| | | @RequestMapping("authInf") |
| | |
| | | |
| | | @ApiOperation(value = "查询所有授权信息") |
| | | @GetMapping("getAllAuthInf") |
| | | public Response getAllAuthInf(@RequestParam(required = false) Integer state, @RequestParam(required = false) String uname |
| | | , int pageNum, int pageSize){ |
| | | return service.getAllAuthInf(state,uname,pageNum,pageSize); |
| | | public Response getAllAuthInf( @RequestParam(required = false) String uname |
| | | ,@RequestParam int areaId , int pageNum, int pageSize){ |
| | | return service.getAllAuthInf(uname,areaId,pageNum,pageSize); |
| | | } |
| | | |
| | | @ApiOperation(value = "添加授权(批量)") |
| | |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "删除授权") |
| | | @GetMapping("delAuth") |
| | | public Response delAuth(@RequestParam Integer id){ |
| | | return service.delAuth(id); |
| | | @ApiOperation(value = "删除授权(批量)") |
| | | @PostMapping("delAuth") |
| | | public Response delAuth(@RequestBody List<Integer> ids){ |
| | | return service.delAuth(ids); |
| | | } |
| | | |
| | | @ApiOperation(value = "修改授权") |
| | | @ApiOperation(value = "修改授权(批量)") |
| | | @PostMapping("updateAuth") |
| | | public Response updateAuth(@RequestBody AuthiruzeInf auth){ |
| | | return service.updateAuth(auth); |
| | | public Response updateAuth(@RequestBody AuthiruzeInf auth,@RequestParam int id){ |
| | | return service.updateAuth(auth,id); |
| | | } |
| | | |
| | | @ApiOperation(value = "根据mac检测蓝牙锁是否有权限") |
| | | @GetMapping("getAuthByUidAndMac") |
| | | public Response getAuthByUidAndMac(@RequestParam String mac,@RequestParam String uname){ |
| | | return service.getAuthByUidAndMac(mac,uname); |
| | | } |
| | | } |