feat(order): enhance order details with user contact information and update Protobuf definitions
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 9m33s
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 9m33s
- Added Phone property to UserAddressDto for capturing the user's mobile number. - Updated GetOrderByIdQueryHandler to include user mobile in order details. - Enhanced GetCustomerOrderQueryHandler and GetCustomerOrderResponseDto to include PostalCode and UserMobile. - Modified userorder.proto to add postal_code and user_mobile fields in GetUserOrderResponse. - Bumped Protobuf project version to reflect the addition of new features.
This commit is contained in:
+3
-1
@@ -25,6 +25,7 @@ public class GetOrderByIdQueryHandler : IRequestHandler<GetOrderByIdQuery, Order
|
||||
|
||||
var order = await query
|
||||
.Include(o => o.UserAddress)
|
||||
.Include(o => o.User)
|
||||
.Include(o => o.OrderDetails)
|
||||
.ThenInclude(od => od.Product)
|
||||
.FirstOrDefaultAsync(cancellationToken);
|
||||
@@ -50,7 +51,8 @@ public class GetOrderByIdQueryHandler : IRequestHandler<GetOrderByIdQuery, Order
|
||||
{
|
||||
Title = order.UserAddress.Title,
|
||||
Address = order.UserAddress.Address,
|
||||
PostalCode = order.UserAddress.PostalCode
|
||||
PostalCode = order.UserAddress.PostalCode,
|
||||
Phone = order.User?.Mobile
|
||||
},
|
||||
Items = order.OrderDetails.Select(od => new OrderItemDto
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user