|
|
|
@ -66,15 +66,21 @@ public class RequestCore {
|
|
|
|
|
* @param payTemplateId
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public String authorizeChildrenAccount(Long parentAccountId, String nickName, Long payTemplateId) {
|
|
|
|
|
public JSONObject authorizeChildrenAccount(Long parentAccountId, String nickName, Long payTemplateId) {
|
|
|
|
|
String reqUrl = url + API_PREFIX + "/account/authorize";
|
|
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
|
|
map.put("parentAccountId", parentAccountId);
|
|
|
|
|
map.put("nickName", nickName);
|
|
|
|
|
map.put("payTemplateId", payTemplateId);
|
|
|
|
|
String post = HttpUtil.post(reqUrl, JSONUtil.parseObj(map).toString());
|
|
|
|
|
log.info(post);
|
|
|
|
|
return post;
|
|
|
|
|
log.info("子账号授权返回值,{}", post);
|
|
|
|
|
JSONObject jsonObject;
|
|
|
|
|
try {
|
|
|
|
|
jsonObject = JSONUtil.parseObj(post).getJSONObject("data");
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
return jsonObject;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|