Skip to content

Commit 7034eeb

Browse files
committed
bug fix
1 parent 08adeb4 commit 7034eeb

File tree

11 files changed

+369
-288
lines changed

11 files changed

+369
-288
lines changed

src/main/java/com/luna/commons/domain/AjaxResult.java renamed to src/main/java/com/luna/commons/domain/ApiResult.java

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
* @author luna
1111
*/
12-
public class AjaxResult extends HashMap<String, Object> {
12+
public class ApiResult extends HashMap<String, Object> {
1313
private static final long serialVersionUID = 1L;
1414

1515
/**
@@ -56,29 +56,29 @@ public int value() {
5656
}
5757

5858
/**
59-
* 初始化一个新创建的 AjaxResult 对象,使其表示一个空消息。
59+
* 初始化一个新创建的 ApiResult 对象,使其表示一个空消息。
6060
*/
61-
public AjaxResult() {}
61+
public ApiResult() {}
6262

6363
/**
64-
* 初始化一个新创建的 AjaxResult 对象
64+
* 初始化一个新创建的 ApiResult 对象
6565
*
6666
* @param type 状态类型
6767
* @param msg 返回内容
6868
*/
69-
public AjaxResult(Type type, String msg) {
69+
public ApiResult(Type type, String msg) {
7070
super.put(CODE_TAG, type.value);
7171
super.put(MSG_TAG, msg);
7272
}
7373

7474
/**
75-
* 初始化一个新创建的 AjaxResult 对象
75+
* 初始化一个新创建的 ApiResult 对象
7676
*
7777
* @param type 状态类型
7878
* @param msg 返回内容
7979
* @param data 数据对象
8080
*/
81-
public AjaxResult(Type type, String msg, Object data) {
81+
public ApiResult(Type type, String msg, Object data) {
8282
super.put(CODE_TAG, type.value);
8383
super.put(MSG_TAG, msg);
8484
if (StringUtils.isNotNull(data)) {
@@ -91,17 +91,17 @@ public AjaxResult(Type type, String msg, Object data) {
9191
*
9292
* @return 成功消息
9393
*/
94-
public static AjaxResult success() {
95-
return AjaxResult.success("操作成功");
94+
public static ApiResult success() {
95+
return ApiResult.success("操作成功");
9696
}
9797

9898
/**
9999
* 返回成功数据
100100
*
101101
* @return 成功消息
102102
*/
103-
public static AjaxResult success(Object data) {
104-
return AjaxResult.success("操作成功", data);
103+
public static ApiResult success(Object data) {
104+
return ApiResult.success("操作成功", data);
105105
}
106106

107107
/**
@@ -110,8 +110,8 @@ public static AjaxResult success(Object data) {
110110
* @param msg 返回内容
111111
* @return 成功消息
112112
*/
113-
public static AjaxResult success(String msg) {
114-
return AjaxResult.success(msg, null);
113+
public static ApiResult success(String msg) {
114+
return ApiResult.success(msg, null);
115115
}
116116

117117
/**
@@ -121,8 +121,8 @@ public static AjaxResult success(String msg) {
121121
* @param data 数据对象
122122
* @return 成功消息
123123
*/
124-
public static AjaxResult success(String msg, Object data) {
125-
return new AjaxResult(Type.SUCCESS, msg, data);
124+
public static ApiResult success(String msg, Object data) {
125+
return new ApiResult(Type.SUCCESS, msg, data);
126126
}
127127

128128
/**
@@ -131,8 +131,8 @@ public static AjaxResult success(String msg, Object data) {
131131
* @param msg 返回内容
132132
* @return 警告消息
133133
*/
134-
public static AjaxResult warn(String msg) {
135-
return AjaxResult.warn(msg, null);
134+
public static ApiResult warn(String msg) {
135+
return ApiResult.warn(msg, null);
136136
}
137137

138138
/**
@@ -142,17 +142,17 @@ public static AjaxResult warn(String msg) {
142142
* @param data 数据对象
143143
* @return 警告消息
144144
*/
145-
public static AjaxResult warn(String msg, Object data) {
146-
return new AjaxResult(Type.WARN, msg, data);
145+
public static ApiResult warn(String msg, Object data) {
146+
return new ApiResult(Type.WARN, msg, data);
147147
}
148148

149149
/**
150150
* 返回错误消息
151151
*
152152
* @return
153153
*/
154-
public static AjaxResult error() {
155-
return AjaxResult.error("操作失败");
154+
public static ApiResult error() {
155+
return ApiResult.error("操作失败");
156156
}
157157

158158
/**
@@ -161,8 +161,8 @@ public static AjaxResult error() {
161161
* @param msg 返回内容
162162
* @return 警告消息
163163
*/
164-
public static AjaxResult error(String msg) {
165-
return AjaxResult.error(msg, null);
164+
public static ApiResult error(String msg) {
165+
return ApiResult.error(msg, null);
166166
}
167167

168168
/**
@@ -172,7 +172,7 @@ public static AjaxResult error(String msg) {
172172
* @param data 数据对象
173173
* @return 警告消息
174174
*/
175-
public static AjaxResult error(String msg, Object data) {
176-
return new AjaxResult(Type.ERROR, msg, data);
175+
public static ApiResult error(String msg, Object data) {
176+
return new ApiResult(Type.ERROR, msg, data);
177177
}
178178
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package com.luna.commons.exception;
2+
3+
import com.luna.commons.exception.base.BaseException;
4+
5+
/**
6+
* @author Luna@win10
7+
* @date 2020/6/7 20:24
8+
*/
9+
public class JavaCvException extends BaseException {
10+
11+
public JavaCvException() {}
12+
13+
public JavaCvException(int code, String message) {
14+
super(code, message);
15+
}
16+
17+
public JavaCvException(int code, String message, Object[] args) {
18+
super(code, message, args);
19+
}
20+
}

0 commit comments

Comments
 (0)