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.
44 lines
1.4 KiB
44 lines
1.4 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_RequestController : BaseController<IGhre_RequestServices, Ghre_Request, Ghre_RequestDto, InsertGhre_RequestInput, EditGhre_RequestInput>
|
|
{
|
|
public Ghre_RequestController(IGhre_RequestServices 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_RequestDto>> QueryByStatus([FromBody] QueryBody body, string status)
|
|
{
|
|
return await _service.QueryFilterPage(body, $"Status ='{status}'");
|
|
}
|
|
#endregion
|
|
|
|
#region 更新
|
|
[HttpPost("UpdateStatus/{status}")]
|
|
public async Task<ServiceResult> UpdateStatus(string status, [FromBody] long[] ids)
|
|
{
|
|
return await _service.UpdateStatus(ids, status);
|
|
}
|
|
#endregion
|
|
|
|
#region 新增
|
|
[HttpPost("Insert/{status}")]
|
|
public async Task<ServiceResult<long>> InsertByStatus([FromBody] InsertGhre_RequestInput insertModel, string status)
|
|
{
|
|
return await _service.InsertByStatus(insertModel, status);
|
|
}
|
|
#endregion
|
|
} |