From dc305b07be5e817c73e6639684c44a91713c4ff1 Mon Sep 17 00:00:00 2001 From: xuyang Date: Mon, 11 May 2026 18:58:41 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=91=E9=A2=9D=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- services/game/client_test.go | 20 ++++++++++---------- services/game/pay.go | 24 +++++++++++++----------- 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/services/game/client_test.go b/services/game/client_test.go index 73c7e72..da15de4 100644 --- a/services/game/client_test.go +++ b/services/game/client_test.go @@ -386,16 +386,16 @@ func TestGetActivityVipUserNewBlacklist(t *testing.T) { func TestCreateMakeOrderReq(t *testing.T) { req := CreateMakeOrderReq(MakeOrderParam{ - Username: "vd22543241", - Gid: 123, - Sid: "123", - RealSid: "123", - RoleId: "123", - RoleName: "13", - Money: 6, - ServerName: "333", - ProductName: "666", - DwId: 666, + Username: "rz35990497", + Gid: 7874, + Sid: "1562", + RealSid: "", + RoleId: "587102307", + RoleName: "繁华之泰坦", + Money: 630, + ServerName: "碧水连天", + ProductName: "630", + DwId: 1008, }) client, err := NewClient() diff --git a/services/game/pay.go b/services/game/pay.go index 5f97dae..46bdc48 100644 --- a/services/game/pay.go +++ b/services/game/pay.go @@ -1,6 +1,8 @@ package game import ( + "fmt" + "golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests" "golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses" ) @@ -62,16 +64,16 @@ func CreateIsBlockOutIosResp() *IsBlockOutIosResp { // MakeOrderReq 预下单请求 type MakeOrderReq struct { *requests.RpcRequest - Username string `position:"Body" field:"username"` - Gid int64 `position:"Body" field:"gid"` - Sid string `position:"Body" field:"sid"` - RealSid string `position:"Body" field:"real_sid"` - RoleId string `position:"Body" field:"role_id"` - RoleName string `position:"Body" field:"role_name"` - Money float64 `position:"Body" field:"money"` - ServerName string `position:"Body" field:"server_name"` - ProductName string `position:"Body" field:"product_name"` - DwId int64 `position:"Body" field:"dw_id"` + Username string `position:"Body" field:"username"` + Gid int64 `position:"Body" field:"gid"` + Sid string `position:"Body" field:"sid"` + RealSid string `position:"Body" field:"real_sid"` + RoleId string `position:"Body" field:"role_id"` + RoleName string `position:"Body" field:"role_name"` + Money string `position:"Body" field:"money"` + ServerName string `position:"Body" field:"server_name"` + ProductName string `position:"Body" field:"product_name"` + DwId int64 `position:"Body" field:"dw_id"` } type MakeOrderRespData struct { @@ -107,7 +109,7 @@ func CreateMakeOrderReq(param MakeOrderParam) *MakeOrderReq { RealSid: param.RealSid, RoleId: param.RoleId, RoleName: param.RoleName, - Money: param.Money, + Money: fmt.Sprintf("%v", param.Money), ServerName: param.ServerName, ProductName: param.ProductName, DwId: param.DwId,