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,6 +9,7 @@ import ( | ||
9 | "fmt" | 9 | "fmt" |
10 | "net/http" | 10 | "net/http" |
11 | "strconv" | 11 | "strconv" |
12 | + "time" | ||
12 | ) | 13 | ) |
13 | 14 | ||
14 | func HandlerQueryguaninfo(w http.ResponseWriter, data string, uuid int) { | 15 | func HandlerQueryguaninfo(w http.ResponseWriter, data string, uuid int) { |
@@ -107,9 +108,9 @@ func HandlerGetcash(w http.ResponseWriter, data string, uuid int) { | @@ -107,9 +108,9 @@ func HandlerGetcash(w http.ResponseWriter, data string, uuid int) { | ||
107 | break | 108 | break |
108 | } | 109 | } |
109 | //临时处理一下 | 110 | //临时处理一下 |
110 | - if rdata.Ver == "" { | 111 | + /*if rdata.Ver == "" { |
111 | rdata.Ver = "2.0.0" | 112 | rdata.Ver = "2.0.0" |
112 | - } | 113 | + }*/ |
113 | 114 | ||
114 | uinfo, err := GetUserInfo(uuid) | 115 | uinfo, err := GetUserInfo(uuid) |
115 | if err != nil || uinfo == nil { | 116 | if err != nil || uinfo == nil { |
@@ -185,16 +186,16 @@ func HandlerGetcash(w http.ResponseWriter, data string, uuid int) { | @@ -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 | if err != nil { | 193 | if err != nil { |
193 | logger.Error("AddWithDrawList failed err=%v", err) | 194 | logger.Error("AddWithDrawList failed err=%v", err) |
194 | - resp.Message = "网络错误" | 195 | + /*resp.Message = "网络错误" |
195 | resp.Code = ERROR_SRV_ERROR | 196 | resp.Code = ERROR_SRV_ERROR |
196 | - break | ||
197 | - }*/ | 197 | + break*/ |
198 | + } | ||
198 | 199 | ||
199 | if info.Isnew == 1 { | 200 | if info.Isnew == 1 { |
200 | uinfo.WithDraw.Cashdata[index].Isnew = 0 | 201 | uinfo.WithDraw.Cashdata[index].Isnew = 0 |