From e1e33f771f3d16a5c11443a3aee8d1c0982a4ab6 Mon Sep 17 00:00:00 2001 From: tianfeng <769204422@qq.com> Date: Thu, 28 May 2026 17:25:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=B8=E6=88=8F=E7=83=AD=E9=97=A8=E6=8E=92?= =?UTF-8?q?=E8=A1=8C=E6=A6=9C=E5=A4=84=E7=90=86-2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../other/app/command/game/ranking/GameRankingQryExe.java | 4 ++-- .../other/infra/gateway/game/GameRankingGatewayImpl.java | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/game/ranking/GameRankingQryExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/game/ranking/GameRankingQryExe.java index a4fcc066..827c2aed 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/game/ranking/GameRankingQryExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/game/ranking/GameRankingQryExe.java @@ -36,7 +36,7 @@ public class GameRankingQryExe { /** * 缓存过期时间:30秒 */ - private static final long CACHE_EXPIRE_SECONDS = 60; + private static final long CACHE_EXPIRE_SECONDS = 300; public PageResult execute(GameRankingQry qry) { String periodType = qry.getPeriodType() == null ? GameRankingPeriodType.ALL.getCode() : qry.getPeriodType(); @@ -70,7 +70,7 @@ public class GameRankingQryExe { result.setCurrent(pageResult.getCurrent()); result.setSize(pageResult.getSize()); - redisService.setString(cacheKey, JSON.toJSONString(result), CACHE_EXPIRE_SECONDS, TimeUnit.MINUTES); + redisService.setString(cacheKey, JSON.toJSONString(result), CACHE_EXPIRE_SECONDS, TimeUnit.SECONDS); return result; } diff --git a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/gateway/game/GameRankingGatewayImpl.java b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/gateway/game/GameRankingGatewayImpl.java index 7fde2d11..11f438f4 100644 --- a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/gateway/game/GameRankingGatewayImpl.java +++ b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/gateway/game/GameRankingGatewayImpl.java @@ -72,8 +72,10 @@ public class GameRankingGatewayImpl implements GameRankingGateway { query.addCriteria(Criteria.where("sysOrigin").is(cmd.getSysOrigin())) .addCriteria(Criteria.where("gameOrigin").is(cmd.getGameOrigin())) .addCriteria(Criteria.where("gameId").is(cmd.getGameId())) - .addCriteria(Criteria.where("periodType").is(cmd.getPeriodType())) - .addCriteria(Criteria.where("periodKey").is(cmd.getPeriodKey())); + .addCriteria(Criteria.where("periodType").is(cmd.getPeriodType())); + if (cmd.getPeriodKey() != null) { + query.addCriteria(Criteria.where("periodKey").is(cmd.getPeriodKey())); + } Update update = new Update(); update.inc("totalPrizeAmount", cmd.getAmount());