Commit 42b0cd9c by zhouhaibao

[+]代码测试

1 parent b7440ddc
...@@ -191,11 +191,11 @@ public class UserDemoService { ...@@ -191,11 +191,11 @@ public class UserDemoService {
" public static JSON execute(JSON param) {\n" + " public static JSON execute(JSON param) {\n" +
" // 将JSON字符串转换为Map\n" + " // 将JSON字符串转换为Map\n" +
" // 将Map中的数据放入MultiValueMap中\n" + " // 将Map中的数据放入MultiValueMap中\n" +
" RopResponse post=null;\n" + " Object post=null;\n" +
" MultiValueMap<String, String> params = new LinkedMultiValueMap<String, String>();\n" + " MultiValueMap<String, String> params = new LinkedMultiValueMap<String, String>();\n" +
" params.add(\"merchantNo\", \"44210895\");\n" + " params.add(\"merchantNo\", \"44210895\");\n" +
" try {\n" + " try {\n" +
" post = post(params, RopResponse.class, baseurl, method);\n" + " post = post(params, Object.class, baseurl, method);\n" +
" } catch (Exception e) {\n" + " } catch (Exception e) {\n" +
" throw new RuntimeException(e);\n" + " throw new RuntimeException(e);\n" +
" }\n" + " }\n" +
...@@ -342,66 +342,6 @@ public class UserDemoService { ...@@ -342,66 +342,6 @@ public class UserDemoService {
"\n" + "\n" +
" return sign.toString();\n" + " return sign.toString();\n" +
" }\n" + " }\n" +
"\n" +
" static class RopResponse<T> {\n" +
" private String code;\n" +
" private Integer errId;\n" +
" private String message;\n" +
" private T t;\n" +
" private List<T> tList;\n" +
" private Object data;\n" +
"\n" +
" public RopResponse() {\n" +
" }\n" +
"\n" +
" public String getCode() {\n" +
" return code;\n" +
" }\n" +
"\n" +
" public void setCode(String code) {\n" +
" this.code = code;\n" +
" }\n" +
"\n" +
" public Integer getErrId() {\n" +
" return errId;\n" +
" }\n" +
"\n" +
" public void setErrId(Integer errId) {\n" +
" this.errId = errId;\n" +
" }\n" +
"\n" +
" public String getMessage() {\n" +
" return message;\n" +
" }\n" +
"\n" +
" public void setMessage(String message) {\n" +
" this.message = message;\n" +
" }\n" +
"\n" +
" public T getT() {\n" +
" return t;\n" +
" }\n" +
"\n" +
" public void setT(T t) {\n" +
" this.t = t;\n" +
" }\n" +
"\n" +
" public List<T> gettList() {\n" +
" return tList;\n" +
" }\n" +
"\n" +
" public void settList(List<T> tList) {\n" +
" this.tList = tList;\n" +
" }\n" +
"\n" +
" public Object getData() {\n" +
" return data;\n" +
" }\n" +
"\n" +
" public void setData(Object data) {\n" +
" this.data = data;\n" +
" }\n" +
" }\n" +
"}", "execute", new Class[]{JSON.class}, new Object[]{jsonObject}); "}", "execute", new Class[]{JSON.class}, new Object[]{jsonObject});
} }
} }
...@@ -29,11 +29,11 @@ public class Controller1 { ...@@ -29,11 +29,11 @@ public class Controller1 {
public static JSON execute(JSON param) { public static JSON execute(JSON param) {
// 将JSON字符串转换为Map // 将JSON字符串转换为Map
// 将Map中的数据放入MultiValueMap中 // 将Map中的数据放入MultiValueMap中
RopResponse post=null; Object post=null;
MultiValueMap<String, String> params = new LinkedMultiValueMap<String, String>(); MultiValueMap<String, String> params = new LinkedMultiValueMap<String, String>();
params.add("merchantNo", "44210895"); params.add("merchantNo", "44210895");
try { try {
post = post(params, RopResponse.class, baseurl, method); post = post(params, Object.class, baseurl, method);
} catch (Exception e) { } catch (Exception e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
...@@ -180,64 +180,4 @@ public class Controller1 { ...@@ -180,64 +180,4 @@ public class Controller1 {
return sign.toString(); return sign.toString();
} }
static class RopResponse<T> {
private String code;
private Integer errId;
private String message;
private T t;
private List<T> tList;
private Object data;
public RopResponse() {
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public Integer getErrId() {
return errId;
}
public void setErrId(Integer errId) {
this.errId = errId;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public T getT() {
return t;
}
public void setT(T t) {
this.t = t;
}
public List<T> gettList() {
return tList;
}
public void settList(List<T> tList) {
this.tList = tList;
}
public Object getData() {
return data;
}
public void setData(Object data) {
this.data = data;
}
}
} }
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!