Commit aca91e5d1545fe3953e0b227d78fa9c4d22e6eb6
1 parent
ef8ff3d9
Exists in
master
and in
4 other branches
提交
Showing
3 changed files
with
16 additions
and
2 deletions
Show diff stats
src/HttpServer/logic/function.go
... | ... | @@ -575,6 +575,19 @@ func GetUserData(uuid int, req *UserLoginReq,resp *UserLoginResp) error{ |
575 | 575 | data.RealGold = gold |
576 | 576 | } |
577 | 577 | |
578 | + //处理一下领取等级奖励金币 | |
579 | + if data.LvRewardGet == 1 { | |
580 | + cfg := GetUserLvConfig(data.Lv) | |
581 | + if cfg != nil { | |
582 | + gold,err := AddCoinToSdk(uuid,cfg.Cash,req.Gameid,req.Channel,100) | |
583 | + if err != nil { | |
584 | + data.RealGold = gold | |
585 | + } | |
586 | + } | |
587 | + data.LvRewardGet = 2 | |
588 | + | |
589 | + } | |
590 | + | |
578 | 591 | SaveUserInfo(data) |
579 | 592 | |
580 | 593 | resp.Data.Walletgold = data.RealGold | ... | ... |
src/HttpServer/logic/httpserver.go
... | ... | @@ -139,7 +139,7 @@ func Updatetaskandachieve(w http.ResponseWriter, r *http.Request) { |
139 | 139 | r.Body.Close() |
140 | 140 | |
141 | 141 | s := string(result) |
142 | - logger.Info("Onlinentf , body:%v,uuid=%v", s, Uuid) | |
142 | + logger.Info("Updatetaskandachieve , body:%v,uuid=%v", s, Uuid) | |
143 | 143 | |
144 | 144 | HandlerUpdatetaskandachieve(w, s, Uuid) |
145 | 145 | } | ... | ... |
src/HttpServer/logic/logic.go
... | ... | @@ -646,7 +646,8 @@ func HandlerGetguangold(w http.ResponseWriter, data string, uuid int) { |
646 | 646 | } |
647 | 647 | |
648 | 648 | resp.Data.Guangold = uinfo.GuanGold |
649 | - uinfo.Task.GetGuanGold += rdata.Goldnum | |
649 | + //uinfo.Task.GetGuanGold += rdata.Goldnum | |
650 | + uinfo.Task.GetGuanGold ++ | |
650 | 651 | |
651 | 652 | SaveUserInfo(uinfo) |
652 | 653 | ... | ... |