mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 17:03:27 +08:00
【修复】修复商品下架后,购物车未清理缓存,导致商品还存在购物车可以下单跳转的情况。
【修复】修复商品下架或者删除后,我的足迹统计数据不准确的问题。
This commit is contained in:
@@ -28,6 +28,21 @@ namespace CoreCms.Net.Repository
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据用户序列获取用户的足迹数量
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
|
||||
public async Task<int> GetUserCountAsync(int userId)
|
||||
{
|
||||
var count = await DbClient.Queryable<CoreCmsGoodsBrowsing, CoreCmsGoods>((gb, goods) =>
|
||||
new JoinQueryInfos(JoinType.Left, gb.goodsId == goods.id))
|
||||
.Where((gb, goods) => goods.isDel == false && goods.isMarketable == true && gb.userId == userId).With(SqlWith.NoLock).CountAsync();
|
||||
return count;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 重写根据条件查询分页数据
|
||||
/// </summary>
|
||||
@@ -46,6 +61,7 @@ namespace CoreCms.Net.Repository
|
||||
RefAsync<int> totalCount = 0;
|
||||
var page = await DbClient.Queryable<CoreCmsGoodsBrowsing, CoreCmsGoods>((gb, goods) =>
|
||||
new JoinQueryInfos(JoinType.Left, gb.goodsId == goods.id))
|
||||
.Where((gb, goods) => goods.isDel == false && goods.isMarketable == true)
|
||||
.Select((gb, goods) => new CoreCmsGoodsBrowsing
|
||||
{
|
||||
id = gb.id,
|
||||
|
||||
Reference in New Issue
Block a user