Merge branch 'S07' into test
This commit is contained in:
commit
903a44ceaa
@ -123,11 +123,11 @@ public class TrackRefreshEventHandler : ITransientDependency, IRabbitHandler
|
|||||||
var context = new TrackRefreshContext
|
var context = new TrackRefreshContext
|
||||||
{
|
{
|
||||||
OrderId = order.MainOrderId,
|
OrderId = order.MainOrderId,
|
||||||
OrderType = attach.OrderType,
|
OrderNo = order.OrderNo,
|
||||||
OrderNo = orderNo!,
|
|
||||||
ServiceProviderCode = attach.ServiceProviderCode,
|
|
||||||
CustomId = order.CustomId,
|
CustomId = order.CustomId,
|
||||||
SubSystemId = attach.SubSystemId
|
OrderType = attach.OrderType,
|
||||||
|
SubSystemId = attach.SubSystemId,
|
||||||
|
ServiceProviderCode = attach.ServiceProviderCode
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -24,8 +24,8 @@ public interface IOrderRepository : IBasicRepository<OrderEntity>
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="serviceProviderCode">三方平台</param>
|
/// <param name="serviceProviderCode">三方平台</param>
|
||||||
/// <param name="orderNo">三方平台单号</param>
|
/// <param name="orderNo">三方平台单号</param>
|
||||||
/// <returns>(主单号id,客户id)</returns>
|
/// <returns>(主单id,主单号,客户id)</returns>
|
||||||
Task<(int MainOrderId, int CustomId)> GetTrackOrderByProviderAndOrderNo(string serviceProviderCode, string orderNo);
|
Task<(int MainOrderId, string OrderNo, int CustomId)> GetTrackOrderByProviderAndOrderNo(string serviceProviderCode, string orderNo);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 创建订单
|
/// 创建订单
|
||||||
|
|||||||
@ -236,7 +236,7 @@ public class OrderRepository : BasicRepository<OrderEntity>, IOrderRepository, I
|
|||||||
return pageList;
|
return pageList;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<(int MainOrderId, int CustomId)> GetTrackOrderByProviderAndOrderNo(string serviceProviderCode, string orderNo)
|
public async Task<(int MainOrderId, string OrderNo, int CustomId)> GetTrackOrderByProviderAndOrderNo(string serviceProviderCode, string orderNo)
|
||||||
{
|
{
|
||||||
var orderList = await Context.Queryable<OrderEntity>()
|
var orderList = await Context.Queryable<OrderEntity>()
|
||||||
.LeftJoin<OrderPlatformNumberEntity>((a, b) => a.Id == b.OrderId && b.IsDeleted == false)
|
.LeftJoin<OrderPlatformNumberEntity>((a, b) => a.Id == b.OrderId && b.IsDeleted == false)
|
||||||
@ -246,6 +246,7 @@ public class OrderRepository : BasicRepository<OrderEntity>, IOrderRepository, I
|
|||||||
{
|
{
|
||||||
a.Id,
|
a.Id,
|
||||||
a.CustomId,
|
a.CustomId,
|
||||||
|
a.OrderNo,
|
||||||
b.Platform,
|
b.Platform,
|
||||||
b.OrderNumber
|
b.OrderNumber
|
||||||
})
|
})
|
||||||
@ -260,8 +261,8 @@ public class OrderRepository : BasicRepository<OrderEntity>, IOrderRepository, I
|
|||||||
//当出现了多条记录匹配,优先使用外部单匹配提升精确度
|
//当出现了多条记录匹配,优先使用外部单匹配提升精确度
|
||||||
var matchOrder = orderList.FirstOrDefault(x => x.Platform == serviceProviderCode && x.OrderNumber == orderNo);
|
var matchOrder = orderList.FirstOrDefault(x => x.Platform == serviceProviderCode && x.OrderNumber == orderNo);
|
||||||
return matchOrder != null
|
return matchOrder != null
|
||||||
? (matchOrder.Id, matchOrder.CustomId)
|
? (matchOrder.Id, matchOrder.OrderNo, matchOrder.CustomId)
|
||||||
: (order.Id, order.CustomId);
|
: (order.Id, order.OrderNo, order.CustomId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<int> CreateOrderAsync(OrderEntity order)
|
public async Task<int> CreateOrderAsync(OrderEntity order)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user