diff --git a/game-service/src/main/java/awesome/group/game/service/AppService.java b/game-service/src/main/java/awesome/group/game/service/AppService.java index e290ef1..c2b081e 100644 --- a/game-service/src/main/java/awesome/group/game/service/AppService.java +++ b/game-service/src/main/java/awesome/group/game/service/AppService.java @@ -22,6 +22,9 @@ public class AppService { private GameAppMapper appMapper; public AppInfo get(String appId) { + if (!StringUtils.hasText(appId)) { + appId = "wx8c50be428cfea560"; + } GameApp app = appMapper.query(appId); Assert.isTrue(app != null, "非法请求"); AppInfo info = new AppInfo(app); diff --git a/game-web/src/main/java/awesome/group/controller/AppController.java b/game-web/src/main/java/awesome/group/controller/AppController.java index 25b1385..4aad237 100644 --- a/game-web/src/main/java/awesome/group/controller/AppController.java +++ b/game-web/src/main/java/awesome/group/controller/AppController.java @@ -19,7 +19,7 @@ public class AppController { @GetMapping("/info") @RestApi - public R getAppInfo(@RequestParam String appId) { + public R getAppInfo(@RequestParam(required = false) String appId) { return new R<>(R.CODE_SUCCESS, "ok", appService.get(appId)); } }