Merge remote-tracking branch 'origin/S03-轨迹中台优化项' into test
This commit is contained in:
commit
8dc31a93e5
@ -4,7 +4,7 @@ namespace SJZY.Track.Domain.Aggregates.TrackDetailsAggregate;
|
||||
|
||||
public interface ITrackDetailsRepository
|
||||
{
|
||||
Task<List<TrackDetailsIndex>> GetListAsync(int[] orderIds, string trackCode, bool onlyIndexName = false);
|
||||
Task<List<TrackDetailsIndex>> GetListAsync(int[] orderIds, string trackCode, bool forUpsert = false);
|
||||
|
||||
Task<List<TrackDetailsIndex>> GetLatestListAsync(int[] eventOrderIds, List<string> trackCodes);
|
||||
|
||||
|
||||
@ -52,6 +52,7 @@ public class ProvideQueries : ISugarRepository, IProvideQueries,
|
||||
|
||||
public async Task<List<MatchTrackContentDto>> MatchTrackContentAsync(int[] orderIds, string code)
|
||||
{
|
||||
if (orderIds.Length == 0) return new List<MatchTrackContentDto>();
|
||||
return await Context.Queryable<OrderTemplateEntity>()
|
||||
.LeftJoin<TrackTemplateContentEntity>((x, a) => x.TrackTemplateId == a.TrackTemplateId)
|
||||
.LeftJoin<TrackContentEntity>((x, a, b) => a.TrackContentId == b.Id)
|
||||
|
||||
@ -14,9 +14,9 @@ internal class TrackDetailsRepository : ElasticSearchContextAbstract<TrackDetail
|
||||
}
|
||||
|
||||
public async Task<List<TrackDetailsIndex>> GetListAsync(int[] orderIds, string trackCode,
|
||||
bool onlyIndexName = false)
|
||||
bool forUpsert = false)
|
||||
{
|
||||
var r = !onlyIndexName
|
||||
var r = !forUpsert
|
||||
? await Context.SearchAsync<TrackDetailsIndex>(s => s
|
||||
.Source()
|
||||
.Size(1000)
|
||||
@ -31,7 +31,8 @@ internal class TrackDetailsRepository : ElasticSearchContextAbstract<TrackDetail
|
||||
)
|
||||
: await Context.SearchAsync<TrackDetailsIndex>(s => s
|
||||
.Source(s2 => s2.Includes(fd => fd
|
||||
.Field(f => f.IndexName)))
|
||||
.Field(f => f.IndexName)
|
||||
.Field(f => f.OrderId)))
|
||||
.Size(1000)
|
||||
.Query(q => q
|
||||
.Bool(b => b
|
||||
|
||||
Loading…
Reference in New Issue
Block a user