@ -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);
@ -19,7 +19,7 @@ public class AppController {
@GetMapping("/info")
@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));