@@ -33,7 +33,7 @@ public class BeanBodyEditor implements IEditor { | |||||
private Object getGetValue(String paramName, Class<?> paramType, Map<String, Object> params) { | private Object getGetValue(String paramName, Class<?> paramType, Map<String, Object> params) { | ||||
if (paramName == null) { | if (paramName == null) { | ||||
return JsonUtil.parse(params, paramType); | |||||
return JsonUtil.parseSimple(params, paramType); | |||||
} | } | ||||
// Json字符进行类型转化 | // Json字符进行类型转化 | ||||
@@ -30,7 +30,7 @@ public class SwMapBodyEditor implements IEditor { | |||||
} | } | ||||
private Object getGetValue(String paramName, Class<?> paramType, Map<String, Object> params, HttpServletRequest request) { | private Object getGetValue(String paramName, Class<?> paramType, Map<String, Object> params, HttpServletRequest request) { | ||||
SwMap result = JsonUtil.parse(params, SwMap.class); | |||||
SwMap result = JsonUtil.parseSimple(params, SwMap.class); | |||||
request.setAttribute(BODY_MAP, result); | request.setAttribute(BODY_MAP, result); | ||||
return getFieldValue(result, paramName); | return getFieldValue(result, paramName); | ||||
} | } | ||||
@@ -120,6 +120,10 @@ public class JsonUtil { | |||||
* @return Bean对象实例 | * @return Bean对象实例 | ||||
*/ | */ | ||||
public static <T> T parse(Map map, Class<T> clazz) { | public static <T> T parse(Map map, Class<T> clazz) { | ||||
return parse(encodeString(map), clazz); | |||||
} | |||||
public static <T> T parseSimple(Map map, Class<T> clazz) { | |||||
try { | try { | ||||
if (map == null || map.isEmpty()) { | if (map == null || map.isEmpty()) { | ||||
return null; | return null; | ||||
@@ -42,5 +42,13 @@ | |||||
"字段权限中的字段": "0-无/1-读/2-写" | "字段权限中的字段": "0-无/1-读/2-写" | ||||
} | } | ||||
} | } | ||||
], | |||||
"人员分组.详细": [ | |||||
{ | |||||
"type": "类型,1-机构 2-部门 3-角色 4-人员 5-机构性质 5-部门性质", | |||||
"kind": "0-包含 1-排除", | |||||
"value": "值", | |||||
"rec": "树形结构有效:0-仅本级 1-含下级" | |||||
} | |||||
] | ] | ||||
} | } |