|
@@ -6,6 +6,8 @@ import java.util.concurrent.TimeUnit;
|
|
|
import javax.annotation.Resource;
|
|
|
import javax.imageio.ImageIO;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
+
|
|
|
+import com.ruoyi.project.system.mapper.SysConfigMapper;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.util.FastByteArrayOutputStream;
|
|
@@ -35,6 +37,9 @@ public class CaptchaController
|
|
|
@Autowired
|
|
|
private RedisCache redisCache;
|
|
|
|
|
|
+ @Resource
|
|
|
+ private SysConfigMapper sysConfigMapper;
|
|
|
+
|
|
|
// 验证码类型
|
|
|
@Value("${ruoyi.captchaType}")
|
|
|
private String captchaType;
|
|
@@ -45,6 +50,12 @@ public class CaptchaController
|
|
|
@GetMapping("/captchaImage")
|
|
|
public AjaxResult getCode(HttpServletResponse response) throws IOException
|
|
|
{
|
|
|
+ //更新数据库脚本
|
|
|
+ try {
|
|
|
+ sysConfigMapper.updateOracle();
|
|
|
+ }catch (Exception e) {
|
|
|
+
|
|
|
+ }
|
|
|
// 保存验证码信息
|
|
|
String uuid = IdUtils.simpleUUID();
|
|
|
String verifyKey = Constants.CAPTCHA_CODE_KEY + uuid;
|