diff --git a/services/pay/client.go b/services/pay/client.go index f4f088c..8aab99e 100644 --- a/services/pay/client.go +++ b/services/pay/client.go @@ -6,7 +6,7 @@ import ( ) const ( - VERSION = "2025-10-24" + VERSION = "2025-11-17" ) var HOST requests.Host = requests.Host{ @@ -70,3 +70,11 @@ func (c *Client) GetVipInfo(req *GetVipInfoRequest) (response *GetVipInfoRespons err = c.DoAction(req, response) return } + +// GetUserScoreLog +// 获取用户成长值流水信息 +func (c *Client) GetUserScoreLog(req *GetUserScoreLogRequest) (response *GetUserScoreLogResponse, err error) { + response = CreateGetUserScoreLogResponse() + err = c.DoAction(req, response) + return +} diff --git a/services/pay/get_user_score_log.go b/services/pay/get_user_score_log.go new file mode 100644 index 0000000..fb80f95 --- /dev/null +++ b/services/pay/get_user_score_log.go @@ -0,0 +1,58 @@ +package pay + +import ( + "golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests" + "golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses" +) + +type GetUserScoreLogRequest struct { + *requests.RpcRequest + UserName string `position:"Body" field:"user_name" default:"" ` + MaxId int `position:"Body" field:"max_id" ` + Limit int `position:"Body" field:"limit"` + Status int `position:"Body" field:"status"` + StartTime string `position:"Body" field:"start_time"` +} + +type UserScoreLog struct { + Id int `json:"id"` + UserName string `json:"user_name"` // 用户名 + Status int `json:"status"` + Type int `json:"type"` + Orderid string `json:"orderid"` + Amount float64 `json:"amount"` + Score float64 `json:"score"` + SyncDate string `json:"sync_date"` + CompleteDate string `json:"complete_date"` + CreatedAt string `json:"created_at"` +} + +type GetUserScoreLogResponse struct { + *responses.BaseResponse + Code int `json:"code"` + Msg string `json:"msg"` + Data struct { + List []UserScoreLog `json:"list"` + } `json:"data"` +} + +func CreateGetUserScoreLogRequest(userName, startTime string, maxId, status, Limit int) (req *GetUserScoreLogRequest) { + req = &GetUserScoreLogRequest{ + RpcRequest: &requests.RpcRequest{}, + UserName: userName, + MaxId: maxId, + Limit: Limit, + Status: status, + StartTime: startTime, + } + req.InitWithApiInfo(HOST, VERSION, "/api/user/getUserScoreLog") + req.Method = requests.POST + return +} + +func CreateGetUserScoreLogResponse() (response *GetUserScoreLogResponse) { + response = &GetUserScoreLogResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +}