From ee415d75aba7609b18272688ae9ac10b57804a28 Mon Sep 17 00:00:00 2001 From: chenyifan01 Date: Mon, 27 Jun 2022 12:05:51 +0800 Subject: [PATCH] #2225 fix bug --- services/reward/notify.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/reward/notify.go b/services/reward/notify.go index aa18fbe39..f5b270d94 100644 --- a/services/reward/notify.go +++ b/services/reward/notify.go @@ -18,11 +18,11 @@ func NotifyRewardOperation(userId, amount int64, rewardType models.RewardType, o OperateType: operateType, } b, _ := json.Marshal(data) - redis_client.ZAdd(redis_key.RewardOperateNotification(), string(b), float64(time.Now().UnixMilli())) + redis_client.ZAdd(redis_key.RewardOperateNotification(), string(b), float64(time.Now().Unix())) } func GetRewardOperation(since, until timeutil.TimeStamp) []models.UserRewardOperation { - list, err := redis_client.ZRangeByScore(redis_key.RewardOperateNotification(), float64(since*1000), float64(until*1000)) + list, err := redis_client.ZRangeByScore(redis_key.RewardOperateNotification(), float64(since), float64(until)) if err != nil { return nil } @@ -38,7 +38,7 @@ func GetRewardOperation(since, until timeutil.TimeStamp) []models.UserRewardOper Msg: GetRewardOperateMsg(t), }) } - redis_client.ZRemRangeByScore(redis_key.RewardOperateNotification(), float64(since*1000), float64(until*1000)) + redis_client.ZRemRangeByScore(redis_key.RewardOperateNotification(), float64(since), float64(until)) return r }