Commit ad77ccd7ffd07012af3812262f6479db8c3e10db

Authored by 陆恒
1 parent f9333e19
Exists in master

提交

src/HttpServer/logic/datadef.go
@@ -981,6 +981,7 @@ type UserData struct { @@ -981,6 +981,7 @@ type UserData struct {
981 FlyBoxNumTimes int //生意飞天宝箱次数 981 FlyBoxNumTimes int //生意飞天宝箱次数
982 LeftOfflineTimes int //离线奖励剩余领取次数 982 LeftOfflineTimes int //离线奖励剩余领取次数
983 EmptyBoxLeftTime int //空格宝箱生意领取次数 983 EmptyBoxLeftTime int //空格宝箱生意领取次数
  984 + IsResetToday int //当天中午十二点是否重置 0表示未 1表示已重置
984 WaitFetchList []LimitListDesc //待领取的分红猫列表 领取完删除 985 WaitFetchList []LimitListDesc //待领取的分红猫列表 领取完删除
985 CatShopInfo CatShopData //猫咖门店数据 986 CatShopInfo CatShopData //猫咖门店数据
986 Taskinfo TaskData //任务数据 987 Taskinfo TaskData //任务数据
src/HttpServer/logic/function.go
@@ -465,14 +465,28 @@ func (u *UserData) HandlePassDay() { @@ -465,14 +465,28 @@ func (u *UserData) HandlePassDay() {
465 lasttimestamp := time.Date(lasttime.Year(), lasttime.Month(), lasttime.Day(), 0, 0, 0, 0, lasttime.Location()) 465 lasttimestamp := time.Date(lasttime.Year(), lasttime.Month(), lasttime.Day(), 0, 0, 0, 0, lasttime.Location())
466 466
467 logger.Info("HandlePassDay lasttime=%v,lasttimestamp=%v", lasttime, lasttimestamp) 467 logger.Info("HandlePassDay lasttime=%v,lasttimestamp=%v", lasttime, lasttimestamp)
  468 +
  469 + if u.IsResetToday == 0 && nowtimestamp.Hour() >= 12 {
  470 + u.DoubleLeftTimes = ACCGOLDRATELIMIT
  471 + u.GetWatchAdsGoldTime = WATCHADSGOLDLIMIT
  472 + u.DrawTicket = DRAWTICKETNUM
  473 + u.DrawTicketTimes = DRAWTICKETGETLIMIT
  474 + u.RandRedBagLeftTime = RANDGIFTLIMIT
  475 + u.FlyBoxNumTimes = FLYBOXNUMLIMIT
  476 + u.LeftTimingRewardTimes = TIMEINGREWARDLIMIT
  477 + u.LeftOfflineTimes = OFFLINETIMESLIMIT
  478 + u.EmptyBoxLeftTime = EMPTYBOXLIMIT
  479 + u.IsResetToday = 1
  480 + }
468 if nowdaynum == lastdaynum { 481 if nowdaynum == lastdaynum {
  482 +
469 //同一天 483 //同一天
470 if int64(u.LastLoginTime)-time.Now().Unix() > 86400 { 484 if int64(u.LastLoginTime)-time.Now().Unix() > 86400 {
471 //已经过了很多天了 485 //已经过了很多天了
472 486
473 u.ContinueLoginDay = 1 487 u.ContinueLoginDay = 1
474 u.SumLoginDay++ 488 u.SumLoginDay++
475 - isdiffday = true 489 +
476 } else { 490 } else {
477 //t同一天 不做处理 491 //t同一天 不做处理
478 } 492 }
@@ -499,6 +513,8 @@ func (u *UserData) HandlePassDay() { @@ -499,6 +513,8 @@ func (u *UserData) HandlePassDay() {
499 u.LeftTimingRewardTimes = TIMEINGREWARDLIMIT 513 u.LeftTimingRewardTimes = TIMEINGREWARDLIMIT
500 u.LeftOfflineTimes = OFFLINETIMESLIMIT 514 u.LeftOfflineTimes = OFFLINETIMESLIMIT
501 u.EmptyBoxLeftTime = EMPTYBOXLIMIT 515 u.EmptyBoxLeftTime = EMPTYBOXLIMIT
  516 +
  517 + u.IsResetToday = 0
502 /*randint := rand.Intn(100) 518 /*randint := rand.Intn(100)
503 floatval := float32(randint) / 100 519 floatval := float32(randint) / 100
504 u.TodayZhaocai = 180 + floatval*/ 520 u.TodayZhaocai = 180 + floatval*/
src/HttpServer/logic/logic.go
@@ -29,7 +29,7 @@ func MyInit() { @@ -29,7 +29,7 @@ func MyInit() {
29 pc := GetCurCaiCatList() 29 pc := GetCurCaiCatList()
30 if pc == nil { 30 if pc == nil {
31 //初始化彩池 31 //初始化彩池
32 - NewCaiPiaoRound(0, 200, 200, 1) 32 + NewCaiPiaoRound(0, 150, 150, 1)
33 } 33 }
34 } 34 }
35 35
@@ -164,7 +164,7 @@ func HandlerSettlement(w http.ResponseWriter, data string, uuid int) { @@ -164,7 +164,7 @@ func HandlerSettlement(w http.ResponseWriter, data string, uuid int) {
164 redishandler.GetRedisClient().HSet(redis.CAIPIAOKAIJIANGHISTORY_KEY, strconv.Itoa(tmp.CurRound), string(savestr)) 164 redishandler.GetRedisClient().HSet(redis.CAIPIAOKAIJIANGHISTORY_KEY, strconv.Itoa(tmp.CurRound), string(savestr))
165 } 165 }
166 166
167 - NewCaiPiaoRound(0, 200, 200, curr.CurRound+1) 167 + NewCaiPiaoRound(0, 150, 150, curr.CurRound+1)
168 168
169 } else { 169 } else {
170 logger.Error("HandlerSettlement paramfailed failed=%v", err) 170 logger.Error("HandlerSettlement paramfailed failed=%v", err)
@@ -2308,6 +2308,7 @@ func HandlerQueryBuyCat(w http.ResponseWriter, data string, uuid int) { @@ -2308,6 +2308,7 @@ func HandlerQueryBuyCat(w http.ResponseWriter, data string, uuid int) {
2308 break 2308 break
2309 } 2309 }
2310 2310
  2311 + //需要返回到当前最高等级猫的所有数据
2311 for k, v := range uinfo.BuyCatInfo { 2312 for k, v := range uinfo.BuyCatInfo {
2312 var tmp BuyCatDesc 2313 var tmp BuyCatDesc
2313 tmp.CatId = k + 1 2314 tmp.CatId = k + 1
@@ -2577,7 +2578,7 @@ func HandlerAutoChoose(w http.ResponseWriter, data string, uuid int) { @@ -2577,7 +2578,7 @@ func HandlerAutoChoose(w http.ResponseWriter, data string, uuid int) {
2577 logger.Info("SetCurCaiCatList") 2578 logger.Info("SetCurCaiCatList")
2578 SetCurCaiCatList(curpool) 2579 SetCurCaiCatList(curpool)
2579 //需要处理一下奖池是否满了 2580 //需要处理一下奖池是否满了
2580 - fullnum := 199 2581 + fullnum := 149
2581 if curpool.FakeNum == 0 { 2582 if curpool.FakeNum == 0 {
2582 fullnum++ 2583 fullnum++
2583 } 2584 }
@@ -2598,7 +2599,7 @@ func HandlerAutoChoose(w http.ResponseWriter, data string, uuid int) { @@ -2598,7 +2599,7 @@ func HandlerAutoChoose(w http.ResponseWriter, data string, uuid int) {
2598 } 2599 }
2599 2600
2600 //生成新的彩池 2601 //生成新的彩池
2601 - NewCaiPiaoRound(0, 200, 200, waits.CurRound+1) 2602 + NewCaiPiaoRound(0, 150, 150, waits.CurRound+1)
2602 } 2603 }
2603 2604
2604 } 2605 }
@@ -2691,7 +2692,7 @@ func HandlerChooseNum(w http.ResponseWriter, data string, uuid int) { @@ -2691,7 +2692,7 @@ func HandlerChooseNum(w http.ResponseWriter, data string, uuid int) {
2691 logger.Info("SetCurCaiCatList") 2692 logger.Info("SetCurCaiCatList")
2692 SetCurCaiCatList(curpool) 2693 SetCurCaiCatList(curpool)
2693 //需要处理一下奖池是否满了 2694 //需要处理一下奖池是否满了
2694 - fullnum := 199 2695 + fullnum := 149
2695 if curpool.FakeNum == 0 { 2696 if curpool.FakeNum == 0 {
2696 fullnum++ 2697 fullnum++
2697 } 2698 }
@@ -2712,7 +2713,7 @@ func HandlerChooseNum(w http.ResponseWriter, data string, uuid int) { @@ -2712,7 +2713,7 @@ func HandlerChooseNum(w http.ResponseWriter, data string, uuid int) {
2712 } 2713 }
2713 2714
2714 //生成新的彩池 2715 //生成新的彩池
2715 - NewCaiPiaoRound(0, 200, 200, waits.CurRound+1) 2716 + NewCaiPiaoRound(0, 150, 150, waits.CurRound+1)
2716 } 2717 }
2717 2718
2718 } 2719 }