style: 替换项目内所有ruoyi转为wfc
This commit is contained in:
5
.gitignore
vendored
5
.gitignore
vendored
@@ -80,8 +80,3 @@ package-lock.json
|
|||||||
yarn.lock
|
yarn.lock
|
||||||
|
|
||||||
.VSCodeCounter
|
.VSCodeCounter
|
||||||
|
|
||||||
ruoyi-ui-old
|
|
||||||
|
|
||||||
ruoyi-ui/src/typings/auto-imports.d.ts
|
|
||||||
ruoyi-ui/src/typings/components.d.ts
|
|
||||||
|
|||||||
2
docker/nginx/html/dist/readme.txt
vendored
2
docker/nginx/html/dist/readme.txt
vendored
@@ -1 +1 @@
|
|||||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǰ<EFBFBD><EFBFBD>ruoyi-ui<75><69><EFBFBD><EFBFBD><EFBFBD>õľ<C3B5>̬<EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>nginx<6E><78><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʡ<EFBFBD>
|
<EFBFBD><EFBFBD><EFBFBD>ǰ<EFBFBD><EFBFBD>wfc-ui<75><69><EFBFBD><EFBFBD><EFBFBD>õľ<C3B5>̬<EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>nginx<6E><78><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʡ<EFBFBD>
|
||||||
2
pom.xml
2
pom.xml
@@ -369,7 +369,7 @@
|
|||||||
<properties>
|
<properties>
|
||||||
<!--当前环境-->
|
<!--当前环境-->
|
||||||
<profileName>dev</profileName>
|
<profileName>dev</profileName>
|
||||||
<nacosServerAddr>192.168.2.248:8848</nacosServerAddr>
|
<nacosServerAddr>192.168.9.58:18848</nacosServerAddr>
|
||||||
<nacosNamespace>wfc-dev</nacosNamespace>
|
<nacosNamespace>wfc-dev</nacosNamespace>
|
||||||
</properties>
|
</properties>
|
||||||
</profile>
|
</profile>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
<!-- RuoYi Common Core-->
|
<!-- WFC Common Core-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.wfc</groupId>
|
<groupId>org.wfc</groupId>
|
||||||
<artifactId>wfc-common-core</artifactId>
|
<artifactId>wfc-common-core</artifactId>
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
<!-- RuoYi Common Core-->
|
<!-- WFC Common Core-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.wfc</groupId>
|
<groupId>org.wfc</groupId>
|
||||||
<artifactId>wfc-common-core</artifactId>
|
<artifactId>wfc-common-core</artifactId>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import org.wfc.system.api.factory.RemoteFileFallbackFactory;
|
|||||||
/**
|
/**
|
||||||
* 文件服务
|
* 文件服务
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "remoteFileService", value = ServiceNameConstants.FILE_SERVICE, fallbackFactory = RemoteFileFallbackFactory.class)
|
@FeignClient(contextId = "remoteFileService", value = ServiceNameConstants.FILE_SERVICE, fallbackFactory = RemoteFileFallbackFactory.class)
|
||||||
public interface RemoteFileService
|
public interface RemoteFileService
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import org.wfc.system.api.factory.RemoteLogFallbackFactory;
|
|||||||
/**
|
/**
|
||||||
* 日志服务
|
* 日志服务
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "remoteLogService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteLogFallbackFactory.class)
|
@FeignClient(contextId = "remoteLogService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteLogFallbackFactory.class)
|
||||||
public interface RemoteLogService
|
public interface RemoteLogService
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import org.wfc.system.api.model.LoginUser;
|
|||||||
/**
|
/**
|
||||||
* 用户服务
|
* 用户服务
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "remoteUserService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteUserFallbackFactory.class)
|
@FeignClient(contextId = "remoteUserService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteUserFallbackFactory.class)
|
||||||
public interface RemoteUserService
|
public interface RemoteUserService
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import java.util.List;
|
|||||||
/**
|
/**
|
||||||
* 部门表 sys_dept
|
* 部门表 sys_dept
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class SysDept extends BaseEntity
|
public class SysDept extends BaseEntity
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import org.wfc.common.core.web.domain.BaseEntity;
|
|||||||
/**
|
/**
|
||||||
* 字典数据表 sys_dict_data
|
* 字典数据表 sys_dict_data
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class SysDictData extends BaseEntity
|
public class SysDictData extends BaseEntity
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import org.wfc.common.core.web.domain.BaseEntity;
|
|||||||
/**
|
/**
|
||||||
* 字典类型表 sys_dict_type
|
* 字典类型表 sys_dict_type
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class SysDictType extends BaseEntity
|
public class SysDictType extends BaseEntity
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import org.apache.commons.lang3.builder.ToStringStyle;
|
|||||||
/**
|
/**
|
||||||
* 文件信息
|
* 文件信息
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class SysFile
|
public class SysFile
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import org.wfc.common.core.web.domain.BaseEntity;
|
|||||||
/**
|
/**
|
||||||
* 系统访问记录表 sys_logininfor
|
* 系统访问记录表 sys_logininfor
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class SysLogininfor extends BaseEntity
|
public class SysLogininfor extends BaseEntity
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import org.wfc.common.core.web.domain.BaseEntity;
|
|||||||
/**
|
/**
|
||||||
* 操作日志记录表 oper_log
|
* 操作日志记录表 oper_log
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class SysOperLog extends BaseEntity
|
public class SysOperLog extends BaseEntity
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import org.wfc.common.core.web.domain.BaseEntity;
|
|||||||
/**
|
/**
|
||||||
* 角色表 sys_role
|
* 角色表 sys_role
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class SysRole extends BaseEntity
|
public class SysRole extends BaseEntity
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import org.wfc.common.core.xss.Xss;
|
|||||||
/**
|
/**
|
||||||
* 用户对象 sys_user
|
* 用户对象 sys_user
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class SysUser extends BaseEntity
|
public class SysUser extends BaseEntity
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import org.wfc.system.api.domain.SysFile;
|
|||||||
/**
|
/**
|
||||||
* 文件服务降级处理
|
* 文件服务降级处理
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
public class RemoteFileFallbackFactory implements FallbackFactory<RemoteFileService>
|
public class RemoteFileFallbackFactory implements FallbackFactory<RemoteFileService>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import org.wfc.system.api.domain.SysOperLog;
|
|||||||
/**
|
/**
|
||||||
* 日志服务降级处理
|
* 日志服务降级处理
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
public class RemoteLogFallbackFactory implements FallbackFactory<RemoteLogService>
|
public class RemoteLogFallbackFactory implements FallbackFactory<RemoteLogService>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import org.wfc.system.api.model.LoginUser;
|
|||||||
/**
|
/**
|
||||||
* 用户服务降级处理
|
* 用户服务降级处理
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
public class RemoteUserFallbackFactory implements FallbackFactory<RemoteUserService>
|
public class RemoteUserFallbackFactory implements FallbackFactory<RemoteUserService>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import org.wfc.system.api.domain.SysUser;
|
|||||||
/**
|
/**
|
||||||
* 用户信息
|
* 用户信息
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class LoginUser implements Serializable
|
public class LoginUser implements Serializable
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- RuoYi Common Security-->
|
<!-- WFC Common Security-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.wfc</groupId>
|
<groupId>org.wfc</groupId>
|
||||||
<artifactId>wfc-common-security</artifactId>
|
<artifactId>wfc-common-security</artifactId>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import org.wfc.common.security.annotation.EnableRyFeignClients;
|
|||||||
/**
|
/**
|
||||||
* 认证授权中心
|
* 认证授权中心
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
@EnableRyFeignClients
|
@EnableRyFeignClients
|
||||||
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class })
|
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class })
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import org.wfc.system.api.model.LoginUser;
|
|||||||
/**
|
/**
|
||||||
* token 控制
|
* token 控制
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
public class TokenController
|
public class TokenController
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package org.wfc.auth.form;
|
|||||||
/**
|
/**
|
||||||
* 用户登录对象
|
* 用户登录对象
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class LoginBody
|
public class LoginBody
|
||||||
{
|
{
|
||||||
@@ -17,6 +17,11 @@ public class LoginBody
|
|||||||
*/
|
*/
|
||||||
private String password;
|
private String password;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 认证类型 用户u/客户sys
|
||||||
|
*/
|
||||||
|
private String authType;
|
||||||
|
|
||||||
public String getUsername()
|
public String getUsername()
|
||||||
{
|
{
|
||||||
return username;
|
return username;
|
||||||
@@ -36,4 +41,12 @@ public class LoginBody
|
|||||||
{
|
{
|
||||||
this.password = password;
|
this.password = password;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getAuthType() {
|
||||||
|
return authType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAuthType(String authType) {
|
||||||
|
this.authType = authType;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package org.wfc.auth.form;
|
|||||||
/**
|
/**
|
||||||
* 用户注册对象
|
* 用户注册对象
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class RegisterBody extends LoginBody
|
public class RegisterBody extends LoginBody
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ import org.wfc.system.api.model.LoginUser;
|
|||||||
/**
|
/**
|
||||||
* 登录校验方法
|
* 登录校验方法
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
public class SysLoginService
|
public class SysLoginService
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import java.util.concurrent.TimeUnit;
|
|||||||
/**
|
/**
|
||||||
* 登录密码方法
|
* 登录密码方法
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
public class SysPasswordService
|
public class SysPasswordService
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import org.wfc.system.api.domain.SysLogininfor;
|
|||||||
/**
|
/**
|
||||||
* 记录日志方法
|
* 记录日志方法
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
public class SysRecordLogService
|
public class SysRecordLogService
|
||||||
|
|||||||
161
wfc-auth/src/main/java/org/wfc/auth/service/ULoginService.java
Normal file
161
wfc-auth/src/main/java/org/wfc/auth/service/ULoginService.java
Normal file
@@ -0,0 +1,161 @@
|
|||||||
|
package org.wfc.auth.service;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.wfc.common.core.constant.CacheConstants;
|
||||||
|
import org.wfc.common.core.constant.Constants;
|
||||||
|
import org.wfc.common.core.constant.SecurityConstants;
|
||||||
|
import org.wfc.common.core.constant.UserConstants;
|
||||||
|
import org.wfc.common.core.domain.R;
|
||||||
|
import org.wfc.common.core.enums.UserStatus;
|
||||||
|
import org.wfc.common.core.exception.ServiceException;
|
||||||
|
import org.wfc.common.core.text.Convert;
|
||||||
|
import org.wfc.common.core.utils.DateUtils;
|
||||||
|
import org.wfc.common.core.utils.StringUtils;
|
||||||
|
import org.wfc.common.core.utils.ip.IpUtils;
|
||||||
|
import org.wfc.common.redis.service.RedisService;
|
||||||
|
import org.wfc.common.security.utils.SecurityUtils;
|
||||||
|
import org.wfc.system.api.RemoteUserService;
|
||||||
|
import org.wfc.system.api.domain.SysUser;
|
||||||
|
import org.wfc.system.api.model.LoginUser;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户平台-登录校验方法
|
||||||
|
*
|
||||||
|
* @author wfc
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public class ULoginService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private RemoteUserService remoteUserService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SysPasswordService passwordService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SysRecordLogService recordLogService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RedisService redisService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 登录
|
||||||
|
*/
|
||||||
|
public LoginUser login(String username, String password)
|
||||||
|
{
|
||||||
|
// 用户名或密码为空 错误
|
||||||
|
if (StringUtils.isAnyBlank(username, password))
|
||||||
|
{
|
||||||
|
recordLogService.recordLogininfor(username, Constants.LOGIN_FAIL, "用户/密码必须填写");
|
||||||
|
throw new ServiceException("user.password.not.blank");
|
||||||
|
}
|
||||||
|
// 密码如果不在指定范围内 错误
|
||||||
|
if (password.length() < UserConstants.PASSWORD_MIN_LENGTH
|
||||||
|
|| password.length() > UserConstants.PASSWORD_MAX_LENGTH)
|
||||||
|
{
|
||||||
|
recordLogService.recordLogininfor(username, Constants.LOGIN_FAIL, "用户密码不在指定范围");
|
||||||
|
throw new ServiceException("用户密码不在指定范围");
|
||||||
|
}
|
||||||
|
// 用户名不在指定范围内 错误
|
||||||
|
if (username.length() < UserConstants.USERNAME_MIN_LENGTH
|
||||||
|
|| username.length() > UserConstants.USERNAME_MAX_LENGTH)
|
||||||
|
{
|
||||||
|
recordLogService.recordLogininfor(username, Constants.LOGIN_FAIL, "用户名不在指定范围");
|
||||||
|
throw new ServiceException("用户名不在指定范围");
|
||||||
|
}
|
||||||
|
// IP黑名单校验
|
||||||
|
String blackStr = Convert.toStr(redisService.getCacheObject(CacheConstants.SYS_LOGIN_BLACKIPLIST));
|
||||||
|
if (IpUtils.isMatchedIp(blackStr, IpUtils.getIpAddr()))
|
||||||
|
{
|
||||||
|
recordLogService.recordLogininfor(username, Constants.LOGIN_FAIL, "很遗憾,访问IP已被列入系统黑名单");
|
||||||
|
throw new ServiceException("很遗憾,访问IP已被列入系统黑名单");
|
||||||
|
}
|
||||||
|
// 查询用户信息
|
||||||
|
R<LoginUser> userResult = remoteUserService.getUserInfo(username, SecurityConstants.INNER);
|
||||||
|
|
||||||
|
if (StringUtils.isNull(userResult) || StringUtils.isNull(userResult.getData()))
|
||||||
|
{
|
||||||
|
recordLogService.recordLogininfor(username, Constants.LOGIN_FAIL, "登录用户不存在");
|
||||||
|
throw new ServiceException("登录用户:" + username + " 不存在");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (R.FAIL == userResult.getCode())
|
||||||
|
{
|
||||||
|
throw new ServiceException(userResult.getMsg());
|
||||||
|
}
|
||||||
|
|
||||||
|
LoginUser userInfo = userResult.getData();
|
||||||
|
SysUser user = userResult.getData().getSysUser();
|
||||||
|
if (UserStatus.DELETED.getCode().equals(user.getDelFlag()))
|
||||||
|
{
|
||||||
|
recordLogService.recordLogininfor(username, Constants.LOGIN_FAIL, "对不起,您的账号已被删除");
|
||||||
|
throw new ServiceException("对不起,您的账号:" + username + " 已被删除");
|
||||||
|
}
|
||||||
|
if (UserStatus.DISABLE.getCode().equals(user.getStatus()))
|
||||||
|
{
|
||||||
|
recordLogService.recordLogininfor(username, Constants.LOGIN_FAIL, "用户已停用,请联系管理员");
|
||||||
|
throw new ServiceException("对不起,您的账号:" + username + " 已停用");
|
||||||
|
}
|
||||||
|
passwordService.validate(user, password);
|
||||||
|
recordLogService.recordLogininfor(username, Constants.LOGIN_SUCCESS, "登录成功");
|
||||||
|
recordLoginInfo(user.getUserId());
|
||||||
|
return userInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 记录登录信息
|
||||||
|
*
|
||||||
|
* @param userId 用户ID
|
||||||
|
*/
|
||||||
|
public void recordLoginInfo(Long userId)
|
||||||
|
{
|
||||||
|
SysUser sysUser = new SysUser();
|
||||||
|
sysUser.setUserId(userId);
|
||||||
|
// 更新用户登录IP
|
||||||
|
sysUser.setLoginIp(IpUtils.getIpAddr());
|
||||||
|
// 更新用户登录时间
|
||||||
|
sysUser.setLoginDate(DateUtils.getNowDate());
|
||||||
|
remoteUserService.recordUserLogin(sysUser, SecurityConstants.INNER);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void logout(String loginName)
|
||||||
|
{
|
||||||
|
recordLogService.recordLogininfor(loginName, Constants.LOGOUT, "退出成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 注册
|
||||||
|
*/
|
||||||
|
public void register(String username, String password)
|
||||||
|
{
|
||||||
|
// 用户名或密码为空 错误
|
||||||
|
if (StringUtils.isAnyBlank(username, password))
|
||||||
|
{
|
||||||
|
throw new ServiceException("user.password.not.blank");
|
||||||
|
}
|
||||||
|
if (username.length() < UserConstants.USERNAME_MIN_LENGTH
|
||||||
|
|| username.length() > UserConstants.USERNAME_MAX_LENGTH)
|
||||||
|
{
|
||||||
|
throw new ServiceException("账户长度必须在2到20个字符之间");
|
||||||
|
}
|
||||||
|
if (password.length() < UserConstants.PASSWORD_MIN_LENGTH
|
||||||
|
|| password.length() > UserConstants.PASSWORD_MAX_LENGTH)
|
||||||
|
{
|
||||||
|
throw new ServiceException("密码长度必须在5到20个字符之间");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 注册用户信息
|
||||||
|
SysUser sysUser = new SysUser();
|
||||||
|
sysUser.setUserName(username);
|
||||||
|
sysUser.setNickName(username);
|
||||||
|
sysUser.setPassword(SecurityUtils.encryptPassword(password));
|
||||||
|
R<?> registerResult = remoteUserService.registerUserInfo(sysUser, SecurityConstants.INNER);
|
||||||
|
|
||||||
|
if (R.FAIL == registerResult.getCode())
|
||||||
|
{
|
||||||
|
throw new ServiceException(registerResult.getMsg());
|
||||||
|
}
|
||||||
|
recordLogService.recordLogininfor(username, Constants.REGISTER, "注册成功");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -12,7 +12,7 @@ import org.wfc.common.core.utils.poi.ExcelHandlerAdapter;
|
|||||||
/**
|
/**
|
||||||
* 自定义导出Excel数据注解
|
* 自定义导出Excel数据注解
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
@Target(ElementType.FIELD)
|
@Target(ElementType.FIELD)
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import java.lang.annotation.Target;
|
|||||||
/**
|
/**
|
||||||
* Excel注解集
|
* Excel注解集
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
@Target(ElementType.FIELD)
|
@Target(ElementType.FIELD)
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package org.wfc.common.core.constant;
|
|||||||
/**
|
/**
|
||||||
* 缓存常量信息
|
* 缓存常量信息
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class CacheConstants
|
public class CacheConstants
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package org.wfc.common.core.constant;
|
|||||||
/**
|
/**
|
||||||
* 通用常量信息
|
* 通用常量信息
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class Constants
|
public class Constants
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package org.wfc.common.core.constant;
|
|||||||
/**
|
/**
|
||||||
* 代码生成通用常量
|
* 代码生成通用常量
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class GenConstants
|
public class GenConstants
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package org.wfc.common.core.constant;
|
|||||||
/**
|
/**
|
||||||
* 返回状态码
|
* 返回状态码
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class HttpStatus
|
public class HttpStatus
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package org.wfc.common.core.constant;
|
|||||||
/**
|
/**
|
||||||
* 任务调度通用常量
|
* 任务调度通用常量
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class ScheduleConstants
|
public class ScheduleConstants
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package org.wfc.common.core.constant;
|
|||||||
/**
|
/**
|
||||||
* 权限相关通用常量
|
* 权限相关通用常量
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class SecurityConstants
|
public class SecurityConstants
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package org.wfc.common.core.constant;
|
|||||||
/**
|
/**
|
||||||
* 服务名称
|
* 服务名称
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class ServiceNameConstants
|
public class ServiceNameConstants
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package org.wfc.common.core.constant;
|
|||||||
/**
|
/**
|
||||||
* Token的Key常量
|
* Token的Key常量
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class TokenConstants
|
public class TokenConstants
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package org.wfc.common.core.constant;
|
|||||||
/**
|
/**
|
||||||
* 用户常量信息
|
* 用户常量信息
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class UserConstants
|
public class UserConstants
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import org.wfc.common.core.utils.StringUtils;
|
|||||||
* 获取当前线程变量中的 用户id、用户名称、Token等信息
|
* 获取当前线程变量中的 用户id、用户名称、Token等信息
|
||||||
* 注意: 必须在网关通过请求头的方法传入,同时在HeaderInterceptor拦截器设置值。 否则这里无法获取
|
* 注意: 必须在网关通过请求头的方法传入,同时在HeaderInterceptor拦截器设置值。 否则这里无法获取
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class SecurityContextHolder
|
public class SecurityContextHolder
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import org.wfc.common.core.constant.Constants;
|
|||||||
/**
|
/**
|
||||||
* 响应信息主体
|
* 响应信息主体
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class R<T> implements Serializable
|
public class R<T> implements Serializable
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package org.wfc.common.core.enums;
|
|||||||
/**
|
/**
|
||||||
* 用户状态
|
* 用户状态
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public enum UserStatus
|
public enum UserStatus
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import org.wfc.common.core.exception.user.UserException;
|
|||||||
/**
|
/**
|
||||||
* 验证码错误异常类
|
* 验证码错误异常类
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class CaptchaException extends UserException
|
public class CaptchaException extends UserException
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package org.wfc.common.core.exception;
|
|||||||
/**
|
/**
|
||||||
* 检查异常
|
* 检查异常
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class CheckedException extends RuntimeException
|
public class CheckedException extends RuntimeException
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package org.wfc.common.core.exception;
|
|||||||
/**
|
/**
|
||||||
* 演示模式异常
|
* 演示模式异常
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class DemoModeException extends RuntimeException
|
public class DemoModeException extends RuntimeException
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package org.wfc.common.core.exception;
|
|||||||
/**
|
/**
|
||||||
* 全局异常
|
* 全局异常
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class GlobalException extends RuntimeException
|
public class GlobalException extends RuntimeException
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package org.wfc.common.core.exception;
|
|||||||
/**
|
/**
|
||||||
* 内部认证异常
|
* 内部认证异常
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class InnerAuthException extends RuntimeException
|
public class InnerAuthException extends RuntimeException
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package org.wfc.common.core.exception;
|
|||||||
/**
|
/**
|
||||||
* 权限异常
|
* 权限异常
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class PreAuthorizeException extends RuntimeException
|
public class PreAuthorizeException extends RuntimeException
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import org.wfc.common.core.utils.StringUtils;
|
|||||||
/**
|
/**
|
||||||
* 业务异常
|
* 业务异常
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public final class ServiceException extends RuntimeException
|
public final class ServiceException extends RuntimeException
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package org.wfc.common.core.exception;
|
|||||||
/**
|
/**
|
||||||
* 工具类异常
|
* 工具类异常
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class UtilException extends RuntimeException
|
public class UtilException extends RuntimeException
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package org.wfc.common.core.exception.auth;
|
|||||||
/**
|
/**
|
||||||
* 未能通过的登录认证异常
|
* 未能通过的登录认证异常
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class NotLoginException extends RuntimeException
|
public class NotLoginException extends RuntimeException
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import org.apache.commons.lang3.StringUtils;
|
|||||||
/**
|
/**
|
||||||
* 未能通过的权限认证异常
|
* 未能通过的权限认证异常
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class NotPermissionException extends RuntimeException
|
public class NotPermissionException extends RuntimeException
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import org.apache.commons.lang3.StringUtils;
|
|||||||
/**
|
/**
|
||||||
* 未能通过的角色认证异常
|
* 未能通过的角色认证异常
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class NotRoleException extends RuntimeException
|
public class NotRoleException extends RuntimeException
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import org.wfc.common.core.utils.StringUtils;
|
|||||||
/**
|
/**
|
||||||
* 基础异常
|
* 基础异常
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class BaseException extends RuntimeException
|
public class BaseException extends RuntimeException
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import org.wfc.common.core.exception.base.BaseException;
|
|||||||
/**
|
/**
|
||||||
* 文件信息异常类
|
* 文件信息异常类
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class FileException extends BaseException
|
public class FileException extends BaseException
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package org.wfc.common.core.exception.file;
|
|||||||
/**
|
/**
|
||||||
* 文件名称超长限制异常类
|
* 文件名称超长限制异常类
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class FileNameLengthLimitExceededException extends FileException
|
public class FileNameLengthLimitExceededException extends FileException
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package org.wfc.common.core.exception.file;
|
|||||||
/**
|
/**
|
||||||
* 文件名大小限制异常类
|
* 文件名大小限制异常类
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class FileSizeLimitExceededException extends FileException
|
public class FileSizeLimitExceededException extends FileException
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import java.io.PrintWriter;
|
|||||||
/**
|
/**
|
||||||
* 文件上传异常类
|
* 文件上传异常类
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class FileUploadException extends Exception
|
public class FileUploadException extends Exception
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import java.util.Arrays;
|
|||||||
/**
|
/**
|
||||||
* 文件上传 误异常类
|
* 文件上传 误异常类
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class InvalidExtensionException extends FileUploadException
|
public class InvalidExtensionException extends FileUploadException
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package org.wfc.common.core.exception.job;
|
|||||||
/**
|
/**
|
||||||
* 计划策略异常
|
* 计划策略异常
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class TaskException extends Exception
|
public class TaskException extends Exception
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package org.wfc.common.core.exception.user;
|
|||||||
/**
|
/**
|
||||||
* 验证码失效异常类
|
* 验证码失效异常类
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class CaptchaExpireException extends UserException
|
public class CaptchaExpireException extends UserException
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import org.wfc.common.core.exception.base.BaseException;
|
|||||||
/**
|
/**
|
||||||
* 用户信息异常类
|
* 用户信息异常类
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class UserException extends BaseException
|
public class UserException extends BaseException
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package org.wfc.common.core.exception.user;
|
|||||||
/**
|
/**
|
||||||
* 用户密码不正确或不符合规范异常类
|
* 用户密码不正确或不符合规范异常类
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class UserPasswordNotMatchException extends UserException
|
public class UserPasswordNotMatchException extends UserException
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import org.wfc.common.core.utils.StringUtils;
|
|||||||
/**
|
/**
|
||||||
* 字符集工具类
|
* 字符集工具类
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class CharsetKit
|
public class CharsetKit
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import org.wfc.common.core.utils.StringUtils;
|
|||||||
/**
|
/**
|
||||||
* 类型转换器
|
* 类型转换器
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class Convert
|
public class Convert
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import org.wfc.common.core.utils.StringUtils;
|
|||||||
/**
|
/**
|
||||||
* 字符串格式化
|
* 字符串格式化
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class StrFormatter
|
public class StrFormatter
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import org.apache.commons.lang3.time.DateFormatUtils;
|
|||||||
/**
|
/**
|
||||||
* 时间工具类
|
* 时间工具类
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class DateUtils extends org.apache.commons.lang3.time.DateUtils
|
public class DateUtils extends org.apache.commons.lang3.time.DateUtils
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import org.apache.commons.lang3.exception.ExceptionUtils;
|
|||||||
/**
|
/**
|
||||||
* 错误信息处理类。
|
* 错误信息处理类。
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class ExceptionUtil
|
public class ExceptionUtil
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import io.jsonwebtoken.SignatureAlgorithm;
|
|||||||
/**
|
/**
|
||||||
* Jwt工具类
|
* Jwt工具类
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class JwtUtils
|
public class JwtUtils
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import org.wfc.common.core.web.page.TableSupport;
|
|||||||
/**
|
/**
|
||||||
* 分页工具类
|
* 分页工具类
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class PageUtils extends PageHelper
|
public class PageUtils extends PageHelper
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ import reactor.core.publisher.Mono;
|
|||||||
/**
|
/**
|
||||||
* 客户端工具类
|
* 客户端工具类
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class ServletUtils
|
public class ServletUtils
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import org.springframework.stereotype.Component;
|
|||||||
/**
|
/**
|
||||||
* spring工具类 方便在非spring管理环境中获取bean
|
* spring工具类 方便在非spring管理环境中获取bean
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
public final class SpringUtils implements BeanFactoryPostProcessor
|
public final class SpringUtils implements BeanFactoryPostProcessor
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import org.wfc.common.core.text.StrFormatter;
|
|||||||
/**
|
/**
|
||||||
* 字符串工具类
|
* 字符串工具类
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class StringUtils extends org.apache.commons.lang3.StringUtils
|
public class StringUtils extends org.apache.commons.lang3.StringUtils
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import java.util.regex.Pattern;
|
|||||||
/**
|
/**
|
||||||
* Bean 工具类
|
* Bean 工具类
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class BeanUtils extends org.springframework.beans.BeanUtils
|
public class BeanUtils extends org.springframework.beans.BeanUtils
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import javax.validation.Validator;
|
|||||||
/**
|
/**
|
||||||
* bean对象属性验证
|
* bean对象属性验证
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class BeanValidators
|
public class BeanValidators
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,14 +9,14 @@ import org.springframework.web.multipart.MultipartFile;
|
|||||||
/**
|
/**
|
||||||
* 文件类型工具类
|
* 文件类型工具类
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class FileTypeUtils
|
public class FileTypeUtils
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 获取文件类型
|
* 获取文件类型
|
||||||
* <p>
|
* <p>
|
||||||
* 例如: ruoyi.txt, 返回: txt
|
* 例如: wfc.txt, 返回: txt
|
||||||
*
|
*
|
||||||
* @param file 文件名
|
* @param file 文件名
|
||||||
* @return 后缀(不含".")
|
* @return 后缀(不含".")
|
||||||
@@ -33,7 +33,7 @@ public class FileTypeUtils
|
|||||||
/**
|
/**
|
||||||
* 获取文件类型
|
* 获取文件类型
|
||||||
* <p>
|
* <p>
|
||||||
* 例如: ruoyi.txt, 返回: txt
|
* 例如: wfc.txt, 返回: txt
|
||||||
*
|
*
|
||||||
* @param fileName 文件名
|
* @param fileName 文件名
|
||||||
* @return 后缀(不含".")
|
* @return 后缀(不含".")
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import org.wfc.common.core.utils.StringUtils;
|
|||||||
/**
|
/**
|
||||||
* 文件处理工具类
|
* 文件处理工具类
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class FileUtils
|
public class FileUtils
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import org.slf4j.LoggerFactory;
|
|||||||
/**
|
/**
|
||||||
* 图片处理工具类
|
* 图片处理工具类
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class ImageUtils
|
public class ImageUtils
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package org.wfc.common.core.utils.file;
|
|||||||
/**
|
/**
|
||||||
* 媒体类型工具类
|
* 媒体类型工具类
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class MimeTypeUtils
|
public class MimeTypeUtils
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import org.wfc.common.core.utils.StringUtils;
|
|||||||
/**
|
/**
|
||||||
* 转义和反转义工具类
|
* 转义和反转义工具类
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class EscapeUtil
|
public class EscapeUtil
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import java.util.regex.Pattern;
|
|||||||
/**
|
/**
|
||||||
* HTML过滤器,用于去除XSS漏洞隐患。
|
* HTML过滤器,用于去除XSS漏洞隐患。
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public final class HTMLFilter
|
public final class HTMLFilter
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import org.wfc.common.core.utils.StringUtils;
|
|||||||
/**
|
/**
|
||||||
* 获取IP方法
|
* 获取IP方法
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class IpUtils
|
public class IpUtils
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import org.apache.poi.ss.usermodel.Workbook;
|
|||||||
/**
|
/**
|
||||||
* Excel数据格式处理适配器
|
* Excel数据格式处理适配器
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public interface ExcelHandlerAdapter
|
public interface ExcelHandlerAdapter
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ import org.wfc.common.core.utils.reflect.ReflectUtils;
|
|||||||
/**
|
/**
|
||||||
* Excel相关处理
|
* Excel相关处理
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class ExcelUtil<T>
|
public class ExcelUtil<T>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import org.wfc.common.core.utils.DateUtils;
|
|||||||
/**
|
/**
|
||||||
* 反射工具类. 提供调用getter/setter方法, 访问私有变量, 调用私有方法, 获取泛型类型Class, 被AOP过的真实类等工具函数.
|
* 反射工具类. 提供调用getter/setter方法, 访问私有变量, 调用私有方法, 获取泛型类型Class, 被AOP过的真实类等工具函数.
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
public class ReflectUtils
|
public class ReflectUtils
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package org.wfc.common.core.utils.sign;
|
|||||||
/**
|
/**
|
||||||
* Base64工具类
|
* Base64工具类
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public final class Base64
|
public final class Base64
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import org.wfc.common.core.utils.StringUtils;
|
|||||||
/**
|
/**
|
||||||
* sql操作工具类
|
* sql操作工具类
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class SqlUtil
|
public class SqlUtil
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package org.wfc.common.core.utils.uuid;
|
|||||||
/**
|
/**
|
||||||
* ID生成器工具类
|
* ID生成器工具类
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class IdUtils
|
public class IdUtils
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import org.wfc.common.core.utils.DateUtils;
|
|||||||
import org.wfc.common.core.utils.StringUtils;
|
import org.wfc.common.core.utils.StringUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author ruoyi 序列生成类
|
* @author wfc 序列生成类
|
||||||
*/
|
*/
|
||||||
public class Seq
|
public class Seq
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import org.wfc.common.core.exception.UtilException;
|
|||||||
/**
|
/**
|
||||||
* 提供通用唯一识别码(universally unique identifier)(UUID)实现
|
* 提供通用唯一识别码(universally unique identifier)(UUID)实现
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public final class UUID implements java.io.Serializable, Comparable<UUID>
|
public final class UUID implements java.io.Serializable, Comparable<UUID>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import org.wfc.common.core.web.page.TableDataInfo;
|
|||||||
/**
|
/**
|
||||||
* web层通用数据处理
|
* web层通用数据处理
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class BaseController
|
public class BaseController
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import org.wfc.common.core.utils.StringUtils;
|
|||||||
/**
|
/**
|
||||||
* 操作消息提醒
|
* 操作消息提醒
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class AjaxResult extends HashMap<String, Object>
|
public class AjaxResult extends HashMap<String, Object>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude;
|
|||||||
/**
|
/**
|
||||||
* Entity基类
|
* Entity基类
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class BaseEntity implements Serializable
|
public class BaseEntity implements Serializable
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import java.util.List;
|
|||||||
/**
|
/**
|
||||||
* Tree基类
|
* Tree基类
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class TreeEntity extends BaseEntity
|
public class TreeEntity extends BaseEntity
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import org.wfc.common.core.utils.StringUtils;
|
|||||||
/**
|
/**
|
||||||
* 分页数据
|
* 分页数据
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class PageDomain
|
public class PageDomain
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import java.util.List;
|
|||||||
/**
|
/**
|
||||||
* 表格分页数据对象
|
* 表格分页数据对象
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class TableDataInfo implements Serializable
|
public class TableDataInfo implements Serializable
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import org.wfc.common.core.utils.ServletUtils;
|
|||||||
/**
|
/**
|
||||||
* 表格数据处理
|
* 表格数据处理
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class TableSupport
|
public class TableSupport
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import java.lang.annotation.Target;
|
|||||||
/**
|
/**
|
||||||
* 自定义xss校验注解
|
* 自定义xss校验注解
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
@Target(value = { ElementType.METHOD, ElementType.FIELD, ElementType.CONSTRUCTOR, ElementType.PARAMETER })
|
@Target(value = { ElementType.METHOD, ElementType.FIELD, ElementType.CONSTRUCTOR, ElementType.PARAMETER })
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import org.wfc.common.core.utils.StringUtils;
|
|||||||
/**
|
/**
|
||||||
* 自定义xss校验注解实现
|
* 自定义xss校验注解实现
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author wfc
|
||||||
*/
|
*/
|
||||||
public class XssValidator implements ConstraintValidator<Xss, String>
|
public class XssValidator implements ConstraintValidator<Xss, String>
|
||||||
{
|
{
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user