Browse Source

奇迹停机

master
nili 2 months ago
parent
commit
b5fad292e0
  1. 5
      game-service/src/main/java/awesome/group/game/service/MatrixService.java
  2. 1
      game-service/src/main/java/awesome/group/game/service/citrus/AdvRecordService.java

5
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);

1
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))) {

Loading…
Cancel
Save