From f3b813eebc6d8071568cfe97960cc525b0dd6ca7 Mon Sep 17 00:00:00 2001 From: 陆恒 Date: Mon, 18 May 2020 10:06:39 +0800 Subject: [PATCH] 提交 --- src/HttpServer/jsonconf/jsonconf.go | 2 +- src/HttpServer/logic/datadef.go | 9 +++++++++ src/HttpServer/logic/function.go | 7 +++++-- src/HttpServer/logic/logic.go | 1 + 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/HttpServer/jsonconf/jsonconf.go b/src/HttpServer/jsonconf/jsonconf.go index 1a90b66..c2b4da6 100644 --- a/src/HttpServer/jsonconf/jsonconf.go +++ b/src/HttpServer/jsonconf/jsonconf.go @@ -81,7 +81,7 @@ func GetJsonConf() *GameConfig { } func GetSignConfig(round, daynum int) *SignRewardDetail { - if round > g_jsonconf.SignConfig.Round { + if round+1 > g_jsonconf.SignConfig.Round { //取reward2 if daynum > len(g_jsonconf.SignConfig.Reward.Reward2) { logger.Error("GetSignConfig failed") diff --git a/src/HttpServer/logic/datadef.go b/src/HttpServer/logic/datadef.go index 69a17e6..27a3419 100644 --- a/src/HttpServer/logic/datadef.go +++ b/src/HttpServer/logic/datadef.go @@ -297,3 +297,12 @@ type AddCoinDesc struct { Coin int `json:"coin"` Typ int `json:"typ"` } + +type GetCoinDesc struct { + Sign string `json:"sign"` + Sign_type string `json:"sign_type"` + Time_stamp string `json:"time_stamp"` + Gameid string `json:"gameid"` + Channel string `json:"channel"` + Uid int `json:"uid"` +} diff --git a/src/HttpServer/logic/function.go b/src/HttpServer/logic/function.go index 9ca01d6..d32c1e4 100644 --- a/src/HttpServer/logic/function.go +++ b/src/HttpServer/logic/function.go @@ -785,6 +785,9 @@ func DoHttpPost(bys []byte) (string, error) { } func GetCoinFromSdk(uuid int, gameid string, channel string) (int, error) { + + var params GetCoinDesc + params.Sign_type = "md5" return 0, nil } @@ -818,8 +821,8 @@ func AddCoinToSdk(uuid int, goldnum int, gameid string, channel string, atype in req.Gameid = gameid req.Coin = goldnum req.Sign = sign - req.Sign_type = sign_type - req.Time_stamp = time_stamp + req.Sign_type = "md5" + req.Time_stamp = strconv.Itoa(int(time.Now().Unix())) req.Typ = atype req.Uid = uuid diff --git a/src/HttpServer/logic/logic.go b/src/HttpServer/logic/logic.go index 2eda3e4..7e920ae 100644 --- a/src/HttpServer/logic/logic.go +++ b/src/HttpServer/logic/logic.go @@ -216,6 +216,7 @@ func HandlerQuerysigndata(w http.ResponseWriter, data string, uuid int) { resp.Data.IssignToday = uinfo.IsSignToday resp.Data.Signround = uinfo.SignRound + logger.Info("HandlerQuerysigndata resp=%v", resp) resp.Code = ERROR_OK break } -- libgit2 0.21.0