refactor: remove redundant name fields from order service
This commit is contained in:
@@ -83,20 +83,12 @@ func (l *CreateOrderLogic) CreateOrder(req *types.CreateOrderReq) (resp *types.C
|
||||
return nil, err
|
||||
}
|
||||
|
||||
consumerName := strconv.FormatInt(consumerID, 10)
|
||||
playerName := strconv.FormatInt(playerID, 10)
|
||||
shopName := ""
|
||||
if req.ShopId > 0 {
|
||||
shopName = strconv.FormatInt(req.ShopId, 10)
|
||||
}
|
||||
now := time.Now().Unix()
|
||||
status := "pending_payment"
|
||||
|
||||
addReq := &orderservice.AddOrdersReq{
|
||||
ConsumerId: consumerID,
|
||||
ConsumerName: consumerName,
|
||||
PlayerId: playerID,
|
||||
PlayerName: playerName,
|
||||
ServiceSnapshot: string(snapshotBytes),
|
||||
Status: &status,
|
||||
TotalPrice: totalPriceStr,
|
||||
@@ -105,7 +97,6 @@ func (l *CreateOrderLogic) CreateOrder(req *types.CreateOrderReq) (resp *types.C
|
||||
}
|
||||
if req.ShopId > 0 {
|
||||
addReq.ShopId = &req.ShopId
|
||||
addReq.ShopName = &shopName
|
||||
}
|
||||
if req.Note != "" {
|
||||
addReq.Note = &req.Note
|
||||
|
||||
Reference in New Issue
Block a user