From 2b8131cc44458c28d8d36985a5e7aebeb3f69221 Mon Sep 17 00:00:00 2001 From: cjy Date: Fri, 9 Aug 2024 14:01:15 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=BA=8C=E7=B4=9A=E7=B7=A9=E5=AD=98?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Code/Method/CodeGoodsService.cs | 8 ++--- .../Code/Method/CodePackageService.cs | 12 +++---- .../Code/Method/CodeVesselService.cs | 10 +++--- .../Code/Method/CodeVoynoService.cs | 8 ++--- .../Info/Method/ClientInfoService.cs | 6 ++-- .../Sys/Method/ClientCommonService.cs | 32 +++++++++---------- .../DS.WMS.Core/Sys/Method/CommonService.cs | 2 +- .../DS.WMS.Core/Sys/Method/UserService.cs | 6 ++-- 8 files changed, 42 insertions(+), 42 deletions(-) diff --git a/ds-wms-service/DS.WMS.Core/Code/Method/CodeGoodsService.cs b/ds-wms-service/DS.WMS.Core/Code/Method/CodeGoodsService.cs index 09d79c58..a574d19a 100644 --- a/ds-wms-service/DS.WMS.Core/Code/Method/CodeGoodsService.cs +++ b/ds-wms-service/DS.WMS.Core/Code/Method/CodeGoodsService.cs @@ -103,7 +103,7 @@ public class CodeGoodsService:ICodeGoodsService var data = req.Adapt(); - var entity = tenantDb.Insertable(data).RemoveDataCache(SqlSugarCacheConst.Goods + user.TenantId).ExecuteReturnEntity(); + var entity = tenantDb.Insertable(data).RemoveDataCache($"{SqlSugarCacheConst.Goods}{user.TenantId}").ExecuteReturnEntity(); return DataResult.Successed("添加成功!", entity.Id,MultiLanguageConst.DataCreateSuccess); } @@ -113,7 +113,7 @@ public class CodeGoodsService:ICodeGoodsService info = req.Adapt(info); - tenantDb.Updateable(info).RemoveDataCache(SqlSugarCacheConst.Goods + user.TenantId).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); + tenantDb.Updateable(info).RemoveDataCache($"{SqlSugarCacheConst.Goods}{user.TenantId}").IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); return DataResult.Successed("更新成功!",MultiLanguageConst.DataUpdateSuccess); } } @@ -157,7 +157,7 @@ public class CodeGoodsService:ICodeGoodsService return DataResult.Failed("存在已导入的商品!",MultiLanguageConst.CodeGoodsImportAlready); } - tenantDb.Insertable(list).RemoveDataCache(SqlSugarCacheConst.Goods + user.TenantId).ExecuteCommand(); + tenantDb.Insertable(list).RemoveDataCache($"{SqlSugarCacheConst.Goods}{user.TenantId}").ExecuteCommand(); return DataResult.Successed("引入成功!",MultiLanguageConst.DataImportSuccess); } @@ -180,7 +180,7 @@ public class CodeGoodsService:ICodeGoodsService var list = tenantDb.Queryable().Where(x => req.Ids.Contains(x.Id)).ToList(); if (list.Count > 0) { - tenantDb.Deleteable(list).RemoveDataCache(SqlSugarCacheConst.Goods + user.TenantId).ExecuteCommand(); + tenantDb.Deleteable(list).RemoveDataCache($"{SqlSugarCacheConst.Goods}{user.TenantId}").ExecuteCommand(); } return DataResult.Successed("删除成功!", MultiLanguageConst.DataDelSuccess); } diff --git a/ds-wms-service/DS.WMS.Core/Code/Method/CodePackageService.cs b/ds-wms-service/DS.WMS.Core/Code/Method/CodePackageService.cs index 58328bd1..c72592ca 100644 --- a/ds-wms-service/DS.WMS.Core/Code/Method/CodePackageService.cs +++ b/ds-wms-service/DS.WMS.Core/Code/Method/CodePackageService.cs @@ -53,7 +53,7 @@ public class CodePackageService:ICodePackageService var data = req.Adapt(); - var entity = db.Insertable(data).RemoveDataCache(SqlSugarCacheConst.Package + user.TenantId).ExecuteReturnEntity(); + var entity = db.Insertable(data).RemoveDataCache($"{SqlSugarCacheConst.Package}{user.TenantId}").ExecuteReturnEntity(); return DataResult.Successed("添加成功!", entity.Id,MultiLanguageConst.DataCreateSuccess); } @@ -63,7 +63,7 @@ public class CodePackageService:ICodePackageService info = req.Adapt(info); - db.Updateable(info).RemoveDataCache(SqlSugarCacheConst.Package + user.TenantId).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); + db.Updateable(info).RemoveDataCache($"{SqlSugarCacheConst.Package}{user.TenantId}").IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); return DataResult.Successed("更新成功!",MultiLanguageConst.DataUpdateSuccess); } } @@ -101,7 +101,7 @@ public class CodePackageService:ICodePackageService var data = req.Adapt(); - var entity = tenantDb.Insertable(data).RemoveDataCache(SqlSugarCacheConst.Package + user.TenantId).ExecuteReturnEntity(); + var entity = tenantDb.Insertable(data).RemoveDataCache($"{SqlSugarCacheConst.Package}{user.TenantId}").ExecuteReturnEntity(); return DataResult.Successed("添加成功!", entity.Id,MultiLanguageConst.DataCreateSuccess); } @@ -111,7 +111,7 @@ public class CodePackageService:ICodePackageService info = req.Adapt(info); - tenantDb.Updateable(info).RemoveDataCache(SqlSugarCacheConst.Package + user.TenantId).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); + tenantDb.Updateable(info).RemoveDataCache($"{SqlSugarCacheConst.Package}{user.TenantId}").IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); return DataResult.Successed("更新成功!",MultiLanguageConst.DataUpdateSuccess); } } @@ -154,7 +154,7 @@ public class CodePackageService:ICodePackageService return DataResult.Failed("存在已导入的包装类型!",MultiLanguageConst.CodePackageImportAlready); } - tenantDb.Insertable(list).RemoveDataCache(SqlSugarCacheConst.Package + user.TenantId).ExecuteCommand(); + tenantDb.Insertable(list).RemoveDataCache($"{SqlSugarCacheConst.Package}{user.TenantId}").ExecuteCommand(); return DataResult.Successed("引入成功!",MultiLanguageConst.DataImportSuccess); } @@ -176,7 +176,7 @@ public class CodePackageService:ICodePackageService var list = tenantDb.Queryable().Where(x => req.Ids.Contains(x.Id)).ToList(); if (list.Count > 0) { - tenantDb.Deleteable(list).RemoveDataCache(SqlSugarCacheConst.Package + user.TenantId).ExecuteCommand(); + tenantDb.Deleteable(list).RemoveDataCache($"{SqlSugarCacheConst.Package}{user.TenantId}").ExecuteCommand(); } return DataResult.Successed("删除成功!", MultiLanguageConst.DataDelSuccess); } diff --git a/ds-wms-service/DS.WMS.Core/Code/Method/CodeVesselService.cs b/ds-wms-service/DS.WMS.Core/Code/Method/CodeVesselService.cs index c78371ff..bf725a02 100644 --- a/ds-wms-service/DS.WMS.Core/Code/Method/CodeVesselService.cs +++ b/ds-wms-service/DS.WMS.Core/Code/Method/CodeVesselService.cs @@ -110,7 +110,7 @@ public class CodeVesselService : ICodeVesselService var data = req.Adapt(); - var entity = tenantDb.Insertable(data).RemoveDataCache(SqlSugarCacheConst.Vessel + user.TenantId).ExecuteReturnEntity(); + var entity = tenantDb.Insertable(data).RemoveDataCache($"{SqlSugarCacheConst.Vessel}{user.TenantId}").ExecuteReturnEntity(); _sysCacheService.RemoveCache(Sys.Method.SysCacheCategoryEnum.CommonCodeVessel, "DS8").GetAwaiter().GetResult(); @@ -122,7 +122,7 @@ public class CodeVesselService : ICodeVesselService info = req.Adapt(info); - tenantDb.Updateable(info).RemoveDataCache(SqlSugarCacheConst.Vessel + user.TenantId).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); + tenantDb.Updateable(info).RemoveDataCache($"{SqlSugarCacheConst.Vessel}{user.TenantId}").IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); _sysCacheService.RemoveCache(Sys.Method.SysCacheCategoryEnum.CommonCodeVessel, "DS8").GetAwaiter().GetResult(); @@ -168,7 +168,7 @@ public class CodeVesselService : ICodeVesselService return DataResult.Failed("存在已导入的船名信息!", MultiLanguageConst.CodeVesselImportAlready); } - tenantDb.Insertable(list).RemoveDataCache(SqlSugarCacheConst.Vessel + user.TenantId).ExecuteCommand(); + tenantDb.Insertable(list).RemoveDataCache($"{SqlSugarCacheConst.Vessel}{user.TenantId}").ExecuteCommand(); _sysCacheService.RemoveCache(Sys.Method.SysCacheCategoryEnum.CommonCodeVessel, "DS8").GetAwaiter().GetResult(); @@ -195,8 +195,8 @@ public class CodeVesselService : ICodeVesselService { var voynos = tenantDb.Queryable().Where(x => req.Ids.Contains(x.VesselId)).ToList(); if (voynos.Count > 0) - tenantDb.Deleteable(voynos).RemoveDataCache(SqlSugarCacheConst.Voyno + user.TenantId).ExecuteCommand(); - tenantDb.Deleteable(list).RemoveDataCache(SqlSugarCacheConst.Vessel + user.TenantId).ExecuteCommand(); + tenantDb.Deleteable(voynos).RemoveDataCache($"{SqlSugarCacheConst.Voyno}{user.TenantId}").ExecuteCommand(); + tenantDb.Deleteable(list).RemoveDataCache($"{SqlSugarCacheConst.Vessel}{user.TenantId}").ExecuteCommand(); } return DataResult.Successed("删除成功!", MultiLanguageConst.DataDelSuccess); } diff --git a/ds-wms-service/DS.WMS.Core/Code/Method/CodeVoynoService.cs b/ds-wms-service/DS.WMS.Core/Code/Method/CodeVoynoService.cs index 40da6324..22a4fc7e 100644 --- a/ds-wms-service/DS.WMS.Core/Code/Method/CodeVoynoService.cs +++ b/ds-wms-service/DS.WMS.Core/Code/Method/CodeVoynoService.cs @@ -103,7 +103,7 @@ public class CodeVoynoService:ICodeVoynoService var data = req.Adapt(); - var entity = tenantDb.Insertable(data).RemoveDataCache(SqlSugarCacheConst.Voyno + user.TenantId).ExecuteReturnEntity(); + var entity = tenantDb.Insertable(data).RemoveDataCache($"{SqlSugarCacheConst.Voyno}{user.TenantId}").ExecuteReturnEntity(); return DataResult.Successed("添加成功!", entity.Id,MultiLanguageConst.DataCreateSuccess); } @@ -113,7 +113,7 @@ public class CodeVoynoService:ICodeVoynoService info = req.Adapt(info); - tenantDb.Updateable(info).RemoveDataCache(SqlSugarCacheConst.Voyno + user.TenantId).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); + tenantDb.Updateable(info).RemoveDataCache($"{SqlSugarCacheConst.Voyno}{user.TenantId}").IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); return DataResult.Successed("更新成功!",MultiLanguageConst.DataUpdateSuccess); } } @@ -158,7 +158,7 @@ public class CodeVoynoService:ICodeVoynoService return DataResult.Failed("存在已导入的航次信息!",MultiLanguageConst.CodeVoynoImportAlready); } - tenantDb.Insertable(list).RemoveDataCache(SqlSugarCacheConst.Voyno + user.TenantId).ExecuteCommand(); + tenantDb.Insertable(list).RemoveDataCache($"{SqlSugarCacheConst.Voyno}{user.TenantId}").ExecuteCommand(); return DataResult.Successed("引入成功!",MultiLanguageConst.DataImportSuccess); } @@ -181,7 +181,7 @@ public class CodeVoynoService:ICodeVoynoService var list = tenantDb.Queryable().Where(x => req.Ids.Contains(x.Id)).ToList(); if (list.Count > 0) { - tenantDb.Deleteable(list).RemoveDataCache(SqlSugarCacheConst.Voyno + user.TenantId).ExecuteCommand(); + tenantDb.Deleteable(list).RemoveDataCache($"{SqlSugarCacheConst.Voyno}{user.TenantId}").ExecuteCommand(); } return DataResult.Successed("删除成功!", MultiLanguageConst.DataDelSuccess); } diff --git a/ds-wms-service/DS.WMS.Core/Info/Method/ClientInfoService.cs b/ds-wms-service/DS.WMS.Core/Info/Method/ClientInfoService.cs index 928989fa..2a6aa029 100644 --- a/ds-wms-service/DS.WMS.Core/Info/Method/ClientInfoService.cs +++ b/ds-wms-service/DS.WMS.Core/Info/Method/ClientInfoService.cs @@ -75,7 +75,7 @@ public class ClientInfoService : ServiceBase, IClientInfoService var entity = TenantDb.InsertNav(data).Include(x => x.InvoiceHeaders).ExecuteReturnEntity(); tag.ClientId = entity.Id; - TenantDb.Insertable(tag).RemoveDataCache(SqlSugarCacheConst.InfoClient + User.TenantId).ExecuteCommand(); + TenantDb.Insertable(tag).RemoveDataCache($"{SqlSugarCacheConst.InfoClient}{User.TenantId}").ExecuteCommand(); return DataResult.Successed("添加成功!", entity.Id, MultiLanguageConst.DataCreateSuccess); } else @@ -86,7 +86,7 @@ public class ClientInfoService : ServiceBase, IClientInfoService info = req.Adapt(info); tag = req.ClientTag.Adapt(tag); - TenantDb.Updateable(info).RemoveDataCache(SqlSugarCacheConst.InfoClient + User.TenantId).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand(); + TenantDb.Updateable(info).RemoveDataCache($"{SqlSugarCacheConst.InfoClient}{User.TenantId}").IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand(); TenantDb.Updateable(tag).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand(); //创建或更新发票抬头 @@ -186,7 +186,7 @@ public class ClientInfoService : ServiceBase, IClientInfoService //收发货人 await TenantDb.Deleteable().Where(x => req.Ids.Contains(x.ClientId)).ExecuteCommandAsync(); //删除客户信息 - await TenantDb.Deleteable().RemoveDataCache(SqlSugarCacheConst.InfoClient + User.TenantId).Where(x => req.Ids.Contains(x.Id)).ExecuteCommandAsync(); + await TenantDb.Deleteable().RemoveDataCache($"{SqlSugarCacheConst.InfoClient}{User.TenantId}").Where(x => req.Ids.Contains(x.Id)).ExecuteCommandAsync(); await TenantDb.Ado.CommitTranAsync(); return DataResult.Success; diff --git a/ds-wms-service/DS.WMS.Core/Sys/Method/ClientCommonService.cs b/ds-wms-service/DS.WMS.Core/Sys/Method/ClientCommonService.cs index 7b467c81..f8d78b8c 100644 --- a/ds-wms-service/DS.WMS.Core/Sys/Method/ClientCommonService.cs +++ b/ds-wms-service/DS.WMS.Core/Sys/Method/ClientCommonService.cs @@ -76,7 +76,7 @@ public class ClientCommonService : IClientCommonService .WhereIF(!string.IsNullOrEmpty(queryKey), a => a.GoodsCode.Contains(queryKey) || a.GoodName.Contains(queryKey)) .Select() .Take(20) - .WithCache(SqlSugarCacheConst.Goods + user.TenantId) + .WithCache($"{SqlSugarCacheConst.Goods}{user.TenantId}") .ToListAsync(); return await Task.FromResult(DataResult>.Success("获取数据成功!", list)); } @@ -105,7 +105,7 @@ public class ClientCommonService : IClientCommonService .Where(a => a.Status == StatusEnum.Enable.ToEnumInt() && ids.Contains(a.Id)) .Select() .Take(20) - .WithCache(SqlSugarCacheConst.User + user.TenantId) + .WithCache($"{SqlSugarCacheConst.User}{user.TenantId}") .ToListAsync(); return await Task.FromResult(DataResult>.Success(data)); } @@ -134,7 +134,7 @@ public class ClientCommonService : IClientCommonService Value = a.Id, }) .Take(20) - .WithCache(SqlSugarCacheConst.User + user.TenantId) + .WithCache($"{SqlSugarCacheConst.User}{user.TenantId}") .ToListAsync(); return DataResult>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess); } @@ -1005,7 +1005,7 @@ public class ClientCommonService : IClientCommonService .WhereIF(!string.IsNullOrEmpty(queryKey), a => a.UserCode.Contains(queryKey) || a.UserName.Contains(queryKey)) .Select() .Take(20) - .WithCache(SqlSugarCacheConst.User + user.TenantId) + .WithCache($"{SqlSugarCacheConst.User}{user.TenantId}") .ToList(); if (list.Count > 0) { @@ -1110,7 +1110,7 @@ public class ClientCommonService : IClientCommonService BLContent = a.BLContent, PinYinCode = a.ShortName + "(" + a.CodeName + ")" } - ).Take(20).WithCache(SqlSugarCacheConst.InfoClient + user.TenantId).ToListAsync(); + ).Take(20).WithCache($"{SqlSugarCacheConst.InfoClient}{user.TenantId}").ToListAsync(); return await Task.FromResult(DataResult>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess)); } /// @@ -1590,7 +1590,7 @@ public class ClientCommonService : IClientCommonService .WhereIF(!string.IsNullOrEmpty(queryKey), a => a.PackageName.Contains(queryKey) || a.EdiCode.Contains(queryKey)) .Select() .Take(20) - .WithCache(SqlSugarCacheConst.Package + user.TenantId) + .WithCache($"{SqlSugarCacheConst.Package}{user.TenantId}") .ToList(); return DataResult>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess); } @@ -1606,7 +1606,7 @@ public class ClientCommonService : IClientCommonService .WhereIF(!string.IsNullOrEmpty(queryKey), a => a.VesselName.Contains(queryKey) || a.EdiCode.Contains(queryKey)) .Select() .Take(20) - .WithCache(SqlSugarCacheConst.Vessel + user.TenantId) + .WithCache($"{SqlSugarCacheConst.Vessel}{user.TenantId}") .ToList(); return DataResult>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess); } @@ -1622,7 +1622,7 @@ public class ClientCommonService : IClientCommonService .WhereIF(!string.IsNullOrEmpty(queryKey), a => a.VoyNo.Contains(queryKey)) .Select() .Take(20) - .WithCache(SqlSugarCacheConst.Voyno + user.TenantId) + .WithCache($"{SqlSugarCacheConst.Voyno}{user.TenantId}") .ToList(); return DataResult>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess); } @@ -1663,7 +1663,7 @@ public class ClientCommonService : IClientCommonService .WhereIF(!string.IsNullOrEmpty(queryKey), a => a.UserCode.Contains(queryKey) || a.UserName.Contains(queryKey)) .Select() .Take(20) - .WithCache(SqlSugarCacheConst.User + user.TenantId) + .WithCache($"{SqlSugarCacheConst.User}{user.TenantId}") .ToList(); return DataResult>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess); } @@ -1679,7 +1679,7 @@ public class ClientCommonService : IClientCommonService .WhereIF(!string.IsNullOrEmpty(queryKey), a => a.UserCode.Contains(queryKey) || a.UserName.Contains(queryKey)) .Select() .Take(20) - .WithCache(SqlSugarCacheConst.User + user.TenantId) + .WithCache($"{SqlSugarCacheConst.User}{user.TenantId}") .ToList(); return DataResult>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess); } @@ -1694,7 +1694,7 @@ public class ClientCommonService : IClientCommonService .WhereIF(!string.IsNullOrEmpty(queryKey), a => a.UserCode.Contains(queryKey) || a.UserName.Contains(queryKey)) .Select() .Take(20) - .WithCache(SqlSugarCacheConst.User + user.TenantId) + .WithCache($"{SqlSugarCacheConst.User}{user.TenantId}") .ToList(); return DataResult>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess); } @@ -1710,7 +1710,7 @@ public class ClientCommonService : IClientCommonService .WhereIF(!string.IsNullOrEmpty(queryKey), a => a.UserCode.Contains(queryKey) || a.UserName.Contains(queryKey)) .Select() .Take(20) - .WithCache(SqlSugarCacheConst.User + user.TenantId) + .WithCache($"{SqlSugarCacheConst.User}{user.TenantId}") .ToList(); return DataResult>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess); } @@ -1726,7 +1726,7 @@ public class ClientCommonService : IClientCommonService .WhereIF(!string.IsNullOrEmpty(queryKey), a => a.UserCode.Contains(queryKey) || a.UserName.Contains(queryKey)) .Select() .Take(20) - .WithCache(SqlSugarCacheConst.User + user.TenantId) + .WithCache($"{SqlSugarCacheConst.User}{user.TenantId}") .ToList(); return DataResult>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess); } @@ -1742,7 +1742,7 @@ public class ClientCommonService : IClientCommonService .WhereIF(!string.IsNullOrEmpty(queryKey), a => a.UserCode.Contains(queryKey) || a.UserName.Contains(queryKey)) .Select() .Take(20) - .WithCache(SqlSugarCacheConst.User) + .WithCache($"{SqlSugarCacheConst.User}{user.TenantId}") .ToList(); return DataResult>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess); } @@ -1758,7 +1758,7 @@ public class ClientCommonService : IClientCommonService .WhereIF(!string.IsNullOrEmpty(queryKey), a => a.UserCode.Contains(queryKey) || a.UserName.Contains(queryKey)) .Select() .Take(20) - .WithCache(SqlSugarCacheConst.User + user.TenantId) + .WithCache($"{SqlSugarCacheConst.User}{user.TenantId}") .ToList(); return DataResult>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess); } @@ -1773,7 +1773,7 @@ public class ClientCommonService : IClientCommonService .WhereIF(!string.IsNullOrEmpty(queryKey), a => a.UserCode.Contains(queryKey) || a.UserName.Contains(queryKey)) .Select() .Take(20) - .WithCache(SqlSugarCacheConst.User + user.TenantId) + .WithCache($"{SqlSugarCacheConst.User}{user.TenantId}") .ToList(); return DataResult>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess); } diff --git a/ds-wms-service/DS.WMS.Core/Sys/Method/CommonService.cs b/ds-wms-service/DS.WMS.Core/Sys/Method/CommonService.cs index 1153b7e9..514cedfa 100644 --- a/ds-wms-service/DS.WMS.Core/Sys/Method/CommonService.cs +++ b/ds-wms-service/DS.WMS.Core/Sys/Method/CommonService.cs @@ -936,7 +936,7 @@ public class CommonService : ICommonService Value = a.Id, }) .Take(20) - .WithCache(SqlSugarCacheConst.User + user.TenantId).ToList(); + .WithCache($"{SqlSugarCacheConst.User}{user.TenantId}").ToList(); return DataResult>.Success("获取数据成功!", list); } diff --git a/ds-wms-service/DS.WMS.Core/Sys/Method/UserService.cs b/ds-wms-service/DS.WMS.Core/Sys/Method/UserService.cs index 6ffa6a4b..d1bb8dc3 100644 --- a/ds-wms-service/DS.WMS.Core/Sys/Method/UserService.cs +++ b/ds-wms-service/DS.WMS.Core/Sys/Method/UserService.cs @@ -131,7 +131,7 @@ public class UserService : IUserService data.PinYinCode = data.UserName + "(" + PinYinUtil.GetFristLetter(data.UserName) + ")"; data.MD5Password = MD5Helper.MD5Encrypt(data.Password); - var entity = db.Insertable(data).RemoveDataCache(SqlSugarCacheConst.User + user.TenantId).ExecuteReturnEntity(); + var entity = db.Insertable(data).RemoveDataCache($"{SqlSugarCacheConst.User}{user.TenantId}").ExecuteReturnEntity(); if (model.RoleIds.IsNotNull() && model.RoleIds.Count() > 0) { @@ -180,7 +180,7 @@ public class UserService : IUserService info = model.MapTo(); info.PinYinCode = info.UserName + "(" + PinYinUtil.GetFristLetter(info.UserName) + ")"; - db.Updateable(info).RemoveDataCache(SqlSugarCacheConst.User + user.TenantId).IgnoreColumns(it => new { it.TenantId,it.TenantName, it.Password,it.MD5Password }).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); + db.Updateable(info).RemoveDataCache($"{SqlSugarCacheConst.User}{user.TenantId}").IgnoreColumns(it => new { it.TenantId,it.TenantName, it.Password,it.MD5Password }).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); #region 处理用户角色 @@ -302,7 +302,7 @@ public class UserService : IUserService if (userLanes.Count > 0) await db.Deleteable(userLanes).ExecuteCommandAsync(); } - await db.Deleteable(list).RemoveDataCache(SqlSugarCacheConst.User + user.TenantId).ExecuteCommandAsync(); + await db.Deleteable(list).RemoveDataCache($"{SqlSugarCacheConst.User}{user.TenantId}").ExecuteCommandAsync(); } return await Task.FromResult(DataResult.Successed("删除成功!", MultiLanguageConst.DataDelSuccess)); From c5d33fbe7c093a334c91a09fd22e88821eebd071 Mon Sep 17 00:00:00 2001 From: cjy Date: Fri, 9 Aug 2024 14:20:24 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E9=9B=86=E8=A3=85=E7=AE=B1=E6=8A=A5?= =?UTF-8?q?=E4=BB=B7-=E6=9C=8D=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/BusinessCtnPriceController.cs | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 ds-wms-service/DS.WMS.OpApi/Controllers/BusinessCtnPriceController.cs diff --git a/ds-wms-service/DS.WMS.OpApi/Controllers/BusinessCtnPriceController.cs b/ds-wms-service/DS.WMS.OpApi/Controllers/BusinessCtnPriceController.cs new file mode 100644 index 00000000..eda61fef --- /dev/null +++ b/ds-wms-service/DS.WMS.OpApi/Controllers/BusinessCtnPriceController.cs @@ -0,0 +1,53 @@ +using DS.Module.Core; +using DS.Module.Core.Data; +using DS.WMS.Core.Code.Dtos; +using DS.WMS.Core.Code.Interface; +using DS.WMS.Core.Op.Dtos; +using DS.WMS.Core.Op.Interface; +using Microsoft.AspNetCore.Mvc; + +namespace DS.WMS.OpApi.Controllers; + +/// +/// 集装箱报价-服务 +/// +public class BusinessCtnPriceController : ApiController +{ + private readonly IBusinessCtnPriceService _invokeService; + + /// + /// 构造函数 + /// + /// + public BusinessCtnPriceController(IBusinessCtnPriceService invokeService) + { + _invokeService = invokeService; + } + + /// + /// 列表 + /// + /// + /// + [HttpPost] + [Route("GetBusinessCtnPriceList")] + public async Task>> GetBusinessCtnPriceList([FromBody] PageRequest request) + { + var res = await _invokeService.GetListByPage(request); + return res; + } + + + /// + /// 批量删除 + /// + /// + /// + [HttpPost] + [Route("BatchDelBusinessCtnPrice")] + public async Task BatchDelBusinessCtnPrice([FromBody] IdModel req) + { + var res = await _invokeService.BatchDelBusinessCtnPrice(req); + return res; + } +} \ No newline at end of file From 011b1002f6e531a3f1fe82ea5d187ea75de1b4c3 Mon Sep 17 00:00:00 2001 From: cjy Date: Fri, 9 Aug 2024 14:34:18 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=82=AE=E4=BB=B6?= =?UTF-8?q?=E7=AD=BE=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ds-wms-service/DS.WMS.Core/Sys/Dtos/UserReq.cs | 4 ++-- ds-wms-service/DS.WMS.Core/Sys/Dtos/UserSelectRes.cs | 4 ++++ ds-wms-service/DS.WMS.Core/Sys/Dtos/UserViewModel.cs | 4 ++-- ds-wms-service/DS.WMS.Core/Sys/Entity/SysUser.cs | 7 ++++++- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/ds-wms-service/DS.WMS.Core/Sys/Dtos/UserReq.cs b/ds-wms-service/DS.WMS.Core/Sys/Dtos/UserReq.cs index 059682a1..e8cffd6a 100644 --- a/ds-wms-service/DS.WMS.Core/Sys/Dtos/UserReq.cs +++ b/ds-wms-service/DS.WMS.Core/Sys/Dtos/UserReq.cs @@ -175,9 +175,9 @@ public class UserReq public string SourceName { get; set; } = ""; /// - /// 签名照片Url + /// 签名 /// - public string SignatureUrl { get; set; } = ""; + public string SignatureHtml { get; set; } = ""; } /// diff --git a/ds-wms-service/DS.WMS.Core/Sys/Dtos/UserSelectRes.cs b/ds-wms-service/DS.WMS.Core/Sys/Dtos/UserSelectRes.cs index adb05fd3..5d680afc 100644 --- a/ds-wms-service/DS.WMS.Core/Sys/Dtos/UserSelectRes.cs +++ b/ds-wms-service/DS.WMS.Core/Sys/Dtos/UserSelectRes.cs @@ -66,4 +66,8 @@ public class UserSelectRes /// 财务软件代码 /// public string FinanceSoftCode { get; set; } + /// + /// 签名 + /// + public string SignatureHtml { get; set; } = ""; } \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/Sys/Dtos/UserViewModel.cs b/ds-wms-service/DS.WMS.Core/Sys/Dtos/UserViewModel.cs index c3158c94..48b6da55 100644 --- a/ds-wms-service/DS.WMS.Core/Sys/Dtos/UserViewModel.cs +++ b/ds-wms-service/DS.WMS.Core/Sys/Dtos/UserViewModel.cs @@ -192,7 +192,7 @@ public class UserViewModel public string SourceName { get; set; } = ""; /// - /// 签名照片Url + /// 签名 /// - public string SignatureUrl { get; set; } = ""; + public string SignatureHtml { get; set; } = ""; } \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/Sys/Entity/SysUser.cs b/ds-wms-service/DS.WMS.Core/Sys/Entity/SysUser.cs index 76ce7276..baa4aaca 100644 --- a/ds-wms-service/DS.WMS.Core/Sys/Entity/SysUser.cs +++ b/ds-wms-service/DS.WMS.Core/Sys/Entity/SysUser.cs @@ -205,5 +205,10 @@ public class SysUser : UserTenantModel /// [Description("是否派车调度人员")] public bool IsDispatcher { get; set; } = false; - + + /// + /// 邮件签名 + /// + [Description("邮件签名")] + public string SignatureHtml { get; set; } } \ No newline at end of file From 33251e1a3f6e2f905293bc77bbe19ff168922d48 Mon Sep 17 00:00:00 2001 From: cjy Date: Fri, 9 Aug 2024 14:38:24 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ds-wms-service/DS.WMS.Core/Sys/Dtos/UserReq.cs | 6 +++++- ds-wms-service/DS.WMS.Core/Sys/Dtos/UserSelectRes.cs | 6 +++++- ds-wms-service/DS.WMS.Core/Sys/Dtos/UserViewModel.cs | 6 +++++- ds-wms-service/DS.WMS.Core/Sys/Entity/SysUser.cs | 5 +++++ 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/ds-wms-service/DS.WMS.Core/Sys/Dtos/UserReq.cs b/ds-wms-service/DS.WMS.Core/Sys/Dtos/UserReq.cs index e8cffd6a..ed8920a3 100644 --- a/ds-wms-service/DS.WMS.Core/Sys/Dtos/UserReq.cs +++ b/ds-wms-service/DS.WMS.Core/Sys/Dtos/UserReq.cs @@ -175,7 +175,11 @@ public class UserReq public string SourceName { get; set; } = ""; /// - /// 签名 + /// 签名图片 + /// + public string SignatureUrl { get; set; } = ""; + /// + /// 邮件签名 /// public string SignatureHtml { get; set; } = ""; } diff --git a/ds-wms-service/DS.WMS.Core/Sys/Dtos/UserSelectRes.cs b/ds-wms-service/DS.WMS.Core/Sys/Dtos/UserSelectRes.cs index 5d680afc..31f8ce76 100644 --- a/ds-wms-service/DS.WMS.Core/Sys/Dtos/UserSelectRes.cs +++ b/ds-wms-service/DS.WMS.Core/Sys/Dtos/UserSelectRes.cs @@ -67,7 +67,11 @@ public class UserSelectRes /// public string FinanceSoftCode { get; set; } /// - /// 签名 + /// 签名图片 + /// + public string SignatureUrl { get; set; } = ""; + /// + /// 邮件签名 /// public string SignatureHtml { get; set; } = ""; } \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/Sys/Dtos/UserViewModel.cs b/ds-wms-service/DS.WMS.Core/Sys/Dtos/UserViewModel.cs index 48b6da55..408bb4da 100644 --- a/ds-wms-service/DS.WMS.Core/Sys/Dtos/UserViewModel.cs +++ b/ds-wms-service/DS.WMS.Core/Sys/Dtos/UserViewModel.cs @@ -192,7 +192,11 @@ public class UserViewModel public string SourceName { get; set; } = ""; /// - /// 签名 + /// 签名图片 + /// + public string SignatureUrl { get; set; } = ""; + /// + /// 邮件签名 /// public string SignatureHtml { get; set; } = ""; } \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/Sys/Entity/SysUser.cs b/ds-wms-service/DS.WMS.Core/Sys/Entity/SysUser.cs index baa4aaca..b7fb0a4e 100644 --- a/ds-wms-service/DS.WMS.Core/Sys/Entity/SysUser.cs +++ b/ds-wms-service/DS.WMS.Core/Sys/Entity/SysUser.cs @@ -206,6 +206,11 @@ public class SysUser : UserTenantModel [Description("是否派车调度人员")] public bool IsDispatcher { get; set; } = false; + /// + /// 签名图片 + /// + [Description("签名图片")] + public string SignatureUrl { get; set; } /// /// 邮件签名 ///