namespace Tiobon.Core.Api.Controllers;

/// <summary>
/// 必选修查询(Controller)
/// </summary>
[Route("api/[controller]")]
[ApiController, GlobalActionFilter]
[Authorize(Permissions.Name), ApiExplorerSettings(GroupName = Grouping.GroupName_Ghre)]
public class Ghre_RequiredCourseController : BaseController<IGhre_RequiredCourseServices, Ghre_RequiredCourse, Ghre_RequiredCourseDto, InsertGhre_RequiredCourseInput, EditGhre_RequiredCourseInput>
{
    public Ghre_RequiredCourseController(IGhre_RequiredCourseServices service) : base(service)
    {
    }

    #region 查询
    /// <summary>
    /// 根据条件查询数据
    /// </summary>
    /// <param name="body">条件</param>
    /// <param name="status">status</param>
    /// <returns></returns>
    [HttpPost, Route("QueryList/{status}")]
    public async Task<ServicePageResult<Ghre_RequiredCourseDto>> QueryByStatus([FromBody] QueryBody body, string status)
    {
        return await _service.QueryFilterPage(body, null, false);
    }
    #endregion
}