You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
816 B
35 lines
816 B
2 years ago
|
package user
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
"git.oa00.com/supply-chain/service/client"
|
||
|
"github.com/shopspring/decimal"
|
||
|
)
|
||
|
|
||
|
type wallet struct {
|
||
|
}
|
||
|
type walletType uint // 费用类型
|
||
|
|
||
|
const (
|
||
|
WalletTypeIncome walletType = 1 // 收入
|
||
|
WalletTypeExpend walletType = 2 // 支出
|
||
|
|
||
|
WalletStatusHandle = 1 // 处理中
|
||
|
WalletStatusSuccess = 2 // 成功
|
||
|
WalletStatusFail = 3 // 失败
|
||
|
)
|
||
|
|
||
|
type ArgsWalletDirect struct {
|
||
|
UserId uint // 客户id
|
||
|
WalletType walletType // 收支类型
|
||
|
Amount decimal.Decimal // 金额 正数
|
||
|
ServiceId uint // 服务id
|
||
|
Remark string // 备注信息
|
||
|
}
|
||
|
|
||
|
// Direct @Title 直接消费
|
||
|
func (w *wallet) Direct(ctx context.Context, args ArgsDepositAuditReject) error {
|
||
|
reply := 0
|
||
|
return client.GetClient(w).Call(ctx, "Direct", args, &reply)
|
||
|
}
|