refactor: remove redundant name fields from order service
This commit is contained in:
@@ -49,18 +49,13 @@ func (l *AddOrdersLogic) AddOrders(in *pb.AddOrdersReq) (*pb.AddOrdersResp, erro
|
||||
creator := l.svcCtx.OrderModelsRW.Orders.Create().
|
||||
SetID(orderID).
|
||||
SetConsumerID(in.ConsumerId).
|
||||
SetConsumerName(in.ConsumerName).
|
||||
SetPlayerID(in.PlayerId).
|
||||
SetPlayerName(in.PlayerName).
|
||||
SetServiceSnapshot(serviceSnapshot).
|
||||
SetTotalPrice(totalPrice)
|
||||
|
||||
if in.ShopId != nil {
|
||||
creator = creator.SetShopID(*in.ShopId)
|
||||
}
|
||||
if in.ShopName != nil {
|
||||
creator = creator.SetShopName(*in.ShopName)
|
||||
}
|
||||
if in.Status != nil && *in.Status != "" {
|
||||
creator = creator.SetStatus(*in.Status)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user