package com.xhkjedu.sapi.controller.region;

import com.xhkjedu.sapi.service.region.RRoomAnalyzeService;
import com.xhkjedu.utils.N_Utils;
import com.xhkjedu.vo.ResultVo;
import com.xhkjedu.sapi.vo.region.RegionParam;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

/**
 * @author ywx
 * @classname RRoomAnalyzeController
 * @description 区域后台统计--课堂统计
 * @date 2021/7/13 15:45
 **/
@RestController
@RequestMapping("/rranalyze")
public class RRoomAnalyzeController {
    @Resource
    private RRoomAnalyzeService rRoomAnalyzeService;

    @PostMapping("/list_room")
    public ResultVo listRoom(@RequestBody RegionParam param){
        Integer level = param.getLevel();
        N_Utils.validation(new Object[]{level,"学段",1,param.getYear(),"学年",1});
        Map map = rRoomAnalyzeService.listRoom(param);
        return new ResultVo(0,"获取课堂统计成功",map);
    }
}
