attach
This commit is contained in:
parent
5cda1270fb
commit
761446c069
@ -4,7 +4,7 @@ namespace SJZY.Track.Domain.Aggregates.TrackDetailsAggregate;
|
|||||||
|
|
||||||
public interface ITrackDetailsRepository
|
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);
|
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)
|
public async Task<List<MatchTrackContentDto>> MatchTrackContentAsync(int[] orderIds, string code)
|
||||||
{
|
{
|
||||||
|
if (orderIds.Length == 0) return new List<MatchTrackContentDto>();
|
||||||
return await Context.Queryable<OrderTemplateEntity>()
|
return await Context.Queryable<OrderTemplateEntity>()
|
||||||
.LeftJoin<TrackTemplateContentEntity>((x, a) => x.TrackTemplateId == a.TrackTemplateId)
|
.LeftJoin<TrackTemplateContentEntity>((x, a) => x.TrackTemplateId == a.TrackTemplateId)
|
||||||
.LeftJoin<TrackContentEntity>((x, a, b) => a.TrackContentId == b.Id)
|
.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,
|
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
|
? await Context.SearchAsync<TrackDetailsIndex>(s => s
|
||||||
.Source()
|
.Source()
|
||||||
.Size(1000)
|
.Size(1000)
|
||||||
@ -31,7 +31,8 @@ internal class TrackDetailsRepository : ElasticSearchContextAbstract<TrackDetail
|
|||||||
)
|
)
|
||||||
: await Context.SearchAsync<TrackDetailsIndex>(s => s
|
: await Context.SearchAsync<TrackDetailsIndex>(s => s
|
||||||
.Source(s2 => s2.Includes(fd => fd
|
.Source(s2 => s2.Includes(fd => fd
|
||||||
.Field(f => f.IndexName)))
|
.Field(f => f.IndexName)
|
||||||
|
.Field(f => f.OrderId)))
|
||||||
.Size(1000)
|
.Size(1000)
|
||||||
.Query(q => q
|
.Query(q => q
|
||||||
.Bool(b => b
|
.Bool(b => b
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user