fix 订单关联查询sql

This commit is contained in:
李鹏军 2024-03-05 17:25:07 +08:00
parent 327db0fab1
commit a4a04bf5a6

View File

@ -63,7 +63,7 @@ public class OrderRepository : BasicRepository<OrderEntity>, IOrderRepository, I
return await Context.Queryable<OrderLinkEntity>()
.LeftJoin<OrderLinkEntity>((a, b) => a.Id == b.OrderId)
.LeftJoin<OrderEntity>((a, b, c) => b.LinkOrderId == c.Id)
.Where(a => a.Id == orderId)
.Where(a => a.OrderId == orderId)
.Select((a, b, c) => new LinkedOrderVO
{
OrderId = c.Id,