From afb088b35b01ceab763081810a6e964c23d0cef8 Mon Sep 17 00:00:00 2001 From: lidongdong <1459917685@qq.com> Date: 星期五, 23 九月 2022 15:37:37 +0800 Subject: [PATCH] 数据库迁移修改 --- flower_city/src/main/java/com/dg/core/exception/file/BaseException.java | 47 ++++++++++++++++------------------------------- 1 files changed, 16 insertions(+), 31 deletions(-) diff --git a/flower_city/src/main/java/com/dg/core/exception/base/BaseException.java b/flower_city/src/main/java/com/dg/core/exception/file/BaseException.java similarity index 64% rename from flower_city/src/main/java/com/dg/core/exception/base/BaseException.java rename to flower_city/src/main/java/com/dg/core/exception/file/BaseException.java index 07508ed..af21660 100644 --- a/flower_city/src/main/java/com/dg/core/exception/base/BaseException.java +++ b/flower_city/src/main/java/com/dg/core/exception/file/BaseException.java @@ -1,16 +1,13 @@ -package com.dg.core.exception.base; +package com.dg.core.exception.file; - -import com.dg.core.util.MessageUtils; import org.apache.commons.lang3.StringUtils; /** * 基础异常 - * - * @author ruoyi + * + * @author */ -public class BaseException extends RuntimeException -{ +public class BaseException extends RuntimeException { private static final long serialVersionUID = 1L; /** @@ -33,66 +30,54 @@ */ private String defaultMessage; - public BaseException(String module, String code, Object[] args, String defaultMessage) - { + public BaseException(String module, String code, Object[] args, String defaultMessage) { this.module = module; this.code = code; this.args = args; this.defaultMessage = defaultMessage; } - public BaseException(String module, String code, Object[] args) - { + public BaseException(String module, String code, Object[] args) { this(module, code, args, null); } - public BaseException(String module, String defaultMessage) - { + public BaseException(String module, String defaultMessage) { this(module, null, null, defaultMessage); } - public BaseException(String code, Object[] args) - { + public BaseException(String code, Object[] args) { this(null, code, args, null); } - public BaseException(String defaultMessage) - { + public BaseException(String defaultMessage) { this(null, null, null, defaultMessage); } @Override - public String getMessage() - { + public String getMessage() { String message = null; - if (!StringUtils.isEmpty(code)) - { + if (!StringUtils.isEmpty(code)) { message = MessageUtils.message(code, args); } - if (message == null) - { + if (message == null) { message = defaultMessage; } return message; } - public String getModule() - { + public String getModule() { return module; } - public String getCode() - { + public String getCode() { return code; } - public Object[] getArgs() - { + public Object[] getArgs() { return args; } - public String getDefaultMessage() - { + public String getDefaultMessage() { return defaultMessage; } } -- Gitblit v1.7.1