|
5 | 5 |
|
6 | 6 | package apijson.orm;
|
7 | 7 |
|
8 |
| -import static apijson.JSONObject.KEY_COMBINE; |
9 |
| -import static apijson.JSONObject.KEY_DROP; |
10 |
| -import static apijson.JSONObject.KEY_TRY; |
11 |
| -import static apijson.RequestMethod.POST; |
12 |
| -import static apijson.RequestMethod.PUT; |
13 |
| -import static apijson.orm.SQLConfig.TYPE_ITEM; |
| 8 | +import apijson.JSONResponse; |
| 9 | +import apijson.Log; |
| 10 | +import apijson.NotNull; |
| 11 | +import apijson.RequestMethod; |
| 12 | +import apijson.StringUtil; |
| 13 | +import apijson.orm.AbstractFunctionParser.FunctionBean; |
| 14 | +import apijson.orm.exception.ConflictException; |
| 15 | +import apijson.orm.exception.NotExistException; |
| 16 | +import com.alibaba.fastjson.JSON; |
| 17 | +import com.alibaba.fastjson.JSONArray; |
| 18 | +import com.alibaba.fastjson.JSONObject; |
14 | 19 |
|
| 20 | +import javax.activation.UnsupportedDataTypeException; |
15 | 21 | import java.rmi.ServerException;
|
16 | 22 | import java.util.ArrayList;
|
17 | 23 | import java.util.Arrays;
|
|
22 | 28 | import java.util.Map.Entry;
|
23 | 29 | import java.util.Set;
|
24 | 30 |
|
25 |
| -import javax.activation.UnsupportedDataTypeException; |
26 |
| - |
27 |
| -import com.alibaba.fastjson.JSON; |
28 |
| -import com.alibaba.fastjson.JSONArray; |
29 |
| -import com.alibaba.fastjson.JSONObject; |
30 |
| - |
31 |
| -import apijson.JSONResponse; |
32 |
| -import apijson.Log; |
33 |
| -import apijson.NotNull; |
34 |
| -import apijson.RequestMethod; |
35 |
| -import apijson.StringUtil; |
36 |
| -import apijson.orm.AbstractFunctionParser.FunctionBean; |
37 |
| -import apijson.orm.exception.ConflictException; |
38 |
| -import apijson.orm.exception.NotExistException; |
| 31 | +import static apijson.JSONObject.KEY_COMBINE; |
| 32 | +import static apijson.JSONObject.KEY_DROP; |
| 33 | +import static apijson.JSONObject.KEY_TRY; |
| 34 | +import static apijson.RequestMethod.POST; |
| 35 | +import static apijson.RequestMethod.PUT; |
| 36 | +import static apijson.orm.SQLConfig.TYPE_ITEM; |
39 | 37 |
|
40 | 38 |
|
41 | 39 | /**简化Parser,getObject和getArray(getArrayConfig)都能用
|
@@ -427,7 +425,7 @@ else if (value instanceof String) { // //key{}@ getRealKey, 引用赋值路径
|
427 | 425 | String replaceKey = key.substring(0, key.length() - 1);
|
428 | 426 |
|
429 | 427 | // System.out.println("getObject key.endsWith(@) >> parseRelation = " + parseRelation);
|
430 |
| - String targetPath = AbstractParser.getValuePath(type == TYPE_ITEM ? path : parentPath, new String((String) value)); |
| 428 | + String targetPath = AbstractParser.getValuePath(type == TYPE_ITEM ? path : parentPath, (String) value); |
431 | 429 |
|
432 | 430 | //先尝试获取,尽量保留缺省依赖路径,这样就不需要担心路径改变
|
433 | 431 | Object target = onReferenceParse(targetPath);
|
@@ -572,7 +570,7 @@ public JSON onChildParse(int index, String key, JSONObject value) throws Excepti
|
572 | 570 | invalidate();
|
573 | 571 | }
|
574 | 572 | }
|
575 |
| - Log.i(TAG, "onChildParse ObjectParser.onParse key = " + key + "; child = " + child); |
| 573 | +// Log.i(TAG, "onChildParse ObjectParser.onParse key = " + key + "; child = " + child); |
576 | 574 |
|
577 | 575 | return isEmpty ? null : child;//只添加! isChildEmpty的值,可能数据库返回数据不够count
|
578 | 576 | }
|
|
0 commit comments