This commit is contained in:
2023-03-04 16:29:55 +08:00
commit 397ba75479
1007 changed files with 109050 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
package com.jsowell.common.exception;
import com.jsowell.common.enums.ykc.ReturnCodeEnum;
import lombok.Data;
@Data
public class BusinessException extends RuntimeException{
private static final long serialVersionUID = 1L;
/**
* 错误码
*/
private String code;
/**
* 错误提示
*/
private String message;
public BusinessException(ReturnCodeEnum returnCodeEnum) {
this.code = returnCodeEnum.getValue();
this.message = returnCodeEnum.getLabel();
}
public BusinessException(String code, String message) {
this.code = code;
this.message = message;
}
}