mirror of https://github.com/EasyAbp/EShop.git
28 changed files with 711 additions and 53 deletions
@ -0,0 +1,63 @@ |
|||
using System; |
|||
using System.Threading.Tasks; |
|||
using EasyAbp.EShop.Orders.Orders.Dtos; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Volo.Abp; |
|||
using Volo.Abp.Application.Dtos; |
|||
|
|||
namespace EasyAbp.EShop.Orders.Orders |
|||
{ |
|||
[RemoteService(Name = "EShopOrders")] |
|||
[Route("/api/eShop/orders/order")] |
|||
public class OrderController : OrdersController, IOrderAppService |
|||
{ |
|||
private readonly IOrderAppService _service; |
|||
|
|||
public OrderController(IOrderAppService service) |
|||
{ |
|||
_service = service; |
|||
} |
|||
|
|||
[HttpGet] |
|||
[Route("{id}")] |
|||
public Task<OrderDto> GetAsync(Guid id) |
|||
{ |
|||
return _service.GetAsync(id); |
|||
} |
|||
|
|||
[HttpGet] |
|||
public Task<PagedResultDto<OrderDto>> GetListAsync(GetOrderListDto input) |
|||
{ |
|||
return _service.GetListAsync(input); |
|||
} |
|||
|
|||
[HttpPost] |
|||
public Task<OrderDto> CreateAsync(CreateOrderDto input) |
|||
{ |
|||
return _service.CreateAsync(input); |
|||
} |
|||
|
|||
[HttpPut] |
|||
[Route("{id}")] |
|||
[RemoteService(false)] |
|||
public Task<OrderDto> UpdateAsync(Guid id, CreateOrderDto input) |
|||
{ |
|||
return _service.UpdateAsync(id, input); |
|||
} |
|||
|
|||
[HttpDelete] |
|||
[Route("{id}")] |
|||
[RemoteService(false)] |
|||
public Task DeleteAsync(Guid id) |
|||
{ |
|||
return _service.DeleteAsync(id); |
|||
} |
|||
|
|||
[HttpGet] |
|||
[Route("byOrderNumber")] |
|||
public Task<OrderDto> GetByOrderNumberAsync(string orderNumber) |
|||
{ |
|||
return _service.GetByOrderNumberAsync(orderNumber); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,40 @@ |
|||
using System; |
|||
using System.Threading.Tasks; |
|||
using EasyAbp.EShop.Payments.Payments.Dtos; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Volo.Abp; |
|||
using Volo.Abp.Application.Dtos; |
|||
|
|||
namespace EasyAbp.EShop.Payments.Payments |
|||
{ |
|||
[RemoteService(Name = "EShopPayments")] |
|||
[Route("/api/eShop/payments/payment")] |
|||
public class PaymentController : PaymentsController, IPaymentAppService |
|||
{ |
|||
private readonly IPaymentAppService _service; |
|||
|
|||
public PaymentController(IPaymentAppService service) |
|||
{ |
|||
_service = service; |
|||
} |
|||
|
|||
[HttpGet] |
|||
[Route("{id}")] |
|||
public Task<PaymentDto> GetAsync(Guid id) |
|||
{ |
|||
return _service.GetAsync(id); |
|||
} |
|||
|
|||
[HttpGet] |
|||
public Task<PagedResultDto<PaymentDto>> GetListAsync(GetPaymentListDto input) |
|||
{ |
|||
return _service.GetListAsync(input); |
|||
} |
|||
|
|||
[HttpPost] |
|||
public Task CreateAsync(CreatePaymentDto input) |
|||
{ |
|||
return _service.CreateAsync(input); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,34 @@ |
|||
using System; |
|||
using System.Threading.Tasks; |
|||
using EasyAbp.EShop.Payments.Refunds.Dtos; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Volo.Abp; |
|||
using Volo.Abp.Application.Dtos; |
|||
|
|||
namespace EasyAbp.EShop.Payments.Refunds |
|||
{ |
|||
[RemoteService(Name = "EShopPayments")] |
|||
[Route("/api/eShop/payments/refund")] |
|||
public class RefundController : PaymentsController, IRefundAppService |
|||
{ |
|||
private readonly IRefundAppService _service; |
|||
|
|||
public RefundController(IRefundAppService service) |
|||
{ |
|||
_service = service; |
|||
} |
|||
|
|||
[HttpGet] |
|||
[Route("{id}")] |
|||
public Task<RefundDto> GetAsync(Guid id) |
|||
{ |
|||
return _service.GetAsync(id); |
|||
} |
|||
|
|||
[HttpGet] |
|||
public Task<PagedResultDto<RefundDto>> GetListAsync(GetRefundListDto input) |
|||
{ |
|||
return _service.GetListAsync(input); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,3 @@ |
|||
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> |
|||
<ConfigureAwait /> |
|||
</Weavers> |
|||
@ -0,0 +1,30 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> |
|||
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. --> |
|||
<xs:element name="Weavers"> |
|||
<xs:complexType> |
|||
<xs:all> |
|||
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1"> |
|||
<xs:complexType> |
|||
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" /> |
|||
</xs:complexType> |
|||
</xs:element> |
|||
</xs:all> |
|||
<xs:attribute name="VerifyAssembly" type="xs:boolean"> |
|||
<xs:annotation> |
|||
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation> |
|||
</xs:annotation> |
|||
</xs:attribute> |
|||
<xs:attribute name="VerifyIgnoreCodes" type="xs:string"> |
|||
<xs:annotation> |
|||
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation> |
|||
</xs:annotation> |
|||
</xs:attribute> |
|||
<xs:attribute name="GenerateXsd" type="xs:boolean"> |
|||
<xs:annotation> |
|||
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation> |
|||
</xs:annotation> |
|||
</xs:attribute> |
|||
</xs:complexType> |
|||
</xs:element> |
|||
</xs:schema> |
|||
0
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductHistories/IProductDetailHistoryAppService.cs → modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductHistories/IProductHistoryAppService.cs
0
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductHistories/IProductDetailHistoryAppService.cs → modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductHistories/IProductHistoryAppService.cs
@ -0,0 +1,54 @@ |
|||
using System; |
|||
using System.Threading.Tasks; |
|||
using EasyAbp.EShop.Products.Categories.Dtos; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Volo.Abp; |
|||
using Volo.Abp.Application.Dtos; |
|||
|
|||
namespace EasyAbp.EShop.Products.Categories |
|||
{ |
|||
[RemoteService(Name = "EShopProducts")] |
|||
[Route("/api/eShop/products/category")] |
|||
public class CategoryController : ProductsController, ICategoryAppService |
|||
{ |
|||
private readonly ICategoryAppService _service; |
|||
|
|||
public CategoryController(ICategoryAppService service) |
|||
{ |
|||
_service = service; |
|||
} |
|||
|
|||
[HttpGet] |
|||
[Route("{id}")] |
|||
public Task<CategoryDto> GetAsync(Guid id) |
|||
{ |
|||
return _service.GetAsync(id); |
|||
} |
|||
|
|||
[HttpGet] |
|||
public Task<PagedResultDto<CategoryDto>> GetListAsync(GetCategoryListDto input) |
|||
{ |
|||
return _service.GetListAsync(input); |
|||
} |
|||
|
|||
[HttpPost] |
|||
public Task<CategoryDto> CreateAsync(CreateUpdateCategoryDto input) |
|||
{ |
|||
return _service.CreateAsync(input); |
|||
} |
|||
|
|||
[HttpPut] |
|||
[Route("{id}")] |
|||
public Task<CategoryDto> UpdateAsync(Guid id, CreateUpdateCategoryDto input) |
|||
{ |
|||
return _service.UpdateAsync(id, input); |
|||
} |
|||
|
|||
[HttpDelete] |
|||
[Route("{id}")] |
|||
public Task DeleteAsync(Guid id) |
|||
{ |
|||
return _service.DeleteAsync(id); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,35 @@ |
|||
using System; |
|||
using System.Threading.Tasks; |
|||
using EasyAbp.EShop.Products.ProductCategories.Dtos; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Volo.Abp; |
|||
using Volo.Abp.Application.Dtos; |
|||
|
|||
namespace EasyAbp.EShop.Products.ProductCategories |
|||
{ |
|||
[RemoteService(Name = "EShopProducts")] |
|||
[Route("/api/eShop/products/productCategory")] |
|||
public class ProductCategoryController : ProductsController, IProductCategoryAppService |
|||
{ |
|||
private readonly IProductCategoryAppService _service; |
|||
|
|||
public ProductCategoryController(IProductCategoryAppService service) |
|||
{ |
|||
_service = service; |
|||
} |
|||
|
|||
[HttpGet] |
|||
[Route("{id}")] |
|||
[RemoteService(false)] |
|||
public Task<ProductCategoryDto> GetAsync(Guid id) |
|||
{ |
|||
return _service.GetAsync(id); |
|||
} |
|||
|
|||
[HttpGet] |
|||
public Task<PagedResultDto<ProductCategoryDto>> GetListAsync(GetProductCategoryListDto input) |
|||
{ |
|||
return _service.GetListAsync(input); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,41 @@ |
|||
using System; |
|||
using System.Threading.Tasks; |
|||
using EasyAbp.EShop.Products.ProductDetailHistories.Dtos; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Volo.Abp; |
|||
using Volo.Abp.Application.Dtos; |
|||
|
|||
namespace EasyAbp.EShop.Products.ProductDetailHistories |
|||
{ |
|||
[RemoteService(Name = "EShopProducts")] |
|||
[Route("/api/eShop/products/productDetailHistory")] |
|||
public class ProductDetailHistoryController : ProductsController, IProductDetailHistoryAppService |
|||
{ |
|||
private readonly IProductDetailHistoryAppService _service; |
|||
|
|||
public ProductDetailHistoryController(IProductDetailHistoryAppService service) |
|||
{ |
|||
_service = service; |
|||
} |
|||
|
|||
[HttpGet] |
|||
[Route("{id}")] |
|||
public Task<ProductDetailHistoryDto> GetAsync(Guid id) |
|||
{ |
|||
return _service.GetAsync(id); |
|||
} |
|||
|
|||
[HttpGet] |
|||
public Task<PagedResultDto<ProductDetailHistoryDto>> GetListAsync(GetProductDetailHistoryListDto input) |
|||
{ |
|||
return _service.GetListAsync(input); |
|||
} |
|||
|
|||
[HttpGet] |
|||
[Route("byTime/{productId}")] |
|||
public Task<ProductDetailHistoryDto> GetByTimeAsync(Guid productId, DateTime modificationTime) |
|||
{ |
|||
return _service.GetByTimeAsync(productId, modificationTime); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,62 @@ |
|||
using System; |
|||
using System.Threading.Tasks; |
|||
using EasyAbp.EShop.Products.ProductDetails.Dtos; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Volo.Abp; |
|||
using Volo.Abp.Application.Dtos; |
|||
|
|||
namespace EasyAbp.EShop.Products.ProductDetails |
|||
{ |
|||
[RemoteService(Name = "EShopProducts")] |
|||
[Route("/api/eShop/products/productDetail")] |
|||
public class ProductDetailController : ProductsController, IProductDetailAppService |
|||
{ |
|||
private readonly IProductDetailAppService _service; |
|||
|
|||
public ProductDetailController(IProductDetailAppService service) |
|||
{ |
|||
_service = service; |
|||
} |
|||
|
|||
[HttpGet] |
|||
[Route("{id}")] |
|||
public Task<ProductDetailDto> GetAsync(Guid id) |
|||
{ |
|||
return _service.GetAsync(id); |
|||
} |
|||
|
|||
[HttpGet] |
|||
public Task<PagedResultDto<ProductDetailDto>> GetListAsync(PagedAndSortedResultRequestDto input) |
|||
{ |
|||
return _service.GetListAsync(input); |
|||
} |
|||
|
|||
[HttpPost] |
|||
public Task<ProductDetailDto> CreateAsync(CreateUpdateProductDetailDto input) |
|||
{ |
|||
return _service.CreateAsync(input); |
|||
} |
|||
|
|||
[HttpPut] |
|||
[Route("{id}")] |
|||
public Task<ProductDetailDto> UpdateAsync(Guid id, CreateUpdateProductDetailDto input) |
|||
{ |
|||
return _service.UpdateAsync(id, input); |
|||
} |
|||
|
|||
[HttpDelete] |
|||
[Route("{id}")] |
|||
public Task DeleteAsync(Guid id) |
|||
{ |
|||
return _service.DeleteAsync(id); |
|||
} |
|||
|
|||
[HttpDelete] |
|||
[Route("{id}")] |
|||
[RemoteService(false)] |
|||
public Task DeleteAsync(Guid id, Guid storeId) |
|||
{ |
|||
return _service.DeleteAsync(id, storeId); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,41 @@ |
|||
using System; |
|||
using System.Threading.Tasks; |
|||
using EasyAbp.EShop.Products.ProductHistories.Dtos; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Volo.Abp; |
|||
using Volo.Abp.Application.Dtos; |
|||
|
|||
namespace EasyAbp.EShop.Products.ProductHistories |
|||
{ |
|||
[RemoteService(Name = "EShopProducts")] |
|||
[Route("/api/eShop/products/productHistory")] |
|||
public class ProductHistoryController : ProductsController, IProductHistoryAppService |
|||
{ |
|||
private readonly IProductHistoryAppService _service; |
|||
|
|||
public ProductHistoryController(IProductHistoryAppService service) |
|||
{ |
|||
_service = service; |
|||
} |
|||
|
|||
[HttpGet] |
|||
[Route("{id}")] |
|||
public Task<ProductHistoryDto> GetAsync(Guid id) |
|||
{ |
|||
return _service.GetAsync(id); |
|||
} |
|||
|
|||
[HttpGet] |
|||
public Task<PagedResultDto<ProductHistoryDto>> GetListAsync(GetProductHistoryListDto input) |
|||
{ |
|||
return _service.GetListAsync(input); |
|||
} |
|||
|
|||
[HttpGet] |
|||
[Route("byTime/{productId}")] |
|||
public Task<ProductHistoryDto> GetByTimeAsync(Guid productId, DateTime modificationTime) |
|||
{ |
|||
return _service.GetByTimeAsync(productId, modificationTime); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,33 @@ |
|||
using System; |
|||
using System.Threading.Tasks; |
|||
using EasyAbp.EShop.Products.ProductInventories.Dtos; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Volo.Abp; |
|||
using Volo.Abp.Application.Dtos; |
|||
|
|||
namespace EasyAbp.EShop.Products.ProductInventories |
|||
{ |
|||
[RemoteService(Name = "EShopProducts")] |
|||
[Route("/api/eShop/products/productInventory")] |
|||
public class ProductInventoryController : ProductsController, IProductInventoryAppService |
|||
{ |
|||
private readonly IProductInventoryAppService _service; |
|||
|
|||
public ProductInventoryController(IProductInventoryAppService service) |
|||
{ |
|||
_service = service; |
|||
} |
|||
|
|||
[HttpGet] |
|||
public Task<ProductInventoryDto> GetAsync(Guid productId, Guid productSkuId) |
|||
{ |
|||
return _service.GetAsync(productId, productSkuId); |
|||
} |
|||
|
|||
[HttpPut] |
|||
public Task<ProductInventoryDto> UpdateAsync(UpdateProductInventoryDto input) |
|||
{ |
|||
return _service.UpdateAsync(input); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,34 @@ |
|||
using System; |
|||
using System.Threading.Tasks; |
|||
using EasyAbp.EShop.Products.ProductTypes.Dtos; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Volo.Abp; |
|||
using Volo.Abp.Application.Dtos; |
|||
|
|||
namespace EasyAbp.EShop.Products.ProductTypes |
|||
{ |
|||
[RemoteService(Name = "EShopProducts")] |
|||
[Route("/api/eShop/products/productType")] |
|||
public class ProductTypeController : ProductsController, IProductTypeAppService |
|||
{ |
|||
private readonly IProductTypeAppService _service; |
|||
|
|||
public ProductTypeController(IProductTypeAppService service) |
|||
{ |
|||
_service = service; |
|||
} |
|||
|
|||
[HttpGet] |
|||
[Route("{id}")] |
|||
public Task<ProductTypeDto> GetAsync(Guid id) |
|||
{ |
|||
return _service.GetAsync(id); |
|||
} |
|||
|
|||
[HttpGet] |
|||
public Task<PagedResultDto<ProductTypeDto>> GetListAsync(PagedAndSortedResultRequestDto input) |
|||
{ |
|||
return _service.GetListAsync(input); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,98 @@ |
|||
using System; |
|||
using System.Threading.Tasks; |
|||
using EasyAbp.EShop.Products.Products.Dtos; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Volo.Abp; |
|||
using Volo.Abp.Application.Dtos; |
|||
|
|||
namespace EasyAbp.EShop.Products.Products |
|||
{ |
|||
[RemoteService(Name = "EShopProducts")] |
|||
[Route("/api/eShop/products/product")] |
|||
public class ProductController : ProductsController, IProductAppService |
|||
{ |
|||
private readonly IProductAppService _service; |
|||
|
|||
public ProductController(IProductAppService service) |
|||
{ |
|||
_service = service; |
|||
} |
|||
|
|||
[HttpGet] |
|||
[Route("{id}")] |
|||
[RemoteService(false)] |
|||
public Task<ProductDto> GetAsync(Guid id) |
|||
{ |
|||
return _service.GetAsync(id); |
|||
} |
|||
|
|||
[HttpGet] |
|||
public Task<PagedResultDto<ProductDto>> GetListAsync(GetProductListDto input) |
|||
{ |
|||
return _service.GetListAsync(input); |
|||
} |
|||
|
|||
[HttpPost] |
|||
public Task<ProductDto> CreateAsync(CreateUpdateProductDto input) |
|||
{ |
|||
return _service.CreateAsync(input); |
|||
} |
|||
|
|||
[HttpPut] |
|||
[Route("{id}")] |
|||
public Task<ProductDto> UpdateAsync(Guid id, CreateUpdateProductDto input) |
|||
{ |
|||
return _service.UpdateAsync(id, input); |
|||
} |
|||
|
|||
[HttpDelete] |
|||
[Route("{id}")] |
|||
[RemoteService(false)] |
|||
public Task DeleteAsync(Guid id) |
|||
{ |
|||
return _service.DeleteAsync(id); |
|||
} |
|||
|
|||
[HttpDelete] |
|||
[Route("{id}")] |
|||
public Task DeleteAsync(Guid id, Guid storeId) |
|||
{ |
|||
return _service.DeleteAsync(id, storeId); |
|||
} |
|||
|
|||
[HttpPost] |
|||
[Route("sku")] |
|||
public Task<ProductDto> CreateSkuAsync(Guid productId, Guid storeId, CreateProductSkuDto input) |
|||
{ |
|||
return _service.CreateSkuAsync(productId, storeId, input); |
|||
} |
|||
|
|||
[HttpPut] |
|||
[Route("sku")] |
|||
public Task<ProductDto> UpdateSkuAsync(Guid productId, Guid productSkuId, Guid storeId, UpdateProductSkuDto input) |
|||
{ |
|||
return _service.UpdateSkuAsync(productId, productSkuId, storeId, input); |
|||
} |
|||
|
|||
[HttpGet] |
|||
[Route("{id}")] |
|||
public Task<ProductDto> GetAsync(Guid id, Guid storeId) |
|||
{ |
|||
return _service.GetAsync(id, storeId); |
|||
} |
|||
|
|||
[HttpGet] |
|||
[Route("byCode/{storeId}")] |
|||
public Task<ProductDto> GetByCodeAsync(string code, Guid storeId) |
|||
{ |
|||
return _service.GetByCodeAsync(code, storeId); |
|||
} |
|||
|
|||
[HttpDelete] |
|||
[Route("sku")] |
|||
public Task<ProductDto> DeleteSkuAsync(Guid productId, Guid productSkuId, Guid storeId) |
|||
{ |
|||
return _service.DeleteSkuAsync(productId, productSkuId, storeId); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,61 @@ |
|||
using System; |
|||
using System.Threading.Tasks; |
|||
using EasyAbp.EShop.Stores.Stores.Dtos; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Volo.Abp; |
|||
using Volo.Abp.Application.Dtos; |
|||
|
|||
namespace EasyAbp.EShop.Stores.Stores |
|||
{ |
|||
[RemoteService(Name = "EShopStores")] |
|||
[Route("/api/eShop/stores/store")] |
|||
public class StoreController : StoresController, IStoreAppService |
|||
{ |
|||
private readonly IStoreAppService _service; |
|||
|
|||
public StoreController(IStoreAppService service) |
|||
{ |
|||
_service = service; |
|||
} |
|||
|
|||
[HttpGet] |
|||
[Route("{id}")] |
|||
public Task<StoreDto> GetAsync(Guid id) |
|||
{ |
|||
return _service.GetAsync(id); |
|||
} |
|||
|
|||
[HttpGet] |
|||
public Task<PagedResultDto<StoreDto>> GetListAsync(PagedAndSortedResultRequestDto input) |
|||
{ |
|||
return _service.GetListAsync(input); |
|||
} |
|||
|
|||
[HttpPost] |
|||
public Task<StoreDto> CreateAsync(CreateUpdateStoreDto input) |
|||
{ |
|||
return _service.CreateAsync(input); |
|||
} |
|||
|
|||
[HttpPut] |
|||
[Route("{id}")] |
|||
public Task<StoreDto> UpdateAsync(Guid id, CreateUpdateStoreDto input) |
|||
{ |
|||
return _service.UpdateAsync(id, input); |
|||
} |
|||
|
|||
[HttpDelete] |
|||
[Route("{id}")] |
|||
public Task DeleteAsync(Guid id) |
|||
{ |
|||
return _service.DeleteAsync(id); |
|||
} |
|||
|
|||
[HttpGet] |
|||
[Route("default")] |
|||
public Task<StoreDto> GetDefaultAsync() |
|||
{ |
|||
return _service.GetDefaultAsync(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,62 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Threading.Tasks; |
|||
using EasyAbp.EShop.Plugins.Baskets.BasketItems.Dtos; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Volo.Abp; |
|||
using Volo.Abp.Application.Dtos; |
|||
|
|||
namespace EasyAbp.EShop.Plugins.Baskets.BasketItems |
|||
{ |
|||
[RemoteService(Name = "EShopPluginsBaskets")] |
|||
[Route("/api/eShop/plugins/baskets/basketItem")] |
|||
public class BasketItemController : BasketsController, IBasketItemAppService |
|||
{ |
|||
private readonly IBasketItemAppService _service; |
|||
|
|||
public BasketItemController(IBasketItemAppService service) |
|||
{ |
|||
_service = service; |
|||
} |
|||
|
|||
[HttpGet] |
|||
[Route("{id}")] |
|||
public Task<BasketItemDto> GetAsync(Guid id) |
|||
{ |
|||
return _service.GetAsync(id); |
|||
} |
|||
|
|||
[HttpGet] |
|||
public Task<PagedResultDto<BasketItemDto>> GetListAsync(GetBasketItemListDto input) |
|||
{ |
|||
return _service.GetListAsync(input); |
|||
} |
|||
|
|||
[HttpPost] |
|||
public Task<BasketItemDto> CreateAsync(CreateBasketItemDto input) |
|||
{ |
|||
return _service.CreateAsync(input); |
|||
} |
|||
|
|||
[HttpPut] |
|||
[Route("{id}")] |
|||
public Task<BasketItemDto> UpdateAsync(Guid id, UpdateBasketItemDto input) |
|||
{ |
|||
return _service.UpdateAsync(id, input); |
|||
} |
|||
|
|||
[HttpDelete] |
|||
[Route("{id}")] |
|||
public Task DeleteAsync(Guid id) |
|||
{ |
|||
return _service.DeleteAsync(id); |
|||
} |
|||
|
|||
[HttpDelete] |
|||
[Route("inBulk")] |
|||
public Task DeleteInBulkAsync(IEnumerable<Guid> ids) |
|||
{ |
|||
return _service.DeleteInBulkAsync(ids); |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue