Compare commits
No commits in common. 'c127a9ed1723e7a7ebbc47aa81781b120d0c5a41' and '27da6cc990e7e04ea9540060f58492a712895bd4' have entirely different histories.
c127a9ed17
...
27da6cc990
@ -1,5 +0,0 @@
|
|||||||
package finance
|
|
||||||
|
|
||||||
type Finance struct {
|
|
||||||
Wallet wallet
|
|
||||||
}
|
|
@ -1,60 +0,0 @@
|
|||||||
package finance
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"git.oa00.com/supply-chain/service/client"
|
|
||||||
"github.com/shopspring/decimal"
|
|
||||||
)
|
|
||||||
|
|
||||||
type wallet struct {
|
|
||||||
}
|
|
||||||
|
|
||||||
type ArgsWalletDetail struct {
|
|
||||||
Year uint // 年份
|
|
||||||
Month uint // 月份
|
|
||||||
}
|
|
||||||
|
|
||||||
type WalletItem struct {
|
|
||||||
CustomerName string `json:"customerName"` // 客户名称
|
|
||||||
CreatedAt int64 `json:"createdAt"` // 交易时间
|
|
||||||
Type uint `json:"type"` // 交易类型
|
|
||||||
Amount decimal.Decimal `json:"amount"` // 交易金额
|
|
||||||
AfterAmount decimal.Decimal `json:"afterAmount"` // 交易后余额
|
|
||||||
TradeChannel string `json:"tradeChannel"` // 交易渠道
|
|
||||||
TradeSerialSn string `json:"tradeSerialSn"` // 交易流水号
|
|
||||||
Remark string `json:"remark"` // 交易备注
|
|
||||||
}
|
|
||||||
|
|
||||||
// WalletDetail @Title 余额统计
|
|
||||||
func (w *wallet) WalletDetail(ctx context.Context, args ArgsWalletDetail) (reply []WalletItem, err error) {
|
|
||||||
xClient, err := client.GetClient(w)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
err = xClient.Call(ctx, "WalletDetail", args, &reply)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
type ArgsUserWallet struct {
|
|
||||||
Year uint // 年份
|
|
||||||
Month uint // 月份
|
|
||||||
}
|
|
||||||
|
|
||||||
type UserWalletItem struct {
|
|
||||||
CustomerName string `json:"customerName"`
|
|
||||||
BeforeAmount decimal.Decimal `json:"beforeAmount"` // 期初余额
|
|
||||||
AfterAmount decimal.Decimal `json:"afterAmount"` // 期末余额
|
|
||||||
ConsumeAmount decimal.Decimal `json:"consumeAmount"` // 消费金额
|
|
||||||
ReturnAmount decimal.Decimal `json:"returnAmount"` // 退款金额
|
|
||||||
RechargeAmount decimal.Decimal `json:"rechargeAmount"` // 充值金额
|
|
||||||
}
|
|
||||||
|
|
||||||
// UserWallet @Title 客户余额
|
|
||||||
func (w *wallet) UserWallet(ctx context.Context, args ArgsWalletDetail) (reply []UserWalletItem, err error) {
|
|
||||||
xClient, err := client.GetClient(w)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
err = xClient.Call(ctx, "UserWallet", args, &reply)
|
|
||||||
return
|
|
||||||
}
|
|
Loading…
Reference in new issue