From 66087ff4d1b4dc4e258c1f258e302a96656cdf0a Mon Sep 17 00:00:00 2001 From: wxd <123@qq.com> Date: Fri, 3 May 2024 22:28:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=95=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CustomerOrgs/CustomerOrgManager.cs | 20 +++++++++++-------- .../PeisHttpApiHostModule.cs | 2 +- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/Shentun.Peis.Domain/CustomerOrgs/CustomerOrgManager.cs b/src/Shentun.Peis.Domain/CustomerOrgs/CustomerOrgManager.cs index cda5f01..faa379a 100644 --- a/src/Shentun.Peis.Domain/CustomerOrgs/CustomerOrgManager.cs +++ b/src/Shentun.Peis.Domain/CustomerOrgs/CustomerOrgManager.cs @@ -84,7 +84,7 @@ namespace Shentun.Peis.CustomerOrgs } #endregion - + return new CustomerOrg(GuidGenerator.Create()) { DisplayName = entity.DisplayName, @@ -104,7 +104,8 @@ namespace Shentun.Peis.CustomerOrgs Remark = entity.Remark, ShortName = entity.ShortName, IsActive = entity.IsActive, - Telephone = entity.Telephone + Telephone = entity.Telephone, + CountryOrgCode = entity.CountryOrgCode }; } @@ -162,6 +163,7 @@ namespace Shentun.Peis.CustomerOrgs targetEntity.ShortName = sourceEntity.ShortName; targetEntity.IsActive = sourceEntity.IsActive; targetEntity.Telephone = sourceEntity.Telephone; + targetEntity.CountryOrgCode = sourceEntity.CountryOrgCode; } @@ -227,7 +229,8 @@ namespace Shentun.Peis.CustomerOrgs { //最大pathcode var LastPathCode = (await _repository.GetListAsync(o => o.ParentId == Guid.Empty || o.ParentId == null)) - .OrderByDescending(o => { + .OrderByDescending(o => + { var sortCode = o.PathCode.Replace(".", ""); return Convert.ToInt32(sortCode); } @@ -251,7 +254,8 @@ namespace Shentun.Peis.CustomerOrgs //最大pathcode var LastPathCode = (await _repository.GetListAsync(o => o.ParentId == parentId)) - .OrderByDescending(o => { + .OrderByDescending(o => + { var sortCode = o.PathCode.Replace(".", ""); return Convert.ToInt32(sortCode); }).Select(s => s.PathCode).FirstOrDefault(); @@ -306,12 +310,12 @@ namespace Shentun.Peis.CustomerOrgs public async Task GetTopCustomerOrgAsync(Guid CustomerOrgId) { - var entity = await _repository.GetAsync(CustomerOrgId); - if(entity.Id == GuidFlag.PersonCustomerOrgId) + var entity = await _repository.GetAsync(CustomerOrgId); + if (entity.Id == GuidFlag.PersonCustomerOrgId) { return entity; } - if(entity.PathCode.Length == 5) + if (entity.PathCode.Length == 5) { return entity; } @@ -380,6 +384,6 @@ namespace Shentun.Peis.CustomerOrgs } - + } } diff --git a/src/Shentun.Peis.HttpApi.Host/PeisHttpApiHostModule.cs b/src/Shentun.Peis.HttpApi.Host/PeisHttpApiHostModule.cs index 7b90a29..89b926c 100644 --- a/src/Shentun.Peis.HttpApi.Host/PeisHttpApiHostModule.cs +++ b/src/Shentun.Peis.HttpApi.Host/PeisHttpApiHostModule.cs @@ -488,7 +488,7 @@ public class PeisHttpApiHostModule : AbpModule app.UseStaticFiles(new StaticFileOptions { FileProvider = new PhysicalFileProvider(Path.Combine(Directory.GetCurrentDirectory(), "UpLoad")), - RequestPath = "/UpLoad" + RequestPath = "/photo" });