|
|
@ -1,6 +1,7 @@ |
|
|
|
using BBWY.Common.Http; |
|
|
|
using BBWY.Common.Models; |
|
|
|
using BBWY.Server.Model; |
|
|
|
using BBWY.Server.Model.Db; |
|
|
|
using BBWY.Server.Model.Dto; |
|
|
|
using Microsoft.Extensions.Configuration; |
|
|
|
using Microsoft.Extensions.Options; |
|
|
@ -12,9 +13,10 @@ namespace BBWY.Server.Business |
|
|
|
{ |
|
|
|
public class ProductBusiness : BasePlatformRelayBusiness, IDenpendency |
|
|
|
{ |
|
|
|
public ProductBusiness(RestApiService restApiService, IConfiguration configuration, IOptions<GlobalConfig> options, YunDingBusiness yunDingBusiness) : base(restApiService, options, yunDingBusiness) |
|
|
|
private IFreeSql fsql; |
|
|
|
public ProductBusiness(RestApiService restApiService, IConfiguration configuration, IOptions<GlobalConfig> options, YunDingBusiness yunDingBusiness, IFreeSql fsql) : base(restApiService, options, yunDingBusiness) |
|
|
|
{ |
|
|
|
|
|
|
|
this.fsql = fsql; |
|
|
|
} |
|
|
|
|
|
|
|
public ProductListResponse GetProductList(SearchProductRequest searchProductRequest) |
|
|
@ -41,6 +43,11 @@ namespace BBWY.Server.Business |
|
|
|
return response.Data; |
|
|
|
} |
|
|
|
|
|
|
|
public IList<ProductSkuResponse> GetProductSkuListFromLocal(SearchProductSkuFromLocalRequest request) |
|
|
|
{ |
|
|
|
return fsql.Select<ProductSku>(request.SkuList).Where(ps => ps.ShopId == request.ShopId).ToList<ProductSkuResponse>(); |
|
|
|
} |
|
|
|
|
|
|
|
public ProductCategoryResponse GetCategoyrInfo(JDQueryCategoryRequest request) |
|
|
|
{ |
|
|
|
var relayAPIHost = GetPlatformRelayAPIHost(request.Platform); |
|
|
|