From 2d27b24029adafdbfc5703b38a519d65beda6a68 Mon Sep 17 00:00:00 2001
From: heheng <heheng@123456>
Date: 星期三, 20 十一月 2024 16:23:23 +0800
Subject: [PATCH] 更改

---
 expert-admin/src/main/java/com/gkhy/web/controller/common/CaptchaController.java |   31 ++++++++++++++++++-------------
 1 files changed, 18 insertions(+), 13 deletions(-)

diff --git a/expert-admin/src/main/java/com/gkhy/web/controller/common/CaptchaController.java b/expert-admin/src/main/java/com/gkhy/web/controller/common/CaptchaController.java
index 1adc44d..f2c7952 100644
--- a/expert-admin/src/main/java/com/gkhy/web/controller/common/CaptchaController.java
+++ b/expert-admin/src/main/java/com/gkhy/web/controller/common/CaptchaController.java
@@ -1,17 +1,6 @@
 package com.gkhy.web.controller.common;
 
-import java.awt.image.BufferedImage;
-import java.io.IOException;
-import java.util.concurrent.TimeUnit;
-import javax.annotation.Resource;
-import javax.imageio.ImageIO;
-import javax.servlet.http.HttpServletResponse;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.util.FastByteArrayOutputStream;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RestController;
-import com.google.code.kaptcha.Producer;
-import com.gkhy.common.config.expertConfig;
+import com.gkhy.common.config.ExpertConfig;
 import com.gkhy.common.constant.CacheConstants;
 import com.gkhy.common.constant.Constants;
 import com.gkhy.common.core.domain.AjaxResult;
@@ -19,6 +8,20 @@
 import com.gkhy.common.utils.sign.Base64;
 import com.gkhy.common.utils.uuid.IdUtils;
 import com.gkhy.system.service.ISysConfigService;
+import com.google.code.kaptcha.Producer;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.util.FastByteArrayOutputStream;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+import javax.imageio.ImageIO;
+import javax.servlet.http.HttpServletResponse;
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+import java.util.concurrent.TimeUnit;
 
 /**
  * 验证码操作处理
@@ -26,6 +29,7 @@
  * @author expert
  */
 @RestController
+@Api(tags = "验证码操作处理")
 public class CaptchaController
 {
     @Resource(name = "captchaProducer")
@@ -43,6 +47,7 @@
      * 生成验证码
      */
     @GetMapping("/captchaImage")
+    @ApiOperation(value = "生成验证码")
     public AjaxResult getCode(HttpServletResponse response) throws IOException
     {
         AjaxResult ajax = AjaxResult.success();
@@ -61,7 +66,7 @@
         BufferedImage image = null;
 
         // 生成验证码
-        String captchaType = expertConfig.getCaptchaType();
+        String captchaType = ExpertConfig.getCaptchaType();
         if ("math".equals(captchaType))
         {
             String capText = captchaProducerMath.createText();

--
Gitblit v1.9.2