Merge remote-tracking branch 'origin/S03-轨迹中台优化项' into test

This commit is contained in:
dingenwen 2024-04-25 19:09:53 +08:00
commit 91794b10e0
2 changed files with 6 additions and 10 deletions

View File

@ -155,7 +155,7 @@ public class TrackPushEventHandler : ITransientDependency, ICapSubscribe
if (r.Code != InterfaceRelayConst.SuccessCode) 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) if (r.Code != InterfaceRelayConst.SuccessCode)
{ {
throw new BusinessException(message: r.Msg); throw new BusinessException(message: $"requestId: {r.Data}; {r.Msg}");
} }
} }

View File

@ -236,14 +236,10 @@ internal class TrackDetailsRepository : ElasticSearchContextAbstract<TrackDetail
{ {
var search = await Context.SearchAsync<TrackDetailsIndex>(x => x var search = await Context.SearchAsync<TrackDetailsIndex>(x => x
.Source(s => s.Includes(fd => fd.Field(f => f.IndexName))) .Source(s => s.Includes(fd => fd.Field(f => f.IndexName)))
.Size(1000) .Size(orderIds.Length * trackCodes.Count * 2)
.Query(q => q .Query(q =>
.Bool(b => b q.Terms(t => t.Field(f => f.OrderId).Terms(orderIds))
.Must( && q.Terms(t => t.Field(f => f.TrackCode.Suffix("keyword")).Terms(trackCodes))
mu => mu.Terms(t => t.Field(f => f.OrderId).Terms(orderIds)),
mu => mu.Terms(t => t.Field(f => f.TrackCode.Suffix("keyword")).Terms(trackCodes))
)
)
) )
); );