Commit 915358c82bd5e2cceffab2d4cdae097b685826d9

Authored by 陆恒
1 parent 8f499bee

提交

src/HttpServer/logic/function.go
@@ -224,7 +224,7 @@ func AddWithDrawList(uuid int,data *WithDrawRecord) error { @@ -224,7 +224,7 @@ func AddWithDrawList(uuid int,data *WithDrawRecord) error {
224 return err 224 return err
225 } 225 }
226 list.Withdata = append(list.Withdata,*data) 226 list.Withdata = append(list.Withdata,*data)
227 - savestr,err := json.Marshal(&list) 227 + savestr,err := json.Marshal(list)
228 if err != nil { 228 if err != nil {
229 return err 229 return err
230 } 230 }
src/HttpServer/logic/logic.go
@@ -130,10 +130,7 @@ func HandlerGetcash(w http.ResponseWriter, data string, uuid int) { @@ -130,10 +130,7 @@ func HandlerGetcash(w http.ResponseWriter, data string, uuid int) {
130 break 130 break
131 } 131 }
132 132
133 - uinfo.RealGold -= drawnum * 100  
134 133
135 - resp.Data.Walletgold = uinfo.RealGold  
136 - SaveUserInfo(uinfo)  
137 134
138 //需要保存一下提现记录 135 //需要保存一下提现记录
139 data := new(WithDrawRecord) 136 data := new(WithDrawRecord)
@@ -142,11 +139,16 @@ func HandlerGetcash(w http.ResponseWriter, data string, uuid int) { @@ -142,11 +139,16 @@ func HandlerGetcash(w http.ResponseWriter, data string, uuid int) {
142 err = AddWithDrawList(uuid,data) 139 err = AddWithDrawList(uuid,data)
143 if err != nil { 140 if err != nil {
144 logger.Error("AddWithDrawList failed err=%v", err) 141 logger.Error("AddWithDrawList failed err=%v", err)
145 - resp.Message = "添加提现记录失败"  
146 - resp.Code = ERROR_ADDWITHDRAW_LISTFAILED 142 + resp.Message = "网络错误"
  143 + resp.Code = ERROR_SRV_ERROR
147 break 144 break
148 } 145 }
149 146
  147 + uinfo.RealGold -= drawnum * 100
  148 +
  149 + resp.Data.Walletgold = uinfo.RealGold
  150 + SaveUserInfo(uinfo)
  151 +
150 152
151 resp.Code = ERROR_OK 153 resp.Code = ERROR_OK
152 break 154 break