Commit bf5754177c1197bdc5c1d69b468e3bbbd4138a93

Authored by 陆恒
1 parent 94b1ac90

提交

src/HttpServer/logic/function.go
@@ -613,6 +613,8 @@ func GetUserData(uuid int, req *UserLoginReq, resp *UserLoginResp) error { @@ -613,6 +613,8 @@ func GetUserData(uuid int, req *UserLoginReq, resp *UserLoginResp) error {
613 gold, err := GetCoinFromSdk(uuid, req.Gameid, req.Channel) 613 gold, err := GetCoinFromSdk(uuid, req.Gameid, req.Channel)
614 if err != nil { 614 if err != nil {
615 data.RealGold = gold 615 data.RealGold = gold
  616 + } else {
  617 + logger.Error("GetCoinFromSdk err=%v", err)
616 } 618 }
617 619
618 //处理一下领取等级奖励金币 620 //处理一下领取等级奖励金币
@@ -622,6 +624,8 @@ func GetUserData(uuid int, req *UserLoginReq, resp *UserLoginResp) error { @@ -622,6 +624,8 @@ func GetUserData(uuid int, req *UserLoginReq, resp *UserLoginResp) error {
622 gold, err := AddCoinToSdk(uuid, cfg.Cash, req.Gameid, req.Channel, 100) 624 gold, err := AddCoinToSdk(uuid, cfg.Cash, req.Gameid, req.Channel, 100)
623 if err != nil { 625 if err != nil {
624 data.RealGold = gold 626 data.RealGold = gold
  627 + } else {
  628 + logger.Error("GetCoinFromSdk err=%v", err)
625 } 629 }
626 } 630 }
627 data.LvRewardGet = 2 631 data.LvRewardGet = 2
src/HttpServer/logic/logic.go
@@ -181,6 +181,7 @@ func HandlerGetcash(w http.ResponseWriter, data string, uuid int) { @@ -181,6 +181,7 @@ func HandlerGetcash(w http.ResponseWriter, data string, uuid int) {
181 uinfo.WithDraw.Cashdata[index].Isnew = 0 181 uinfo.WithDraw.Cashdata[index].Isnew = 0
182 } 182 }
183 183
  184 + //uinfo.RealGold =
184 uinfo.RealGold -= drawnum * 100 185 uinfo.RealGold -= drawnum * 100
185 186
186 resp.Data.Walletgold = uinfo.RealGold 187 resp.Data.Walletgold = uinfo.RealGold
@@ -268,6 +269,7 @@ func HandlerGetnewlevelreward(w http.ResponseWriter, data string, uuid int) { @@ -268,6 +269,7 @@ func HandlerGetnewlevelreward(w http.ResponseWriter, data string, uuid int) {
268 resp.Code = ERROR_SRV_ERROR 269 resp.Code = ERROR_SRV_ERROR
269 break 270 break
270 } 271 }
  272 + //uinfo.RealGold =
271 uinfo.RealGold += cfg.Cash 273 uinfo.RealGold += cfg.Cash
272 274
273 if rdata.Rewardtype == 2 { 275 if rdata.Rewardtype == 2 {
@@ -278,6 +280,7 @@ func HandlerGetnewlevelreward(w http.ResponseWriter, data string, uuid int) { @@ -278,6 +280,7 @@ func HandlerGetnewlevelreward(w http.ResponseWriter, data string, uuid int) {
278 resp.Code = ERROR_SRV_ERROR 280 resp.Code = ERROR_SRV_ERROR
279 break 281 break
280 } 282 }
  283 + //uinfo.RealGold =
281 uinfo.RealGold += cfg.Extracash 284 uinfo.RealGold += cfg.Extracash
282 } 285 }
283 286
@@ -344,6 +347,7 @@ func HandlerUsersign(w http.ResponseWriter, data string, uuid int) { @@ -344,6 +347,7 @@ func HandlerUsersign(w http.ResponseWriter, data string, uuid int) {
344 break 347 break
345 } 348 }
346 349
  350 + //uinfo.RealGold =
347 _, err = AddCoinToSdk(uuid, cfg.Num, rdata.Gameid, rdata.Channel, 100) 351 _, err = AddCoinToSdk(uuid, cfg.Num, rdata.Gameid, rdata.Channel, 100)
348 if err != nil { 352 if err != nil {
349 uinfo.SignSum-- 353 uinfo.SignSum--
@@ -697,6 +701,7 @@ func HandlerDrawguangold(w http.ResponseWriter, data string, uuid int) { @@ -697,6 +701,7 @@ func HandlerDrawguangold(w http.ResponseWriter, data string, uuid int) {
697 } 701 }
698 702
699 uinfo.GuanGold = uinfo.GuanGold - rdata.Goldnum 703 uinfo.GuanGold = uinfo.GuanGold - rdata.Goldnum
  704 + //uinfo.RealGold =
700 uinfo.RealGold += rdata.Goldnum 705 uinfo.RealGold += rdata.Goldnum
701 706
702 resp.Data.Guangold = uinfo.GuanGold 707 resp.Data.Guangold = uinfo.GuanGold
@@ -790,6 +795,8 @@ func HandlerGetuserdata(w http.ResponseWriter, data string, uuid int) { @@ -790,6 +795,8 @@ func HandlerGetuserdata(w http.ResponseWriter, data string, uuid int) {
790 gold, err := GetCoinFromSdk(uuid, rdata.Gameid, rdata.Channel) 795 gold, err := GetCoinFromSdk(uuid, rdata.Gameid, rdata.Channel)
791 if err != nil { 796 if err != nil {
792 data.RealGold = gold 797 data.RealGold = gold
  798 + } else {
  799 + logger.Error("GetCoinFromSdk failed err=%v", err)
793 } 800 }
794 801
795 resp.Data.Walletgold = data.RealGold 802 resp.Data.Walletgold = data.RealGold