| | |
| | | @ApiOperation(value = "获取总用户数和总设备数") |
| | | public AjaxResult selectCount(@PathVariable("id") int id) throws Exception { |
| | | if (id > 0) { |
| | | //根据用户登录的角色身份查询总设备数(台) |
| | | int count = deviceService.selectDeviceCount(id); |
| | | //根据登录用户的角色身份查询设备的使用人数 |
| | | int total = deviceService.selectUserDeviceByCount(id); |
| | | AjaxResult ajax = new AjaxResult(); |
| | | ajax.put("deviceCount", count); |
| | | ajax.put("userTotal", total); |
| | | return AjaxResult.success("查询成功", ajax); |
| | | return deviceService.selectDeviceCount(id); |
| | | } else { |
| | | return AjaxResult.error("未查询到有关信息,id的值不能小于1"); |
| | | } |