Skip to content

Commit a85e642

Browse files
committed
Server:join的副表必传@column
1 parent 67478ee commit a85e642

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

APIJSON-Java-Server/APIJSONLibrary/src/main/java/zuo/biao/apijson/server/AbstractParser.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -848,6 +848,10 @@ private JSONObject getJoinObject(String table, JSONObject obj, String key) {
848848
Log.e(TAG, "getIdList StringUtil.isEmpty(key, true) >> return null;");
849849
return null;
850850
}
851+
if (StringUtil.isEmpty(obj.getString(JSONRequest.KEY_COLUMN), true)) {
852+
throw new IllegalArgumentException("join的副表 " + table + " 必须有非空的 " + JSONRequest.KEY_COLUMN
853+
+ " ! 否则JOIN的性能优化无效,反而多耗性能!");
854+
}
851855

852856
//取出所有join条件
853857
JSONObject requestObj = new JSONObject(true);//(JSONObject) obj.clone();//

0 commit comments

Comments
 (0)