Commit bb36a964344768de960b4fb08a0eea747357419f
1 parent
ace12c79
Exists in
master
提交
Showing
1 changed file
with
18 additions
and
4 deletions
Show diff stats
src/HttpServer/logic/function.go
@@ -236,9 +236,19 @@ func (u *UserData) CalcMainCatNum() int { | @@ -236,9 +236,19 @@ func (u *UserData) CalcMainCatNum() int { | ||
236 | return sumnum | 236 | return sumnum |
237 | } | 237 | } |
238 | 238 | ||
239 | +func GetServerKey(gameid string) string { | ||
240 | + rtkey := conf.GetCoinConf().Key | ||
241 | + if gameid == "1018" { | ||
242 | + rtkey = "f25fd935f8c7b952b3654a72eee58f89" | ||
243 | + } | ||
244 | + | ||
245 | + return rtkey | ||
246 | +} | ||
247 | + | ||
239 | //加红包接口 | 248 | //加红包接口 |
240 | func (u *UserData) AddRedPackect(num float32, atype int) (int, error) { | 249 | func (u *UserData) AddRedPackect(num float32, atype int) (int, error) { |
241 | - SERVERKEY := conf.GetCoinConf().Key | 250 | + SERVERKEY := GetServerKey(u.Gameid) |
251 | + | ||
242 | goldnum := int(num * 10000) | 252 | goldnum := int(num * 10000) |
243 | var paramlist []string | 253 | var paramlist []string |
244 | sign_type := "sign_type=md5" | 254 | sign_type := "sign_type=md5" |
@@ -1213,7 +1223,8 @@ func (w *UserWareHouseData) GetWarePosById(cid int) int { | @@ -1213,7 +1223,8 @@ func (w *UserWareHouseData) GetWarePosById(cid int) int { | ||
1213 | 1223 | ||
1214 | func GetCashFromSDK(uuid int, goldnum int, gameid, channel, openid, nickname, headurl, ver string, checkcoin int) (int, error) { | 1224 | func GetCashFromSDK(uuid int, goldnum int, gameid, channel, openid, nickname, headurl, ver string, checkcoin int) (int, error) { |
1215 | 1225 | ||
1216 | - SERVERKEY := conf.GetCoinConf().Key | 1226 | + //SERVERKEY := u.GetServerKey() //conf.GetCoinConf().Key |
1227 | + SERVERKEY := GetServerKey(gameid) | ||
1217 | 1228 | ||
1218 | if goldnum == 0 || uuid == 0 || gameid == "" || channel == "" || openid == "" || ver == "" { | 1229 | if goldnum == 0 || uuid == 0 || gameid == "" || channel == "" || openid == "" || ver == "" { |
1219 | logger.Error("GetCashFromSDK param empty") | 1230 | logger.Error("GetCashFromSDK param empty") |
@@ -1349,7 +1360,9 @@ func DoHttpPost(bys []byte, apistr string) (string, error) { | @@ -1349,7 +1360,9 @@ func DoHttpPost(bys []byte, apistr string) (string, error) { | ||
1349 | 1360 | ||
1350 | func GetCoinFromSdk(uuid int, gameid string, channel string) (int, error) { | 1361 | func GetCoinFromSdk(uuid int, gameid string, channel string) (int, error) { |
1351 | 1362 | ||
1352 | - SERVERKEY := conf.GetCoinConf().Key | 1363 | + //SERVERKEY := conf.GetCoinConf().Key |
1364 | + SERVERKEY := GetServerKey(gameid) | ||
1365 | + | ||
1353 | /*if gameid == "1015" { | 1366 | /*if gameid == "1015" { |
1354 | SERVERKEY = XIAOXINGXING_SERVERKEYTEST_1015 | 1367 | SERVERKEY = XIAOXINGXING_SERVERKEYTEST_1015 |
1355 | }*/ | 1368 | }*/ |
@@ -1410,7 +1423,8 @@ func GetCoinFromSdk(uuid int, gameid string, channel string) (int, error) { | @@ -1410,7 +1423,8 @@ func GetCoinFromSdk(uuid int, gameid string, channel string) (int, error) { | ||
1410 | } | 1423 | } |
1411 | 1424 | ||
1412 | func GetCashList(uuid int, gameid string, channel string, start int, number int) (*[]WithDrawRecord, error) { | 1425 | func GetCashList(uuid int, gameid string, channel string, start int, number int) (*[]WithDrawRecord, error) { |
1413 | - SERVERKEY := conf.GetCoinConf().Key | 1426 | + //SERVERKEY := conf.GetCoinConf().Key |
1427 | + SERVERKEY := GetServerKey(gameid) | ||
1414 | /*if gameid == "1015" { | 1428 | /*if gameid == "1015" { |
1415 | SERVERKEY = XIAOXINGXING_SERVERKEYTEST_1015 | 1429 | SERVERKEY = XIAOXINGXING_SERVERKEYTEST_1015 |
1416 | }*/ | 1430 | }*/ |