企业微信成员新增
This commit is contained in:
@@ -12,7 +12,8 @@
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>${project.artifactId}</name>
|
||||
<description>微信拓展
|
||||
<description>
|
||||
微信拓展
|
||||
1. 基于 weixin-java-mp 库,对接微信公众号平台。目前主要解决微信公众号的支付场景。
|
||||
</description>
|
||||
<url>https://github.com/YunaiV/ruoyi-vue-pro</url>
|
||||
@@ -45,6 +46,18 @@
|
||||
<version>4.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/com.github.binarywang/weixin-java-cp -->
|
||||
<dependency>
|
||||
<groupId>com.github.binarywang</groupId>
|
||||
<artifactId>weixin-java-cp</artifactId>
|
||||
<version>4.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.boot</groupId>
|
||||
<artifactId>yudao-spring-boot-starter-extension</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package cn.iocoder.yudao.config;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.chanjar.weixin.cp.api.WxCpService;
|
||||
import me.chanjar.weixin.cp.api.impl.WxCpServiceImpl;
|
||||
import me.chanjar.weixin.cp.config.impl.WxCpDefaultConfigImpl;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
@Slf4j
|
||||
public class WxCpConfigure {
|
||||
|
||||
|
||||
@Bean
|
||||
public WxCpService wxCpService(){
|
||||
|
||||
WxCpDefaultConfigImpl config = new WxCpDefaultConfigImpl();
|
||||
|
||||
config.setCorpId("wwb9f9734e8e124761");
|
||||
config.setAgentId(1000033);
|
||||
config.setCorpSecret("UDSKsn0_LAPYqSwjH9E-AfY_X40lq0sormfe1yV_6Gc");
|
||||
|
||||
WxCpServiceImpl wxCpService = new WxCpServiceImpl();
|
||||
wxCpService.setWxCpConfigStorage(config);
|
||||
|
||||
log.info("企业微信初始化:{}",wxCpService);
|
||||
|
||||
return wxCpService;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
|
||||
cn.iocoder.yudao.config.WxCpConfigure
|
||||
Reference in New Issue
Block a user