From 170de9935d83e6a3d9bc9de852593fc20d48f329 Mon Sep 17 00:00:00 2001 From: JiebinHu <458249864@qq.com> Date: Sun, 27 Aug 2023 15:07:01 +0800 Subject: [PATCH] Update inner.go --- route/group_power_r/inner.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/route/group_power_r/inner.go b/route/group_power_r/inner.go index c25825d..92a6773 100644 --- a/route/group_power_r/inner.go +++ b/route/group_power_r/inner.go @@ -134,7 +134,7 @@ func SyncStar(c *gin.Context) (*mycontext.MyContext, error) { "month": time.Hour * 24 * 7 * 30 * 2, } num := len(stars) - for _, star := range stars { + for i, star := range stars { for _, period := range []string{"day", "week", "month"} { var dateStr string switch period { @@ -148,6 +148,7 @@ func SyncStar(c *gin.Context) (*mycontext.MyContext, error) { key := groupPower_k.GetGroupPowerStarRankKey(star.Type, period, star.GroupPowerId, dateStr) model.RedisCluster.ZIncrBy(model, key, float64(star.Score), fmt.Sprintf("%d", star.UserId)) model.RedisCluster.Expire(model, key, ttl[period]) + model.Log.Infof("SyncStar i:%v,star:%v", i, star) } } type res struct { -- 2.22.0