Browse Source

默认用黑芝麻

master
nili 12 months ago
parent
commit
0edb13f089
  1. 3
      game-service/src/main/java/awesome/group/game/service/AppService.java
  2. 2
      game-web/src/main/java/awesome/group/controller/AppController.java

3
game-service/src/main/java/awesome/group/game/service/AppService.java

@ -22,6 +22,9 @@ public class AppService {
private GameAppMapper appMapper; private GameAppMapper appMapper;
public AppInfo get(String appId) { public AppInfo get(String appId) {
if (!StringUtils.hasText(appId)) {
appId = "wx8c50be428cfea560";
}
GameApp app = appMapper.query(appId); GameApp app = appMapper.query(appId);
Assert.isTrue(app != null, "非法请求"); Assert.isTrue(app != null, "非法请求");
AppInfo info = new AppInfo(app); AppInfo info = new AppInfo(app);

2
game-web/src/main/java/awesome/group/controller/AppController.java

@ -19,7 +19,7 @@ public class AppController {
@GetMapping("/info") @GetMapping("/info")
@RestApi @RestApi
public R<AppInfo> getAppInfo(@RequestParam String appId) { public R<AppInfo> getAppInfo(@RequestParam(required = false) String appId) {
return new R<>(R.CODE_SUCCESS, "ok", appService.get(appId)); return new R<>(R.CODE_SUCCESS, "ok", appService.get(appId));
} }
} }

Loading…
Cancel
Save