mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 18:03:27 +08:00
【新增】新增根据不同类型获取商品的接口。类型包含(新品,评论数,销量,价格,推荐,特价优惠,综合销量)
This commit is contained in:
@@ -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>
|
||||
/// 根据类型获取商品数据(用于PC,H5)
|
||||
/// </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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user