Commit 506f7882b5794642d301ed98f6ef21a9c8e1c93f

Authored by 陆恒
1 parent acb74d26
Exists in master

提交

src/HttpServer/logic/datadef.go
@@ -155,7 +155,8 @@ type FetchfenredbagReq struct { @@ -155,7 +155,8 @@ type FetchfenredbagReq struct {
155 } 155 }
156 156
157 type FetchfenredbagData struct { 157 type FetchfenredbagData struct {
158 - Wallgold int `json:"wallgold"` 158 + Wallgold int `json:"wallgold"`
  159 + Getgoldnum int `json:"getgoldnum"`
159 } 160 }
160 161
161 type FetchfenredbagResp struct { 162 type FetchfenredbagResp struct {
@@ -165,8 +166,9 @@ type FetchfenredbagResp struct { @@ -165,8 +166,9 @@ type FetchfenredbagResp struct {
165 } 166 }
166 167
167 type FetchluckybagData struct { 168 type FetchluckybagData struct {
168 - Wallgold int `json:"wallgold"`  
169 - Lefttimes int `json:"lefttimes"` 169 + Wallgold int `json:"wallgold"`
  170 + Lefttimes int `json:"lefttimes"`
  171 + Getgoldnum int `json:"getgoldnum"`
170 } 172 }
171 173
172 type FetchluckybagResp struct { 174 type FetchluckybagResp struct {
src/HttpServer/logic/logic.go
@@ -848,6 +848,7 @@ func HandlerFetchluckybag(w http.ResponseWriter, data string, uniqueuuid, gameid @@ -848,6 +848,7 @@ func HandlerFetchluckybag(w http.ResponseWriter, data string, uniqueuuid, gameid
848 848
849 resp.Data.Wallgold = uinfo.RealGold 849 resp.Data.Wallgold = uinfo.RealGold
850 resp.Data.Lefttimes = uinfo.LuckyBagLeftTimes 850 resp.Data.Lefttimes = uinfo.LuckyBagLeftTimes
  851 + resp.Data.Getgoldnum = addcoin
851 852
852 SaveUserInfo(uinfo, uniqueuuid) 853 SaveUserInfo(uinfo, uniqueuuid)
853 854
@@ -900,6 +901,7 @@ func HandlerFetchfenredbag(w http.ResponseWriter, data string, uniqueuuid, gamei @@ -900,6 +901,7 @@ func HandlerFetchfenredbag(w http.ResponseWriter, data string, uniqueuuid, gamei
900 break 901 break
901 } 902 }
902 903
  904 + addgold := cfg.Free_coin
903 readgold := 0 905 readgold := 0
904 readgold, err = AddCoinToSdk(uuid, cfg.Free_coin, gameid, channel, REDBAGTYPE_103) 906 readgold, err = AddCoinToSdk(uuid, cfg.Free_coin, gameid, channel, REDBAGTYPE_103)
905 if err != nil { 907 if err != nil {
@@ -910,6 +912,7 @@ func HandlerFetchfenredbag(w http.ResponseWriter, data string, uniqueuuid, gamei @@ -910,6 +912,7 @@ func HandlerFetchfenredbag(w http.ResponseWriter, data string, uniqueuuid, gamei
910 } 912 }
911 913
912 if rdata.Ftype == 2 { 914 if rdata.Ftype == 2 {
  915 + addgold += cfg.Video_coin
913 readgold, err = AddCoinToSdk(uuid, cfg.Video_coin, gameid, channel, REDBAGTYPE_106) 916 readgold, err = AddCoinToSdk(uuid, cfg.Video_coin, gameid, channel, REDBAGTYPE_106)
914 if err != nil { 917 if err != nil {
915 logger.Info("GetUserInfo HandlerFetchfenredbag data failed:%v,for:%v", err, data) 918 logger.Info("GetUserInfo HandlerFetchfenredbag data failed:%v,for:%v", err, data)
@@ -923,6 +926,7 @@ func HandlerFetchfenredbag(w http.ResponseWriter, data string, uniqueuuid, gamei @@ -923,6 +926,7 @@ func HandlerFetchfenredbag(w http.ResponseWriter, data string, uniqueuuid, gamei
923 uinfo.RedBagFetchIdlist = append(uinfo.RedBagFetchIdlist, rdata.Id) 926 uinfo.RedBagFetchIdlist = append(uinfo.RedBagFetchIdlist, rdata.Id)
924 927
925 resp.Data.Wallgold = uinfo.RealGold 928 resp.Data.Wallgold = uinfo.RealGold
  929 + resp.Data.Getgoldnum = addgold
926 930
927 SaveUserInfo(uinfo, uniqueuuid) 931 SaveUserInfo(uinfo, uniqueuuid)
928 932