7
0

Compare commits

...

1 Commits

Author SHA1 Message Date
明炜 卢
4e8bd6579f 新增获取用户充值汇总 2026-04-30 15:19:58 +08:00
2 changed files with 50 additions and 0 deletions

View File

@ -87,6 +87,14 @@ func (c *Client) GetUserPay(req *GetUserPayRequest) (response *GetUserPayRespons
return return
} }
// GetTotal
// 获取用户充值汇总
func (c *Client) GetTotal(req *GetTotalRequest) (response *GetTotalResponse, err error) {
response = CreateGetTotalResponse()
err = c.DoAction(req, response)
return
}
// GetUserVoucher // GetUserVoucher
// 获取用户代金券 // 获取用户代金券
func (c *Client) GetUserVoucher(req *GetUserVoucherRequest) (response *GetUserVoucherResponse, err error) { func (c *Client) GetUserVoucher(req *GetUserVoucherRequest) (response *GetUserVoucherResponse, err error) {

42
services/pay/get_total.go Normal file
View File

@ -0,0 +1,42 @@
package pay
import (
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses"
)
type GetTotalRequest struct {
*requests.RpcRequest
UserName string `position:"Body" field:"user_name" default:"" `
Appid int64 `position:"Body" field:"appid"`
}
type GetTotalResponse struct {
*responses.BaseResponse
Code int `json:"code"`
Msg string `json:"msg"`
Data struct {
UserName string `json:"user_name"`
TotalPaid float64 `json:"total_paid"`
TotalTimes int64 `json:"total_times"`
MaxPaid float64 `json:"max_paid"`
} `json:"data"`
}
func CreateGetTotalRequest(userName string, appid int64) (req *GetTotalRequest) {
req = &GetTotalRequest{
RpcRequest: &requests.RpcRequest{},
UserName: userName,
Appid: appid,
}
req.InitWithApiInfo(HOST, VERSION, "/api/user/getTotal")
req.Method = requests.POST
return
}
func CreateGetTotalResponse() (response *GetTotalResponse) {
response = &GetTotalResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}