【新增】增加商品列表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

@@ -18,6 +18,7 @@ using System.Threading.Tasks;
using AutoMapper;
using CoreCms.Net.Auth.HttpContextUser;
using CoreCms.Net.Configuration;
using CoreCms.Net.DTO.ComponentsDTO;
using CoreCms.Net.IServices;
using CoreCms.Net.Model.Entities;
using CoreCms.Net.Model.Entities.Expression;
@@ -150,9 +151,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
{
var jm = new WebApiCallBack();
var where = PredicateBuilder.True<CoreCmsGoods>();
where = where.And(p => p.isDel == false);
where = where.And(p => p.isMarketable == true);
var where = PredicateBuilder.True<GoodListDTO>();
var className = string.Empty;
if (!string.IsNullOrWhiteSpace(entity.where))
@@ -224,14 +223,8 @@ namespace CoreCms.Net.Web.WebApi.Controllers
orderBy += "," + entity.order;
}
//获取数据
var list = await _goodsServices.QueryPageAsync(where, orderBy, entity.page, entity.limit, false);
if (list.Any())
{
foreach (var goods in list)
{
goods.images = !string.IsNullOrEmpty(goods.images) ? goods.images.Split(",")[0] : "/static/images/common/empty.png";
}
}
var list = await _goodsServices.QueryPageByDTOAsync(where, orderBy, entity.page, entity.limit, true);
//获取品牌
var brands = await _brandServices.QueryListByClauseAsync(p => p.isShow == true, p => p.sort, OrderByType.Desc, true, true);