diff --git a/common.props b/common.props index e7c9d767..2dd5cee6 100644 --- a/common.props +++ b/common.props @@ -1,7 +1,7 @@ latest - 0.6.1 + 0.7.0 $(NoWarn);CS1591 true EasyAbp Team diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp.EShop.Orders.Domain.csproj b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp.EShop.Orders.Domain.csproj index d3963226..5a596313 100644 --- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp.EShop.Orders.Domain.csproj +++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp.EShop.Orders.Domain.csproj @@ -8,7 +8,7 @@ - + diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.HttpApi/EasyAbp/EShop/Orders/Orders/OrderController.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.HttpApi/EasyAbp/EShop/Orders/Orders/OrderController.cs new file mode 100644 index 00000000..69395fbc --- /dev/null +++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.HttpApi/EasyAbp/EShop/Orders/Orders/OrderController.cs @@ -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 GetAsync(Guid id) + { + return _service.GetAsync(id); + } + + [HttpGet] + public Task> GetListAsync(GetOrderListDto input) + { + return _service.GetListAsync(input); + } + + [HttpPost] + public Task CreateAsync(CreateOrderDto input) + { + return _service.CreateAsync(input); + } + + [HttpPut] + [Route("{id}")] + [RemoteService(false)] + public Task 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 GetByOrderNumberAsync(string orderNumber) + { + return _service.GetByOrderNumberAsync(orderNumber); + } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp.EShop.Payments.Domain.csproj b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp.EShop.Payments.Domain.csproj index 9bc60357..24d28441 100644 --- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp.EShop.Payments.Domain.csproj +++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp.EShop.Payments.Domain.csproj @@ -8,7 +8,7 @@ - + diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.HttpApi/EasyAbp/EShop/Payments/Payments/PaymentController.cs b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.HttpApi/EasyAbp/EShop/Payments/Payments/PaymentController.cs new file mode 100644 index 00000000..1249e4c0 --- /dev/null +++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.HttpApi/EasyAbp/EShop/Payments/Payments/PaymentController.cs @@ -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 GetAsync(Guid id) + { + return _service.GetAsync(id); + } + + [HttpGet] + public Task> GetListAsync(GetPaymentListDto input) + { + return _service.GetListAsync(input); + } + + [HttpPost] + public Task CreateAsync(CreatePaymentDto input) + { + return _service.CreateAsync(input); + } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.HttpApi/EasyAbp/EShop/Payments/Refunds/RefundController.cs b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.HttpApi/EasyAbp/EShop/Payments/Refunds/RefundController.cs new file mode 100644 index 00000000..a2dd8b08 --- /dev/null +++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.HttpApi/EasyAbp/EShop/Payments/Refunds/RefundController.cs @@ -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 GetAsync(Guid id) + { + return _service.GetAsync(id); + } + + [HttpGet] + public Task> GetListAsync(GetRefundListDto input) + { + return _service.GetListAsync(input); + } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/host/EasyAbp.EShop.Products.Host.Shared/FodyWeavers.xml b/modules/EasyAbp.EShop.Products/host/EasyAbp.EShop.Products.Host.Shared/FodyWeavers.xml new file mode 100644 index 00000000..00e1d9a1 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/host/EasyAbp.EShop.Products.Host.Shared/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/host/EasyAbp.EShop.Products.Host.Shared/FodyWeavers.xsd b/modules/EasyAbp.EShop.Products/host/EasyAbp.EShop.Products.Host.Shared/FodyWeavers.xsd new file mode 100644 index 00000000..3f3946e2 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/host/EasyAbp.EShop.Products.Host.Shared/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductHistories/IProductDetailHistoryAppService.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductHistories/IProductHistoryAppService.cs similarity index 100% rename from modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductHistories/IProductDetailHistoryAppService.cs rename to modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductHistories/IProductHistoryAppService.cs diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/Categories/CategoryController.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/Categories/CategoryController.cs new file mode 100644 index 00000000..4590f582 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/Categories/CategoryController.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 GetAsync(Guid id) + { + return _service.GetAsync(id); + } + + [HttpGet] + public Task> GetListAsync(GetCategoryListDto input) + { + return _service.GetListAsync(input); + } + + [HttpPost] + public Task CreateAsync(CreateUpdateCategoryDto input) + { + return _service.CreateAsync(input); + } + + [HttpPut] + [Route("{id}")] + public Task UpdateAsync(Guid id, CreateUpdateCategoryDto input) + { + return _service.UpdateAsync(id, input); + } + + [HttpDelete] + [Route("{id}")] + public Task DeleteAsync(Guid id) + { + return _service.DeleteAsync(id); + } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/ProductCategories/ProductCategoryController.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/ProductCategories/ProductCategoryController.cs new file mode 100644 index 00000000..9c7ecf76 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/ProductCategories/ProductCategoryController.cs @@ -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 GetAsync(Guid id) + { + return _service.GetAsync(id); + } + + [HttpGet] + public Task> GetListAsync(GetProductCategoryListDto input) + { + return _service.GetListAsync(input); + } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/ProductDetailHistories/ProductDetailHistoryController.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/ProductDetailHistories/ProductDetailHistoryController.cs new file mode 100644 index 00000000..ffce6ad3 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/ProductDetailHistories/ProductDetailHistoryController.cs @@ -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 GetAsync(Guid id) + { + return _service.GetAsync(id); + } + + [HttpGet] + public Task> GetListAsync(GetProductDetailHistoryListDto input) + { + return _service.GetListAsync(input); + } + + [HttpGet] + [Route("byTime/{productId}")] + public Task GetByTimeAsync(Guid productId, DateTime modificationTime) + { + return _service.GetByTimeAsync(productId, modificationTime); + } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/ProductDetails/ProductDetailController.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/ProductDetails/ProductDetailController.cs new file mode 100644 index 00000000..fd9be946 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/ProductDetails/ProductDetailController.cs @@ -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 GetAsync(Guid id) + { + return _service.GetAsync(id); + } + + [HttpGet] + public Task> GetListAsync(PagedAndSortedResultRequestDto input) + { + return _service.GetListAsync(input); + } + + [HttpPost] + public Task CreateAsync(CreateUpdateProductDetailDto input) + { + return _service.CreateAsync(input); + } + + [HttpPut] + [Route("{id}")] + public Task 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); + } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/ProductHistories/ProductHistoryController.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/ProductHistories/ProductHistoryController.cs new file mode 100644 index 00000000..4b531832 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/ProductHistories/ProductHistoryController.cs @@ -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 GetAsync(Guid id) + { + return _service.GetAsync(id); + } + + [HttpGet] + public Task> GetListAsync(GetProductHistoryListDto input) + { + return _service.GetListAsync(input); + } + + [HttpGet] + [Route("byTime/{productId}")] + public Task GetByTimeAsync(Guid productId, DateTime modificationTime) + { + return _service.GetByTimeAsync(productId, modificationTime); + } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/ProductInventories/ProductInventoryController.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/ProductInventories/ProductInventoryController.cs new file mode 100644 index 00000000..411393e1 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/ProductInventories/ProductInventoryController.cs @@ -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 GetAsync(Guid productId, Guid productSkuId) + { + return _service.GetAsync(productId, productSkuId); + } + + [HttpPut] + public Task UpdateAsync(UpdateProductInventoryDto input) + { + return _service.UpdateAsync(input); + } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/ProductTypes/ProductTypeController.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/ProductTypes/ProductTypeController.cs new file mode 100644 index 00000000..bce93db2 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/ProductTypes/ProductTypeController.cs @@ -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 GetAsync(Guid id) + { + return _service.GetAsync(id); + } + + [HttpGet] + public Task> GetListAsync(PagedAndSortedResultRequestDto input) + { + return _service.GetListAsync(input); + } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/Products/ProductController.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/Products/ProductController.cs new file mode 100644 index 00000000..3cdf28f8 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/Products/ProductController.cs @@ -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 GetAsync(Guid id) + { + return _service.GetAsync(id); + } + + [HttpGet] + public Task> GetListAsync(GetProductListDto input) + { + return _service.GetListAsync(input); + } + + [HttpPost] + public Task CreateAsync(CreateUpdateProductDto input) + { + return _service.CreateAsync(input); + } + + [HttpPut] + [Route("{id}")] + public Task 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 CreateSkuAsync(Guid productId, Guid storeId, CreateProductSkuDto input) + { + return _service.CreateSkuAsync(productId, storeId, input); + } + + [HttpPut] + [Route("sku")] + public Task UpdateSkuAsync(Guid productId, Guid productSkuId, Guid storeId, UpdateProductSkuDto input) + { + return _service.UpdateSkuAsync(productId, productSkuId, storeId, input); + } + + [HttpGet] + [Route("{id}")] + public Task GetAsync(Guid id, Guid storeId) + { + return _service.GetAsync(id, storeId); + } + + [HttpGet] + [Route("byCode/{storeId}")] + public Task GetByCodeAsync(string code, Guid storeId) + { + return _service.GetByCodeAsync(code, storeId); + } + + [HttpDelete] + [Route("sku")] + public Task DeleteSkuAsync(Guid productId, Guid productSkuId, Guid storeId) + { + return _service.DeleteSkuAsync(productId, productSkuId, storeId); + } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.HttpApi/EasyAbp/EShop/Stores/Stores/StoreController.cs b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.HttpApi/EasyAbp/EShop/Stores/Stores/StoreController.cs new file mode 100644 index 00000000..0dee07b4 --- /dev/null +++ b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.HttpApi/EasyAbp/EShop/Stores/Stores/StoreController.cs @@ -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 GetAsync(Guid id) + { + return _service.GetAsync(id); + } + + [HttpGet] + public Task> GetListAsync(PagedAndSortedResultRequestDto input) + { + return _service.GetListAsync(input); + } + + [HttpPost] + public Task CreateAsync(CreateUpdateStoreDto input) + { + return _service.CreateAsync(input); + } + + [HttpPut] + [Route("{id}")] + public Task 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 GetDefaultAsync() + { + return _service.GetDefaultAsync(); + } + } +} \ No newline at end of file diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.HttpApi/EasyAbp/EShop/Plugins/Baskets/BasketItems/BasketItemController.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.HttpApi/EasyAbp/EShop/Plugins/Baskets/BasketItems/BasketItemController.cs new file mode 100644 index 00000000..04a3b644 --- /dev/null +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.HttpApi/EasyAbp/EShop/Plugins/Baskets/BasketItems/BasketItemController.cs @@ -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 GetAsync(Guid id) + { + return _service.GetAsync(id); + } + + [HttpGet] + public Task> GetListAsync(GetBasketItemListDto input) + { + return _service.GetListAsync(input); + } + + [HttpPost] + public Task CreateAsync(CreateBasketItemDto input) + { + return _service.CreateAsync(input); + } + + [HttpPut] + [Route("{id}")] + public Task 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 ids) + { + return _service.DeleteInBulkAsync(ids); + } + } +} \ No newline at end of file diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.Application.Contracts/EShopSample.Application.Contracts.csproj b/samples/EShopSample/aspnet-core/src/EShopSample.Application.Contracts/EShopSample.Application.Contracts.csproj index 0e168791..0860125a 100644 --- a/samples/EShopSample/aspnet-core/src/EShopSample.Application.Contracts/EShopSample.Application.Contracts.csproj +++ b/samples/EShopSample/aspnet-core/src/EShopSample.Application.Contracts/EShopSample.Application.Contracts.csproj @@ -14,8 +14,8 @@ - - + + diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.Application/EShopSample.Application.csproj b/samples/EShopSample/aspnet-core/src/EShopSample.Application/EShopSample.Application.csproj index 47779dc8..73ecb7a2 100644 --- a/samples/EShopSample/aspnet-core/src/EShopSample.Application/EShopSample.Application.csproj +++ b/samples/EShopSample/aspnet-core/src/EShopSample.Application/EShopSample.Application.csproj @@ -15,8 +15,8 @@ - - + + diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.Domain.Shared/EShopSample.Domain.Shared.csproj b/samples/EShopSample/aspnet-core/src/EShopSample.Domain.Shared/EShopSample.Domain.Shared.csproj index 5d01f5ca..5f59b748 100644 --- a/samples/EShopSample/aspnet-core/src/EShopSample.Domain.Shared/EShopSample.Domain.Shared.csproj +++ b/samples/EShopSample/aspnet-core/src/EShopSample.Domain.Shared/EShopSample.Domain.Shared.csproj @@ -8,8 +8,8 @@ - - + + diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.Domain/EShopSample.Domain.csproj b/samples/EShopSample/aspnet-core/src/EShopSample.Domain/EShopSample.Domain.csproj index f739a87d..ddc4b85b 100644 --- a/samples/EShopSample/aspnet-core/src/EShopSample.Domain/EShopSample.Domain.csproj +++ b/samples/EShopSample/aspnet-core/src/EShopSample.Domain/EShopSample.Domain.csproj @@ -14,8 +14,8 @@ - - + + diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore/EShopSample.EntityFrameworkCore.csproj b/samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore/EShopSample.EntityFrameworkCore.csproj index bd631bb1..49eca741 100644 --- a/samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore/EShopSample.EntityFrameworkCore.csproj +++ b/samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore/EShopSample.EntityFrameworkCore.csproj @@ -11,8 +11,8 @@ - - + + diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.HttpApi.Client/EShopSample.HttpApi.Client.csproj b/samples/EShopSample/aspnet-core/src/EShopSample.HttpApi.Client/EShopSample.HttpApi.Client.csproj index 0e858054..96d50b44 100644 --- a/samples/EShopSample/aspnet-core/src/EShopSample.HttpApi.Client/EShopSample.HttpApi.Client.csproj +++ b/samples/EShopSample/aspnet-core/src/EShopSample.HttpApi.Client/EShopSample.HttpApi.Client.csproj @@ -14,8 +14,8 @@ - - + + diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.HttpApi/EShopSample.HttpApi.csproj b/samples/EShopSample/aspnet-core/src/EShopSample.HttpApi/EShopSample.HttpApi.csproj index 94b01c57..0b99f2b2 100644 --- a/samples/EShopSample/aspnet-core/src/EShopSample.HttpApi/EShopSample.HttpApi.csproj +++ b/samples/EShopSample/aspnet-core/src/EShopSample.HttpApi/EShopSample.HttpApi.csproj @@ -14,8 +14,8 @@ - - + + diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSample.Web.csproj b/samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSample.Web.csproj index 3d4107c0..c379ca3c 100644 --- a/samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSample.Web.csproj +++ b/samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSample.Web.csproj @@ -46,8 +46,8 @@ - - + + diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSampleWebModule.cs b/samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSampleWebModule.cs index dc3134e4..869dc393 100644 --- a/samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSampleWebModule.cs +++ b/samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSampleWebModule.cs @@ -110,40 +110,7 @@ namespace EShopSample.Web { Configure(options => { - options.ConventionalControllers.Create(typeof(EShopOrdersApplicationModule).Assembly, opt => - { - opt.RootPath = "eShop/orders"; - }); - options.ConventionalControllers.Create(typeof(EShopPaymentsApplicationModule).Assembly, opt => - { - opt.RootPath = "eShop/payments"; - }); - options.ConventionalControllers.Create(typeof(EShopPluginsApplicationModule).Assembly, opt => - { - opt.RootPath = "eShop/plugins"; - }); - options.ConventionalControllers.Create(typeof(EShopProductsApplicationModule).Assembly, opt => - { - opt.RootPath = "eShop/products"; - }); - options.ConventionalControllers.Create(typeof(EShopStoresApplicationModule).Assembly, opt => - { - opt.RootPath = "eShop/stores"; - }); - - options.ConventionalControllers.Create(typeof(EShopPluginsBasketsApplicationModule).Assembly, opt => - { - opt.RootPath = "eShop/plugins/baskets"; - }); - - options.ConventionalControllers.Create(typeof(PaymentServiceApplicationModule).Assembly, opt => - { - opt.RootPath = "paymentService"; - }); - options.ConventionalControllers.Create(typeof(PaymentServiceWeChatPayApplicationModule).Assembly, opt => - { - opt.RootPath = "paymentService/weChatPay"; - }); + options.ConventionalControllers.Create(typeof(EShopSampleApplicationModule).Assembly); }); }