package com.xhkjedu.sapi.controller.classreport;

import com.xhkjedu.sapi.model.classreport.*;
import com.xhkjedu.sapi.service.classreport.ClassReportService;
import com.xhkjedu.vo.ResultVo;
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.List;

/**
 * @author ywx
 * @classname ClassReportController
 * @description 班级报告
 * @date 2021/5/26 9:28
 **/
@RestController
@RequestMapping("/creport")
public class ClassReportController {
    @Resource
    private ClassReportService classReportService;

    @PostMapping("/list_yx")
    public ResultVo listYx(@RequestBody TReportClasstype type){
        List<TReportClassGuide> list = classReportService.listYx(type);
        return new ResultVo(0,"获取预习列表成功",list);
    }

    @PostMapping("/list_kt")
    public ResultVo listKt(@RequestBody TReportClasstype type){
        List<TReportClassRoom> list = classReportService.listKt(type);
        return new ResultVo(0,"获取课堂列表成功",list);
    }

    @PostMapping("/list_zy")
    public ResultVo listZy(@RequestBody TReportClasstype type){
        List<TReportClassPaper> list = classReportService.listZy(type);
        return new ResultVo(0,"获取作业列表成功",list);
    }

    @PostMapping("/list_bs")
    public ResultVo listBs(@RequestBody TReportClasstype type){
        List<TReportClassRecite> list = classReportService.listBs(type);
        return new ResultVo(0,"获取背诵列表成功",list);
    }

    @PostMapping("/list_fd")
    public ResultVo listFd(@RequestBody TReportClasstype type){
        List<TReportClassErrorquefd> list = classReportService.listFd(type);
        return new ResultVo(0,"获取错题辅导列表成功",list);
    }

    @PostMapping("/list_ct")
    public ResultVo listCt(@RequestBody TReportClasstype type) {
        List<TReportClassErrorque> list = classReportService.listCt(type);
        return new ResultVo(0, "获取错题列表成功", list);
    }

    @PostMapping("/list_zb")
    public ResultVo listZb(@RequestBody TReportClasstype type) {
        List<TReportClassLive> list = classReportService.listZb(type);
        return new ResultVo(0, "获取直播列表成功", list);
    }

    @PostMapping("/list_zsd")
    public ResultVo listZsd(@RequestBody TReportClasstype type) {
        List<TReportClassPoint> list = classReportService.listZsd(type);
        return new ResultVo(0, "获取知识点掌握列表成功", list);
    }
}
