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.
58 lines
1.6 KiB
58 lines
1.6 KiB
package user
|
|
|
|
import (
|
|
"context"
|
|
"git.oa00.com/supply-chain/service/client"
|
|
"git.oa00.com/supply-chain/service/lib/bean"
|
|
"github.com/shopspring/decimal"
|
|
)
|
|
|
|
type walletHistory struct {
|
|
}
|
|
|
|
const (
|
|
WalletHistoryOrderIdAsc = 1 // 排序 id正序
|
|
WalletHistoryOrderIdDesc = 2 // 排序 id 倒序
|
|
)
|
|
|
|
type ArgsWalletHistoryLists struct {
|
|
Search WalletHistorySearch
|
|
Page bean.Page
|
|
Orders []uint
|
|
}
|
|
|
|
type WalletHistorySearch struct {
|
|
StartTime string // 格式 2006-01-02 15:04:05 开始时间
|
|
EndTime string // 格式 2006-01-02 15:04:05 截止时间
|
|
}
|
|
|
|
type ReplyWalletHistoryList struct {
|
|
Lists []WalletHistoryItem `json:"lists"`
|
|
Total int64 `json:"total"`
|
|
}
|
|
type WalletHistoryItem struct {
|
|
Id uint `json:"id"`
|
|
UserId uint `json:"userId"`
|
|
UserName string `json:"userName"`
|
|
Type uint `json:"type"`
|
|
Title string `json:"title"`
|
|
BeforeAmount decimal.Decimal `json:"beforeAmount"`
|
|
Amount decimal.Decimal `json:"amount"`
|
|
AfterAmount decimal.Decimal `json:"afterAmount"`
|
|
TradeChannel string `json:"tradeChannel"`
|
|
TradeSerialSn string `json:"tradeSerialSn"`
|
|
Remark string `json:"remark"`
|
|
ServiceId uint `json:"serviceId"`
|
|
CreatedAt int64 `json:"createdAt"`
|
|
}
|
|
|
|
// Lists @Title 消费记录
|
|
func (w *walletHistory) Lists(ctx context.Context, args ArgsWalletHistoryLists) (reply ReplyWalletHistoryList, err error) {
|
|
xClient, err := client.GetClient(w)
|
|
if err != nil {
|
|
return
|
|
}
|
|
err = xClient.Call(ctx, "Lists", args, &reply)
|
|
return
|
|
}
|