Commit c8a245a7 by zhouhaibao

[+]代码测试

1 parent 3253570f
...@@ -177,7 +177,7 @@ public class UserDemoService { ...@@ -177,7 +177,7 @@ public class UserDemoService {
"import java.util.*;\n" + "import java.util.*;\n" +
"\n" + "\n" +
"\n" + "\n" +
"public class Controller1 {\n" + "public class Controller {\n" +
"\n" + "\n" +
"\n" + "\n" +
" private final static String appKey = \"48e5e13229b82c1b4e6e8c96151f0637\";\n" + " private final static String appKey = \"48e5e13229b82c1b4e6e8c96151f0637\";\n" +
......
...@@ -27,18 +27,18 @@ public class Controller1 { ...@@ -27,18 +27,18 @@ public class Controller1 {
private final static String method = "merchants.api.open.findStaffListByMerchantNo"; private final static String method = "merchants.api.open.findStaffListByMerchantNo";
public static JSON execute(JSON param) { public static JSON execute(JSON param) {
JSON post = null;
// 将JSON字符串转换为Map // 将JSON字符串转换为Map
// 将Map中的数据放入MultiValueMap中 // 将Map中的数据放入MultiValueMap中
RopResponse 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, JSON.class, baseurl, method); post = post(params, RopResponse.class, baseurl, method);
} catch (Exception e) { } catch (Exception e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
System.out.println(JSON.toJSONString(post)); System.out.println(JSON.toJSONString(post));
return post; return param;
} }
private static void addBaseParam(MultiValueMap<String, String> paramsMap, String method) { private static void addBaseParam(MultiValueMap<String, String> paramsMap, String method) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!