From bb36a964344768de960b4fb08a0eea747357419f Mon Sep 17 00:00:00 2001 From: 陆恒 Date: Sat, 11 Jul 2020 10:12:16 +0800 Subject: [PATCH] 提交 --- src/HttpServer/logic/function.go | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/HttpServer/logic/function.go b/src/HttpServer/logic/function.go index c072ff1..ca71cd1 100644 --- a/src/HttpServer/logic/function.go +++ b/src/HttpServer/logic/function.go @@ -236,9 +236,19 @@ func (u *UserData) CalcMainCatNum() int { return sumnum } +func GetServerKey(gameid string) string { + rtkey := conf.GetCoinConf().Key + if gameid == "1018" { + rtkey = "f25fd935f8c7b952b3654a72eee58f89" + } + + return rtkey +} + //加红包接口 func (u *UserData) AddRedPackect(num float32, atype int) (int, error) { - SERVERKEY := conf.GetCoinConf().Key + SERVERKEY := GetServerKey(u.Gameid) + goldnum := int(num * 10000) var paramlist []string sign_type := "sign_type=md5" @@ -1213,7 +1223,8 @@ func (w *UserWareHouseData) GetWarePosById(cid int) int { func GetCashFromSDK(uuid int, goldnum int, gameid, channel, openid, nickname, headurl, ver string, checkcoin int) (int, error) { - SERVERKEY := conf.GetCoinConf().Key + //SERVERKEY := u.GetServerKey() //conf.GetCoinConf().Key + SERVERKEY := GetServerKey(gameid) if goldnum == 0 || uuid == 0 || gameid == "" || channel == "" || openid == "" || ver == "" { logger.Error("GetCashFromSDK param empty") @@ -1349,7 +1360,9 @@ func DoHttpPost(bys []byte, apistr string) (string, error) { func GetCoinFromSdk(uuid int, gameid string, channel string) (int, error) { - SERVERKEY := conf.GetCoinConf().Key + //SERVERKEY := conf.GetCoinConf().Key + SERVERKEY := GetServerKey(gameid) + /*if gameid == "1015" { SERVERKEY = XIAOXINGXING_SERVERKEYTEST_1015 }*/ @@ -1410,7 +1423,8 @@ func GetCoinFromSdk(uuid int, gameid string, channel string) (int, error) { } func GetCashList(uuid int, gameid string, channel string, start int, number int) (*[]WithDrawRecord, error) { - SERVERKEY := conf.GetCoinConf().Key + //SERVERKEY := conf.GetCoinConf().Key + SERVERKEY := GetServerKey(gameid) /*if gameid == "1015" { SERVERKEY = XIAOXINGXING_SERVERKEYTEST_1015 }*/ -- libgit2 0.21.0