Commit a2d2b8944de6141d61688e25922cc7252764c3e7
1 parent
c1dcbae0
Exists in
ver2.3.0
提交
Showing
3 changed files
with
7 additions
and
1 deletions
Show diff stats
src/HttpServer/logic/datadef.go
| @@ -309,7 +309,8 @@ type TaskListDesc struct { | @@ -309,7 +309,8 @@ type TaskListDesc struct { | ||
| 309 | } | 309 | } |
| 310 | 310 | ||
| 311 | type TaskList struct { | 311 | type TaskList struct { |
| 312 | - Taskdata []TaskListDesc `json:"taskdata"` | 312 | + Taskdata []TaskListDesc `json:"taskdata"` |
| 313 | + Fetchrdnum int `json:"fetchrdnum"` | ||
| 313 | } | 314 | } |
| 314 | 315 | ||
| 315 | //其中提取次数和当日登陆在userdata中记录 | 316 | //其中提取次数和当日登陆在userdata中记录 |
| @@ -398,6 +399,7 @@ type UserData struct { | @@ -398,6 +399,7 @@ type UserData struct { | ||
| 398 | ShakeTime int //摇一摇 | 399 | ShakeTime int //摇一摇 |
| 399 | FetchRedCnt int //领取红包次数计数 | 400 | FetchRedCnt int //领取红包次数计数 |
| 400 | IsNew int //新手状态 | 401 | IsNew int //新手状态 |
| 402 | + FetchRdBagNum int //当天已领的红包 | ||
| 401 | WithDraw WithDrawInfo //提现记录信息 | 403 | WithDraw WithDrawInfo //提现记录信息 |
| 402 | //SpecialWithDraw WithDrawInfo //活跃提现记录信息 | 404 | //SpecialWithDraw WithDrawInfo //活跃提现记录信息 |
| 403 | Task TaskInfo //玩家任务完成相关信息 | 405 | Task TaskInfo //玩家任务完成相关信息 |
src/HttpServer/logic/function.go
| @@ -668,6 +668,7 @@ func InitUserInfo(data *UserLoginReq, resp *UserLoginResp, uuid int, uniqueuid s | @@ -668,6 +668,7 @@ func InitUserInfo(data *UserLoginReq, resp *UserLoginResp, uuid int, uniqueuid s | ||
| 668 | initdata.UpLvCostTimeSec = int(time.Now().Unix()) | 668 | initdata.UpLvCostTimeSec = int(time.Now().Unix()) |
| 669 | initdata.ShakeTime = SHAKELIMIT | 669 | initdata.ShakeTime = SHAKELIMIT |
| 670 | initdata.IsNew = 1 | 670 | initdata.IsNew = 1 |
| 671 | + initdata.FetchRdBagNum = 0 | ||
| 671 | 672 | ||
| 672 | for _, val := range jsonconf.GetJsonConf().WithDrawConfig { | 673 | for _, val := range jsonconf.GetJsonConf().WithDrawConfig { |
| 673 | var tmp WithDrawDesc | 674 | var tmp WithDrawDesc |
| @@ -901,6 +902,7 @@ func (u *UserData) HandlePassDay(uuid int, channel string) { | @@ -901,6 +902,7 @@ func (u *UserData) HandlePassDay(uuid int, channel string) { | ||
| 901 | u.Task.UseItemCnt = 0 | 902 | u.Task.UseItemCnt = 0 |
| 902 | u.Task.PlaySmall = 0 | 903 | u.Task.PlaySmall = 0 |
| 903 | u.ShakeTime = SHAKELIMIT | 904 | u.ShakeTime = SHAKELIMIT |
| 905 | + u.FetchRdBagNum = 0 | ||
| 904 | 906 | ||
| 905 | //任务也需要处理 | 907 | //任务也需要处理 |
| 906 | /*tasklist, err := GetTaskInfo(u.Userid, 1) | 908 | /*tasklist, err := GetTaskInfo(u.Userid, 1) |
src/HttpServer/logic/logic.go
| @@ -557,6 +557,7 @@ func HandlerFetchredbag(w http.ResponseWriter, data string, uuid int) { | @@ -557,6 +557,7 @@ func HandlerFetchredbag(w http.ResponseWriter, data string, uuid int) { | ||
| 557 | resp.Data.Getgoldnum = readaddgold | 557 | resp.Data.Getgoldnum = readaddgold |
| 558 | 558 | ||
| 559 | uinfo.IsNew = 0 | 559 | uinfo.IsNew = 0 |
| 560 | + uinfo.FetchRdBagNum++ | ||
| 560 | 561 | ||
| 561 | //保存数据 | 562 | //保存数据 |
| 562 | err = SaveUserInfo(uinfo, uniqueuuid) | 563 | err = SaveUserInfo(uinfo, uniqueuuid) |
| @@ -761,6 +762,7 @@ func HandlerQuerytaskinfo(w http.ResponseWriter, data string, uuid int) { | @@ -761,6 +762,7 @@ func HandlerQuerytaskinfo(w http.ResponseWriter, data string, uuid int) { | ||
| 761 | } | 762 | } |
| 762 | 763 | ||
| 763 | resp.Data.Taskdata = append(resp.Data.Taskdata, tasklist.Taskdata...) | 764 | resp.Data.Taskdata = append(resp.Data.Taskdata, tasklist.Taskdata...) |
| 765 | + resp.Data.Fetchrdnum = uinfo.FetchRdBagNum | ||
| 764 | 766 | ||
| 765 | resp.Code = ERROR_OK | 767 | resp.Code = ERROR_OK |
| 766 | break | 768 | break |