Commit 276d7302 by 袁伟铭

1.0.0

parent ad4701b5
...@@ -40,7 +40,11 @@ public class ApiForm { ...@@ -40,7 +40,11 @@ public class ApiForm {
private ApiTokenVo apiTokenVo; private ApiTokenVo apiTokenVo;
public JSONObject getBizContentJson() { public JSONObject getBizContentJson() {
return JSON.parseObject(bizContent); JSONObject object = JSON.parseObject(bizContent);
if (object == null) {
return new JSONObject();
}
return object;
} }
/** /**
...@@ -143,8 +147,8 @@ public class ApiForm { ...@@ -143,8 +147,8 @@ public class ApiForm {
* *
* @return * @return
*/ */
public Map<String, Object> getParamsMap(boolean isSetAppUserId) { public Map<String, Object> getParamsMap(boolean isSetUserId) {
return getParamsMap(isSetAppUserId, null); return getParamsMap(isSetUserId, null);
} }
/** /**
...@@ -152,11 +156,11 @@ public class ApiForm { ...@@ -152,11 +156,11 @@ public class ApiForm {
* *
* @return * @return
*/ */
public Map<String, Object> getParamsMap(boolean isSetAppUserId, String key) { public Map<String, Object> getParamsMap(boolean isSetUserId, String key) {
JSONObject json = getBizContentJson(); JSONObject json = getBizContentJson();
Map<String, Object> innerMap = json.getInnerMap(); Map<String, Object> innerMap = json.getInnerMap();
innerMap.put("token", getToken()); innerMap.put("token", getToken());
if (isSetAppUserId) { if (isSetUserId) {
if (StringUtils.isBlank(key)) { if (StringUtils.isBlank(key)) {
innerMap.put("userId", userId); innerMap.put("userId", userId);
} else { } else {
...@@ -182,7 +186,7 @@ public class ApiForm { ...@@ -182,7 +186,7 @@ public class ApiForm {
bizContent = ApiUtils.decode(bizContent); bizContent = ApiUtils.decode(bizContent);
} }
} catch (UnsupportedEncodingException e) { } catch (UnsupportedEncodingException e) {
log.error("p参数解析失败", e); log.error("bizContent参数解析失败", e);
} }
treeMap.put("bizContent", bizContent); treeMap.put("bizContent", bizContent);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment