|
|
|
@@ -353,6 +353,14 @@ public class WechatCalllbackController extends BaseController { |
|
|
|
logger.info(responseStr); |
|
|
|
WxOpenPlatformResult openPlatformResult = gson.fromJson(responseStr, WxOpenPlatformResult.class); |
|
|
|
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(Result.ERROR, responseStr); |
|
|
|
|