### 0.6.0 专业版(大版本升级,破坏性升级,请酌情处理):

【新增】弃用现在sku前端,启用全新sku组件,更加灵活,体验更好。
【新增】新增通过商品序列获取sku全新列表功能。
【新增】仓储层底层增加二级缓存功能,后面将逐步完善底层缓存中心模块。
【新增】0元购,积分兑换模式下,也去计算用户是否科技升级。
【新增】数据及业务仓储增加二级缓存功能。curd可自主控制是否缓存和清除。
【新增】订单导出excel数据增加商品名称+货品sku组合展示的方式。
【新增】自定义交易组件增加【获取商家信息】【更新商家信息】两个接口处理。
【新增】增加公告列表及公告详情页面,首页组件公告点击跳转列表展示。
【新增】个人中心增加【公告中心】入口。
【新增】后台余额变动增加说明录入。

【调整】将前端能进行分包的文件夹都进行分包,减少主包占用,方便进行二开。
【调整】因ckeditor5存在图片不可设置宽度,上传不支持mp4,排版不畅等情况,降级使用ckeditor4版本。
【修复】修复0.5.5版本售后积分返还机制积分模式判断异常的问题。
【修复】修复使用积分全额抵扣,或其他优惠政策导致的0元购,未进行短信提醒及小票打印机未打印的问题。
【修复】修复更换ckeditor4编辑器后接龙添加编辑调用失败的问题。
【修复】修复积分全额抵扣,金额0元购的情况下,进行售后执行完毕,订单未完结的情况。
【优化】去除分销申请面板按钮无用并失效报错的customStyle属性。
【优化】优化部分方法中使用手写字符串的遗留问题,统一采用enum方式。
【优化】优化前端及接口部分命名错误的问题。错将skill误写成seckill。
【优化】去除uniapp端多个客服代码。
【优化】商品详情底部完善购物车数量显示的问题。
【优化】优化团购列表,拼团列表,秒杀页面页面样式布局差异问题。
【优化】调整支付结果界面样式效果,仿微信支付结果界面。更加清晰明朗。
【优化】优化售后提交页面json计算,开放当用户下单后但未发货情况下,可以申请直接售后的操作需求。
【优化】后台商家手机号码支持设置多个,使用小写逗号分隔,方便多个商家管理员接收下单提醒。
【优化】后台售后单审核,调整售后商品为必选项。
This commit is contained in:
大灰灰
2022-09-14 00:53:04 +08:00
parent 6ce893cb38
commit 7b68f352d7
3118 changed files with 161226 additions and 10176 deletions

View File

@@ -13,7 +13,6 @@ using System.Threading.Tasks;
using CoreCms.Net.Caching.Manual;
using CoreCms.Net.Configuration;
using CoreCms.Net.Model.Entities;
using CoreCms.Net.Model.ViewModels.Basics;
using CoreCms.Net.IRepository;
using CoreCms.Net.IRepository.UnitOfWork;
using CoreCms.Net.Model.ViewModels.UI;
@@ -37,16 +36,13 @@ namespace CoreCms.Net.Repository
/// </summary>
/// <param name="entity">实体数据</param>
/// <returns></returns>
public new async Task<AdminUiCallBack> InsertAsync(CoreCmsGoodsCategory entity)
public async Task<AdminUiCallBack> InsertAsync(CoreCmsGoodsCategory entity)
{
var jm = new AdminUiCallBack();
var bl = await DbClient.Insertable(entity).ExecuteReturnIdentityAsync() > 0;
var bl = await DbClient.Insertable(entity).RemoveDataCache().ExecuteReturnIdentityAsync() > 0;
jm.code = bl ? 0 : 1;
jm.msg = bl ? GlobalConstVars.CreateSuccess : GlobalConstVars.CreateFailure;
if (bl)
{
await UpdateCaChe();
}
return jm;
}
@@ -55,38 +51,14 @@ namespace CoreCms.Net.Repository
/// </summary>
/// <param name="entity"></param>
/// <returns></returns>
public new async Task<AdminUiCallBack> UpdateAsync(CoreCmsGoodsCategory entity)
public async Task<AdminUiCallBack> UpdateAsync(CoreCmsGoodsCategory entity)
{
var jm = new AdminUiCallBack();
//事物处理过程结束
var bl = await DbClient.Updateable(entity).ExecuteCommandHasChangeAsync();
var bl = await DbClient.Updateable(entity).RemoveDataCache().ExecuteCommandHasChangeAsync();
jm.code = bl ? 0 : 1;
jm.msg = bl ? GlobalConstVars.EditSuccess : GlobalConstVars.EditFailure;
if (bl)
{
await UpdateCaChe();
}
return jm;
}
/// <summary>
/// 重写异步更新方法方法
/// </summary>
/// <param name="entity"></param>
/// <returns></returns>
public new async Task<AdminUiCallBack> UpdateAsync(List<CoreCmsGoodsCategory> entity)
{
var jm = new AdminUiCallBack();
var bl = await DbClient.Updateable(entity).ExecuteCommandHasChangeAsync();
jm.code = bl ? 0 : 1;
jm.msg = bl ? GlobalConstVars.EditSuccess : GlobalConstVars.EditFailure;
if (bl)
{
await UpdateCaChe();
}
return jm;
}
@@ -96,42 +68,17 @@ namespace CoreCms.Net.Repository
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public new async Task<AdminUiCallBack> DeleteByIdAsync(object id)
public async Task<AdminUiCallBack> DeleteByIdAsync(object id)
{
var jm = new AdminUiCallBack();
var bl = await DbClient.Deleteable<CoreCmsGoodsCategory>(id).ExecuteCommandHasChangeAsync();
var bl = await DbClient.Deleteable<CoreCmsGoodsCategory>(id).RemoveDataCache().ExecuteCommandHasChangeAsync();
jm.code = bl ? 0 : 1;
jm.msg = bl ? GlobalConstVars.DeleteSuccess : GlobalConstVars.DeleteFailure;
if (bl)
{
await UpdateCaChe();
}
return jm;
}
/// <summary>
/// 重写删除指定ID集合的数据(批量删除)
/// </summary>
/// <param name="ids"></param>
/// <returns></returns>
public new async Task<AdminUiCallBack> DeleteByIdsAsync(int[] ids)
{
var jm = new AdminUiCallBack();
var bl = await DbClient.Deleteable<CoreCmsGoodsCategory>().In(ids).ExecuteCommandHasChangeAsync();
jm.code = bl ? 0 : 1;
jm.msg = bl ? GlobalConstVars.DeleteSuccess : GlobalConstVars.DeleteFailure;
if (bl)
{
await UpdateCaChe();
}
return jm;
}
#endregion
#region ==========================================================
@@ -142,21 +89,7 @@ namespace CoreCms.Net.Repository
/// <returns></returns>
public async Task<List<CoreCmsGoodsCategory>> GetCaChe()
{
var cache = ManualDataCache.Instance.Get<List<CoreCmsGoodsCategory>>(GlobalConstVars.CacheCoreCmsGoodsCategory);
if (cache != null)
{
return cache;
}
return await UpdateCaChe();
}
/// <summary>
/// 更新cache
/// </summary>
private async Task<List<CoreCmsGoodsCategory>> UpdateCaChe()
{
var list = await DbClient.Queryable<CoreCmsGoodsCategory>().With(SqlWith.NoLock).ToListAsync();
ManualDataCache.Instance.Set(GlobalConstVars.CacheCoreCmsGoodsCategory, list);
var list = await DbClient.Queryable<CoreCmsGoodsCategory>().With(SqlWith.NoLock).WithCache().ToListAsync();
return list;
}

View File

@@ -15,9 +15,9 @@ using System.Threading.Tasks;
using CoreCms.Net.Caching.Manual;
using CoreCms.Net.Configuration;
using CoreCms.Net.Model.Entities;
using CoreCms.Net.Model.ViewModels.Basics;
using CoreCms.Net.IRepository;
using CoreCms.Net.IRepository.UnitOfWork;
using CoreCms.Net.Model.ViewModels.Basics;
using CoreCms.Net.Model.ViewModels.UI;
using SqlSugar;
@@ -34,28 +34,12 @@ namespace CoreCms.Net.Repository
#region ==========================================================
/// <summary>
/// 重写异步插入方法
/// </summary>
/// <param name="entity">实体数据</param>
/// <returns></returns>
public new async Task<AdminUiCallBack> InsertAsync(CoreCmsGoodsComment entity)
{
var jm = new AdminUiCallBack();
var bl = await DbClient.Insertable(entity).ExecuteReturnIdentityAsync() > 0;
jm.code = bl ? 0 : 1;
jm.msg = bl ? GlobalConstVars.CreateSuccess : GlobalConstVars.CreateFailure;
return jm;
}
/// <summary>
/// 重写异步更新方法
/// </summary>
/// <param name="entity"></param>
/// <returns></returns>
public new async Task<AdminUiCallBack> UpdateAsync(CoreCmsGoodsComment entity)
public async Task<AdminUiCallBack> UpdateAsync(CoreCmsGoodsComment entity)
{
var jm = new AdminUiCallBack();
@@ -87,28 +71,12 @@ namespace CoreCms.Net.Repository
return jm;
}
/// <summary>
/// 重写异步更新方法
/// </summary>
/// <param name="entity"></param>
/// <returns></returns>
public new async Task<AdminUiCallBack> UpdateAsync(List<CoreCmsGoodsComment> entity)
{
var jm = new AdminUiCallBack();
var bl = await DbClient.Updateable(entity).ExecuteCommandHasChangeAsync();
jm.code = bl ? 0 : 1;
jm.msg = bl ? GlobalConstVars.EditSuccess : GlobalConstVars.EditFailure;
return jm;
}
/// <summary>
/// 重写删除指定ID的数据
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public new async Task<AdminUiCallBack> DeleteByIdAsync(object id)
public async Task<AdminUiCallBack> DeleteByIdAsync(object id)
{
var jm = new AdminUiCallBack();
@@ -119,22 +87,6 @@ namespace CoreCms.Net.Repository
return jm;
}
/// <summary>
/// 重写删除指定ID集合的数据(批量删除)
/// </summary>
/// <param name="ids"></param>
/// <returns></returns>
public new async Task<AdminUiCallBack> DeleteByIdsAsync(int[] ids)
{
var jm = new AdminUiCallBack();
var bl = await DbClient.Deleteable<CoreCmsGoodsComment>().In(ids).ExecuteCommandHasChangeAsync();
jm.code = bl ? 0 : 1;
jm.msg = bl ? GlobalConstVars.DeleteSuccess : GlobalConstVars.DeleteFailure;
return jm;
}
#endregion
@@ -144,7 +96,7 @@ namespace CoreCms.Net.Repository
/// <param name="id">序列</param>
/// <param name="sellerContent">回复内容</param>
/// <returns></returns>
public async Task<AdminUiCallBack> Reply(int id,string sellerContent)
public async Task<AdminUiCallBack> Reply(int id, string sellerContent)
{
var jm = new AdminUiCallBack();
@@ -225,7 +177,7 @@ namespace CoreCms.Net.Repository
/// <param name="orderByExpression"></param>
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
/// <returns></returns>
public new async Task<IPageList<CoreCmsGoodsComment>> QueryPageAsync(Expression<Func<CoreCmsGoodsComment, bool>> predicate,
public async Task<IPageList<CoreCmsGoodsComment>> QueryPageAsync(Expression<Func<CoreCmsGoodsComment, bool>> predicate,
Expression<Func<CoreCmsGoodsComment, object>> orderByExpression, OrderByType orderByType, int pageIndex = 1,
int pageSize = 20, bool blUseNoLock = false)
{

View File

@@ -742,7 +742,7 @@ namespace CoreCms.Net.Repository
/// </summary>
/// <param name="ids"></param>
/// <returns></returns>
public new async Task<AdminUiCallBack> DeleteByIdsAsync(int[] ids)
public async Task<AdminUiCallBack> DeleteByIdsAsync(int[] ids)
{
var jm = new AdminUiCallBack();
@@ -1144,7 +1144,7 @@ namespace CoreCms.Net.Repository
/// <param name="orderByExpression"></param>
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
/// <returns></returns>
public new async Task<IPageList<CoreCmsGoods>> QueryPageAsync(Expression<Func<CoreCmsGoods, bool>> predicate,
public async Task<IPageList<CoreCmsGoods>> QueryPageAsync(Expression<Func<CoreCmsGoods, bool>> predicate,
Expression<Func<CoreCmsGoods, object>> orderByExpression, OrderByType orderByType, int pageIndex = 1,
int pageSize = 20, bool blUseNoLock = false)
{
@@ -1274,7 +1274,7 @@ namespace CoreCms.Net.Repository
/// <param name="orderByType">排序顺序</param>
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
/// <returns></returns>
public new async Task<List<CoreCmsGoods>> QueryListByClauseAsync(Expression<Func<CoreCmsGoods, bool>> predicate, int take,
public async Task<List<CoreCmsGoods>> QueryListByClauseAsync(Expression<Func<CoreCmsGoods, bool>> predicate, int take,
Expression<Func<CoreCmsGoods, object>> orderByPredicate, OrderByType orderByType, bool blUseNoLock = false)
{
List<CoreCmsGoods> page;
@@ -1400,7 +1400,7 @@ namespace CoreCms.Net.Repository
/// <param name="orderBy"></param>
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
/// <returns></returns>
public new async Task<List<CoreCmsGoods>> QueryListByClauseAsync(Expression<Func<CoreCmsGoods, bool>> predicate, string orderBy = "",
public async Task<List<CoreCmsGoods>> QueryListByClauseAsync(Expression<Func<CoreCmsGoods, bool>> predicate, string orderBy = "",
bool blUseNoLock = false)
{
List<CoreCmsGoods> page;
@@ -1528,7 +1528,7 @@ namespace CoreCms.Net.Repository
/// <param name="pageSize">分布大小</param>
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
/// <returns></returns>
public new async Task<IPageList<CoreCmsGoods>> QueryPageAsync(Expression<Func<CoreCmsGoods, bool>> predicate, string orderBy = "",
public async Task<IPageList<CoreCmsGoods>> QueryPageAsync(Expression<Func<CoreCmsGoods, bool>> predicate, string orderBy = "",
int pageIndex = 1, int pageSize = 20, bool blUseNoLock = false)
{
RefAsync<int> totalCount = 0;
@@ -1781,7 +1781,6 @@ namespace CoreCms.Net.Repository
}
#endregion
#region sku分页数据
@@ -1840,11 +1839,11 @@ namespace CoreCms.Net.Repository
isDel = good.isDel,
initialSales = good.initialSales,
})
.Mapper(p => p.sku, p => p.sku.First().goodsId)
.Mapper(it =>
{
it.sku = it.sku.Where(o => o.isDel == false).ToList();
})
//.Mapper(p => p.sku, p => p.sku.First().goodsId)
//.Mapper(it =>
//{
// it.sku = it.sku.Where(o => o.isDel == false).ToList();
//})
.With(SqlWith.NoLock)
.OrderByIF(orderByExpression != null, orderByExpression, orderByType)
.WhereIF(predicate != null, predicate)
@@ -1889,11 +1888,11 @@ namespace CoreCms.Net.Repository
isDel = good.isDel,
initialSales = good.initialSales,
})
.Mapper(p => p.sku, p => p.sku.First().goodsId)
.Mapper(it =>
{
it.sku = it.sku.Where(o => o.isDel == false).ToList();
})
//.Mapper(p => p.sku, p => p.sku.First().goodsId)
//.Mapper(it =>
//{
// it.sku = it.sku.Where(o => o.isDel == false).ToList();
//})
.OrderByIF(orderByExpression != null, orderByExpression, orderByType)
.WhereIF(predicate != null, predicate)
.ToPageListAsync(pageIndex, pageSize, totalCount);

View File

@@ -64,24 +64,12 @@ namespace CoreCms.Net.Repository
var goodsTypeSpec = new CoreCmsGoodsTypeSpec();
goodsTypeSpec.name = entity.name;
goodsTypeSpec.sort = entity.sort;
var specId = await DbClient.Insertable(goodsTypeSpec).ExecuteReturnIdentityAsync();
if (specId > 0 && entity.value != null && entity.value.Count > 0)
{
var list = new List<CoreCmsGoodsTypeSpecValue>();
for (var index = 0; index < entity.value.Count; index++)
{
var item = entity.value[index];
list.Add(new CoreCmsGoodsTypeSpecValue()
{
specId = specId,
value = item,
sort = index + 1
});
}
var bl = await DbClient.Insertable(list).ExecuteCommandAsync() > 0;
jm.code = bl ? 0 : 1;
jm.msg = bl ? GlobalConstVars.CreateSuccess : GlobalConstVars.CreateFailure;
}
var specId = await DbClient.Insertable(goodsTypeSpec).RemoveDataCache().ExecuteReturnIdentityAsync();
if (specId <= 0 || entity.value is not { Count: > 0 }) return jm;
var list = entity.value.Select((item, index) => new CoreCmsGoodsTypeSpecValue() { specId = specId, value = item, sort = index + 1 }).ToList();
var bl = await DbClient.Insertable(list).RemoveDataCache().ExecuteCommandAsync() > 0;
jm.code = bl ? 0 : 1;
jm.msg = bl ? GlobalConstVars.CreateSuccess : GlobalConstVars.CreateFailure;
return jm;
@@ -119,16 +107,15 @@ namespace CoreCms.Net.Repository
}
oldModel.name = entity.name;
oldModel.sort = entity.sort;
var bl = await DbClient.Updateable(oldModel).ExecuteCommandHasChangeAsync();
var bl = await DbClient.Updateable(oldModel).RemoveDataCache().ExecuteCommandHasChangeAsync();
if (bl)
{
var oldValues = await DbClient.Queryable<CoreCmsGoodsTypeSpecValue>().OrderBy(p => p.sort)
.Where(p => p.specId == oldModel.id).ToListAsync();
var oldValues = await DbClient.Queryable<CoreCmsGoodsTypeSpecValue>().OrderBy(p => p.sort).Where(p => p.specId == oldModel.id).ToListAsync();
//获取需要删除的数据库数据
var deleteValues = oldValues.Where(p => !entity.value.Contains(p.value)).ToList();
//删除旧数据
if (deleteValues.Any()) bl = await DbClient.Deleteable<CoreCmsGoodsTypeSpecValue>(deleteValues).ExecuteCommandHasChangeAsync();
if (deleteValues.Any()) bl = await DbClient.Deleteable<CoreCmsGoodsTypeSpecValue>(deleteValues).RemoveDataCache().ExecuteCommandHasChangeAsync();
//新数据
var values = oldValues.Select(p => p.value).ToList();
@@ -138,7 +125,7 @@ namespace CoreCms.Net.Repository
if (newValues.Any())
{
var newList = newValues.Select((t, index) => new CoreCmsGoodsTypeSpecValue() { specId = oldModel.id, value = t, sort = oldValues.Count + index }).ToList();
bl = await DbClient.Insertable<CoreCmsGoodsTypeSpecValue>(newList).ExecuteCommandAsync() > 0;
bl = await DbClient.Insertable<CoreCmsGoodsTypeSpecValue>(newList).RemoveDataCache().ExecuteCommandAsync() > 0;
}
}
jm.code = bl ? 0 : 1;
@@ -153,16 +140,16 @@ namespace CoreCms.Net.Repository
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public new async Task<AdminUiCallBack> DeleteByIdAsync(object id)
public async Task<AdminUiCallBack> DeleteByIdAsync(object id)
{
var jm = new AdminUiCallBack();
var bl = await DbClient.Deleteable<CoreCmsGoodsTypeSpec>(id).ExecuteCommandHasChangeAsync();
var bl = await DbClient.Deleteable<CoreCmsGoodsTypeSpec>(id).RemoveDataCache().ExecuteCommandHasChangeAsync();
jm.code = bl ? 0 : 1;
jm.msg = bl ? GlobalConstVars.DeleteSuccess : GlobalConstVars.DeleteFailure;
if (bl)
{
await DbClient.Deleteable<CoreCmsGoodsTypeSpecValue>(p => p.specId == (int)id).ExecuteCommandHasChangeAsync();
await DbClient.Deleteable<CoreCmsGoodsTypeSpecValue>(p => p.specId == (int)id).RemoveDataCache().ExecuteCommandHasChangeAsync();
}
return jm;

View File

@@ -14,10 +14,8 @@ using System.Threading.Tasks;
using CoreCms.Net.Caching.Manual;
using CoreCms.Net.Configuration;
using CoreCms.Net.Model.Entities;
using CoreCms.Net.Model.ViewModels.Basics;
using CoreCms.Net.IRepository;
using CoreCms.Net.IRepository.UnitOfWork;
using CoreCms.Net.Model.ViewModels.UI;
namespace CoreCms.Net.Repository
{