From f748a66db31ce1b01431f7734bc12a665acea1e3 Mon Sep 17 00:00:00 2001 From: Bunny <1319900154@qq.com> Date: Thu, 5 Dec 2024 19:59:02 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BF=AE=E6=94=B9=E9=83=A8?= =?UTF-8?q?=E5=88=86=E5=AE=9E=E4=BD=93=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ControllerStringParamTrimConfig.java | 3 ++ ...eption.java => AuthCustomerException.java} | 17 +++--- .../exception/GlobalExceptionHandler.java | 7 ++- .../bunny/common/service/utils/JwtHelper.java | 20 +++---- .../service/utils/ResponseHandlerUtil.java | 12 ----- .../common/service/utils/ip/IpEntity.java | 2 + .../bunny/common/service/utils/ip/IpUtil.java | 1 + .../service/utils/minio/MinioProperties.java | 5 ++ .../common/service/utils/minio/MinioUtil.java | 14 ++--- .../dao/dto/log/UserLoginLogUpdateDto.java | 2 +- .../dto/quartz/group/SchedulersGroupDto.java | 2 +- .../dto/quartz/schedule/SchedulersAddDto.java | 2 +- .../dto/quartz/schedule/SchedulersDto.java | 2 +- .../quartz/schedule/SchedulersUpdateDto.java | 2 +- .../bunny/dao/dto/system/dept/DeptAddDto.java | 2 +- .../cn/bunny/dao/dto/system/dept/DeptDto.java | 2 +- .../dao/dto/system/dept/DeptUpdateDto.java | 2 +- .../email/template/EmailTemplateAddDto.java | 2 +- .../template/EmailTemplateUpdateDto.java | 2 +- .../email/user/EmailUserUpdateStatusDto.java | 2 +- .../system/email/user/EmailUsersAddDto.java | 2 +- .../dto/system/email/user/EmailUsersDto.java | 2 +- .../email/user/EmailUsersUpdateDto.java | 2 +- .../dao/dto/system/files/FilesAddDto.java | 2 +- .../bunny/dao/dto/system/files/FilesDto.java | 2 +- .../dao/dto/system/files/FilesUpdateDto.java | 2 +- .../dto/system/menuIcon/MenuIconAddDto.java | 2 +- .../dao/dto/system/menuIcon/MenuIconDto.java | 2 +- .../system/menuIcon/MenuIconUpdateDto.java | 2 +- .../dao/dto/system/message/MessageDto.java | 2 +- .../system/message/MessageReceivedDto.java | 2 +- .../message/MessageReceivedUpdateDto.java | 2 +- .../dto/system/message/MessageTypeAddDto.java | 2 +- .../dto/system/message/MessageTypeDto.java | 2 +- .../system/message/MessageTypeUpdateDto.java | 2 +- .../dto/system/message/MessageUpdateDto.java | 2 +- .../dto/system/message/MessageUserDto.java | 2 +- .../system/rolePower/power/PowerAddDto.java | 2 +- .../dto/system/rolePower/power/PowerDto.java | 2 +- .../power/PowerUpdateBatchByParentIdDto.java | 2 +- .../rolePower/power/PowerUpdateDto.java | 2 +- .../dto/system/rolePower/role/RoleAddDto.java | 2 +- .../dto/system/rolePower/role/RoleDto.java | 2 +- .../system/rolePower/role/RoleUpdateDto.java | 2 +- .../dao/dto/system/router/RouterAddDto.java | 2 +- .../dto/system/router/RouterManageDto.java | 2 +- .../dto/system/router/RouterUpdateDto.java | 2 +- .../dao/dto/system/user/AdminUserAddDto.java | 2 +- .../dao/dto/system/user/AdminUserDto.java | 2 +- .../dto/system/user/AdminUserUpdateDto.java | 2 +- .../bunny/dao/dto/system/user/LoginDto.java | 4 +- .../dao/dto/system/user/RefreshTokenDto.java | 1 + .../configuration/WebConfigurationVo.java | 52 +++++++++---------- .../bunny/services/aop/AnnotationScanner.java | 4 +- ...bExecuteAop.java => JobExecuteAspect.java} | 2 +- .../bunny/services/factory/EmailFactory.java | 8 +-- .../impl/CustomUserDetailsServiceImpl.java | 4 +- .../impl/ConfigurationServiceImpl.java | 8 +-- .../service/impl/DeptServiceImpl.java | 6 +-- .../impl/EmailTemplateServiceImpl.java | 6 +-- .../service/impl/EmailUsersServiceImpl.java | 4 +- .../service/impl/FilesServiceImpl.java | 10 ++-- .../service/impl/I18nServiceImpl.java | 8 +-- .../service/impl/I18nTypeServiceImpl.java | 8 +-- .../service/impl/MenuIconServiceImpl.java | 4 +- .../impl/MessageReceivedServiceImpl.java | 8 +-- .../service/impl/MessageServiceImpl.java | 4 +- .../service/impl/PowerServiceImpl.java | 10 ++-- .../service/impl/RoleServiceImpl.java | 6 +-- .../service/impl/RouterRoleServiceImpl.java | 4 +- .../service/impl/RouterServiceImpl.java | 10 ++-- .../service/impl/SchedulersServiceImpl.java | 10 ++-- .../service/impl/UserRoleServiceImpl.java | 6 +-- .../service/impl/UserServiceImpl.java | 30 +++++------ 74 files changed, 195 insertions(+), 185 deletions(-) rename common/service-utils/src/main/java/cn/bunny/common/service/exception/{BunnyException.java => AuthCustomerException.java} (64%) delete mode 100644 common/service-utils/src/main/java/cn/bunny/common/service/utils/ResponseHandlerUtil.java rename service/src/main/java/cn/bunny/services/aop/{JobExecuteAop.java => JobExecuteAspect.java} (99%) diff --git a/common/service-utils/src/main/java/cn/bunny/common/service/config/ControllerStringParamTrimConfig.java b/common/service-utils/src/main/java/cn/bunny/common/service/config/ControllerStringParamTrimConfig.java index 2694d23..8f393dc 100644 --- a/common/service-utils/src/main/java/cn/bunny/common/service/config/ControllerStringParamTrimConfig.java +++ b/common/service-utils/src/main/java/cn/bunny/common/service/config/ControllerStringParamTrimConfig.java @@ -12,6 +12,9 @@ import org.springframework.web.bind.annotation.InitBinder; import java.io.IOException; +/** + * 去除前端传递的空格 + */ @ControllerAdvice public class ControllerStringParamTrimConfig { diff --git a/common/service-utils/src/main/java/cn/bunny/common/service/exception/BunnyException.java b/common/service-utils/src/main/java/cn/bunny/common/service/exception/AuthCustomerException.java similarity index 64% rename from common/service-utils/src/main/java/cn/bunny/common/service/exception/BunnyException.java rename to common/service-utils/src/main/java/cn/bunny/common/service/exception/AuthCustomerException.java index 8be833a..b3523a7 100644 --- a/common/service-utils/src/main/java/cn/bunny/common/service/exception/BunnyException.java +++ b/common/service-utils/src/main/java/cn/bunny/common/service/exception/AuthCustomerException.java @@ -10,24 +10,29 @@ import lombok.extern.slf4j.Slf4j; @Getter @ToString @Slf4j -public class BunnyException extends RuntimeException { - Integer code;// 状态码 - String message;// 描述信息 +public class AuthCustomerException extends RuntimeException { + // 状态码 + Integer code; + + // 描述信息 + String message; + + // 返回结果状态 ResultCodeEnum resultCodeEnum; - public BunnyException(Integer code, String message) { + public AuthCustomerException(Integer code, String message) { super(message); this.code = code; this.message = message; } - public BunnyException(String message) { + public AuthCustomerException(String message) { super(message); this.message = message; } - public BunnyException(ResultCodeEnum codeEnum) { + public AuthCustomerException(ResultCodeEnum codeEnum) { super(codeEnum.getMessage()); this.code = codeEnum.getCode(); this.message = codeEnum.getMessage(); diff --git a/common/service-utils/src/main/java/cn/bunny/common/service/exception/GlobalExceptionHandler.java b/common/service-utils/src/main/java/cn/bunny/common/service/exception/GlobalExceptionHandler.java index cc39b7b..ec0d51f 100644 --- a/common/service-utils/src/main/java/cn/bunny/common/service/exception/GlobalExceptionHandler.java +++ b/common/service-utils/src/main/java/cn/bunny/common/service/exception/GlobalExceptionHandler.java @@ -17,13 +17,16 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.stream.Collectors; +/** + * 全局异常拦截器 + */ @RestControllerAdvice @Slf4j public class GlobalExceptionHandler { // 自定义异常信息 - @ExceptionHandler(BunnyException.class) + @ExceptionHandler(AuthCustomerException.class) @ResponseBody - public Result exceptionHandler(BunnyException exception) { + public Result exceptionHandler(AuthCustomerException exception) { Integer code = exception.getCode() != null ? exception.getCode() : 500; return Result.error(null, code, exception.getMessage()); } diff --git a/common/service-utils/src/main/java/cn/bunny/common/service/utils/JwtHelper.java b/common/service-utils/src/main/java/cn/bunny/common/service/utils/JwtHelper.java index efca21b..f331bdf 100644 --- a/common/service-utils/src/main/java/cn/bunny/common/service/utils/JwtHelper.java +++ b/common/service-utils/src/main/java/cn/bunny/common/service/utils/JwtHelper.java @@ -1,6 +1,6 @@ package cn.bunny.common.service.utils; -import cn.bunny.common.service.exception.BunnyException; +import cn.bunny.common.service.exception.AuthCustomerException; import cn.bunny.dao.pojo.result.ResultCodeEnum; import io.jsonwebtoken.*; import io.micrometer.common.lang.Nullable; @@ -210,14 +210,14 @@ public class JwtHelper { */ public static Map getMapByToken(String token) { try { - if (!StringUtils.hasText(token)) throw new BunnyException(ResultCodeEnum.TOKEN_PARSING_FAILED); + if (!StringUtils.hasText(token)) throw new AuthCustomerException(ResultCodeEnum.TOKEN_PARSING_FAILED); Claims claims = Jwts.parser().setSigningKey(tokenSignKey).parseClaimsJws(token).getBody(); // 将 body 值转为map return new HashMap<>(claims); } catch (Exception exception) { - throw new BunnyException(ResultCodeEnum.TOKEN_PARSING_FAILED); + throw new AuthCustomerException(ResultCodeEnum.TOKEN_PARSING_FAILED); } } @@ -230,14 +230,14 @@ public class JwtHelper { */ public static Map getMapByToken(String token, String signKey) { try { - if (!StringUtils.hasText(token)) throw new BunnyException(ResultCodeEnum.TOKEN_PARSING_FAILED); + if (!StringUtils.hasText(token)) throw new AuthCustomerException(ResultCodeEnum.TOKEN_PARSING_FAILED); Jws claimsJws = Jwts.parser().setSigningKey(signKey).parseClaimsJws(token); Claims body = claimsJws.getBody(); // 将 body 值转为map return new HashMap<>(body); } catch (Exception exception) { - throw new BunnyException(ResultCodeEnum.TOKEN_PARSING_FAILED); + throw new AuthCustomerException(ResultCodeEnum.TOKEN_PARSING_FAILED); } } @@ -254,14 +254,14 @@ public class JwtHelper { @Nullable private static String getSubjectByTokenHandler(String token, String tokenSignKey) { try { - if (!StringUtils.hasText(token)) throw new BunnyException(ResultCodeEnum.TOKEN_PARSING_FAILED); + if (!StringUtils.hasText(token)) throw new AuthCustomerException(ResultCodeEnum.TOKEN_PARSING_FAILED); Jws claimsJws = Jwts.parser().setSigningKey(tokenSignKey).parseClaimsJws(token); Claims body = claimsJws.getBody(); return body.getSubject(); } catch (Exception exception) { - throw new BunnyException(ResultCodeEnum.TOKEN_PARSING_FAILED); + throw new AuthCustomerException(ResultCodeEnum.TOKEN_PARSING_FAILED); } } @@ -283,14 +283,14 @@ public class JwtHelper { */ public static Long getUserId(String token) { try { - if (!StringUtils.hasText(token)) throw new BunnyException(ResultCodeEnum.TOKEN_PARSING_FAILED); + if (!StringUtils.hasText(token)) throw new AuthCustomerException(ResultCodeEnum.TOKEN_PARSING_FAILED); Jws claimsJws = Jwts.parser().setSigningKey(tokenSignKey).parseClaimsJws(token); Claims claims = claimsJws.getBody(); return Long.valueOf(String.valueOf(claims.get("userId"))); } catch (Exception exception) { - throw new BunnyException(ResultCodeEnum.TOKEN_PARSING_FAILED); + throw new AuthCustomerException(ResultCodeEnum.TOKEN_PARSING_FAILED); } } @@ -308,7 +308,7 @@ public class JwtHelper { Claims claims = claimsJws.getBody(); return (String) claims.get("username"); } catch (Exception exception) { - throw new BunnyException(ResultCodeEnum.TOKEN_PARSING_FAILED); + throw new AuthCustomerException(ResultCodeEnum.TOKEN_PARSING_FAILED); } } diff --git a/common/service-utils/src/main/java/cn/bunny/common/service/utils/ResponseHandlerUtil.java b/common/service-utils/src/main/java/cn/bunny/common/service/utils/ResponseHandlerUtil.java deleted file mode 100644 index 8bf9c91..0000000 --- a/common/service-utils/src/main/java/cn/bunny/common/service/utils/ResponseHandlerUtil.java +++ /dev/null @@ -1,12 +0,0 @@ -package cn.bunny.common.service.utils; - -import cn.bunny.dao.pojo.result.Result; -import cn.bunny.dao.pojo.result.ResultCodeEnum; -import jakarta.servlet.http.HttpServletResponse; - -public class ResponseHandlerUtil { - public static boolean loginAuthHandler(HttpServletResponse response, ResultCodeEnum loginAuth) { - ResponseUtil.out(response, Result.error(loginAuth)); - return false; - } -} diff --git a/common/service-utils/src/main/java/cn/bunny/common/service/utils/ip/IpEntity.java b/common/service-utils/src/main/java/cn/bunny/common/service/utils/ip/IpEntity.java index 44e3afa..88d3f9d 100644 --- a/common/service-utils/src/main/java/cn/bunny/common/service/utils/ip/IpEntity.java +++ b/common/service-utils/src/main/java/cn/bunny/common/service/utils/ip/IpEntity.java @@ -13,9 +13,11 @@ import lombok.NoArgsConstructor; @Builder @ApiModel(value = "IpEntity对象", description = "用户IP相关信息") public class IpEntity { + @ApiModelProperty("原始地址") private String ipAddr; @ApiModelProperty("IP归属地") private String ipRegion; + } diff --git a/common/service-utils/src/main/java/cn/bunny/common/service/utils/ip/IpUtil.java b/common/service-utils/src/main/java/cn/bunny/common/service/utils/ip/IpUtil.java index 95d8d8c..305fabc 100644 --- a/common/service-utils/src/main/java/cn/bunny/common/service/utils/ip/IpUtil.java +++ b/common/service-utils/src/main/java/cn/bunny/common/service/utils/ip/IpUtil.java @@ -16,6 +16,7 @@ import java.util.regex.Pattern; @Slf4j public class IpUtil { + private static Searcher searcher; /** diff --git a/common/service-utils/src/main/java/cn/bunny/common/service/utils/minio/MinioProperties.java b/common/service-utils/src/main/java/cn/bunny/common/service/utils/minio/MinioProperties.java index 2f659be..4b64b12 100644 --- a/common/service-utils/src/main/java/cn/bunny/common/service/utils/minio/MinioProperties.java +++ b/common/service-utils/src/main/java/cn/bunny/common/service/utils/minio/MinioProperties.java @@ -14,9 +14,14 @@ import org.springframework.context.annotation.Configuration; @Data @Slf4j public class MinioProperties { + + // 地址 private String endpointUrl; + // 访问秘钥 private String accessKey; + // 私有秘钥 private String secretKey; + // 桶名称 private String bucketName; @Bean diff --git a/common/service-utils/src/main/java/cn/bunny/common/service/utils/minio/MinioUtil.java b/common/service-utils/src/main/java/cn/bunny/common/service/utils/minio/MinioUtil.java index 12fe945..8647685 100644 --- a/common/service-utils/src/main/java/cn/bunny/common/service/utils/minio/MinioUtil.java +++ b/common/service-utils/src/main/java/cn/bunny/common/service/utils/minio/MinioUtil.java @@ -1,6 +1,6 @@ package cn.bunny.common.service.utils.minio; -import cn.bunny.common.service.exception.BunnyException; +import cn.bunny.common.service.exception.AuthCustomerException; import cn.bunny.dao.pojo.common.MinioFilePath; import cn.bunny.dao.pojo.constant.MinioConstant; import cn.bunny.dao.pojo.result.ResultCodeEnum; @@ -78,7 +78,7 @@ public class MinioUtil { public MinioFilePath uploadObjectReturnFilePath(MultipartFile file, String minioPreType) throws IOException { if (file == null) return null; String bucketName = properties.getBucketName(); - + // 上传对象 try { MinioFilePath minioFile = initUploadFileReturnMinioFilePath(bucketName, minioPreType, file); @@ -87,7 +87,7 @@ public class MinioUtil { return minioFile; } catch (Exception exception) { - throw new BunnyException(ResultCodeEnum.UPDATE_ERROR); + throw new AuthCustomerException(ResultCodeEnum.UPDATE_ERROR); } } @@ -107,7 +107,7 @@ public class MinioUtil { } catch (Exception exception) { exception.printStackTrace(); } - throw new BunnyException(ResultCodeEnum.GET_BUCKET_EXCEPTION); + throw new AuthCustomerException(ResultCodeEnum.GET_BUCKET_EXCEPTION); } /** @@ -135,7 +135,7 @@ public class MinioUtil { minioClient.putObject(PutObjectArgs.builder().bucket(bucketName).object(filename).stream(inputStream, size, -1).build()); } catch (Exception exception) { log.error("上传文件失败:{}", (Object) exception.getStackTrace()); - throw new BunnyException(ResultCodeEnum.UPDATE_ERROR); + throw new AuthCustomerException(ResultCodeEnum.UPDATE_ERROR); } } @@ -152,7 +152,7 @@ public class MinioUtil { Iterable> results = minioClient.removeObjects(RemoveObjectsArgs.builder().bucket(bucketName).objects(objectList).build()); for (Result result : results) { DeleteError error = result.get(); - throw new BunnyException("Error in deleting object " + error.objectName() + "; " + error.message()); + throw new AuthCustomerException("Error in deleting object " + error.objectName() + "; " + error.message()); } } catch (Exception exception) { exception.printStackTrace(); @@ -170,7 +170,7 @@ public class MinioUtil { try { putObject(bucketName, filepath, file.getInputStream(), file.getSize()); } catch (IOException e) { - throw new BunnyException(e.getMessage()); + throw new AuthCustomerException(e.getMessage()); } } } diff --git a/dao/src/main/java/cn/bunny/dao/dto/log/UserLoginLogUpdateDto.java b/dao/src/main/java/cn/bunny/dao/dto/log/UserLoginLogUpdateDto.java index 3b0f001..9526781 100644 --- a/dao/src/main/java/cn/bunny/dao/dto/log/UserLoginLogUpdateDto.java +++ b/dao/src/main/java/cn/bunny/dao/dto/log/UserLoginLogUpdateDto.java @@ -10,7 +10,7 @@ import lombok.NoArgsConstructor; @AllArgsConstructor @NoArgsConstructor @Builder -@Schema(name = "UserLoginLogDto对象", title = "用户登录日志分页查询", description = "用户登录日志分页查询") +@Schema(name = "UserLoginLogDto对象", title = "更新用户登录日志", description = "更新用户登录日志") public class UserLoginLogUpdateDto { @Schema(name = "userId", title = "用户Id") diff --git a/dao/src/main/java/cn/bunny/dao/dto/quartz/group/SchedulersGroupDto.java b/dao/src/main/java/cn/bunny/dao/dto/quartz/group/SchedulersGroupDto.java index dc36c78..955062a 100644 --- a/dao/src/main/java/cn/bunny/dao/dto/quartz/group/SchedulersGroupDto.java +++ b/dao/src/main/java/cn/bunny/dao/dto/quartz/group/SchedulersGroupDto.java @@ -10,7 +10,7 @@ import lombok.NoArgsConstructor; @AllArgsConstructor @NoArgsConstructor @Builder -@Schema(name = "SchedulersGroupDto对象", title = "分页查询任务调度分组", description = "分页查询任务调度分组") +@Schema(name = "SchedulersGroupDto对象", title = "任务调度分组分页查询", description = "任务调度分组分页查询") public class SchedulersGroupDto { @Schema(name = "groupName", title = "分组名称") diff --git a/dao/src/main/java/cn/bunny/dao/dto/quartz/schedule/SchedulersAddDto.java b/dao/src/main/java/cn/bunny/dao/dto/quartz/schedule/SchedulersAddDto.java index 85eb52e..acf6206 100644 --- a/dao/src/main/java/cn/bunny/dao/dto/quartz/schedule/SchedulersAddDto.java +++ b/dao/src/main/java/cn/bunny/dao/dto/quartz/schedule/SchedulersAddDto.java @@ -12,7 +12,7 @@ import lombok.NoArgsConstructor; @AllArgsConstructor @NoArgsConstructor @Builder -@Schema(name = "SchedulersAddDto对象", title = "Schedulers添加表单", description = "Schedulers添加表单") +@Schema(name = "SchedulersAddDto对象", title = "添加Schedulers", description = "添加Schedulers") public class SchedulersAddDto { @Schema(name = "jobName", title = "任务名称") diff --git a/dao/src/main/java/cn/bunny/dao/dto/quartz/schedule/SchedulersDto.java b/dao/src/main/java/cn/bunny/dao/dto/quartz/schedule/SchedulersDto.java index 3c517ad..a9bf37e 100644 --- a/dao/src/main/java/cn/bunny/dao/dto/quartz/schedule/SchedulersDto.java +++ b/dao/src/main/java/cn/bunny/dao/dto/quartz/schedule/SchedulersDto.java @@ -11,7 +11,7 @@ import lombok.NoArgsConstructor; @AllArgsConstructor @NoArgsConstructor @Builder -@Schema(name = "SchedulersDto对象", title = "Schedulers查询表单", description = "Schedulers查询表单") +@Schema(name = "SchedulersDto对象", title = "Schedulers分页查询", description = "Schedulers分页查询") public class SchedulersDto { @Schema(name = "jobName", title = "任务名称") diff --git a/dao/src/main/java/cn/bunny/dao/dto/quartz/schedule/SchedulersUpdateDto.java b/dao/src/main/java/cn/bunny/dao/dto/quartz/schedule/SchedulersUpdateDto.java index 2ebb82e..9bc5365 100644 --- a/dao/src/main/java/cn/bunny/dao/dto/quartz/schedule/SchedulersUpdateDto.java +++ b/dao/src/main/java/cn/bunny/dao/dto/quartz/schedule/SchedulersUpdateDto.java @@ -12,7 +12,7 @@ import lombok.NoArgsConstructor; @AllArgsConstructor @NoArgsConstructor @Builder -@Schema(name = "SchedulersUpdateDto对象", title = "Schedulers更新表单", description = "Schedulers更新表单") +@Schema(name = "SchedulersUpdateDto对象", title = "更新Schedulers", description = "更新Schedulers") public class SchedulersUpdateDto { @Schema(name = "jobName", title = "任务名称") diff --git a/dao/src/main/java/cn/bunny/dao/dto/system/dept/DeptAddDto.java b/dao/src/main/java/cn/bunny/dao/dto/system/dept/DeptAddDto.java index fc38671..91ada55 100644 --- a/dao/src/main/java/cn/bunny/dao/dto/system/dept/DeptAddDto.java +++ b/dao/src/main/java/cn/bunny/dao/dto/system/dept/DeptAddDto.java @@ -15,7 +15,7 @@ import java.util.List; @AllArgsConstructor @NoArgsConstructor @Builder -@Schema(name = "DeptAddDto对象", title = "部门", description = "部门管理") +@Schema(name = "DeptAddDto对象", title = "添加部门", description = "添加部门") public class DeptAddDto { @Schema(name = "parentId", title = "父级id") diff --git a/dao/src/main/java/cn/bunny/dao/dto/system/dept/DeptDto.java b/dao/src/main/java/cn/bunny/dao/dto/system/dept/DeptDto.java index 809421c..3eaa3cd 100644 --- a/dao/src/main/java/cn/bunny/dao/dto/system/dept/DeptDto.java +++ b/dao/src/main/java/cn/bunny/dao/dto/system/dept/DeptDto.java @@ -10,7 +10,7 @@ import lombok.NoArgsConstructor; @AllArgsConstructor @NoArgsConstructor @Builder -@Schema(name = "DeptDto对象", title = "部门", description = "部门管理") +@Schema(name = "DeptDto对象", title = "部门分页查询", description = "部门分页查询") public class DeptDto { @Schema(name = "deptName", title = "部门名称") diff --git a/dao/src/main/java/cn/bunny/dao/dto/system/dept/DeptUpdateDto.java b/dao/src/main/java/cn/bunny/dao/dto/system/dept/DeptUpdateDto.java index ad3de2e..76a1c04 100644 --- a/dao/src/main/java/cn/bunny/dao/dto/system/dept/DeptUpdateDto.java +++ b/dao/src/main/java/cn/bunny/dao/dto/system/dept/DeptUpdateDto.java @@ -15,7 +15,7 @@ import java.util.List; @AllArgsConstructor @NoArgsConstructor @Builder -@Schema(name = "DeptUpdateDto对象", title = "部门", description = "部门管理") +@Schema(name = "DeptUpdateDto对象", title = "更新部门", description = "更新部门") public class DeptUpdateDto { @Schema(name = "id", title = "主键") diff --git a/dao/src/main/java/cn/bunny/dao/dto/system/email/template/EmailTemplateAddDto.java b/dao/src/main/java/cn/bunny/dao/dto/system/email/template/EmailTemplateAddDto.java index 1c7ba6a..f5ec196 100644 --- a/dao/src/main/java/cn/bunny/dao/dto/system/email/template/EmailTemplateAddDto.java +++ b/dao/src/main/java/cn/bunny/dao/dto/system/email/template/EmailTemplateAddDto.java @@ -12,7 +12,7 @@ import lombok.NoArgsConstructor; @AllArgsConstructor @NoArgsConstructor @Builder -@Schema(name = "EmailTemplateAddDto对象", title = "邮箱模板请求内容", description = "邮箱模板请求内容") +@Schema(name = "EmailTemplateAddDto对象", title = "添加邮箱模板", description = "添加邮箱模板") public class EmailTemplateAddDto { @Schema(name = "templateName", title = "模板名称") diff --git a/dao/src/main/java/cn/bunny/dao/dto/system/email/template/EmailTemplateUpdateDto.java b/dao/src/main/java/cn/bunny/dao/dto/system/email/template/EmailTemplateUpdateDto.java index 0985fd9..a21c830 100644 --- a/dao/src/main/java/cn/bunny/dao/dto/system/email/template/EmailTemplateUpdateDto.java +++ b/dao/src/main/java/cn/bunny/dao/dto/system/email/template/EmailTemplateUpdateDto.java @@ -12,7 +12,7 @@ import lombok.NoArgsConstructor; @AllArgsConstructor @NoArgsConstructor @Builder -@Schema(name = "EmailTemplateUpdateDto对象", title = "邮箱模板请求内容", description = "邮箱模板请求内容") +@Schema(name = "EmailTemplateUpdateDto对象", title = "更新邮箱模板", description = "更新邮箱模板") public class EmailTemplateUpdateDto { @Schema(name = "id", title = "主键") diff --git a/dao/src/main/java/cn/bunny/dao/dto/system/email/user/EmailUserUpdateStatusDto.java b/dao/src/main/java/cn/bunny/dao/dto/system/email/user/EmailUserUpdateStatusDto.java index c5b2cd9..2b4af12 100644 --- a/dao/src/main/java/cn/bunny/dao/dto/system/email/user/EmailUserUpdateStatusDto.java +++ b/dao/src/main/java/cn/bunny/dao/dto/system/email/user/EmailUserUpdateStatusDto.java @@ -11,7 +11,7 @@ import lombok.NoArgsConstructor; @AllArgsConstructor @NoArgsConstructor @Builder -@Schema(name = "EmailUserUpdateStatusDto对象", title = "邮箱用户更新状态", description = "邮箱用户更新状态表单") +@Schema(name = "EmailUserUpdateStatusDto对象", title = "更新邮箱用户状态", description = "更新邮箱用户状态") public class EmailUserUpdateStatusDto { @Schema(name = "id", title = "主键") diff --git a/dao/src/main/java/cn/bunny/dao/dto/system/email/user/EmailUsersAddDto.java b/dao/src/main/java/cn/bunny/dao/dto/system/email/user/EmailUsersAddDto.java index 747b64b..15962b2 100644 --- a/dao/src/main/java/cn/bunny/dao/dto/system/email/user/EmailUsersAddDto.java +++ b/dao/src/main/java/cn/bunny/dao/dto/system/email/user/EmailUsersAddDto.java @@ -12,7 +12,7 @@ import lombok.NoArgsConstructor; @AllArgsConstructor @NoArgsConstructor @Builder -@Schema(name = "EmailUsersAddDto对象", title = "邮箱用户发送配置", description = "邮箱用户发送配置管理") +@Schema(name = "EmailUsersAddDto对象", title = "添加邮箱用户发送配置", description = "添加邮箱用户发送配置") public class EmailUsersAddDto { @Schema(name = "email", title = "邮箱") diff --git a/dao/src/main/java/cn/bunny/dao/dto/system/email/user/EmailUsersDto.java b/dao/src/main/java/cn/bunny/dao/dto/system/email/user/EmailUsersDto.java index 9f4af5e..00fe482 100644 --- a/dao/src/main/java/cn/bunny/dao/dto/system/email/user/EmailUsersDto.java +++ b/dao/src/main/java/cn/bunny/dao/dto/system/email/user/EmailUsersDto.java @@ -10,7 +10,7 @@ import lombok.NoArgsConstructor; @AllArgsConstructor @NoArgsConstructor @Builder -@Schema(name = "EmailUsersDto对象", title = "邮箱用户发送配置", description = "邮箱用户发送配置管理") +@Schema(name = "EmailUsersDto对象", title = "邮箱用户发送配置分页查询", description = "邮箱用户发送配置分页查询") public class EmailUsersDto { @Schema(name = "email", title = "邮箱") diff --git a/dao/src/main/java/cn/bunny/dao/dto/system/email/user/EmailUsersUpdateDto.java b/dao/src/main/java/cn/bunny/dao/dto/system/email/user/EmailUsersUpdateDto.java index 85c7d40..6e67fc7 100644 --- a/dao/src/main/java/cn/bunny/dao/dto/system/email/user/EmailUsersUpdateDto.java +++ b/dao/src/main/java/cn/bunny/dao/dto/system/email/user/EmailUsersUpdateDto.java @@ -12,7 +12,7 @@ import lombok.NoArgsConstructor; @AllArgsConstructor @NoArgsConstructor @Builder -@Schema(name = "EmailUsersUpdateDto对象", title = "邮箱用户发送配置", description = "邮箱用户发送配置管理") +@Schema(name = "EmailUsersUpdateDto对象", title = "更新邮箱用户发送配置", description = "更新邮箱用户发送配置") public class EmailUsersUpdateDto { @Schema(name = "id", title = "主键") diff --git a/dao/src/main/java/cn/bunny/dao/dto/system/files/FilesAddDto.java b/dao/src/main/java/cn/bunny/dao/dto/system/files/FilesAddDto.java index faf3393..5ea993e 100644 --- a/dao/src/main/java/cn/bunny/dao/dto/system/files/FilesAddDto.java +++ b/dao/src/main/java/cn/bunny/dao/dto/system/files/FilesAddDto.java @@ -17,7 +17,7 @@ import java.util.List; @AllArgsConstructor @NoArgsConstructor @Builder -@Schema(name = "FilesAddDto对象", title = "文件", description = "文件管理") +@Schema(name = "FilesAddDto对象", title = "添加文件", description = "添加文件") public class FilesAddDto { @Schema(name = "filepath", title = "文件在服务器上的存储路径") diff --git a/dao/src/main/java/cn/bunny/dao/dto/system/files/FilesDto.java b/dao/src/main/java/cn/bunny/dao/dto/system/files/FilesDto.java index d9bd98e..ad8c5ac 100644 --- a/dao/src/main/java/cn/bunny/dao/dto/system/files/FilesDto.java +++ b/dao/src/main/java/cn/bunny/dao/dto/system/files/FilesDto.java @@ -10,7 +10,7 @@ import lombok.NoArgsConstructor; @AllArgsConstructor @NoArgsConstructor @Builder -@Schema(name = "FilesDto对象", title = "文件", description = "文件管理") +@Schema(name = "FilesDto对象", title = "文件分页查询", description = "文件分页查询") public class FilesDto { @Schema(name = "filename", title = "文件的名称") diff --git a/dao/src/main/java/cn/bunny/dao/dto/system/files/FilesUpdateDto.java b/dao/src/main/java/cn/bunny/dao/dto/system/files/FilesUpdateDto.java index a703882..945a2b3 100644 --- a/dao/src/main/java/cn/bunny/dao/dto/system/files/FilesUpdateDto.java +++ b/dao/src/main/java/cn/bunny/dao/dto/system/files/FilesUpdateDto.java @@ -14,7 +14,7 @@ import org.springframework.web.multipart.MultipartFile; @AllArgsConstructor @NoArgsConstructor @Builder -@Schema(name = "FilesUpdateDto对象", title = "文件", description = "文件管理") +@Schema(name = "FilesUpdateDto对象", title = "更新文件", description = "文件管理") public class FilesUpdateDto { @Schema(name = "id", title = "主键") diff --git a/dao/src/main/java/cn/bunny/dao/dto/system/menuIcon/MenuIconAddDto.java b/dao/src/main/java/cn/bunny/dao/dto/system/menuIcon/MenuIconAddDto.java index 5522de9..6e25244 100644 --- a/dao/src/main/java/cn/bunny/dao/dto/system/menuIcon/MenuIconAddDto.java +++ b/dao/src/main/java/cn/bunny/dao/dto/system/menuIcon/MenuIconAddDto.java @@ -12,7 +12,7 @@ import lombok.NoArgsConstructor; @AllArgsConstructor @NoArgsConstructor @Builder -@Schema(name = "MenuIconAddDto对象", title = "系统菜单图标", description = "系统菜单图标管理") +@Schema(name = "MenuIconAddDto对象", title = "添加系统菜单图标", description = "添加系统菜单图标") public class MenuIconAddDto { @Schema(name = "iconCode", title = "icon类名") diff --git a/dao/src/main/java/cn/bunny/dao/dto/system/menuIcon/MenuIconDto.java b/dao/src/main/java/cn/bunny/dao/dto/system/menuIcon/MenuIconDto.java index e93510e..6d40e91 100644 --- a/dao/src/main/java/cn/bunny/dao/dto/system/menuIcon/MenuIconDto.java +++ b/dao/src/main/java/cn/bunny/dao/dto/system/menuIcon/MenuIconDto.java @@ -10,7 +10,7 @@ import lombok.NoArgsConstructor; @AllArgsConstructor @NoArgsConstructor @Builder -@Schema(name = "MenuIconDto对象", title = "系统菜单图标", description = "系统菜单图标管理") +@Schema(name = "MenuIconDto对象", title = "系统菜单图标分页查询", description = "系统菜单图标管理") public class MenuIconDto { @Schema(name = "iconCode", title = "icon类名") diff --git a/dao/src/main/java/cn/bunny/dao/dto/system/menuIcon/MenuIconUpdateDto.java b/dao/src/main/java/cn/bunny/dao/dto/system/menuIcon/MenuIconUpdateDto.java index 6839266..bfea1d8 100644 --- a/dao/src/main/java/cn/bunny/dao/dto/system/menuIcon/MenuIconUpdateDto.java +++ b/dao/src/main/java/cn/bunny/dao/dto/system/menuIcon/MenuIconUpdateDto.java @@ -12,7 +12,7 @@ import lombok.NoArgsConstructor; @AllArgsConstructor @NoArgsConstructor @Builder -@Schema(name = "MenuIconUpdateDto对象", title = "系统菜单图标", description = "系统菜单图标管理") +@Schema(name = "MenuIconUpdateDto对象", title = "更新系统菜单图标", description = "系统菜单图标管理") public class MenuIconUpdateDto { @Schema(name = "id", title = "主键") diff --git a/dao/src/main/java/cn/bunny/dao/dto/system/message/MessageDto.java b/dao/src/main/java/cn/bunny/dao/dto/system/message/MessageDto.java index 68f46b0..7e7af3b 100644 --- a/dao/src/main/java/cn/bunny/dao/dto/system/message/MessageDto.java +++ b/dao/src/main/java/cn/bunny/dao/dto/system/message/MessageDto.java @@ -10,7 +10,7 @@ import lombok.NoArgsConstructor; @AllArgsConstructor @NoArgsConstructor @Builder -@Schema(name = "MessageDto对象", title = "消息查询", description = "消息查询") +@Schema(name = "MessageDto对象", title = "消息分页查询", description = "消息分页查询") public class MessageDto { @Schema(name = "title", title = "消息标题") diff --git a/dao/src/main/java/cn/bunny/dao/dto/system/message/MessageReceivedDto.java b/dao/src/main/java/cn/bunny/dao/dto/system/message/MessageReceivedDto.java index 52d5069..755f0aa 100644 --- a/dao/src/main/java/cn/bunny/dao/dto/system/message/MessageReceivedDto.java +++ b/dao/src/main/java/cn/bunny/dao/dto/system/message/MessageReceivedDto.java @@ -10,7 +10,7 @@ import lombok.NoArgsConstructor; @AllArgsConstructor @NoArgsConstructor @Builder -@Schema(name = "MessageReceivedDto对象", title = "用户消息查询", description = "用户消息查询") +@Schema(name = "MessageReceivedDto对象", title = "用户消息分页查询", description = "用户消息分页查询") public class MessageReceivedDto { @Schema(name = "title", title = "消息标题") diff --git a/dao/src/main/java/cn/bunny/dao/dto/system/message/MessageReceivedUpdateDto.java b/dao/src/main/java/cn/bunny/dao/dto/system/message/MessageReceivedUpdateDto.java index 24a9474..b4a0622 100644 --- a/dao/src/main/java/cn/bunny/dao/dto/system/message/MessageReceivedUpdateDto.java +++ b/dao/src/main/java/cn/bunny/dao/dto/system/message/MessageReceivedUpdateDto.java @@ -12,7 +12,7 @@ import java.util.List; @AllArgsConstructor @NoArgsConstructor @Builder -@Schema(name = "MessageReceivedDto对象", title = "用户消息查询", description = "用户消息查询") +@Schema(name = "MessageReceivedDto对象", title = "更新用户消息", description = "更新用户消息") public class MessageReceivedUpdateDto { @Schema(name = "ids", title = "消息接受id") diff --git a/dao/src/main/java/cn/bunny/dao/dto/system/message/MessageTypeAddDto.java b/dao/src/main/java/cn/bunny/dao/dto/system/message/MessageTypeAddDto.java index ce144d0..9e8d40a 100644 --- a/dao/src/main/java/cn/bunny/dao/dto/system/message/MessageTypeAddDto.java +++ b/dao/src/main/java/cn/bunny/dao/dto/system/message/MessageTypeAddDto.java @@ -12,7 +12,7 @@ import lombok.NoArgsConstructor; @AllArgsConstructor @NoArgsConstructor @Builder -@Schema(name = "MessageTypeAddDto对象", title = "系统消息类型", description = "系统消息类型") +@Schema(name = "MessageTypeAddDto对象", title = "添加系统消息类型", description = "添加系统消息类型") public class MessageTypeAddDto { @Schema(name = "messageName", title = "消息名称") diff --git a/dao/src/main/java/cn/bunny/dao/dto/system/message/MessageTypeDto.java b/dao/src/main/java/cn/bunny/dao/dto/system/message/MessageTypeDto.java index 806728e..95b8114 100644 --- a/dao/src/main/java/cn/bunny/dao/dto/system/message/MessageTypeDto.java +++ b/dao/src/main/java/cn/bunny/dao/dto/system/message/MessageTypeDto.java @@ -10,7 +10,7 @@ import lombok.NoArgsConstructor; @AllArgsConstructor @NoArgsConstructor @Builder -@Schema(name = "MessageType对象", title = "系统消息类型", description = "系统消息类型") +@Schema(name = "MessageType对象", title = "系统消息类型分页查询", description = "系统消息类型分页查询") public class MessageTypeDto { @Schema(name = "status", title = "1:启用 0:禁用") diff --git a/dao/src/main/java/cn/bunny/dao/dto/system/message/MessageTypeUpdateDto.java b/dao/src/main/java/cn/bunny/dao/dto/system/message/MessageTypeUpdateDto.java index 974a52d..dcc88bf 100644 --- a/dao/src/main/java/cn/bunny/dao/dto/system/message/MessageTypeUpdateDto.java +++ b/dao/src/main/java/cn/bunny/dao/dto/system/message/MessageTypeUpdateDto.java @@ -11,7 +11,7 @@ import lombok.NoArgsConstructor; @AllArgsConstructor @NoArgsConstructor @Builder -@Schema(name = "MessageTypeUpdateDto对象", title = "系统消息类型", description = "系统消息类型") +@Schema(name = "MessageTypeUpdateDto对象", title = "更新系统消息类型", description = "更新系统消息类型") public class MessageTypeUpdateDto { @Schema(name = "id", title = "主键") diff --git a/dao/src/main/java/cn/bunny/dao/dto/system/message/MessageUpdateDto.java b/dao/src/main/java/cn/bunny/dao/dto/system/message/MessageUpdateDto.java index 31aa445..2e74753 100644 --- a/dao/src/main/java/cn/bunny/dao/dto/system/message/MessageUpdateDto.java +++ b/dao/src/main/java/cn/bunny/dao/dto/system/message/MessageUpdateDto.java @@ -14,7 +14,7 @@ import java.util.List; @AllArgsConstructor @NoArgsConstructor @Builder -@Schema(name = "MessageUpdateDto对象", title = "系统消息", description = "系统消息") +@Schema(name = "MessageUpdateDto对象", title = "更新系统消息", description = "系统消息") public class MessageUpdateDto { @Schema(name = "id", title = "主键") diff --git a/dao/src/main/java/cn/bunny/dao/dto/system/message/MessageUserDto.java b/dao/src/main/java/cn/bunny/dao/dto/system/message/MessageUserDto.java index eac5747..c46ae2b 100644 --- a/dao/src/main/java/cn/bunny/dao/dto/system/message/MessageUserDto.java +++ b/dao/src/main/java/cn/bunny/dao/dto/system/message/MessageUserDto.java @@ -10,7 +10,7 @@ import lombok.NoArgsConstructor; @AllArgsConstructor @NoArgsConstructor @Builder -@Schema(name = "MessageUserDto对象", title = "用户消息查询内容", description = "用户消息查询内容") +@Schema(name = "MessageUserDto对象", title = "用户消息分页查询", description = "用户消息分页查询") public class MessageUserDto { @Schema(name = "title", title = "消息标题") diff --git a/dao/src/main/java/cn/bunny/dao/dto/system/rolePower/power/PowerAddDto.java b/dao/src/main/java/cn/bunny/dao/dto/system/rolePower/power/PowerAddDto.java index bc41978..e9915cd 100644 --- a/dao/src/main/java/cn/bunny/dao/dto/system/rolePower/power/PowerAddDto.java +++ b/dao/src/main/java/cn/bunny/dao/dto/system/rolePower/power/PowerAddDto.java @@ -12,7 +12,7 @@ import lombok.NoArgsConstructor; @AllArgsConstructor @NoArgsConstructor @Builder -@Schema(name = "PowerAddDto对象", title = "权限", description = "权限管理") +@Schema(name = "PowerAddDto对象", title = "添加权限", description = "权限管理") public class PowerAddDto { @Schema(name = "id", title = "主键") diff --git a/dao/src/main/java/cn/bunny/dao/dto/system/rolePower/power/PowerDto.java b/dao/src/main/java/cn/bunny/dao/dto/system/rolePower/power/PowerDto.java index c05d3d4..74f8551 100644 --- a/dao/src/main/java/cn/bunny/dao/dto/system/rolePower/power/PowerDto.java +++ b/dao/src/main/java/cn/bunny/dao/dto/system/rolePower/power/PowerDto.java @@ -10,7 +10,7 @@ import lombok.NoArgsConstructor; @AllArgsConstructor @NoArgsConstructor @Builder -@Schema(name = "PowerDto对象", title = "权限", description = "权限管理") +@Schema(name = "PowerDto对象", title = "权限分页查询", description = "权限管理") public class PowerDto { @Schema(name = "parentId", title = "权限编码") diff --git a/dao/src/main/java/cn/bunny/dao/dto/system/rolePower/power/PowerUpdateBatchByParentIdDto.java b/dao/src/main/java/cn/bunny/dao/dto/system/rolePower/power/PowerUpdateBatchByParentIdDto.java index ff0603b..44bed62 100644 --- a/dao/src/main/java/cn/bunny/dao/dto/system/rolePower/power/PowerUpdateBatchByParentIdDto.java +++ b/dao/src/main/java/cn/bunny/dao/dto/system/rolePower/power/PowerUpdateBatchByParentIdDto.java @@ -14,7 +14,7 @@ import java.util.List; @AllArgsConstructor @NoArgsConstructor @Builder -@Schema(name = "PowerUpdateBatchByParentIdDto对象", title = "批量修改权限", description = "批量修改权限表单") +@Schema(name = "PowerUpdateBatchByParentIdDto对象", title = "批量修改权限", description = "批量修改权限") public class PowerUpdateBatchByParentIdDto { @Schema(name = "id", title = "主键") diff --git a/dao/src/main/java/cn/bunny/dao/dto/system/rolePower/power/PowerUpdateDto.java b/dao/src/main/java/cn/bunny/dao/dto/system/rolePower/power/PowerUpdateDto.java index 1d79e32..0c71bc1 100644 --- a/dao/src/main/java/cn/bunny/dao/dto/system/rolePower/power/PowerUpdateDto.java +++ b/dao/src/main/java/cn/bunny/dao/dto/system/rolePower/power/PowerUpdateDto.java @@ -12,7 +12,7 @@ import lombok.NoArgsConstructor; @AllArgsConstructor @NoArgsConstructor @Builder -@Schema(name = "PowerUpdateDto对象", title = "权限", description = "权限管理") +@Schema(name = "PowerUpdateDto对象", title = "更新权限", description = "权限管理") public class PowerUpdateDto { @Schema(name = "id", title = "主键") diff --git a/dao/src/main/java/cn/bunny/dao/dto/system/rolePower/role/RoleAddDto.java b/dao/src/main/java/cn/bunny/dao/dto/system/rolePower/role/RoleAddDto.java index 9587cfb..db03452 100644 --- a/dao/src/main/java/cn/bunny/dao/dto/system/rolePower/role/RoleAddDto.java +++ b/dao/src/main/java/cn/bunny/dao/dto/system/rolePower/role/RoleAddDto.java @@ -12,7 +12,7 @@ import lombok.NoArgsConstructor; @AllArgsConstructor @NoArgsConstructor @Builder -@Schema(name = "RoleAddDto对象", title = "角色", description = "角色管理") +@Schema(name = "RoleAddDto对象", title = "添加角色", description = "角色管理") public class RoleAddDto { @Schema(name = "roleCode", title = "角色代码") diff --git a/dao/src/main/java/cn/bunny/dao/dto/system/rolePower/role/RoleDto.java b/dao/src/main/java/cn/bunny/dao/dto/system/rolePower/role/RoleDto.java index fd90f49..5effa8f 100644 --- a/dao/src/main/java/cn/bunny/dao/dto/system/rolePower/role/RoleDto.java +++ b/dao/src/main/java/cn/bunny/dao/dto/system/rolePower/role/RoleDto.java @@ -10,7 +10,7 @@ import lombok.NoArgsConstructor; @AllArgsConstructor @NoArgsConstructor @Builder -@Schema(name = "RoleDto对象", title = "角色", description = "角色管理") +@Schema(name = "RoleDto对象", title = "角色分页查询", description = "角色管理") public class RoleDto { @Schema(name = "roleCode", title = "角色代码") diff --git a/dao/src/main/java/cn/bunny/dao/dto/system/rolePower/role/RoleUpdateDto.java b/dao/src/main/java/cn/bunny/dao/dto/system/rolePower/role/RoleUpdateDto.java index 0724733..c04c210 100644 --- a/dao/src/main/java/cn/bunny/dao/dto/system/rolePower/role/RoleUpdateDto.java +++ b/dao/src/main/java/cn/bunny/dao/dto/system/rolePower/role/RoleUpdateDto.java @@ -12,7 +12,7 @@ import lombok.NoArgsConstructor; @AllArgsConstructor @NoArgsConstructor @Builder -@Schema(name = "RoleUpdateDto对象", title = "角色", description = "角色管理") +@Schema(name = "RoleUpdateDto对象", title = "更新角色", description = "角色管理") public class RoleUpdateDto { @Schema(name = "id", title = "主键") diff --git a/dao/src/main/java/cn/bunny/dao/dto/system/router/RouterAddDto.java b/dao/src/main/java/cn/bunny/dao/dto/system/router/RouterAddDto.java index d144c76..8327a25 100644 --- a/dao/src/main/java/cn/bunny/dao/dto/system/router/RouterAddDto.java +++ b/dao/src/main/java/cn/bunny/dao/dto/system/router/RouterAddDto.java @@ -14,7 +14,7 @@ import lombok.NoArgsConstructor; @AllArgsConstructor @NoArgsConstructor @Builder -@Schema(name = "RouterManageDto对象", title = "路由添加表单", description = "路由添加表单") +@Schema(name = "RouterManageDto对象", title = "添加路由", description = "添加路由") public class RouterAddDto { @Schema(name = "menuType", title = "菜单类型") diff --git a/dao/src/main/java/cn/bunny/dao/dto/system/router/RouterManageDto.java b/dao/src/main/java/cn/bunny/dao/dto/system/router/RouterManageDto.java index d5ed675..a1b6d8e 100644 --- a/dao/src/main/java/cn/bunny/dao/dto/system/router/RouterManageDto.java +++ b/dao/src/main/java/cn/bunny/dao/dto/system/router/RouterManageDto.java @@ -10,7 +10,7 @@ import lombok.NoArgsConstructor; @AllArgsConstructor @NoArgsConstructor @Builder -@Schema(name = "RouterManageDto对象", title = "路由查询表单", description = "路由查询表单") +@Schema(name = "RouterManageDto对象", title = "路由分页查询", description = "路由分页查询") public class RouterManageDto { @Schema(name = "title", title = "路由标题") diff --git a/dao/src/main/java/cn/bunny/dao/dto/system/router/RouterUpdateDto.java b/dao/src/main/java/cn/bunny/dao/dto/system/router/RouterUpdateDto.java index e2c9133..86ff5de 100644 --- a/dao/src/main/java/cn/bunny/dao/dto/system/router/RouterUpdateDto.java +++ b/dao/src/main/java/cn/bunny/dao/dto/system/router/RouterUpdateDto.java @@ -14,7 +14,7 @@ import lombok.NoArgsConstructor; @AllArgsConstructor @NoArgsConstructor @Builder -@Schema(name = "RouterManageDto对象", title = "路由更新表单", description = "路由更新表单") +@Schema(name = "RouterManageDto对象", title = "更新路由", description = "更新路由") public class RouterUpdateDto { @Schema(name = "id", title = "唯一标识") diff --git a/dao/src/main/java/cn/bunny/dao/dto/system/user/AdminUserAddDto.java b/dao/src/main/java/cn/bunny/dao/dto/system/user/AdminUserAddDto.java index baf15f1..a54e136 100644 --- a/dao/src/main/java/cn/bunny/dao/dto/system/user/AdminUserAddDto.java +++ b/dao/src/main/java/cn/bunny/dao/dto/system/user/AdminUserAddDto.java @@ -13,7 +13,7 @@ import lombok.NoArgsConstructor; @AllArgsConstructor @NoArgsConstructor @Builder -@Schema(name = "AdminUserAddDto对象", title = "用户", description = "用户管理") +@Schema(name = "AdminUserAddDto对象", title = "添加用户", description = "用户管理") public class AdminUserAddDto { @Schema(name = "username", title = "用户名") diff --git a/dao/src/main/java/cn/bunny/dao/dto/system/user/AdminUserDto.java b/dao/src/main/java/cn/bunny/dao/dto/system/user/AdminUserDto.java index 6f86af9..9e980a7 100644 --- a/dao/src/main/java/cn/bunny/dao/dto/system/user/AdminUserDto.java +++ b/dao/src/main/java/cn/bunny/dao/dto/system/user/AdminUserDto.java @@ -12,7 +12,7 @@ import java.util.List; @AllArgsConstructor @NoArgsConstructor @Builder -@Schema(name = "AdminUserAddDto对象", title = "用户", description = "用户管理") +@Schema(name = "AdminUserAddDto对象", title = "用户分页查询", description = "用户管理") public class AdminUserDto { @Schema(name = "username", title = "用户名") diff --git a/dao/src/main/java/cn/bunny/dao/dto/system/user/AdminUserUpdateDto.java b/dao/src/main/java/cn/bunny/dao/dto/system/user/AdminUserUpdateDto.java index f749ba4..7c99733 100644 --- a/dao/src/main/java/cn/bunny/dao/dto/system/user/AdminUserUpdateDto.java +++ b/dao/src/main/java/cn/bunny/dao/dto/system/user/AdminUserUpdateDto.java @@ -12,7 +12,7 @@ import lombok.NoArgsConstructor; @AllArgsConstructor @NoArgsConstructor @Builder -@Schema(name = "AdminUserUpdateDto对象", title = "用户", description = "用户管理") +@Schema(name = "AdminUserUpdateDto对象", title = "更新用户", description = "用户管理") public class AdminUserUpdateDto { @Schema(name = "id", title = "主键") diff --git a/dao/src/main/java/cn/bunny/dao/dto/system/user/LoginDto.java b/dao/src/main/java/cn/bunny/dao/dto/system/user/LoginDto.java index 0dd6f1d..8a3018d 100644 --- a/dao/src/main/java/cn/bunny/dao/dto/system/user/LoginDto.java +++ b/dao/src/main/java/cn/bunny/dao/dto/system/user/LoginDto.java @@ -24,7 +24,9 @@ public class LoginDto { @Schema(name = "password", title = "密码") @NotBlank(message = "密码不能为空") @NotNull(message = "密码不能为空") - @Pattern(regexp = "^(?![0-9]+$)(?![a-z]+$)(?![A-Z]+$)(?!([^(0-9a-zA-Z)]|[()])+$)(?!^.*[\\u4E00-\\u9FA5].*$)([^(0-9a-zA-Z)]|[()]|[a-z]|[A-Z]|[0-9]){8,18}$", message = "密码格式应为8-18位数字、字母、符号的任意两种组合") + @Pattern( + regexp = "^(?![0-9]+$)(?![a-z]+$)(?![A-Z]+$)(?!([^(0-9a-zA-Z)]|[()])+$)(?!^.*[\\u4E00-\\u9FA5].*$)([^(0-9a-zA-Z)]|[()]|[a-z]|[A-Z]|[0-9]){8,18}$", + message = "密码格式应为8-18位数字、字母、符号的任意两种组合") private String password; @Schema(name = "emailCode", title = "邮箱验证码") diff --git a/dao/src/main/java/cn/bunny/dao/dto/system/user/RefreshTokenDto.java b/dao/src/main/java/cn/bunny/dao/dto/system/user/RefreshTokenDto.java index b558940..654926d 100644 --- a/dao/src/main/java/cn/bunny/dao/dto/system/user/RefreshTokenDto.java +++ b/dao/src/main/java/cn/bunny/dao/dto/system/user/RefreshTokenDto.java @@ -14,6 +14,7 @@ import lombok.NoArgsConstructor; @Builder @Schema(name = "RefreshTokenDto对象", title = "登录成功返回内容", description = "登录成功返回内容") public class RefreshTokenDto { + @Schema(name = "refreshToken", title = "请求刷新token") @NotBlank(message = "请求刷新token不能为空") @NotNull(message = "请求刷新token不能为空") diff --git a/dao/src/main/java/cn/bunny/dao/vo/system/configuration/WebConfigurationVo.java b/dao/src/main/java/cn/bunny/dao/vo/system/configuration/WebConfigurationVo.java index 8ddc1b5..7487dba 100644 --- a/dao/src/main/java/cn/bunny/dao/vo/system/configuration/WebConfigurationVo.java +++ b/dao/src/main/java/cn/bunny/dao/vo/system/configuration/WebConfigurationVo.java @@ -14,107 +14,107 @@ import lombok.NoArgsConstructor; @Schema(name = "WebConfigurationVo对象", title = "前端配置选项", description = "前端配置选项") public class WebConfigurationVo { - @Schema(name = "Version", description = "应用程序的版本") + @Schema(name = "version", description = "应用程序的版本") @JSONField(format = "Version") private String version; - @Schema(name = "Title", description = "应用程序的标题") + @Schema(name = "title", description = "应用程序的标题") @JSONField(format = "Title") private String title; - @Schema(name = "Copyright", description = "版权信息") + @Schema(name = "copyright", description = "版权信息") @JSONField(format = "Copyright") private String copyright; - @Schema(name = "FixedHeader", description = "头部是否固定") + @Schema(name = "fixedHeader", description = "头部是否固定") @JSONField(format = "FixedHeader") private boolean fixedHeader; - @Schema(name = "HiddenSideBar", description = "侧边栏是否隐藏") + @Schema(name = "hiddenSideBar", description = "侧边栏是否隐藏") @JSONField(format = "FixedHeader") private boolean hiddenSideBar; - @Schema(name = "MultiTagsCache", description = "是否缓存多个标签") + @Schema(name = "multiTagsCache", description = "是否缓存多个标签") @JSONField(format = "FixedHeader") private boolean multiTagsCache; - @Schema(name = "KeepAlive", description = "是否持久化") + @Schema(name = "keepAlive", description = "是否持久化") @JSONField(format = "FixedHeader") private boolean keepAlive; - @Schema(name = "Locale", description = "语言类型") + @Schema(name = "locale", description = "语言类型") @JSONField(format = "Locale") private String locale; - @Schema(name = "Layout", description = "应用程序的布局") + @Schema(name = "layout", description = "应用程序的布局") @JSONField(name = "Layout") private String layout; - @Schema(name = "Theme", description = "应用程序的主题") + @Schema(name = "theme", description = "应用程序的主题") @JSONField(format = "FixedHeader") private String theme; - @Schema(name = "DarkMode", description = "是否启用深色模式") + @Schema(name = "darkMode", description = "是否启用深色模式") @JSONField(format = "FixedHeader") private boolean darkMode; - @Schema(name = "OverallStyle", description = "应用程序的整体样式") + @Schema(name = "overallStyle", description = "应用程序的整体样式") @JSONField(format = "FixedHeader") private String overallStyle; - @Schema(name = "Grey", description = "是否启用灰色模式") + @Schema(name = "grey", description = "是否启用灰色模式") @JSONField(format = "FixedHeader") private boolean grey; - @Schema(name = "Weak", description = "色弱模式") + @Schema(name = "weak", description = "色弱模式") @JSONField(format = "FixedHeader") private boolean weak; - @Schema(name = "HideTabs", description = "是否隐藏选项卡") + @Schema(name = "hideTabs", description = "是否隐藏选项卡") @JSONField(format = "HideTabs") private boolean hideTabs; - @Schema(name = "HideFooter", description = "是否隐藏页脚") + @Schema(name = "hideFooter", description = "是否隐藏页脚") @JSONField(format = "HideFooter") private boolean hideFooter; - @Schema(name = "Stretch", description = "是否拉伸显示") + @Schema(name = "stretch", description = "是否拉伸显示") @JSONField(format = "Stretch") private boolean stretch; - @Schema(name = "SidebarStatus", description = "侧边栏的状态") + @Schema(name = "sidebarStatus", description = "侧边栏的状态") @JSONField(format = "SidebarStatus") private boolean sidebarStatus; - @Schema(name = "EpThemeColor", description = "主题颜色") + @Schema(name = "epThemeColor", description = "主题颜色") @JSONField(format = "EpThemeColor") private String epThemeColor; - @Schema(name = "ShowLogo", description = "是否显示logo") + @Schema(name = "showLogo", description = "是否显示logo") @JSONField(format = "ShowLogo") private boolean showLogo; - @Schema(name = "ShowModel", description = "要显示的模型") + @Schema(name = "showModel", description = "要显示的模型") @JSONField(format = "ShowModel") private String showModel; - @Schema(name = "MenuArrowIconNoTransition", description = "菜单箭头图标是否没有过渡效果") + @Schema(name = "menuArrowIconNoTransition", description = "菜单箭头图标是否没有过渡效果") @JSONField(format = "MenuArrowIconNoTransition") private boolean menuArrowIconNoTransition; - @Schema(name = "CachingAsyncRoutes", description = "是否缓存异步路由") + @Schema(name = "cachingAsyncRoutes", description = "是否缓存异步路由") @JSONField(format = "CachingAsyncRoutes") private boolean cachingAsyncRoutes; - @Schema(name = "TooltipEffect", description = "工具提示的效果") + @Schema(name = "tooltipEffect", description = "工具提示的效果") @JSONField(format = "TooltipEffect") private String tooltipEffect; - @Schema(name = "ResponsiveStorageNameSpace", description = "响应式存储的命名空间") + @Schema(name = "responsiveStorageNameSpace", description = "响应式存储的命名空间") @JSONField(format = "ResponsiveStorageNameSpace") private String responsiveStorageNameSpace; - @Schema(name = "MenuSearchHistory", description = "菜单搜索历史") + @Schema(name = "responsiveStorageNameSpace", description = "菜单搜索历史") @JSONField(format = "MenuSearchHistory") private int menuSearchHistory; diff --git a/service/src/main/java/cn/bunny/services/aop/AnnotationScanner.java b/service/src/main/java/cn/bunny/services/aop/AnnotationScanner.java index 84ad11a..346336c 100644 --- a/service/src/main/java/cn/bunny/services/aop/AnnotationScanner.java +++ b/service/src/main/java/cn/bunny/services/aop/AnnotationScanner.java @@ -1,6 +1,6 @@ package cn.bunny.services.aop; -import cn.bunny.common.service.exception.BunnyException; +import cn.bunny.common.service.exception.AuthCustomerException; import cn.bunny.dao.pojo.result.ResultCodeEnum; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider; @@ -34,7 +34,7 @@ public class AnnotationScanner { Class clazz = Class.forName(bd.getBeanClassName()); classes.add(clazz); } catch (ClassNotFoundException e) { - throw new BunnyException(ResultCodeEnum.CLASS_NOT_FOUND); + throw new AuthCustomerException(ResultCodeEnum.CLASS_NOT_FOUND); } } diff --git a/service/src/main/java/cn/bunny/services/aop/JobExecuteAop.java b/service/src/main/java/cn/bunny/services/aop/JobExecuteAspect.java similarity index 99% rename from service/src/main/java/cn/bunny/services/aop/JobExecuteAop.java rename to service/src/main/java/cn/bunny/services/aop/JobExecuteAspect.java index 2b09b90..880923f 100644 --- a/service/src/main/java/cn/bunny/services/aop/JobExecuteAop.java +++ b/service/src/main/java/cn/bunny/services/aop/JobExecuteAspect.java @@ -22,7 +22,7 @@ import java.util.Map; @Aspect @Component -public class JobExecuteAop { +public class JobExecuteAspect { DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern(LocalDateTimeConstant.YYYY_MM_DD_HH_MM_SS); diff --git a/service/src/main/java/cn/bunny/services/factory/EmailFactory.java b/service/src/main/java/cn/bunny/services/factory/EmailFactory.java index ac87229..4de3354 100644 --- a/service/src/main/java/cn/bunny/services/factory/EmailFactory.java +++ b/service/src/main/java/cn/bunny/services/factory/EmailFactory.java @@ -1,6 +1,6 @@ package cn.bunny.services.factory; -import cn.bunny.common.service.exception.BunnyException; +import cn.bunny.common.service.exception.AuthCustomerException; import cn.bunny.common.service.utils.mail.MailSenderUtil; import cn.bunny.dao.entity.system.EmailTemplate; import cn.bunny.dao.entity.system.EmailUsers; @@ -33,14 +33,14 @@ public class EmailFactory { */ public void sendEmailTemplate(String email, EmailTemplate emailTemplate, HashMap params) { // 判断邮件模板是否为空 - if (emailTemplate == null) throw new BunnyException(ResultCodeEnum.EMAIL_TEMPLATE_IS_EMPTY); + if (emailTemplate == null) throw new AuthCustomerException(ResultCodeEnum.EMAIL_TEMPLATE_IS_EMPTY); // 查询配置发送邮箱,如果没有配置发件者邮箱改用用户列表中默认的,如果默认的也为空则报错 Long emailUser = emailTemplate.getEmailUser(); EmailUsers emailUsers; if (emailUser == null) { emailUsers = emailUsersMapper.selectOne(Wrappers.lambdaQuery().eq(EmailUsers::getIsDefault, true)); - if (emailUsers == null) throw new BunnyException(ResultCodeEnum.EMAIL_USER_IS_EMPTY); + if (emailUsers == null) throw new AuthCustomerException(ResultCodeEnum.EMAIL_USER_IS_EMPTY); } else { emailUsers = emailUsersMapper.selectOne(Wrappers.lambdaQuery().eq(EmailUsers::getId, emailUser)); } @@ -66,7 +66,7 @@ public class EmailFactory { emailSend.setText(modifiedTemplate[0]); MailSenderUtil.sendEmail(emailSendInit, emailSend); } catch (MessagingException e) { - throw new BunnyException(ResultCodeEnum.SEND_MAIL_CODE_ERROR); + throw new AuthCustomerException(ResultCodeEnum.SEND_MAIL_CODE_ERROR); } } diff --git a/service/src/main/java/cn/bunny/services/security/service/impl/CustomUserDetailsServiceImpl.java b/service/src/main/java/cn/bunny/services/security/service/impl/CustomUserDetailsServiceImpl.java index 3cd22ff..69b9ad2 100644 --- a/service/src/main/java/cn/bunny/services/security/service/impl/CustomUserDetailsServiceImpl.java +++ b/service/src/main/java/cn/bunny/services/security/service/impl/CustomUserDetailsServiceImpl.java @@ -1,6 +1,6 @@ package cn.bunny.services.security.service.impl; -import cn.bunny.common.service.exception.BunnyException; +import cn.bunny.common.service.exception.AuthCustomerException; import cn.bunny.dao.dto.system.user.LoginDto; import cn.bunny.dao.entity.system.AdminUser; import cn.bunny.dao.pojo.result.Result; @@ -78,7 +78,7 @@ public class CustomUserDetailsServiceImpl implements cn.bunny.services.security. // 对登录密码进行md5加密判断,是否与数据库中一致 String md5Password = DigestUtils.md5DigestAsHex(password.getBytes()); - if (!user.getPassword().equals(md5Password)) throw new BunnyException(ResultCodeEnum.LOGIN_ERROR); + if (!user.getPassword().equals(md5Password)) throw new AuthCustomerException(ResultCodeEnum.LOGIN_ERROR); return userFactory.buildLoginUserVo(user, readMeDay); } diff --git a/service/src/main/java/cn/bunny/services/service/impl/ConfigurationServiceImpl.java b/service/src/main/java/cn/bunny/services/service/impl/ConfigurationServiceImpl.java index 6d099f5..eefd3a6 100644 --- a/service/src/main/java/cn/bunny/services/service/impl/ConfigurationServiceImpl.java +++ b/service/src/main/java/cn/bunny/services/service/impl/ConfigurationServiceImpl.java @@ -1,6 +1,6 @@ package cn.bunny.services.service.impl; -import cn.bunny.common.service.exception.BunnyException; +import cn.bunny.common.service.exception.AuthCustomerException; import cn.bunny.dao.dto.system.configuration.WebConfigurationDto; import cn.bunny.dao.entity.configuration.WebConfiguration; import cn.bunny.dao.pojo.result.ResultCodeEnum; @@ -26,7 +26,7 @@ public class ConfigurationServiceImpl implements ConfigurationService { private String bashPath; private static @NotNull String getWebConfigString(InputStream inputStream, Path templatePath) throws IOException { - if (inputStream == null) throw new BunnyException(ResultCodeEnum.MISSING_TEMPLATE_FILES); + if (inputStream == null) throw new AuthCustomerException(ResultCodeEnum.MISSING_TEMPLATE_FILES); // 判断web模板文件是否存在,不存在进行复制 boolean exists = Files.exists(templatePath); @@ -80,7 +80,7 @@ public class ConfigurationServiceImpl implements ConfigurationService { String string = getWebConfigString(inputStream, templatePath); return JSON.parseObject(string, WebConfiguration.class); } catch (IOException exception) { - throw new BunnyException(exception.getMessage()); + throw new AuthCustomerException(exception.getMessage()); } } @@ -98,7 +98,7 @@ public class ConfigurationServiceImpl implements ConfigurationService { String string = getWebConfigString(inputStream, templatePath); return JSON.parseObject(string, WebConfigurationVo.class); } catch (IOException exception) { - throw new BunnyException(exception.getMessage()); + throw new AuthCustomerException(exception.getMessage()); } } } diff --git a/service/src/main/java/cn/bunny/services/service/impl/DeptServiceImpl.java b/service/src/main/java/cn/bunny/services/service/impl/DeptServiceImpl.java index 79a640f..a5cc72c 100644 --- a/service/src/main/java/cn/bunny/services/service/impl/DeptServiceImpl.java +++ b/service/src/main/java/cn/bunny/services/service/impl/DeptServiceImpl.java @@ -1,6 +1,6 @@ package cn.bunny.services.service.impl; -import cn.bunny.common.service.exception.BunnyException; +import cn.bunny.common.service.exception.AuthCustomerException; import cn.bunny.dao.dto.system.dept.DeptAddDto; import cn.bunny.dao.dto.system.dept.DeptDto; import cn.bunny.dao.dto.system.dept.DeptUpdateDto; @@ -100,7 +100,7 @@ public class DeptServiceImpl extends ServiceImpl implements De @Override @CacheEvict(cacheNames = "dept", key = "'allDept'", beforeInvocation = true) public void updateDept(DeptUpdateDto dto) { - if (dto.getId().equals(dto.getParentId())) throw new BunnyException(ResultCodeEnum.ILLEGAL_DATA_REQUEST); + if (dto.getId().equals(dto.getParentId())) throw new AuthCustomerException(ResultCodeEnum.ILLEGAL_DATA_REQUEST); // 将管理员用户逗号分隔 String mangerList = dto.getManager().stream().map(String::trim).collect(Collectors.joining(",")); @@ -122,7 +122,7 @@ public class DeptServiceImpl extends ServiceImpl implements De @CacheEvict(cacheNames = "dept", key = "'allDept'", beforeInvocation = true) public void deleteDept(List ids) { // 判断数据请求是否为空 - if (ids.isEmpty()) throw new BunnyException(ResultCodeEnum.REQUEST_IS_EMPTY); + if (ids.isEmpty()) throw new AuthCustomerException(ResultCodeEnum.REQUEST_IS_EMPTY); // 删除当前部门 baseMapper.deleteBatchIdsWithPhysics(ids); diff --git a/service/src/main/java/cn/bunny/services/service/impl/EmailTemplateServiceImpl.java b/service/src/main/java/cn/bunny/services/service/impl/EmailTemplateServiceImpl.java index 0cdb8b1..7c5369f 100644 --- a/service/src/main/java/cn/bunny/services/service/impl/EmailTemplateServiceImpl.java +++ b/service/src/main/java/cn/bunny/services/service/impl/EmailTemplateServiceImpl.java @@ -1,6 +1,6 @@ package cn.bunny.services.service.impl; -import cn.bunny.common.service.exception.BunnyException; +import cn.bunny.common.service.exception.AuthCustomerException; import cn.bunny.dao.dto.system.email.template.EmailTemplateAddDto; import cn.bunny.dao.dto.system.email.template.EmailTemplateDto; import cn.bunny.dao.dto.system.email.template.EmailTemplateUpdateDto; @@ -76,7 +76,7 @@ public class EmailTemplateServiceImpl extends ServiceImpl emailTemplateList = list(Wrappers.lambdaQuery().eq(EmailTemplate::getId, dto.getId())); - if (emailTemplateList.isEmpty()) throw new BunnyException(ResultCodeEnum.DATA_NOT_EXIST); + if (emailTemplateList.isEmpty()) throw new AuthCustomerException(ResultCodeEnum.DATA_NOT_EXIST); // 更新内容 EmailTemplate emailTemplate = new EmailTemplate(); @@ -92,7 +92,7 @@ public class EmailTemplateServiceImpl extends ServiceImpl ids) { // 判断数据请求是否为空 - if (ids.isEmpty()) throw new BunnyException(ResultCodeEnum.REQUEST_IS_EMPTY); + if (ids.isEmpty()) throw new AuthCustomerException(ResultCodeEnum.REQUEST_IS_EMPTY); baseMapper.deleteBatchIdsWithPhysics(ids); } diff --git a/service/src/main/java/cn/bunny/services/service/impl/EmailUsersServiceImpl.java b/service/src/main/java/cn/bunny/services/service/impl/EmailUsersServiceImpl.java index 845af84..b660867 100644 --- a/service/src/main/java/cn/bunny/services/service/impl/EmailUsersServiceImpl.java +++ b/service/src/main/java/cn/bunny/services/service/impl/EmailUsersServiceImpl.java @@ -1,6 +1,6 @@ package cn.bunny.services.service.impl; -import cn.bunny.common.service.exception.BunnyException; +import cn.bunny.common.service.exception.AuthCustomerException; import cn.bunny.dao.dto.system.email.user.EmailUserUpdateStatusDto; import cn.bunny.dao.dto.system.email.user.EmailUsersAddDto; import cn.bunny.dao.dto.system.email.user.EmailUsersDto; @@ -100,7 +100,7 @@ public class EmailUsersServiceImpl extends ServiceImpl ids) { // 判断数据请求是否为空 - if (ids.isEmpty()) throw new BunnyException(ResultCodeEnum.REQUEST_IS_EMPTY); + if (ids.isEmpty()) throw new AuthCustomerException(ResultCodeEnum.REQUEST_IS_EMPTY); baseMapper.deleteBatchIdsWithPhysics(ids); } diff --git a/service/src/main/java/cn/bunny/services/service/impl/FilesServiceImpl.java b/service/src/main/java/cn/bunny/services/service/impl/FilesServiceImpl.java index 684fcb8..9b975b0 100644 --- a/service/src/main/java/cn/bunny/services/service/impl/FilesServiceImpl.java +++ b/service/src/main/java/cn/bunny/services/service/impl/FilesServiceImpl.java @@ -1,7 +1,7 @@ package cn.bunny.services.service.impl; import cn.bunny.common.service.context.BaseContext; -import cn.bunny.common.service.exception.BunnyException; +import cn.bunny.common.service.exception.AuthCustomerException; import cn.bunny.common.service.utils.FileUtil; import cn.bunny.common.service.utils.minio.MinioProperties; import cn.bunny.common.service.utils.minio.MinioUtil; @@ -102,7 +102,7 @@ public class FilesServiceImpl extends ServiceImpl implements files.setDownloadCount(dto.getDownloadCount()); return files; } catch (IOException e) { - throw new BunnyException(e.getMessage()); + throw new AuthCustomerException(e.getMessage()); } }).toList(); @@ -165,7 +165,7 @@ public class FilesServiceImpl extends ServiceImpl implements // 盘读研数据是否过大 String mb = maxFileSize.replace("MB", ""); - if (fileSize / 1024 / 1024 > Long.parseLong(mb)) throw new BunnyException(ResultCodeEnum.DATA_TOO_LARGE); + if (fileSize / 1024 / 1024 > Long.parseLong(mb)) throw new AuthCustomerException(ResultCodeEnum.DATA_TOO_LARGE); // 插入文件信息 Files adminFiles = new Files(); @@ -194,7 +194,7 @@ public class FilesServiceImpl extends ServiceImpl implements */ @Override public void deleteFiles(List ids) { - if (ids.isEmpty()) throw new BunnyException(ResultCodeEnum.REQUEST_IS_EMPTY); + if (ids.isEmpty()) throw new AuthCustomerException(ResultCodeEnum.REQUEST_IS_EMPTY); // 查询文件路径 List list = list(Wrappers.lambdaQuery().in(Files::getId, ids)).stream() @@ -223,7 +223,7 @@ public class FilesServiceImpl extends ServiceImpl implements Files files = getOne(Wrappers.lambdaQuery().eq(Files::getId, fileId)); // 判断文件是否存在 - if (files == null) throw new BunnyException(ResultCodeEnum.FILE_NOT_EXIST); + if (files == null) throw new AuthCustomerException(ResultCodeEnum.FILE_NOT_EXIST); // 从Minio获取文件 String filepath = files.getFilepath(); diff --git a/service/src/main/java/cn/bunny/services/service/impl/I18nServiceImpl.java b/service/src/main/java/cn/bunny/services/service/impl/I18nServiceImpl.java index 066b757..283fa1b 100644 --- a/service/src/main/java/cn/bunny/services/service/impl/I18nServiceImpl.java +++ b/service/src/main/java/cn/bunny/services/service/impl/I18nServiceImpl.java @@ -1,6 +1,6 @@ package cn.bunny.services.service.impl; -import cn.bunny.common.service.exception.BunnyException; +import cn.bunny.common.service.exception.AuthCustomerException; import cn.bunny.dao.dto.i18n.I18nAddDto; import cn.bunny.dao.dto.i18n.I18nDto; import cn.bunny.dao.dto.i18n.I18nUpdateDto; @@ -99,7 +99,7 @@ public class I18nServiceImpl extends ServiceImpl implements I1 // 查询数据是否存在 List i18nList = list(Wrappers.lambdaQuery().eq(I18n::getKeyName, keyName).eq(I18n::getTypeName, typeName)); - if (!i18nList.isEmpty()) throw new BunnyException(ResultCodeEnum.DATA_EXIST); + if (!i18nList.isEmpty()) throw new AuthCustomerException(ResultCodeEnum.DATA_EXIST); // 保存内容 I18n i18n = new I18n(); @@ -119,7 +119,7 @@ public class I18nServiceImpl extends ServiceImpl implements I1 // 查询数据是否存在 List i18nList = list(Wrappers.lambdaQuery().eq(I18n::getId, id)); - if (i18nList.isEmpty()) throw new BunnyException(ResultCodeEnum.DATA_NOT_EXIST); + if (i18nList.isEmpty()) throw new AuthCustomerException(ResultCodeEnum.DATA_NOT_EXIST); // 保存内容 I18n i18n = new I18n(); @@ -136,7 +136,7 @@ public class I18nServiceImpl extends ServiceImpl implements I1 @CacheEvict(cacheNames = "i18n", key = "'i18n'", beforeInvocation = true) public void deleteI18n(List ids) { // 判断数据请求是否为空 - if (ids.isEmpty()) throw new BunnyException(ResultCodeEnum.REQUEST_IS_EMPTY); + if (ids.isEmpty()) throw new AuthCustomerException(ResultCodeEnum.REQUEST_IS_EMPTY); baseMapper.deleteBatchIdsWithPhysics(ids); } diff --git a/service/src/main/java/cn/bunny/services/service/impl/I18nTypeServiceImpl.java b/service/src/main/java/cn/bunny/services/service/impl/I18nTypeServiceImpl.java index ecd021c..77b3194 100644 --- a/service/src/main/java/cn/bunny/services/service/impl/I18nTypeServiceImpl.java +++ b/service/src/main/java/cn/bunny/services/service/impl/I18nTypeServiceImpl.java @@ -1,6 +1,6 @@ package cn.bunny.services.service.impl; -import cn.bunny.common.service.exception.BunnyException; +import cn.bunny.common.service.exception.AuthCustomerException; import cn.bunny.dao.dto.i18n.I18nTypeAddDto; import cn.bunny.dao.dto.i18n.I18nTypeDto; import cn.bunny.dao.dto.i18n.I18nTypeUpdateDto; @@ -61,7 +61,7 @@ public class I18nTypeServiceImpl extends ServiceImpl i // 查询添加的数据是否之前添加过 List i18nTypeList = list(Wrappers.lambdaQuery().eq(I18nType::getTypeName, typeName)); - if (!i18nTypeList.isEmpty()) throw new BunnyException(ResultCodeEnum.DATA_EXIST); + if (!i18nTypeList.isEmpty()) throw new AuthCustomerException(ResultCodeEnum.DATA_EXIST); // 如果是默认,将其它内容设为false if (isDefault) { @@ -89,7 +89,7 @@ public class I18nTypeServiceImpl extends ServiceImpl i // 查询更新的内容是否存在 List i18nTypeList = list(Wrappers.lambdaQuery().eq(I18nType::getId, id)); - if (i18nTypeList.isEmpty()) throw new BunnyException(ResultCodeEnum.DATA_NOT_EXIST); + if (i18nTypeList.isEmpty()) throw new AuthCustomerException(ResultCodeEnum.DATA_NOT_EXIST); // 如果是默认,将其它内容设为false if (isDefault) { @@ -112,7 +112,7 @@ public class I18nTypeServiceImpl extends ServiceImpl i @CacheEvict(cacheNames = "i18n", key = "'i18nType'", beforeInvocation = true) public void deleteI18nType(List ids) { // 判断数据请求是否为空 - if (ids.isEmpty()) throw new BunnyException(ResultCodeEnum.REQUEST_IS_EMPTY); + if (ids.isEmpty()) throw new AuthCustomerException(ResultCodeEnum.REQUEST_IS_EMPTY); baseMapper.deleteBatchIdsWithPhysics(ids); } diff --git a/service/src/main/java/cn/bunny/services/service/impl/MenuIconServiceImpl.java b/service/src/main/java/cn/bunny/services/service/impl/MenuIconServiceImpl.java index 9d2c916..eebe26c 100644 --- a/service/src/main/java/cn/bunny/services/service/impl/MenuIconServiceImpl.java +++ b/service/src/main/java/cn/bunny/services/service/impl/MenuIconServiceImpl.java @@ -1,6 +1,6 @@ package cn.bunny.services.service.impl; -import cn.bunny.common.service.exception.BunnyException; +import cn.bunny.common.service.exception.AuthCustomerException; import cn.bunny.dao.dto.system.menuIcon.MenuIconAddDto; import cn.bunny.dao.dto.system.menuIcon.MenuIconDto; import cn.bunny.dao.dto.system.menuIcon.MenuIconUpdateDto; @@ -105,7 +105,7 @@ public class MenuIconServiceImpl extends ServiceImpl i @CacheEvict(cacheNames = "menuIcon", key = "'menuIconList'", beforeInvocation = true) public void deleteMenuIcon(List ids) { // 判断数据请求是否为空 - if (ids.isEmpty()) throw new BunnyException(ResultCodeEnum.REQUEST_IS_EMPTY); + if (ids.isEmpty()) throw new AuthCustomerException(ResultCodeEnum.REQUEST_IS_EMPTY); baseMapper.deleteBatchIdsWithPhysics(ids); } diff --git a/service/src/main/java/cn/bunny/services/service/impl/MessageReceivedServiceImpl.java b/service/src/main/java/cn/bunny/services/service/impl/MessageReceivedServiceImpl.java index 8465bb8..2e7c066 100644 --- a/service/src/main/java/cn/bunny/services/service/impl/MessageReceivedServiceImpl.java +++ b/service/src/main/java/cn/bunny/services/service/impl/MessageReceivedServiceImpl.java @@ -1,7 +1,7 @@ package cn.bunny.services.service.impl; import cn.bunny.common.service.context.BaseContext; -import cn.bunny.common.service.exception.BunnyException; +import cn.bunny.common.service.exception.AuthCustomerException; import cn.bunny.dao.dto.system.message.MessageReceivedDto; import cn.bunny.dao.dto.system.message.MessageReceivedUpdateDto; import cn.bunny.dao.dto.system.message.MessageUserDto; @@ -133,7 +133,7 @@ public class MessageReceivedServiceImpl extends ServiceImpl ids) { // 判断ids是否为空 if (ids.isEmpty()) { - throw new BunnyException(ResultCodeEnum.REQUEST_IS_EMPTY); + throw new AuthCustomerException(ResultCodeEnum.REQUEST_IS_EMPTY); } // 更新表中消息状态 @@ -156,14 +156,14 @@ public class MessageReceivedServiceImpl extends ServiceImpl ids) { // 判断ids是否为空 if (ids.isEmpty()) { - throw new BunnyException(ResultCodeEnum.REQUEST_IS_EMPTY); + throw new AuthCustomerException(ResultCodeEnum.REQUEST_IS_EMPTY); } // 判断删除的是否是自己的消息 List messageReceivedList = list(Wrappers.lambdaQuery().in(MessageReceived::getReceivedUserId, ids)); messageReceivedList.forEach(messageReceived -> { if (!messageReceived.getReceivedUserId().equals(BaseContext.getUserId())) { - throw new BunnyException(ResultCodeEnum.ILLEGAL_DATA_REQUEST); + throw new AuthCustomerException(ResultCodeEnum.ILLEGAL_DATA_REQUEST); } }); diff --git a/service/src/main/java/cn/bunny/services/service/impl/MessageServiceImpl.java b/service/src/main/java/cn/bunny/services/service/impl/MessageServiceImpl.java index 165e3c1..1295a27 100644 --- a/service/src/main/java/cn/bunny/services/service/impl/MessageServiceImpl.java +++ b/service/src/main/java/cn/bunny/services/service/impl/MessageServiceImpl.java @@ -1,7 +1,7 @@ package cn.bunny.services.service.impl; import cn.bunny.common.service.context.BaseContext; -import cn.bunny.common.service.exception.BunnyException; +import cn.bunny.common.service.exception.AuthCustomerException; import cn.bunny.dao.common.entity.BaseEntity; import cn.bunny.dao.dto.system.message.MessageAddDto; import cn.bunny.dao.dto.system.message.MessageDto; @@ -131,7 +131,7 @@ public class MessageServiceImpl extends ServiceImpl impl @Override public List getReceivedUserinfoByMessageId(Long messageId) { if (messageId == null) { - throw new BunnyException(ResultCodeEnum.REQUEST_IS_EMPTY); + throw new AuthCustomerException(ResultCodeEnum.REQUEST_IS_EMPTY); } return baseMapper.selectUserinfoListByMessageId(messageId); } diff --git a/service/src/main/java/cn/bunny/services/service/impl/PowerServiceImpl.java b/service/src/main/java/cn/bunny/services/service/impl/PowerServiceImpl.java index 7d66419..621890e 100644 --- a/service/src/main/java/cn/bunny/services/service/impl/PowerServiceImpl.java +++ b/service/src/main/java/cn/bunny/services/service/impl/PowerServiceImpl.java @@ -1,6 +1,6 @@ package cn.bunny.services.service.impl; -import cn.bunny.common.service.exception.BunnyException; +import cn.bunny.common.service.exception.AuthCustomerException; import cn.bunny.dao.dto.system.rolePower.power.PowerAddDto; import cn.bunny.dao.dto.system.rolePower.power.PowerDto; import cn.bunny.dao.dto.system.rolePower.power.PowerUpdateBatchByParentIdDto; @@ -91,7 +91,7 @@ public class PowerServiceImpl extends ServiceImpl implements .or() .eq(Power::getRequestUrl, dto.getRequestUrl()); List powerList = list(wrapper); - if (!powerList.isEmpty()) throw new BunnyException(ResultCodeEnum.DATA_EXIST); + if (!powerList.isEmpty()) throw new AuthCustomerException(ResultCodeEnum.DATA_EXIST); // 保存数据 Power power = new Power(); @@ -109,8 +109,8 @@ public class PowerServiceImpl extends ServiceImpl implements public void updatePower(@Valid PowerUpdateDto dto) { Long id = dto.getId(); List powerList = list(Wrappers.lambdaQuery().eq(Power::getId, id)); - if (powerList.isEmpty()) throw new BunnyException(ResultCodeEnum.DATA_NOT_EXIST); - if (dto.getId().equals(dto.getParentId())) throw new BunnyException(ResultCodeEnum.ILLEGAL_DATA_REQUEST); + if (powerList.isEmpty()) throw new AuthCustomerException(ResultCodeEnum.DATA_NOT_EXIST); + if (dto.getId().equals(dto.getParentId())) throw new AuthCustomerException(ResultCodeEnum.ILLEGAL_DATA_REQUEST); // 更新内容 Power power = new Power(); @@ -127,7 +127,7 @@ public class PowerServiceImpl extends ServiceImpl implements @CacheEvict(cacheNames = "power", key = "'allPower'", beforeInvocation = true) public void deletePower(List ids) { // 判断数据请求是否为空 - if (ids.isEmpty()) throw new BunnyException(ResultCodeEnum.REQUEST_IS_EMPTY); + if (ids.isEmpty()) throw new AuthCustomerException(ResultCodeEnum.REQUEST_IS_EMPTY); // 删除权限 baseMapper.deleteBatchIdsWithPhysics(ids); diff --git a/service/src/main/java/cn/bunny/services/service/impl/RoleServiceImpl.java b/service/src/main/java/cn/bunny/services/service/impl/RoleServiceImpl.java index a08a1a3..27362a6 100644 --- a/service/src/main/java/cn/bunny/services/service/impl/RoleServiceImpl.java +++ b/service/src/main/java/cn/bunny/services/service/impl/RoleServiceImpl.java @@ -1,6 +1,6 @@ package cn.bunny.services.service.impl; -import cn.bunny.common.service.exception.BunnyException; +import cn.bunny.common.service.exception.AuthCustomerException; import cn.bunny.dao.dto.system.rolePower.role.RoleAddDto; import cn.bunny.dao.dto.system.rolePower.role.RoleDto; import cn.bunny.dao.dto.system.rolePower.role.RoleUpdateDto; @@ -108,7 +108,7 @@ public class RoleServiceImpl extends ServiceImpl implements Ro public void updateRole(@Valid RoleUpdateDto dto) { // 查询更新的角色是否存在 List roleList = list(Wrappers.lambdaQuery().eq(Role::getId, dto.getId())); - if (roleList.isEmpty()) throw new BunnyException(ResultCodeEnum.DATA_NOT_EXIST); + if (roleList.isEmpty()) throw new AuthCustomerException(ResultCodeEnum.DATA_NOT_EXIST); // 更新内容 Role role = new Role(); @@ -131,7 +131,7 @@ public class RoleServiceImpl extends ServiceImpl implements Ro @CacheEvict(cacheNames = "role", key = "'allRole'", beforeInvocation = true) public void deleteRole(List ids) { // 判断数据请求是否为空 - if (ids.isEmpty()) throw new BunnyException(ResultCodeEnum.REQUEST_IS_EMPTY); + if (ids.isEmpty()) throw new AuthCustomerException(ResultCodeEnum.REQUEST_IS_EMPTY); // 删除角色 baseMapper.deleteBatchIdsWithPhysics(ids); diff --git a/service/src/main/java/cn/bunny/services/service/impl/RouterRoleServiceImpl.java b/service/src/main/java/cn/bunny/services/service/impl/RouterRoleServiceImpl.java index 61b9a67..cdd7bb6 100644 --- a/service/src/main/java/cn/bunny/services/service/impl/RouterRoleServiceImpl.java +++ b/service/src/main/java/cn/bunny/services/service/impl/RouterRoleServiceImpl.java @@ -1,6 +1,6 @@ package cn.bunny.services.service.impl; -import cn.bunny.common.service.exception.BunnyException; +import cn.bunny.common.service.exception.AuthCustomerException; import cn.bunny.dao.dto.system.router.AssignRolesToRoutersDto; import cn.bunny.dao.entity.system.RouterRole; import cn.bunny.dao.pojo.result.ResultCodeEnum; @@ -76,7 +76,7 @@ public class RouterRoleServiceImpl extends ServiceImpl routerIds) { if (routerIds.isEmpty()) { - throw new BunnyException(ResultCodeEnum.REQUEST_IS_EMPTY); + throw new AuthCustomerException(ResultCodeEnum.REQUEST_IS_EMPTY); } baseMapper.deleteBatchIdsByRouterIdsWithPhysics(routerIds); } diff --git a/service/src/main/java/cn/bunny/services/service/impl/RouterServiceImpl.java b/service/src/main/java/cn/bunny/services/service/impl/RouterServiceImpl.java index f63f645..4f62055 100644 --- a/service/src/main/java/cn/bunny/services/service/impl/RouterServiceImpl.java +++ b/service/src/main/java/cn/bunny/services/service/impl/RouterServiceImpl.java @@ -1,7 +1,7 @@ package cn.bunny.services.service.impl; import cn.bunny.common.service.context.BaseContext; -import cn.bunny.common.service.exception.BunnyException; +import cn.bunny.common.service.exception.AuthCustomerException; import cn.bunny.dao.dto.system.router.RouterAddDto; import cn.bunny.dao.dto.system.router.RouterManageDto; import cn.bunny.dao.dto.system.router.RouterUpdateByIdWithRankDto; @@ -222,7 +222,7 @@ public class RouterServiceImpl extends ServiceImpl impleme // 设置路由等级需要大于或等于父级的路由等级 if (routerParent != null && (dto.getRouterRank() < routerParent.getRouterRank())) { - throw new BunnyException(ResultCodeEnum.ROUTER_RANK_NEED_LARGER_THAN_THE_PARENT); + throw new AuthCustomerException(ResultCodeEnum.ROUTER_RANK_NEED_LARGER_THAN_THE_PARENT); } // 如果设置的不是外部页面 @@ -241,7 +241,7 @@ public class RouterServiceImpl extends ServiceImpl impleme @Override public void deletedMenuByIds(List ids) { // 判断数据请求是否为空 - if (ids.isEmpty()) throw new BunnyException(ResultCodeEnum.REQUEST_IS_EMPTY); + if (ids.isEmpty()) throw new AuthCustomerException(ResultCodeEnum.REQUEST_IS_EMPTY); // 查找子级菜单,一起删除 List longList = list(Wrappers.lambdaQuery().in(Router::getParentId, ids)).stream().map(Router::getId).toList(); @@ -264,14 +264,14 @@ public class RouterServiceImpl extends ServiceImpl impleme Router router = getOne(Wrappers.lambdaQuery().eq(Router::getId, dto.getId())); // 判断更新数据是否存在 - if (router == null) throw new BunnyException(ResultCodeEnum.DATA_NOT_EXIST); + if (router == null) throw new AuthCustomerException(ResultCodeEnum.DATA_NOT_EXIST); // 查询当前路由和父级路由 Router routerParent = getOne(Wrappers.lambdaQuery().eq(Router::getId, router.getParentId())); // 设置路由等级需要大于或等于父级的路由等级 if (routerParent != null && (dto.getRouterRank() < routerParent.getRouterRank())) { - throw new BunnyException(ResultCodeEnum.ROUTER_RANK_NEED_LARGER_THAN_THE_PARENT); + throw new AuthCustomerException(ResultCodeEnum.ROUTER_RANK_NEED_LARGER_THAN_THE_PARENT); } // 更新排序 diff --git a/service/src/main/java/cn/bunny/services/service/impl/SchedulersServiceImpl.java b/service/src/main/java/cn/bunny/services/service/impl/SchedulersServiceImpl.java index b10d965..21122d8 100644 --- a/service/src/main/java/cn/bunny/services/service/impl/SchedulersServiceImpl.java +++ b/service/src/main/java/cn/bunny/services/service/impl/SchedulersServiceImpl.java @@ -1,6 +1,6 @@ package cn.bunny.services.service.impl; -import cn.bunny.common.service.exception.BunnyException; +import cn.bunny.common.service.exception.AuthCustomerException; import cn.bunny.dao.dto.quartz.SchedulersOperationDto; import cn.bunny.dao.dto.quartz.schedule.SchedulersAddDto; import cn.bunny.dao.dto.quartz.schedule.SchedulersDto; @@ -134,7 +134,7 @@ public class SchedulersServiceImpl extends ServiceImpl i */ @Override public List getRoleListByUserId(Long userId) { - if (userId == null) throw new BunnyException(ResultCodeEnum.REQUEST_IS_EMPTY); + if (userId == null) throw new AuthCustomerException(ResultCodeEnum.REQUEST_IS_EMPTY); List userRoles = userRoleMapper.selectList(Wrappers.lambdaQuery().eq(UserRole::getUserId, userId)); return userRoles.stream().map(userRole -> userRole.getRoleId().toString()).toList(); @@ -73,7 +73,7 @@ public class UserRoleServiceImpl extends ServiceImpl i // 查询当前用户 AdminUser adminUser = userMapper.selectOne(Wrappers.lambdaQuery().eq(AdminUser::getId, userId)); if (adminUser == null) { - throw new BunnyException(ResultCodeEnum.USER_IS_EMPTY); + throw new AuthCustomerException(ResultCodeEnum.USER_IS_EMPTY); } // 删除这个用户下所有已经分配好的角色内容 diff --git a/service/src/main/java/cn/bunny/services/service/impl/UserServiceImpl.java b/service/src/main/java/cn/bunny/services/service/impl/UserServiceImpl.java index b5b3a02..8bdda76 100644 --- a/service/src/main/java/cn/bunny/services/service/impl/UserServiceImpl.java +++ b/service/src/main/java/cn/bunny/services/service/impl/UserServiceImpl.java @@ -1,7 +1,7 @@ package cn.bunny.services.service.impl; import cn.bunny.common.service.context.BaseContext; -import cn.bunny.common.service.exception.BunnyException; +import cn.bunny.common.service.exception.AuthCustomerException; import cn.bunny.common.service.utils.JwtHelper; import cn.bunny.common.service.utils.ip.IpUtil; import cn.bunny.dao.dto.system.files.FileUploadDto; @@ -129,8 +129,8 @@ public class UserServiceImpl extends ServiceImpl implemen Long userId = JwtHelper.getUserId(dto.getRefreshToken()); AdminUser adminUser = getOne(Wrappers.lambdaQuery().eq(AdminUser::getId, userId)); - if (adminUser == null) throw new BunnyException(ResultCodeEnum.USER_IS_EMPTY); - if (adminUser.getStatus()) throw new BunnyException(ResultCodeEnum.FAIL_NO_ACCESS_DENIED_USER_LOCKED); + if (adminUser == null) throw new AuthCustomerException(ResultCodeEnum.USER_IS_EMPTY); + if (adminUser.getStatus()) throw new AuthCustomerException(ResultCodeEnum.FAIL_NO_ACCESS_DENIED_USER_LOCKED); LoginVo buildUserVo = userFactory.buildLoginUserVo(adminUser, dto.getReadMeDay()); RefreshTokenVo refreshTokenVo = new RefreshTokenVo(); @@ -171,11 +171,11 @@ public class UserServiceImpl extends ServiceImpl implemen @Override public UserVo getUserinfoById(Long id) { // 判断请求Id是否为空 - if (id == null) throw new BunnyException(ResultCodeEnum.REQUEST_IS_EMPTY); + if (id == null) throw new AuthCustomerException(ResultCodeEnum.REQUEST_IS_EMPTY); AdminUser user = getById(id); // 用户是否存在 - if (user == null) throw new BunnyException(ResultCodeEnum.DATA_NOT_EXIST); + if (user == null) throw new AuthCustomerException(ResultCodeEnum.DATA_NOT_EXIST); // 用户头像 String avatar = user.getAvatar(); @@ -201,11 +201,11 @@ public class UserServiceImpl extends ServiceImpl implemen AdminUser adminUser = getOne(Wrappers.lambdaQuery().eq(AdminUser::getId, userId)); // 判断是否存在这个用户 - if (adminUser == null) throw new BunnyException(ResultCodeEnum.USER_IS_EMPTY); + if (adminUser == null) throw new AuthCustomerException(ResultCodeEnum.USER_IS_EMPTY); // 判断新密码是否与旧密码相同 if (adminUser.getPassword().equals(md5Password)) - throw new BunnyException(ResultCodeEnum.UPDATE_NEW_PASSWORD_SAME_AS_OLD_PASSWORD); + throw new AuthCustomerException(ResultCodeEnum.UPDATE_NEW_PASSWORD_SAME_AS_OLD_PASSWORD); // 更新用户密码 adminUser = new AdminUser(); @@ -230,7 +230,7 @@ public class UserServiceImpl extends ServiceImpl implemen // 判断是否存在这个用户 AdminUser user = getOne(Wrappers.lambdaQuery().eq(AdminUser::getId, userId)); - if (user == null) throw new BunnyException(ResultCodeEnum.USER_IS_EMPTY); + if (user == null) throw new AuthCustomerException(ResultCodeEnum.USER_IS_EMPTY); // 上传头像 FileUploadDto uploadDto = FileUploadDto.builder().file(avatar).type(MinioConstant.avatar).build(); @@ -254,7 +254,7 @@ public class UserServiceImpl extends ServiceImpl implemen */ @Override public void forcedOffline(Long id) { - if (id == null) throw new BunnyException(ResultCodeEnum.REQUEST_IS_EMPTY); + if (id == null) throw new AuthCustomerException(ResultCodeEnum.REQUEST_IS_EMPTY); // 根据id查询用户登录前缀 AdminUser adminUser = getOne(Wrappers.lambdaQuery().eq(AdminUser::getId, id)); @@ -340,7 +340,7 @@ public class UserServiceImpl extends ServiceImpl implemen // 判断是否存在这个用户 AdminUser user = getOne(Wrappers.lambdaQuery().eq(AdminUser::getId, userId)); - if (user == null) throw new BunnyException(ResultCodeEnum.USER_IS_EMPTY); + if (user == null) throw new AuthCustomerException(ResultCodeEnum.USER_IS_EMPTY); // 检查用户头像 dto.setAvatar(userFactory.checkPostUserAvatar(dto.getAvatar())); @@ -368,14 +368,14 @@ public class UserServiceImpl extends ServiceImpl implemen AdminUser adminUser = getOne(Wrappers.lambdaQuery().eq(AdminUser::getId, userId)); // 判断用户是否存在 - if (adminUser == null) throw new BunnyException(ResultCodeEnum.USER_IS_EMPTY); + if (adminUser == null) throw new AuthCustomerException(ResultCodeEnum.USER_IS_EMPTY); // 数据库中的密码 String dbPassword = adminUser.getPassword(); password = DigestUtils.md5DigestAsHex(password.getBytes()); // 判断数据库中密码是否和更新用户密码相同 - if (dbPassword.equals(password)) throw new BunnyException(ResultCodeEnum.NEW_PASSWORD_SAME_OLD_PASSWORD); + if (dbPassword.equals(password)) throw new AuthCustomerException(ResultCodeEnum.NEW_PASSWORD_SAME_OLD_PASSWORD); // 更新用户密码 adminUser = new AdminUser(); @@ -462,7 +462,7 @@ public class UserServiceImpl extends ServiceImpl implemen // 判断更新内容是否存在 AdminUser adminUser = getOne(Wrappers.lambdaQuery().eq(AdminUser::getId, userId)); - if (adminUser == null) throw new BunnyException(ResultCodeEnum.DATA_NOT_EXIST); + if (adminUser == null) throw new AuthCustomerException(ResultCodeEnum.DATA_NOT_EXIST); // 如果更新了用户名,删除之前的用户数据 if (!dto.getUsername().equals(adminUser.getUsername())) { @@ -499,12 +499,12 @@ public class UserServiceImpl extends ServiceImpl implemen @Override public void deleteAdminUser(List ids) { // 判断数据请求是否为空 - if (ids.isEmpty()) throw new BunnyException(ResultCodeEnum.REQUEST_IS_EMPTY); + if (ids.isEmpty()) throw new AuthCustomerException(ResultCodeEnum.REQUEST_IS_EMPTY); // 根据用户Id列表查询用户角色 List list = roleMapper.selectListByUserIds(ids); List roleList = list.stream().filter(role -> role.getRoleCode().equals("admin") || ids.contains(1L)).toList(); - if (!roleList.isEmpty()) throw new BunnyException(ResultCodeEnum.ADMIN_ROLE_CAN_NOT_DELETED); + if (!roleList.isEmpty()) throw new AuthCustomerException(ResultCodeEnum.ADMIN_ROLE_CAN_NOT_DELETED); // 逻辑删除 removeBatchByIds(ids);