Commit 97dcd20c2b9c202c63d1e00fa91c796a25d9db06

Authored by 陆恒
1 parent d2f067d8
Exists in ver2.3.0 and in 1 other branch ver2.2.8

提交

Showing 1 changed file with 6 additions and 6 deletions   Show diff stats
src/HttpServer/logic/function.go
@@ -474,7 +474,7 @@ func (u *UserData) ReInitWithDraw(uniqueuid string) error { @@ -474,7 +474,7 @@ func (u *UserData) ReInitWithDraw(uniqueuid string) error {
474 //重新读取配置 474 //重新读取配置
475 for _, val := range jsonconf.GetJsonConf().WithDrawConfig { 475 for _, val := range jsonconf.GetJsonConf().WithDrawConfig {
476 476
477 - isin, idx := u.IsInWithList(val.Id) 477 + isin, idx := u.IsInWithList(val.Money)
478 if isin && idx > 0 && idx < len(u.WithDraw.Cashdata) { 478 if isin && idx > 0 && idx < len(u.WithDraw.Cashdata) {
479 //已经有了的话更新一下配置 479 //已经有了的话更新一下配置
480 u.WithDraw.Cashdata[idx].Day = val.Day 480 u.WithDraw.Cashdata[idx].Day = val.Day
@@ -515,7 +515,7 @@ func (u *UserData) ReInitWithDraw(uniqueuid string) error { @@ -515,7 +515,7 @@ func (u *UserData) ReInitWithDraw(uniqueuid string) error {
515 515
516 for _, val := range jsonconf.GetJsonConf().ActiveWithdrawConfig { 516 for _, val := range jsonconf.GetJsonConf().ActiveWithdrawConfig {
517 517
518 - isin, idx := u.IsInSpeaialWithList(val.Id) 518 + isin, idx := u.IsInSpeaialWithList(val.Money)
519 if isin && idx > 0 && idx < len(u.WithDraw.SpecialCashdata) { 519 if isin && idx > 0 && idx < len(u.WithDraw.SpecialCashdata) {
520 //已经有了的话更新一下配置 520 //已经有了的话更新一下配置
521 u.WithDraw.SpecialCashdata[idx].Day = val.Day 521 u.WithDraw.SpecialCashdata[idx].Day = val.Day
@@ -627,18 +627,18 @@ func InitUserInfo(data *UserLoginReq, resp *UserLoginResp, uuid int, uniqueuid s @@ -627,18 +627,18 @@ func InitUserInfo(data *UserLoginReq, resp *UserLoginResp, uuid int, uniqueuid s
627 return err 627 return err
628 } 628 }
629 629
630 -func (u *UserData) IsInWithList(id int) (bool, int) { 630 +func (u *UserData) IsInWithList(num float32) (bool, int) {
631 for k, val := range u.WithDraw.Cashdata { 631 for k, val := range u.WithDraw.Cashdata {
632 - if val.Cid == id { 632 + if val.Cnum == num {
633 return true, k 633 return true, k
634 } 634 }
635 } 635 }
636 return false, -1 636 return false, -1
637 } 637 }
638 638
639 -func (u *UserData) IsInSpeaialWithList(id int) (bool, int) { 639 +func (u *UserData) IsInSpeaialWithList(num float32) (bool, int) {
640 for k, val := range u.WithDraw.SpecialCashdata { 640 for k, val := range u.WithDraw.SpecialCashdata {
641 - if val.Cid == id { 641 + if val.Cnum == num {
642 return true, k 642 return true, k
643 } 643 }
644 } 644 }