소스 검색

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

release
Stormeye Wu 7 년 전
부모
커밋
d07be9e134
1개의 변경된 파일8개의 추가작업 그리고 0개의 파일을 삭제
  1. +8
    -0
      mlWechatOpen/src/main/java/com/iformall/controller/WechatCalllbackController.java

+ 8
- 0
mlWechatOpen/src/main/java/com/iformall/controller/WechatCalllbackController.java 파일 보기

@@ -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);


불러오는 중...
취소
저장