...
|
...
|
@@ -455,10 +455,10 @@ func (statisticsService *StatisticsService) ContributionsWealthRanking(contribut |
|
|
// contributionsWealthRankingQuery.StartTime = time.Date(0001, 01, 02, 0, 0, 0, 0, time.Local)
|
|
|
// contributionsWealthRankingQuery.EndTime = time.Date(0001, 01, 02, 23, 59, 59, 0, time.Local)
|
|
|
//}
|
|
|
currentTime := time.Now().Local().Unix()
|
|
|
if currentTime >= listIntervals[0].IntervalStartTime.Unix() && currentTime <= listIntervals[0].IntervalEndTime.Local().Unix() {
|
|
|
contributionsWealthRankingQuery.StartTime = listIntervals[0].IntervalStartTime.Local()
|
|
|
contributionsWealthRankingQuery.EndTime = listIntervals[0].IntervalEndTime.Local()
|
|
|
currentTime := time.Now().Unix()
|
|
|
if currentTime >= listIntervals[0].IntervalStartTime.Unix() && currentTime <= listIntervals[0].IntervalEndTime.Unix() {
|
|
|
contributionsWealthRankingQuery.StartTime = listIntervals[0].IntervalStartTime
|
|
|
contributionsWealthRankingQuery.EndTime = listIntervals[0].IntervalEndTime
|
|
|
} else { // 当前时间处于空档期
|
|
|
contributionsWealthRankingQuery.StartTime = time.Date(0001, 01, 02, 0, 0, 0, 0, time.Local)
|
|
|
contributionsWealthRankingQuery.EndTime = time.Date(0001, 01, 02, 0, 0, 0, 0, time.Local)
|
...
|
...
|
@@ -476,11 +476,11 @@ func (statisticsService *StatisticsService) ContributionsWealthRanking(contribut |
|
|
// break
|
|
|
// }
|
|
|
//}
|
|
|
currentTime := time.Now().Local().Unix()
|
|
|
currentTime := time.Now().Unix()
|
|
|
for _, listInterval := range listIntervals {
|
|
|
if currentTime >= listInterval.IntervalStartTime.Local().Unix() && currentTime <= listInterval.IntervalEndTime.Local().Unix() {
|
|
|
contributionsWealthRankingQuery.StartTime = listInterval.IntervalStartTime.Local()
|
|
|
contributionsWealthRankingQuery.EndTime = listInterval.IntervalEndTime.Local()
|
|
|
if currentTime >= listInterval.IntervalStartTime.Unix() && currentTime <= listInterval.IntervalEndTime.Unix() {
|
|
|
contributionsWealthRankingQuery.StartTime = listInterval.IntervalStartTime
|
|
|
contributionsWealthRankingQuery.EndTime = listInterval.IntervalEndTime
|
|
|
break
|
|
|
} else { // 当前时间处于空档期
|
|
|
contributionsWealthRankingQuery.StartTime = time.Date(0001, 01, 02, 0, 0, 0, 0, time.Local)
|
...
|
...
|
|