package cn.teammodel.controller.admin.controller;

import cn.teammodel.common.R;
import cn.teammodel.controller.admin.service.TeacherService;
import cn.teammodel.model.dto.admin.exam.OverViewDto;
import cn.teammodel.model.dto.admin.teacher.TeacherDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
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 javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("admin/teacher")
@Api(tags = "教师相关接口内容")
public class TeacherController {
    @Resource
    private TeacherService teacherService;
    @PostMapping("getCount")
    @ApiOperation("获取教师基础数据统计内容")
    public R<List<Map<String, Integer>>> getCount(@Valid @RequestBody TeacherDto teacherDto) {
        List<Map<String, Integer>> res = teacherService.getTeacherList(teacherDto);
        return R.success(res);
    }
}
