【新增】增加商品列表dto类及查询方法,首页【商品组件】【商品tab组】【仿点餐界面】【栏目列表页】【推荐商品列表】进行替换。

【优化】优化普通商品及营销商品内页不同dom之间间距。微调其他页面样式
【调整】移除.net5升级到.net6保留的startup.cs文件,使用program.cs
This commit is contained in:
大灰灰
2022-11-06 05:38:42 +08:00
parent 84fbcfffbd
commit 45877f0d5c
23 changed files with 1316 additions and 819 deletions

View File

@@ -12,6 +12,7 @@ using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Threading.Tasks;
using CoreCms.Net.DTO.ComponentsDTO;
using CoreCms.Net.Model.Entities;
using CoreCms.Net.Model.FromBody;
using CoreCms.Net.Model.ViewModels.Basics;
@@ -71,7 +72,7 @@ namespace CoreCms.Net.IRepository
/// <param name="number">数量</param>
/// <param name="isRecommend">是否推荐</param>
/// <returns></returns>
Task<List<CoreCmsGoods>> GetGoodsRecommendList(int number, bool isRecommend = false);
Task<List<GoodListDTO>> GetGoodsRecommendList(int number, bool isRecommend = false);
/// <summary>
/// 获取数据总数
@@ -137,6 +138,19 @@ namespace CoreCms.Net.IRepository
int pageSize = 20, bool blUseNoLock = false);
/// <summary>
/// 重写根据条件及自定义排序查询分页数据返回DTO
/// </summary>
/// <param name="predicate"></param>
/// <param name="orderBy"></param>
/// <param name="pageIndex">当前页面索引</param>
/// <param name="pageSize">分布大小</param>
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
/// <returns></returns>
Task<IPageList<GoodListDTO>> QueryPageByDTOAsync(Expression<Func<GoodListDTO, bool>> predicate,
string orderBy = "", int pageIndex = 1, int pageSize = 20, bool blUseNoLock = false);
/// <summary>
/// 根据条件查询代理池商品分页数据
/// </summary>
@@ -183,5 +197,35 @@ namespace CoreCms.Net.IRepository
Task<List<CoreCmsGoods>> QueryGoodWithDefaultProductAsync(Expression<Func<CoreCmsGoods, bool>> predicate,
Expression<Func<CoreCmsGoods, object>> orderByPredicate, OrderByType orderByType, bool blUseNoLock = false);
/// <summary>
/// 根据条件查询一定数量数据(用于组件)
/// </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>
/// <returns></returns>
Task<List<GoodListDTO>> QueryListByComponentsAsync(Expression<Func<GoodListDTO, bool>> predicate, int take,
Expression<Func<GoodListDTO, object>> orderByPredicate, OrderByType orderByType, bool blUseNoLock = false,
bool isDataCache = false, int cacheTimes = int.MaxValue);
/// <summary>
/// 根据条件查询一定数量数据(用于组件)
/// </summary>
/// <param name="predicate">条件表达式树</param>
/// <param name="take">获取数量</param>
/// <param name="orderByType">排序顺序</param>
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
/// <param name="isDataCache">是否缓存</param>
/// <param name="cacheTimes">缓存时间(分钟)</param>
/// <returns></returns>
Task<List<GoodListDTO>> QueryListByComponentsAsync(Expression<Func<GoodListDTO, bool>> predicate, int take, string orderByType = "", bool blUseNoLock = false,
bool isDataCache = false, int cacheTimes = int.MaxValue);
}
}