2
0

style: 替换项目内所有ruoyi转为wfc

This commit is contained in:
TsMask
2024-11-26 17:34:02 +08:00
parent 77a28b06a3
commit fab448f836
300 changed files with 1211 additions and 1428 deletions

View File

@@ -7,7 +7,7 @@ import org.wfc.common.core.web.domain.AjaxResult;
/**
* 验证码处理
*
* @author ruoyi
* @author wfc
*/
public interface ValidateCodeService
{

View File

@@ -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);
}