Files
Store.Management/Source/Store.Management.Framework/Services/ShopService.cs
T
2026-11-16 12:17:45 +08:00

23 lines
967 B
C#

using MAX.Core.DependencyInjection;
using Store.Management.Api;
using Store.Management.Api.Models;
using Store.Management.Api.Shops;
using Store.Management.Models;
namespace Store.Management.Framework.Services;
public interface IShopService
{
Task<IReadOnlyList<ShopCookieInfo>> GetCookiesAsync(string shopId, CancellationToken cancellationToken = default);
Task<PageResult<ShopInfo>> SearchAsync(ShopQueryRequest request, CancellationToken cancellationToken = default);
}
internal sealed class ShopService(StoreApiClient client) : IShopService, ISingletonDependency
{
public Task<IReadOnlyList<ShopCookieInfo>> GetCookiesAsync(string shopId, CancellationToken cancellationToken = default)
=> client.Shops.GetCookiesAsync(shopId, cancellationToken);
public Task<PageResult<ShopInfo>> SearchAsync(ShopQueryRequest request, CancellationToken cancellationToken = default)
=> client.Shops.SearchAsync(request, cancellationToken);
}