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