# 2022-02-24

### 1.3.7 开源社区版:
无
### 0.2.4 会员专业版:
【新增】数据库sku表【CoreCmsProducts】增加"积分可抵扣金额"【pointsDeduction】字段
【新增】商品sku新增最高抵扣金额功能,可通过积分进行价格抵扣,实现单品使用【积分+价格】的购买模式。与订单积分折扣并存。
【新增】积分新增积分模式功能,分为全局计算和单品计算,【全局计算】是指直接对订单按照使用比例进行计算,【单品计算】是指根据单个商品下sku独立设置的最高可抵扣金额进行计算。
【新增】积分新增显示积分组合兑换价功能,勾选显示,将在商品详情,购物车等界面显示积分加价格的效果。
【新增】积分新增显示名称功能,前端可改名积分显示名称为自定义,如:金豆,衡豆等。
【新增】商品列表页面、购物车界面、下单界面、商品详情界面新增积分新增是否显示组合价功能,如果勾选,将显示【1000积分+25元换购】的内容。
【优化】当添加视频后,默认采用商品封面图作为视频底图,防止视频大小差异出现黑边或预加载中黑屏的问题。
【优化】商品列表展示列表去除padding留白效果。
【优化】优化form表单redio和checkBox选项分行显示的问题。
【修复】修复拼团分享页面倒计时识别失败的问题,修复拼团分享页面分享按钮点击失败的问题。#I4QWDH #I4QWFC
This commit is contained in:
JianWeie
2022-02-24 02:16:41 +08:00
parent 289c3fc5a1
commit 53b16cfeab
31 changed files with 605 additions and 207 deletions

View File

@@ -186,6 +186,7 @@ namespace CoreCms.Net.Repository
obj.weight = p.weight;
obj.freezeStock = 0;
obj.spesDesc = p.spesDesc;
obj.pointsDeduction = p.pointsDeduction;
obj.isDefalut = p.isDefalut;
obj.isDel = false;
products.Add(obj);
@@ -233,6 +234,7 @@ namespace CoreCms.Net.Repository
obj.weight = oldObj.weight;
obj.freezeStock = 0;
obj.spesDesc = oldObj.spesDesc;
obj.pointsDeduction = oldObj.pointsDeduction;
obj.isDefalut = true;
obj.isDel = false;
if (string.IsNullOrEmpty(obj.images) || !obj.images.Contains(".jpg"))
@@ -514,11 +516,13 @@ namespace CoreCms.Net.Repository
p.mktprice = child.mktprice;
p.price = child.price;
p.spesDesc = child.spesDesc;
p.pointsDeduction = child.pointsDeduction;
p.stock = child.stock;
p.weight = child.weight;
}
});
oldDistributions.ForEach(o =>
{
var oldPost = oldPostProducts.Find(p => p.id == o.productsId);
@@ -578,7 +582,6 @@ namespace CoreCms.Net.Repository
}
}
}
}
else
@@ -607,6 +610,7 @@ namespace CoreCms.Net.Repository
obj.weight = p.weight;
obj.freezeStock = 0;
obj.spesDesc = p.spesDesc;
obj.pointsDeduction = p.pointsDeduction;
obj.isDefalut = p.isDefalut;
obj.images = p.images;
if (string.IsNullOrEmpty(p.images) || !p.images.Contains(".jpg"))
@@ -661,6 +665,7 @@ namespace CoreCms.Net.Repository
obj.marketable = true;
obj.stock = newObj.stock;
obj.weight = newObj.weight;
obj.pointsDeduction = newObj.pointsDeduction;
obj.images = newObj.images;
obj.isDefalut = true;
obj.isDel = false;
@@ -690,6 +695,7 @@ namespace CoreCms.Net.Repository
obj.marketable = true;
obj.stock = newObj.stock;
obj.weight = newObj.weight;
obj.pointsDeduction = newObj.pointsDeduction;
obj.freezeStock = 0;
obj.spesDesc = "";
obj.isDefalut = true;
@@ -911,6 +917,7 @@ namespace CoreCms.Net.Repository
mktprice = pd.mktprice,
stock = pd.stock,
freezeStock = pd.freezeStock,
pointsDeduction = pd.pointsDeduction,
weight = pd.weight
})
.MergeTable()
@@ -973,6 +980,7 @@ namespace CoreCms.Net.Repository
mktprice = pd.mktprice,
stock = pd.stock,
freezeStock = pd.freezeStock,
pointsDeduction = pd.pointsDeduction,
weight = pd.weight
})
.MergeTable()
@@ -1045,6 +1053,7 @@ namespace CoreCms.Net.Repository
price = pd.price,
costprice = pd.costprice,
mktprice = pd.mktprice,
pointsDeduction = pd.pointsDeduction,
stock = pd.stock,
freezeStock = pd.freezeStock,
weight = pd.weight
@@ -1095,6 +1104,7 @@ namespace CoreCms.Net.Repository
price = pd.price,
costprice = pd.costprice,
mktprice = pd.mktprice,
pointsDeduction = pd.pointsDeduction,
stock = pd.stock,
freezeStock = pd.freezeStock,
weight = pd.weight
@@ -1169,6 +1179,7 @@ namespace CoreCms.Net.Repository
mktprice = pd.mktprice,
stock = pd.stock,
freezeStock = pd.freezeStock,
pointsDeduction = pd.pointsDeduction,
weight = pd.weight
})
.With(SqlWith.NoLock)
@@ -1221,6 +1232,7 @@ namespace CoreCms.Net.Repository
mktprice = pd.mktprice,
stock = pd.stock,
freezeStock = pd.freezeStock,
pointsDeduction = pd.pointsDeduction,
weight = pd.weight
})
.MergeTable()
@@ -1246,12 +1258,6 @@ namespace CoreCms.Net.Repository
public new async Task<List<CoreCmsGoods>> QueryListByClauseAsync(Expression<Func<CoreCmsGoods, bool>> predicate, int take,
Expression<Func<CoreCmsGoods, object>> orderByPredicate, OrderByType orderByType, bool blUseNoLock = false)
{
//return blUseNoLock
// ? await DbBaseClient.Queryable<T>().OrderByIF(orderByPredicate != null, orderByPredicate, orderByType)
// .WhereIF(predicate != null, predicate).Take(take).With(SqlWith.NoLock).ToListAsync()
// : await DbBaseClient.Queryable<T>().OrderByIF(orderByPredicate != null, orderByPredicate, orderByType)
// .WhereIF(predicate != null, predicate).Take(take).ToListAsync();
List<CoreCmsGoods> page;
if (blUseNoLock)
{
@@ -1297,6 +1303,7 @@ namespace CoreCms.Net.Repository
mktprice = pd.mktprice,
stock = pd.stock,
freezeStock = pd.freezeStock,
pointsDeduction = pd.pointsDeduction,
weight = pd.weight
})
.With(SqlWith.NoLock)
@@ -1349,6 +1356,7 @@ namespace CoreCms.Net.Repository
mktprice = pd.mktprice,
stock = pd.stock,
freezeStock = pd.freezeStock,
pointsDeduction = pd.pointsDeduction,
weight = pd.weight
})
.MergeTable()
@@ -1417,6 +1425,7 @@ namespace CoreCms.Net.Repository
mktprice = pd.mktprice,
stock = pd.stock,
freezeStock = pd.freezeStock,
pointsDeduction = pd.pointsDeduction,
weight = pd.weight
})
.With(SqlWith.NoLock)
@@ -1469,6 +1478,7 @@ namespace CoreCms.Net.Repository
mktprice = pd.mktprice,
stock = pd.stock,
freezeStock = pd.freezeStock,
pointsDeduction = pd.pointsDeduction,
weight = pd.weight
})
.MergeTable()
@@ -1481,9 +1491,9 @@ namespace CoreCms.Net.Repository
}
#endregion
#region
#region
/// <summary>
/// 根据条件查询分页数据
/// 重写根据条件及自定义排序查询分页数据
/// </summary>
/// <param name="predicate"></param>
/// <param name="orderBy"></param>
@@ -1540,6 +1550,7 @@ namespace CoreCms.Net.Repository
mktprice = pd.mktprice,
stock = pd.stock,
freezeStock = pd.freezeStock,
pointsDeduction = pd.pointsDeduction,
weight = pd.weight
})
.With(SqlWith.NoLock)
@@ -1592,6 +1603,7 @@ namespace CoreCms.Net.Repository
mktprice = pd.mktprice,
stock = pd.stock,
freezeStock = pd.freezeStock,
pointsDeduction = pd.pointsDeduction,
weight = pd.weight
})
.MergeTable()
@@ -1608,7 +1620,6 @@ namespace CoreCms.Net.Repository
#endregion
#region
/// <summary>
/// 根据条件查询代理池商品分页数据
@@ -1668,6 +1679,7 @@ namespace CoreCms.Net.Repository
mktprice = pd.mktprice,
stock = pd.stock,
freezeStock = pd.freezeStock,
pointsDeduction = pd.pointsDeduction,
weight = pd.weight
})
.With(SqlWith.NoLock)
@@ -1720,6 +1732,7 @@ namespace CoreCms.Net.Repository
mktprice = pd.mktprice,
stock = pd.stock,
freezeStock = pd.freezeStock,
pointsDeduction = pd.pointsDeduction,
weight = pd.weight
})
.MergeTable()

View File

@@ -20,6 +20,7 @@ using CoreCms.Net.Model.Entities;
using CoreCms.Net.Model.ViewModels.Basics;
using CoreCms.Net.Model.ViewModels.UI;
using CoreCms.Net.Utility.Extensions;
using SqlSugar;
namespace CoreCms.Net.Repository
@@ -111,25 +112,26 @@ namespace CoreCms.Net.Repository
List<CoreCmsProducts> page;
if (blUseNoLock)
{
page = await DbClient.Queryable<CoreCmsProducts, CoreCmsGoods>((p, good) => new JoinQueryInfos(
JoinType.Left, p.goodsId == good.id))
.Select((p, good) => new CoreCmsProducts
page = await DbClient.Queryable<CoreCmsGoods, CoreCmsProducts>((good, product) => new JoinQueryInfos(
JoinType.Inner, good.id == product.goodsId))
.Select((good, product) => new CoreCmsProducts
{
id = p.id,
goodsId = p.goodsId,
barcode = p.barcode,
sn = p.sn,
price = p.price,
costprice = p.costprice,
mktprice = p.mktprice,
marketable = p.marketable,
weight = p.weight,
stock = p.stock,
freezeStock = p.freezeStock,
spesDesc = p.spesDesc,
isDefalut = p.isDefalut,
images = p.images,
isDel = p.isDel,
id = product.id,
goodsId = product.goodsId,
barcode = product.barcode,
sn = product.sn,
price = product.price,
costprice = product.costprice,
mktprice = product.mktprice,
marketable = product.marketable,
weight = product.weight,
stock = product.stock,
freezeStock = product.freezeStock,
pointsDeduction = product.pointsDeduction,
spesDesc = product.spesDesc,
isDefalut = product.isDefalut,
images = product.images,
isDel = good.isDel,
name = good.name,
bn = good.bn,
isMarketable = good.isMarketable,
@@ -142,25 +144,26 @@ namespace CoreCms.Net.Repository
}
else
{
page = await DbClient.Queryable<CoreCmsProducts, CoreCmsGoods>((p, good) => new JoinQueryInfos(
JoinType.Left, p.goodsId == good.id))
.Select((p, good) => new CoreCmsProducts
page = await DbClient.Queryable<CoreCmsGoods, CoreCmsProducts>((good, product) => new JoinQueryInfos(
JoinType.Inner, good.id == product.goodsId))
.Select((good, product) => new CoreCmsProducts
{
id = p.id,
goodsId = p.goodsId,
barcode = p.barcode,
sn = p.sn,
price = p.price,
costprice = p.costprice,
mktprice = p.mktprice,
marketable = p.marketable,
weight = p.weight,
stock = p.stock,
freezeStock = p.freezeStock,
spesDesc = p.spesDesc,
isDefalut = p.isDefalut,
images = p.images,
isDel = p.isDel,
id = product.id,
goodsId = product.goodsId,
barcode = product.barcode,
sn = product.sn,
price = product.price,
costprice = product.costprice,
mktprice = product.mktprice,
marketable = product.marketable,
weight = product.weight,
stock = product.stock,
freezeStock = product.freezeStock,
pointsDeduction = product.pointsDeduction,
spesDesc = product.spesDesc,
isDefalut = product.isDefalut,
images = product.images,
isDel = good.isDel,
name = good.name,
bn = good.bn,
isMarketable = good.isMarketable,
@@ -204,6 +207,7 @@ namespace CoreCms.Net.Repository
weight = p.weight,
stock = p.stock,
freezeStock = p.freezeStock,
pointsDeduction = p.pointsDeduction,
spesDesc = p.spesDesc,
isDefalut = p.isDefalut,
images = p.images,
@@ -309,6 +313,7 @@ namespace CoreCms.Net.Repository
weight = p.weight,
stock = p.stock,
freezeStock = p.freezeStock,
pointsDeduction = p.pointsDeduction,
spesDesc = p.spesDesc,
isDefalut = p.isDefalut,
images = p.images,