Commit 80bf3a92 authored by jiaorz's avatar jiaorz

新增转账接口

parent 5a6e7f81
......@@ -93,7 +93,7 @@ public class AppUserAlipayBiz extends BaseBiz<AppUserAlipayMapper, AppUserAlipay
if (StringUtils.isNotBlank(result)) {
log.info("【支付宝】用户授权获取用户token, {}", result);
JSONObject jsonObject = JSONObject.parseObject(result);
if (jsonObject != null && jsonObject.getString("code") != null && jsonObject.getString("code").equals("10000")) {
if (jsonObject.getJSONObject("error_response") == null) {
String account = jsonObject.getString("userId");
if (account != null) {
appUserAlipay.setTxAlipay(account);
......@@ -108,7 +108,7 @@ public class AppUserAlipayBiz extends BaseBiz<AppUserAlipayMapper, AppUserAlipay
insertSelectiveRe(appUserAlipay);
return ObjectRestResponse.succ();
} else {
return ObjectRestResponse.createFailedResult(Integer.parseInt(jsonObject.getString("code")), jsonObject.getString("sub_msg"));
return ObjectRestResponse.createFailedResult(Integer.parseInt(jsonObject.getJSONObject("error_response").getString("code")), jsonObject.getJSONObject("error_response").getString("sub_msg"));
}
}
return ObjectRestResponse.createDefaultFail();
......
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