Commit ff521f5089efb25bcb8840d1380ea063dd389bed
1 parent
703874e8
Exists in
master
and in
4 other branches
添加提现记录
Showing
1 changed file
with
10 additions
and
9 deletions
Show diff stats
src/HttpServer/logic/logic.go
... | ... | @@ -9,6 +9,7 @@ import ( |
9 | 9 | "fmt" |
10 | 10 | "net/http" |
11 | 11 | "strconv" |
12 | + "time" | |
12 | 13 | ) |
13 | 14 | |
14 | 15 | func HandlerQueryguaninfo(w http.ResponseWriter, data string, uuid int) { |
... | ... | @@ -107,9 +108,9 @@ func HandlerGetcash(w http.ResponseWriter, data string, uuid int) { |
107 | 108 | break |
108 | 109 | } |
109 | 110 | //临时处理一下 |
110 | - if rdata.Ver == "" { | |
111 | + /*if rdata.Ver == "" { | |
111 | 112 | rdata.Ver = "2.0.0" |
112 | - } | |
113 | + }*/ | |
113 | 114 | |
114 | 115 | uinfo, err := GetUserInfo(uuid) |
115 | 116 | if err != nil || uinfo == nil { |
... | ... | @@ -185,16 +186,16 @@ func HandlerGetcash(w http.ResponseWriter, data string, uuid int) { |
185 | 186 | } |
186 | 187 | |
187 | 188 | //需要保存一下提现记录 |
188 | - /*data := new(WithDrawRecord) | |
189 | - data.Withdrawmoney = rdata.Money | |
190 | - data.Withdrawtime = int(time.Now().Unix()) | |
191 | - err = AddWithDrawList(uuid, data) | |
189 | + sdata := new(WithDrawRecord) | |
190 | + sdata.Coin = int(rdata.Money * 100) | |
191 | + sdata.Create_time = int(time.Now().Unix()) | |
192 | + err = AddWithDrawList(uuid, sdata) | |
192 | 193 | if err != nil { |
193 | 194 | logger.Error("AddWithDrawList failed err=%v", err) |
194 | - resp.Message = "网络错误" | |
195 | + /*resp.Message = "网络错误" | |
195 | 196 | resp.Code = ERROR_SRV_ERROR |
196 | - break | |
197 | - }*/ | |
197 | + break*/ | |
198 | + } | |
198 | 199 | |
199 | 200 | if info.Isnew == 1 { |
200 | 201 | uinfo.WithDraw.Cashdata[index].Isnew = 0 | ... | ... |