add:增加mapper生成

This commit is contained in:
2024-01-24 15:11:55 +08:00
parent b3da793a4c
commit 2c76a7447f
71 changed files with 5332 additions and 0 deletions

View File

@@ -0,0 +1,89 @@
package org.nl.modules.common.exception;
import org.nl.common.api.ResultCode;
/**
* 业务异常
*
* @author gbx
* @date 2022-03-21
*/
public class BizCoreException extends RuntimeException{
private static final long serialVersionUID = -430613633714952314L;
/**
* 错误描述生成错误响应时如果该值不为空则返回message否则返回code对象的描述值
*/
private String errorMsg;
private ResultCode code = ResultCode.FAILED;
/**
* 构造方法
*/
public BizCoreException(String message) {
super(message);
this.errorMsg = message;
}
/**
* 构造方法
*/
public BizCoreException(String message, ResultCode code) {
super(message);
this.errorMsg = message;
this.code = code;
}
/**
* 构造方法
*/
public BizCoreException(ResultCode code) {
super(code.getDesc());
this.code = code;
}
/**
* 构造方法
*/
public BizCoreException(String message, Throwable e) {
super(message, e);
this.errorMsg = message;
}
/**
* 构造方法
*/
public BizCoreException(String message, ResultCode code, Throwable e) {
super(message, e);
this.errorMsg = message;
this.code = code;
}
/**
* 构造方法
*/
public BizCoreException(Throwable e) {
super(e);
this.errorMsg = e.getMessage();
}
/**
* 构造方法
*/
public BizCoreException(ResultCode code, Throwable e) {
super(e);
this.code = code;
}
public ResultCode getCode() {
return code;
}
public void setCode(ResultCode code) {
this.code = code;
}
public String getErrorMsg() {
return this.errorMsg;
}
}