36 lines
1.2 KiB
C#
36 lines
1.2 KiB
C#
using Learn.Archives.API.Controllers.Dto;
|
|
using Learn.Archives.API.Expand;
|
|
using Learn.Archives.Core.Common;
|
|
using Learn.Archives.Core.Model;
|
|
using Learn.Archives.Core.Model.Dto;
|
|
using Mapster;
|
|
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using Microsoft.AspNetCore.Mvc.RazorPages;
|
|
using System.Diagnostics;
|
|
using System.Security.Claims;
|
|
using UserCenter.Model;
|
|
using static System.Runtime.InteropServices.JavaScript.JSType;
|
|
|
|
namespace Learn.Archives.API.Controllers
|
|
{
|
|
/// <summary>
|
|
/// 班级控制器
|
|
/// </summary>
|
|
public class ClassController : BackController<Classes>
|
|
{
|
|
readonly Repository<Classes> baseService;
|
|
readonly LiveUserInfo userInfo;
|
|
public ClassController(Repository<Classes> baseService, LiveUserInfo userInfo) : base(baseService)
|
|
{
|
|
this.baseService = baseService;
|
|
this.userInfo = userInfo;
|
|
}
|
|
public override async Task<dynamic> PageList([FromBody] QueryRequestBase model)
|
|
{
|
|
var res = (PageResult<Classes>) await base.PageList(model);
|
|
return new PageResult<ClassDto>() { Data = res.Data.Adapt<List<ClassDto>>(), Total = res.Total };
|
|
}
|
|
}
|
|
}
|