64 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			Go
		
	
	
	
	
	
		
		
			
		
	
	
			64 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			Go
		
	
	
	
	
	
|  | package stat | ||
|  | 
 | ||
|  | import ( | ||
|  | 	"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests" | ||
|  | 	"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses" | ||
|  | 	"strings" | ||
|  | ) | ||
|  | 
 | ||
|  | type GetUserTotalPayReq struct { | ||
|  | 	*requests.RpcRequest | ||
|  | } | ||
|  | 
 | ||
|  | type GetUserTotalPayParam struct { | ||
|  | 	Where   string   `json:"where"` | ||
|  | 	Fields  []string `json:"fields"` | ||
|  | 	GroupBy []string `json:"group_by"` | ||
|  | } | ||
|  | 
 | ||
|  | type GetUserTotalPayResp struct { | ||
|  | 	*responses.BaseResponse | ||
|  | 	Code int          `json:"code"` | ||
|  | 	Msg  string       `json:"msg"` | ||
|  | 	Data TotalPayList `json:"data"` | ||
|  | } | ||
|  | type TotalPayList struct { | ||
|  | 	List []TotalPay `json:"list"` | ||
|  | } | ||
|  | type TotalPay struct { | ||
|  | 	UserName      string  `json:"user_name"` | ||
|  | 	RegDate       string  `json:"reg_date"` | ||
|  | 	AgentId       int64   `json:"agent_id"` | ||
|  | 	SiteId        int64   `json:"site_id"` | ||
|  | 	GameId        int64   `json:"game_id"` | ||
|  | 	FirstPayTime  string  `json:"first_pay_time"` | ||
|  | 	FirstPayMoney float64 `json:"first_pay_money"` | ||
|  | 	TotalPayMoney float64 `json:"total_pay_money"` | ||
|  | 	LastPayTime   string  `json:"last_pay_time"` | ||
|  | 	PayTimes      int64   `json:"pay_times"` | ||
|  | 	IsFirst       int64   `json:"is_first"` | ||
|  | } | ||
|  | 
 | ||
|  | // CreateGetUserTotalPayReq 获取用户累充
 | ||
|  | func CreateGetUserTotalPayReq(data GetUserTotalPayParam) *GetUserTotalPayReq { | ||
|  | 	req := &GetUserTotalPayReq{ | ||
|  | 		&requests.RpcRequest{}, | ||
|  | 	} | ||
|  | 
 | ||
|  | 	req.InitWithApiInfo(HOST, VERSION, "/pay/getUserTotalPay") | ||
|  | 	req.Method = requests.POST | ||
|  | 	req.FormParams = make(map[string]string) | ||
|  | 	req.FormParams["where"] = data.Where | ||
|  | 	req.FormParams["fields"] = strings.Join(data.Fields, ",") | ||
|  | 	req.FormParams["group_by"] = strings.Join(data.GroupBy, ",") | ||
|  | 
 | ||
|  | 	return req | ||
|  | } | ||
|  | 
 | ||
|  | // CreateGetUserTotalPayResp 获取用户累充
 | ||
|  | func CreateGetUserTotalPayResp() *GetUserTotalPayResp { | ||
|  | 	return &GetUserTotalPayResp{ | ||
|  | 		BaseResponse: &responses.BaseResponse{}, | ||
|  | 	} | ||
|  | } |