| | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import javax.validation.Valid; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.moral.api.dto.OnlineRatePageCond; |
| | | import com.moral.api.service.DeviceService; |
| | | import com.moral.api.vo.OnlineRateVo; |
| | | import com.moral.constant.ResponseCodeEnum; |
| | | import com.moral.constant.ResultMessage; |
| | | |
| | | /** |
| | |
| | | |
| | | |
| | | |
| | | @GetMapping("state") |
| | | @PostMapping("state") |
| | | @ApiOperation("当前在线率") |
| | | public ResultMessage state(Integer organizationId){ |
| | | Map<String, Object> start = deviceService.getStart(organizationId); |
| | | public ResultMessage state(@RequestBody Map<String, Object> params){ |
| | | if (!params.containsKey("macs")) { |
| | | return ResultMessage.fail(ResponseCodeEnum.PARAMETERS_IS_MISSING.getCode(), ResponseCodeEnum.PARAMETERS_IS_MISSING.getMsg()); |
| | | } |
| | | List<String> macs = (List<String>) params.get("macs"); |
| | | Map<String, Object> start = deviceService.getStart(macs); |
| | | return ResultMessage.ok(start); |
| | | } |
| | | } |