style: 替换项目内所有ruoyi转为wfc
This commit is contained in:
@@ -7,7 +7,7 @@ import org.wfc.common.core.web.domain.AjaxResult;
|
||||
/**
|
||||
* 验证码处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author wfc
|
||||
*/
|
||||
public interface ValidateCodeService
|
||||
{
|
||||
|
||||
@@ -2,6 +2,7 @@ package org.wfc.gateway.service.impl;
|
||||
|
||||
import com.google.code.kaptcha.Producer;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.FastByteArrayOutputStream;
|
||||
import org.wfc.common.core.constant.CacheConstants;
|
||||
@@ -26,7 +27,7 @@ import java.util.concurrent.TimeUnit;
|
||||
/**
|
||||
* 验证码实现处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author wfc
|
||||
*/
|
||||
@Service
|
||||
public class ValidateCodeServiceImpl implements ValidateCodeService
|
||||
@@ -37,6 +38,9 @@ public class ValidateCodeServiceImpl implements ValidateCodeService
|
||||
@Resource(name = "captchaProducerMath")
|
||||
private Producer captchaProducerMath;
|
||||
|
||||
@Value("${spring.profiles.active}")
|
||||
private String springProfilesActive;
|
||||
|
||||
@Autowired
|
||||
private RedisService redisService;
|
||||
|
||||
@@ -94,6 +98,9 @@ public class ValidateCodeServiceImpl implements ValidateCodeService
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
data.put("uuid", uuid);
|
||||
data.put("img", Base64.encode(os.toByteArray()));
|
||||
if ("dev".equals(springProfilesActive)) {
|
||||
data.put("text", code);
|
||||
}
|
||||
|
||||
return AjaxResult.success(data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user