Skip to content

Commit 737aa73

Browse files
author
iceewei
committed
错误码只在最外层返回,逻辑统一
1 parent 3d21063 commit 737aa73

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

APIJSONORM/src/main/java/apijson/orm/AbstractSQLExecutor.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ public JSONObject execute(@NotNull SQLConfig config, boolean unknowType) throws
212212

213213
result = new JSONObject();
214214
if (config.getMethod() == RequestMethod.DELETE) {
215+
// 特别地,针对DELETE请求,如果需要提示code,可以用内部的code来判断。其余请求类型统一使用外层错误码。
215216
result = AbstractParser.newResult(updateCount > 0 ? JSONResponse.CODE_SUCCESS : JSONResponse.CODE_NOT_FOUND,
216217
updateCount > 0 ? JSONResponse.MSG_SUCCEED : "没权限访问或对象不存在!");
217218
}

0 commit comments

Comments
 (0)