package com.yida.data.device.telephone.controller.out;

import com.yida.data.common.core.common.ResultBean;
import com.yida.data.device.telephone.service.EduTelephoneCardService;
import com.yida.data.device.vo.OnlineCountVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import java.util.Arrays;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api("亲情电话-ic卡")
@Slf4j
@Validated
@RestController
@RequestMapping("/out/telephone/card")
@RequiredArgsConstructor
public class OutEduTelephoneCardController {
    private final EduTelephoneCardService eduTelephoneCardService;


    @ApiOperation("获取ic状态分布")
    @GetMapping("/getOnlineDistrib")
    public ResultBean<OnlineCountVO> getOnlineDistrib(Long[] schoolIds){
        return ResultBean.buildSuccess(eduTelephoneCardService.getOnlineDistrib(Arrays.asList(schoolIds)));
    }
}
