|
|
|
@ -88,18 +88,13 @@ public class FlashSalesPlanAppService : |
|
|
|
await CheckMultiStorePolicyAsync(input.StoreId, CreatePolicyName); |
|
|
|
|
|
|
|
var product = await ProductAppService.GetAsync(input.ProductId); |
|
|
|
var productSku = product.FindSkuById(input.ProductSkuId); |
|
|
|
product.GetSkuById(input.ProductSkuId); |
|
|
|
|
|
|
|
if (product.StoreId != input.StoreId) |
|
|
|
{ |
|
|
|
throw new ProductIsNotInThisStoreException(input.ProductId, input.StoreId); |
|
|
|
} |
|
|
|
|
|
|
|
if (productSku == null) |
|
|
|
{ |
|
|
|
throw new ProductSkuIsNotFoundException(input.ProductSkuId); |
|
|
|
} |
|
|
|
|
|
|
|
var flashSalesPlan = new FlashSalesPlan( |
|
|
|
GuidGenerator.Create(), |
|
|
|
CurrentTenant.Id, |
|
|
|
@ -121,18 +116,13 @@ public class FlashSalesPlanAppService : |
|
|
|
await CheckMultiStorePolicyAsync(input.StoreId, UpdatePolicyName); |
|
|
|
|
|
|
|
var product = await ProductAppService.GetAsync(input.ProductId); |
|
|
|
var productSku = product.FindSkuById(input.ProductSkuId); |
|
|
|
product.GetSkuById(input.ProductSkuId); |
|
|
|
|
|
|
|
if (product.StoreId != input.StoreId) |
|
|
|
{ |
|
|
|
throw new ProductIsNotInThisStoreException(input.ProductId, input.StoreId); |
|
|
|
} |
|
|
|
|
|
|
|
if (productSku == null) |
|
|
|
{ |
|
|
|
throw new ProductSkuIsNotFoundException(input.ProductSkuId); |
|
|
|
} |
|
|
|
|
|
|
|
var flashSalesPlan = await GetEntityByIdAsync(id); |
|
|
|
|
|
|
|
flashSalesPlan.SetTimeRange(input.BeginTime, input.EndTime); |
|
|
|
|