Commit bd8e7b35 authored by jiaorz's avatar jiaorz

Merge branch 'master-auto-pay' into base-modify

parents d59b242d adbbe63c
...@@ -93,14 +93,15 @@ public class AppUserAlipayBiz extends BaseBiz<AppUserAlipayMapper, AppUserAlipay ...@@ -93,14 +93,15 @@ public class AppUserAlipayBiz extends BaseBiz<AppUserAlipayMapper, AppUserAlipay
if (StringUtils.isNotBlank(result)) { if (StringUtils.isNotBlank(result)) {
log.info("【支付宝】用户授权获取用户token, {}", result); log.info("【支付宝】用户授权获取用户token, {}", result);
JSONObject jsonObject = JSONObject.parseObject(result); JSONObject jsonObject = JSONObject.parseObject(result);
if (jsonObject.getJSONObject("error_response") == null) { if (jsonObject.getJSONObject("error_response") == null && jsonObject.getJSONObject("alipay_user_info_share_response") != null) {
String account = jsonObject.getString("userId"); JSONObject responseObject = jsonObject.getJSONObject("alipay_user_info_share_response");
String account = responseObject.getString("user_id");
if (account != null) { if (account != null) {
appUserAlipay.setTxAlipay(account); appUserAlipay.setTxAlipay(account);
appUserAlipay.setCrtTime(new Date().getTime()); appUserAlipay.setCrtTime(new Date().getTime());
appUserAlipay.setIsDel(0); appUserAlipay.setIsDel(0);
} }
String nickname = jsonObject.getString("nickName"); String nickname = responseObject.getString("nick_name");
if (nickname != null) { if (nickname != null) {
appUserAlipay.setNickname(nickname); appUserAlipay.setNickname(nickname);
} }
......
...@@ -77,7 +77,6 @@ public class UserInfoController { ...@@ -77,7 +77,6 @@ public class UserInfoController {
return ObjectRestResponse.createDefaultFail(); return ObjectRestResponse.createDefaultFail();
} }
@GetMapping("/app/unauth/getParam") @GetMapping("/app/unauth/getParam")
public ObjectRestResponse<String> getParam(String apiName, String appName) { public ObjectRestResponse<String> getParam(String apiName, String appName) {
return ObjectRestResponse.succ(orderPayBiz.generateAliPayInfo(apiName, appName)); return ObjectRestResponse.succ(orderPayBiz.generateAliPayInfo(apiName, appName));
......
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