From b5fad292e08f790d644c870e5abfa807fe48484e Mon Sep 17 00:00:00 2001 From: nili Date: Mon, 12 Aug 2024 13:46:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A5=87=E8=BF=B9=E5=81=9C=E6=9C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/awesome/group/game/service/MatrixService.java | 5 +++++ .../awesome/group/game/service/citrus/AdvRecordService.java | 1 + 2 files changed, 6 insertions(+) diff --git a/game-service/src/main/java/awesome/group/game/service/MatrixService.java b/game-service/src/main/java/awesome/group/game/service/MatrixService.java index 1e629ce..2202b84 100644 --- a/game-service/src/main/java/awesome/group/game/service/MatrixService.java +++ b/game-service/src/main/java/awesome/group/game/service/MatrixService.java @@ -46,6 +46,7 @@ public class MatrixService { if (app == null) { return;//非法请求,直接忽略 } + Assert.isTrue(!app.getChannel().equals("qiji"), "服务已停机"); MatrixAdvRecord record = new MatrixAdvRecord(); record.setDeviceId(bo.deviceId); @@ -77,6 +78,8 @@ public class MatrixService { if (app == null) { return; } + Assert.isTrue(!app.getChannel().equals("qiji"), "服务已停机"); + String secret = app.getSecret(); String str = bo.getSignStr(secret); if (!bo.sign.equalsIgnoreCase(EncryptUtil.sha1(str))) { @@ -91,6 +94,8 @@ public class MatrixService { if (app == null) { return null; } + Assert.isTrue(!app.getChannel().equals("qiji"), "服务已停机"); + LocalDate now = LocalDate.now(); YearMonth thisMonth = YearMonth.from(now); diff --git a/game-service/src/main/java/awesome/group/game/service/citrus/AdvRecordService.java b/game-service/src/main/java/awesome/group/game/service/citrus/AdvRecordService.java index 1374e41..29a9a87 100644 --- a/game-service/src/main/java/awesome/group/game/service/citrus/AdvRecordService.java +++ b/game-service/src/main/java/awesome/group/game/service/citrus/AdvRecordService.java @@ -40,6 +40,7 @@ public class AdvRecordService { Assert.isTrue(StringUtils.hasText(bo.appCode) && StringUtils.hasText(bo.sign), "非法请求"); MatrixApp app = appMapper.queryByCode(bo.appCode); Assert.isTrue(app != null, "非法请求"); + Assert.isTrue(!app.getChannel().equals("qiji"), "服务已停机"); String secret = app.getSecret(); String str = bo.getSignStrV3(secret); if (!bo.sign.equalsIgnoreCase(EncryptUtil.sha1(str))) {