feat(marketing): implement flash sale module api and app layer
All checks were successful
Build and Deploy TenantApi + SkuWorker / build-and-deploy (push) Successful in 2m4s

This commit is contained in:
2026-03-02 11:08:14 +08:00
parent 5a6da9be0c
commit 0f3542f33f
30 changed files with 2939 additions and 0 deletions

View File

@@ -510,6 +510,29 @@ public sealed class EfProductRepository(TakeoutAppDbContext context) : IProductR
.ToListAsync(cancellationToken);
}
/// <inheritdoc />
public async Task<IReadOnlyList<Product>> GetByIdsAsync(
long tenantId,
long storeId,
IReadOnlyCollection<long> productIds,
CancellationToken cancellationToken = default)
{
if (productIds.Count == 0)
{
return [];
}
return await context.Products
.AsNoTracking()
.Where(x =>
x.TenantId == tenantId &&
x.StoreId == storeId &&
productIds.Contains(x.Id))
.OrderBy(x => x.Name)
.ThenBy(x => x.Id)
.ToListAsync(cancellationToken);
}
/// <inheritdoc />
public async Task<int> BatchUpdateProductCategoryAsync(long tenantId, long storeId, long categoryId, IReadOnlyCollection<long> productIds, CancellationToken cancellationToken = default)
{