类型修正
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
" <result column=\"create_time\" property=\"createTime\" jdbcType=\"TIMESTAMP\"/>",
|
||||
" <result column=\"update_time\" property=\"updateTime\" jdbcType=\"TIMESTAMP\"/>",
|
||||
" <result column=\"delete_time\" property=\"deleteTime\" jdbcType=\"TIMESTAMP\"/>",
|
||||
" <result column=\"deleted\" property=\"deleted\" jdbcType=\"BOOLEAN\"/>",
|
||||
" <result column=\"deleted\" property=\"deleted\" jdbcType=\"Boolean\"/>",
|
||||
" </resultMap>",
|
||||
"",
|
||||
" <!-- 基础列 -->",
|
||||
@@ -116,7 +116,7 @@
|
||||
" </select>",
|
||||
"",
|
||||
" <!-- 根据条件查询${9:实体名称}数量 -->",
|
||||
" <select id=\"get${3:EntityName}CountByFilter\" resultType=\"java.lang.INTEGER\" parameterType=\"${4:org.xyzh.common.dto.sys.${3:EntityName}DTO}\">",
|
||||
" <select id=\"get${3:EntityName}CountByFilter\" resultType=\"java.lang.Integer\" parameterType=\"${4:org.xyzh.common.dto.sys.${3:EntityName}DTO}\">",
|
||||
" SELECT COUNT(1)",
|
||||
" FROM ${10:tb_entity_name}",
|
||||
" <where>",
|
||||
@@ -154,7 +154,7 @@
|
||||
" <result column=\"create_time\" property=\"createTime\" jdbcType=\"TIMESTAMP\"/>",
|
||||
" <result column=\"update_time\" property=\"updateTime\" jdbcType=\"TIMESTAMP\"/>",
|
||||
" <result column=\"delete_time\" property=\"deleteTime\" jdbcType=\"TIMESTAMP\"/>",
|
||||
" <result column=\"deleted\" property=\"deleted\" jdbcType=\"BOOLEAN\"/>",
|
||||
" <result column=\"deleted\" property=\"deleted\" jdbcType=\"Boolean\"/>",
|
||||
" </resultMap>"
|
||||
],
|
||||
"description": "MyBatis ResultMap 映射"
|
||||
@@ -282,7 +282,7 @@
|
||||
"prefix": "mybatis-select-count",
|
||||
"body": [
|
||||
" <!-- 根据条件查询${1:实体名称}数量 -->",
|
||||
" <select id=\"get${2:EntityName}CountByFilter\" resultType=\"java.lang.INTEGER\" parameterType=\"${3:org.xyzh.common.dto.sys.${2:EntityName}DTO}\">",
|
||||
" <select id=\"get${2:EntityName}CountByFilter\" resultType=\"java.lang.Integer\" parameterType=\"${3:org.xyzh.common.dto.sys.${2:EntityName}DTO}\">",
|
||||
" SELECT COUNT(1)",
|
||||
" FROM ${4:tb_entity_name}",
|
||||
" <where>",
|
||||
|
||||
@@ -64,11 +64,11 @@ public interface AuthService {
|
||||
/**
|
||||
* @description 简单校验 token 是否有效(用于快速判断是否已登录)
|
||||
* @param token 鉴权 token
|
||||
* @return ResultDomain<BOOLEAN> true 表示有效/已登录,false 表示无效/未登录
|
||||
* @return ResultDomain<Boolean> true 表示有效/已登录,false 表示无效/未登录
|
||||
* @author yslg
|
||||
* @since 2025-11-03
|
||||
*/
|
||||
ResultDomain<BOOLEAN> isTokenValid(String token);
|
||||
ResultDomain<Boolean> isTokenValid(String token);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ public interface FileService {
|
||||
* @author yslg
|
||||
* @since 2025-11-03
|
||||
*/
|
||||
ResultDomain<BOOLEAN> deleteFile(String fileId);
|
||||
ResultDomain<Boolean> deleteFile(String fileId);
|
||||
|
||||
/**
|
||||
* @description 批量删除文件(逻辑删除)
|
||||
|
||||
@@ -23,7 +23,7 @@ public class TbSysLogDTO extends BaseDTO {
|
||||
private String logId;
|
||||
|
||||
@Schema(description = "日志类型")
|
||||
private INTEGER type;
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "日志级别")
|
||||
private String level;
|
||||
|
||||
@@ -46,10 +46,10 @@ public class TbSysLoginLogDTO extends BaseDTO {
|
||||
private Date loginTime;
|
||||
|
||||
@Schema(description = "状态")
|
||||
private INTEGER status;
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "错误次数")
|
||||
private INTEGER errorCount;
|
||||
private Integer errorCount;
|
||||
|
||||
@Schema(description = "消息")
|
||||
private String message;
|
||||
|
||||
@@ -38,6 +38,6 @@ public class TbMessageChannelDTO extends BaseDTO {
|
||||
private String status;
|
||||
|
||||
@Schema(description = "优先级(数字越大优先级越高)")
|
||||
private INTEGER priority;
|
||||
private Integer priority;
|
||||
}
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ public interface MessageService {
|
||||
* @author yslg
|
||||
* @since 2025-11-05
|
||||
*/
|
||||
ResultDomain<BOOLEAN> deleteMessage(String messageId);
|
||||
ResultDomain<Boolean> deleteMessage(String messageId);
|
||||
|
||||
/**
|
||||
* @description 发送消息
|
||||
|
||||
@@ -44,5 +44,5 @@ public class MessageRangeChannelVO extends BaseVO {
|
||||
private String channelStatus;
|
||||
|
||||
@Schema(description = "渠道优先级(数字越大优先级越高)")
|
||||
private INTEGER channelPriority;
|
||||
private Integer channelPriority;
|
||||
}
|
||||
|
||||
@@ -39,11 +39,11 @@ public interface DeptRoleService {
|
||||
/**
|
||||
* @description 根据ID删除部门
|
||||
* @param deptDTO 部门DTO
|
||||
* @return ResultDomain<BOOLEAN> 删除结果
|
||||
* @return ResultDomain<Boolean> 删除结果
|
||||
* @author yslg
|
||||
* @since 2025-11-05
|
||||
*/
|
||||
ResultDomain<BOOLEAN> deleteDept(TbSysDeptDTO deptDTO);
|
||||
ResultDomain<Boolean> deleteDept(TbSysDeptDTO deptDTO);
|
||||
|
||||
/**
|
||||
* @description 根据ID查询部门
|
||||
@@ -103,11 +103,11 @@ public interface DeptRoleService {
|
||||
/**
|
||||
* @description 根据ID删除角色
|
||||
* @param roleDTO 角色DTO
|
||||
* @return ResultDomain<BOOLEAN> 删除结果
|
||||
* @return ResultDomain<Boolean> 删除结果
|
||||
* @author yslg
|
||||
* @since 2025-11-05
|
||||
*/
|
||||
ResultDomain<BOOLEAN> deleteRole(TbSysRoleDTO roleDTO);
|
||||
ResultDomain<Boolean> deleteRole(TbSysRoleDTO roleDTO);
|
||||
|
||||
/**
|
||||
* @description 根据ID查询角色
|
||||
@@ -176,11 +176,11 @@ public interface DeptRoleService {
|
||||
/**
|
||||
* @description 根据ID删除部门角色关联
|
||||
* @param deptRoleDTO 部门角色DTO
|
||||
* @return ResultDomain<BOOLEAN> 删除结果
|
||||
* @return ResultDomain<Boolean> 删除结果
|
||||
* @author yslg
|
||||
* @since 2025-11-05
|
||||
*/
|
||||
ResultDomain<BOOLEAN> deleteDeptRole(TbSysDeptRoleDTO deptRoleDTO);
|
||||
ResultDomain<Boolean> deleteDeptRole(TbSysDeptRoleDTO deptRoleDTO);
|
||||
|
||||
/**
|
||||
* @description 根据ID查询部门角色关联
|
||||
|
||||
@@ -38,11 +38,11 @@ public interface ModulePermissionService {
|
||||
/**
|
||||
* @description 根据ID删除模块
|
||||
* @param moduleDTO 模块DTO
|
||||
* @return ResultDomain<BOOLEAN> 删除结果
|
||||
* @return ResultDomain<Boolean> 删除结果
|
||||
* @author yslg
|
||||
* @since 2025-11-05
|
||||
*/
|
||||
ResultDomain<BOOLEAN> deleteModule(TbSysModuleDTO moduleDTO);
|
||||
ResultDomain<Boolean> deleteModule(TbSysModuleDTO moduleDTO);
|
||||
|
||||
/**
|
||||
* @description 获取模块分页数据
|
||||
@@ -84,11 +84,11 @@ public interface ModulePermissionService {
|
||||
/**
|
||||
* @description 根据ID删除权限
|
||||
* @param permissionDTO 权限DTO
|
||||
* @return ResultDomain<BOOLEAN> 删除结果
|
||||
* @return ResultDomain<Boolean> 删除结果
|
||||
* @author yslg
|
||||
* @since 2025-11-05
|
||||
*/
|
||||
ResultDomain<BOOLEAN> deletePermission(TbSysPermissionDTO permissionDTO);
|
||||
ResultDomain<Boolean> deletePermission(TbSysPermissionDTO permissionDTO);
|
||||
|
||||
/**
|
||||
* @description 根据模块ID获取权限列表
|
||||
|
||||
@@ -35,11 +35,11 @@ public interface SysConfigService {
|
||||
/**
|
||||
* @description 根据ID删除系统配置
|
||||
* @param configDTO 系统配置DTO
|
||||
* @return ResultDomain<BOOLEAN> 删除结果
|
||||
* @return ResultDomain<Boolean> 删除结果
|
||||
* @author yslg
|
||||
* @since 2025-11-05
|
||||
*/
|
||||
ResultDomain<BOOLEAN> deleteConfig(TbSysConfigDTO configDTO);
|
||||
ResultDomain<Boolean> deleteConfig(TbSysConfigDTO configDTO);
|
||||
|
||||
/**
|
||||
* @description 根据ID查询系统配置
|
||||
|
||||
@@ -39,11 +39,11 @@ public interface SysUserService {
|
||||
/**
|
||||
* @description 根据ID删除用户
|
||||
* @param TbSysUserDTO userDTO 用户DTO
|
||||
* @return ResultDomain<BOOLEAN> 删除结果
|
||||
* @return ResultDomain<Boolean> 删除结果
|
||||
* @author yslg
|
||||
* @since 2025-11-05
|
||||
*/
|
||||
ResultDomain<BOOLEAN> deleteUser(TbSysUserDTO userDTO);
|
||||
ResultDomain<Boolean> deleteUser(TbSysUserDTO userDTO);
|
||||
|
||||
/**
|
||||
* @description 根据ID查询用户
|
||||
@@ -95,11 +95,11 @@ public interface SysUserService {
|
||||
* @param userId 用户ID
|
||||
* @param oldPassword 旧密码
|
||||
* @param newPassword 新密码
|
||||
* @return ResultDomain<BOOLEAN> 更新结果
|
||||
* @return ResultDomain<Boolean> 更新结果
|
||||
* @author yslg
|
||||
* @since 2025-11-05
|
||||
*/
|
||||
ResultDomain<BOOLEAN> updateUserPassword(String userId, String oldPassword, String newPassword);
|
||||
ResultDomain<Boolean> updateUserPassword(String userId, String oldPassword, String newPassword);
|
||||
|
||||
/**
|
||||
* @description 重置用户密码
|
||||
@@ -114,11 +114,11 @@ public interface SysUserService {
|
||||
* @description 更新用户状态
|
||||
* @param userId 用户ID
|
||||
* @param status 状态
|
||||
* @return ResultDomain<BOOLEAN> 更新结果
|
||||
* @return ResultDomain<Boolean> 更新结果
|
||||
* @author yslg
|
||||
* @since 2025-11-05
|
||||
*/
|
||||
ResultDomain<BOOLEAN> updateUserStatus(String userId, String status);
|
||||
ResultDomain<Boolean> updateUserStatus(String userId, String status);
|
||||
|
||||
// ================= 用户详细信息管理 =================
|
||||
/**
|
||||
@@ -152,21 +152,21 @@ public interface SysUserService {
|
||||
/**
|
||||
* @description 删除用户角色关联
|
||||
* @param userRoleDTO 用户角色DTO
|
||||
* @return ResultDomain<BOOLEAN> 删除结果
|
||||
* @return ResultDomain<Boolean> 删除结果
|
||||
* @author yslg
|
||||
* @since 2025-11-05
|
||||
*/
|
||||
ResultDomain<BOOLEAN> removeUserRole(TbSysUserRoleDTO userRoleDTO);
|
||||
ResultDomain<Boolean> removeUserRole(TbSysUserRoleDTO userRoleDTO);
|
||||
|
||||
/**
|
||||
* @description 批量设置用户角色
|
||||
* @param userId 用户ID
|
||||
* @param[] roleIds 角色ID数组
|
||||
* @return ResultDomain<BOOLEAN> 设置结果
|
||||
* @return ResultDomain<Boolean> 设置结果
|
||||
* @author yslg
|
||||
* @since 2025-11-05
|
||||
*/
|
||||
ResultDomain<BOOLEAN> setUserRoles(String userId, String[] roleIds);
|
||||
ResultDomain<Boolean> setUserRoles(String userId, String[] roleIds);
|
||||
|
||||
// ================= 用户完整信息查询 =================
|
||||
/**
|
||||
|
||||
@@ -36,11 +36,11 @@ public interface ViewService {
|
||||
/**
|
||||
* @description 根据ID删除视图
|
||||
* @param viewDTO 视图DTO
|
||||
* @return ResultDomain<BOOLEAN> 删除结果
|
||||
* @return ResultDomain<Boolean> 删除结果
|
||||
* @author yslg
|
||||
* @since 2025-11-05
|
||||
*/
|
||||
ResultDomain<BOOLEAN> deleteView(TbSysViewDTO viewDTO);
|
||||
ResultDomain<Boolean> deleteView(TbSysViewDTO viewDTO);
|
||||
|
||||
/**
|
||||
* @description 根据ID查询视图
|
||||
|
||||
@@ -36,13 +36,13 @@ public class AclVO extends BaseVO {
|
||||
private String principalDeptId;
|
||||
|
||||
@Schema(description = "权限位:1读 2写 4执行")
|
||||
private INTEGER permission;
|
||||
private Integer permission;
|
||||
|
||||
@Schema(description = "允许或显式拒绝", defaultValue = "true")
|
||||
private BOOLEAN allow = true;
|
||||
private Boolean allow = true;
|
||||
|
||||
@Schema(description = "是否包含子级(对dept/role生效)", defaultValue = "false")
|
||||
private BOOLEAN includeDescendants = false;
|
||||
private Boolean includeDescendants = false;
|
||||
|
||||
// TbSysAclPolicyDTO对应字段
|
||||
@Schema(description = "策略ID")
|
||||
@@ -61,11 +61,11 @@ public class AclVO extends BaseVO {
|
||||
private String viewHierarchyRule;
|
||||
|
||||
@Schema(description = "默认权限(无显式ACL时应用)", defaultValue = "0")
|
||||
private INTEGER defaultPermission = 0;
|
||||
private Integer defaultPermission = 0;
|
||||
|
||||
@Schema(description = "默认是否允许", defaultValue = "true")
|
||||
private BOOLEAN defaultAllow = true;
|
||||
private Boolean defaultAllow = true;
|
||||
|
||||
@Schema(description = "是否默认应用到子级", defaultValue = "true")
|
||||
private BOOLEAN applyToChildren = true;
|
||||
private Boolean applyToChildren = true;
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ public class PermissionVO extends BaseVO {
|
||||
private String roleOwnerDeptId;
|
||||
|
||||
@Schema(description = "角色状态")
|
||||
private BOOLEAN roleStatus;
|
||||
private Boolean roleStatus;
|
||||
|
||||
// TbSysModuleDTO对应字段
|
||||
@Schema(description = "模块ID")
|
||||
@@ -99,13 +99,13 @@ public class PermissionVO extends BaseVO {
|
||||
private String viewIcon;
|
||||
|
||||
@Schema(description = "类型")
|
||||
private INTEGER viewType;
|
||||
private Integer viewType;
|
||||
|
||||
@Schema(description = "布局")
|
||||
private String viewLayout;
|
||||
|
||||
@Schema(description = "排序")
|
||||
private INTEGER viewOrderNum;
|
||||
private Integer viewOrderNum;
|
||||
|
||||
@Schema(description = "视图描述")
|
||||
private String viewDescription;
|
||||
|
||||
@@ -32,7 +32,7 @@ public class SysConfigVO extends BaseVO {
|
||||
@Schema(description = "配置值")
|
||||
private String value;
|
||||
|
||||
@Schema(description = "数据类型(String, INTEGER, BOOLEAN, Float, Double)")
|
||||
@Schema(description = "数据类型(String, Integer, Boolean, Float, Double)")
|
||||
private String configType;
|
||||
|
||||
@Schema(description = "配置渲染类型(select, input, textarea, checkbox, radio, switch)")
|
||||
@@ -60,10 +60,10 @@ public class SysConfigVO extends BaseVO {
|
||||
private String moduleDescription;
|
||||
|
||||
@Schema(description = "配置顺序")
|
||||
private INTEGER orderNum;
|
||||
private Integer orderNum;
|
||||
|
||||
@Schema(description = "状态")
|
||||
private INTEGER status;
|
||||
private Integer status;
|
||||
|
||||
public static TbSysConfigDTO toDTO(SysConfigVO vo) {
|
||||
if (vo == null) {
|
||||
|
||||
@@ -51,7 +51,7 @@ public class SysUserVO extends BaseVO {
|
||||
private String avatar;
|
||||
|
||||
@Schema(description = "性别")
|
||||
private INTEGER gender;
|
||||
private Integer gender;
|
||||
|
||||
@Schema(description = "姓")
|
||||
private String familyName;
|
||||
@@ -63,7 +63,7 @@ public class SysUserVO extends BaseVO {
|
||||
private String fullName;
|
||||
|
||||
@Schema(description = "等级")
|
||||
private INTEGER level;
|
||||
private Integer level;
|
||||
|
||||
@Schema(description = "身份证号")
|
||||
private String idCard;
|
||||
|
||||
@@ -50,7 +50,7 @@ public class UserDeptRoleVO extends BaseVO {
|
||||
private String avatar;
|
||||
|
||||
@Schema(description = "性别")
|
||||
private INTEGER gender;
|
||||
private Integer gender;
|
||||
|
||||
@Schema(description = "姓")
|
||||
private String familyName;
|
||||
@@ -62,7 +62,7 @@ public class UserDeptRoleVO extends BaseVO {
|
||||
private String fullName;
|
||||
|
||||
@Schema(description = "等级")
|
||||
private INTEGER level;
|
||||
private Integer level;
|
||||
|
||||
@Schema(description = "身份证号")
|
||||
private String idCard;
|
||||
@@ -100,7 +100,7 @@ public class UserDeptRoleVO extends BaseVO {
|
||||
private String ownerDeptId;
|
||||
|
||||
@Schema(description = "角色状态")
|
||||
private BOOLEAN roleStatus;
|
||||
private Boolean roleStatus;
|
||||
|
||||
|
||||
public static TbSysDeptDTO toDeptDTO(UserDeptRoleVO vo) {
|
||||
|
||||
@@ -34,7 +34,7 @@ public class AuthServiceImpl implements AuthService{
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<BOOLEAN> isTokenValid(String arg0) {
|
||||
public ResultDomain<Boolean> isTokenValid(String arg0) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -16,11 +16,11 @@ public @interface HttpLogin {
|
||||
|
||||
/**
|
||||
* @description 是否必需,默认为true
|
||||
* @return BOOLEAN
|
||||
* @return boolean
|
||||
* @author yslg
|
||||
* @since 2025-11-02
|
||||
*/
|
||||
BOOLEAN required() default true;
|
||||
boolean required() default true;
|
||||
|
||||
/**
|
||||
* @description 当token无效时的错误消息
|
||||
|
||||
@@ -42,7 +42,7 @@ public class HttpLoginArgumentResolver implements HandlerMethodArgumentResolver
|
||||
private static final String REDIS_LOGIN_PREFIX = "login:token:";
|
||||
|
||||
@Override
|
||||
public BOOLEAN supportsParameter(MethodParameter parameter) {
|
||||
public boolean supportsParameter(MethodParameter parameter) {
|
||||
return parameter.hasParameterAnnotation(HttpLogin.class)
|
||||
&& LoginDomain.class.isAssignableFrom(parameter.getParameterType());
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ public class AuthProperties {
|
||||
* 是否启用认证过滤器
|
||||
* 默认启用
|
||||
*/
|
||||
private BOOLEAN enabled = true;
|
||||
private Boolean enabled = true;
|
||||
|
||||
/**
|
||||
* 登录接口路径
|
||||
@@ -72,11 +72,11 @@ public class AuthProperties {
|
||||
whitelist.add("/error");
|
||||
}
|
||||
|
||||
public BOOLEAN isEnabled() {
|
||||
public Boolean isEnabled() {
|
||||
return enabled;
|
||||
}
|
||||
|
||||
public void setEnabled(BOOLEAN enabled) {
|
||||
public void setEnabled(Boolean enabled) {
|
||||
this.enabled = enabled;
|
||||
}
|
||||
|
||||
|
||||
@@ -178,7 +178,7 @@ public class JwtAuthenticationFilter extends OncePerRequestFilter {
|
||||
/**
|
||||
* 检查路径是否在白名单中
|
||||
*/
|
||||
private BOOLEAN isWhitelisted(@NonNull String path) {
|
||||
private Boolean isWhitelisted(@NonNull String path) {
|
||||
// 1. 先检查认证相关接口(login / logout / captcha / refresh)
|
||||
if (authProperties.getAuthPaths() != null) {
|
||||
for (String pattern : authProperties.getAuthPaths()) {
|
||||
|
||||
@@ -34,12 +34,12 @@ public class JwtTokenParser implements TokenParser {
|
||||
}
|
||||
|
||||
@Override
|
||||
public BOOLEAN validateToken(String token, String userId) {
|
||||
public Boolean validateToken(String token, String userId) {
|
||||
return jwtTokenUtil.validateToken(token, userId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BOOLEAN isTokenExpired(String token) {
|
||||
public Boolean isTokenExpired(String token) {
|
||||
return jwtTokenUtil.isTokenExpired(token);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,19 +33,19 @@ public interface TokenParser {
|
||||
* @description 验证令牌
|
||||
* @param token 令牌
|
||||
* @param userId 用户ID
|
||||
* @return BOOLEAN 是否有效
|
||||
* @return Boolean 是否有效
|
||||
* @author yslg
|
||||
* @since 2025-11-02
|
||||
*/
|
||||
BOOLEAN validateToken(String token, String userId);
|
||||
Boolean validateToken(String token, String userId);
|
||||
|
||||
/**
|
||||
* @description 检查令牌是否过期
|
||||
* @param token 令牌
|
||||
* @return BOOLEAN 是否过期
|
||||
* @return Boolean 是否过期
|
||||
* @author yslg
|
||||
* @since 2025-11-02
|
||||
*/
|
||||
BOOLEAN isTokenExpired(String token);
|
||||
Boolean isTokenExpired(String token);
|
||||
}
|
||||
|
||||
|
||||
@@ -114,11 +114,11 @@ public class JwtTokenUtil {
|
||||
* @description 验证令牌
|
||||
* @param token JWT令牌
|
||||
* @param userId 用户ID
|
||||
* @return BOOLEAN 是否有效
|
||||
* @return Boolean 是否有效
|
||||
* @author yslg
|
||||
* @since 2025-11-07
|
||||
*/
|
||||
public BOOLEAN validateToken(String token, String userId) {
|
||||
public Boolean validateToken(String token, String userId) {
|
||||
try {
|
||||
final String tokenUserId = getUserIdFromToken(token);
|
||||
return (userId.equals(tokenUserId) && !isTokenExpired(token));
|
||||
@@ -130,11 +130,11 @@ public class JwtTokenUtil {
|
||||
/**
|
||||
* @description 检查令牌是否过期
|
||||
* @param token JWT令牌
|
||||
* @return BOOLEAN 是否过期
|
||||
* @return Boolean 是否过期
|
||||
* @author yslg
|
||||
* @since 2025-11-07
|
||||
*/
|
||||
public BOOLEAN isTokenExpired(String token) {
|
||||
public Boolean isTokenExpired(String token) {
|
||||
final Date expiration = getExpirationDateFromToken(token);
|
||||
return expiration.before(new Date());
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ public class LoginParam implements Serializable {
|
||||
* @author yslg
|
||||
* @since 2025-11-02
|
||||
*/
|
||||
private BOOLEAN rememberMe;
|
||||
private Boolean rememberMe;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -19,8 +19,8 @@ import lombok.Data;
|
||||
public class ResultDomain<T> implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private INTEGER code;
|
||||
private BOOLEAN success;
|
||||
private Integer code;
|
||||
private Boolean success;
|
||||
private String message;
|
||||
private T data;
|
||||
private List<T> dataList;
|
||||
|
||||
@@ -40,5 +40,5 @@ public class BaseDTO implements Serializable {
|
||||
private Date deleteTime;
|
||||
|
||||
@Schema(description = "是否已删除", defaultValue = "false")
|
||||
private BOOLEAN deleted = false;
|
||||
private Boolean deleted = false;
|
||||
}
|
||||
@@ -35,11 +35,11 @@ public class TbSysAclDTO extends BaseDTO {
|
||||
private String principalDeptId;
|
||||
|
||||
@Schema(description = "权限位:1读 2写 4执行")
|
||||
private INTEGER permission;
|
||||
private Integer permission;
|
||||
|
||||
@Schema(description = "允许或显式拒绝", defaultValue = "true")
|
||||
private BOOLEAN allow = true;
|
||||
private Boolean allow = true;
|
||||
|
||||
@Schema(description = "是否包含子级(对dept/role生效)", defaultValue = "false")
|
||||
private BOOLEAN includeDescendants = false;
|
||||
private Boolean includeDescendants = false;
|
||||
}
|
||||
@@ -33,11 +33,11 @@ public class TbSysAclPolicyDTO extends BaseDTO {
|
||||
private String viewHierarchyRule;
|
||||
|
||||
@Schema(description = "默认权限(无显式ACL时应用)", defaultValue = "0")
|
||||
private INTEGER defaultPermission=0;
|
||||
private Integer defaultPermission=0;
|
||||
|
||||
@Schema(description = "默认是否允许", defaultValue = "true")
|
||||
private BOOLEAN defaultAllow=true;
|
||||
private Boolean defaultAllow=true;
|
||||
|
||||
@Schema(description = "是否默认应用到子级", defaultValue = "true")
|
||||
private BOOLEAN applyToChildren=true;
|
||||
private Boolean applyToChildren=true;
|
||||
}
|
||||
@@ -31,7 +31,7 @@ public class TbSysConfigDTO extends BaseDTO {
|
||||
@Schema(description = "配置值")
|
||||
private String value;
|
||||
|
||||
@Schema(description = "数据类型(String, INTEGER, BOOLEAN, Float, Double)")
|
||||
@Schema(description = "数据类型(String, Integer, Boolean, Float, Double)")
|
||||
private String configType;
|
||||
|
||||
@Schema(description = "配置渲染类型(select, input, textarea, checkbox, radio, switch)")
|
||||
@@ -53,9 +53,9 @@ public class TbSysConfigDTO extends BaseDTO {
|
||||
private String moduleId;
|
||||
|
||||
@Schema(description = "配置顺序")
|
||||
private INTEGER orderNum;
|
||||
private Integer orderNum;
|
||||
|
||||
@Schema(description = "配置状态 0:启用 1:禁用", defaultValue = "0")
|
||||
private INTEGER status = 0;
|
||||
private Integer status = 0;
|
||||
|
||||
}
|
||||
@@ -33,5 +33,5 @@ public class TbSysRoleDTO extends BaseDTO {
|
||||
private String ownerDeptId;
|
||||
|
||||
@Schema(description = "角色状态 true 有效, false 无效")
|
||||
private BOOLEAN status;
|
||||
private Boolean status;
|
||||
}
|
||||
@@ -24,7 +24,7 @@ public class TbSysUserInfoDTO extends BaseDTO {
|
||||
private String avatar;
|
||||
|
||||
@Schema(description = "性别")
|
||||
private INTEGER gender;
|
||||
private Integer gender;
|
||||
|
||||
@Schema(description = "姓")
|
||||
private String familyName;
|
||||
@@ -36,7 +36,7 @@ public class TbSysUserInfoDTO extends BaseDTO {
|
||||
private String fullName;
|
||||
|
||||
@Schema(description = "等级")
|
||||
private INTEGER level;
|
||||
private Integer level;
|
||||
|
||||
@Schema(description = "身份证号")
|
||||
private String idCard;
|
||||
|
||||
@@ -37,13 +37,13 @@ public class TbSysViewDTO extends BaseDTO {
|
||||
private String icon;
|
||||
|
||||
@Schema(description = "类型")
|
||||
private INTEGER type;
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "布局")
|
||||
private String layout;
|
||||
|
||||
@Schema(description = "排序")
|
||||
private INTEGER orderNum;
|
||||
private Integer orderNum;
|
||||
|
||||
@Schema(description = "描述")
|
||||
private String description;
|
||||
|
||||
@@ -47,6 +47,6 @@ public class BaseVO implements Serializable {
|
||||
private Date deleteTime;
|
||||
|
||||
@Schema(description = "是否已删除", defaultValue = "false")
|
||||
private BOOLEAN deleted = false;
|
||||
private Boolean deleted = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -79,11 +79,11 @@ public class RedisService {
|
||||
/**
|
||||
* @description 判断key是否存在
|
||||
* @param key String 键
|
||||
* @return BOOLEAN 是否存在
|
||||
* @return Boolean 是否存在
|
||||
* @author yslg
|
||||
* @since 2025-11-02
|
||||
*/
|
||||
public BOOLEAN hasKey(String key) {
|
||||
public Boolean hasKey(String key) {
|
||||
return redisTemplate.hasKey(key);
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ public class NonUtils {
|
||||
* @param obj 待判断的对象
|
||||
* @return true-对象为null,false-对象不为null
|
||||
*/
|
||||
public static BOOLEAN isNull(Object obj) {
|
||||
public static Boolean isNull(Object obj) {
|
||||
return obj == null;
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ public class NonUtils {
|
||||
* @param obj 待判断的对象
|
||||
* @return true-对象不为null,false-对象为null
|
||||
*/
|
||||
public static BOOLEAN isNotNull(Object obj) {
|
||||
public static Boolean isNotNull(Object obj) {
|
||||
return obj != null;
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ public class NonUtils {
|
||||
* @param objects 待判断的对象数组
|
||||
* @return true-所有对象都为null,false-至少有一个对象不为null
|
||||
*/
|
||||
public static BOOLEAN isAllNull(Object... objects) {
|
||||
public static Boolean isAllNull(Object... objects) {
|
||||
if (objects == null || objects.length == 0) {
|
||||
return true;
|
||||
}
|
||||
@@ -63,7 +63,7 @@ public class NonUtils {
|
||||
* @param objects 待判断的对象数组
|
||||
* @return true-所有对象都不为null,false-至少有一个对象为null
|
||||
*/
|
||||
public static BOOLEAN isAllNotNull(Object... objects) {
|
||||
public static Boolean isAllNotNull(Object... objects) {
|
||||
if (objects == null || objects.length == 0) {
|
||||
return false;
|
||||
}
|
||||
@@ -81,7 +81,7 @@ public class NonUtils {
|
||||
* @param objects 待判断的对象数组
|
||||
* @return true-存在null对象,false-不存在null对象
|
||||
*/
|
||||
public static BOOLEAN hasNull(Object... objects) {
|
||||
public static Boolean hasNull(Object... objects) {
|
||||
if (objects == null || objects.length == 0) {
|
||||
return true;
|
||||
}
|
||||
@@ -106,7 +106,7 @@ public class NonUtils {
|
||||
* @param obj 待判断的对象
|
||||
* @return true-对象为空,false-对象不为空
|
||||
*/
|
||||
public static BOOLEAN isEmpty(Object obj) {
|
||||
public static Boolean isEmpty(Object obj) {
|
||||
if (isNull(obj)) {
|
||||
return true;
|
||||
}
|
||||
@@ -145,7 +145,7 @@ public class NonUtils {
|
||||
* @param obj 待判断的对象
|
||||
* @return true-对象不为空,false-对象为空
|
||||
*/
|
||||
public static BOOLEAN isNotEmpty(Object obj) {
|
||||
public static Boolean isNotEmpty(Object obj) {
|
||||
return !isEmpty(obj);
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@ public class NonUtils {
|
||||
* @param objects 待判断的对象数组
|
||||
* @return true-所有对象都为空,false-至少有一个对象不为空
|
||||
*/
|
||||
public static BOOLEAN isAllEmpty(Object... objects) {
|
||||
public static Boolean isAllEmpty(Object... objects) {
|
||||
if (objects == null || objects.length == 0) {
|
||||
return true;
|
||||
}
|
||||
@@ -173,7 +173,7 @@ public class NonUtils {
|
||||
* @param objects 待判断的对象数组
|
||||
* @return true-所有对象都不为空,false-至少有一个对象为空
|
||||
*/
|
||||
public static BOOLEAN isAllNotEmpty(Object... objects) {
|
||||
public static Boolean isAllNotEmpty(Object... objects) {
|
||||
if (objects == null || objects.length == 0) {
|
||||
return false;
|
||||
}
|
||||
@@ -191,7 +191,7 @@ public class NonUtils {
|
||||
* @param objects 待判断的对象数组
|
||||
* @return true-存在空值,false-不存在空值
|
||||
*/
|
||||
public static BOOLEAN hasEmpty(Object... objects) {
|
||||
public static Boolean hasEmpty(Object... objects) {
|
||||
if (objects == null || objects.length == 0) {
|
||||
return true;
|
||||
}
|
||||
@@ -212,7 +212,7 @@ public class NonUtils {
|
||||
* @param obj 待判断的对象
|
||||
* @return true-对象为空(包括递归检查),false-对象不为空
|
||||
*/
|
||||
public static BOOLEAN isDeepEmpty(Object obj) {
|
||||
public static Boolean isDeepEmpty(Object obj) {
|
||||
return isDeepEmpty(obj, new HashSet<>());
|
||||
}
|
||||
|
||||
@@ -223,7 +223,7 @@ public class NonUtils {
|
||||
* @param visited 已访问对象集合,用于防止循环引用
|
||||
* @return true-对象为空(包括递归检查),false-对象不为空
|
||||
*/
|
||||
private static BOOLEAN isDeepEmpty(Object obj, Set<Object> visited) {
|
||||
private static Boolean isDeepEmpty(Object obj, Set<Object> visited) {
|
||||
if (isEmpty(obj)) {
|
||||
return true;
|
||||
}
|
||||
@@ -288,7 +288,7 @@ public class NonUtils {
|
||||
* @param obj 待判断的对象
|
||||
* @return true-对象不为空(包括递归检查),false-对象为空
|
||||
*/
|
||||
public static BOOLEAN isDeepNotEmpty(Object obj) {
|
||||
public static Boolean isDeepNotEmpty(Object obj) {
|
||||
return !isDeepEmpty(obj);
|
||||
}
|
||||
|
||||
@@ -300,7 +300,7 @@ public class NonUtils {
|
||||
* @param collection 待判断的集合
|
||||
* @return true-集合为null或空,false-集合不为空
|
||||
*/
|
||||
public static BOOLEAN isEmptyCollection(Collection<?> collection) {
|
||||
public static Boolean isEmptyCollection(Collection<?> collection) {
|
||||
return collection == null || collection.isEmpty();
|
||||
}
|
||||
|
||||
@@ -310,7 +310,7 @@ public class NonUtils {
|
||||
* @param collection 待判断的集合
|
||||
* @return true-集合不为null且不为空,false-集合为null或空
|
||||
*/
|
||||
public static BOOLEAN isNotEmptyCollection(Collection<?> collection) {
|
||||
public static Boolean isNotEmptyCollection(Collection<?> collection) {
|
||||
return collection != null && !collection.isEmpty();
|
||||
}
|
||||
|
||||
@@ -320,7 +320,7 @@ public class NonUtils {
|
||||
* @param collection 待判断的集合
|
||||
* @return true-集合包含有效元素,false-集合为空或只包含null/空元素
|
||||
*/
|
||||
public static BOOLEAN hasValidElements(Collection<?> collection) {
|
||||
public static Boolean hasValidElements(Collection<?> collection) {
|
||||
if (isEmptyCollection(collection)) {
|
||||
return false;
|
||||
}
|
||||
@@ -338,7 +338,7 @@ public class NonUtils {
|
||||
* @param collection 待判断的集合
|
||||
* @return true-集合所有元素都有效,false-集合为空或包含null/空元素
|
||||
*/
|
||||
public static BOOLEAN allValidElements(Collection<?> collection) {
|
||||
public static Boolean allValidElements(Collection<?> collection) {
|
||||
if (isEmptyCollection(collection)) {
|
||||
return false;
|
||||
}
|
||||
@@ -378,7 +378,7 @@ public class NonUtils {
|
||||
* @param map 待判断的Map
|
||||
* @return true-Map为null或空,false-Map不为空
|
||||
*/
|
||||
public static BOOLEAN isEmptyMap(Map<?, ?> map) {
|
||||
public static Boolean isEmptyMap(Map<?, ?> map) {
|
||||
return map == null || map.isEmpty();
|
||||
}
|
||||
|
||||
@@ -388,7 +388,7 @@ public class NonUtils {
|
||||
* @param map 待判断的Map
|
||||
* @return true-Map不为null且不为空,false-Map为null或空
|
||||
*/
|
||||
public static BOOLEAN isNotEmptyMap(Map<?, ?> map) {
|
||||
public static Boolean isNotEmptyMap(Map<?, ?> map) {
|
||||
return map != null && !map.isEmpty();
|
||||
}
|
||||
|
||||
@@ -400,7 +400,7 @@ public class NonUtils {
|
||||
* @param array 待判断的数组
|
||||
* @return true-数组为null或空,false-数组不为空
|
||||
*/
|
||||
public static BOOLEAN isEmptyArray(Object array) {
|
||||
public static Boolean isEmptyArray(Object array) {
|
||||
return array == null || !array.getClass().isArray() || Array.getLength(array) == 0;
|
||||
}
|
||||
|
||||
@@ -410,7 +410,7 @@ public class NonUtils {
|
||||
* @param array 待判断的数组
|
||||
* @return true-数组不为null且不为空,false-数组为null或空
|
||||
*/
|
||||
public static BOOLEAN isNotEmptyArray(Object array) {
|
||||
public static Boolean isNotEmptyArray(Object array) {
|
||||
return array != null && array.getClass().isArray() && Array.getLength(array) > 0;
|
||||
}
|
||||
|
||||
@@ -422,7 +422,7 @@ public class NonUtils {
|
||||
* @param str 待判断的字符串
|
||||
* @return true-字符串为null、空或只包含空白字符,false-字符串有有效内容
|
||||
*/
|
||||
public static BOOLEAN isEmptyString(String str) {
|
||||
public static Boolean isEmptyString(String str) {
|
||||
return str == null || str.trim().isEmpty();
|
||||
}
|
||||
|
||||
@@ -432,7 +432,7 @@ public class NonUtils {
|
||||
* @param str 待判断的字符串
|
||||
* @return true-字符串不为null且有有效内容,false-字符串为null、空或只包含空白字符
|
||||
*/
|
||||
public static BOOLEAN isNotEmptyString(String str) {
|
||||
public static Boolean isNotEmptyString(String str) {
|
||||
return str != null && !str.trim().isEmpty();
|
||||
}
|
||||
|
||||
@@ -581,7 +581,7 @@ public class NonUtils {
|
||||
* @param <T> 目标类型
|
||||
* @return true-对象不为null且为指定类型,false-否则
|
||||
*/
|
||||
public static <T> BOOLEAN isInstanceAndNotNull(Object obj, Class<T> clazz) {
|
||||
public static <T> Boolean isInstanceAndNotNull(Object obj, Class<T> clazz) {
|
||||
return isNotNull(obj) && clazz.isInstance(obj);
|
||||
}
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ public class ServletUtils {
|
||||
* @author yslg
|
||||
* @since 2025-11-02
|
||||
*/
|
||||
public static BOOLEAN isAjaxRequest(HttpServletRequest request) {
|
||||
public static Boolean isAjaxRequest(HttpServletRequest request) {
|
||||
String header = request.getHeader("X-Requested-With");
|
||||
return "XMLHttpRequest".equalsIgnoreCase(header);
|
||||
}
|
||||
@@ -153,7 +153,7 @@ public class ServletUtils {
|
||||
* @author yslg
|
||||
* @since 2025-11-02
|
||||
*/
|
||||
public static BOOLEAN isGet(HttpServletRequest request) {
|
||||
public static Boolean isGet(HttpServletRequest request) {
|
||||
return "GET".equalsIgnoreCase(request.getMethod());
|
||||
}
|
||||
|
||||
@@ -164,7 +164,7 @@ public class ServletUtils {
|
||||
* @author yslg
|
||||
* @since 2025-11-02
|
||||
*/
|
||||
public static BOOLEAN isPost(HttpServletRequest request) {
|
||||
public static Boolean isPost(HttpServletRequest request) {
|
||||
return "POST".equalsIgnoreCase(request.getMethod());
|
||||
}
|
||||
|
||||
@@ -175,7 +175,7 @@ public class ServletUtils {
|
||||
* @author yslg
|
||||
* @since 2025-11-02
|
||||
*/
|
||||
public static BOOLEAN isPut(HttpServletRequest request) {
|
||||
public static Boolean isPut(HttpServletRequest request) {
|
||||
return "PUT".equalsIgnoreCase(request.getMethod());
|
||||
}
|
||||
|
||||
@@ -186,7 +186,7 @@ public class ServletUtils {
|
||||
* @author yslg
|
||||
* @since 2025-11-02
|
||||
*/
|
||||
public static BOOLEAN isDelete(HttpServletRequest request) {
|
||||
public static Boolean isDelete(HttpServletRequest request) {
|
||||
return "DELETE".equalsIgnoreCase(request.getMethod());
|
||||
}
|
||||
|
||||
@@ -286,7 +286,7 @@ public class ServletUtils {
|
||||
* @author yslg
|
||||
* @since 2025-11-02
|
||||
*/
|
||||
public static BOOLEAN isHttps(HttpServletRequest request) {
|
||||
public static Boolean isHttps(HttpServletRequest request) {
|
||||
return "https".equals(request.getScheme()) || request.isSecure() ||
|
||||
"443".equals(request.getHeader("X-Forwarded-Port")) ||
|
||||
"https".equals(request.getHeader("X-Forwarded-Proto"));
|
||||
@@ -311,7 +311,7 @@ public class ServletUtils {
|
||||
* @author yslg
|
||||
* @since 2025-11-02
|
||||
*/
|
||||
public static BOOLEAN hasParameter(HttpServletRequest request, String paramName) {
|
||||
public static Boolean hasParameter(HttpServletRequest request, String paramName) {
|
||||
return request.getParameter(paramName) != null;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ public class StringUtils {
|
||||
* @author yslg
|
||||
* @since 2025-11-02
|
||||
*/
|
||||
public static BOOLEAN isEmpty(String str) {
|
||||
public static Boolean isEmpty(String str) {
|
||||
return str == null || str.isEmpty();
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ public class StringUtils {
|
||||
* @author yslg
|
||||
* @since 2025-11-02
|
||||
*/
|
||||
public static BOOLEAN isNotEmpty(String str) {
|
||||
public static Boolean isNotEmpty(String str) {
|
||||
return !isEmpty(str);
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ public class StringUtils {
|
||||
* @author yslg
|
||||
* @since 2025-11-02
|
||||
*/
|
||||
public static BOOLEAN equals(String a, String b) {
|
||||
public static Boolean equals(String a, String b) {
|
||||
return a == null ? b == null : a.equals(b);
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ public class StringUtils {
|
||||
* @author yslg
|
||||
* @since 2025-11-02
|
||||
*/
|
||||
public static BOOLEAN contains(String str, String sub) {
|
||||
public static Boolean contains(String str, String sub) {
|
||||
return str != null && sub != null && str.contains(sub);
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ public class StringUtils {
|
||||
* @author yslg
|
||||
* @since 2025-11-02
|
||||
*/
|
||||
public static BOOLEAN startsWith(String str, String prefix) {
|
||||
public static Boolean startsWith(String str, String prefix) {
|
||||
return str != null && prefix != null && str.startsWith(prefix);
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ public class StringUtils {
|
||||
* @author yslg
|
||||
* @since 2025-11-02
|
||||
*/
|
||||
public static BOOLEAN endsWith(String str, String suffix) {
|
||||
public static Boolean endsWith(String str, String suffix) {
|
||||
return str != null && suffix != null && str.endsWith(suffix);
|
||||
}
|
||||
|
||||
@@ -203,7 +203,7 @@ public class StringUtils {
|
||||
* @author yslg
|
||||
* @since 2025-11-02
|
||||
*/
|
||||
public static BOOLEAN isNumeric(String str) {
|
||||
public static Boolean isNumeric(String str) {
|
||||
if (isEmpty(str)) return false;
|
||||
for (int i = 0; i < str.length(); i++) {
|
||||
if (!Character.isDigit(str.charAt(i))) return false;
|
||||
@@ -218,7 +218,7 @@ public class StringUtils {
|
||||
* @author yslg
|
||||
* @since 2025-11-02
|
||||
*/
|
||||
public static BOOLEAN isBlank(String str) {
|
||||
public static Boolean isBlank(String str) {
|
||||
return str == null || str.isBlank();
|
||||
}
|
||||
/**
|
||||
@@ -228,7 +228,7 @@ public class StringUtils {
|
||||
* @author yslg
|
||||
* @since 2025-11-02
|
||||
*/
|
||||
public static BOOLEAN isNotBlank(String str) {
|
||||
public static Boolean isNotBlank(String str) {
|
||||
return !isBlank(str);
|
||||
}
|
||||
|
||||
|
||||
@@ -265,7 +265,7 @@ public class TimeUtils {
|
||||
* @author yslg
|
||||
* @since 2025-11-02
|
||||
*/
|
||||
public static BOOLEAN isNowBetween(String startTime, String endTime) {
|
||||
public static Boolean isNowBetween(String startTime, String endTime) {
|
||||
LocalTime now = LocalTime.now();
|
||||
LocalTime start = LocalTime.parse(startTime, DateTimeFormatter.ofPattern("HH:mm:ss"));
|
||||
LocalTime end = LocalTime.parse(endTime, DateTimeFormatter.ofPattern("HH:mm:ss"));
|
||||
|
||||
@@ -22,7 +22,7 @@ public class ExcelColumnMapping {
|
||||
/**
|
||||
* @description Excel列索引(从0开始,优先级高于列名)
|
||||
*/
|
||||
private INTEGER columnIndex;
|
||||
private Integer columnIndex;
|
||||
|
||||
/**
|
||||
* @description 对象字段名
|
||||
@@ -37,7 +37,7 @@ public class ExcelColumnMapping {
|
||||
/**
|
||||
* @description 是否必填
|
||||
*/
|
||||
private BOOLEAN required = false;
|
||||
private Boolean required = false;
|
||||
|
||||
/**
|
||||
* @description 默认值
|
||||
@@ -62,7 +62,7 @@ public class ExcelColumnMapping {
|
||||
return columnName;
|
||||
}
|
||||
|
||||
public INTEGER getColumnIndex() {
|
||||
public Integer getColumnIndex() {
|
||||
return columnIndex;
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ public class ExcelColumnMapping {
|
||||
return fieldType;
|
||||
}
|
||||
|
||||
public BOOLEAN isRequired() {
|
||||
public Boolean isRequired() {
|
||||
return required;
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ public class ExcelColumnMapping {
|
||||
/**
|
||||
* 设置是否必填
|
||||
*/
|
||||
public Builder required(BOOLEAN required) {
|
||||
public Builder required(Boolean required) {
|
||||
mapping.required = required;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ public class ExcelReadResult<T> {
|
||||
/**
|
||||
* @description 是否成功
|
||||
*/
|
||||
private BOOLEAN success;
|
||||
private Boolean success;
|
||||
|
||||
/**
|
||||
* @description 成功读取的数据列表
|
||||
@@ -27,7 +27,7 @@ public class ExcelReadResult<T> {
|
||||
/**
|
||||
* @description 失败的行数据(行号 -> 错误信息)
|
||||
*/
|
||||
private Map<INTEGER, String> errorRowsMap;
|
||||
private Map<Integer, String> errorRowsMap;
|
||||
|
||||
/**
|
||||
* @description 总行数(不包括表头)
|
||||
@@ -58,11 +58,11 @@ public class ExcelReadResult<T> {
|
||||
this.errorRowsCount = 0;
|
||||
}
|
||||
|
||||
public BOOLEAN isSuccess() {
|
||||
public Boolean isSuccess() {
|
||||
return success;
|
||||
}
|
||||
|
||||
public void setSuccess(BOOLEAN success) {
|
||||
public void setSuccess(Boolean success) {
|
||||
this.success = success;
|
||||
}
|
||||
|
||||
@@ -74,11 +74,11 @@ public class ExcelReadResult<T> {
|
||||
this.dataList = dataList;
|
||||
}
|
||||
|
||||
public Map<INTEGER, String> getErrorRows() {
|
||||
public Map<Integer, String> getErrorRows() {
|
||||
return errorRowsMap;
|
||||
}
|
||||
|
||||
public void setErrorRows(Map<INTEGER, String> errorRowsMap) {
|
||||
public void setErrorRows(Map<Integer, String> errorRowsMap) {
|
||||
this.errorRowsMap = errorRowsMap;
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ public class ExcelReadResult<T> {
|
||||
this.errorRowsCount++;
|
||||
}
|
||||
|
||||
public BOOLEAN hasErrors() {
|
||||
public Boolean hasErrors() {
|
||||
return this.errorRowsCount > 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -97,9 +97,9 @@ public class ExcelReaderUtils {
|
||||
int dataStartRowIndex = (int) options.getOrDefault("dataStartRowIndex", 1);
|
||||
int sheetIndex = (int) options.getOrDefault("sheetIndex", 0);
|
||||
String sheetName = (String) options.get("sheetName");
|
||||
BOOLEAN skipEmptyRow = (BOOLEAN) options.getOrDefault("skipEmptyRow", true);
|
||||
Boolean skipEmptyRow = (Boolean) options.getOrDefault("skipEmptyRow", true);
|
||||
int maxRows = (int) options.getOrDefault("maxRows", 0);
|
||||
BOOLEAN continueOnError = (BOOLEAN) options.getOrDefault("continueOnError", true);
|
||||
Boolean continueOnError = (Boolean) options.getOrDefault("continueOnError", true);
|
||||
|
||||
// 创建Workbook
|
||||
Workbook workbook = createWorkbook(inputStream, fileName);
|
||||
@@ -113,7 +113,7 @@ public class ExcelReaderUtils {
|
||||
}
|
||||
|
||||
// 解析表头
|
||||
Map<String, INTEGER> headerMap = parseHeader(sheet, headerRowIndex);
|
||||
Map<String, Integer> headerMap = parseHeader(sheet, headerRowIndex);
|
||||
|
||||
// 读取数据
|
||||
readData(sheet, headerMap, targetClass, columnMappings, dataStartRowIndex,
|
||||
@@ -156,8 +156,8 @@ public class ExcelReaderUtils {
|
||||
/**
|
||||
* @description 解析表头
|
||||
*/
|
||||
private static Map<String, INTEGER> parseHeader(Sheet sheet, int headerRowIndex) {
|
||||
Map<String, INTEGER> headerMap = new HashMap<>();
|
||||
private static Map<String, Integer> parseHeader(Sheet sheet, int headerRowIndex) {
|
||||
Map<String, Integer> headerMap = new HashMap<>();
|
||||
Row headerRow = sheet.getRow(headerRowIndex);
|
||||
|
||||
if (headerRow != null) {
|
||||
@@ -175,10 +175,10 @@ public class ExcelReaderUtils {
|
||||
/**
|
||||
* @description 读取数据
|
||||
*/
|
||||
private static void readData(Sheet sheet, Map<String, INTEGER> headerMap,
|
||||
private static void readData(Sheet sheet, Map<String, Integer> headerMap,
|
||||
Class<?> targetClass, List<ExcelColumnMapping> columnMappings,
|
||||
int startRow, BOOLEAN skipEmptyRow, int maxRows,
|
||||
BOOLEAN continueOnError, ExcelReadResult<Object> result) {
|
||||
int startRow, Boolean skipEmptyRow, int maxRows,
|
||||
Boolean continueOnError, ExcelReadResult<Object> result) {
|
||||
int lastRowNum = sheet.getLastRowNum();
|
||||
int endRow = maxRows > 0 ? Math.min(startRow + maxRows, lastRowNum + 1) : lastRowNum + 1;
|
||||
|
||||
@@ -229,7 +229,7 @@ public class ExcelReaderUtils {
|
||||
/**
|
||||
* @description 判断是否为空行
|
||||
*/
|
||||
private static BOOLEAN isEmptyRow(Row row) {
|
||||
private static Boolean isEmptyRow(Row row) {
|
||||
if (row == null) {
|
||||
return true;
|
||||
}
|
||||
@@ -249,7 +249,7 @@ public class ExcelReaderUtils {
|
||||
/**
|
||||
* @description 将行数据转换为对象
|
||||
*/
|
||||
private static Object convertRowToObject(Row row, Map<String, INTEGER> headerMap,
|
||||
private static Object convertRowToObject(Row row, Map<String, Integer> headerMap,
|
||||
Class<?> targetClass, List<ExcelColumnMapping> columnMappings,
|
||||
int rowNum) throws Exception {
|
||||
Object obj = targetClass.getDeclaredConstructor().newInstance();
|
||||
@@ -307,7 +307,7 @@ public class ExcelReaderUtils {
|
||||
/**
|
||||
* @description 获取单元格
|
||||
*/
|
||||
private static Cell getCell(Row row, ExcelColumnMapping mapping, Map<String, INTEGER> headerMap) {
|
||||
private static Cell getCell(Row row, ExcelColumnMapping mapping, Map<String, Integer> headerMap) {
|
||||
if (row == null) {
|
||||
return null;
|
||||
}
|
||||
@@ -318,7 +318,7 @@ public class ExcelReaderUtils {
|
||||
}
|
||||
|
||||
// 使用列名
|
||||
INTEGER columnIndex = headerMap.get(mapping.getColumnName());
|
||||
Integer columnIndex = headerMap.get(mapping.getColumnName());
|
||||
if (columnIndex != null) {
|
||||
return row.getCell(columnIndex);
|
||||
}
|
||||
@@ -344,7 +344,7 @@ public class ExcelReaderUtils {
|
||||
return cell.getNumericCellValue();
|
||||
}
|
||||
case BOOLEAN:
|
||||
return cell.getBOOLEANCellValue();
|
||||
return cell.getBooleanCellValue();
|
||||
case FORMULA:
|
||||
return cell.getCellFormula();
|
||||
case BLANK:
|
||||
@@ -370,11 +370,11 @@ public class ExcelReaderUtils {
|
||||
}
|
||||
|
||||
// INTEGER类型
|
||||
if (targetType == INTEGER.class || targetType == int.class) {
|
||||
if (targetType == Integer.class || targetType == int.class) {
|
||||
if (value instanceof Number) {
|
||||
return ((Number) value).intValue();
|
||||
}
|
||||
return INTEGER.parseInt(strValue);
|
||||
return Integer.parseInt(strValue);
|
||||
}
|
||||
|
||||
// Long类型
|
||||
@@ -402,11 +402,11 @@ public class ExcelReaderUtils {
|
||||
}
|
||||
|
||||
// BOOLEAN类型
|
||||
if (targetType == BOOLEAN.class || targetType == BOOLEAN.class) {
|
||||
if (value instanceof BOOLEAN) {
|
||||
if (targetType == Boolean.class || targetType == boolean.class) {
|
||||
if (value instanceof Boolean) {
|
||||
return value;
|
||||
}
|
||||
return BOOLEAN.parseBOOLEAN(strValue) || "1".equals(strValue) ||
|
||||
return Boolean.parseBoolean(strValue) || "1".equals(strValue) ||
|
||||
"是".equals(strValue) || "true".equalsIgnoreCase(strValue);
|
||||
}
|
||||
|
||||
|
||||
@@ -20,19 +20,19 @@ public class ExcelUtilsExample {
|
||||
*/
|
||||
public static class UserInfo {
|
||||
private String name;
|
||||
private INTEGER age;
|
||||
private Integer age;
|
||||
private String phone;
|
||||
private String email;
|
||||
private String idCard;
|
||||
private Date joinDate;
|
||||
private BOOLEAN active;
|
||||
private Boolean active;
|
||||
|
||||
// Getters and Setters
|
||||
public String getName() { return name; }
|
||||
public void setName(String name) { this.name = name; }
|
||||
|
||||
public INTEGER getAge() { return age; }
|
||||
public void setAge(INTEGER age) { this.age = age; }
|
||||
public Integer getAge() { return age; }
|
||||
public void setAge(Integer age) { this.age = age; }
|
||||
|
||||
public String getPhone() { return phone; }
|
||||
public void setPhone(String phone) { this.phone = phone; }
|
||||
@@ -46,8 +46,8 @@ public class ExcelUtilsExample {
|
||||
public Date getJoinDate() { return joinDate; }
|
||||
public void setJoinDate(Date joinDate) { this.joinDate = joinDate; }
|
||||
|
||||
public BOOLEAN getActive() { return active; }
|
||||
public void setActive(BOOLEAN active) { this.active = active; }
|
||||
public Boolean getActive() { return active; }
|
||||
public void setActive(Boolean active) { this.active = active; }
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
@@ -81,7 +81,7 @@ public class ExcelUtilsExample {
|
||||
ExcelColumnMapping.builder()
|
||||
.columnName("年龄")
|
||||
.fieldName("age")
|
||||
.fieldType(INTEGER.class)
|
||||
.fieldType(Integer.class)
|
||||
.required()
|
||||
.build(),
|
||||
|
||||
@@ -116,7 +116,7 @@ public class ExcelUtilsExample {
|
||||
ExcelColumnMapping.builder()
|
||||
.columnName("是否在职")
|
||||
.fieldName("active")
|
||||
.fieldType(BOOLEAN.class)
|
||||
.fieldType(Boolean.class)
|
||||
.defaultValue("true")
|
||||
.build()
|
||||
);
|
||||
@@ -172,7 +172,7 @@ public class ExcelUtilsExample {
|
||||
ExcelColumnMapping.builder()
|
||||
.columnName("年龄")
|
||||
.fieldName("age")
|
||||
.fieldType(INTEGER.class)
|
||||
.fieldType(Integer.class)
|
||||
.required()
|
||||
.addValidation(
|
||||
ValidationParam.builder()
|
||||
@@ -180,7 +180,7 @@ public class ExcelUtilsExample {
|
||||
.fieldLabel("年龄")
|
||||
.required()
|
||||
.customValidator(value -> {
|
||||
INTEGER age = (INTEGER) value;
|
||||
Integer age = (Integer) value;
|
||||
return age >= 18 && age <= 65;
|
||||
})
|
||||
.customErrorMessage("年龄必须在18-65岁之间")
|
||||
@@ -277,7 +277,7 @@ public class ExcelUtilsExample {
|
||||
ExcelColumnMapping.builder()
|
||||
.columnIndex(1) // 第2列
|
||||
.fieldName("age")
|
||||
.fieldType(INTEGER.class)
|
||||
.fieldType(Integer.class)
|
||||
.required()
|
||||
.build(),
|
||||
|
||||
@@ -316,7 +316,7 @@ public class ExcelUtilsExample {
|
||||
ExcelColumnMapping.builder()
|
||||
.columnName("年龄")
|
||||
.fieldName("age")
|
||||
.fieldType(INTEGER.class)
|
||||
.fieldType(Integer.class)
|
||||
.required()
|
||||
.build()
|
||||
);
|
||||
|
||||
@@ -37,11 +37,11 @@
|
||||
```java
|
||||
public class UserInfo {
|
||||
private String name;
|
||||
private INTEGER age;
|
||||
private Integer age;
|
||||
private String phone;
|
||||
private String email;
|
||||
private Date joinDate;
|
||||
private BOOLEAN active;
|
||||
private Boolean active;
|
||||
|
||||
// Getters and Setters...
|
||||
}
|
||||
@@ -61,7 +61,7 @@ List<ExcelColumnMapping> columnMappings = Arrays.asList(
|
||||
ExcelColumnMapping.builder()
|
||||
.columnName("年龄")
|
||||
.fieldName("age")
|
||||
.fieldType(INTEGER.class)
|
||||
.fieldType(Integer.class)
|
||||
.required()
|
||||
.build(),
|
||||
|
||||
@@ -88,7 +88,7 @@ List<ExcelColumnMapping> columnMappings = Arrays.asList(
|
||||
ExcelColumnMapping.builder()
|
||||
.columnName("是否在职")
|
||||
.fieldName("active")
|
||||
.fieldType(BOOLEAN.class)
|
||||
.fieldType(Boolean.class)
|
||||
.defaultValue("true")
|
||||
.build()
|
||||
);
|
||||
@@ -140,7 +140,7 @@ List<ExcelColumnMapping> columnMappings = Arrays.asList(
|
||||
ExcelColumnMapping.builder()
|
||||
.columnName("年龄")
|
||||
.fieldName("age")
|
||||
.fieldType(INTEGER.class)
|
||||
.fieldType(Integer.class)
|
||||
.required()
|
||||
.addValidation(
|
||||
ValidationParam.builder()
|
||||
@@ -148,7 +148,7 @@ List<ExcelColumnMapping> columnMappings = Arrays.asList(
|
||||
.fieldLabel("年龄")
|
||||
.required()
|
||||
.customValidator(value -> {
|
||||
INTEGER age = (INTEGER) value;
|
||||
Integer age = (Integer) value;
|
||||
return age >= 18 && age <= 65;
|
||||
})
|
||||
.customErrorMessage("年龄必须在18-65岁之间")
|
||||
@@ -227,7 +227,7 @@ List<ExcelColumnMapping> columnMappings = Arrays.asList(
|
||||
ExcelColumnMapping.builder()
|
||||
.columnIndex(1) // 第2列
|
||||
.fieldName("age")
|
||||
.fieldType(INTEGER.class)
|
||||
.fieldType(Integer.class)
|
||||
.required()
|
||||
.build(),
|
||||
|
||||
@@ -282,7 +282,7 @@ List<ValidationParam> validationParams = Arrays.asList(
|
||||
.fieldLabel("年龄")
|
||||
.required()
|
||||
.customValidator(value -> {
|
||||
INTEGER age = (INTEGER) value;
|
||||
Integer age = (Integer) value;
|
||||
return age >= 18 && age <= 65;
|
||||
})
|
||||
.customErrorMessage("年龄必须在18-65岁之间")
|
||||
@@ -422,11 +422,11 @@ public ResultDomain<String> importUsers(@RequestParam("file") MultipartFile file
|
||||
## 支持的数据类型
|
||||
|
||||
- **String** - 字符串
|
||||
- **INTEGER/int** - 整数
|
||||
- **Integer/int** - 整数
|
||||
- **Long/long** - 长整数
|
||||
- **Double/double** - 双精度浮点数
|
||||
- **Float/float** - 单精度浮点数
|
||||
- **BOOLEAN/BOOLEAN** - 布尔值(支持:true/false、1/0、是/否)
|
||||
- **Boolean/Boolean** - 布尔值(支持:true/false、1/0、是/否)
|
||||
- **Date** - 日期(需指定dateFormat)
|
||||
|
||||
## 配置选项
|
||||
@@ -439,7 +439,7 @@ public ResultDomain<String> importUsers(@RequestParam("file") MultipartFile file
|
||||
| columnIndex(int) | 设置Excel列索引(从0开始,优先级高于columnName) | columnName和columnIndex至少一个 |
|
||||
| fieldName(String) | 设置对象字段名 | 是 |
|
||||
| fieldType(Class<?>) | 设置字段类型 | 否(默认String.class) |
|
||||
| required() / required(BOOLEAN) | 设置是否必填 | 否(默认false) |
|
||||
| required() / required(Boolean) | 设置是否必填 | 否(默认false) |
|
||||
| defaultValue(String) | 设置默认值 | 否 |
|
||||
| dateFormat(String) | 设置日期格式 | 否(默认"yyyy-MM-dd") |
|
||||
| addValidation(ValidationParam) | 添加校验参数 | 否 |
|
||||
@@ -455,9 +455,9 @@ public ResultDomain<String> importUsers(@RequestParam("file") MultipartFile file
|
||||
| dataStartRowIndex | int | 数据起始行(从0开始) | 1 |
|
||||
| sheetIndex | int | Sheet索引(从0开始) | 0 |
|
||||
| sheetName | String | Sheet名称(优先级高于sheetIndex) | null |
|
||||
| skipEmptyRow | BOOLEAN | 跳过空行 | true |
|
||||
| skipEmptyRow | Boolean | 跳过空行 | true |
|
||||
| maxRows | int | 最大读取行数(0=不限制) | 0 |
|
||||
| continueOnError | BOOLEAN | 遇到错误继续读取 | true |
|
||||
| continueOnError | Boolean | 遇到错误继续读取 | true |
|
||||
|
||||
## 核心特性
|
||||
|
||||
@@ -480,7 +480,7 @@ public ResultDomain<String> importUsers(@RequestParam("file") MultipartFile file
|
||||
5. **布尔类型**:支持多种格式(true/false、1/0、是/否)
|
||||
6. **错误处理**:根据continueOnError选项决定遇到错误时是否继续
|
||||
7. **文件格式**:支持.xls和.xlsx两种格式
|
||||
8. **类型转换**:自动转换支持String、INTEGER、Long、Double、Float、BOOLEAN、Date
|
||||
8. **类型转换**:自动转换支持String、Interge、Long、Double、Float、Boolean、Date
|
||||
|
||||
## 依赖
|
||||
|
||||
|
||||
@@ -177,7 +177,7 @@ ValidationParam param = ValidationParam.builder()
|
||||
.fieldLabel("年龄")
|
||||
.required()
|
||||
.customValidator(value -> {
|
||||
INTEGER age = (INTEGER) value;
|
||||
Integer age = (Integer) value;
|
||||
return age >= 18 && age <= 60;
|
||||
})
|
||||
.customErrorMessage("年龄必须在18-60岁之间")
|
||||
@@ -342,7 +342,7 @@ public ResultDomain<User> register(@RequestBody Map<String, Object> params) {
|
||||
public class CustomValidateMethod implements ValidateMethod {
|
||||
|
||||
@Override
|
||||
public BOOLEAN validate(Object value) {
|
||||
public Boolean validate(Object value) {
|
||||
// 实现校验逻辑
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ public class ValidationParam {
|
||||
/**
|
||||
* @description 是否必传
|
||||
*/
|
||||
private BOOLEAN required;
|
||||
private Boolean required;
|
||||
|
||||
/**
|
||||
* @description 字段类型
|
||||
@@ -37,12 +37,12 @@ public class ValidationParam {
|
||||
/**
|
||||
* @description 最小长度(字符串)
|
||||
*/
|
||||
private INTEGER minLength;
|
||||
private Integer minLength;
|
||||
|
||||
/**
|
||||
* @description 最大长度(字符串)
|
||||
*/
|
||||
private INTEGER maxLength;
|
||||
private Integer maxLength;
|
||||
|
||||
/**
|
||||
* @description 最小值(数字)
|
||||
@@ -77,7 +77,7 @@ public class ValidationParam {
|
||||
/**
|
||||
* @description 是否允许为空字符串(默认不允许)
|
||||
*/
|
||||
private BOOLEAN allowEmpty = false;
|
||||
private Boolean allowEmpty = false;
|
||||
|
||||
/**
|
||||
* @description 校验方法(使用预定义的校验方法)
|
||||
@@ -106,7 +106,7 @@ public class ValidationParam {
|
||||
return fieldLabel;
|
||||
}
|
||||
|
||||
public BOOLEAN isRequired() {
|
||||
public Boolean isRequired() {
|
||||
return required;
|
||||
}
|
||||
|
||||
@@ -114,11 +114,11 @@ public class ValidationParam {
|
||||
return fieldType;
|
||||
}
|
||||
|
||||
public INTEGER getMinLength() {
|
||||
public Integer getMinLength() {
|
||||
return minLength;
|
||||
}
|
||||
|
||||
public INTEGER getMaxLength() {
|
||||
public Integer getMaxLength() {
|
||||
return maxLength;
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ public class ValidationParam {
|
||||
return customErrorMessage;
|
||||
}
|
||||
|
||||
public BOOLEAN isAllowEmpty() {
|
||||
public Boolean isAllowEmpty() {
|
||||
return allowEmpty;
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ public class ValidationParam {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder required(BOOLEAN required) {
|
||||
public Builder required(Boolean required) {
|
||||
param.required = required;
|
||||
return this;
|
||||
}
|
||||
@@ -193,12 +193,12 @@ public class ValidationParam {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder minLength(INTEGER minLength) {
|
||||
public Builder minLength(Integer minLength) {
|
||||
param.minLength = minLength;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder maxLength(INTEGER maxLength) {
|
||||
public Builder maxLength(Integer maxLength) {
|
||||
param.maxLength = maxLength;
|
||||
return this;
|
||||
}
|
||||
@@ -233,7 +233,7 @@ public class ValidationParam {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder allowEmpty(BOOLEAN allowEmpty) {
|
||||
public Builder allowEmpty(Boolean allowEmpty) {
|
||||
param.allowEmpty = allowEmpty;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ public class ValidationResult {
|
||||
/**
|
||||
* @description 是否校验通过
|
||||
*/
|
||||
private BOOLEAN valid;
|
||||
private Boolean valid;
|
||||
|
||||
/**
|
||||
* @description 错误信息列表
|
||||
@@ -32,11 +32,11 @@ public class ValidationResult {
|
||||
this.errors = new ArrayList<>();
|
||||
}
|
||||
|
||||
public BOOLEAN isValid() {
|
||||
public Boolean isValid() {
|
||||
return valid;
|
||||
}
|
||||
|
||||
public void setValid(BOOLEAN valid) {
|
||||
public void setValid(Boolean valid) {
|
||||
this.valid = valid;
|
||||
}
|
||||
|
||||
@@ -70,9 +70,9 @@ public class ValidationResult {
|
||||
|
||||
/**
|
||||
* @description 是否有错误
|
||||
* @return BOOLEAN
|
||||
* @return Boolean
|
||||
*/
|
||||
public BOOLEAN hasErrors() {
|
||||
public Boolean hasErrors() {
|
||||
return !valid;
|
||||
}
|
||||
|
||||
|
||||
@@ -289,7 +289,7 @@ public class ValidationUtils {
|
||||
* @param required 是否必填
|
||||
* @return ValidationParam
|
||||
*/
|
||||
public static ValidationParam email(String fieldName, String fieldLabel, BOOLEAN required) {
|
||||
public static ValidationParam email(String fieldName, String fieldLabel, Boolean required) {
|
||||
return ValidationParam.builder()
|
||||
.fieldName(fieldName)
|
||||
.fieldLabel(fieldLabel)
|
||||
@@ -307,7 +307,7 @@ public class ValidationUtils {
|
||||
* @param required 是否必填
|
||||
* @return ValidationParam
|
||||
*/
|
||||
public static ValidationParam phone(String fieldName, String fieldLabel, BOOLEAN required) {
|
||||
public static ValidationParam phone(String fieldName, String fieldLabel, Boolean required) {
|
||||
return ValidationParam.builder()
|
||||
.fieldName(fieldName)
|
||||
.fieldLabel(fieldLabel)
|
||||
|
||||
@@ -10,7 +10,7 @@ package org.xyzh.common.utils.validation.method;
|
||||
public class BankCardValidateMethod implements ValidateMethod {
|
||||
|
||||
@Override
|
||||
public BOOLEAN validate(Object value) {
|
||||
public Boolean validate(Object value) {
|
||||
if (value == null || !(value instanceof String)) {
|
||||
return false;
|
||||
}
|
||||
@@ -34,11 +34,11 @@ public class BankCardValidateMethod implements ValidateMethod {
|
||||
/**
|
||||
* @description Luhn算法校验(银行卡校验算法)
|
||||
* @param cardNumber 银行卡号
|
||||
* @return BOOLEAN 是否通过校验
|
||||
* @return Boolean 是否通过校验
|
||||
*/
|
||||
private BOOLEAN luhnCheck(String cardNumber) {
|
||||
private Boolean luhnCheck(String cardNumber) {
|
||||
int sum = 0;
|
||||
BOOLEAN alternate = false;
|
||||
Boolean alternate = false;
|
||||
|
||||
// 从右向左遍历
|
||||
for (int i = cardNumber.length() - 1; i >= 0; i--) {
|
||||
|
||||
@@ -14,18 +14,18 @@ public class ChineseValidateMethod implements ValidateMethod {
|
||||
// 中文字符正则(包括中文标点符号)
|
||||
private static final Pattern CHINESE_PATTERN = Pattern.compile("^[\u4e00-\u9fa5]+$");
|
||||
|
||||
private final BOOLEAN allowPunctuation; // 是否允许中文标点符号
|
||||
private final Boolean allowPunctuation; // 是否允许中文标点符号
|
||||
|
||||
public ChineseValidateMethod() {
|
||||
this.allowPunctuation = false;
|
||||
}
|
||||
|
||||
public ChineseValidateMethod(BOOLEAN allowPunctuation) {
|
||||
public ChineseValidateMethod(Boolean allowPunctuation) {
|
||||
this.allowPunctuation = allowPunctuation;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BOOLEAN validate(Object value) {
|
||||
public Boolean validate(Object value) {
|
||||
if (value == null || !(value instanceof String)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ public class EmailValidateMethod implements ValidateMethod {
|
||||
}
|
||||
|
||||
@Override
|
||||
public BOOLEAN validate(Object value) {
|
||||
public Boolean validate(Object value) {
|
||||
if (value == null || !(value instanceof String)) {
|
||||
return false;
|
||||
}
|
||||
@@ -48,7 +48,7 @@ public class EmailValidateMethod implements ValidateMethod {
|
||||
|
||||
// 域名限制校验
|
||||
if (allowedDomains != null && allowedDomains.length > 0) {
|
||||
BOOLEAN domainMatched = false;
|
||||
Boolean domainMatched = false;
|
||||
for (String domain : allowedDomains) {
|
||||
if (email.endsWith("@" + domain.toLowerCase())) {
|
||||
domainMatched = true;
|
||||
|
||||
@@ -60,7 +60,7 @@ public class IdCardValidateMethod implements ValidateMethod {
|
||||
}
|
||||
|
||||
@Override
|
||||
public BOOLEAN validate(Object value) {
|
||||
public Boolean validate(Object value) {
|
||||
if (value == null || !(value instanceof String)) {
|
||||
return false;
|
||||
}
|
||||
@@ -83,7 +83,7 @@ public class IdCardValidateMethod implements ValidateMethod {
|
||||
/**
|
||||
* @description 校验15位身份证
|
||||
*/
|
||||
private BOOLEAN validate15IdCard(String idCard) {
|
||||
private Boolean validate15IdCard(String idCard) {
|
||||
// 15位身份证格式:省(2位)市(2位)县(2位)年(2位)月(2位)日(2位)顺序号(3位)
|
||||
if (!Pattern.matches("^\\d{15}$", idCard)) {
|
||||
return false;
|
||||
@@ -106,7 +106,7 @@ public class IdCardValidateMethod implements ValidateMethod {
|
||||
/**
|
||||
* @description 校验18位身份证
|
||||
*/
|
||||
private BOOLEAN validate18IdCard(String idCard) {
|
||||
private Boolean validate18IdCard(String idCard) {
|
||||
// 18位身份证格式:省(2位)市(2位)县(2位)年(4位)月(2位)日(2位)顺序号(3位)校验码(1位)
|
||||
if (!Pattern.matches("^\\d{17}[0-9Xx]$", idCard)) {
|
||||
return false;
|
||||
@@ -134,11 +134,11 @@ public class IdCardValidateMethod implements ValidateMethod {
|
||||
/**
|
||||
* @description 校验日期是否合法
|
||||
*/
|
||||
private BOOLEAN validateDate(String year, String month, String day) {
|
||||
private Boolean validateDate(String year, String month, String day) {
|
||||
try {
|
||||
int y = INTEGER.parseInt(year);
|
||||
int m = INTEGER.parseInt(month);
|
||||
int d = INTEGER.parseInt(day);
|
||||
int y = Integer.parseInt(year);
|
||||
int m = Integer.parseInt(month);
|
||||
int d = Integer.parseInt(day);
|
||||
|
||||
// 年份范围:1900-当前年份
|
||||
int currentYear = java.time.Year.now().getValue();
|
||||
@@ -168,14 +168,14 @@ public class IdCardValidateMethod implements ValidateMethod {
|
||||
/**
|
||||
* @description 判断是否为闰年
|
||||
*/
|
||||
private BOOLEAN isLeapYear(int year) {
|
||||
private Boolean isLeapYear(int year) {
|
||||
return (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 校验18位身份证的校验码
|
||||
*/
|
||||
private BOOLEAN validateCheckCode(String idCard) {
|
||||
private Boolean validateCheckCode(String idCard) {
|
||||
int sum = 0;
|
||||
for (int i = 0; i < 17; i++) {
|
||||
sum += (idCard.charAt(i) - '0') * WEIGHT[i];
|
||||
|
||||
@@ -13,10 +13,10 @@ public class PasswordValidateMethod implements ValidateMethod {
|
||||
|
||||
private final int minLength;
|
||||
private final int maxLength;
|
||||
private final BOOLEAN requireUpperCase;
|
||||
private final BOOLEAN requireLowerCase;
|
||||
private final BOOLEAN requireDigit;
|
||||
private final BOOLEAN requireSpecialChar;
|
||||
private final Boolean requireUpperCase;
|
||||
private final Boolean requireLowerCase;
|
||||
private final Boolean requireDigit;
|
||||
private final Boolean requireSpecialChar;
|
||||
|
||||
/**
|
||||
* @description 默认密码规则:6-20位,必须包含字母和数字
|
||||
@@ -35,8 +35,8 @@ public class PasswordValidateMethod implements ValidateMethod {
|
||||
* @param requireSpecialChar 是否需要特殊字符
|
||||
*/
|
||||
public PasswordValidateMethod(int minLength, int maxLength,
|
||||
BOOLEAN requireUpperCase, BOOLEAN requireLowerCase,
|
||||
BOOLEAN requireDigit, BOOLEAN requireSpecialChar) {
|
||||
Boolean requireUpperCase, Boolean requireLowerCase,
|
||||
Boolean requireDigit, Boolean requireSpecialChar) {
|
||||
this.minLength = minLength;
|
||||
this.maxLength = maxLength;
|
||||
this.requireUpperCase = requireUpperCase;
|
||||
@@ -46,7 +46,7 @@ public class PasswordValidateMethod implements ValidateMethod {
|
||||
}
|
||||
|
||||
@Override
|
||||
public BOOLEAN validate(Object value) {
|
||||
public Boolean validate(Object value) {
|
||||
if (value == null || !(value instanceof String)) {
|
||||
return false;
|
||||
}
|
||||
@@ -88,7 +88,7 @@ public class PasswordValidateMethod implements ValidateMethod {
|
||||
|
||||
if (requireUpperCase || requireLowerCase || requireDigit || requireSpecialChar) {
|
||||
msg.append(",且包含");
|
||||
BOOLEAN first = true;
|
||||
Boolean first = true;
|
||||
|
||||
if (requireUpperCase) {
|
||||
msg.append("大写字母");
|
||||
|
||||
@@ -20,18 +20,18 @@ public class PhoneValidateMethod implements ValidateMethod {
|
||||
// 台湾手机号正则
|
||||
private static final Pattern TW_PHONE_PATTERN = Pattern.compile("^09\\d{8}$");
|
||||
|
||||
private final BOOLEAN strictMode; // 严格模式,只验证中国大陆手机号
|
||||
private final Boolean strictMode; // 严格模式,只验证中国大陆手机号
|
||||
|
||||
public PhoneValidateMethod() {
|
||||
this.strictMode = true;
|
||||
}
|
||||
|
||||
public PhoneValidateMethod(BOOLEAN strictMode) {
|
||||
public PhoneValidateMethod(Boolean strictMode) {
|
||||
this.strictMode = strictMode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BOOLEAN validate(Object value) {
|
||||
public Boolean validate(Object value) {
|
||||
if (value == null || !(value instanceof String)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -16,18 +16,18 @@ public class UrlValidateMethod implements ValidateMethod {
|
||||
"^(https?|ftp)://[a-zA-Z0-9+&@#/%?=~_|!:,.;-]*[a-zA-Z0-9+&@#/%=~_|-]$"
|
||||
);
|
||||
|
||||
private final BOOLEAN requireHttps; // 是否要求HTTPS
|
||||
private final Boolean requireHttps; // 是否要求HTTPS
|
||||
|
||||
public UrlValidateMethod() {
|
||||
this.requireHttps = false;
|
||||
}
|
||||
|
||||
public UrlValidateMethod(BOOLEAN requireHttps) {
|
||||
public UrlValidateMethod(Boolean requireHttps) {
|
||||
this.requireHttps = requireHttps;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BOOLEAN validate(Object value) {
|
||||
public Boolean validate(Object value) {
|
||||
if (value == null || !(value instanceof String)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -12,9 +12,9 @@ public interface ValidateMethod {
|
||||
/**
|
||||
* @description 校验方法
|
||||
* @param value 待校验的值
|
||||
* @return BOOLEAN 是否校验通过
|
||||
* @return Boolean 是否校验通过
|
||||
*/
|
||||
BOOLEAN validate(Object value);
|
||||
Boolean validate(Object value);
|
||||
|
||||
/**
|
||||
* @description 获取校验失败的错误提示信息
|
||||
|
||||
@@ -56,12 +56,12 @@ public class DeptRoleController {
|
||||
/**
|
||||
* @description 删除部门
|
||||
* @param deptDTO 部门DTO
|
||||
* @return ResultDomain<BOOLEAN> 删除结果
|
||||
* @return ResultDomain<Boolean> 删除结果
|
||||
* @author yslg
|
||||
* @since 2025-11-10
|
||||
*/
|
||||
@DeleteMapping("/dept")
|
||||
public ResultDomain<BOOLEAN> deleteDept(@RequestBody TbSysDeptDTO deptDTO) {
|
||||
public ResultDomain<Boolean> deleteDept(@RequestBody TbSysDeptDTO deptDTO) {
|
||||
return deptRoleService.deleteDept(deptDTO);
|
||||
}
|
||||
|
||||
@@ -117,12 +117,12 @@ public class DeptRoleController {
|
||||
/**
|
||||
* @description 删除角色
|
||||
* @param roleDTO 角色DTO
|
||||
* @return ResultDomain<BOOLEAN> 删除结果
|
||||
* @return ResultDomain<Boolean> 删除结果
|
||||
* @author yslg
|
||||
* @since 2025-11-10
|
||||
*/
|
||||
@DeleteMapping("/role")
|
||||
public ResultDomain<BOOLEAN> deleteRole(@RequestBody TbSysRoleDTO roleDTO) {
|
||||
public ResultDomain<Boolean> deleteRole(@RequestBody TbSysRoleDTO roleDTO) {
|
||||
return deptRoleService.deleteRole(roleDTO);
|
||||
}
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ public class PermissionController {
|
||||
* @since 2025-11-10
|
||||
*/
|
||||
@DeleteMapping("/module")
|
||||
public ResultDomain<BOOLEAN> deleteModule(@RequestBody TbSysModuleDTO moduleDTO) {
|
||||
public ResultDomain<Boolean> deleteModule(@RequestBody TbSysModuleDTO moduleDTO) {
|
||||
return modulePermissionService.deleteModule(moduleDTO);
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ public class PermissionController {
|
||||
* @since 2025-11-10
|
||||
*/
|
||||
@DeleteMapping
|
||||
public ResultDomain<BOOLEAN> deletePermission(@RequestBody TbSysPermissionDTO permissionDTO) {
|
||||
public ResultDomain<Boolean> deletePermission(@RequestBody TbSysPermissionDTO permissionDTO) {
|
||||
return modulePermissionService.deletePermission(permissionDTO);
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ public class SysConfigController {
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
public ResultDomain<BOOLEAN> deleteConfig(@RequestBody TbSysConfigDTO configDTO) {
|
||||
public ResultDomain<Boolean> deleteConfig(@RequestBody TbSysConfigDTO configDTO) {
|
||||
return sysConfigService.deleteConfig(configDTO);
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ public class UserController {
|
||||
|
||||
@DeleteMapping
|
||||
@PreAuthorize("hasAuthority('system:user:delete')")
|
||||
public ResultDomain<BOOLEAN> deleteUser(@RequestBody TbSysUserDTO userDTO) {
|
||||
public ResultDomain<Boolean> deleteUser(@RequestBody TbSysUserDTO userDTO) {
|
||||
return sysUserService.deleteUser(userDTO);
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ public class ViewController {
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
public ResultDomain<BOOLEAN> deleteView(@RequestBody TbSysViewDTO viewDTO) {
|
||||
public ResultDomain<Boolean> deleteView(@RequestBody TbSysViewDTO viewDTO) {
|
||||
return viewService.deleteView(viewDTO);
|
||||
}
|
||||
|
||||
|
||||
@@ -104,14 +104,14 @@ public class DeptRoleServiceImpl implements DeptRoleService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<BOOLEAN> deleteDept(TbSysDeptDTO deptDTO) {
|
||||
public ResultDomain<Boolean> deleteDept(TbSysDeptDTO deptDTO) {
|
||||
if (deptDTO == null || StringUtils.isBlank(deptDTO.getDeptId())) {
|
||||
return ResultDomain.failure(MSG_DEPT_ID_REQUIRED);
|
||||
}
|
||||
int rows = deptMapper.deleteDept(deptDTO);
|
||||
if (rows > 0) {
|
||||
logger.info("删除部门成功, deptId={}", deptDTO.getDeptId());
|
||||
return ResultDomain.success("删除部门成功", BOOLEAN.TRUE);
|
||||
return ResultDomain.success("删除部门成功", Boolean.TRUE);
|
||||
}
|
||||
logger.warn("删除部门失败, deptId={}", deptDTO.getDeptId());
|
||||
return ResultDomain.failure("删除部门失败");
|
||||
@@ -203,14 +203,14 @@ public class DeptRoleServiceImpl implements DeptRoleService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<BOOLEAN> deleteRole(TbSysRoleDTO roleDTO) {
|
||||
public ResultDomain<Boolean> deleteRole(TbSysRoleDTO roleDTO) {
|
||||
if (roleDTO == null || StringUtils.isBlank(roleDTO.getRoleId())) {
|
||||
return ResultDomain.failure(MSG_ROLE_ID_REQUIRED);
|
||||
}
|
||||
int rows = roleMapper.deleteRole(roleDTO);
|
||||
if (rows > 0) {
|
||||
logger.info("删除角色成功, roleId={}", roleDTO.getRoleId());
|
||||
return ResultDomain.success("删除角色成功", BOOLEAN.TRUE);
|
||||
return ResultDomain.success("删除角色成功", Boolean.TRUE);
|
||||
}
|
||||
logger.warn("删除角色失败, roleId={}", roleDTO.getRoleId());
|
||||
return ResultDomain.failure("删除角色失败");
|
||||
@@ -322,14 +322,14 @@ public class DeptRoleServiceImpl implements DeptRoleService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<BOOLEAN> deleteDeptRole(TbSysDeptRoleDTO deptRoleDTO) {
|
||||
public ResultDomain<Boolean> deleteDeptRole(TbSysDeptRoleDTO deptRoleDTO) {
|
||||
if (deptRoleDTO == null || StringUtils.isBlank(deptRoleDTO.getDeptId()) || StringUtils.isBlank(deptRoleDTO.getRoleId())) {
|
||||
return ResultDomain.failure(MSG_DEPT_ROLE_ID_REQUIRED);
|
||||
}
|
||||
int rows = deptRoleMapper.deleteDeptRole(deptRoleDTO);
|
||||
if (rows > 0) {
|
||||
logger.info("删除部门角色关联成功, deptId={}, roleId={}", deptRoleDTO.getDeptId(), deptRoleDTO.getRoleId());
|
||||
return ResultDomain.success("删除部门角色关联成功", BOOLEAN.TRUE);
|
||||
return ResultDomain.success("删除部门角色关联成功", Boolean.TRUE);
|
||||
}
|
||||
logger.warn("删除部门角色关联失败, deptId={}, roleId={}", deptRoleDTO.getDeptId(), deptRoleDTO.getRoleId());
|
||||
return ResultDomain.failure("删除部门角色关联失败");
|
||||
|
||||
@@ -94,14 +94,14 @@ public class ModulePermissionServiceImpl implements ModulePermissionService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<BOOLEAN> deleteModule(TbSysModuleDTO moduleDTO) {
|
||||
public ResultDomain<Boolean> deleteModule(TbSysModuleDTO moduleDTO) {
|
||||
if (moduleDTO == null || StringUtils.isBlank(moduleDTO.getModuleId())) {
|
||||
return ResultDomain.failure(MSG_MODULE_ID_REQUIRED);
|
||||
}
|
||||
int rows = moduleMapper.deleteModule(moduleDTO);
|
||||
if (rows > 0) {
|
||||
logger.info("删除模块成功, moduleId={}", moduleDTO.getModuleId());
|
||||
return ResultDomain.success("删除模块成功", BOOLEAN.TRUE);
|
||||
return ResultDomain.success("删除模块成功", Boolean.TRUE);
|
||||
}
|
||||
logger.warn("删除模块失败, moduleId={}", moduleDTO.getModuleId());
|
||||
return ResultDomain.failure("删除模块失败");
|
||||
@@ -171,14 +171,14 @@ public class ModulePermissionServiceImpl implements ModulePermissionService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<BOOLEAN> deletePermission(TbSysPermissionDTO permissionDTO) {
|
||||
public ResultDomain<Boolean> deletePermission(TbSysPermissionDTO permissionDTO) {
|
||||
if (permissionDTO == null || StringUtils.isBlank(permissionDTO.getPermissionId())) {
|
||||
return ResultDomain.failure(MSG_PERMISSION_ID_REQUIRED);
|
||||
}
|
||||
int rows = permissionMapper.deletePermission(permissionDTO);
|
||||
if (rows > 0) {
|
||||
logger.info("删除权限成功, permissionId={}", permissionDTO.getPermissionId());
|
||||
return ResultDomain.success("删除权限成功", BOOLEAN.TRUE);
|
||||
return ResultDomain.success("删除权限成功", Boolean.TRUE);
|
||||
}
|
||||
logger.warn("删除权限失败, permissionId={}", permissionDTO.getPermissionId());
|
||||
return ResultDomain.failure("删除权限失败");
|
||||
|
||||
@@ -80,14 +80,14 @@ public class SysConfigServiceImpl implements SysConfigService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<BOOLEAN> deleteConfig(TbSysConfigDTO configDTO) {
|
||||
public ResultDomain<Boolean> deleteConfig(TbSysConfigDTO configDTO) {
|
||||
if (configDTO == null || StringUtils.isBlank(configDTO.getConfigId())) {
|
||||
return ResultDomain.failure(MSG_CONFIG_ID_REQUIRED);
|
||||
}
|
||||
int rows = configMapper.deleteConfig(configDTO);
|
||||
if (rows > 0) {
|
||||
logger.info("删除配置成功, configId={}", configDTO.getConfigId());
|
||||
return ResultDomain.success("删除配置成功", BOOLEAN.TRUE);
|
||||
return ResultDomain.success("删除配置成功", Boolean.TRUE);
|
||||
}
|
||||
logger.warn("删除配置失败, configId={}", configDTO.getConfigId());
|
||||
return ResultDomain.failure("删除配置失败");
|
||||
|
||||
@@ -93,14 +93,14 @@ public class SysUserServiceImpl implements SysUserService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<BOOLEAN> deleteUser(TbSysUserDTO userDTO) {
|
||||
public ResultDomain<Boolean> deleteUser(TbSysUserDTO userDTO) {
|
||||
if (userDTO == null || StringUtils.isBlank(userDTO.getUserId())) {
|
||||
return ResultDomain.failure(MSG_USER_ID_REQUIRED);
|
||||
}
|
||||
int rows = userMapper.deleteUser(userDTO);
|
||||
if (rows > 0) {
|
||||
logger.info("删除用户成功, userId={}", userDTO.getUserId());
|
||||
return ResultDomain.success("删除用户成功", BOOLEAN.TRUE);
|
||||
return ResultDomain.success("删除用户成功", Boolean.TRUE);
|
||||
}
|
||||
logger.warn("删除用户失败, userId={}", userDTO.getUserId());
|
||||
return ResultDomain.failure("删除用户失败");
|
||||
@@ -168,7 +168,7 @@ public class SysUserServiceImpl implements SysUserService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<BOOLEAN> updateUserPassword(String userId, String oldPassword, String newPassword) {
|
||||
public ResultDomain<Boolean> updateUserPassword(String userId, String oldPassword, String newPassword) {
|
||||
if (StringUtils.isBlank(userId)) {
|
||||
return ResultDomain.failure(MSG_USER_ID_REQUIRED);
|
||||
}
|
||||
@@ -182,7 +182,7 @@ public class SysUserServiceImpl implements SysUserService {
|
||||
int rows = userMapper.updateUser(dto);
|
||||
if (rows > 0) {
|
||||
logger.info("更新用户密码成功, userId={}", userId);
|
||||
return ResultDomain.success("更新用户密码成功", BOOLEAN.TRUE);
|
||||
return ResultDomain.success("更新用户密码成功", Boolean.TRUE);
|
||||
}
|
||||
logger.warn("更新用户密码失败, userId={}", userId);
|
||||
return ResultDomain.failure("更新用户密码失败");
|
||||
@@ -211,7 +211,7 @@ public class SysUserServiceImpl implements SysUserService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<BOOLEAN> updateUserStatus(String userId, String status) {
|
||||
public ResultDomain<Boolean> updateUserStatus(String userId, String status) {
|
||||
if (StringUtils.isBlank(userId)) {
|
||||
return ResultDomain.failure(MSG_USER_ID_REQUIRED);
|
||||
}
|
||||
@@ -222,7 +222,7 @@ public class SysUserServiceImpl implements SysUserService {
|
||||
int rows = userMapper.updateUser(dto);
|
||||
if (rows > 0) {
|
||||
logger.info("更新用户状态成功, userId={}", userId);
|
||||
return ResultDomain.success("更新用户状态成功", BOOLEAN.TRUE);
|
||||
return ResultDomain.success("更新用户状态成功", Boolean.TRUE);
|
||||
}
|
||||
logger.warn("更新用户状态失败, userId={}", userId);
|
||||
return ResultDomain.failure("更新用户状态失败");
|
||||
@@ -290,21 +290,21 @@ public class SysUserServiceImpl implements SysUserService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<BOOLEAN> removeUserRole(TbSysUserRoleDTO userRoleDTO) {
|
||||
public ResultDomain<Boolean> removeUserRole(TbSysUserRoleDTO userRoleDTO) {
|
||||
if (userRoleDTO == null || StringUtils.isBlank(userRoleDTO.getUserId()) || StringUtils.isBlank(userRoleDTO.getRoleId())) {
|
||||
return ResultDomain.failure("用户ID和角色ID不能为空");
|
||||
}
|
||||
int rows = userRoleMapper.deleteUserRole(userRoleDTO);
|
||||
if (rows > 0) {
|
||||
logger.info("删除用户角色关联成功, userId={}, roleId={}", userRoleDTO.getUserId(), userRoleDTO.getRoleId());
|
||||
return ResultDomain.success("删除用户角色关联成功", BOOLEAN.TRUE);
|
||||
return ResultDomain.success("删除用户角色关联成功", Boolean.TRUE);
|
||||
}
|
||||
logger.warn("删除用户角色关联失败, userId={}, roleId={}", userRoleDTO.getUserId(), userRoleDTO.getRoleId());
|
||||
return ResultDomain.failure("删除用户角色关联失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<BOOLEAN> setUserRoles(String userId, String[] roleIds) {
|
||||
public ResultDomain<Boolean> setUserRoles(String userId, String[] roleIds) {
|
||||
if (StringUtils.isBlank(userId)) {
|
||||
return ResultDomain.failure(MSG_USER_ID_REQUIRED);
|
||||
}
|
||||
@@ -337,7 +337,7 @@ public class SysUserServiceImpl implements SysUserService {
|
||||
}
|
||||
}
|
||||
logger.info("设置用户角色成功, userId={}, count={}", userId, roleIds == null ? 0 : roleIds.length);
|
||||
return ResultDomain.success("设置用户角色成功", BOOLEAN.TRUE);
|
||||
return ResultDomain.success("设置用户角色成功", Boolean.TRUE);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -83,14 +83,14 @@ public class ViewServiceImpl implements ViewService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<BOOLEAN> deleteView(TbSysViewDTO viewDTO) {
|
||||
public ResultDomain<Boolean> deleteView(TbSysViewDTO viewDTO) {
|
||||
if (viewDTO == null || StringUtils.isBlank(viewDTO.getViewId())) {
|
||||
return ResultDomain.failure(MSG_VIEW_ID_REQUIRED);
|
||||
}
|
||||
int rows = viewMapper.deleteView(viewDTO);
|
||||
if (rows > 0) {
|
||||
logger.info("删除视图成功, viewId={}", viewDTO.getViewId());
|
||||
return ResultDomain.success("删除视图成功", BOOLEAN.TRUE);
|
||||
return ResultDomain.success("删除视图成功", Boolean.TRUE);
|
||||
}
|
||||
logger.warn("删除视图失败, viewId={}", viewDTO.getViewId());
|
||||
return ResultDomain.failure("删除视图失败");
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
<result column="principal_id" property="principalId" jdbcType="VARCHAR"/>
|
||||
<result column="principal_dept_id" property="principalDeptId" jdbcType="VARCHAR"/>
|
||||
<result column="permission" property="permission" jdbcType="VARCHAR"/>
|
||||
<result column="allow" property="allow" jdbcType="BOOLEAN"/>
|
||||
<result column="include_descendants" property="includeDescendants" jdbcType="BOOLEAN"/>
|
||||
<result column="allow" property="allow" jdbcType="Boolean"/>
|
||||
<result column="include_descendants" property="includeDescendants" jdbcType="Boolean"/>
|
||||
<!-- 基础字段 -->
|
||||
<result column="optsn" property="optsn" jdbcType="VARCHAR"/>
|
||||
<result column="creator" property="creator" jdbcType="VARCHAR"/>
|
||||
@@ -23,7 +23,7 @@
|
||||
<result column="create_time" property="createTime" jdbcType="DATE"/>
|
||||
<result column="update_time" property="updateTime" jdbcType="DATE"/>
|
||||
<result column="delete_time" property="deleteTime" jdbcType="DATE"/>
|
||||
<result column="deleted" property="deleted" jdbcType="BOOLEAN"/>
|
||||
<result column="deleted" property="deleted" jdbcType="Boolean"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- VO结果映射(用于前端展示) -->
|
||||
@@ -35,9 +35,9 @@
|
||||
<result column="principal_type" property="principalType" jdbcType="VARCHAR"/>
|
||||
<result column="principal_id" property="principalId" jdbcType="VARCHAR"/>
|
||||
<result column="principal_dept_id" property="principalDeptId" jdbcType="VARCHAR"/>
|
||||
<result column="permission" property="permission" jdbcType="INTEGER"/>
|
||||
<result column="allow" property="allow" jdbcType="BOOLEAN"/>
|
||||
<result column="include_descendants" property="includeDescendants" jdbcType="BOOLEAN"/>
|
||||
<result column="permission" property="permission" jdbcType="Integer"/>
|
||||
<result column="allow" property="allow" jdbcType="Boolean"/>
|
||||
<result column="include_descendants" property="includeDescendants" jdbcType="Boolean"/>
|
||||
<!-- BaseVO 基础字段 -->
|
||||
<result column="optsn" property="optsn" jdbcType="VARCHAR"/>
|
||||
<result column="creator" property="creator" jdbcType="VARCHAR"/>
|
||||
@@ -47,7 +47,7 @@
|
||||
<result column="create_time" property="createTime" jdbcType="DATE"/>
|
||||
<result column="update_time" property="updateTime" jdbcType="DATE"/>
|
||||
<result column="delete_time" property="deleteTime" jdbcType="DATE"/>
|
||||
<result column="deleted" property="deleted" jdbcType="BOOLEAN"/>
|
||||
<result column="deleted" property="deleted" jdbcType="Boolean"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 基础列 -->
|
||||
@@ -247,7 +247,7 @@
|
||||
</select>
|
||||
|
||||
<!-- 根据条件查询系统访问控制列表数量 -->
|
||||
<select id="getAclCountByFilter" resultType="java.lang.INTEGER" parameterType="org.xyzh.common.dto.sys.TbSysAclDTO">
|
||||
<select id="getAclCountByFilter" resultType="java.lang.Integer" parameterType="org.xyzh.common.dto.sys.TbSysAclDTO">
|
||||
SELECT COUNT(1)
|
||||
FROM sys.tb_sys_acl
|
||||
<where>
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
<result column="object_type" property="objectType" jdbcType="VARCHAR"/>
|
||||
<result column="edit_hierarchy_rule" property="editHierarchyRule" jdbcType="VARCHAR"/>
|
||||
<result column="view_hierarchy_rule" property="viewHierarchyRule" jdbcType="VARCHAR"/>
|
||||
<result column="default_permission" property="defaultPermission" jdbcType="INTEGER"/>
|
||||
<result column="default_allow" property="defaultAllow" jdbcType="BOOLEAN"/>
|
||||
<result column="apply_to_children" property="applyToChildren" jdbcType="BOOLEAN"/>
|
||||
<result column="default_permission" property="defaultPermission" jdbcType="Integer"/>
|
||||
<result column="default_allow" property="defaultAllow" jdbcType="Boolean"/>
|
||||
<result column="apply_to_children" property="applyToChildren" jdbcType="Boolean"/>
|
||||
<!-- 基础字段 -->
|
||||
<result column="optsn" property="optsn" jdbcType="VARCHAR"/>
|
||||
<result column="creator" property="creator" jdbcType="VARCHAR"/>
|
||||
@@ -22,7 +22,7 @@
|
||||
<result column="create_time" property="createTime" jdbcType="DATE"/>
|
||||
<result column="update_time" property="updateTime" jdbcType="DATE"/>
|
||||
<result column="delete_time" property="deleteTime" jdbcType="DATE"/>
|
||||
<result column="deleted" property="deleted" jdbcType="BOOLEAN"/>
|
||||
<result column="deleted" property="deleted" jdbcType="Boolean"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- VO结果映射(用于前端展示) -->
|
||||
@@ -33,9 +33,9 @@
|
||||
<result column="object_type" property="policyObjectType" jdbcType="VARCHAR"/>
|
||||
<result column="edit_hierarchy_rule" property="editHierarchyRule" jdbcType="VARCHAR"/>
|
||||
<result column="view_hierarchy_rule" property="viewHierarchyRule" jdbcType="VARCHAR"/>
|
||||
<result column="default_permission" property="defaultPermission" jdbcType="INTEGER"/>
|
||||
<result column="default_allow" property="defaultAllow" jdbcType="BOOLEAN"/>
|
||||
<result column="apply_to_children" property="applyToChildren" jdbcType="BOOLEAN"/>
|
||||
<result column="default_permission" property="defaultPermission" jdbcType="Integer"/>
|
||||
<result column="default_allow" property="defaultAllow" jdbcType="Boolean"/>
|
||||
<result column="apply_to_children" property="applyToChildren" jdbcType="Boolean"/>
|
||||
<!-- BaseVO 基础字段 -->
|
||||
<result column="optsn" property="optsn" jdbcType="VARCHAR"/>
|
||||
<result column="creator" property="creator" jdbcType="VARCHAR"/>
|
||||
@@ -45,7 +45,7 @@
|
||||
<result column="create_time" property="createTime" jdbcType="DATE"/>
|
||||
<result column="update_time" property="updateTime" jdbcType="DATE"/>
|
||||
<result column="delete_time" property="deleteTime" jdbcType="DATE"/>
|
||||
<result column="deleted" property="deleted" jdbcType="BOOLEAN"/>
|
||||
<result column="deleted" property="deleted" jdbcType="Boolean"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 基础列 -->
|
||||
@@ -213,7 +213,7 @@
|
||||
</select>
|
||||
|
||||
<!-- 根据条件查询系统访问控制策略数量 -->
|
||||
<select id="getAclPolicyCount" resultType="java.lang.INTEGER" parameterType="org.xyzh.common.dto.sys.TbSysAclPolicyDTO">
|
||||
<select id="getAclPolicyCount" resultType="java.lang.Integer" parameterType="org.xyzh.common.dto.sys.TbSysAclPolicyDTO">
|
||||
SELECT COUNT(1)
|
||||
FROM sys.tb_sys_acl_policy
|
||||
<where>
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
<result column="options" property="options" jdbcType="OTHER"/>
|
||||
<result column="group" property="group" jdbcType="VARCHAR"/>
|
||||
<result column="module_id" property="moduleId" jdbcType="VARCHAR"/>
|
||||
<result column="order_num" property="orderNum" jdbcType="INTEGER"/>
|
||||
<result column="status" property="status" jdbcType="INTEGER"/>
|
||||
<result column="order_num" property="orderNum" jdbcType="Integer"/>
|
||||
<result column="status" property="status" jdbcType="Integer"/>
|
||||
<!-- 基础字段 -->
|
||||
<result column="optsn" property="optsn" jdbcType="VARCHAR"/>
|
||||
<result column="creator" property="creator" jdbcType="VARCHAR"/>
|
||||
@@ -27,7 +27,7 @@
|
||||
<result column="create_time" property="createTime" jdbcType="DATE"/>
|
||||
<result column="update_time" property="updateTime" jdbcType="DATE"/>
|
||||
<result column="delete_time" property="deleteTime" jdbcType="DATE"/>
|
||||
<result column="deleted" property="deleted" jdbcType="BOOLEAN"/>
|
||||
<result column="deleted" property="deleted" jdbcType="Boolean"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- VO结果映射(用于前端展示) -->
|
||||
@@ -44,8 +44,8 @@
|
||||
<result column="options" property="options" jdbcType="OTHER"/>
|
||||
<result column="group" property="group" jdbcType="VARCHAR"/>
|
||||
<result column="module_id" property="moduleId" jdbcType="VARCHAR"/>
|
||||
<result column="order_num" property="orderNum" jdbcType="INTEGER"/>
|
||||
<result column="status" property="status" jdbcType="INTEGER"/>
|
||||
<result column="order_num" property="orderNum" jdbcType="Integer"/>
|
||||
<result column="status" property="status" jdbcType="Integer"/>
|
||||
<!-- 模块关联字段 -->
|
||||
<result column="module_name" property="moduleName" jdbcType="VARCHAR"/>
|
||||
<result column="module_description" property="moduleDescription" jdbcType="VARCHAR"/>
|
||||
@@ -58,7 +58,7 @@
|
||||
<result column="create_time" property="createTime" jdbcType="DATE"/>
|
||||
<result column="update_time" property="updateTime" jdbcType="DATE"/>
|
||||
<result column="delete_time" property="deleteTime" jdbcType="DATE"/>
|
||||
<result column="deleted" property="deleted" jdbcType="BOOLEAN"/>
|
||||
<result column="deleted" property="deleted" jdbcType="Boolean"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 基础列 -->
|
||||
@@ -228,7 +228,7 @@
|
||||
</select>
|
||||
|
||||
<!-- 根据条件查询系统配置数量 -->
|
||||
<select id="getConfigCount" resultType="java.lang.INTEGER" parameterType="TbSysConfigDTO">
|
||||
<select id="getConfigCount" resultType="java.lang.Integer" parameterType="TbSysConfigDTO">
|
||||
SELECT COUNT(1)
|
||||
FROM config.tb_sys_config
|
||||
<where>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<result column="create_time" property="createTime" jdbcType="DATE"/>
|
||||
<result column="update_time" property="updateTime" jdbcType="DATE"/>
|
||||
<result column="delete_time" property="deleteTime" jdbcType="DATE"/>
|
||||
<result column="deleted" property="deleted" jdbcType="BOOLEAN"/>
|
||||
<result column="deleted" property="deleted" jdbcType="Boolean"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- VO结果映射(用于前端展示) -->
|
||||
@@ -37,7 +37,7 @@
|
||||
<result column="create_time" property="createTime" jdbcType="DATE"/>
|
||||
<result column="update_time" property="updateTime" jdbcType="DATE"/>
|
||||
<result column="delete_time" property="deleteTime" jdbcType="DATE"/>
|
||||
<result column="deleted" property="deleted" jdbcType="BOOLEAN"/>
|
||||
<result column="deleted" property="deleted" jdbcType="Boolean"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 基础列 -->
|
||||
@@ -172,7 +172,7 @@
|
||||
</select>
|
||||
|
||||
<!-- 根据条件查询系统部门数量 -->
|
||||
<select id="getDeptCount" resultType="java.lang.INTEGER" parameterType="org.xyzh.common.dto.sys.TbSysDeptDTO">
|
||||
<select id="getDeptCount" resultType="java.lang.Integer" parameterType="org.xyzh.common.dto.sys.TbSysDeptDTO">
|
||||
SELECT COUNT(1)
|
||||
FROM sys.tb_sys_dept
|
||||
<where>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<result column="create_time" property="createTime" jdbcType="DATE"/>
|
||||
<result column="update_time" property="updateTime" jdbcType="DATE"/>
|
||||
<result column="delete_time" property="deleteTime" jdbcType="DATE"/>
|
||||
<result column="deleted" property="deleted" jdbcType="BOOLEAN"/>
|
||||
<result column="deleted" property="deleted" jdbcType="Boolean"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- VO结果映射(用于前端展示) -->
|
||||
@@ -32,7 +32,7 @@
|
||||
<result column="role_description" property="roleDescription" jdbcType="VARCHAR"/>
|
||||
<result column="scope" property="roleScope" jdbcType="VARCHAR"/>
|
||||
<result column="owner_dept_id" property="roleOwnerDeptId" jdbcType="VARCHAR"/>
|
||||
<result column="role_status" property="roleStatus" jdbcType="BOOLEAN"/>
|
||||
<result column="role_status" property="roleStatus" jdbcType="Boolean"/>
|
||||
<!-- BaseVO 基础字段 -->
|
||||
<result column="optsn" property="optsn" jdbcType="VARCHAR"/>
|
||||
<result column="creator" property="creator" jdbcType="VARCHAR"/>
|
||||
@@ -42,7 +42,7 @@
|
||||
<result column="create_time" property="createTime" jdbcType="DATE"/>
|
||||
<result column="update_time" property="updateTime" jdbcType="DATE"/>
|
||||
<result column="delete_time" property="deleteTime" jdbcType="DATE"/>
|
||||
<result column="deleted" property="deleted" jdbcType="BOOLEAN"/>
|
||||
<result column="deleted" property="deleted" jdbcType="Boolean"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 基础列 -->
|
||||
@@ -182,7 +182,7 @@
|
||||
</select>
|
||||
|
||||
<!-- 根据条件查询系统部门角色关系数量 -->
|
||||
<select id="getDeptRoleCount" resultType="java.lang.INTEGER" parameterType="org.xyzh.common.dto.sys.TbSysDeptRoleDTO">
|
||||
<select id="getDeptRoleCount" resultType="java.lang.Integer" parameterType="org.xyzh.common.dto.sys.TbSysDeptRoleDTO">
|
||||
SELECT COUNT(1)
|
||||
FROM sys.tb_sys_dept_role
|
||||
<where>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<result column="create_time" property="createTime" jdbcType="DATE"/>
|
||||
<result column="update_time" property="updateTime" jdbcType="DATE"/>
|
||||
<result column="delete_time" property="deleteTime" jdbcType="DATE"/>
|
||||
<result column="deleted" property="deleted" jdbcType="BOOLEAN"/>
|
||||
<result column="deleted" property="deleted" jdbcType="Boolean"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- VO结果映射(用于前端展示) -->
|
||||
@@ -35,7 +35,7 @@
|
||||
<result column="create_time" property="createTime" jdbcType="DATE"/>
|
||||
<result column="update_time" property="updateTime" jdbcType="DATE"/>
|
||||
<result column="delete_time" property="deleteTime" jdbcType="DATE"/>
|
||||
<result column="deleted" property="deleted" jdbcType="BOOLEAN"/>
|
||||
<result column="deleted" property="deleted" jdbcType="Boolean"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 基础列 -->
|
||||
@@ -168,7 +168,7 @@
|
||||
</select>
|
||||
|
||||
<!-- 根据条件查询系统模块数量 -->
|
||||
<select id="getModuleCount" resultType="java.lang.INTEGER" parameterType="org.xyzh.common.dto.sys.TbSysModuleDTO">
|
||||
<select id="getModuleCount" resultType="java.lang.Integer" parameterType="org.xyzh.common.dto.sys.TbSysModuleDTO">
|
||||
SELECT COUNT(1)
|
||||
FROM sys.tb_sys_module
|
||||
<where>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<result column="create_time" property="createTime" jdbcType="DATE"/>
|
||||
<result column="update_time" property="updateTime" jdbcType="DATE"/>
|
||||
<result column="delete_time" property="deleteTime" jdbcType="DATE"/>
|
||||
<result column="deleted" property="deleted" jdbcType="BOOLEAN"/>
|
||||
<result column="deleted" property="deleted" jdbcType="Boolean"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- VO结果映射(用于前端展示) -->
|
||||
@@ -44,7 +44,7 @@
|
||||
<result column="create_time" property="createTime" jdbcType="DATE"/>
|
||||
<result column="update_time" property="updateTime" jdbcType="DATE"/>
|
||||
<result column="delete_time" property="deleteTime" jdbcType="DATE"/>
|
||||
<result column="deleted" property="deleted" jdbcType="BOOLEAN"/>
|
||||
<result column="deleted" property="deleted" jdbcType="Boolean"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 基础列 -->
|
||||
@@ -219,7 +219,7 @@
|
||||
</select>
|
||||
|
||||
<!-- 根据条件查询系统权限数量 -->
|
||||
<select id="getPermissionCount" resultType="java.lang.INTEGER" parameterType="org.xyzh.common.dto.sys.TbSysPermissionDTO">
|
||||
<select id="getPermissionCount" resultType="java.lang.Integer" parameterType="org.xyzh.common.dto.sys.TbSysPermissionDTO">
|
||||
SELECT COUNT(1)
|
||||
FROM sys.tb_sys_permission
|
||||
<where>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<result column="create_time" property="createTime" jdbcType="DATE"/>
|
||||
<result column="update_time" property="updateTime" jdbcType="DATE"/>
|
||||
<result column="delete_time" property="deleteTime" jdbcType="DATE"/>
|
||||
<result column="deleted" property="deleted" jdbcType="BOOLEAN"/>
|
||||
<result column="deleted" property="deleted" jdbcType="Boolean"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- VO结果映射(用于前端展示) -->
|
||||
@@ -28,9 +28,9 @@
|
||||
<result column="view_url" property="viewUrl" jdbcType="VARCHAR"/>
|
||||
<result column="view_component" property="viewComponent" jdbcType="VARCHAR"/>
|
||||
<result column="view_icon" property="viewIcon" jdbcType="VARCHAR"/>
|
||||
<result column="view_type" property="viewType" jdbcType="INTEGER"/>
|
||||
<result column="view_type" property="viewType" jdbcType="Integer"/>
|
||||
<result column="view_layout" property="viewLayout" jdbcType="VARCHAR"/>
|
||||
<result column="view_order_num" property="viewOrderNum" jdbcType="INTEGER"/>
|
||||
<result column="view_order_num" property="viewOrderNum" jdbcType="Integer"/>
|
||||
<result column="view_description" property="viewDescription" jdbcType="VARCHAR"/>
|
||||
<!-- 权限字段 -->
|
||||
<result column="permission_id" property="permissionId" jdbcType="VARCHAR"/>
|
||||
@@ -51,7 +51,7 @@
|
||||
<result column="create_time" property="createTime" jdbcType="DATE"/>
|
||||
<result column="update_time" property="updateTime" jdbcType="DATE"/>
|
||||
<result column="delete_time" property="deleteTime" jdbcType="DATE"/>
|
||||
<result column="deleted" property="deleted" jdbcType="BOOLEAN"/>
|
||||
<result column="deleted" property="deleted" jdbcType="Boolean"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 基础列 -->
|
||||
@@ -200,7 +200,7 @@
|
||||
</select>
|
||||
|
||||
<!-- 根据条件查询系统视图权限关系数量 -->
|
||||
<select id="getViewPermissionCount" resultType="java.lang.INTEGER" parameterType="org.xyzh.common.dto.sys.TbSysViewPermissionDTO">
|
||||
<select id="getViewPermissionCount" resultType="java.lang.Integer" parameterType="org.xyzh.common.dto.sys.TbSysViewPermissionDTO">
|
||||
SELECT COUNT(1)
|
||||
FROM sys.tb_sys_view_permission
|
||||
<where>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<result column="description" property="description" jdbcType="VARCHAR"/>
|
||||
<result column="scope" property="scope" jdbcType="VARCHAR"/>
|
||||
<result column="owner_dept_id" property="ownerDeptId" jdbcType="VARCHAR"/>
|
||||
<result column="status" property="status" jdbcType="BOOLEAN"/>
|
||||
<result column="status" property="status" jdbcType="Boolean"/>
|
||||
<!-- 基础字段 -->
|
||||
<result column="optsn" property="optsn" jdbcType="VARCHAR"/>
|
||||
<result column="creator" property="creator" jdbcType="VARCHAR"/>
|
||||
@@ -20,7 +20,7 @@
|
||||
<result column="create_time" property="createTime" jdbcType="DATE"/>
|
||||
<result column="update_time" property="updateTime" jdbcType="DATE"/>
|
||||
<result column="delete_time" property="deleteTime" jdbcType="DATE"/>
|
||||
<result column="deleted" property="deleted" jdbcType="BOOLEAN"/>
|
||||
<result column="deleted" property="deleted" jdbcType="Boolean"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- VO结果映射(用于前端展示) -->
|
||||
@@ -31,7 +31,7 @@
|
||||
<result column="description" property="roleDescription" jdbcType="VARCHAR"/>
|
||||
<result column="scope" property="roleScope" jdbcType="VARCHAR"/>
|
||||
<result column="owner_dept_id" property="roleOwnerDeptId" jdbcType="VARCHAR"/>
|
||||
<result column="status" property="roleStatus" jdbcType="BOOLEAN"/>
|
||||
<result column="status" property="roleStatus" jdbcType="Boolean"/>
|
||||
<!-- BaseVO 基础字段 -->
|
||||
<result column="optsn" property="optsn" jdbcType="VARCHAR"/>
|
||||
<result column="creator" property="creator" jdbcType="VARCHAR"/>
|
||||
@@ -41,7 +41,7 @@
|
||||
<result column="create_time" property="createTime" jdbcType="DATE"/>
|
||||
<result column="update_time" property="updateTime" jdbcType="DATE"/>
|
||||
<result column="delete_time" property="deleteTime" jdbcType="DATE"/>
|
||||
<result column="deleted" property="deleted" jdbcType="BOOLEAN"/>
|
||||
<result column="deleted" property="deleted" jdbcType="Boolean"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 基础列 -->
|
||||
@@ -198,7 +198,7 @@
|
||||
</select>
|
||||
|
||||
<!-- 根据条件查询系统角色数量 -->
|
||||
<select id="getRoleCount" resultType="java.lang.INTEGER" parameterType="org.xyzh.common.dto.sys.TbSysRoleDTO">
|
||||
<select id="getRoleCount" resultType="java.lang.Integer" parameterType="org.xyzh.common.dto.sys.TbSysRoleDTO">
|
||||
SELECT COUNT(1)
|
||||
FROM sys.tb_sys_role
|
||||
<where>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<result column="create_time" property="createTime" jdbcType="DATE"/>
|
||||
<result column="update_time" property="updateTime" jdbcType="DATE"/>
|
||||
<result column="delete_time" property="deleteTime" jdbcType="DATE"/>
|
||||
<result column="deleted" property="deleted" jdbcType="BOOLEAN"/>
|
||||
<result column="deleted" property="deleted" jdbcType="Boolean"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- VO结果映射(用于前端展示) -->
|
||||
@@ -27,7 +27,7 @@
|
||||
<result column="role_description" property="roleDescription" jdbcType="VARCHAR"/>
|
||||
<result column="role_scope" property="roleScope" jdbcType="VARCHAR"/>
|
||||
<result column="role_owner_dept_id" property="roleOwnerDeptId" jdbcType="VARCHAR"/>
|
||||
<result column="role_status" property="roleStatus" jdbcType="BOOLEAN"/>
|
||||
<result column="role_status" property="roleStatus" jdbcType="Boolean"/>
|
||||
<!-- 权限字段 -->
|
||||
<result column="permission_id" property="permissionId" jdbcType="VARCHAR"/>
|
||||
<result column="permission_name" property="permissionName" jdbcType="VARCHAR"/>
|
||||
@@ -47,7 +47,7 @@
|
||||
<result column="create_time" property="createTime" jdbcType="DATE"/>
|
||||
<result column="update_time" property="updateTime" jdbcType="DATE"/>
|
||||
<result column="delete_time" property="deleteTime" jdbcType="DATE"/>
|
||||
<result column="deleted" property="deleted" jdbcType="BOOLEAN"/>
|
||||
<result column="deleted" property="deleted" jdbcType="Boolean"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 基础列 -->
|
||||
@@ -207,7 +207,7 @@
|
||||
</select>
|
||||
|
||||
<!-- 根据条件查询系统角色权限关系数量 -->
|
||||
<select id="getRolePermissionCount" resultType="java.lang.INTEGER" parameterType="org.xyzh.common.dto.sys.TbSysRolePermissionDTO">
|
||||
<select id="getRolePermissionCount" resultType="java.lang.Integer" parameterType="org.xyzh.common.dto.sys.TbSysRolePermissionDTO">
|
||||
SELECT COUNT(1)
|
||||
FROM sys.tb_sys_role_permission
|
||||
<where>
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
<!-- 用户信息字段 -->
|
||||
<id column="user_id" property="userId" jdbcType="VARCHAR"/>
|
||||
<result column="avatar" property="avatar" jdbcType="VARCHAR"/>
|
||||
<result column="gender" property="gender" jdbcType="INTEGER"/>
|
||||
<result column="gender" property="gender" jdbcType="Integer"/>
|
||||
<result column="family_name" property="familyName" jdbcType="VARCHAR"/>
|
||||
<result column="given_name" property="givenName" jdbcType="VARCHAR"/>
|
||||
<result column="full_name" property="fullName" jdbcType="VARCHAR"/>
|
||||
<result column="level" property="level" jdbcType="INTEGER"/>
|
||||
<result column="level" property="level" jdbcType="Integer"/>
|
||||
<result column="id_card" property="idCard" jdbcType="VARCHAR"/>
|
||||
<result column="address" property="address" jdbcType="VARCHAR"/>
|
||||
<!-- 基础字段 -->
|
||||
@@ -23,7 +23,7 @@
|
||||
<result column="create_time" property="createTime" jdbcType="DATE"/>
|
||||
<result column="update_time" property="updateTime" jdbcType="DATE"/>
|
||||
<result column="delete_time" property="deleteTime" jdbcType="DATE"/>
|
||||
<result column="deleted" property="deleted" jdbcType="BOOLEAN"/>
|
||||
<result column="deleted" property="deleted" jdbcType="Boolean"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 基础列 -->
|
||||
@@ -204,7 +204,7 @@
|
||||
</select>
|
||||
|
||||
<!-- 根据条件查询系统用户信息数量 -->
|
||||
<select id="getUserInfoCount" resultType="java.lang.INTEGER" parameterType="org.xyzh.common.dto.sys.TbSysUserInfoDTO">
|
||||
<select id="getUserInfoCount" resultType="java.lang.Integer" parameterType="org.xyzh.common.dto.sys.TbSysUserInfoDTO">
|
||||
SELECT COUNT(1)
|
||||
FROM sys.tb_sys_user_info
|
||||
<where>
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
<result column="email" property="email" jdbcType="VARCHAR"/>
|
||||
<result column="phone" property="phone" jdbcType="VARCHAR"/>
|
||||
<result column="wechat_id" property="wechatId" jdbcType="VARCHAR"/>
|
||||
<result column="status" property="status" jdbcType="INTEGER"/>
|
||||
<result column="status" property="status" jdbcType="Integer"/>
|
||||
|
||||
<!-- BaseDTO 中在该表实际存在的字段 -->
|
||||
<result column="optsn" property="optsn" jdbcType="VARCHAR"/>
|
||||
<result column="create_time" property="createTime" jdbcType="DATE"/>
|
||||
<result column="update_time" property="updateTime" jdbcType="DATE"/>
|
||||
<result column="delete_time" property="deleteTime" jdbcType="DATE"/>
|
||||
<result column="deleted" property="deleted" jdbcType="BOOLEAN"/>
|
||||
<result column="deleted" property="deleted" jdbcType="Boolean"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- VO结果映射(用于前端展示) -->
|
||||
@@ -28,14 +28,14 @@
|
||||
<result column="email" property="email" jdbcType="VARCHAR"/>
|
||||
<result column="phone" property="phone" jdbcType="VARCHAR"/>
|
||||
<result column="wechat_id" property="wechatId" jdbcType="VARCHAR"/>
|
||||
<result column="status" property="status" jdbcType="INTEGER"/>
|
||||
<result column="status" property="status" jdbcType="Integer"/>
|
||||
<!-- 用户信息关联字段 -->
|
||||
<result column="avatar" property="avatar" jdbcType="VARCHAR"/>
|
||||
<result column="gender" property="gender" jdbcType="INTEGER"/>
|
||||
<result column="gender" property="gender" jdbcType="Integer"/>
|
||||
<result column="family_name" property="familyName" jdbcType="VARCHAR"/>
|
||||
<result column="given_name" property="givenName" jdbcType="VARCHAR"/>
|
||||
<result column="full_name" property="fullName" jdbcType="VARCHAR"/>
|
||||
<result column="level" property="level" jdbcType="INTEGER"/>
|
||||
<result column="level" property="level" jdbcType="Integer"/>
|
||||
<result column="id_card" property="idCard" jdbcType="VARCHAR"/>
|
||||
<result column="address" property="address" jdbcType="VARCHAR"/>
|
||||
<!-- BaseVO 中在该表实际存在的字段 -->
|
||||
@@ -43,7 +43,7 @@
|
||||
<result column="create_time" property="createTime" jdbcType="DATE"/>
|
||||
<result column="update_time" property="updateTime" jdbcType="DATE"/>
|
||||
<result column="delete_time" property="deleteTime" jdbcType="DATE"/>
|
||||
<result column="deleted" property="deleted" jdbcType="BOOLEAN"/>
|
||||
<result column="deleted" property="deleted" jdbcType="Boolean"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 基础列(完全按表结构) -->
|
||||
@@ -216,7 +216,7 @@
|
||||
</select>
|
||||
|
||||
<!-- 根据条件查询用户数量 -->
|
||||
<select id="getUserCountByFilter" resultType="java.lang.INTEGER" parameterType="org.xyzh.common.dto.sys.TbSysUserDTO">
|
||||
<select id="getUserCountByFilter" resultType="java.lang.Integer" parameterType="org.xyzh.common.dto.sys.TbSysUserDTO">
|
||||
SELECT COUNT(1)
|
||||
FROM sys.tb_sys_user
|
||||
<where>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<result column="create_time" property="createTime" jdbcType="DATE"/>
|
||||
<result column="update_time" property="updateTime" jdbcType="DATE"/>
|
||||
<result column="delete_time" property="deleteTime" jdbcType="DATE"/>
|
||||
<result column="deleted" property="deleted" jdbcType="BOOLEAN"/>
|
||||
<result column="deleted" property="deleted" jdbcType="Boolean"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- VO结果映射(用于前端展示) -->
|
||||
@@ -32,11 +32,11 @@
|
||||
<result column="user_type" property="userType" jdbcType="VARCHAR"/>
|
||||
<!-- 用户信息字段 -->
|
||||
<result column="avatar" property="avatar" jdbcType="VARCHAR"/>
|
||||
<result column="gender" property="gender" jdbcType="INTEGER"/>
|
||||
<result column="gender" property="gender" jdbcType="Integer"/>
|
||||
<result column="family_name" property="familyName" jdbcType="VARCHAR"/>
|
||||
<result column="given_name" property="givenName" jdbcType="VARCHAR"/>
|
||||
<result column="full_name" property="fullName" jdbcType="VARCHAR"/>
|
||||
<result column="level" property="level" jdbcType="INTEGER"/>
|
||||
<result column="level" property="level" jdbcType="Integer"/>
|
||||
<result column="id_card" property="idCard" jdbcType="VARCHAR"/>
|
||||
<result column="address" property="address" jdbcType="VARCHAR"/>
|
||||
<!-- 部门字段 -->
|
||||
@@ -50,7 +50,7 @@
|
||||
<result column="role_description" property="roleDescription" jdbcType="VARCHAR"/>
|
||||
<result column="scope" property="scope" jdbcType="VARCHAR"/>
|
||||
<result column="owner_dept_id" property="ownerDeptId" jdbcType="VARCHAR"/>
|
||||
<result column="role_status" property="roleStatus" jdbcType="BOOLEAN"/>
|
||||
<result column="role_status" property="roleStatus" jdbcType="Boolean"/>
|
||||
<!-- BaseVO 基础字段 -->
|
||||
<result column="optsn" property="optsn" jdbcType="VARCHAR"/>
|
||||
<result column="creator" property="creator" jdbcType="VARCHAR"/>
|
||||
@@ -60,7 +60,7 @@
|
||||
<result column="create_time" property="createTime" jdbcType="DATE"/>
|
||||
<result column="update_time" property="updateTime" jdbcType="DATE"/>
|
||||
<result column="delete_time" property="deleteTime" jdbcType="DATE"/>
|
||||
<result column="deleted" property="deleted" jdbcType="BOOLEAN"/>
|
||||
<result column="deleted" property="deleted" jdbcType="Boolean"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 基础列 -->
|
||||
@@ -226,7 +226,7 @@
|
||||
</select>
|
||||
|
||||
<!-- 根据条件查询系统用户角色关系数量 -->
|
||||
<select id="getUserRoleCount" resultType="java.lang.INTEGER" parameterType="org.xyzh.common.dto.sys.TbSysUserRoleDTO">
|
||||
<select id="getUserRoleCount" resultType="java.lang.Integer" parameterType="org.xyzh.common.dto.sys.TbSysUserRoleDTO">
|
||||
SELECT COUNT(1)
|
||||
FROM sys.tb_sys_user_role
|
||||
<where>
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
<result column="url" property="url" jdbcType="VARCHAR"/>
|
||||
<result column="component" property="component" jdbcType="VARCHAR"/>
|
||||
<result column="icon" property="icon" jdbcType="VARCHAR"/>
|
||||
<result column="type" property="type" jdbcType="INTEGER"/>
|
||||
<result column="type" property="type" jdbcType="Integer"/>
|
||||
<result column="layout" property="layout" jdbcType="VARCHAR"/>
|
||||
<result column="order_num" property="orderNum" jdbcType="INTEGER"/>
|
||||
<result column="order_num" property="orderNum" jdbcType="Integer"/>
|
||||
<result column="description" property="description" jdbcType="VARCHAR"/>
|
||||
<!-- 基础字段 -->
|
||||
<result column="optsn" property="optsn" jdbcType="VARCHAR"/>
|
||||
@@ -24,7 +24,7 @@
|
||||
<result column="create_time" property="createTime" jdbcType="DATE"/>
|
||||
<result column="update_time" property="updateTime" jdbcType="DATE"/>
|
||||
<result column="delete_time" property="deleteTime" jdbcType="DATE"/>
|
||||
<result column="deleted" property="deleted" jdbcType="BOOLEAN"/>
|
||||
<result column="deleted" property="deleted" jdbcType="Boolean"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 基础列 -->
|
||||
@@ -204,7 +204,7 @@
|
||||
</select>
|
||||
|
||||
<!-- 根据条件查询系统视图数量 -->
|
||||
<select id="getViewCount" resultType="java.lang.INTEGER" parameterType="org.xyzh.common.dto.sys.TbSysViewDTO">
|
||||
<select id="getViewCount" resultType="java.lang.Integer" parameterType="org.xyzh.common.dto.sys.TbSysViewDTO">
|
||||
SELECT COUNT(1)
|
||||
FROM sys.tb_sys_view
|
||||
<where>
|
||||
|
||||
Reference in New Issue
Block a user