From 272e740dacb4ccc54dc97afdb1f2da1a4b4b9de8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=86=9B?= <2357729423@qq.com> Date: Tue, 5 Mar 2024 16:56:18 +0800 Subject: [PATCH 1/6] =?UTF-8?q?change=20=E5=88=9B=E5=BB=BA=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=EF=BC=8C=E5=AD=90=E7=B3=BB=E7=BB=9Fid=E4=BB=8Eheader?= =?UTF-8?q?=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Services/ProvideServices/OrderService.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/SJZY.Track.Application/Services/ProvideServices/OrderService.cs b/src/SJZY.Track.Application/Services/ProvideServices/OrderService.cs index 226be0ef..edf429d7 100644 --- a/src/SJZY.Track.Application/Services/ProvideServices/OrderService.cs +++ b/src/SJZY.Track.Application/Services/ProvideServices/OrderService.cs @@ -2,6 +2,7 @@ using SJZY.Track.Domain.Aggregates.OrderAggregate; using SJZY.Track.Domain.Aggregates.TrackDetailsAggregate; using SJZY.Track.Domain.Dtos.Order; +using SJZY.UserCenter.HttpApi.Services; namespace SJZY.Track.Application.Services.ProvideServices; @@ -42,7 +43,7 @@ public class OrderService : ApplicationService } order = ObjectMapper.Map(input); - order.SubSystemId = 1; + order.SubSystemId = CurrentUserRequest.SubSystemId; order.OrderTemplates = ObjectMapper.Map, List>(input.Templates!); order.OrderFlights = ObjectMapper.Map, List>(input.FlightInfos!); From 327db0fab16e3072fcb6fd807c1cf25e2e88220d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=86=9B?= <2357729423@qq.com> Date: Tue, 5 Mar 2024 16:58:00 +0800 Subject: [PATCH 2/6] =?UTF-8?q?fix=E3=80=90S1-=E8=AE=A2=E5=8D=95=E5=85=B3?= =?UTF-8?q?=E8=81=94=E6=8E=A5=E5=8F=A3=EF=BC=8C=E5=85=B3=E8=81=94=E5=8D=95?= =?UTF-8?q?=E5=8F=B7=E4=B8=8D=E5=A1=AB=E5=86=99=EF=BC=8C=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E7=BB=99=E5=87=BA=E5=BF=85=E5=A1=AB=E6=A0=A1=E9=AA=8C=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E3=80=91https://www.tapd.cn/60863849/bugtrace/bugs/vi?= =?UTF-8?q?ew=3Fbug=5Fid=3D1160863849001029771?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Services/ProvideServices/OrderLinkService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SJZY.Track.Application/Services/ProvideServices/OrderLinkService.cs b/src/SJZY.Track.Application/Services/ProvideServices/OrderLinkService.cs index 73c08dd9..77805cf7 100644 --- a/src/SJZY.Track.Application/Services/ProvideServices/OrderLinkService.cs +++ b/src/SJZY.Track.Application/Services/ProvideServices/OrderLinkService.cs @@ -43,8 +43,8 @@ public class OrderLinkService : ApplicationService if (input.LinkOrderNos.Count < 1 || input.LinkOrderType == 0) return true; - // 单号去重 - input.LinkOrderNos = input.LinkOrderNos.Distinct().ToList(); + // 单号去重,去空 + input.LinkOrderNos = input.LinkOrderNos.Where(x => !x.IsNullOrWhiteSpace()).Distinct().ToList(); // 解绑 if (!input.IsLink) return await UnLinkOrderAsync(input); From a4a04bf5a64d6185a77765fe3a904e82a87d0770 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=86=9B?= <2357729423@qq.com> Date: Tue, 5 Mar 2024 17:25:07 +0800 Subject: [PATCH 3/6] =?UTF-8?q?fix=20=E8=AE=A2=E5=8D=95=E5=85=B3=E8=81=94?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/SJZY.Track.Repository/Repositories/OrderRepository.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SJZY.Track.Repository/Repositories/OrderRepository.cs b/src/SJZY.Track.Repository/Repositories/OrderRepository.cs index 728a0606..5647fc4a 100644 --- a/src/SJZY.Track.Repository/Repositories/OrderRepository.cs +++ b/src/SJZY.Track.Repository/Repositories/OrderRepository.cs @@ -63,7 +63,7 @@ public class OrderRepository : BasicRepository, IOrderRepository, I return await Context.Queryable() .LeftJoin((a, b) => a.Id == b.OrderId) .LeftJoin((a, b, c) => b.LinkOrderId == c.Id) - .Where(a => a.Id == orderId) + .Where(a => a.OrderId == orderId) .Select((a, b, c) => new LinkedOrderVO { OrderId = c.Id, From 2b299fb70903c2130b08503b4a7a76835f543626 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=86=9B?= <2357729423@qq.com> Date: Tue, 5 Mar 2024 17:42:34 +0800 Subject: [PATCH 4/6] =?UTF-8?q?fix=20=E8=AE=A2=E5=8D=95=E5=85=B3=E8=81=94s?= =?UTF-8?q?ql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Dtos/ProvideServices/UpsertOrderInput.cs | 1 + .../Repositories/OrderRepository.cs | 17 ++++++++--------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/SJZY.Track.Application.Contract/Dtos/ProvideServices/UpsertOrderInput.cs b/src/SJZY.Track.Application.Contract/Dtos/ProvideServices/UpsertOrderInput.cs index 880c43a5..91ae6d11 100644 --- a/src/SJZY.Track.Application.Contract/Dtos/ProvideServices/UpsertOrderInput.cs +++ b/src/SJZY.Track.Application.Contract/Dtos/ProvideServices/UpsertOrderInput.cs @@ -7,6 +7,7 @@ public class UpsertOrderInput : UpdateOrderInput /// /// 客户id /// + [Required] public int CustomId { get; set; } } diff --git a/src/SJZY.Track.Repository/Repositories/OrderRepository.cs b/src/SJZY.Track.Repository/Repositories/OrderRepository.cs index 5647fc4a..b1bb6476 100644 --- a/src/SJZY.Track.Repository/Repositories/OrderRepository.cs +++ b/src/SJZY.Track.Repository/Repositories/OrderRepository.cs @@ -61,17 +61,16 @@ public class OrderRepository : BasicRepository, IOrderRepository, I public async Task> GetLinkedOrdersAsync(int orderId) { return await Context.Queryable() - .LeftJoin((a, b) => a.Id == b.OrderId) - .LeftJoin((a, b, c) => b.LinkOrderId == c.Id) + .LeftJoin((a, b) => a.LinkOrderId == b.Id) .Where(a => a.OrderId == orderId) - .Select((a, b, c) => new LinkedOrderVO + .Select((a, b) => new LinkedOrderVO { - OrderId = c.Id, - OrderType = c.OrderType, - OrderNo = c.OrderNo, - SubSystemId = c.SubSystemId, - IsPushCompleted = c.IsPushCompleted, - CustomId = c.CustomId + OrderId = b.Id, + OrderType = b.OrderType, + OrderNo = b.OrderNo, + SubSystemId = b.SubSystemId, + IsPushCompleted = b.IsPushCompleted, + CustomId = b.CustomId }) .ToListAsync(); } From 5f60f1ee06880e4a7a7def0cd508936dc3fbf3d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9F=B3=E6=96=87=E7=BF=94?= <878130837@qq.com> Date: Tue, 5 Mar 2024 19:01:59 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Services/TrackPull/TrackPullService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SJZY.Track.Application/Services/TrackPull/TrackPullService.cs b/src/SJZY.Track.Application/Services/TrackPull/TrackPullService.cs index df09c551..34998b29 100644 --- a/src/SJZY.Track.Application/Services/TrackPull/TrackPullService.cs +++ b/src/SJZY.Track.Application/Services/TrackPull/TrackPullService.cs @@ -222,7 +222,7 @@ public class TrackPullService : ApplicationService, ITransientDependency throw new BusinessException(message: _stringLocalizer["IsTrackPullContentValueAny"]); else if (!input.TrackKeywords.IsNullOrEmpty()) { - Expression> trackKeywordExp = _ => true; + Expression> trackKeywordExp = _ => false; input.TrackKeywords!.ForEach(item => { trackKeywordExp = trackKeywordExp.Or(x => SqlFunc.SplitIn(x.TrackKeyword, item)); }); if (await _trackPullConfigRepository.IsContentAnyAsync(isContentAnyExp.And(trackKeywordExp))) From 3be84b4a403c01e175402f6e5f21d4fe59d74e88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9F=B3=E6=96=87=E7=BF=94?= <878130837@qq.com> Date: Tue, 5 Mar 2024 19:13:23 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AutoMapper/TrackPullAutoMapperProfile.cs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/SJZY.Track.Application/AutoMapper/TrackPullAutoMapperProfile.cs b/src/SJZY.Track.Application/AutoMapper/TrackPullAutoMapperProfile.cs index dbd0f338..d8dad310 100644 --- a/src/SJZY.Track.Application/AutoMapper/TrackPullAutoMapperProfile.cs +++ b/src/SJZY.Track.Application/AutoMapper/TrackPullAutoMapperProfile.cs @@ -13,15 +13,7 @@ public class TrackPullAutoMapperProfile : Profile CreateMap(MemberList.None).Ignore(dest => dest.Id) .ForMember(dest => dest.IsPush, opt => opt.MapFrom(source => false)); CreateMap(MemberList.None) - .ForMember(dest => dest.TrackKeyword, opt => - { - opt.Condition(src => !src.TrackKeywords.IsNullOrEmpty()); - opt.MapFrom(src => string.Join(',', src.TrackKeywords)); - }) - .ForMember(dest => dest.TrackKeywordReverse, opt => - { - opt.Condition(src => !src.TrackKeywordReverses.IsNullOrEmpty()); - opt.MapFrom(src => string.Join(',', src.TrackKeywordReverses)); - }); + .ForMember(dest => dest.TrackKeyword, opt => opt.MapFrom(src => string.Join(',', src.TrackKeywords))) + .ForMember(dest => dest.TrackKeywordReverse, opt => opt.MapFrom(src => string.Join(',', src.TrackKeywordReverses))); } } \ No newline at end of file