Closed kkkangke closed 3 years ago
仿照本demo,构建WxCpTpService实例对象
仿照本demo,内置WxCpTpService实例对象
需要将 val service = new WxCpServiceImpl();改为val service = new WxCpServiceOnTpImpl(new WxCpTpServiceImpl());吗?
public static WxCpTpService getCpTpService(String suiteId) {
return cpTpServices.get(suiteId);
}
@PostConstruct
public void initServices() {
cpTpServices = this.properties.getAppConfigs().stream().map(appConfig -> {
val configStorage = new WxCpTpDefaultConfigImpl();
configStorage.setCorpId(this.properties.getCorpId());
configStorage.setSuiteId(appConfig.getSuiteId());
configStorage.setSuiteSecret(appConfig.getSuiteSecret());
configStorage.setToken(appConfig.getToken());
configStorage.setAesKey(appConfig.getAesKey());
val service = new WxCpTpServiceImpl();
service.setWxCpTpConfigStorage(configStorage);
routers.put(appConfig.getSuiteId(), this.newRouter(service));
return service;
}).collect(Collectors.toMap(service -> service.getWxCpTpConfigStorage().getSuiteId(), appConfig -> appConfig));
}
使用企业微信的第三方应用的参数就可以,类都换成第三方应用的类
企业微信第三方应用如何初始化,后面想使用授权的企业微信号接口该如何调用