From e8225fbdee782bbabecda08d6d1a285e39c5ca3b Mon Sep 17 00:00:00 2001 From: MichelleChung <1242874891@qq.com> Date: 星期四, 02 二月 2023 16:15:52 +0800 Subject: [PATCH] !282 System 相关表请求响应参数优化 * update 更新 system 相关表接口 (sys_role) 新增 Bo | Vo 类, 更改请求以及响应参数 ; * update 更新 system 相关表接口 (sys_notice, sys_post) 新增 Bo | Vo 类, 更改请求以及响应参数 ; * update 更新 system 相关表接口 (sys_menu) 新增 Bo | Vo 类, 更改请求以及响应参数 ; * update 更新 system 相关表接口 (sys_dict_data, sys_dict_type) 新增 Bo | Vo 类, 更改请求以及响应参数 ; * update 更新 system 相关表接口 (sys_config, sys_dept) 新增 Bo | Vo 类, 更改请求以及响应参数 ; --- ruoyi-admin/src/main/java/com/ruoyi/web/controller/CaptchaController.java | 8 ++------ 1 files changed, 2 insertions(+), 6 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/CaptchaController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/CaptchaController.java index f24a863..d38d154 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/CaptchaController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/CaptchaController.java @@ -80,11 +80,9 @@ */ @GetMapping("/captchaImage") public R<Map<String, Object>> getCode() { - Map<String, Object> ajax = new HashMap<>(); boolean captchaEnabled = configService.selectCaptchaEnabled(); - ajax.put("captchaEnabled", captchaEnabled); if (!captchaEnabled) { - return R.ok(ajax); + return R.ok(Map.of("captchaEnabled", false)); } // 淇濆瓨楠岃瘉鐮佷俊鎭� String uuid = IdUtil.simpleUUID(); @@ -104,9 +102,7 @@ code = exp.getValue(String.class); } RedisUtils.setCacheObject(verifyKey, code, Duration.ofMinutes(Constants.CAPTCHA_EXPIRATION)); - ajax.put("uuid", uuid); - ajax.put("img", captcha.getImageBase64()); - return R.ok(ajax); + return R.ok(Map.of("uuid", uuid, "img", captcha.getImageBase64())); } } -- Gitblit v1.9.3