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.
 
 
 
 
 
 

64 lines
1.6 KiB

using BaseService.BaseData.JobManagement;
using BaseService.BaseData.JobManagement.Dto;
using BaseService.Controllers;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
namespace BaseService.BaseData
{
[Area("base")]
[Route("api/base/job")]
public class JobController : BaseServiceController, IJobAppService
{
private readonly IJobAppService _jobAppService;
public JobController(IJobAppService jobAppService)
{
_jobAppService = jobAppService;
}
[HttpPost]
public Task<JobDto> Create(CreateOrUpdateJobDto input)
{
return _jobAppService.Create(input);
}
[HttpPost]
[Route("delete")]
public Task Delete(List<Guid> ids)
{
return _jobAppService.Delete(ids);
}
[HttpGet]
[Route("{id}")]
public Task<JobDto> Get(Guid id)
{
return _jobAppService.Get(id);
}
[HttpGet]
[Route("all")]
public Task<PagedResultDto<JobDto>> GetAll(GetJobInputDto input)
{
return _jobAppService.GetAll(input);
}
[HttpGet]
[Route("jobs")]
public Task<ListResultDto<JobDto>> GetAllJobs()
{
return _jobAppService.GetAllJobs();
}
[HttpPut]
[Route("{id}")]
public Task<JobDto> Update(Guid id, CreateOrUpdateJobDto input)
{
return _jobAppService.Update(id, input);
}
}
}