|
@@ -139,7 +139,33 @@ public class CustomerService extends BaseService {
|
|
|
}
|
|
|
return record;
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 通过平台的交易号修改客户
|
|
|
+ * @param jsonBody
|
|
|
+ * @param to_account
|
|
|
+ * @return
|
|
|
+ * @throws OpenAPIException
|
|
|
+ */
|
|
|
+ public JSONObject edit(String jsonBody, String to_account) throws OpenAPIException {
|
|
|
+ JSONObject record;
|
|
|
+ try {
|
|
|
+ String tradeId = TradeService.getTradeId();
|
|
|
+ Map<String, String> paramMap = new HashMap();
|
|
|
+ paramMap.put("to_account", to_account);
|
|
|
+// paramMap.put("tradeid", tradeId);
|
|
|
+ String url = this.createURL("customer/edit", paramMap);
|
|
|
+ logger.debug(url);
|
|
|
+ String resultStr = HttpUtil.post(url, jsonBody);
|
|
|
+ logger.debug(resultStr);
|
|
|
+ JSONObject resultRecord = Record.parseObject(resultStr);
|
|
|
+ Thread.sleep(3000);
|
|
|
+ record = Record.parseObject(HttpUtil.get(resultRecord.getString("url")));
|
|
|
+ } catch (Exception e) {
|
|
|
+ // TODO Auto-generated catch block
|
|
|
+ throw new OpenAPIException(e.getMessage(), e);
|
|
|
+ }
|
|
|
+ return record;
|
|
|
+ }
|
|
|
}
|