wallet

package
v0.4.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 20, 2022 License: GPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewWallet

func NewWallet(v *wallet.Wallet, repo wallet.IWalletRepo) wallet.IWallet

Types

type WalletImpl

type WalletImpl struct {
	// contains filtered or unexported fields
}

func (*WalletImpl) Adjust

func (w *WalletImpl) Adjust(value int, title, outerNo string,
	remark string, operatorUid int, operatorName string) error

Adjust 调整余额,可能存在扣为负数的情况,需传入操作人员编号或操作人员名称

func (*WalletImpl) CarryTo added in v0.4.4

func (w *WalletImpl) CarryTo(d wallet.OperateData, freeze bool, procedureFee int) (int, error)

func (*WalletImpl) Charge

func (w *WalletImpl) Charge(value int, by int, title, outerNo string, remark string, operatorUid int, operatorName string) error

func (*WalletImpl) Consume

func (w *WalletImpl) Consume(amount int, title string, outerNo string, remark string) error

Consume 消费

func (*WalletImpl) Discount

func (w *WalletImpl) Discount(value int, title, outerNo string, must bool) error

Discount 支付抵扣,must是否必须大于0

func (*WalletImpl) FinishWithdrawal

func (w *WalletImpl) FinishWithdrawal(takeId int64, outerNo string) error

func (*WalletImpl) Freeze

func (w *WalletImpl) Freeze(data wallet.OperateData, operator wallet.Operator) (int, error)

func (*WalletImpl) FreezeExpired

func (w *WalletImpl) FreezeExpired(value int, remark string) error

func (*WalletImpl) Get

func (w *WalletImpl) Get() wallet.Wallet

func (*WalletImpl) GetAggregateRootId

func (w *WalletImpl) GetAggregateRootId() int64

func (*WalletImpl) GetLog

func (w *WalletImpl) GetLog(logId int64) wallet.WalletLog

func (*WalletImpl) Hash

func (w *WalletImpl) Hash() string

func (*WalletImpl) NodeId

func (w *WalletImpl) NodeId() int

func (*WalletImpl) PagingLog

func (w *WalletImpl) PagingLog(begin int, over int, opt map[string]string, sort string) (int, []*wallet.WalletLog)

func (*WalletImpl) ReceiveTransfer

func (w *WalletImpl) ReceiveTransfer(fromWalletId int64, value int, tradeNo, title, remark string) error

func (*WalletImpl) Refund

func (w *WalletImpl) Refund(value int, kind int, title, outerNo string, operatorUid int, operatorName string) error

func (*WalletImpl) RequestWithdrawal

func (w *WalletImpl) RequestWithdrawal(amount int, tradeFee int, kind int, title string,
	accountNo string, accountName string, bankName string) (int64, string, error)

申请提现,kind:提现方式,返回info_id,交易号 及错误,value为提现金额,tradeFee为手续费

func (*WalletImpl) ReviewWithdrawal

func (w *WalletImpl) ReviewWithdrawal(takeId int64, pass bool, remark string, operatorUid int, operatorName string) error

func (*WalletImpl) Save

func (w *WalletImpl) Save() (int64, error)

func (*WalletImpl) State

func (w *WalletImpl) State() int

func (*WalletImpl) Transfer

func (w *WalletImpl) Transfer(toWalletId int64, value int, tradeFee int, title, toTitle, remark string) error

func (*WalletImpl) Unfreeze

func (w *WalletImpl) Unfreeze(value int, title, outerNo string, operatorUid int, operatorName string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL