using System.ComponentModel.Design;
using Microsoft.AspNetCore.Mvc;
using YD_WeChatApplet.Api.Services.Impl;
using YD_WeChatApplet.Commons.Dto;
using YD_WeChatApplet.Commons.Dto.ClassRoomRecord;
using YD_WeChatApplet.Commons.Dto.HomeWork;
using YD_WeChatApplet.Commons.Dto.Resource;
using YD_WeChatApplet.Commons.Dto.Teacher;
using YD_WeChatApplet.Services;
namespace YD_WeChatApplet.Api.Controllers
{
///
/// 老师端
///
[ApiController]
[ApiExplorerSettings(GroupName = "v1")]
[Route("[controller]")]
public class TeacherController : ControllerBase
{
private readonly ITeacherService _teacherService;
public TeacherController(ITeacherService teacherService)
{
_teacherService = teacherService;
}
///
/// 老师个人信息
///
///
[HttpGet("TeacherProfile")]
public async Task TeacherProfile()
{
var res = await _teacherService.TeacherProfile();
return res;
}
///
/// 修改个人信息
///
///
///
[HttpPost("ModifyTeacherProfile")]
public async Task ModifyTeacherProfile([FromBody] TeacherProfileDto paramDto)
{
await _teacherService.ModifyTeacherProfile(paramDto);
return Ok("修改成功");
}
///
/// 修改密码
///
///
///
[HttpPost("ModifyTeacherPwd")]
public async Task ModifyTeacherPwd([FromBody] ModifyTeacherPwdDto paramDto)
{
await _teacherService.ModifyTeacherPwd(paramDto);
return Ok("修改成功");
}
///
/// 项目列表
///
///
///
[HttpGet("CategoryList")]
public async Task> CategoryList(int gradeId)
{
var res = await _teacherService.CategoryList(gradeId);
return res;
}
///
/// 数据统计接口
///
///
///
[HttpGet("DataStatistics")]
public async Task DataStatistics([FromQuery] DataStatisticsFilterDto dto)
{
var res = await _teacherService.DataStatistics(dto);
return res;
}
///
/// 统计接口详情
///
///
///
[HttpGet("DataStatisticsDetails")]
public async Task DataStatisticsDetails([FromQuery] DataStatisticsDetailsFilterDto dto)
{
var res = await _teacherService.DataStatisticsDetails(dto);
return res;
}
///
/// 课堂记录
///
///
///
[HttpGet("ClassRoomRecord")]
public async Task> ClassRoomRecord([FromQuery] ClassRoomRecordDto dto)
{
var res = await _teacherService.ClassRoomRecord(dto);
return res;
}
///
/// 课堂详情
///
///
///
[HttpGet("ClassRoomReportDetails")]
public async Task ClassRoomReportDetails(int classRoomId)
{
var res = await _teacherService.ClassRoomReportDetails(classRoomId);
return res;
}
///
/// 学员课堂报告
///
///
///
///
[HttpGet("StudentClassRoomReport")]
public async Task StudentClassRoomReport(int classRoomId, string studentNo)
{
var res = await _teacherService.StudentClassRoomReport(classRoomId, studentNo);
return res;
}
}
}