refactor: remove redundant name fields from order service

This commit is contained in:
zetaloop
2026-04-22 22:28:41 +08:00
parent b3db04c9cc
commit 2d45d7e3cb
21 changed files with 179 additions and 1062 deletions
@@ -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)
}