feat:预存款记录

master
howell 3 years ago
parent c967d48384
commit 5599f0bb58

@ -378,6 +378,7 @@ func payDeposit(tx *gorm.DB, orderInfo order.Information, wallet *jyy.UserWallet
Amount: orderInfo.ActualTotalAmount.Neg(),
Current: wallet.Deposit,
Kind: 1,
OrderID: uint64(orderInfo.ID),
}).Error; e != nil {
return e
}

@ -60,6 +60,7 @@ func RefundDeposit(tx *gorm.DB, asGoods *after.RecookAfterSalesGoodsModel) error
Amount: asGoods.RefundAmount,
Current: wallet.Deposit,
Kind: 2,
OrderID: uint64(asGoods.OrderId),
}).Error; err != nil {
return err
}

@ -136,6 +136,7 @@ type UserWalletRecord struct {
CreatedAt *time.Time `json:"created_at" gorm:"autoCreateTime"`
Current decimal.Decimal `json:"current"`
Kind int `json:"kind"`
OrderID uint64 `json:"order_id"`
}
func (o UserWalletRecord) TableName() string {

Loading…
Cancel
Save