Skip to content

Commit 51272e6

Browse files
committed
Server:同步idea版至eclipse版
1 parent 4122616 commit 51272e6

3 files changed

Lines changed: 9 additions & 4 deletions

File tree

APIJSON(Server)/APIJSON(Eclipse_JEE)/src/main/java/zuo/biao/apijson/server/Pair.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public static Entry<String, String> parseEntry(String pair, boolean isRightValue
110110
* "key":null不应该出现?因为FastJSON内默认不存null
111111
* @param pair leftKey:rightValue
112112
* @param isRightValueDefault 右边值缺省,当pair不包含 : 时默认整个pair为leftKey;false-相反
113-
* @param defaultKey 缺省值
113+
* @param defaultValue 缺省值
114114
* @return @NonNull
115115
*/
116116
public static Entry<String, String> parseEntry(String pair, boolean isRightValueDefault, String defaultValue) {

APIJSON(Server)/APIJSON(Eclipse_JEE)/src/main/java/zuo/biao/apijson/server/Parser.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -987,8 +987,8 @@ private void updateRelation(String path, String replacePath) {
987987
}
988988

989989
/**将已获取完成的object的内容替换requestObject里对应的值
990-
* @param valuePath object的路径
991-
* @param value 需要被关联的object
990+
* @param path object的路径
991+
* @param result 需要被关联的object
992992
*/
993993
private synchronized void putQueryResult(String path, Object result) {
994994
Log.i(TAG, "\n putQueryResult valuePath = " + path + "; result = " + result + "\n <<<<<<<<<<<<<<<<<<<<<<<");

APIJSON(Server)/APIJSON(Eclipse_JEE)/src/main/java/zuo/biao/apijson/server/sql/QueryHelper.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ private synchronized Connection getConnection() throws Exception {
5959
return DriverManager.getConnection(YOUR_MYSQL_URL + YOUR_MYSQL_SCHEMA, YOUR_MYSQL_ACCOUNT, YOUR_MYSQL_PASSWORD);
6060
}
6161

62-
//TODO key应该改成SQL
6362
private synchronized void saveCache(String sql, Map<Integer, JSONObject> map) {
6463
if (sql == null || map == null || map.isEmpty()) {
6564
Log.i(TAG, "saveList sql == null || map == null || map.isEmpty() >> return;");
@@ -180,6 +179,12 @@ public JSONObject select(QueryConfig config) throws Exception {
180179
Object value;
181180
Object json;
182181
for (int i = 0; i < columnArray.length; i++) {
182+
if (columnArray[i] == null || columnArray[i].isEmpty() || columnArray[i].startsWith("_")) {
183+
Log.i(TAG, "select while (rs.next()){ ..."
184+
+ " >> columnArray[i] == " + columnArray[i]
185+
+ " >> continue;");
186+
continue;
187+
}//允许 key:_alias, 但不允许_key, _key:alias
183188
columnArray[i] = Pair.parseEntry(columnArray[i]).getValue();
184189
try {
185190
value = rs.getObject(rs.findColumn(columnArray[i]));

0 commit comments

Comments
 (0)