From 48b8a5dc78df33ed55a183a9424c9bd82654077a Mon Sep 17 00:00:00 2001 From: YunaiV Date: Fri, 11 Nov 2022 20:48:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=BB=91=E5=9D=97=E9=AA=8C?= =?UTF-8?q?=E8=AF=81=E7=A0=81=EF=BC=8C=E5=AD=98=E5=9C=A8=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=E7=9A=84=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/admin/captcha/CaptchaController.java | 9 ++++++--- .../src/main/resources/application.yaml | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/captcha/CaptchaController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/captcha/CaptchaController.java index db2bc0cd4..7ca9c3588 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/captcha/CaptchaController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/captcha/CaptchaController.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.system.controller.admin.captcha; +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import com.anji.captcha.model.common.ResponseModel; import com.anji.captcha.model.vo.CaptchaVO; import io.swagger.annotations.Api; @@ -22,19 +23,21 @@ import javax.servlet.http.HttpServletRequest; */ @Api(tags = "管理后台 - 验证码") @RestController("adminCaptchaController") -@RequestMapping("/captcha") +@RequestMapping("/system/captcha") public class CaptchaController extends com.anji.captcha.controller.CaptchaController { - @PostMapping({"/get"}) + @PostMapping("/get") @ApiOperation("获得验证码") @PermitAll + @OperateLog(enable = false) // 避免 Post 请求被记录操作日志 public ResponseModel get(@RequestBody CaptchaVO data, HttpServletRequest request) { return super.get(data, request); } - @PostMapping({"/check"}) + @PostMapping("/check") @ApiOperation("校验验证码") @PermitAll + @OperateLog(enable = false) // 避免 Post 请求被记录操作日志 public ResponseModel check(@RequestBody CaptchaVO data, HttpServletRequest request) { return super.check(data, request); } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/resources/application.yaml b/yudao-module-system/yudao-module-system-biz/src/main/resources/application.yaml index 1846b2253..2355c13b7 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/resources/application.yaml +++ b/yudao-module-system/yudao-module-system-biz/src/main/resources/application.yaml @@ -134,8 +134,8 @@ yudao: ignore-urls: - /admin-api/system/tenant/get-id-by-name # 基于名字获取租户,不许带租户编号 - /admin-api/system/captcha/get-image # 获取图片验证码,和租户无关 - - /admin-api/captcha/get # 获取图片验证码,和租户无关 - - /admin-api/captcha/check # 校验图片验证码,和租户无关 + - /admin-api/system/captcha/get # 获取图片验证码,和租户无关 + - /admin-api/system/captcha/check # 校验图片验证码,和租户无关 - /admin-api/system/sms/callback/* # 短信回调接口,无法带上租户编号 - /rpc-api/system/tenant/valid # 防止递归。避免调用 /rpc-api/system/tenant/valid 接口时,又去触发 /rpc-api/system/tenant/valid 去校验 - /rpc-api/system/tenant/id-list # 获得租户列表的时候,无需传递租户编号