【新增】新增根据不同类型获取商品的接口。类型包含(新品,评论数,销量,价格,推荐,特价优惠,综合销量)

This commit is contained in:
大灰灰
2022-11-28 06:09:48 +08:00
parent 7c6759a8ae
commit 7e9963541b
8 changed files with 289 additions and 1 deletions

View File

@@ -1014,7 +1014,7 @@ namespace CoreCms.Net.Services
string orderBy = "", int pageIndex = 1, int pageSize = 20, bool blUseNoLock = false)
{
return await _dal.QueryPageByDTOAsync(predicate, orderBy, pageIndex, pageSize, blUseNoLock);
}
}
#endregion
/// <summary>
@@ -1118,5 +1118,20 @@ namespace CoreCms.Net.Services
}
/// <summary>
/// 根据类型获取商品数据用于PCH5
/// </summary>
/// <param name="predicate">条件表达式树</param>
/// <param name="take">获取数量</param>
/// <param name="orderByPredicate">排序字段</param>
/// <param name="orderByType">排序顺序</param>
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
/// <param name="isDataCache">是否缓存</param>
/// <param name="cacheTimes">缓存时间(分钟)</param>
public async Task<List<GoodListDTO>> QueryListByTypeAsync(Expression<Func<GoodListDTO, bool>> predicate, int take, Expression<Func<GoodListDTO, object>> orderByPredicate, OrderByType orderByType,
bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue)
{
return await _dal.QueryListByTypeAsync(predicate, take, orderByPredicate, orderByType, blUseNoLock, isDataCache, cacheTimes);
}
}
}