master
parent
01ed6e46ff
commit
2323b23ebd
@ -0,0 +1,17 @@
|
||||
package com.ms.biz.exception;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
abstract public class BaseRuntimeException extends RuntimeException {
|
||||
protected String code;
|
||||
public BaseRuntimeException() {
|
||||
super();
|
||||
}
|
||||
|
||||
public BaseRuntimeException(String message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.ms.biz.exception;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class BindMemberNotExistsException extends BaseRuntimeException {
|
||||
protected String code = "100501";
|
||||
|
||||
public BindMemberNotExistsException() {
|
||||
super("当前没有绑定的账号信息,请重试");
|
||||
}
|
||||
|
||||
public BindMemberNotExistsException(String message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.ms.biz.exception;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class BusinessException extends BaseRuntimeException {
|
||||
protected String code = "100004";
|
||||
|
||||
public BusinessException(String message, String code) {
|
||||
super(message);
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public BusinessException(String message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.ms.biz.exception;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class MemberAlreadyUnbindException extends BaseRuntimeException {
|
||||
protected String code = "100401";
|
||||
|
||||
public MemberAlreadyUnbindException() {
|
||||
super("当前已解绑,无需再次解绑");
|
||||
}
|
||||
|
||||
public MemberAlreadyUnbindException(String message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue