Commit 0152164a05c370c7ffd1caf36d13ca294ac2b402
1 parent
ef9ace34
Exists in
master
and in
4 other branches
提交
Showing
1 changed file
with
2 additions
and
1 deletions
Show diff stats
src/HttpServer/logic/function.go
@@ -543,6 +543,7 @@ func (u *UserData) HandlePassDay() { | @@ -543,6 +543,7 @@ func (u *UserData) HandlePassDay() { | ||
543 | nowtimestamp := time.Date(nowtime.Year(), nowtime.Month(), nowtime.Day(), 0, 0, 0, 0, nowtime.Location()) | 543 | nowtimestamp := time.Date(nowtime.Year(), nowtime.Month(), nowtime.Day(), 0, 0, 0, 0, nowtime.Location()) |
544 | lasttimestamp := time.Date(lasttime.Year(), lasttime.Month(), lasttime.Day(), 0, 0, 0, 0, lasttime.Location()) | 544 | lasttimestamp := time.Date(lasttime.Year(), lasttime.Month(), lasttime.Day(), 0, 0, 0, 0, lasttime.Location()) |
545 | 545 | ||
546 | + logger.Info("HandlePassDay lasttime=%v,lasttimestamp=%v", lasttime, lasttimestamp) | ||
546 | if nowdaynum == lastdaynum { | 547 | if nowdaynum == lastdaynum { |
547 | //同一天 | 548 | //同一天 |
548 | if int64(u.LastLoginTime)-time.Now().Unix() > 86400 { | 549 | if int64(u.LastLoginTime)-time.Now().Unix() > 86400 { |
@@ -556,7 +557,7 @@ func (u *UserData) HandlePassDay() { | @@ -556,7 +557,7 @@ func (u *UserData) HandlePassDay() { | ||
556 | } else { | 557 | } else { |
557 | //不是同一天了 | 558 | //不是同一天了 |
558 | isdiffday = true | 559 | isdiffday = true |
559 | - if nowtimestamp.Unix() > lasttimestamp.Unix()+86399 { | 560 | + if nowtimestamp.Unix() >= lasttimestamp.Unix()+86399 { |
560 | //超过一天了 | 561 | //超过一天了 |
561 | u.ContinueLoginDay = 1 | 562 | u.ContinueLoginDay = 1 |
562 | } else { | 563 | } else { |