From d075c02d5e1c8a4f0bfa2ed07b12c47ad94726b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=86=9B?= <2357729423@qq.com> Date: Thu, 25 Apr 2024 18:58:38 +0800 Subject: [PATCH 1/2] =?UTF-8?q?opt=EF=BC=9A=E4=BC=98=E5=8C=96=E6=8E=A8?= =?UTF-8?q?=E9=80=81=E5=AF=B9=E6=8E=A5=E6=8E=A5=E5=8F=A3=E9=80=9A=E6=97=A5?= =?UTF-8?q?=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EventHandlers/TrackPushEventHandler.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SJZY.Track.Application/EventHandlers/TrackPushEventHandler.cs b/src/SJZY.Track.Application/EventHandlers/TrackPushEventHandler.cs index 67fb60d9..3b42b3db 100644 --- a/src/SJZY.Track.Application/EventHandlers/TrackPushEventHandler.cs +++ b/src/SJZY.Track.Application/EventHandlers/TrackPushEventHandler.cs @@ -155,7 +155,7 @@ public class TrackPushEventHandler : ITransientDependency, ICapSubscribe if (r.Code != InterfaceRelayConst.SuccessCode) { - throw new BusinessException(message: r.Msg); + throw new BusinessException(message: $"requestId: {r.Data}; {r.Msg}"); } } @@ -195,7 +195,7 @@ public class TrackPushEventHandler : ITransientDependency, ICapSubscribe if (r.Code != InterfaceRelayConst.SuccessCode) { - throw new BusinessException(message: r.Msg); + throw new BusinessException(message: $"requestId: {r.Data}; {r.Msg}"); } } From 62ba69aed92dc89e04401660aa8b82d53aa1adef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=86=9B?= <2357729423@qq.com> Date: Thu, 25 Apr 2024 19:07:55 +0800 Subject: [PATCH 2/2] attach --- .../Repositories/TrackDetailsRepository.cs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/SJZY.Track.Repository/Repositories/TrackDetailsRepository.cs b/src/SJZY.Track.Repository/Repositories/TrackDetailsRepository.cs index 74666a61..d2b2e3cc 100644 --- a/src/SJZY.Track.Repository/Repositories/TrackDetailsRepository.cs +++ b/src/SJZY.Track.Repository/Repositories/TrackDetailsRepository.cs @@ -236,14 +236,10 @@ internal class TrackDetailsRepository : ElasticSearchContextAbstract(x => x .Source(s => s.Includes(fd => fd.Field(f => f.IndexName))) - .Size(1000) - .Query(q => q - .Bool(b => b - .Must( - mu => mu.Terms(t => t.Field(f => f.OrderId).Terms(orderIds)), - mu => mu.Terms(t => t.Field(f => f.TrackCode.Suffix("keyword")).Terms(trackCodes)) - ) - ) + .Size(orderIds.Length * trackCodes.Count * 2) + .Query(q => + q.Terms(t => t.Field(f => f.OrderId).Terms(orderIds)) + && q.Terms(t => t.Field(f => f.TrackCode.Suffix("keyword")).Terms(trackCodes)) ) );