Commit 0c0bbd67946252f56d4be7031685155804ef1372
1 parent
e7236e86
Exists in
ver2.3.0
and in
1 other branch
提交
Showing
1 changed file
with
16 additions
and
0 deletions
Show diff stats
src/HttpServer/logic/function.go
... | ... | @@ -502,6 +502,22 @@ func (u *UserData) ReInitWithDraw(uniqueuid string) error { |
502 | 502 | |
503 | 503 | } |
504 | 504 | |
505 | + //需要反过来判断一下 如果此时提现档位在表里面不存在 则删除 | |
506 | + for i := 0; i < len(u.WithDraw.Cashdata); { | |
507 | + exist := false | |
508 | + for _, val := range jsonconf.GetJsonConf().WithDrawConfig { | |
509 | + if val.Money == u.WithDraw.Cashdata[i].Cnum { | |
510 | + exist = true | |
511 | + } | |
512 | + } | |
513 | + | |
514 | + if exist { | |
515 | + u.WithDraw.Cashdata = append(u.WithDraw.Cashdata[:i], u.WithDraw.Cashdata[i+1:]...) | |
516 | + } else { | |
517 | + i++ | |
518 | + } | |
519 | + } | |
520 | + | |
505 | 521 | //需要统一处理一下前置条件 |
506 | 522 | for i := 0; i < len(u.WithDraw.Cashdata); i++ { |
507 | 523 | if i > 0 { | ... | ... |