- Added GetUserPackageStatus functionality with mapping and service implementation. - Introduced UserOrder service methods for updating order status, applying discounts, and calculating order PV. - Created Protobuf definitions for public messages and user orders, including necessary request and response messages. - Implemented mapping profiles for package and user order related queries and commands. - Developed query handlers and validators for new commands and queries in the application layer. - Established PublicMessage service for handling public messages with appropriate gRPC endpoints.
24 lines
948 B
C#
24 lines
948 B
C#
using CMSMicroservice.Protobuf.Protos.UserOrder;
|
|
using MediatR;
|
|
using UserOrderContract = BackOffice.BFF.UserOrder.Protobuf.Protos.UserOrder.UserOrderContract;
|
|
|
|
namespace BackOffice.BFF.Application.UserOrderCQ.Queries.CalculateOrderPV;
|
|
|
|
public class CalculateOrderPVQueryHandler : IRequestHandler<CalculateOrderPVQuery, CalculateOrderPVResponse>
|
|
{
|
|
private readonly UserOrderContract.UserOrderContractClient _orderClient;
|
|
|
|
public CalculateOrderPVQueryHandler(UserOrderContract.UserOrderContractClient orderClient)
|
|
{
|
|
_orderClient = orderClient;
|
|
}
|
|
|
|
public async Task<CalculateOrderPVResponse> Handle(CalculateOrderPVQuery request, CancellationToken cancellationToken)
|
|
{
|
|
// TODO: پیادهسازی CalculateOrderPV
|
|
// 1. ایجاد gRPC Request و فراخوانی CMS
|
|
// 2. return response از CMS
|
|
throw new NotImplementedException("CalculateOrderPV needs implementation");
|
|
}
|
|
}
|