暂时提交
This commit is contained in:
1 parent
5d017740c6
commit
b35f816a87
7 files changed
+96
-2
No files matched your search
@@ -17,6 +17,9 @@ namespace Store.Shops.Repositories
|
||||
/// <param name="ShopId"></param>
|
||||
/// <returns></returns>
|
||||
DateTime GetExpireTime(string ShopId);
|
||||
|
||||
/// <summary>批量读取店铺到期记录;未找到的店铺不返回记录,供列表补充到期信息。</summary>
|
||||
Task<List<ShopExpireEntity>> GetExpireTimes(string[] shopIds, CancellationToken cancellationToken = default);
|
||||
}
|
||||
internal class ShopRepository : BaseRepository<ShopEntity>, IShopRepository, ITransientDependency
|
||||
{
|
||||
@@ -27,6 +30,10 @@ namespace Store.Shops.Repositories
|
||||
_freeSql = freeSql;
|
||||
}
|
||||
|
||||
/// <summary>集中列表使用的到期查询,保持一次批量读取;续费事务仍使用事务内 ORM。</summary>
|
||||
public Task<List<ShopExpireEntity>> GetExpireTimes(string[] shopIds, CancellationToken cancellationToken = default)
|
||||
=> _freeSql.Select<ShopExpireEntity>().Where(e => shopIds.Contains(e.ShopId)).ToListAsync(cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// 获取用户商铺过期时间
|
||||
/// </summary>
|
||||
|
||||
Reference in new issue
Block a user