增加商铺列表
This commit is contained in:
1 parent
d5232c581c
commit
440510aa8c
19 files changed
+734
-77
No files matched your search
@@ -0,0 +1,25 @@
|
||||
using RestSharp;
|
||||
using Store.Management.Api.Models;
|
||||
using Store.Management.Api.Transport;
|
||||
using Store.Management.Models;
|
||||
|
||||
namespace Store.Management.Api.Shops;
|
||||
|
||||
public sealed class ShopApi(ApiTransport transport)
|
||||
{
|
||||
/// <summary>按店铺 ID 获取 Cookie,仅在用户请求时读取。</summary>
|
||||
public Task<IReadOnlyList<ShopCookieInfo>> GetCookiesAsync(string shopId, CancellationToken cancellationToken = default)
|
||||
{
|
||||
ArgumentException.ThrowIfNullOrWhiteSpace(shopId);
|
||||
return transport.GetRequiredAsync<IReadOnlyList<ShopCookieInfo>>("shop/GetShopCookies", Method.Post,
|
||||
new { ShopIds = new[] { shopId } }, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>管理员分页查询商铺,筛选条件由服务端处理。</summary>
|
||||
public Task<PageResult<ShopInfo>> SearchAsync(ShopQueryRequest request, CancellationToken cancellationToken = default)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(request);
|
||||
return transport.GetRequiredAsync<PageResult<ShopInfo>>("shop/GetAllShops", Method.Post,
|
||||
request, cancellationToken: cancellationToken);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user