平安校园
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

66 lines
1.8 KiB

  1. using SafeCampus.Application.Services.Business.ClassTeacherService;
  2. namespace SafeCampus.Web.Core.Controllers.Application.Business;
  3. /// <summary>
  4. /// 班主任管理接口
  5. /// </summary>
  6. [ApiDescriptionSettings(ApiGroupConsts.SYSTEM_Business, Order = 89, Tag = "班主任管理")]
  7. [Route("/business/classTeacher")]
  8. [RolePermission]
  9. public class ClassTeacherController
  10. {
  11. private readonly IClassTeacherService _classTeacherService;
  12. public ClassTeacherController(IClassTeacherService classTeacherService)
  13. {
  14. _classTeacherService = classTeacherService;
  15. }
  16. /// <summary>
  17. /// 添加班主任
  18. /// </summary>
  19. /// <param name="input">添加参数</param>
  20. /// <returns></returns>
  21. public async Task<bool> Add(ClassTeacherInput input)
  22. {
  23. return await _classTeacherService.Add(input);
  24. }
  25. /// <summary>
  26. /// 修改班主任
  27. /// </summary>
  28. /// <param name="input">添加参数</param>
  29. /// <returns></returns>
  30. public async Task<bool> Update(ClassTeacherUpdateInput input)
  31. {
  32. return await _classTeacherService.Update(input);
  33. }
  34. /// <summary>
  35. /// 删除班主任
  36. /// </summary>
  37. /// <param name="id">id</param>
  38. /// <returns></returns>
  39. public async Task<bool> Delete(long id)
  40. {
  41. return await _classTeacherService.Delete(id);
  42. }
  43. /// <summary>
  44. /// 根据班级id获取班主任信息
  45. /// </summary>
  46. /// <returns></returns>
  47. public async Task<ClassTeacherDto> GetInfo(string personSetId)
  48. {
  49. return await _classTeacherService.GetInfo(personSetId);
  50. }
  51. /// <summary>
  52. /// 获取列表
  53. /// </summary>
  54. /// <returns></returns>
  55. public async Task<List<ClassTeacherDto>> GetNoPageList()
  56. {
  57. return await _classTeacherService.GetNoPageList();
  58. }
  59. }