Commit 9ba92eb58fcbf970dbcf13e7dfc72e558050f62c

Authored by 陆恒
1 parent 0e009133
Exists in ver2.3.0

提交

src/HttpServer/logic/datadef.go
... ... @@ -23,6 +23,7 @@ type UserLoginData struct {
23 23 Userexp int `json:"userexp"`
24 24 Sumloginday int `json:"sumloginday"`
25 25 Shakeleftcnt int `json:"shakeleftcnt"`
  26 + IsNew int `json:"isnew"`
26 27 }
27 28  
28 29 type UserLoginResp struct {
... ... @@ -396,6 +397,7 @@ type UserData struct {
396 397 GetCashCnt int //当天提现次数
397 398 ShakeTime int //摇一摇
398 399 FetchRedCnt int //领取红包次数计数
  400 + IsNew int //新手状态
399 401 WithDraw WithDrawInfo //提现记录信息
400 402 //SpecialWithDraw WithDrawInfo //活跃提现记录信息
401 403 Task TaskInfo //玩家任务完成相关信息
... ...
src/HttpServer/logic/function.go
... ... @@ -613,6 +613,7 @@ func InitUserInfo(data *UserLoginReq, resp *UserLoginResp, uuid int, uniqueuid s
613 613 initdata.UpLvCostTime = 0
614 614 initdata.UpLvCostTimeSec = int(time.Now().Unix())
615 615 initdata.ShakeTime = SHAKELIMIT
  616 + initdata.IsNew = 1
616 617  
617 618 for _, val := range jsonconf.GetJsonConf().WithDrawConfig {
618 619 var tmp WithDrawDesc
... ... @@ -657,6 +658,7 @@ func InitUserInfo(data *UserLoginReq, resp *UserLoginResp, uuid int, uniqueuid s
657 658 resp.Data.Userexp = initdata.Exp
658 659 resp.Data.Sumloginday = initdata.SumLoginDay
659 660 resp.Data.Shakeleftcnt = initdata.ShakeTime
  661 + resp.Data.IsNew = initdata.IsNew
660 662  
661 663 err := SaveUserInfo(&initdata, uniqueuid)
662 664 logger.Info("InitUserInfoddddd uinfo=%+v", initdata)
... ... @@ -937,6 +939,7 @@ func GetUserData(uuid int, uniqueuid string, req *UserLoginReq, resp *UserLoginR
937 939 resp.Data.Userexp = data.Exp
938 940 resp.Data.Sumloginday = data.SumLoginDay
939 941 resp.Data.Shakeleftcnt = data.ShakeTime
  942 + resp.Data.IsNew = data.IsNew
940 943 return nil
941 944 }
942 945  
... ...
src/HttpServer/logic/logic.go
... ... @@ -556,6 +556,8 @@ func HandlerFetchredbag(w http.ResponseWriter, data string, uuid int) {
556 556 resp.Data.Walletgold = uinfo.RealGold
557 557 resp.Data.Getgoldnum = readaddgold
558 558  
  559 + uinfo.IsNew = 0
  560 +
559 561 //保存数据
560 562 err = SaveUserInfo(uinfo, uniqueuuid)
561 563  
... ...