|
@@ -1,7 +1,5 @@
|
|
package org.fouram.core.plugin.weixin.cp.core;
|
|
package org.fouram.core.plugin.weixin.cp.core;
|
|
|
|
|
|
-import me.chanjar.weixin.cp.api.WxCpOAuth2Service;
|
|
|
|
-import me.chanjar.weixin.cp.api.impl.WxCpOAuth2ServiceImpl;
|
|
|
|
import org.fouram.core.util.ConfConfig;
|
|
import org.fouram.core.util.ConfConfig;
|
|
|
|
|
|
import me.chanjar.weixin.cp.api.WxCpDepartmentService;
|
|
import me.chanjar.weixin.cp.api.WxCpDepartmentService;
|
|
@@ -14,27 +12,24 @@ import me.chanjar.weixin.cp.config.impl.WxCpDefaultConfigImpl;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 企业微信工具类
|
|
* 企业微信工具类
|
|
- *
|
|
|
|
|
|
+ *
|
|
* @author Liup
|
|
* @author Liup
|
|
*/
|
|
*/
|
|
public class WXCpBase {
|
|
public class WXCpBase {
|
|
-
|
|
|
|
|
|
+
|
|
|
|
|
|
public static final WxCpService service = new WxCpServiceImpl();
|
|
public static final WxCpService service = new WxCpServiceImpl();
|
|
public static final WxCpUserService userService;
|
|
public static final WxCpUserService userService;
|
|
- public static final WxCpOAuth2Service oauth2Service;
|
|
|
|
public static final WxCpDepartmentService departService;
|
|
public static final WxCpDepartmentService departService;
|
|
static {
|
|
static {
|
|
WxCpDefaultConfigImpl configStorage = new WxCpDefaultConfigImpl();
|
|
WxCpDefaultConfigImpl configStorage = new WxCpDefaultConfigImpl();
|
|
configStorage.setCorpId(ConfConfig.getConfigString("wxCp.corpId"));
|
|
configStorage.setCorpId(ConfConfig.getConfigString("wxCp.corpId"));
|
|
- configStorage.setCorpSecret(ConfConfig.getConfigString("wxCp.mailList.corpSecret"));
|
|
|
|
|
|
+ configStorage.setCorpSecret(ConfConfig.getConfigString("wxCp.corpSecret"));
|
|
// 初始化基础service
|
|
// 初始化基础service
|
|
service.setWxCpConfigStorage(configStorage);
|
|
service.setWxCpConfigStorage(configStorage);
|
|
- // 初始化service
|
|
|
|
|
|
+ // 初始化用户service
|
|
userService = new WxCpUserServiceImpl(service);
|
|
userService = new WxCpUserServiceImpl(service);
|
|
// 初始化部门service
|
|
// 初始化部门service
|
|
departService = new WxCpDepartmentServiceImpl(service);
|
|
departService = new WxCpDepartmentServiceImpl(service);
|
|
- //授权服务
|
|
|
|
- oauth2Service= new WxCpOAuth2ServiceImpl(service);
|
|
|
|
}
|
|
}
|
|
-}
|
|
|
|
|
|
+}
|