Commit 8db44b7ba5fcf6a5e8adc4b587467f4118459430

Authored by 陆恒
1 parent d47147d3
Exists in master

提交

src/HttpServer/logic/function.go
... ... @@ -907,7 +907,8 @@ func GetCashFromSDK(uuid int, goldnum int, gameid, channel, openid, nickname, he
907 907 phead := "headurl=" + headurl
908 908 pnickname := "nickname=" + nickname
909 909 popenid := "openid=" + openid
910   - pmoney := "money=" + strconv.Itoa(goldnum)
  910 + money := goldnum/100
  911 + pmoney := "money=" + strconv.Itoa(money)
911 912 ptype := "typ=" + "6" //微信
912 913 ped := "editcoin=1"
913 914 pcheco := "checkcoin=" + strconv.Itoa(checkcoin)
... ...
src/HttpServer/logic/logic.go
... ... @@ -332,7 +332,7 @@ func HandlerGetcashrecord(w http.ResponseWriter, data string, uniqueuuid, gameid
332 332 resp.Message = "success"
333 333 for {
334 334  
335   - uinfo, err := GetUserInfo(strconv.Itoa(uuid))
  335 + uinfo, err := GetUserInfo(uniqueuuid)
336 336 if err != nil || uinfo == nil {
337 337 logger.Error("HandlerGetcashrecord getuserinfo failed=%v", err)
338 338 resp.Code = 1
... ... @@ -372,7 +372,9 @@ func HandlerGetcash(w http.ResponseWriter, data string, uniqueuuid, gameid, chan
372 372 resp.Message = "json failed"
373 373 break
374 374 }
375   - uinfo, err := GetUserInfo(strconv.Itoa(uuid))
  375 +
  376 + uniqueid := strconv.Itoa(uuid) + channel
  377 + uinfo, err := GetUserInfo(uniqueid)
376 378 if err != nil || uinfo == nil {
377 379 logger.Error("HandlerGetcash getuserinfo failed=%v", err)
378 380 resp.Code = 1
... ... @@ -445,7 +447,7 @@ func HandlerGetcash(w http.ResponseWriter, data string, uniqueuuid, gameid, chan
445 447 resp.Data.Walletgold = gold
446 448  
447 449 //保存
448   - SaveUserInfo(uinfo, strconv.Itoa(uuid))
  450 + SaveUserInfo(uinfo, uniqueid)
449 451  
450 452 break
451 453  
... ...