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.
service/customer/data/wallet.go

34 lines
987 B

package data
import (
"context"
"git.oa00.com/supply-chain/service/client"
"github.com/shopspring/decimal"
)
type wallet struct {
}
type ArgsWalletMonthCount struct {
StartAt string // 年份
EndAt string // 月份
}
type WalletMonthCountItem struct {
UserId uint `json:"userId"`
UserName string `json:"userName"`
BeforePeriod decimal.Decimal `json:"beforePeriod"` // 期初
RechargeAmount decimal.Decimal `json:"rechargeAmount"` // 充值
PlaceAmount decimal.Decimal `json:"placeAmount"` // 下单
RefundAmount decimal.Decimal `json:"refundAmount"` // 退款
AfterPeriod decimal.Decimal `json:"afterPeriod"` // 期末
}
// MonthCount @Title 月消费统计
func (w *wallet) MonthCount(ctx context.Context, args ArgsWalletMonthCount) (reply []WalletMonthCountItem, err error) {
xClient, err := client.GetClient(w)
if err != nil {
return nil, err
}
err = xClient.Call(ctx, "MonthCount", args, &reply)
return
}