Commit 631baa030c344e855b6d95d49dc5fd781489b3d1
1 parent
19d2979a
Exists in
master
提交
Showing
3 changed files
with
7 additions
and
4 deletions
Show diff stats
src/HttpServer/logic/datadef.go
| @@ -638,9 +638,11 @@ type QueryGamblingData struct { | @@ -638,9 +638,11 @@ type QueryGamblingData struct { | ||
| 638 | } | 638 | } |
| 639 | 639 | ||
| 640 | type GetcashReq struct { | 640 | type GetcashReq struct { |
| 641 | - Money float32 `json:"money"` | ||
| 642 | - Openid string `json:"openid"` | ||
| 643 | - Ver string `json:"ver"` | 641 | + Money float32 `json:"money"` |
| 642 | + Openid string `json:"openid"` | ||
| 643 | + Ver string `json:"ver"` | ||
| 644 | + Channel string `json:"channel"` | ||
| 645 | + Gameid string `json:"gameid"` | ||
| 644 | } | 646 | } |
| 645 | 647 | ||
| 646 | type GetcashData struct { | 648 | type GetcashData struct { |
src/HttpServer/logic/function.go
| @@ -1228,6 +1228,7 @@ func (w *UserWareHouseData) GetWarePosById(cid int) int { | @@ -1228,6 +1228,7 @@ func (w *UserWareHouseData) GetWarePosById(cid int) int { | ||
| 1228 | 1228 | ||
| 1229 | func GetCashFromSDK(uuid int, goldnum int, gameid, channel, openid, nickname, headurl, ver string, checkcoin int) (int, error) { | 1229 | func GetCashFromSDK(uuid int, goldnum int, gameid, channel, openid, nickname, headurl, ver string, checkcoin int) (int, error) { |
| 1230 | 1230 | ||
| 1231 | + logger.Info("GetCashFromSDK uid=%v,channel=%v", uuid, channel) | ||
| 1231 | //需要校验金币是否足够 | 1232 | //需要校验金币是否足够 |
| 1232 | oldnum, err := GetCoinFromSdk(uuid, gameid, channel) | 1233 | oldnum, err := GetCoinFromSdk(uuid, gameid, channel) |
| 1233 | if err != nil { | 1234 | if err != nil { |
src/HttpServer/logic/logic.go
| @@ -1007,7 +1007,7 @@ func HandlerGetcash(w http.ResponseWriter, data string, uuid int) { | @@ -1007,7 +1007,7 @@ func HandlerGetcash(w http.ResponseWriter, data string, uuid int) { | ||
| 1007 | if drawnum <= 50 { | 1007 | if drawnum <= 50 { |
| 1008 | checkcoin = 1 | 1008 | checkcoin = 1 |
| 1009 | } | 1009 | } |
| 1010 | - gold, err := GetCashFromSDK(uuid, drawnum, uinfo.Gameid, uinfo.Channel, rdata.Openid, uinfo.NickName, uinfo.Head, rdata.Ver, checkcoin) | 1010 | + gold, err := GetCashFromSDK(uuid, drawnum, rdata.Gameid, rdata.Channel, rdata.Openid, uinfo.NickName, uinfo.Head, rdata.Ver, checkcoin) |
| 1011 | if err != nil { | 1011 | if err != nil { |
| 1012 | logger.Error("HandlerGetcash GetCashFromSDK failed failed=%v", err) | 1012 | logger.Error("HandlerGetcash GetCashFromSDK failed failed=%v", err) |
| 1013 | resp.Code = 1 | 1013 | resp.Code = 1 |