backend/ExamKing.WebApp.Student/ApiControllers/DeptController.cs
(完整代码) 889Busing System.Collections.Generic;
using System.Threading.Tasks;
using ExamKing.Application.Services;
using ExamKing.Application.Mappers;
using Mapster;
using Microsoft.AspNetCore.Authorization;
namespace ExamKing.WebApp.Student
{
/// <summary>
/// 系别接口
/// </summary>
public class DeptController : ApiControllerBase
{
private readonly IDeptService _deptService;
/// <inheritdoc />
public DeptController(IDeptService deptService)
{
_deptService = deptService;
}
/// <summary>
/// 查询全部系别
/// </summary>
/// <returns></returns>
[AllowAnonymous]
public async Task<List<DeptClassesOutput>> GetDeptAll()
{
var depts = await _deptService.FindDeptAll();
return depts.Adapt<List<DeptClassesOutput>>();
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。