feat: align ids to int64
This commit is contained in:
@@ -12,7 +12,6 @@ import (
|
||||
"quyun/v2/pkg/consts"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/spf13/cast"
|
||||
"go.ipao.vip/gen/types"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
@@ -55,7 +54,7 @@ func (s *wallet) GetWallet(ctx context.Context, userID int64) (*user_dto.WalletR
|
||||
}
|
||||
|
||||
txs = append(txs, user_dto.Transaction{
|
||||
ID: cast.ToString(o.ID),
|
||||
ID: o.ID,
|
||||
Title: title,
|
||||
Amount: float64(o.AmountPaid) / 100.0,
|
||||
Type: txType,
|
||||
@@ -98,13 +97,13 @@ func (s *wallet) Recharge(
|
||||
|
||||
// MOCK: Automatically pay for recharge order to close the loop
|
||||
// In production, this would be a callback from payment gateway
|
||||
if err := Order.ProcessExternalPayment(ctx, cast.ToString(order.ID), "mock_auto_pay"); err != nil {
|
||||
if err := Order.ProcessExternalPayment(ctx, order.ID, "mock_auto_pay"); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Mock Pay Params
|
||||
return &user_dto.RechargeResponse{
|
||||
PayParams: "mock_paid_success",
|
||||
OrderID: cast.ToString(order.ID),
|
||||
OrderID: order.ID,
|
||||
}, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user