|
|
|
@@ -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 |
|
|
|
} |
|
|
|
|
|
|
|
|