·1
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.lideeyunji</groupId>
|
||||
<artifactId>lidee-tool</artifactId>
|
||||
<version>2.2.4</version>
|
||||
</parent>
|
||||
<groupId>com.lideeyunji</groupId>
|
||||
<artifactId>tool-spring-boot-starter-exception</artifactId>
|
||||
<version>2.2.4</version>
|
||||
<name>${project.artifactId}</name>
|
||||
<description>异常模块相关</description>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.lideeyunji</groupId>
|
||||
<artifactId>tool-common</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
29
lidee-tool/tool-spring-boot-starter-exception/pom.xml
Normal file
29
lidee-tool/tool-spring-boot-starter-exception/pom.xml
Normal file
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>lidee-tool</artifactId>
|
||||
<groupId>com.lideeyunji</groupId>
|
||||
<version>${lidee.version}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>tool-spring-boot-starter-exception</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>${project.artifactId}</name>
|
||||
<description>
|
||||
异常模块相关
|
||||
</description>
|
||||
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.lideeyunji</groupId>
|
||||
<artifactId>tool-common</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,29 @@
|
||||
|
||||
package com.lideeyunji.tool.framework.code;
|
||||
|
||||
/**
|
||||
*/
|
||||
public class lideeYunJiErrorCode {
|
||||
|
||||
/**
|
||||
* 错误码
|
||||
*/
|
||||
private final Integer code;
|
||||
/**
|
||||
* 错误提示
|
||||
*/
|
||||
private final String msg;
|
||||
|
||||
public lideeYunJiErrorCode(Integer code, String message) {
|
||||
this.code = code;
|
||||
this.msg = message;
|
||||
}
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
|
||||
package com.lideeyunji.tool.framework.constants;
|
||||
|
||||
import com.lideeyunji.tool.framework.code.lideeYunJiErrorCode;
|
||||
|
||||
/**
|
||||
* 框架 错误码枚举类
|
||||
* <p>
|
||||
* 低代码 系统,使用 6-001-000-000 段
|
||||
*/
|
||||
public interface FrameErrorCodeConstants {
|
||||
|
||||
lideeYunJiErrorCode SUCCESS = new lideeYunJiErrorCode(0, "成功");
|
||||
|
||||
// ========== 框架相关 6-001-001-000 ============
|
||||
lideeYunJiErrorCode FRAME_PARAM_ERROR = new lideeYunJiErrorCode(1_600_001_000, "系统开小差了");
|
||||
lideeYunJiErrorCode FRAME_NOT_ROLE_ERROR = new lideeYunJiErrorCode(1_600_011_000, "无权限访问");
|
||||
|
||||
lideeYunJiErrorCode FRAM_SELF_ERROR = new lideeYunJiErrorCode(1_600_001_001, "自定义错误");
|
||||
lideeYunJiErrorCode FRAME_ISNOT_ADMINISTOR_ERROR = new lideeYunJiErrorCode(1_600_001_002, "该功能只允许超级管理员操作");
|
||||
|
||||
|
||||
lideeYunJiErrorCode FRAME_OP_ERROR = new lideeYunJiErrorCode(1_600_001_003, "操作失败");
|
||||
lideeYunJiErrorCode FRAME_ENHANCE_ERROR = new lideeYunJiErrorCode(1_600_001_004, "增强已锁");
|
||||
lideeYunJiErrorCode FRAME_LOGIN_VIEW_ERROR = new lideeYunJiErrorCode(1_600_001_005,"用户未登录");
|
||||
|
||||
lideeYunJiErrorCode FRAME_TABLE_NAME_ILLEGAL= new lideeYunJiErrorCode(1_600_001_006,"表名称不符合");
|
||||
lideeYunJiErrorCode FRAME_DESFORM_CORE_ISEXIT_ERROR = new lideeYunJiErrorCode(1_600_001_07,"编码已存在");
|
||||
lideeYunJiErrorCode FRAME_PARAM_NULL_ERROR = new lideeYunJiErrorCode(1_600_001_08,"参数不允许为空");
|
||||
lideeYunJiErrorCode FRAME_MAIN_TABLE_NOT = new lideeYunJiErrorCode(1_600_001_09,"绑定的主表不存在");
|
||||
lideeYunJiErrorCode FRAME_IMPORT_EXCEL = new lideeYunJiErrorCode(1_600_001_10,"请使用正确的Excel表导入数据");
|
||||
lideeYunJiErrorCode FRAME_DESFORM_IS_OPEN = new lideeYunJiErrorCode(1_600_001_11,"该表单需要登录才可访问");
|
||||
|
||||
lideeYunJiErrorCode FRAME_IMPORT_EXCEL_NOT_DATA = new lideeYunJiErrorCode(1_600_001_12,"数据不存在");
|
||||
lideeYunJiErrorCode FRAME_IMPORT_EXCEL_STATE_ERROR = new lideeYunJiErrorCode(1_600_001_13,"表状态不符合");
|
||||
lideeYunJiErrorCode FRAME_CORE_EXIT = new lideeYunJiErrorCode(1_600_001_14,"编号已存在");
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
package com.lideeyunji.tool.framework.exception;
|
||||
|
||||
/**
|
||||
* 自定义异常
|
||||
*/
|
||||
public class lideeYunJiException extends RuntimeException {
|
||||
public lideeYunJiException(String message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
|
||||
package com.lideeyunji.tool.framework.exception;
|
||||
|
||||
|
||||
import cn.hutool.json.JSONUtil;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 自定义异常-详细错误信息
|
||||
*/
|
||||
public class lideeYunJiMoreException extends RuntimeException {
|
||||
public lideeYunJiMoreException(String title, String message) {
|
||||
if(message==null){
|
||||
message="";
|
||||
}
|
||||
if(message.startsWith("\r\n")){
|
||||
message=message.substring(2);
|
||||
}
|
||||
|
||||
Map<String,String> map=new HashMap<>();
|
||||
map.put("title",title);
|
||||
map.put("e",message);
|
||||
String jsonStr = JSONUtil.toJsonStr(map);
|
||||
throw new lideeYunJiMoreException(jsonStr);
|
||||
}
|
||||
private lideeYunJiMoreException(String message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,3 @@
|
||||
artifactId=tool-spring-boot-starter-exception
|
||||
groupId=com.lideeyunji
|
||||
version=2.2.4
|
||||
@@ -0,0 +1,4 @@
|
||||
com\lideeyunji\tool\framework\constants\FrameErrorCodeConstants.class
|
||||
com\lideeyunji\tool\framework\exception\lideeYunJiException.class
|
||||
com\lideeyunji\tool\framework\code\lideeYunJiErrorCode.class
|
||||
com\lideeyunji\tool\framework\exception\lideeYunJiMoreException.class
|
||||
@@ -0,0 +1,4 @@
|
||||
C:\Users\Dongpx\Desktop\java工作\hngryy_report\java\lidee-tool\tool-spring-boot-starter-exception\src\main\java\com\lideeyunji\tool\framework\code\lideeYunJiErrorCode.java
|
||||
C:\Users\Dongpx\Desktop\java工作\hngryy_report\java\lidee-tool\tool-spring-boot-starter-exception\src\main\java\com\lideeyunji\tool\framework\constants\FrameErrorCodeConstants.java
|
||||
C:\Users\Dongpx\Desktop\java工作\hngryy_report\java\lidee-tool\tool-spring-boot-starter-exception\src\main\java\com\lideeyunji\tool\framework\exception\lideeYunJiException.java
|
||||
C:\Users\Dongpx\Desktop\java工作\hngryy_report\java\lidee-tool\tool-spring-boot-starter-exception\src\main\java\com\lideeyunji\tool\framework\exception\lideeYunJiMoreException.java
|
||||
Binary file not shown.
Reference in New Issue
Block a user