package com.yida.data.user.controller.out;

import com.yida.data.common.core.common.ResultBean;
import com.yida.data.user.service.EduStudentService;
import com.yida.data.user.vo.StaStudentVO;
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.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "家长管理")
@Slf4j
@RequiredArgsConstructor
@RestController
@RequestMapping(value = "/out/student")
public class OutEduStudentController {
    private final EduStudentService eduStudentService;

    @ApiOperation("统计学生分布数据")
    @GetMapping("/staStudentDistribu")
    public ResultBean<StaStudentVO> staStudentDistribu(Long[] schoolIds) {
        return ResultBean.buildSuccess(eduStudentService.staStudentDistribu(Arrays.asList(schoolIds)));
    }
}
