Skip to content

合并 Develop 分支 #1151

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 78 commits into from
Aug 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
61f3914
Merge branch 'master' into develop
binarywang May 18, 2019
d748bd0
#1052 修正企业微信部门管理接口中的注释
emmfox May 22, 2019
001a274
#493 企业微信增加第三方应用开发接口的支持
feye May 24, 2019
f956d96
Merge branch 'master' into develop
binarywang May 24, 2019
1923047
#1053 企业微信根据code获取成员信息接口返回结果优化
binarywang May 26, 2019
e1b6239
发布3.4.1.B测试版本
binarywang May 26, 2019
3465d53
#1058 公众号模块加入设备绑定解绑消息支持
biggates May 28, 2019
f67333a
规范化并优化代码
binarywang Jun 2, 2019
f71fed4
#1060 修复微信卡券签名问题
binarywang Jun 2, 2019
60ebb54
#1059 微信支付证书地址参数keyPath支持使用网络地址
binarywang Jun 2, 2019
6b08dc8
Update .travis.yml
binarywang Jun 2, 2019
97e88bd
#1065 支持私有化部署版本的企业微信
crazycode Jun 2, 2019
07d0656
企业微信模块接口地址常量优化重构
binarywang Jun 2, 2019
14bc2f5
fix test code
binarywang Jun 2, 2019
614165d
Update .travis.yml
binarywang Jun 2, 2019
14bc77c
发布3.4.2.B测试版本
binarywang Jun 2, 2019
e937d3f
#1067 微信支付统一下单自定义结果封装类实现序列化接口,以满足某些应用场景需求。
jink2005 Jun 6, 2019
1ac0426
优化重构代码,统一管理公众号接口地址
binarywang Jun 6, 2019
6dc9d37
补充缺失的serialVersionUID
binarywang Jun 6, 2019
2422a28
#1055 增加创建卡券二维码接口缺失的一些参数
binarywang Jun 9, 2019
084ffcf
#1050 客服消息支持发送菜单消息
binarywang Jun 9, 2019
af9b3a4
#1039 微信公众号接口地址域名部分进行可配置化 改造
binarywang Jun 9, 2019
cb4e3f3
发布3.4.3.B测试版本
binarywang Jun 9, 2019
a4f5aa3
#1075 企业微信支持推送小程序通知消息
binarywang Jun 16, 2019
9c149bb
#516 添加WiFi门店管理查询门店Wi-Fi信息的接口
binarywang Jun 16, 2019
be78d8c
#252 添加图文消息留言管理中打开已群发文章评论的接口
binarywang Jun 16, 2019
fdf1497
发布3.4.4.B测试版本
binarywang Jun 16, 2019
46f5916
Update .travis.yml
binarywang Jun 16, 2019
26eec2c
#1077 修复开发平台删除类目接口中拼写错误的second参数
PatrickCai Jun 18, 2019
b2cf452
Update .travis.yml
binarywang Jun 18, 2019
90b5ca5
#1078 完善企业微信外部联系人相关接口
JoeCao Jun 18, 2019
18e3f75
#1081 开放平台模块增加获取所有授权方列表的接口
rbg001 Jun 21, 2019
a63321f
规范部分代码
binarywang Jun 22, 2019
54c8ae5
#1079 小程序增加对转发客服消息功能的支持
binarywang Jun 22, 2019
7de959f
规范部分代码
binarywang Jun 23, 2019
0eb3a64
发布3.4.5.B测试版本
binarywang Jun 23, 2019
158171c
增加一点测试代码
binarywang Jun 30, 2019
7ac670b
#1002 增加微信OCR身份证识别接口
binarywang Jun 30, 2019
37f5e59
#516 实现修改门店网络WiFi信息的接口
binarywang Jun 30, 2019
16bb8f1
#1100 小程序模块添加Redis配置类WxMaInRedisConfig
winter4666 Jul 8, 2019
663c45c
发布3.4.6.B测试版本
binarywang Jul 8, 2019
09b726f
#1106 修复获取公众号 jsapi_ticket 请求 Url 拼接问题
arbing Jul 14, 2019
b346224
#1099 优化客服消息接口菜单消息实现
billytomato Jul 14, 2019
9149cd4
#1088 微信支付结果通知内容细微调整,希望能解决部分人遇到的变态问题
binarywang Jul 14, 2019
4ae6c43
优化代码,规范变量命名
binarywang Jul 14, 2019
113407a
#1108 微信支付结果通知类增加境外商户专有的rate_value参数
binarywang Jul 14, 2019
d451d3b
优化代码
binarywang Jul 14, 2019
c805444
#1095 修复微信营销接口中有问题的回传数据接口方法
binarywang Jul 14, 2019
48742dd
发布3.4.7.B测试版本
binarywang Jul 14, 2019
55ce138
#1110 微信营销回传数据接口新增leads_type参数
binarywang Jul 14, 2019
eb6b09c
#1119 开放平台模块getAuthorizerList方法里自动刷新refreshToken
007gzs Jul 18, 2019
e5338c5
#1125 修复开放平台换绑小程序管理员接口的错误地址
PatrickCai Jul 19, 2019
e980b52
#1122 开放平台对外暴露WxOpenMpServiceImpl类,方便开发者灵活调用
binarywang Jul 21, 2019
d09d295
#1112 企业微信成员管理WxCpUser类增加新的is_leader_in_dept字段
binarywang Jul 21, 2019
7c6ebe6
#1111 微信支付配置支持接口请求地址的可配置
binarywang Jul 21, 2019
ca780d7
发布3.4.8.B测试版本
binarywang Jul 21, 2019
364aa05
#1127 修复微信红包查询签名错误的问题
lbwcdg Jul 22, 2019
0196764
#1129 新增小程序插件管理相关接口
arbing Jul 24, 2019
1793c25
#1126 修复企业微信WxCpXmlMessage类部分字段
binarywang Jul 26, 2019
c680a75
发布3.4.9.B测试版本
binarywang Jul 28, 2019
4883571
Merge branch 'master' into develop
binarywang Jul 29, 2019
7a389ad
#1125 微信支付模块修复对账单下载接口结果中缺失订单总金额和申请退款总金额的问题
m8cool Jul 29, 2019
a5ccd0a
去掉非法字符
binarywang Aug 3, 2019
d0d83a7
#1138 获取自定义菜单配置接口结果中增加小程序相关的属性
binarywang Aug 3, 2019
d9b7217
规范统一config部分代码
binarywang Aug 3, 2019
ae4a021
:white_check_mark: 增加点测试代码
binarywang Aug 5, 2019
9de72c7
:art: 优化代码
binarywang Aug 8, 2019
2f372b4
:bug: #1148 修复微信支付拉取评论信息接口签名问题
Ziyear Aug 9, 2019
2ccb60f
:art: 增加点注释
binarywang Aug 9, 2019
44b3680
:hammer: 重构包结构
binarywang Aug 10, 2019
3a1fae6
:hammer: 规范代码
binarywang Aug 10, 2019
7033b1d
:sparkles: #1144 企业微信模块增加通过手机号获取userid的接口
binarywang Aug 10, 2019
6c77a87
:hammer: 重构 spring boot starter 模块目录结构
binarywang Aug 10, 2019
23ab472
:hammer: 重构 spring boot starter 模块目录结构
binarywang Aug 10, 2019
3c099f8
:sparkles: #1082 增加微信小程序模块的spring-boot-starter
binarywang Aug 10, 2019
64d4bc5
:heavy_minus_sign: 移除无用文件
binarywang Aug 10, 2019
62b9d84
Merge branch 'master' into develop
binarywang Aug 10, 2019
3bf1bb9
:bookmark: 发布3.5.0正式版本
binarywang Aug 10, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ language: java
# secure: "834110c7191f97ecb226970c46dcaff8e681da5a"

jdk:
- oraclejdk8
- openjdk8
script: "mvn clean package -DskipTests=true -Dcheckstyle.skip=true"

#script:
Expand Down
3 changes: 0 additions & 3 deletions .vscode/settings.json

This file was deleted.

10 changes: 6 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.binarywang</groupId>
<artifactId>wx-java</artifactId>
<version>3.4.0</version>
<version>3.5.0</version>
<packaging>pom</packaging>
<name>WxJava - Weixin/Wechat Java SDK</name>
<description>微信开发Java SDK</description>
Expand Down Expand Up @@ -105,8 +105,9 @@
<module>weixin-java-pay</module>
<module>weixin-java-miniapp</module>
<module>weixin-java-open</module>
<module>starters/wx-java-pay-starter</module>
<module>starters/wx-java-mp-starter</module>
<module>spring-boot-starters/wx-java-pay-spring-boot-starter</module>
<module>spring-boot-starters/wx-java-mp-spring-boot-starter</module>
<module>spring-boot-starters/wx-java-miniapp-spring-boot-starter</module>
<!--module>weixin-java-osgi</module-->
</modules>

Expand Down Expand Up @@ -246,7 +247,7 @@
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.16.18</version>
<version>1.18.8</version>
<scope>provided</scope>
</dependency>
</dependencies>
Expand Down Expand Up @@ -370,6 +371,7 @@
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.17</version>
<configuration>
<skip>true</skip>
<configLocation>quality-checks/google_checks.xml</configLocation>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<consoleOutput>true</consoleOutput>
Expand Down
26 changes: 26 additions & 0 deletions spring-boot-starters/wx-java-miniapp-spring-boot-starter/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# 使用说明
1. 在自己的Spring Boot项目里,引入maven依赖
```xml
<dependency>
<groupId>com.github.binarywang</groupId>
<artifactId>wx-java-miniapp-spring-boot-starter</artifactId>
<version>${version}</version>
</dependency>
```
2. 添加配置(application.yml)
```yml
wx:
miniapp:
appid: 111
secret: 111
token: 111
aesKey: 111
msgDataFormat: JSON
```







68 changes: 68 additions & 0 deletions spring-boot-starters/wx-java-miniapp-spring-boot-starter/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>wx-java</artifactId>
<groupId>com.github.binarywang</groupId>
<version>3.5.0</version>
<relativePath>../../</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>wx-java-miniapp-spring-boot-starter</artifactId>
<name>WxJava - Spring Boot Starter for MiniApp</name>
<description>微信小程序开发的 Spring Boot Starter</description>

<properties>
<spring.boot.version>2.1.4.RELEASE</spring.boot.version>
</properties>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
<version>${spring.boot.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<version>${spring.boot.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.github.binarywang</groupId>
<artifactId>weixin-java-miniapp</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring.boot.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
package com.binarywang.spring.starter.wxjava.miniapp.config;

import cn.binarywang.wx.miniapp.api.WxMaService;
import cn.binarywang.wx.miniapp.api.impl.WxMaServiceImpl;
import cn.binarywang.wx.miniapp.config.WxMaConfig;
import cn.binarywang.wx.miniapp.config.impl.WxMaDefaultConfigImpl;
import com.binarywang.spring.starter.wxjava.miniapp.properties.WxMaProperties;
import lombok.AllArgsConstructor;
import org.apache.commons.lang3.StringUtils;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
* 自动配置.
*
* @author <a href="https://github.com/binarywang">Binary Wang</a>
* @date 2019-08-10
*/
@AllArgsConstructor
@Configuration
@ConditionalOnClass(WxMaService.class)
@EnableConfigurationProperties(WxMaProperties.class)
@ConditionalOnProperty(prefix = "wx.miniapp", value = "enabled", matchIfMissing = true)
public class WxMaAutoConfiguration {
private WxMaProperties properties;

/**
* 小程序service.
*
* @return 小程序service
*/
@Bean
@ConditionalOnMissingBean(WxMaService.class)
public WxMaService service() {
WxMaDefaultConfigImpl config = new WxMaDefaultConfigImpl();
config.setAppid(StringUtils.trimToNull(this.properties.getAppid()));
config.setSecret(StringUtils.trimToNull(this.properties.getSecret()));
config.setToken(StringUtils.trimToNull(this.properties.getToken()));
config.setAesKey(StringUtils.trimToNull(this.properties.getAesKey()));
config.setMsgDataFormat(StringUtils.trimToNull(this.properties.getMsgDataFormat()));

final WxMaServiceImpl service = new WxMaServiceImpl();
service.setWxMaConfig(config);
return service;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
package com.binarywang.spring.starter.wxjava.miniapp.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
* 属性配置类.
*
* @author <a href="https://github.com/binarywang">Binary Wang</a>
* @date 2019-08-10
*/
@Data
@ConfigurationProperties(prefix = "wx.miniapp")
public class WxMaProperties {
/**
* 设置微信小程序的appid.
*/
private String appid;

/**
* 设置微信小程序的Secret.
*/
private String secret;

/**
* 设置微信小程序消息服务器配置的token.
*/
private String token;

/**
* 设置微信小程序消息服务器配置的EncodingAESKey.
*/
private String aesKey;

/**
* 消息格式,XML或者JSON.
*/
private String msgDataFormat;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
org.springframework.boot.autoconfigure.EnableAutoConfiguration=com.binarywang.spring.starter.wxjava.miniapp.config.WxMaAutoConfiguration
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
```xml
<dependency>
<groupId>com.github.binarywang</groupId>
<artifactId>wx-java-mp-starter</artifactId>
<artifactId>wx-java-mp-spring-boot-starter</artifactId>
<version>${version}</version>
</dependency>
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<parent>
<groupId>com.github.binarywang</groupId>
<artifactId>wx-java</artifactId>
<version>3.4.0</version>
<version>3.5.0</version>
<relativePath>../../</relativePath>
</parent>

<artifactId>wx-java-mp-starter</artifactId>
<artifactId>wx-java-mp-spring-boot-starter</artifactId>
<name>WxJava - Spring Boot Starter for MP</name>
<description>微信公众号开发的Spring Boot Starter</description>
<description>微信公众号开发的 Spring Boot Starter</description>

<properties>
<spring.boot.version>2.1.4.RELEASE</spring.boot.version>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
package com.binarywang.spring.starter.wxjava.mp;
package com.binarywang.spring.starter.wxjava.mp.config;

import com.binarywang.spring.starter.wxjava.mp.properties.WxMpProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

/**
* .
*
* @author someone
*/
@Configuration
@EnableConfigurationProperties(WxMpProperties.class)
@Import({WxMpStorageAutoConfiguration.class, WxMpServiceAutoConfiguration.class})
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
package com.binarywang.spring.starter.wxjava.mp.config;

import me.chanjar.weixin.mp.config.WxMpConfigStorage;
import me.chanjar.weixin.mp.api.WxMpService;
import me.chanjar.weixin.mp.api.impl.WxMpServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
* 微信公众号相关服务自动注册.
*
* @author someone
*/
@Configuration
public class WxMpServiceAutoConfiguration {
@Autowired
private ApplicationContext ctx;

@Bean
@ConditionalOnMissingBean
public WxMpService wxMpService(WxMpConfigStorage configStorage) {
WxMpService wxMpService = new WxMpServiceImpl();
wxMpService.setWxMpConfigStorage(configStorage);
registerWxMpSubService(wxMpService);
return wxMpService;
}

@ConditionalOnBean(WxMpService.class)
public Object registerWxMpSubService(WxMpService wxMpService) {
ConfigurableListableBeanFactory factory = (ConfigurableListableBeanFactory) ctx.getAutowireCapableBeanFactory();
factory.registerSingleton("wxMpKefuService", wxMpService.getKefuService());
factory.registerSingleton("wxMpMaterialService", wxMpService.getMaterialService());
factory.registerSingleton("wxMpMenuService", wxMpService.getMenuService());
factory.registerSingleton("wxMpUserService", wxMpService.getUserService());
factory.registerSingleton("wxMpUserTagService", wxMpService.getUserTagService());
factory.registerSingleton("wxMpQrcodeService", wxMpService.getQrcodeService());
factory.registerSingleton("wxMpCardService", wxMpService.getCardService());
factory.registerSingleton("wxMpDataCubeService", wxMpService.getDataCubeService());
factory.registerSingleton("wxMpUserBlacklistService", wxMpService.getBlackListService());
factory.registerSingleton("wxMpStoreService", wxMpService.getStoreService());
factory.registerSingleton("wxMpTemplateMsgService", wxMpService.getTemplateMsgService());
factory.registerSingleton("wxMpSubscribeMsgService", wxMpService.getSubscribeMsgService());
factory.registerSingleton("wxMpDeviceService", wxMpService.getDeviceService());
factory.registerSingleton("wxMpShakeService", wxMpService.getShakeService());
factory.registerSingleton("wxMpMemberCardService", wxMpService.getMemberCardService());
factory.registerSingleton("wxMpMassMessageService", wxMpService.getMassMessageService());
return Boolean.TRUE;
}

}
Loading