diff --git a/sky-common/src/main/java/com/sky/common/exception/AccountLockedException.java b/sky-common/src/main/java/com/sky/common/exception/AccountLockedException.java new file mode 100644 index 0000000..02f7579 --- /dev/null +++ b/sky-common/src/main/java/com/sky/common/exception/AccountLockedException.java @@ -0,0 +1,18 @@ +package com.sky.common.exception; + +/** + * 账号被锁定异常 + */ +public class AccountLockedException extends BaseException{ + /** + * Constructs a new runtime exception with {@code null} as its + * detail message. The cause is not initialized, and may subsequently be + * initialized by a call to {@link #initCause}. + */ + public AccountLockedException() { + } + + public AccountLockedException(String message) { + super(message); + } +} diff --git a/sky-common/src/main/java/com/sky/common/exception/AccountNotFoundException.java b/sky-common/src/main/java/com/sky/common/exception/AccountNotFoundException.java new file mode 100644 index 0000000..61aa689 --- /dev/null +++ b/sky-common/src/main/java/com/sky/common/exception/AccountNotFoundException.java @@ -0,0 +1,18 @@ +package com.sky.common.exception; + +/** + * 账号不存在异常 + */ +public class AccountNotFoundException extends BaseException{ + /** + * Constructs a new runtime exception with {@code null} as its + * detail message. The cause is not initialized, and may subsequently be + * initialized by a call to {@link #initCause}. + */ + public AccountNotFoundException() { + } + + public AccountNotFoundException(String message) { + super(message); + } +} diff --git a/sky-common/src/main/java/com/sky/common/exception/AddressBookBusinessException.java b/sky-common/src/main/java/com/sky/common/exception/AddressBookBusinessException.java new file mode 100644 index 0000000..a7e23ed --- /dev/null +++ b/sky-common/src/main/java/com/sky/common/exception/AddressBookBusinessException.java @@ -0,0 +1,18 @@ +package com.sky.common.exception; + +/** + * 地址信息异常 + */ +public class AddressBookBusinessException extends BaseException{ + /** + * Constructs a new runtime exception with {@code null} as its + * detail message. The cause is not initialized, and may subsequently be + * initialized by a call to {@link #initCause}. + */ + public AddressBookBusinessException() { + } + + public AddressBookBusinessException(String message) { + super(message); + } +} diff --git a/sky-common/src/main/java/com/sky/common/exception/BaseException.java b/sky-common/src/main/java/com/sky/common/exception/BaseException.java new file mode 100644 index 0000000..1e6de94 --- /dev/null +++ b/sky-common/src/main/java/com/sky/common/exception/BaseException.java @@ -0,0 +1,17 @@ +package com.sky.common.exception; + +/** + * 业务异常 + */ +public class BaseException extends RuntimeException{ + /** + * Constructs a new runtime exception with {@code null} as its + * detail message. The cause is not initialized, and may subsequently be + * initialized by a call to {@link #initCause}. + */ + public BaseException() { + } + public BaseException(String message) { + super(message); + } +} diff --git a/sky-common/src/main/java/com/sky/common/exception/DeletionNotAllowedException.java b/sky-common/src/main/java/com/sky/common/exception/DeletionNotAllowedException.java new file mode 100644 index 0000000..6252fe5 --- /dev/null +++ b/sky-common/src/main/java/com/sky/common/exception/DeletionNotAllowedException.java @@ -0,0 +1,18 @@ +package com.sky.common.exception; + +/** + * 不允许删除异常 + */ +public class DeletionNotAllowedException extends BaseException{ + /** + * Constructs a new runtime exception with {@code null} as its + * detail message. The cause is not initialized, and may subsequently be + * initialized by a call to {@link #initCause}. + */ + public DeletionNotAllowedException() { + } + + public DeletionNotAllowedException(String message) { + super(message); + } +} diff --git a/sky-common/src/main/java/com/sky/common/exception/LoginFailedException.java b/sky-common/src/main/java/com/sky/common/exception/LoginFailedException.java new file mode 100644 index 0000000..6846a9f --- /dev/null +++ b/sky-common/src/main/java/com/sky/common/exception/LoginFailedException.java @@ -0,0 +1,18 @@ +package com.sky.common.exception; + +/** + * 登录失败 + */ +public class LoginFailedException extends BaseException{ + /** + * Constructs a new runtime exception with {@code null} as its + * detail message. The cause is not initialized, and may subsequently be + * initialized by a call to {@link #initCause}. + */ + public LoginFailedException() { + } + + public LoginFailedException(String message) { + super(message); + } +} diff --git a/sky-common/src/main/java/com/sky/common/exception/OrderBusinessException.java b/sky-common/src/main/java/com/sky/common/exception/OrderBusinessException.java new file mode 100644 index 0000000..41db4d2 --- /dev/null +++ b/sky-common/src/main/java/com/sky/common/exception/OrderBusinessException.java @@ -0,0 +1,18 @@ +package com.sky.common.exception; + +/** + * 订单业务异常 + */ +public class OrderBusinessException extends BaseException{ + /** + * Constructs a new runtime exception with {@code null} as its + * detail message. The cause is not initialized, and may subsequently be + * initialized by a call to {@link #initCause}. + */ + public OrderBusinessException() { + } + + public OrderBusinessException(String message) { + super(message); + } +} diff --git a/sky-common/src/main/java/com/sky/common/exception/PasswordEditFailedException.java b/sky-common/src/main/java/com/sky/common/exception/PasswordEditFailedException.java new file mode 100644 index 0000000..5fd651d --- /dev/null +++ b/sky-common/src/main/java/com/sky/common/exception/PasswordEditFailedException.java @@ -0,0 +1,18 @@ +package com.sky.common.exception; + +/** + * 密码修改失败异常 + */ +public class PasswordEditFailedException extends BaseException{ + /** + * Constructs a new runtime exception with {@code null} as its + * detail message. The cause is not initialized, and may subsequently be + * initialized by a call to {@link #initCause}. + */ + public PasswordEditFailedException() { + } + + public PasswordEditFailedException(String message) { + super(message); + } +} diff --git a/sky-common/src/main/java/com/sky/common/exception/PasswordErrorException.java b/sky-common/src/main/java/com/sky/common/exception/PasswordErrorException.java new file mode 100644 index 0000000..0541da0 --- /dev/null +++ b/sky-common/src/main/java/com/sky/common/exception/PasswordErrorException.java @@ -0,0 +1,18 @@ +package com.sky.common.exception; + +/** + * 密码错误异常 + */ +public class PasswordErrorException extends BaseException{ + /** + * Constructs a new runtime exception with {@code null} as its + * detail message. The cause is not initialized, and may subsequently be + * initialized by a call to {@link #initCause}. + */ + public PasswordErrorException() { + } + + public PasswordErrorException(String message) { + super(message); + } +} diff --git a/sky-common/src/main/java/com/sky/common/exception/SetMealEnableFailedException.java b/sky-common/src/main/java/com/sky/common/exception/SetMealEnableFailedException.java new file mode 100644 index 0000000..f259b5e --- /dev/null +++ b/sky-common/src/main/java/com/sky/common/exception/SetMealEnableFailedException.java @@ -0,0 +1,18 @@ +package com.sky.common.exception; + +/** + * 套餐启用失败异常 + */ +public class SetMealEnableFailedException extends BaseException{ + /** + * Constructs a new runtime exception with {@code null} as its + * detail message. The cause is not initialized, and may subsequently be + * initialized by a call to {@link #initCause}. + */ + public SetMealEnableFailedException() { + } + + public SetMealEnableFailedException(String message) { + super(message); + } +} diff --git a/sky-common/src/main/java/com/sky/common/exception/ShoppingCartBusinessException.java b/sky-common/src/main/java/com/sky/common/exception/ShoppingCartBusinessException.java new file mode 100644 index 0000000..fc03222 --- /dev/null +++ b/sky-common/src/main/java/com/sky/common/exception/ShoppingCartBusinessException.java @@ -0,0 +1,18 @@ +package com.sky.common.exception; + +/** + * 购物车异常 + */ +public class ShoppingCartBusinessException extends BaseException{ + /** + * Constructs a new runtime exception with {@code null} as its + * detail message. The cause is not initialized, and may subsequently be + * initialized by a call to {@link #initCause}. + */ + public ShoppingCartBusinessException() { + } + + public ShoppingCartBusinessException(String message) { + super(message); + } +} diff --git a/sky-common/src/main/java/com/sky/common/exception/UserNotLoginException.java b/sky-common/src/main/java/com/sky/common/exception/UserNotLoginException.java new file mode 100644 index 0000000..7484f49 --- /dev/null +++ b/sky-common/src/main/java/com/sky/common/exception/UserNotLoginException.java @@ -0,0 +1,18 @@ +package com.sky.common.exception; + +/** + * 用户未登录异常 + */ +public class UserNotLoginException extends BaseException { + /** + * Constructs a new runtime exception with {@code null} as its + * detail message. The cause is not initialized, and may subsequently be + * initialized by a call to {@link #initCause}. + */ + public UserNotLoginException() { + } + + public UserNotLoginException(String message) { + super(message); + } +}