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.
63 lines
1.9 KiB
63 lines
1.9 KiB
namespace Tiobon.Core.Api.Controllers;
|
|
|
|
/// <summary>
|
|
/// 课程(Controller)
|
|
/// </summary>
|
|
[Route("api/[controller]")]
|
|
[ApiController, GlobalActionFilter]
|
|
[Authorize(Permissions.Name), ApiExplorerSettings(GroupName = Grouping.GroupName_Ghre)]
|
|
public class Ghre_CourseController : BaseController<IGhre_CourseServices, Ghre_Course, Ghre_CourseDto, InsertGhre_CourseInput, EditGhre_CourseInput>
|
|
{
|
|
public Ghre_CourseController(IGhre_CourseServices service) : base(service)
|
|
{
|
|
}
|
|
|
|
#region 查询
|
|
/// <summary>
|
|
/// 根据条件查询数据
|
|
/// </summary>
|
|
/// <param name="status">status</param>
|
|
/// <param name="body">条件</param>
|
|
/// <returns></returns>
|
|
[HttpPost, Route("QueryList/{status}")]
|
|
public async Task<ServicePageResult<Ghre_CourseDto>> QueryList(string status, [FromBody] QueryBody body)
|
|
{
|
|
return await _service.QueryList(body, status);
|
|
}
|
|
|
|
[HttpPost, Route("QueryDeptID/{StaffID}")]
|
|
public async Task<ServiceResult<int>> QueryDeptID(int StaffID)
|
|
{
|
|
return await _service.QueryDeptID(StaffID);
|
|
}
|
|
|
|
[HttpPost, Route("GetSelect")]
|
|
public async Task<ServiceResult<CommonSelect>> QueryTeacher(long? linkId)
|
|
{
|
|
return await _service.QueryTeacher(linkId);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region 更新
|
|
[HttpPost("UpdateStatus/{status}")]
|
|
public async Task<ServiceResult> UpdateStatus(string status, [FromBody] long[] ids)
|
|
{
|
|
return await _service.UpdateStatus(ids, status);
|
|
}
|
|
#endregion
|
|
|
|
#region 获取通用列表下拉
|
|
/// <summary>
|
|
/// 获取通用列表下拉
|
|
/// </summary>
|
|
/// <param name="linkId"></param>
|
|
/// <returns></returns>
|
|
[HttpPost, Route("QuerySelect")]
|
|
public async Task<ServiceResult<CommonSelect>> QuerySelectAsync(long? linkId, string KeyWords)
|
|
{
|
|
return await _service.GetSelectAsync(linkId, KeyWords);
|
|
}
|
|
#endregion
|
|
|
|
} |