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.
90 lines
2.4 KiB
90 lines
2.4 KiB
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
using Volo.Abp.Application.Dtos;
|
|
using Volo.Abp.Application.Services;
|
|
using Win_in.Sfs.Scp.WebApi.Suppliers;
|
|
|
|
namespace Win_in.Sfs.Scp.WebApi.Supplierss
|
|
{
|
|
/// <summary>
|
|
///零件服务
|
|
/// </summary>
|
|
[AllowAnonymous]
|
|
[Route("api/SCP/Supplier")]
|
|
[ApiExplorerSettings(GroupName = SwaggerGroupConsts.ScpWebApi)]
|
|
public class SuppliersAppService : CrudAppService<Supplier, SupplierDTO, Guid,InputDTO, SupplierCreateDTO, SupplierUpdateDTO>, ISupplierAppService
|
|
{
|
|
private readonly ISupplierRepository _partRepository;
|
|
|
|
public SuppliersAppService(ISupplierRepository repository) : base(repository)
|
|
{
|
|
_partRepository = repository;
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
///获取一条数据 (Get a piece of data)
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[Route("{id}")]
|
|
public override Task<SupplierDTO> GetAsync(Guid id)
|
|
{
|
|
return base.GetAsync(id);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
///获取数据列表 (Get data list)
|
|
/// </summary>
|
|
/// <param name="input"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[Route("")]
|
|
public override Task<PagedResultDto<SupplierDTO>> GetListAsync(InputDTO input)
|
|
{
|
|
return base.GetListAsync(input);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// 新增实体 (Create New entity)
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("")]
|
|
public override Task<SupplierDTO> CreateAsync(SupplierCreateDTO input)
|
|
{
|
|
return base.CreateAsync(input);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 修改实体 (Modify entity)
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
|
|
[HttpPut]
|
|
[Route("{id}")]
|
|
public override Task<SupplierDTO> UpdateAsync(Guid id, SupplierUpdateDTO input)
|
|
{
|
|
return base.UpdateAsync(id, input);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 删除实体 (Delete entity)
|
|
/// </summary>
|
|
/// <param name="id">ID</param>
|
|
/// <returns>无</returns>
|
|
[HttpDelete]
|
|
[Route("{id}")]
|
|
public override Task DeleteAsync(Guid id)
|
|
{
|
|
return base.DeleteAsync(id);
|
|
}
|
|
|
|
}
|
|
}
|