新增获取用户充值汇总
This commit is contained in:
parent
7e91e7ff9f
commit
4e8bd6579f
@ -87,6 +87,14 @@ func (c *Client) GetUserPay(req *GetUserPayRequest) (response *GetUserPayRespons
|
||||
return
|
||||
}
|
||||
|
||||
// GetTotal
|
||||
// 获取用户充值汇总
|
||||
func (c *Client) GetTotal(req *GetTotalRequest) (response *GetTotalResponse, err error) {
|
||||
response = CreateGetTotalResponse()
|
||||
err = c.DoAction(req, response)
|
||||
return
|
||||
}
|
||||
|
||||
// GetUserVoucher
|
||||
// 获取用户代金券
|
||||
func (c *Client) GetUserVoucher(req *GetUserVoucherRequest) (response *GetUserVoucherResponse, err error) {
|
||||
|
||||
42
services/pay/get_total.go
Normal file
42
services/pay/get_total.go
Normal 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
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user