Compare commits

...

4 Commits

@ -2,6 +2,7 @@ package customer
import (
"git.oa00.com/supply-chain/service/customer/batchSku"
"git.oa00.com/supply-chain/service/customer/finance"
"git.oa00.com/supply-chain/service/customer/service"
"git.oa00.com/supply-chain/service/customer/sku"
)
@ -11,4 +12,5 @@ type Customer struct {
Service service.Service
Sku sku.Sku
BatchSku batchSku.BatchSku
Finance finance.Finance
}

@ -0,0 +1,5 @@
package finance
type Finance struct {
Wallet wallet
}

@ -0,0 +1,60 @@
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
}

@ -70,6 +70,7 @@ type ReplyEnterpriseInfo struct {
ContactEmail string `json:"contactEmail"`
ContactPhone string `json:"contactPhone"`
Position string `json:"position"`
PaytaxesPhoto string `json:"paytaxesPhoto"`
}
// Info @Title 审核详情

Loading…
Cancel
Save