Browse Source

[openAppId][修改]:获取openAppId更新数据库

release
Stormeye Wu 7 years ago
parent
commit
d07be9e134
1 changed files with 8 additions and 0 deletions
  1. +8
    -0
      mlWechatOpen/src/main/java/com/iformall/controller/WechatCalllbackController.java

+ 8
- 0
mlWechatOpen/src/main/java/com/iformall/controller/WechatCalllbackController.java View File

@@ -353,6 +353,14 @@ public class WechatCalllbackController extends BaseController {
logger.info(responseStr); logger.info(responseStr);
WxOpenPlatformResult openPlatformResult = gson.fromJson(responseStr, WxOpenPlatformResult.class); WxOpenPlatformResult openPlatformResult = gson.fromJson(responseStr, WxOpenPlatformResult.class);
if (openPlatformResult.isSuccess()) { if (openPlatformResult.isSuccess()) {
WxAuthorizerInfo authorizerInfo = authorizerInfoService.getByAppId(appId);
if (authorizerInfo != null) {
if(StringUtils.isBlank(authorizerInfo.getOpenAppid()) && StringUtils.isNotBlank(openPlatformResult.getOpenAppid())) {
authorizerInfo.setId(authorizerInfo.getId());
authorizerInfo.setOpenAppid(openPlatformResult.getOpenAppid());
authorizerInfoService.updateOpenAppid(authorizerInfo);
}
}
return new ResultData(openPlatformResult.getOpenAppid()); return new ResultData(openPlatformResult.getOpenAppid());
} }
return new ResultData(Result.ERROR, responseStr); return new ResultData(Result.ERROR, responseStr);


Loading…
Cancel
Save