Compare commits
No commits in common. "master" and "revert-174-feature/giftcard" have entirely different histories.
master
...
revert-174
@ -1,9 +1,6 @@
|
|||||||
weixin4j
|
weixin4j
|
||||||
========
|
========
|
||||||
|
|
||||||
[](https://maven-badges.herokuapp.com/maven-central/com.foxinmy/weixin4j/)
|
|
||||||
[](https://www.apache.org/licenses/LICENSE-2.0.html)
|
|
||||||
|
|
||||||
微信开发工具包
|
微信开发工具包
|
||||||
-------------
|
-------------
|
||||||
> `weixin4j`是一个用Java编写针对微信开发的工具包,包含[weixin4j-mp](./weixin4j-mp)(微信公众平台API)、[weixin4j-qy](./weixin4j-qy)(微信企业号API)以及[weixin4j-server](./weixin4j-server)(微信回调消息服务器)三个工程.
|
> `weixin4j`是一个用Java编写针对微信开发的工具包,包含[weixin4j-mp](./weixin4j-mp)(微信公众平台API)、[weixin4j-qy](./weixin4j-qy)(微信企业号API)以及[weixin4j-server](./weixin4j-server)(微信回调消息服务器)三个工程.
|
||||||
|
|||||||
@ -1,23 +0,0 @@
|
|||||||
<ruleset comparisonMethod="maven"
|
|
||||||
xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="
|
|
||||||
http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0
|
|
||||||
http://mojo.codehaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
|
|
||||||
<ignoreVersions>
|
|
||||||
<ignoreVersion type="regex">.*(-|\.)(alpha|Alpha|ALPHA|beta|Beta|BETA|rc|RC).*</ignoreVersion>
|
|
||||||
</ignoreVersions>
|
|
||||||
<rules>
|
|
||||||
<rule groupId="javax.servlet" comparisonMethod="maven">
|
|
||||||
<ignoreVersions>
|
|
||||||
<ignoreVersion type="regex">.*-alpha[\.\-].*</ignoreVersion>
|
|
||||||
<ignoreVersion type="regex">.*-b[0-9]+</ignoreVersion>
|
|
||||||
</ignoreVersions>
|
|
||||||
</rule>
|
|
||||||
<rule groupId="javax.xml" comparisonMethod="maven">
|
|
||||||
<ignoreVersions>
|
|
||||||
<ignoreVersion type="regex">.*-b.*</ignoreVersion>
|
|
||||||
</ignoreVersions>
|
|
||||||
</rule>
|
|
||||||
</rules>
|
|
||||||
</ruleset>
|
|
||||||
196
pom.xml
196
pom.xml
@ -2,14 +2,9 @@
|
|||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
<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">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
|
||||||
<groupId>org.oxerr</groupId>
|
|
||||||
<artifactId>oxerr-parent</artifactId>
|
|
||||||
<version>1.1.0</version>
|
|
||||||
</parent>
|
|
||||||
<groupId>com.foxinmy</groupId>
|
<groupId>com.foxinmy</groupId>
|
||||||
<artifactId>weixin4j</artifactId>
|
<artifactId>weixin4j</artifactId>
|
||||||
<version>1.10.0</version>
|
<version>1.9.0-SNAPSHOT</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>weixin4j</name>
|
<name>weixin4j</name>
|
||||||
<url>https://github.com/foxinmy/weixin4j</url>
|
<url>https://github.com/foxinmy/weixin4j</url>
|
||||||
@ -24,7 +19,7 @@
|
|||||||
</license>
|
</license>
|
||||||
</licenses>
|
</licenses>
|
||||||
<scm>
|
<scm>
|
||||||
<url>https://github.com/foxinmy/weixin4j/tree/master</url>
|
<url>https://github.com/foxinmy/weixin4j</url>
|
||||||
<connection>scm:git:git://github.com/foxinmy/weixin4j.git</connection>
|
<connection>scm:git:git://github.com/foxinmy/weixin4j.git</connection>
|
||||||
<developerConnection>scm:git:git@github.com:foxinmy/weixin4j.git</developerConnection>
|
<developerConnection>scm:git:git@github.com:foxinmy/weixin4j.git</developerConnection>
|
||||||
<tag>HEAD</tag>
|
<tag>HEAD</tag>
|
||||||
@ -50,21 +45,31 @@
|
|||||||
<module>weixin4j-qy</module>
|
<module>weixin4j-qy</module>
|
||||||
<module>weixin4j-wxa</module>
|
<module>weixin4j-wxa</module>
|
||||||
<module>weixin4j-server</module>
|
<module>weixin4j-server</module>
|
||||||
<module>weixin4j-serverX</module>
|
|
||||||
<module>weixin4j-pay</module>
|
|
||||||
<module>weixin4j-example</module>
|
<module>weixin4j-example</module>
|
||||||
<module>weixin4j-coverage</module>
|
<module>weixin4j-serverX</module>
|
||||||
</modules>
|
</modules>
|
||||||
<properties>
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<maven.compiler.source>1.6</maven.compiler.source>
|
<maven.compiler.source>1.6</maven.compiler.source>
|
||||||
<maven.compiler.target>1.6</maven.compiler.target>
|
<maven.compiler.target>1.6</maven.compiler.target>
|
||||||
<locales>zh_CN</locales>
|
<fastjson.version>1.2.31</fastjson.version>
|
||||||
</properties>
|
</properties>
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.0</version>
|
||||||
|
<configuration>
|
||||||
|
<source>1.6</source>
|
||||||
|
<target>1.6</target>
|
||||||
|
<encoding>${project.build.sourceEncoding}</encoding>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-resources-plugin</artifactId>
|
<artifactId>maven-resources-plugin</artifactId>
|
||||||
|
<version>2.6</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<encoding>${project.build.sourceEncoding}</encoding>
|
<encoding>${project.build.sourceEncoding}</encoding>
|
||||||
<!-- 过滤证书文件 -->
|
<!-- 过滤证书文件 -->
|
||||||
@ -77,27 +82,29 @@
|
|||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>versions-maven-plugin</artifactId>
|
<artifactId>maven-jar-plugin</artifactId>
|
||||||
<configuration>
|
<version>2.5</version>
|
||||||
<rulesUri>file:///${session.executionRootDirectory}/maven-version-rules.xml</rulesUri>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.jacoco</groupId>
|
|
||||||
<artifactId>jacoco-maven-plugin</artifactId>
|
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
|
<id>default-jar</id>
|
||||||
|
<phase>package</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>prepare-agent</goal>
|
<goal>jar</goal>
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>report</id>
|
|
||||||
<phase>verify</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>report</goal>
|
|
||||||
</goals>
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<classesDirectory>target/classes</classesDirectory>
|
||||||
|
<excludes>
|
||||||
|
<exclude>*.properties</exclude>
|
||||||
|
<exclude>*.xml</exclude>
|
||||||
|
<exclude>*.txt</exclude>
|
||||||
|
<exclude>**/*.md</exclude>
|
||||||
|
</excludes>
|
||||||
|
<archive>
|
||||||
|
<addMavenDescriptor>true</addMavenDescriptor>
|
||||||
|
</archive>
|
||||||
|
<useDefaultManifestFile>true</useDefaultManifestFile>
|
||||||
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
@ -137,11 +144,19 @@
|
|||||||
</executions>
|
</executions>
|
||||||
<configuration>
|
<configuration>
|
||||||
<show>public</show>
|
<show>public</show>
|
||||||
|
<charset>${project.build.sourceEncoding}</charset>
|
||||||
|
<encoding>${project.build.sourceEncoding}</encoding>
|
||||||
|
<docencoding>${project.build.sourceEncoding}</docencoding>
|
||||||
<links>
|
<links>
|
||||||
<link>http://docs.oracle.com/javase/7/docs/api</link>
|
<link>http://docs.oracle.com/javase/7/docs/api</link>
|
||||||
</links>
|
</links>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-deploy-plugin</artifactId>
|
||||||
|
<version>2.8.2</version>
|
||||||
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-gpg-plugin</artifactId>
|
<artifactId>maven-gpg-plugin</artifactId>
|
||||||
@ -155,6 +170,19 @@
|
|||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-site-plugin</artifactId>
|
||||||
|
<version>3.7.1</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<version>2.18</version>
|
||||||
|
<configuration>
|
||||||
|
<skipTests>true</skipTests>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-assembly-plugin</artifactId>
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
@ -174,16 +202,6 @@
|
|||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<artifactId>findbugs-maven-plugin</artifactId>
|
|
||||||
<version>3.0.5</version>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.jacoco</groupId>
|
|
||||||
<artifactId>jacoco-maven-plugin</artifactId>
|
|
||||||
<version>0.8.7</version>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
</plugins>
|
||||||
</pluginManagement>
|
</pluginManagement>
|
||||||
<resources>
|
<resources>
|
||||||
@ -216,22 +234,6 @@
|
|||||||
<additionalparam>-Xdoclint:none</additionalparam>
|
<additionalparam>-Xdoclint:none</additionalparam>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-jxr-plugin</artifactId>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-pmd-plugin</artifactId>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-surefire-report-plugin</artifactId>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<artifactId>findbugs-maven-plugin</artifactId>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
</plugins>
|
||||||
</reporting>
|
</reporting>
|
||||||
<profiles>
|
<profiles>
|
||||||
@ -246,105 +248,23 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
<configuration>
|
|
||||||
<additionalparam>-Xdoclint:none</additionalparam>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-gpg-plugin</artifactId>
|
<artifactId>maven-gpg-plugin</artifactId>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
|
||||||
<groupId>org.sonatype.plugins</groupId>
|
|
||||||
<artifactId>nexus-staging-maven-plugin</artifactId>
|
|
||||||
<extensions>true</extensions>
|
|
||||||
<configuration>
|
|
||||||
<serverId>ossrh</serverId>
|
|
||||||
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
|
|
||||||
<autoReleaseAfterClose>true</autoReleaseAfterClose>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
</plugins>
|
||||||
<pluginManagement>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.sonatype.plugins</groupId>
|
|
||||||
<artifactId>nexus-staging-maven-plugin</artifactId>
|
|
||||||
<version>1.6.8</version>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</pluginManagement>
|
|
||||||
</build>
|
</build>
|
||||||
</profile>
|
</profile>
|
||||||
</profiles>
|
</profiles>
|
||||||
<dependencyManagement>
|
<dependencyManagement>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
|
||||||
<groupId>javax.servlet.jsp</groupId>
|
|
||||||
<artifactId>jsp-api</artifactId>
|
|
||||||
<version>2.2</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>javax.xml.bind</groupId>
|
|
||||||
<artifactId>jaxb-api</artifactId>
|
|
||||||
<version>2.3.1</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.httpcomponents</groupId>
|
|
||||||
<artifactId>httpclient</artifactId>
|
|
||||||
<version>4.5.13</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.bouncycastle</groupId>
|
|
||||||
<artifactId>bcprov-jdk16</artifactId>
|
|
||||||
<version>1.46</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework</groupId>
|
|
||||||
<artifactId>spring-context</artifactId>
|
|
||||||
<version>5.3.9</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework</groupId>
|
|
||||||
<artifactId>spring-webmvc</artifactId>
|
|
||||||
<version>5.3.9</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba</groupId>
|
|
||||||
<artifactId>fastjson</artifactId>
|
|
||||||
<version>1.2.78</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.squareup.okhttp3</groupId>
|
|
||||||
<artifactId>okhttp</artifactId>
|
|
||||||
<version>4.9.1</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>ch.qos.logback</groupId>
|
|
||||||
<artifactId>logback-core</artifactId>
|
|
||||||
<version>1.2.5</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>io.netty</groupId>
|
|
||||||
<artifactId>netty-all</artifactId>
|
|
||||||
<version>4.1.67.Final</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>commons-codec</groupId>
|
|
||||||
<artifactId>commons-codec</artifactId>
|
|
||||||
<version>1.15</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>junit</groupId>
|
<groupId>junit</groupId>
|
||||||
<artifactId>junit</artifactId>
|
<artifactId>junit</artifactId>
|
||||||
<version>4.13.2</version>
|
<version>4.8.2</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>redis.clients</groupId>
|
|
||||||
<artifactId>jedis</artifactId>
|
|
||||||
<version>3.6.3</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</dependencyManagement>
|
</dependencyManagement>
|
||||||
<distributionManagement>
|
<distributionManagement>
|
||||||
@ -357,4 +277,4 @@
|
|||||||
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
|
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
|
||||||
</repository>
|
</repository>
|
||||||
</distributionManagement>
|
</distributionManagement>
|
||||||
</project>
|
</project>
|
||||||
@ -5,7 +5,7 @@
|
|||||||
<skin>
|
<skin>
|
||||||
<groupId>org.apache.maven.skins</groupId>
|
<groupId>org.apache.maven.skins</groupId>
|
||||||
<artifactId>maven-fluido-skin</artifactId>
|
<artifactId>maven-fluido-skin</artifactId>
|
||||||
<version>1.9</version>
|
<version>1.7</version>
|
||||||
</skin>
|
</skin>
|
||||||
<body>
|
<body>
|
||||||
<menu ref="parent" inherit="top" />
|
<menu ref="parent" inherit="top" />
|
||||||
|
|||||||
@ -5,43 +5,13 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.foxinmy</groupId>
|
<groupId>com.foxinmy</groupId>
|
||||||
<artifactId>weixin4j</artifactId>
|
<artifactId>weixin4j</artifactId>
|
||||||
<version>1.10.0</version>
|
<version>1.9.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>weixin4j-base</artifactId>
|
<artifactId>weixin4j-base</artifactId>
|
||||||
<name>weixin4j-base</name>
|
<name>weixin4j-base</name>
|
||||||
<description>微信开发基础工程</description>
|
<description>微信开发基础工程</description>
|
||||||
<url>https://github.com/foxinmy/weixin4j/tree/master/weixin4j-base</url>
|
<url>https://github.com/foxinmy/weixin4j/tree/master/weixin4j-base</url>
|
||||||
<properties>
|
|
||||||
<maven.test.skip>true</maven.test.skip>
|
|
||||||
</properties>
|
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-jar-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>default-jar</id>
|
|
||||||
<phase>package</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>jar</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<classesDirectory>target/classes</classesDirectory>
|
|
||||||
<excludes>
|
|
||||||
<exclude>*.properties</exclude>
|
|
||||||
<exclude>*.xml</exclude>
|
|
||||||
<exclude>*.txt</exclude>
|
|
||||||
<exclude>**/*.md</exclude>
|
|
||||||
</excludes>
|
|
||||||
<archive>
|
|
||||||
<addMavenDescriptor>true</addMavenDescriptor>
|
|
||||||
</archive>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
<resources>
|
<resources>
|
||||||
<resource>
|
<resource>
|
||||||
<directory>src/main/resources</directory>
|
<directory>src/main/resources</directory>
|
||||||
@ -53,6 +23,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba</groupId>
|
<groupId>com.alibaba</groupId>
|
||||||
<artifactId>fastjson</artifactId>
|
<artifactId>fastjson</artifactId>
|
||||||
|
<version>${fastjson.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>junit</groupId>
|
<groupId>junit</groupId>
|
||||||
@ -61,22 +32,25 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-httpclient</groupId>
|
<groupId>commons-httpclient</groupId>
|
||||||
<artifactId>commons-httpclient</artifactId>
|
<artifactId>commons-httpclient</artifactId>
|
||||||
<version>3.1</version>
|
<version>3.0</version>
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.httpcomponents</groupId>
|
<groupId>org.apache.httpcomponents</groupId>
|
||||||
<artifactId>httpclient</artifactId>
|
<artifactId>httpclient</artifactId>
|
||||||
|
<version>4.3</version>
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.netty</groupId>
|
<groupId>io.netty</groupId>
|
||||||
<artifactId>netty-all</artifactId>
|
<artifactId>netty-all</artifactId>
|
||||||
|
<version>4.0.30.Final</version>
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.squareup.okhttp3</groupId>
|
<groupId>com.squareup.okhttp3</groupId>
|
||||||
<artifactId>okhttp</artifactId>
|
<artifactId>okhttp</artifactId>
|
||||||
|
<version>3.4.1</version>
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -88,6 +62,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>redis.clients</groupId>
|
<groupId>redis.clients</groupId>
|
||||||
<artifactId>jedis</artifactId>
|
<artifactId>jedis</artifactId>
|
||||||
|
<version>2.8.1</version>
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -96,15 +71,5 @@
|
|||||||
<version>3.0.2</version>
|
<version>3.0.2</version>
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.bouncycastle</groupId>
|
|
||||||
<artifactId>bcprov-jdk16</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<!-- 兼容 JDK 9+ 后的maven环境编译 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>javax.xml.bind</groupId>
|
|
||||||
<artifactId>jaxb-api</artifactId>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
@ -45,9 +45,7 @@ import com.foxinmy.weixin4j.xml.XmlStream;
|
|||||||
* @see <a href=
|
* @see <a href=
|
||||||
* "https://pay.weixin.qq.com/wiki/doc/api/tools/mch_pay.php?chapter=14_1">
|
* "https://pay.weixin.qq.com/wiki/doc/api/tools/mch_pay.php?chapter=14_1">
|
||||||
* 企业付款</a>
|
* 企业付款</a>
|
||||||
* @deprecated 商户平台API迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public class CashApi extends MchApi {
|
public class CashApi extends MchApi {
|
||||||
|
|
||||||
public CashApi(WeixinPayAccount weixinAccount) {
|
public CashApi(WeixinPayAccount weixinAccount) {
|
||||||
@ -94,7 +92,7 @@ public class CashApi extends MchApi {
|
|||||||
/**
|
/**
|
||||||
* 批量发放红包 企业向微信用户个人发现金红包
|
* 批量发放红包 企业向微信用户个人发现金红包
|
||||||
*
|
*
|
||||||
* @param redpackets
|
* @param redpacket
|
||||||
* 多个红包信息
|
* 多个红包信息
|
||||||
* @return 发放结果
|
* @return 发放结果
|
||||||
* @see #sendRedpacks(Redpacket...)
|
* @see #sendRedpacks(Redpacket...)
|
||||||
|
|||||||
@ -21,9 +21,7 @@ import com.foxinmy.weixin4j.xml.XmlStream;
|
|||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see <a href=
|
* @see <a href=
|
||||||
* "https://pay.weixin.qq.com/wiki/doc/api/tools/sp_coupon.php?chapter=12_1">代金券</a>
|
* "https://pay.weixin.qq.com/wiki/doc/api/tools/sp_coupon.php?chapter=12_1">代金券</a>
|
||||||
* @deprecated 商户平台API迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public class CouponApi extends MchApi {
|
public class CouponApi extends MchApi {
|
||||||
|
|
||||||
public CouponApi(WeixinPayAccount weixinAccount) {
|
public CouponApi(WeixinPayAccount weixinAccount) {
|
||||||
|
|||||||
@ -22,9 +22,7 @@ import com.foxinmy.weixin4j.xml.XmlStream;
|
|||||||
* @date 2016年3月67日
|
* @date 2016年3月67日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see
|
* @see
|
||||||
* @deprecated 商户平台API迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public class CustomsApi extends MchApi {
|
public class CustomsApi extends MchApi {
|
||||||
|
|
||||||
public CustomsApi(WeixinPayAccount weixinAccount) {
|
public CustomsApi(WeixinPayAccount weixinAccount) {
|
||||||
|
|||||||
@ -27,15 +27,11 @@ import com.foxinmy.weixin4j.util.Weixin4jConfigUtil;
|
|||||||
* @date 2016年3月26日
|
* @date 2016年3月26日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see <a href="https://pay.weixin.qq.com/wiki/doc/api/index.html">商户支付平台</a>
|
* @see <a href="https://pay.weixin.qq.com/wiki/doc/api/index.html">商户支付平台</a>
|
||||||
* @deprecated 商户平台API迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public class MchApi extends BaseApi {
|
public class MchApi extends BaseApi {
|
||||||
|
|
||||||
private final static ResourceBundle WEIXIN_BUNDLE;
|
private final static ResourceBundle WEIXIN_BUNDLE;
|
||||||
|
|
||||||
private final static String PEM_CERT_PREFIX = "-----BEGIN CERTIFICATE-----";
|
|
||||||
|
|
||||||
static {
|
static {
|
||||||
WEIXIN_BUNDLE = ResourceBundle.getBundle("com/foxinmy/weixin4j/payment/weixin");
|
WEIXIN_BUNDLE = ResourceBundle.getBundle("com/foxinmy/weixin4j/payment/weixin");
|
||||||
}
|
}
|
||||||
@ -97,28 +93,21 @@ public class MchApi extends BaseApi {
|
|||||||
*/
|
*/
|
||||||
protected WeixinRequestExecutor getWeixinSSLExecutor() throws WeixinException {
|
protected WeixinRequestExecutor getWeixinSSLExecutor() throws WeixinException {
|
||||||
if (weixinSSLExecutor == null) {
|
if (weixinSSLExecutor == null) {
|
||||||
if(weixinAccount.getCertificateFile().startsWith(PEM_CERT_PREFIX)){
|
try {
|
||||||
// 证书是PEM格式,直接使用PEM内容生成请求执行类
|
InputStream is = null;
|
||||||
this.weixinSSLExecutor = weixinExecutor.createSSLRequestExecutor(weixinAccount.getMchId(),
|
File certificate = new File(
|
||||||
weixinAccount.getCertificateFile(), weixinAccount.getCertificateKey());
|
Weixin4jConfigUtil.replaceClassPathValue(weixinAccount.getCertificateFile()));
|
||||||
}else {
|
if (!certificate.exists() || !certificate.isFile()) {
|
||||||
// 证书是p12格式,读取证书文件并生成请求执行类
|
is = Weixin4jConfigUtil.CLASSLOADER.getResourceAsStream(certificate.getName());
|
||||||
try {
|
} else {
|
||||||
InputStream is = null;
|
is = new FileInputStream(certificate);
|
||||||
File certificate = new File(
|
|
||||||
Weixin4jConfigUtil.replaceClassPathValue(weixinAccount.getCertificateFile()));
|
|
||||||
if (!certificate.exists() || !certificate.isFile()) {
|
|
||||||
is = Weixin4jConfigUtil.CLASSLOADER.getResourceAsStream(certificate.getName());
|
|
||||||
} else {
|
|
||||||
is = new FileInputStream(certificate);
|
|
||||||
}
|
|
||||||
if (is == null) {
|
|
||||||
throw new WeixinException("Invalid certificate file : " + certificate.toString());
|
|
||||||
}
|
|
||||||
this.weixinSSLExecutor = weixinExecutor.createSSLRequestExecutor(weixinAccount.getCertificateKey(), is);
|
|
||||||
} catch (IOException e) {
|
|
||||||
throw new WeixinException("IO Error on createSSLRequestExecutor", e);
|
|
||||||
}
|
}
|
||||||
|
if (is == null) {
|
||||||
|
throw new WeixinException("Invalid certificate file : " + certificate.toString());
|
||||||
|
}
|
||||||
|
this.weixinSSLExecutor = weixinExecutor.createSSLRequestExecutor(weixinAccount.getCertificateKey(), is);
|
||||||
|
} catch (IOException e) {
|
||||||
|
throw new WeixinException("IO Error on createSSLRequestExecutor", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return this.weixinSSLExecutor;
|
return this.weixinSSLExecutor;
|
||||||
|
|||||||
@ -60,9 +60,7 @@ import com.foxinmy.weixin4j.xml.XmlStream;
|
|||||||
* @author jinyu(foxinmy@gmail.com)
|
* @author jinyu(foxinmy@gmail.com)
|
||||||
* @date 2014年10月28日
|
* @date 2014年10月28日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @deprecated 商户平台API迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public class PayApi extends MchApi {
|
public class PayApi extends MchApi {
|
||||||
|
|
||||||
public PayApi(WeixinPayAccount weixinAccount) {
|
public PayApi(WeixinPayAccount weixinAccount) {
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import com.foxinmy.weixin4j.util.SerializationUtils;
|
|||||||
import redis.clients.jedis.Jedis;
|
import redis.clients.jedis.Jedis;
|
||||||
import redis.clients.jedis.JedisPool;
|
import redis.clients.jedis.JedisPool;
|
||||||
import redis.clients.jedis.JedisPoolConfig;
|
import redis.clients.jedis.JedisPoolConfig;
|
||||||
import redis.clients.jedis.util.Pool;
|
import redis.clients.util.Pool;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用Redis保存缓存对象(推荐使用)
|
* 用Redis保存缓存对象(推荐使用)
|
||||||
|
|||||||
@ -17,19 +17,11 @@ public final class HttpParams {
|
|||||||
/**
|
/**
|
||||||
* 连接超时时间(单位毫秒)
|
* 连接超时时间(单位毫秒)
|
||||||
*/
|
*/
|
||||||
private final int connectTimeout;
|
private int connectTimeout;
|
||||||
/**
|
/**
|
||||||
* 读取超时时间(单位毫秒)
|
* 读取超时时间(单位毫秒)
|
||||||
*/
|
*/
|
||||||
private final int readTimeout;
|
private int readTimeout;
|
||||||
/**
|
|
||||||
* 最大连接数
|
|
||||||
*/
|
|
||||||
private final int maxConnections;
|
|
||||||
/**
|
|
||||||
* 每个host最大连接数
|
|
||||||
*/
|
|
||||||
private final int maxConnectionsPerHost;
|
|
||||||
/**
|
/**
|
||||||
* 代理对象
|
* 代理对象
|
||||||
*/
|
*/
|
||||||
@ -44,17 +36,15 @@ public final class HttpParams {
|
|||||||
private HostnameVerifier hostnameVerifier;
|
private HostnameVerifier hostnameVerifier;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* connectTimeout = 15000,readTimeout=20000,maxConnection=100,maxConnectionPerHost=32
|
* connectTimeout = 15000,readTimeout=20000
|
||||||
*/
|
*/
|
||||||
public HttpParams() {
|
public HttpParams() {
|
||||||
this(5000, 15000,100,32);
|
this(5000, 15000);
|
||||||
}
|
}
|
||||||
|
|
||||||
public HttpParams(int connectTimeout, int readTimeout,int maxConnections,int maxConnectionsPerHost) {
|
public HttpParams(int connectTimeout, int readTimeout) {
|
||||||
this.connectTimeout = connectTimeout;
|
this.connectTimeout = connectTimeout;
|
||||||
this.readTimeout = readTimeout;
|
this.readTimeout = readTimeout;
|
||||||
this.maxConnections = maxConnections;
|
|
||||||
this.maxConnectionsPerHost = maxConnectionsPerHost;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getConnectTimeout() {
|
public int getConnectTimeout() {
|
||||||
@ -65,14 +55,6 @@ public final class HttpParams {
|
|||||||
return readTimeout;
|
return readTimeout;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getMaxConnections() {
|
|
||||||
return maxConnections;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getMaxConnectionsPerHost() {
|
|
||||||
return maxConnectionsPerHost;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Proxy getProxy() {
|
public Proxy getProxy() {
|
||||||
return proxy;
|
return proxy;
|
||||||
}
|
}
|
||||||
@ -102,7 +84,7 @@ public final class HttpParams {
|
|||||||
|
|
||||||
public static HttpParams copy(final HttpParams params) {
|
public static HttpParams copy(final HttpParams params) {
|
||||||
return new HttpParams(params.getConnectTimeout(),
|
return new HttpParams(params.getConnectTimeout(),
|
||||||
params.getReadTimeout(),params.getMaxConnections(),params.getMaxConnectionsPerHost()).setProxy(params.getProxy())
|
params.getReadTimeout()).setProxy(params.getProxy())
|
||||||
.setHostnameVerifier(params.getHostnameVerifier())
|
.setHostnameVerifier(params.getHostnameVerifier())
|
||||||
.setSSLContext(params.getSSLContext());
|
.setSSLContext(params.getSSLContext());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,7 +5,6 @@ import java.net.InetSocketAddress;
|
|||||||
import org.apache.commons.httpclient.HttpClient;
|
import org.apache.commons.httpclient.HttpClient;
|
||||||
import org.apache.commons.httpclient.HttpConnectionManager;
|
import org.apache.commons.httpclient.HttpConnectionManager;
|
||||||
import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager;
|
import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager;
|
||||||
import org.apache.commons.httpclient.params.HttpConnectionManagerParams;
|
|
||||||
import org.apache.commons.httpclient.protocol.Protocol;
|
import org.apache.commons.httpclient.protocol.Protocol;
|
||||||
|
|
||||||
import com.foxinmy.weixin4j.http.HttpParams;
|
import com.foxinmy.weixin4j.http.HttpParams;
|
||||||
@ -63,10 +62,8 @@ public class HttpComponent3Factory extends HttpClientFactory {
|
|||||||
new SSLProtocolSocketFactory(params.getSSLContext()),
|
new SSLProtocolSocketFactory(params.getSSLContext()),
|
||||||
443));
|
443));
|
||||||
}
|
}
|
||||||
HttpConnectionManagerParams params_ = httpClient.getHttpConnectionManager().getParams();
|
httpClient.getHttpConnectionManager().getParams()
|
||||||
params_.setMaxTotalConnections(params.getMaxConnections());
|
.setConnectionTimeout(params.getConnectTimeout());
|
||||||
params_.setDefaultMaxConnectionsPerHost(params.getMaxConnectionsPerHost());
|
|
||||||
params_.setConnectionTimeout(params.getConnectTimeout());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -40,9 +40,14 @@ public class HttpComponent4_1Factory extends HttpClientFactory {
|
|||||||
*
|
*
|
||||||
* @see <a
|
* @see <a
|
||||||
* href="https://issues.apache.org/jira/browse/HTTPCLIENT-1193">HTTPCLIENT-1193</a>
|
* href="https://issues.apache.org/jira/browse/HTTPCLIENT-1193">HTTPCLIENT-1193</a>
|
||||||
|
* @param clientConnectionManager
|
||||||
*/
|
*/
|
||||||
public HttpComponent4_1Factory() {
|
public HttpComponent4_1Factory() {
|
||||||
httpClient = new DefaultHttpClient(new PoolingClientConnectionManager());
|
PoolingClientConnectionManager clientConnectionManager = new PoolingClientConnectionManager();
|
||||||
|
clientConnectionManager.setMaxTotal(30);
|
||||||
|
clientConnectionManager.setDefaultMaxPerRoute(clientConnectionManager
|
||||||
|
.getMaxTotal());
|
||||||
|
httpClient = new DefaultHttpClient(clientConnectionManager);
|
||||||
httpClient.getParams().setParameter(
|
httpClient.getParams().setParameter(
|
||||||
CoreProtocolPNames.HTTP_CONTENT_CHARSET, Consts.UTF_8);
|
CoreProtocolPNames.HTTP_CONTENT_CHARSET, Consts.UTF_8);
|
||||||
httpClient.getParams().setParameter(
|
httpClient.getParams().setParameter(
|
||||||
@ -105,11 +110,6 @@ public class HttpComponent4_1Factory extends HttpClientFactory {
|
|||||||
httpClient.getConnectionManager().getSchemeRegistry()
|
httpClient.getConnectionManager().getSchemeRegistry()
|
||||||
.register(scheme);
|
.register(scheme);
|
||||||
}
|
}
|
||||||
ClientConnectionManager connectionManager = httpClient.getConnectionManager();
|
|
||||||
if(connectionManager instanceof PoolingClientConnectionManager){
|
|
||||||
((PoolingClientConnectionManager) connectionManager).setMaxTotal(params.getMaxConnections());
|
|
||||||
((PoolingClientConnectionManager) connectionManager).setDefaultMaxPerRoute(params.getMaxConnectionsPerHost());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -99,8 +99,6 @@ public class HttpComponent4_2Factory extends HttpClientFactory {
|
|||||||
clientBuilder.setHostnameVerifier(new CustomHostnameVerifier(
|
clientBuilder.setHostnameVerifier(new CustomHostnameVerifier(
|
||||||
params.getHostnameVerifier()));
|
params.getHostnameVerifier()));
|
||||||
}
|
}
|
||||||
clientBuilder.setMaxConnTotal(params.getMaxConnections());
|
|
||||||
clientBuilder.setMaxConnPerRoute(params.getMaxConnectionsPerHost());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -50,8 +50,6 @@ public class OkHttpClient2Factory extends HttpClientFactory {
|
|||||||
if (params.getHostnameVerifier() != null) {
|
if (params.getHostnameVerifier() != null) {
|
||||||
okClient.setHostnameVerifier(params.getHostnameVerifier());
|
okClient.setHostnameVerifier(params.getHostnameVerifier());
|
||||||
}
|
}
|
||||||
okClient.getDispatcher().setMaxRequests(params.getMaxConnections());
|
|
||||||
okClient.getDispatcher().setMaxRequestsPerHost(params.getMaxConnectionsPerHost());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -60,10 +60,6 @@ public class OkHttpClient3Factory extends HttpClientFactory {
|
|||||||
if (params.getHostnameVerifier() != null) {
|
if (params.getHostnameVerifier() != null) {
|
||||||
clientBuilder.hostnameVerifier(params.getHostnameVerifier());
|
clientBuilder.hostnameVerifier(params.getHostnameVerifier());
|
||||||
}
|
}
|
||||||
Dispatcher dispatcher = new Dispatcher();
|
|
||||||
dispatcher.setMaxRequests(params.getMaxConnections());
|
|
||||||
dispatcher.setMaxRequestsPerHost(params.getMaxConnectionsPerHost());
|
|
||||||
clientBuilder.dispatcher(dispatcher);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,22 +1,12 @@
|
|||||||
package com.foxinmy.weixin4j.http.weixin;
|
package com.foxinmy.weixin4j.http.weixin;
|
||||||
|
|
||||||
import java.io.ByteArrayInputStream;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.security.*;
|
import java.security.KeyStore;
|
||||||
import java.security.cert.CertificateFactory;
|
|
||||||
import java.security.interfaces.RSAPrivateKey;
|
|
||||||
import java.security.spec.InvalidKeySpecException;
|
|
||||||
import java.security.spec.PKCS8EncodedKeySpec;
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
import javax.net.ssl.KeyManagerFactory;
|
import javax.net.ssl.KeyManagerFactory;
|
||||||
import javax.net.ssl.SSLContext;
|
import javax.net.ssl.SSLContext;
|
||||||
import java.security.cert.CertificateException;
|
|
||||||
import java.security.cert.X509Certificate;
|
|
||||||
import java.util.regex.Matcher;
|
|
||||||
import java.util.regex.Pattern;
|
|
||||||
import javax.xml.bind.DatatypeConverter;
|
|
||||||
|
|
||||||
import com.foxinmy.weixin4j.exception.WeixinException;
|
import com.foxinmy.weixin4j.exception.WeixinException;
|
||||||
import com.foxinmy.weixin4j.http.HttpClient;
|
import com.foxinmy.weixin4j.http.HttpClient;
|
||||||
@ -39,9 +29,6 @@ import com.foxinmy.weixin4j.logging.InternalLogLevel;
|
|||||||
import com.foxinmy.weixin4j.logging.InternalLogger;
|
import com.foxinmy.weixin4j.logging.InternalLogger;
|
||||||
import com.foxinmy.weixin4j.logging.InternalLoggerFactory;
|
import com.foxinmy.weixin4j.logging.InternalLoggerFactory;
|
||||||
import com.foxinmy.weixin4j.util.Consts;
|
import com.foxinmy.weixin4j.util.Consts;
|
||||||
import com.foxinmy.weixin4j.util.StringUtil;
|
|
||||||
import org.bouncycastle.jce.provider.BouncyCastleProvider;
|
|
||||||
import static java.util.regex.Pattern.CASE_INSENSITIVE;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 负责微信请求的执行
|
* 负责微信请求的执行
|
||||||
@ -69,18 +56,6 @@ public class WeixinRequestExecutor {
|
|||||||
this.httpClient = HttpClientFactory.getInstance(params);
|
this.httpClient = HttpClientFactory.getInstance(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final Pattern CERT_PATTERN = Pattern.compile(
|
|
||||||
"-+BEGIN\\s+.*CERTIFICATE[^-]*-+(?:\\s|\\r|\\n)+" + // Header
|
|
||||||
"([a-z0-9+/=\\r\\n]+)" + // Base64 text
|
|
||||||
"-+END\\s+.*CERTIFICATE[^-]*-+", // Footer
|
|
||||||
CASE_INSENSITIVE);
|
|
||||||
|
|
||||||
private static final Pattern KEY_PATTERN = Pattern.compile(
|
|
||||||
"-+BEGIN\\s+.*PRIVATE\\s+KEY[^-]*-+(?:\\s|\\r|\\n)+" + // Header
|
|
||||||
"([a-z0-9+/=\\r\\n]+)" + // Base64 text
|
|
||||||
"-+END\\s+.*PRIVATE\\s+KEY[^-]*-+", // Footer
|
|
||||||
CASE_INSENSITIVE);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Post方法执行微信请求
|
* Post方法执行微信请求
|
||||||
*
|
*
|
||||||
@ -219,13 +194,10 @@ public class WeixinRequestExecutor {
|
|||||||
try {
|
try {
|
||||||
XmlResult xmlResult = XmlMessageConverter.GLOBAL.convert(
|
XmlResult xmlResult = XmlMessageConverter.GLOBAL.convert(
|
||||||
XmlResult.class, response);
|
XmlResult.class, response);
|
||||||
// 微信最新的刷脸支付API中已没有返回resultCode,需做非空判断,否则抛异常
|
if (!SUCCESS_CODE.contains(String.format(",%s,", xmlResult
|
||||||
if(StringUtil.isNotBlank(xmlResult.getResultCode())) {
|
.getResultCode().toLowerCase()))) {
|
||||||
if (!SUCCESS_CODE.contains(String.format(",%s,", xmlResult
|
throw new WeixinException(xmlResult.getErrCode(),
|
||||||
.getResultCode().toLowerCase()))) {
|
xmlResult.getErrCodeDes());
|
||||||
throw new WeixinException(xmlResult.getErrCode(),
|
|
||||||
xmlResult.getErrCodeDes());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
;
|
;
|
||||||
@ -278,69 +250,4 @@ public class WeixinRequestExecutor {
|
|||||||
params.setSSLContext(sslContext);
|
params.setSSLContext(sslContext);
|
||||||
return new WeixinRequestExecutor(params);
|
return new WeixinRequestExecutor(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 使用PEM格式证书创建SSL微信请求对象
|
|
||||||
*
|
|
||||||
* @param pemCertificate
|
|
||||||
* PEM格式证书内容
|
|
||||||
* @param pemPrivateKey
|
|
||||||
* PEM格式证书私钥
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public WeixinRequestExecutor createSSLRequestExecutor(String password, String pemCertificate, String pemPrivateKey) throws WeixinException{
|
|
||||||
Security.addProvider(new BouncyCastleProvider());
|
|
||||||
|
|
||||||
try {
|
|
||||||
byte[] certBytes = parseDERFromPEM(pemCertificate);
|
|
||||||
byte[] keyBytes = parseDERFromPEM(pemPrivateKey);
|
|
||||||
|
|
||||||
char[] passwordChars = password.toCharArray();
|
|
||||||
X509Certificate cert = generateCertificateFromDER(certBytes);
|
|
||||||
RSAPrivateKey key = generatePrivateKeyFromDER(keyBytes);
|
|
||||||
|
|
||||||
KeyStore keystore = KeyStore.getInstance("JKS");
|
|
||||||
keystore.load(null);
|
|
||||||
keystore.setCertificateEntry("cert-alias", cert);
|
|
||||||
keystore.setKeyEntry("key-alias", key, passwordChars, new X509Certificate[] {cert});
|
|
||||||
|
|
||||||
KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509");
|
|
||||||
kmf.init(keystore, passwordChars);
|
|
||||||
|
|
||||||
SSLContext context = SSLContext.getInstance("TLS");
|
|
||||||
context.init(kmf.getKeyManagers(), null, new java.security.SecureRandom());
|
|
||||||
|
|
||||||
return createSSLRequestExecutor(context);
|
|
||||||
} catch (Exception e) {
|
|
||||||
throw new WeixinException("Certificate load error", e);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private static byte[] parseDERFromPEM(String data) throws KeyStoreException {
|
|
||||||
Matcher matcher = CERT_PATTERN.matcher(data);
|
|
||||||
String content = "";
|
|
||||||
if(!matcher.find()){
|
|
||||||
matcher = KEY_PATTERN.matcher(data);
|
|
||||||
if(!matcher.find()){
|
|
||||||
throw new KeyStoreException("found no private key or certificate from content:"+ data);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
content = matcher.group(1);
|
|
||||||
return DatatypeConverter.parseBase64Binary(content);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static RSAPrivateKey generatePrivateKeyFromDER(byte[] keyBytes) throws InvalidKeySpecException, NoSuchAlgorithmException {
|
|
||||||
PKCS8EncodedKeySpec spec = new PKCS8EncodedKeySpec(keyBytes);
|
|
||||||
|
|
||||||
KeyFactory factory = KeyFactory.getInstance("RSA");
|
|
||||||
|
|
||||||
return (RSAPrivateKey)factory.generatePrivate(spec);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected static X509Certificate generateCertificateFromDER(byte[] certBytes) throws CertificateException {
|
|
||||||
CertificateFactory factory = CertificateFactory.getInstance("X.509");
|
|
||||||
|
|
||||||
return (X509Certificate)factory.generateCertificate(new ByteArrayInputStream(certBytes));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -68,10 +68,6 @@ public class XmlResult implements Serializable {
|
|||||||
return resultCode;
|
return resultCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setReturnCode(String returnCode) {
|
|
||||||
this.returnCode = returnCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getErrCode() {
|
public String getErrCode() {
|
||||||
return errCode;
|
return errCode;
|
||||||
}
|
}
|
||||||
@ -88,10 +84,6 @@ public class XmlResult implements Serializable {
|
|||||||
return returnMsg;
|
return returnMsg;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setReturnMsg(String returnMsg) {
|
|
||||||
this.returnMsg = returnMsg;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setResultCode(String resultCode) {
|
public void setResultCode(String resultCode) {
|
||||||
this.resultCode = resultCode;
|
this.resultCode = resultCode;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,41 +15,23 @@ package com.foxinmy.weixin4j.jssdk;
|
|||||||
* 企业号JSSDK</a>
|
* 企业号JSSDK</a>
|
||||||
*/
|
*/
|
||||||
public enum JSSDKAPI {
|
public enum JSSDKAPI {
|
||||||
/**
|
|
||||||
* <a href=
|
|
||||||
* "https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/JS-SDK.html#111">
|
|
||||||
* 自定义“分享给朋友”及“分享到QQ”按钮的分享内容(1.4.0)</a>
|
|
||||||
*/
|
|
||||||
updateAppMessageShareData,
|
|
||||||
/**
|
|
||||||
* <a href=
|
|
||||||
* "https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/JS-SDK.html#112">
|
|
||||||
* 自定义“分享给朋友”及“分享到QQ”按钮的分享内容(1.4.0)</a>
|
|
||||||
*/
|
|
||||||
updateTimelineShareData,
|
|
||||||
/***
|
/***
|
||||||
* <a href=
|
* <a href=
|
||||||
* "http://mp.weixin.qq.com/wiki/11/74ad127cc054f6b80759c40f77ec03db.html#.E8.8E.B7.E5.8F.96.E2.80.9C.E5.88.86.E4.BA.AB.E5.88.B0.E6.9C.8B.E5.8F.8B.E5.9C.88.E2.80.9D.E6.8C.89.E9.92.AE.E7.82.B9.E5.87.BB.E7.8A.B6.E6.80.81.E5.8F.8A.E8.87.AA.E5.AE.9A.E4.B9.89.E5.88.86.E4.BA.AB.E5.86.85.E5.AE.B9.E6.8E.A5.E5.8F.A3"
|
* "http://mp.weixin.qq.com/wiki/11/74ad127cc054f6b80759c40f77ec03db.html#.E8.8E.B7.E5.8F.96.E2.80.9C.E5.88.86.E4.BA.AB.E5.88.B0.E6.9C.8B.E5.8F.8B.E5.9C.88.E2.80.9D.E6.8C.89.E9.92.AE.E7.82.B9.E5.87.BB.E7.8A.B6.E6.80.81.E5.8F.8A.E8.87.AA.E5.AE.9A.E4.B9.89.E5.88.86.E4.BA.AB.E5.86.85.E5.AE.B9.E6.8E.A5.E5.8F.A3"
|
||||||
* >分享接口-获取“分享到朋友圈”按钮点击状态及自定义分享内容接口(即将废弃)</a>
|
* >分享接口-获取“分享到朋友圈”按钮点击状态及自定义分享内容接口</a>
|
||||||
* @deprecated
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
onMenuShareTimeline,
|
onMenuShareTimeline,
|
||||||
/***
|
/***
|
||||||
* <a href=
|
* <a href=
|
||||||
* "http://mp.weixin.qq.com/wiki/11/74ad127cc054f6b80759c40f77ec03db.html#.E8.8E.B7.E5.8F.96.E2.80.9C.E5.88.86.E4.BA.AB.E7.BB.99.E6.9C.8B.E5.8F.8B.E2.80.9D.E6.8C.89.E9.92.AE.E7.82.B9.E5.87.BB.E7.8A.B6.E6.80.81.E5.8F.8A.E8.87.AA.E5.AE.9A.E4.B9.89.E5.88.86.E4.BA.AB.E5.86.85.E5.AE.B9.E6.8E.A5.E5.8F.A3"
|
* "http://mp.weixin.qq.com/wiki/11/74ad127cc054f6b80759c40f77ec03db.html#.E8.8E.B7.E5.8F.96.E2.80.9C.E5.88.86.E4.BA.AB.E7.BB.99.E6.9C.8B.E5.8F.8B.E2.80.9D.E6.8C.89.E9.92.AE.E7.82.B9.E5.87.BB.E7.8A.B6.E6.80.81.E5.8F.8A.E8.87.AA.E5.AE.9A.E4.B9.89.E5.88.86.E4.BA.AB.E5.86.85.E5.AE.B9.E6.8E.A5.E5.8F.A3"
|
||||||
* >分享接口-获取“分享给朋友”按钮点击状态及自定义分享内容接口(即将废弃)</a>
|
* >分享接口-获取“分享给朋友”按钮点击状态及自定义分享内容接口</a>
|
||||||
* @deprecated
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
onMenuShareAppMessage,
|
onMenuShareAppMessage,
|
||||||
/***
|
/***
|
||||||
* <a href=
|
* <a href=
|
||||||
* "http://mp.weixin.qq.com/wiki/11/74ad127cc054f6b80759c40f77ec03db.html#.E8.8E.B7.E5.8F.96.E2.80.9C.E5.88.86.E4.BA.AB.E5.88.B0QQ.E2.80.9D.E6.8C.89.E9.92.AE.E7.82.B9.E5.87.BB.E7.8A.B6.E6.80.81.E5.8F.8A.E8.87.AA.E5.AE.9A.E4.B9.89.E5.88.86.E4.BA.AB.E5.86.85.E5.AE.B9.E6.8E.A5.E5.8F.A3"
|
* "http://mp.weixin.qq.com/wiki/11/74ad127cc054f6b80759c40f77ec03db.html#.E8.8E.B7.E5.8F.96.E2.80.9C.E5.88.86.E4.BA.AB.E5.88.B0QQ.E2.80.9D.E6.8C.89.E9.92.AE.E7.82.B9.E5.87.BB.E7.8A.B6.E6.80.81.E5.8F.8A.E8.87.AA.E5.AE.9A.E4.B9.89.E5.88.86.E4.BA.AB.E5.86.85.E5.AE.B9.E6.8E.A5.E5.8F.A3"
|
||||||
* >分享接口-获取“分享到QQ”按钮点击状态及自定义分享内容接口(即将废弃)</a>
|
* >分享接口-获取“分享到QQ”按钮点击状态及自定义分享内容接口</a>
|
||||||
* @deprecated
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
onMenuShareQQ,
|
onMenuShareQQ,
|
||||||
/***
|
/***
|
||||||
* <a href=
|
* <a href=
|
||||||
@ -288,12 +270,8 @@ public enum JSSDKAPI {
|
|||||||
/**
|
/**
|
||||||
* 分享接口集合
|
* 分享接口集合
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public final static JSSDKAPI[] SHARE_APIS = { onMenuShareTimeline, onMenuShareAppMessage, onMenuShareQQ,
|
public final static JSSDKAPI[] SHARE_APIS = { onMenuShareTimeline, onMenuShareAppMessage, onMenuShareQQ,
|
||||||
onMenuShareWeibo, onMenuShareQZone };
|
onMenuShareWeibo, onMenuShareQZone };
|
||||||
|
|
||||||
public final static JSSDKAPI[] ALL_SHARE_APIS = { updateAppMessageShareData, updateTimelineShareData,
|
|
||||||
onMenuShareWeibo, onMenuShareQZone };
|
|
||||||
/**
|
/**
|
||||||
* 图像接口集合
|
* 图像接口集合
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -16,10 +16,6 @@
|
|||||||
package com.foxinmy.weixin4j.logging;
|
package com.foxinmy.weixin4j.logging;
|
||||||
|
|
||||||
|
|
||||||
import com.foxinmy.weixin4j.util.Weixin4jConfigUtil;
|
|
||||||
|
|
||||||
import java.util.logging.ConsoleHandler;
|
|
||||||
import java.util.logging.Level;
|
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -31,15 +27,6 @@ public class JdkLoggerFactory extends InternalLoggerFactory {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public InternalLogger newInstance(String name) {
|
public InternalLogger newInstance(String name) {
|
||||||
Logger logger = Logger.getLogger(name);
|
return new JdkLogger(Logger.getLogger(name));
|
||||||
Level level = Weixin4jConfigUtil.getJdkLoggerLevel();
|
|
||||||
logger.setLevel(level);
|
|
||||||
if(logger.getHandlers().length==0) {
|
|
||||||
ConsoleHandler consoleHandler = new ConsoleHandler();
|
|
||||||
consoleHandler.setLevel(level);
|
|
||||||
logger.addHandler(consoleHandler);
|
|
||||||
}
|
|
||||||
|
|
||||||
return new JdkLogger(logger);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,9 +12,7 @@ import com.foxinmy.weixin4j.util.StringUtil;
|
|||||||
* @date 2015年6月26日
|
* @date 2015年6月26日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see
|
* @see
|
||||||
* @deprecated 支付相关的类现已迁移到weixin4j-pay子模块
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public class WeixinPayAccount extends WeixinAccount {
|
public class WeixinPayAccount extends WeixinAccount {
|
||||||
|
|
||||||
private static final long serialVersionUID = -2791256176906048632L;
|
private static final long serialVersionUID = -2791256176906048632L;
|
||||||
|
|||||||
@ -38,30 +38,6 @@ public final class CardCoupons {
|
|||||||
public static MemberCard.Builder customMemberCard(){
|
public static MemberCard.Builder customMemberCard(){
|
||||||
return new MemberCard.Builder();
|
return new MemberCard.Builder();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 礼品卡信息构造器
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public static GiftCard.Builder customGiftCard() {
|
|
||||||
return new GiftCard.Builder();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 礼品卡货架主题信息构造器
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public static PageTheme.Builder customCardPageTheme(){ return new PageTheme.Builder(); }
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 礼品卡货架信息构造器
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public static GiftCardPage.Builder customCardPage(){ return new GiftCardPage.Builder(); }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建代金券
|
* 创建代金券
|
||||||
*
|
*
|
||||||
@ -146,32 +122,4 @@ public final class CardCoupons {
|
|||||||
MemberCard memberCard = new MemberCard(baseBuilder.build(), memberCardBudiler);
|
MemberCard memberCard = new MemberCard(baseBuilder.build(), memberCardBudiler);
|
||||||
return memberCard;
|
return memberCard;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 创建单品类礼品卡
|
|
||||||
*
|
|
||||||
* @param baseBuilder
|
|
||||||
* 卡券基础信息构造器 必填
|
|
||||||
* @param giftCardBuilder
|
|
||||||
* 礼品卡自身参数构造器 必填
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public static VoucherCard createVoucherCard(CouponBaseInfo.Builder baseBuilder, GiftCard.Builder giftCardBuilder){
|
|
||||||
baseBuilder.build();
|
|
||||||
VoucherCard voucherCard = new VoucherCard(baseBuilder.build(), giftCardBuilder);
|
|
||||||
return voucherCard;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 创建储值类礼品卡
|
|
||||||
*
|
|
||||||
* @param baseBuilder
|
|
||||||
* @param giftCardBuilder
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public static GiftCard createGiftCard(CouponBaseInfo.Builder baseBuilder, GiftCard.Builder giftCardBuilder){
|
|
||||||
baseBuilder.build();
|
|
||||||
GiftCard giftCard = new GiftCard(baseBuilder.build(), giftCardBuilder);
|
|
||||||
return giftCard;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@ -1,183 +0,0 @@
|
|||||||
package com.foxinmy.weixin4j.model.card;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 已领取的礼品卡信息
|
|
||||||
* 用于查询用户的礼品卡信息时,作为参数或返回对象
|
|
||||||
*
|
|
||||||
* @author kit (kit@muses.cc)
|
|
||||||
* @date 2018-11-23
|
|
||||||
*/
|
|
||||||
public class CardInfo {
|
|
||||||
/**
|
|
||||||
* 礼品卡的code
|
|
||||||
*/
|
|
||||||
private String code;
|
|
||||||
/**
|
|
||||||
* 礼品卡的card_id
|
|
||||||
*/
|
|
||||||
@JSONField(name = "card_id")
|
|
||||||
private String cardId;
|
|
||||||
/**
|
|
||||||
* 生效时间
|
|
||||||
*/
|
|
||||||
@JSONField(name = "begin_time")
|
|
||||||
private long beginTime;
|
|
||||||
/**
|
|
||||||
* 结束时间
|
|
||||||
*/
|
|
||||||
@JSONField(name = "end_time")
|
|
||||||
private long endTime;
|
|
||||||
/**
|
|
||||||
* 当前的余额额度
|
|
||||||
*/
|
|
||||||
private int balance;
|
|
||||||
/**
|
|
||||||
* 礼品卡卡面显示的卡号,若没设置则与code相同
|
|
||||||
*/
|
|
||||||
@JSONField(name = "card_number")
|
|
||||||
private String cardNumber;
|
|
||||||
/**
|
|
||||||
* 用于支持商家激活时针对单个礼品卡分配自定义的礼品卡背景。
|
|
||||||
*/
|
|
||||||
@JSONField(name = "background_pic_url")
|
|
||||||
private String backgroundPicUrl;
|
|
||||||
/**
|
|
||||||
* 自定义金额消耗记录,不超过14个汉字。
|
|
||||||
*/
|
|
||||||
@JSONField(name = "record_balance")
|
|
||||||
private String recordBalance;
|
|
||||||
/**
|
|
||||||
* 创建时字段custom_field1定义类型的最新数值,限制为4个汉字,12字节。
|
|
||||||
*/
|
|
||||||
@JSONField(name = "custom_field_value1")
|
|
||||||
private String customFieldValue1;
|
|
||||||
/**
|
|
||||||
* 创建时字段custom_field2定义类型的最新数值,限制为4个汉字,12字节。
|
|
||||||
*/
|
|
||||||
@JSONField(name = "custom_field_value2")
|
|
||||||
private String customFieldValue2;
|
|
||||||
/**
|
|
||||||
* 创建时字段custom_field3定义类型的最新数值,限制为4个汉字,12字节。
|
|
||||||
*/
|
|
||||||
@JSONField(name = "custom_field_value3")
|
|
||||||
private String customFieldValue3;
|
|
||||||
/**
|
|
||||||
* 控制本次积分变动后转赠入口是否出现
|
|
||||||
*/
|
|
||||||
@JSONField(name = "can_give_friend")
|
|
||||||
private Boolean canGiveFriend;
|
|
||||||
/**
|
|
||||||
* 该卡的价格
|
|
||||||
*/
|
|
||||||
private int price;
|
|
||||||
/**
|
|
||||||
* 祝福语
|
|
||||||
*/
|
|
||||||
@JSONField(name = "default_gifting_msg")
|
|
||||||
private String defaultGiftingMsg;
|
|
||||||
|
|
||||||
public String getCode() {
|
|
||||||
return code;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCode(String code) {
|
|
||||||
this.code = code;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCardId() {
|
|
||||||
return cardId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCardId(String cardId) {
|
|
||||||
this.cardId = cardId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public long getBeginTime() {
|
|
||||||
return beginTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setBeginTime(long beginTime) {
|
|
||||||
this.beginTime = beginTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public long getEndTime() {
|
|
||||||
return endTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setEndTime(long endTime) {
|
|
||||||
this.endTime = endTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getBalance() {
|
|
||||||
return balance;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setBalance(int balance) {
|
|
||||||
this.balance = balance;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCardNumber() {
|
|
||||||
return cardNumber;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCardNumber(String cardNumber) {
|
|
||||||
this.cardNumber = cardNumber;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getBackgroundPicUrl() {
|
|
||||||
return backgroundPicUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setBackgroundPicUrl(String backgroundPicUrl) {
|
|
||||||
this.backgroundPicUrl = backgroundPicUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getRecordBalance() {
|
|
||||||
return recordBalance;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRecordBalance(String recordBalance) {
|
|
||||||
this.recordBalance = recordBalance;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCustomFieldValue1() {
|
|
||||||
return customFieldValue1;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCustomFieldValue1(String customFieldValue1) {
|
|
||||||
this.customFieldValue1 = customFieldValue1;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCustomFieldValue2() {
|
|
||||||
return customFieldValue2;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCustomFieldValue2(String customFieldValue2) {
|
|
||||||
this.customFieldValue2 = customFieldValue2;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCustomFieldValue3() {
|
|
||||||
return customFieldValue3;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCustomFieldValue3(String customFieldValue3) {
|
|
||||||
this.customFieldValue3 = customFieldValue3;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Boolean getCanGiveFriend() {
|
|
||||||
return canGiveFriend;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCanGiveFriend(Boolean canGiveFriend) {
|
|
||||||
this.canGiveFriend = canGiveFriend;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void CardItem(){}
|
|
||||||
|
|
||||||
public void CardItem(String code, String cardId){
|
|
||||||
this.code = code;
|
|
||||||
this.cardId = cardId;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,77 +0,0 @@
|
|||||||
package com.foxinmy.weixin4j.model.card;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 礼品卡货架主题内的礼品卡描述项
|
|
||||||
*
|
|
||||||
* @author kit(kit.li@qq.com)
|
|
||||||
* @date 2018年10月30日
|
|
||||||
*/
|
|
||||||
public class CardItem {
|
|
||||||
/**
|
|
||||||
* 待上架的card_id
|
|
||||||
*/
|
|
||||||
@JSONField(name = "card_id")
|
|
||||||
private String cardId;
|
|
||||||
/**
|
|
||||||
* 商品名,不填写默认为卡名称
|
|
||||||
*/
|
|
||||||
private String title;
|
|
||||||
/**
|
|
||||||
* 商品缩略图,1000像素*600像素以下
|
|
||||||
*/
|
|
||||||
@JSONField(name = "pic_url")
|
|
||||||
private String picUrl;
|
|
||||||
/**
|
|
||||||
* 商品简介
|
|
||||||
*/
|
|
||||||
private String desc;
|
|
||||||
|
|
||||||
public CardItem(){
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public CardItem(String cardId) {
|
|
||||||
this.cardId = cardId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public CardItem(String cardId, String title, String picUrl, String desc) {
|
|
||||||
this.cardId = cardId;
|
|
||||||
this.title = title;
|
|
||||||
this.picUrl = picUrl;
|
|
||||||
this.desc = desc;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCardId() {
|
|
||||||
return cardId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTitle() {
|
|
||||||
return title;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPicUrl() {
|
|
||||||
return picUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDesc() {
|
|
||||||
return desc;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCardId(String cardId) {
|
|
||||||
this.cardId = cardId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTitle(String title) {
|
|
||||||
this.title = title;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPicUrl(String picUrl) {
|
|
||||||
this.picUrl = picUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDesc(String desc) {
|
|
||||||
this.desc = desc;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -21,18 +21,7 @@ import com.foxinmy.weixin4j.type.card.CardColor;
|
|||||||
*/
|
*/
|
||||||
public class CouponBaseInfo implements Serializable {
|
public class CouponBaseInfo implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = -5725424121330101717L;
|
private static final long serialVersionUID = -5725424121330101716L;
|
||||||
|
|
||||||
/**
|
|
||||||
* 礼品卡信息,目前只有一个价格属性,礼品卡时必填
|
|
||||||
*/
|
|
||||||
@JSONField(name = "giftcard_info")
|
|
||||||
private JSONObject giftcardInfo;
|
|
||||||
/**
|
|
||||||
* 礼品卡最大可赠送次数,必填
|
|
||||||
*/
|
|
||||||
@JSONField(name = "max_give_friend_times")
|
|
||||||
private int maxGiveFriendTimes;
|
|
||||||
/**
|
/**
|
||||||
* 卡券的商户logo,建议像素为300*300。
|
* 卡券的商户logo,建议像素为300*300。
|
||||||
*/
|
*/
|
||||||
@ -82,7 +71,7 @@ public class CouponBaseInfo implements Serializable {
|
|||||||
@JSONField(name = "use_custom_code")
|
@JSONField(name = "use_custom_code")
|
||||||
private Boolean useCustomCode;
|
private Boolean useCustomCode;
|
||||||
/**
|
/**
|
||||||
* 指定特殊用户群体,礼品卡建议填写false
|
* 指定特殊用户群体
|
||||||
*/
|
*/
|
||||||
@JSONField(name = "bind_openid")
|
@JSONField(name = "bind_openid")
|
||||||
private Boolean bindOpenId;
|
private Boolean bindOpenId;
|
||||||
@ -151,12 +140,12 @@ public class CouponBaseInfo implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private String source;
|
private String source;
|
||||||
/**
|
/**
|
||||||
* 每人可领券的数量限制,不填写默认为50。礼品卡时须填0,不限制
|
* 每人可领券的数量限制,不填写默认为50。
|
||||||
*/
|
*/
|
||||||
@JSONField(name = "get_limit")
|
@JSONField(name = "get_limit")
|
||||||
private int limitNum;
|
private int limitNum;
|
||||||
/**
|
/**
|
||||||
* 卡券领取页面是否可分享,礼品卡建议填写false
|
* 卡券领取页面是否可分享
|
||||||
*/
|
*/
|
||||||
@JSONField(name = "can_share")
|
@JSONField(name = "can_share")
|
||||||
private boolean canShare;
|
private boolean canShare;
|
||||||
@ -168,41 +157,9 @@ public class CouponBaseInfo implements Serializable {
|
|||||||
|
|
||||||
@JSONField(name = "need_push_on_view")
|
@JSONField(name = "need_push_on_view")
|
||||||
private Boolean needPushOnView;
|
private Boolean needPushOnView;
|
||||||
/**
|
|
||||||
* 礼品卡用属性,自定义cell对应的小程序username,格式为公众号原始id@app。如:gh_86a091e50ad4@app 选填
|
|
||||||
*/
|
|
||||||
@JSONField(name = "center_app_brand_user_name")
|
|
||||||
private String centerAppBrandUserName;
|
|
||||||
/**
|
|
||||||
* 礼品卡用属性,自定义cell对应的小程序路径. 如:pages/index/index 选填
|
|
||||||
*/
|
|
||||||
@JSONField(name = "center_app_brand_pass")
|
|
||||||
private String centerAppBrandPass;
|
|
||||||
/**
|
|
||||||
* 礼品卡用属性,自定义cell对应的小程序username,格式为公众号原始id@app 选填
|
|
||||||
*/
|
|
||||||
@JSONField(name = "custom_app_brand_user_name")
|
|
||||||
private String customAppBrandUserName;
|
|
||||||
/**
|
|
||||||
* 礼品卡用属性,自定义cell对应的小程序路径。选填
|
|
||||||
*/
|
|
||||||
@JSONField(name = "custom_app_brand_pass")
|
|
||||||
private String customAppBrandPass;
|
|
||||||
/**
|
|
||||||
* 礼品卡用属性,自定义cell对应的小程序username,格式为公众号原始id@app 选填
|
|
||||||
*/
|
|
||||||
@JSONField(name = "promotion_app_brand_user_name")
|
|
||||||
private String promotionAppBrandUserName;
|
|
||||||
/**
|
|
||||||
* 礼品卡用属性,自定义cell对应的小程序路径
|
|
||||||
*/
|
|
||||||
@JSONField(name = "promotion_app_brand_pass")
|
|
||||||
private String promotionAppBrandPass;
|
|
||||||
|
|
||||||
private CouponBaseInfo(Builder builder) {
|
private CouponBaseInfo(Builder builder) {
|
||||||
this.giftcardInfo = builder.giftcardInfo;
|
|
||||||
this.logoUrl = builder.logoUrl;
|
this.logoUrl = builder.logoUrl;
|
||||||
this.maxGiveFriendTimes = builder.maxGiveFriendTimes;
|
|
||||||
this.brandName = builder.brandName;
|
this.brandName = builder.brandName;
|
||||||
this.title = builder.title;
|
this.title = builder.title;
|
||||||
this.codeType = builder.codeType;
|
this.codeType = builder.codeType;
|
||||||
@ -219,18 +176,12 @@ public class CouponBaseInfo implements Serializable {
|
|||||||
this.centerTitle = builder.centerTitle;
|
this.centerTitle = builder.centerTitle;
|
||||||
this.centerUrl = builder.centerUrl;
|
this.centerUrl = builder.centerUrl;
|
||||||
this.centerSubTitle = builder.centerSubTitle;
|
this.centerSubTitle = builder.centerSubTitle;
|
||||||
this.centerAppBrandUserName = builder.centerAppBrandUserName;
|
|
||||||
this.centerAppBrandPass = builder.centerAppBrandPass;
|
|
||||||
this.customTitle = builder.customTitle;
|
this.customTitle = builder.customTitle;
|
||||||
this.customUrl = builder.customUrl;
|
this.customUrl = builder.customUrl;
|
||||||
this.customSubTitle = builder.customSubTitle;
|
this.customSubTitle = builder.customSubTitle;
|
||||||
this.customAppBrandUserName = builder.customAppBrandUserName;
|
|
||||||
this.customAppBrandPass = builder.customAppBrandPass;
|
|
||||||
this.promotionTitle = builder.promotionTitle;
|
this.promotionTitle = builder.promotionTitle;
|
||||||
this.promotionUrl = builder.promotionUrl;
|
this.promotionUrl = builder.promotionUrl;
|
||||||
this.promotionSubTitle = builder.promotionSubTitle;
|
this.promotionSubTitle = builder.promotionSubTitle;
|
||||||
this.promotionAppBrandUserName = builder.promotionAppBrandUserName;
|
|
||||||
this.promotionAppBrandPass = builder.promotionAppBrandPass;
|
|
||||||
this.source = builder.source;
|
this.source = builder.source;
|
||||||
this.limitNum = builder.limitNum;
|
this.limitNum = builder.limitNum;
|
||||||
this.canShare = builder.canShare;
|
this.canShare = builder.canShare;
|
||||||
@ -350,86 +301,23 @@ public class CouponBaseInfo implements Serializable {
|
|||||||
return needPushOnView;
|
return needPushOnView;
|
||||||
}
|
}
|
||||||
|
|
||||||
public JSONObject getGiftcardInfo() {
|
|
||||||
return giftcardInfo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getMaxGiveFriendTimes() {
|
|
||||||
return maxGiveFriendTimes;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Boolean getUseCustomCode() {
|
|
||||||
return useCustomCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Boolean getBindOpenId() {
|
|
||||||
return bindOpenId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCenterAppBrandUserName() {
|
|
||||||
return centerAppBrandUserName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCenterAppBrandPass() {
|
|
||||||
return centerAppBrandPass;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCustomAppBrandUserName() {
|
|
||||||
return customAppBrandUserName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCustomAppBrandPass() {
|
|
||||||
return customAppBrandPass;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPromotionAppBrandUserName() {
|
|
||||||
return promotionAppBrandUserName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPromotionAppBrandPass() {
|
|
||||||
return promotionAppBrandPass;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "CouponBaseInfo{" +
|
return "logoUrl=" + logoUrl + ", brandName=" + brandName + ", title="
|
||||||
"giftcardInfo=" + giftcardInfo +
|
+ title + ", codeType=" + codeType + ", cardColor=" + cardColor
|
||||||
", maxGiveFriendTimes=" + maxGiveFriendTimes +
|
+ ", notice=" + notice + ", description=" + description
|
||||||
", logoUrl='" + logoUrl + '\'' +
|
+ ", sku=" + sku + ", date=" + date + ", useCustomCode="
|
||||||
", brandName='" + brandName + '\'' +
|
+ useCustomCode + ", bindOpenId=" + bindOpenId
|
||||||
", title='" + title + '\'' +
|
+ ", servicePhone=" + servicePhone + ", locationIds="
|
||||||
", codeType=" + codeType +
|
+ locationIds + ", useAllLocation=" + useAllLocation
|
||||||
", cardColor=" + cardColor +
|
+ ", centerTitle=" + centerTitle + ", centerUrl=" + centerUrl
|
||||||
", notice='" + notice + '\'' +
|
+ ", centerSubTitle=" + centerSubTitle + ", customTitle="
|
||||||
", description='" + description + '\'' +
|
+ customTitle + ", customUrl=" + customUrl
|
||||||
", sku=" + sku +
|
+ ", customSubTitle=" + customSubTitle + ", promotionTitle="
|
||||||
", date=" + date +
|
+ promotionTitle + ", promotionUrl=" + promotionUrl
|
||||||
", useCustomCode=" + useCustomCode +
|
+ ", promotionSubTitle=" + promotionSubTitle + ", source="
|
||||||
", bindOpenId=" + bindOpenId +
|
+ source + ", limitNum=" + limitNum + ", canShare=" + canShare
|
||||||
", servicePhone='" + servicePhone + '\'' +
|
+ ", canGiveFriend=" + canGiveFriend;
|
||||||
", locationIds=" + locationIds +
|
|
||||||
", useAllLocation=" + useAllLocation +
|
|
||||||
", centerTitle='" + centerTitle + '\'' +
|
|
||||||
", centerUrl='" + centerUrl + '\'' +
|
|
||||||
", centerSubTitle='" + centerSubTitle + '\'' +
|
|
||||||
", customTitle='" + customTitle + '\'' +
|
|
||||||
", customUrl='" + customUrl + '\'' +
|
|
||||||
", customSubTitle='" + customSubTitle + '\'' +
|
|
||||||
", promotionTitle='" + promotionTitle + '\'' +
|
|
||||||
", promotionUrl='" + promotionUrl + '\'' +
|
|
||||||
", promotionSubTitle='" + promotionSubTitle + '\'' +
|
|
||||||
", source='" + source + '\'' +
|
|
||||||
", limitNum=" + limitNum +
|
|
||||||
", canShare=" + canShare +
|
|
||||||
", canGiveFriend=" + canGiveFriend +
|
|
||||||
", needPushOnView=" + needPushOnView +
|
|
||||||
", centerAppBrandUserName='" + centerAppBrandUserName + '\'' +
|
|
||||||
", centerAppBrandPass='" + centerAppBrandPass + '\'' +
|
|
||||||
", customAppBrandUserName='" + customAppBrandUserName + '\'' +
|
|
||||||
", customAppBrandPass='" + customAppBrandPass + '\'' +
|
|
||||||
", promotionAppBrandUserName='" + promotionAppBrandUserName + '\'' +
|
|
||||||
", promotionAppBrandPass='" + promotionAppBrandPass + '\'' +
|
|
||||||
'}';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void cleanCantUpdateField() {
|
public void cleanCantUpdateField() {
|
||||||
@ -449,18 +337,10 @@ public class CouponBaseInfo implements Serializable {
|
|||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
*/
|
*/
|
||||||
public static final class Builder {
|
public static final class Builder {
|
||||||
/**
|
|
||||||
* 礼品卡信息,目前只有一个礼品卡的价格属性,必填
|
|
||||||
*/
|
|
||||||
private JSONObject giftcardInfo;
|
|
||||||
/**
|
/**
|
||||||
* 卡券的商户logo,建议像素为300*300
|
* 卡券的商户logo,建议像素为300*300
|
||||||
*/
|
*/
|
||||||
private String logoUrl;
|
private String logoUrl;
|
||||||
/**
|
|
||||||
* 礼品卡最大可赠送次数,必填
|
|
||||||
*/
|
|
||||||
private int maxGiveFriendTimes;
|
|
||||||
/**
|
/**
|
||||||
* 商户名字,字数上限为12个汉字,如:海底捞
|
* 商户名字,字数上限为12个汉字,如:海底捞
|
||||||
*/
|
*/
|
||||||
@ -572,37 +452,11 @@ public class CouponBaseInfo implements Serializable {
|
|||||||
* 用户点击进入卡券时推送事件
|
* 用户点击进入卡券时推送事件
|
||||||
*/
|
*/
|
||||||
private boolean needPushOnView;
|
private boolean needPushOnView;
|
||||||
/**
|
|
||||||
* 自定义cell对应的小程序username,格式为公众号原始id@app。如:gh_86a091e50ad4@app 选填
|
|
||||||
*/
|
|
||||||
private String centerAppBrandUserName;
|
|
||||||
/**
|
|
||||||
* 自定义cell对应的小程序路径. 如:pages/index/index 选填
|
|
||||||
*/
|
|
||||||
private String centerAppBrandPass;
|
|
||||||
/**
|
|
||||||
* 自定义cell对应的小程序username,格式为公众号原始id@app 选填
|
|
||||||
*/
|
|
||||||
private String customAppBrandUserName;
|
|
||||||
/**
|
|
||||||
* 自定义cell对应的小程序路径。选填
|
|
||||||
*/
|
|
||||||
private String customAppBrandPass;
|
|
||||||
/**
|
|
||||||
* 自定义cell对应的小程序username,格式为公众号原始id@app
|
|
||||||
*/
|
|
||||||
private String promotionAppBrandUserName;
|
|
||||||
/**
|
|
||||||
* 自定义cell对应的小程序路径
|
|
||||||
*/
|
|
||||||
private String promotionAppBrandPass;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 默认永久有效
|
* 默认永久有效
|
||||||
*/
|
*/
|
||||||
public Builder() {
|
public Builder() {
|
||||||
this.giftcardInfo = new JSONObject();
|
|
||||||
this.maxGiveFriendTimes = 1;
|
|
||||||
this.sku = new JSONObject();
|
this.sku = new JSONObject();
|
||||||
this.date = new JSONObject();
|
this.date = new JSONObject();
|
||||||
this.date.put("type",CardActiveType.DATE_TYPE_PERMANENT);
|
this.date.put("type",CardActiveType.DATE_TYPE_PERMANENT);
|
||||||
@ -612,46 +466,6 @@ public class CouponBaseInfo implements Serializable {
|
|||||||
this.limitNum = 50;
|
this.limitNum = 50;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Builder customAppBrandPass(String pass){
|
|
||||||
this.customAppBrandPass = pass;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Builder centerAppBrandUserName(String name){
|
|
||||||
this.centerAppBrandUserName = name;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Builder centerAppBrandPass(String pass){
|
|
||||||
this.centerAppBrandPass = pass;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Builder customAppBrandUserName(String name){
|
|
||||||
this.customAppBrandUserName = name;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Builder promotionAppBrandUserName(String userName){
|
|
||||||
this.promotionAppBrandUserName = userName;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Builder promotionAppBrandPass(String pass){
|
|
||||||
this.promotionAppBrandPass = pass;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Builder maxGiveFriendTimes(int times){
|
|
||||||
this.maxGiveFriendTimes = times;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Builder price(int price){
|
|
||||||
this.giftcardInfo.put("price", price);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置商户logo
|
* 设置商户logo
|
||||||
*
|
*
|
||||||
|
|||||||
@ -1,219 +0,0 @@
|
|||||||
package com.foxinmy.weixin4j.model.card;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
|
||||||
import com.foxinmy.weixin4j.type.card.CardType;
|
|
||||||
import com.foxinmy.weixin4j.type.card.SubCardType;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 储值类礼品卡
|
|
||||||
*
|
|
||||||
* @author kit(kit.li@qq.com)
|
|
||||||
* @date 2018年10月26日
|
|
||||||
*/
|
|
||||||
public class GiftCard extends CardCoupon {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 子卡券类型
|
|
||||||
*/
|
|
||||||
@JSONField(name = "sub_card_type")
|
|
||||||
private final String subCardType;
|
|
||||||
/**
|
|
||||||
* 礼品卡背景图片,非必需
|
|
||||||
*/
|
|
||||||
@JSONField(name = "background_pic_url")
|
|
||||||
private String backgroundPicUrl;
|
|
||||||
/**
|
|
||||||
* 是否支持积分,填写true或者false。默认为false
|
|
||||||
*/
|
|
||||||
@JSONField(name = "supply_bonus")
|
|
||||||
private boolean supplyBonus;
|
|
||||||
/**
|
|
||||||
* 是否支持余额,填写true或者false。默认为false
|
|
||||||
*/
|
|
||||||
@JSONField(name = "supply_balance")
|
|
||||||
private boolean supplyBalance;
|
|
||||||
/**
|
|
||||||
* 自定义会员信息类目,会员卡激活后显示,包含name和url字段
|
|
||||||
*/
|
|
||||||
@JSONField(name = "custom_field1")
|
|
||||||
private MemCardCustomField customField1;
|
|
||||||
/**
|
|
||||||
* 自定义会员信息类目,会员卡激活后显示,包含name和url字段
|
|
||||||
*/
|
|
||||||
@JSONField(name = "custom_field2")
|
|
||||||
private MemCardCustomField customField2;
|
|
||||||
/**
|
|
||||||
* 自定义会员信息类目,会员卡激活后显示,包含name和url字段
|
|
||||||
*/
|
|
||||||
@JSONField(name = "custom_field3")
|
|
||||||
private MemCardCustomField customField3;
|
|
||||||
/**
|
|
||||||
* 是否自动激活,若开发者不需要额外激活流程则填写true。
|
|
||||||
*/
|
|
||||||
@JSONField(name = "auto_activate")
|
|
||||||
private boolean autoActivate;
|
|
||||||
/**
|
|
||||||
* 初始余额,用户购买礼品卡后卡面上显示的初始余额
|
|
||||||
*/
|
|
||||||
@JSONField(name = "init_balance")
|
|
||||||
private Integer initBalance;
|
|
||||||
|
|
||||||
public GiftCard(CouponBaseInfo baseInfo, GiftCard.Builder builder){
|
|
||||||
super(baseInfo);
|
|
||||||
this.subCardType = SubCardType.VOUCHER.name();
|
|
||||||
this.autoActivate = builder.isAutoActivate();
|
|
||||||
this.backgroundPicUrl = builder.getBackgroundPicUrl();
|
|
||||||
this.customField1 = builder.getCustomField1();
|
|
||||||
this.customField2 = builder.getCustomField2();
|
|
||||||
this.customField3 = builder.getCustomField3();
|
|
||||||
this.supplyBalance = builder.isSupplyBalance();
|
|
||||||
this.supplyBonus = builder.isSupplyBonus();
|
|
||||||
this.initBalance = builder.getInitBalance();
|
|
||||||
}
|
|
||||||
|
|
||||||
@JSONField(serialize = false)
|
|
||||||
@Override
|
|
||||||
public CardType getCardType() {
|
|
||||||
return CardType.GENERAL_COUPON;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static final class Builder {
|
|
||||||
private String backgroundPicUrl;
|
|
||||||
private boolean supplyBonus;
|
|
||||||
private boolean supplyBalance;
|
|
||||||
private boolean autoActivate;
|
|
||||||
private Integer initBalance;
|
|
||||||
private MemCardCustomField customField1;
|
|
||||||
private MemCardCustomField customField2;
|
|
||||||
private MemCardCustomField customField3;
|
|
||||||
|
|
||||||
public Builder(){
|
|
||||||
this.autoActivate = true;
|
|
||||||
this.supplyBalance = false;
|
|
||||||
this.supplyBonus = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getBackgroundPicUrl() {
|
|
||||||
return backgroundPicUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isSupplyBonus() {
|
|
||||||
return supplyBonus;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isSupplyBalance() {
|
|
||||||
return supplyBalance;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isAutoActivate() {
|
|
||||||
return autoActivate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getInitBalance() {
|
|
||||||
return initBalance;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MemCardCustomField getCustomField1() {
|
|
||||||
return customField1;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MemCardCustomField getCustomField2() {
|
|
||||||
return customField2;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MemCardCustomField getCustomField3() {
|
|
||||||
return customField3;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设置礼品卡背景图片
|
|
||||||
* @param url
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Builder backgroundPicUrl(String url){
|
|
||||||
this.backgroundPicUrl = url;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设置是否支持积分(目前未清楚单品类礼品卡是否支持积分)
|
|
||||||
* @param supplyBonus
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Builder supplyBonus(boolean supplyBonus){
|
|
||||||
this.supplyBonus = supplyBonus;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设置是否支持余额(需礼品卡类型为GIFT_CARD,单品类礼品卡VOUCHER并非用于储值)
|
|
||||||
* 注意事项:开发者仅能在supply_balance和custom_field1、custom_field2、custom_field3中选择最多3个填写,否则报错。
|
|
||||||
* @param supplyBalance
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Builder supplyBalance(boolean supplyBalance){
|
|
||||||
this.supplyBalance = supplyBalance;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设置礼品卡是否自动激活,若开发者不需要额外激活流程则填写true。
|
|
||||||
* @param autoActivate
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Builder autoActivate(boolean autoActivate){
|
|
||||||
this.autoActivate = autoActivate;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设置初始化的余额(需礼品卡类型为GIFT_CARD,单品类礼品卡VOUCHER并非用于储值)
|
|
||||||
* @param initBalance
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Builder initBalance(Integer initBalance){
|
|
||||||
this.initBalance = initBalance;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设置自定义会员信息类目
|
|
||||||
* 注意事项:开发者仅能在supply_balance和custom_field1、custom_field2、custom_field3中选择最多3个填写,否则报错。
|
|
||||||
* @param name 自定义信息类目名称
|
|
||||||
* @param url 自定义信息类目跳转url
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Builder customField1(String name, String url){
|
|
||||||
MemCardCustomField field = new MemCardCustomField(name, url, null);
|
|
||||||
this.customField1 = field;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设置自定义会员信息类目
|
|
||||||
* 注意事项:开发者仅能在supply_balance和custom_field1、custom_field2、custom_field3中选择最多3个填写,否则报错。
|
|
||||||
* @param name 自定义信息类目名称
|
|
||||||
* @param url 自定义信息类目跳转url
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Builder customField2(String name, String url){
|
|
||||||
MemCardCustomField field = new MemCardCustomField(name, url, null);
|
|
||||||
this.customField2 = field;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设置自定义会员信息类目
|
|
||||||
* 注意事项:开发者仅能在supply_balance和custom_field1、custom_field2、custom_field3中选择最多3个填写,否则报错。
|
|
||||||
* @param name 自定义信息类目名称
|
|
||||||
* @param url 自定义信息类目跳转url
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Builder customField3(String name, String url){
|
|
||||||
MemCardCustomField field = new MemCardCustomField(name, url, null);
|
|
||||||
this.customField3 = field;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
package com.foxinmy.weixin4j.model.card;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 礼品卡销售订单信息
|
|
||||||
*
|
|
||||||
* @author kit (kit.li@qq.com)
|
|
||||||
*/
|
|
||||||
public class GiftCardOrder {
|
|
||||||
private String orderId;
|
|
||||||
private String pageId;
|
|
||||||
}
|
|
||||||
@ -1,351 +0,0 @@
|
|||||||
package com.foxinmy.weixin4j.model.card;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONArray;
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 礼品卡货架
|
|
||||||
*
|
|
||||||
* @author kit(kit.li@qq.com)
|
|
||||||
* @date 2018年10月30日
|
|
||||||
*/
|
|
||||||
public class GiftCardPage {
|
|
||||||
@JSONField(name = "page_id")
|
|
||||||
private String pageId;
|
|
||||||
/**
|
|
||||||
* 礼品卡货架名称
|
|
||||||
*/
|
|
||||||
@JSONField(name = "page_title")
|
|
||||||
private String title;
|
|
||||||
/**
|
|
||||||
* 是否支持一次购买多张及发送至群,填true或者false,若填true则支持,默认为false
|
|
||||||
*/
|
|
||||||
@JSONField(name = "support_multi")
|
|
||||||
private Boolean supportMulti;
|
|
||||||
/**
|
|
||||||
* 礼品卡货架是否支持买给自己,填true或者false,若填true则支持,默认为false
|
|
||||||
*/
|
|
||||||
@JSONField(name = "support_buy_for_self")
|
|
||||||
private Boolean supportBuyForSelf;
|
|
||||||
/**
|
|
||||||
* 礼品卡货架主题页顶部banner图片,须先将图片上传至CDN,建议尺寸为750px*630px
|
|
||||||
*/
|
|
||||||
@JSONField(name = "banner_pic_url")
|
|
||||||
private String bannerPicUrl;
|
|
||||||
/**
|
|
||||||
* 主题结构体
|
|
||||||
*/
|
|
||||||
@JSONField(name = "theme_list")
|
|
||||||
private JSONArray themeList;
|
|
||||||
/**
|
|
||||||
* 主题分类列表
|
|
||||||
*/
|
|
||||||
@JSONField(name = "category_list")
|
|
||||||
private JSONArray categoryList;
|
|
||||||
/**
|
|
||||||
* 商家地址
|
|
||||||
*/
|
|
||||||
private String address;
|
|
||||||
/**
|
|
||||||
* 商家服务电话
|
|
||||||
*/
|
|
||||||
@JSONField(name = "service_phone")
|
|
||||||
private String servicePhone;
|
|
||||||
/**
|
|
||||||
* 商家使用说明,用于描述退款、发票等流程
|
|
||||||
*/
|
|
||||||
@JSONField(name = "biz_description")
|
|
||||||
private String description;
|
|
||||||
/**
|
|
||||||
* 该货架的订单是否支持开发票,填true或者false,若填true则需要使用API设置支付后开票功能,默认为false
|
|
||||||
*/
|
|
||||||
@JSONField(name = "need_receipt")
|
|
||||||
private Boolean needReceipt;
|
|
||||||
/**
|
|
||||||
* 商家自定义链接,用于承载退款、发票等流程
|
|
||||||
*/
|
|
||||||
@JSONField(name = "cell_1")
|
|
||||||
private JSONObject cell1;
|
|
||||||
/**
|
|
||||||
* 商家自定义链接,用于承载退款、发票等流程
|
|
||||||
*/
|
|
||||||
@JSONField(name = "cell_2")
|
|
||||||
private JSONObject cell2;
|
|
||||||
|
|
||||||
public String getPageId() { return pageId; }
|
|
||||||
|
|
||||||
public String getTitle() {
|
|
||||||
return title;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Boolean getSupportMulti() {
|
|
||||||
return supportMulti;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Boolean getSupportBuyForSelf() {
|
|
||||||
return supportBuyForSelf;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getBannerPicUrl() {
|
|
||||||
return bannerPicUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
public JSONArray getThemeList() {
|
|
||||||
return themeList;
|
|
||||||
}
|
|
||||||
|
|
||||||
public JSONArray getCategoryList() {
|
|
||||||
return categoryList;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAddress() {
|
|
||||||
return address;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getServicePhone() {
|
|
||||||
return servicePhone;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDescription() {
|
|
||||||
return description;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Boolean getNeedReceipt() {
|
|
||||||
return needReceipt;
|
|
||||||
}
|
|
||||||
|
|
||||||
public JSONObject getCell1() {
|
|
||||||
return cell1;
|
|
||||||
}
|
|
||||||
|
|
||||||
public JSONObject getCell2() {
|
|
||||||
return cell2;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GiftCardPage(Builder builder){
|
|
||||||
this.pageId = builder.pageId;
|
|
||||||
this.address = builder.address;
|
|
||||||
this.bannerPicUrl = builder.bannerPicUrl;
|
|
||||||
this.categoryList = builder.categoryList;
|
|
||||||
this.cell1 = builder.cell1;
|
|
||||||
this.cell2 = builder.cell2;
|
|
||||||
this.description = builder.description;
|
|
||||||
this.needReceipt = builder.needReceipt;
|
|
||||||
this.servicePhone = builder.servicePhone;
|
|
||||||
this.supportBuyForSelf = builder.supportBuyForSelf;
|
|
||||||
this.supportMulti = builder.supportMulti;
|
|
||||||
this.themeList = builder.themeList;
|
|
||||||
this.title = builder.title;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class Builder{
|
|
||||||
/**
|
|
||||||
* 货架ID,只在货架更新时用到
|
|
||||||
*/
|
|
||||||
private String pageId;
|
|
||||||
/**
|
|
||||||
* 礼品卡货架名称
|
|
||||||
*/
|
|
||||||
private String title;
|
|
||||||
/**
|
|
||||||
* 是否支持一次购买多张及发送至群,填true或者false,若填true则支持,默认为false
|
|
||||||
*/
|
|
||||||
private Boolean supportMulti;
|
|
||||||
/**
|
|
||||||
* 礼品卡货架是否支持买给自己,填true或者false,若填true则支持,默认为false
|
|
||||||
*/
|
|
||||||
private Boolean supportBuyForSelf;
|
|
||||||
/**
|
|
||||||
* 礼品卡货架主题页顶部banner图片,须先将图片上传至CDN,建议尺寸为750px*630px
|
|
||||||
*/
|
|
||||||
private String bannerPicUrl;
|
|
||||||
/**
|
|
||||||
* 主题结构体
|
|
||||||
*/
|
|
||||||
private JSONArray themeList;
|
|
||||||
/**
|
|
||||||
* 主题分类列表
|
|
||||||
*/
|
|
||||||
private JSONArray categoryList;
|
|
||||||
/**
|
|
||||||
* 商家地址
|
|
||||||
*/
|
|
||||||
private String address;
|
|
||||||
/**
|
|
||||||
* 商家服务电话
|
|
||||||
*/
|
|
||||||
private String servicePhone;
|
|
||||||
/**
|
|
||||||
* 商家使用说明,用于描述退款、发票等流程
|
|
||||||
*/
|
|
||||||
private String description;
|
|
||||||
/**
|
|
||||||
* 该货架的订单是否支持开发票,填true或者false,若填true则需要使用API设置支付后开票功能,默认为false
|
|
||||||
*/
|
|
||||||
private Boolean needReceipt;
|
|
||||||
/**
|
|
||||||
* 商家自定义链接,用于承载退款、发票等流程
|
|
||||||
*/
|
|
||||||
private JSONObject cell1;
|
|
||||||
/**
|
|
||||||
* 商家自定义链接,用于承载退款、发票等流程
|
|
||||||
*/
|
|
||||||
private JSONObject cell2;
|
|
||||||
|
|
||||||
public Builder(){
|
|
||||||
this.themeList = new JSONArray();
|
|
||||||
this.categoryList = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Builder pageId(String pageId){
|
|
||||||
this.pageId = pageId;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设置礼品卡货架名称
|
|
||||||
*
|
|
||||||
* @param title
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Builder title(String title){
|
|
||||||
this.title = title;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设置是否支持一次购买多张及发送至群
|
|
||||||
*
|
|
||||||
* @param supportMulti
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Builder supportMulti(boolean supportMulti){
|
|
||||||
this.supportMulti = Boolean.valueOf(supportMulti);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设置礼品卡货架是否支持买给自己
|
|
||||||
*
|
|
||||||
* @param supportBuyForSelf
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Builder supportBuyForSelf(boolean supportBuyForSelf){
|
|
||||||
this.supportBuyForSelf = Boolean.valueOf(supportBuyForSelf);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设置礼品卡货架主题页顶部banner图片
|
|
||||||
*
|
|
||||||
* @param url
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Builder bannerPicUrl(String url){
|
|
||||||
this.bannerPicUrl = url;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 添加一个主题
|
|
||||||
*
|
|
||||||
* @param theme
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Builder themeList(PageTheme theme){
|
|
||||||
this.themeList.add(theme);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 添加一个主题分类
|
|
||||||
*
|
|
||||||
* @param title
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Builder categoryList(String title){
|
|
||||||
if(this.categoryList==null){
|
|
||||||
this.categoryList = new JSONArray();
|
|
||||||
}
|
|
||||||
JSONObject category = new JSONObject();
|
|
||||||
category.put("title", title);
|
|
||||||
this.categoryList.add(category);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设置商家地址
|
|
||||||
*
|
|
||||||
* @param address
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Builder address(String address){
|
|
||||||
this.address = address;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设置商家服务电话
|
|
||||||
*
|
|
||||||
* @param phoneNo
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Builder servicePhone(String phoneNo){
|
|
||||||
this.servicePhone = phoneNo;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设置商家使用说明
|
|
||||||
*
|
|
||||||
* @param description
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Builder description(String description){
|
|
||||||
this.description = description;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设置该货架的订单是否支持开发票
|
|
||||||
*
|
|
||||||
* @param needReceipt
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Builder needReceipt(boolean needReceipt){
|
|
||||||
this.needReceipt = Boolean.valueOf(needReceipt);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设置商家自定义链接
|
|
||||||
*
|
|
||||||
* @param title
|
|
||||||
* @param url
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Builder cell1(String title, String url){
|
|
||||||
JSONObject cell = new JSONObject();
|
|
||||||
cell.put("title", title);
|
|
||||||
cell.put("url", url);
|
|
||||||
this.cell1 = cell;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设置商家自定义链接
|
|
||||||
*
|
|
||||||
* @param title
|
|
||||||
* @param url
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Builder cell2(String title, String url){
|
|
||||||
JSONObject cell = new JSONObject();
|
|
||||||
cell.put("title", title);
|
|
||||||
cell.put("url", url);
|
|
||||||
this.cell2 = cell;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,249 +0,0 @@
|
|||||||
package com.foxinmy.weixin4j.model.card;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 礼品卡货架主题
|
|
||||||
*
|
|
||||||
* @author kit(kit.li@qq.com)
|
|
||||||
* @date 2018年10月30日
|
|
||||||
*/
|
|
||||||
public class PageTheme {
|
|
||||||
/**
|
|
||||||
* 主题的封面图片,须先将图片上传至CDN 大小控制在1000px*600px
|
|
||||||
*/
|
|
||||||
@JSONField(name = "theme_pic_url")
|
|
||||||
private String cover;
|
|
||||||
/**
|
|
||||||
* 主题名称,如“圣诞”“感恩家人”
|
|
||||||
*/
|
|
||||||
private String title;
|
|
||||||
/**
|
|
||||||
* 主题title的颜色,直接传入色值
|
|
||||||
*/
|
|
||||||
@JSONField(name = "title_color")
|
|
||||||
private String titleColor;
|
|
||||||
/**
|
|
||||||
* 礼品卡列表,表示主题可选择的礼品卡,由cardid及标题文字组成
|
|
||||||
*/
|
|
||||||
@JSONField(name = "item_list")
|
|
||||||
private List<CardItem> itemList;
|
|
||||||
/**
|
|
||||||
* 礼品卡可选择的封面图
|
|
||||||
*/
|
|
||||||
@JSONField(name = "pic_item_list")
|
|
||||||
private List<PicItem> picItemList;
|
|
||||||
/**
|
|
||||||
* 当前主题所属主题分类的索引,对应主题分类列表category_list内的title字段, 若填写了category_list则每个主题必填该序号
|
|
||||||
*/
|
|
||||||
@JSONField(name = "category_index")
|
|
||||||
private Integer categoryIndex;
|
|
||||||
/**
|
|
||||||
* 该主题购买页是否突出商品名显示
|
|
||||||
*/
|
|
||||||
@JSONField(name = "show_sku_title_first")
|
|
||||||
private Boolean showSkuTitleFirst;
|
|
||||||
/**
|
|
||||||
* 是否将当前主题设置为banner主题(主推荐)
|
|
||||||
*/
|
|
||||||
@JSONField(name = "is_banner")
|
|
||||||
private Boolean bannerTheme;
|
|
||||||
|
|
||||||
public PageTheme(Builder builder){
|
|
||||||
this.cover = builder.cover;
|
|
||||||
this.title = builder.title;
|
|
||||||
this.titleColor = builder.titleColor;
|
|
||||||
this.itemList = builder.itemList;
|
|
||||||
this.picItemList = builder.picItemList;
|
|
||||||
this.categoryIndex = builder.categoryIndex;
|
|
||||||
this.showSkuTitleFirst = builder.showSkuTitleFirst;
|
|
||||||
this.bannerTheme = builder.bannerTheme;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCover() {
|
|
||||||
return cover;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTitle() {
|
|
||||||
return title;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTitleColor() {
|
|
||||||
return titleColor;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<CardItem> getItemList() {
|
|
||||||
return itemList;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<PicItem> getPicItemList() {
|
|
||||||
return picItemList;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getCategoryIndex() {
|
|
||||||
return categoryIndex;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Boolean getShowSkuTitleFirst() {
|
|
||||||
return showSkuTitleFirst;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Boolean getBannerTheme() {
|
|
||||||
return bannerTheme;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class Builder{
|
|
||||||
/**
|
|
||||||
* 主题的封面图片,须先将图片上传至CDN 大小控制在1000px*600px
|
|
||||||
*/
|
|
||||||
private String cover;
|
|
||||||
/**
|
|
||||||
* 主题名称,如“圣诞”“感恩家人”
|
|
||||||
*/
|
|
||||||
private String title;
|
|
||||||
/**
|
|
||||||
* 主题title的颜色,直接传入色值
|
|
||||||
*/
|
|
||||||
private String titleColor;
|
|
||||||
/**
|
|
||||||
* 礼品卡列表,表示主题可选择的礼品卡,由cardid及标题文字组成
|
|
||||||
*/
|
|
||||||
private List<CardItem> itemList;
|
|
||||||
/**
|
|
||||||
* 礼品卡可选择的封面图
|
|
||||||
*/
|
|
||||||
private List<PicItem> picItemList;
|
|
||||||
/**
|
|
||||||
* 主题标号,对应category_list内的title字段, 若填写了category_list则每个主题必填该序号
|
|
||||||
*/
|
|
||||||
private Integer categoryIndex;
|
|
||||||
/**
|
|
||||||
* 该主题购买页是否突出商品名显示
|
|
||||||
*/
|
|
||||||
private Boolean showSkuTitleFirst;
|
|
||||||
/**
|
|
||||||
* 是否将当前主题设置为banner主题(主推荐)
|
|
||||||
*/
|
|
||||||
private Boolean bannerTheme;
|
|
||||||
|
|
||||||
public Builder(){
|
|
||||||
this.itemList = new ArrayList<CardItem>();
|
|
||||||
this.picItemList = new ArrayList<PicItem>();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设置主题的封面图片
|
|
||||||
*
|
|
||||||
* @param cover
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Builder cover(String cover){
|
|
||||||
this.cover = cover;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设置主题名称
|
|
||||||
*
|
|
||||||
* @param title
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Builder title(String title){
|
|
||||||
this.title = title;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设置主题title的颜色
|
|
||||||
*
|
|
||||||
* @param titleColor
|
|
||||||
* 直接设置色值,如:#FB966E
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Builder titleColor(String titleColor){
|
|
||||||
this.titleColor = titleColor;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 添加一个或多个礼品卡内容
|
|
||||||
*
|
|
||||||
* @param items
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Builder cardItems(CardItem... items){
|
|
||||||
this.itemList = Arrays.asList(items);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 添加一个礼品卡内容
|
|
||||||
*
|
|
||||||
* @param item
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Builder addCardItem(CardItem item){
|
|
||||||
this.itemList.add(item);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 添加一个或多个礼品卡封面图
|
|
||||||
*
|
|
||||||
* @param items
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Builder picItems(PicItem... items){
|
|
||||||
this.picItemList = Arrays.asList(items);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 添加一个礼品卡封面图
|
|
||||||
*
|
|
||||||
* @param item
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Builder addPicItem(PicItem item){
|
|
||||||
this.picItemList.add(item);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设置所属主题分类的索引号
|
|
||||||
*
|
|
||||||
* @param index
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Builder categoryIndex(Integer index){
|
|
||||||
this.categoryIndex = index;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设置该主题购买页是否突出商品名显示
|
|
||||||
*
|
|
||||||
* @param isShow
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Builder showSkuTitleFirst(Boolean isShow){
|
|
||||||
this.showSkuTitleFirst = isShow;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设置是否将当前主题设置为banner主题(主推荐)
|
|
||||||
*
|
|
||||||
* @param isBanner
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Builder bannerTheme(Boolean isBanner){
|
|
||||||
this.bannerTheme = isBanner;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,66 +0,0 @@
|
|||||||
package com.foxinmy.weixin4j.model.card;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 礼品卡货架主题中的卡面结构体
|
|
||||||
*
|
|
||||||
* @author kit(kit.li@qq.com)
|
|
||||||
* @date 2018年10月30日
|
|
||||||
*/
|
|
||||||
public class PicItem {
|
|
||||||
/**
|
|
||||||
* 卡面图片,须先将图片上传至CDN,大小控制在1000 x 600像素以下
|
|
||||||
*/
|
|
||||||
@JSONField(name = "background_pic_url")
|
|
||||||
private String backgroundPicUrl;
|
|
||||||
/**
|
|
||||||
* 自定义的卡面的标识, 非必填
|
|
||||||
*/
|
|
||||||
@JSONField(name = "outer_img_id")
|
|
||||||
private String outerImgId;
|
|
||||||
/**
|
|
||||||
* 该卡面对应的默认祝福语,当用户没有编辑内容时会随卡默认填写为用户祝福内容
|
|
||||||
*/
|
|
||||||
@JSONField(name = "default_gifting_msg")
|
|
||||||
private String defaultGiftingMsg;
|
|
||||||
|
|
||||||
public PicItem(){
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public PicItem(String backgroundPicUrl, String defaultGiftingMsg) {
|
|
||||||
this.backgroundPicUrl = backgroundPicUrl;
|
|
||||||
this.defaultGiftingMsg = defaultGiftingMsg;
|
|
||||||
}
|
|
||||||
|
|
||||||
public PicItem(String backgroundPicUrl, String outerImgId, String defaultGiftingMsg) {
|
|
||||||
this.backgroundPicUrl = backgroundPicUrl;
|
|
||||||
this.outerImgId = outerImgId;
|
|
||||||
this.defaultGiftingMsg = defaultGiftingMsg;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getBackgroundPicUrl() {
|
|
||||||
return backgroundPicUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getOuterImgId() {
|
|
||||||
return outerImgId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDefaultGiftingMsg() {
|
|
||||||
return defaultGiftingMsg;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setBackgroundPicUrl(String backgroundPicUrl) {
|
|
||||||
this.backgroundPicUrl = backgroundPicUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOuterImgId(String outerImgId) {
|
|
||||||
this.outerImgId = outerImgId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDefaultGiftingMsg(String defaultGiftingMsg) {
|
|
||||||
this.defaultGiftingMsg = defaultGiftingMsg;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,122 +0,0 @@
|
|||||||
package com.foxinmy.weixin4j.model.card;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
|
||||||
import com.foxinmy.weixin4j.type.card.CardType;
|
|
||||||
import com.foxinmy.weixin4j.type.card.SubCardType;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 单品类型礼品卡
|
|
||||||
* 指该礼品卡用于兑换指定单品,如汉堡礼品卡
|
|
||||||
*
|
|
||||||
* @className VoucherCardCoupon
|
|
||||||
* @author kit(kit.li@qq.com)
|
|
||||||
* @date 2018年10月23日
|
|
||||||
*/
|
|
||||||
public class VoucherCard extends CardCoupon {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 子卡券类型
|
|
||||||
*/
|
|
||||||
@JSONField(name = "sub_card_type")
|
|
||||||
private final String subCardType;
|
|
||||||
/**
|
|
||||||
* 礼品卡背景图片,非必需
|
|
||||||
*/
|
|
||||||
@JSONField(name = "background_pic_url")
|
|
||||||
private String backgroundPicUrl;
|
|
||||||
/**
|
|
||||||
* 是否支持积分,填写true或者false。默认为false
|
|
||||||
*/
|
|
||||||
@JSONField(name = "supply_bonus")
|
|
||||||
private boolean supplyBonus;
|
|
||||||
/**
|
|
||||||
* 是否支持余额,填写true或者false。默认为false
|
|
||||||
*/
|
|
||||||
@JSONField(name = "supply_balance")
|
|
||||||
private boolean supplyBalance;
|
|
||||||
/**
|
|
||||||
* 自定义会员信息类目,会员卡激活后显示,包含name和url字段
|
|
||||||
*/
|
|
||||||
@JSONField(name = "custom_field1")
|
|
||||||
private MemCardCustomField customField1;
|
|
||||||
/**
|
|
||||||
* 自定义会员信息类目,会员卡激活后显示,包含name和url字段
|
|
||||||
*/
|
|
||||||
@JSONField(name = "custom_field2")
|
|
||||||
private MemCardCustomField customField2;
|
|
||||||
/**
|
|
||||||
* 自定义会员信息类目,会员卡激活后显示,包含name和url字段
|
|
||||||
*/
|
|
||||||
@JSONField(name = "custom_field3")
|
|
||||||
private MemCardCustomField customField3;
|
|
||||||
/**
|
|
||||||
* 是否自动激活,若开发者不需要额外激活流程则填写true。
|
|
||||||
*/
|
|
||||||
@JSONField(name = "auto_activate")
|
|
||||||
private boolean autoActivate;
|
|
||||||
|
|
||||||
public String getSubCardType() {
|
|
||||||
return subCardType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getBackgroundPicUrl() {
|
|
||||||
return backgroundPicUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isSupplyBonus() {
|
|
||||||
return supplyBonus;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isSupplyBalance() {
|
|
||||||
return supplyBalance;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MemCardCustomField getCustomField1() {
|
|
||||||
return customField1;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MemCardCustomField getCustomField2() {
|
|
||||||
return customField2;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MemCardCustomField getCustomField3() {
|
|
||||||
return customField3;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isAutoActivate() {
|
|
||||||
return autoActivate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public VoucherCard(CouponBaseInfo baseInfo, GiftCard.Builder builder){
|
|
||||||
super(baseInfo);
|
|
||||||
this.subCardType = SubCardType.VOUCHER.name();
|
|
||||||
this.autoActivate = builder.isAutoActivate();
|
|
||||||
this.backgroundPicUrl = builder.getBackgroundPicUrl();
|
|
||||||
this.customField1 = builder.getCustomField1();
|
|
||||||
this.customField2 = builder.getCustomField2();
|
|
||||||
this.customField3 = builder.getCustomField3();
|
|
||||||
this.supplyBalance = false;
|
|
||||||
this.supplyBonus = builder.isSupplyBonus();;
|
|
||||||
}
|
|
||||||
|
|
||||||
@JSONField(serialize = false)
|
|
||||||
@Override
|
|
||||||
public CardType getCardType() {
|
|
||||||
return CardType.GENERAL_CARD;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return "VoucherCardCoupon [" +
|
|
||||||
"subCardType='" + subCardType + '\'' +
|
|
||||||
", backgroundPicUrl='" + backgroundPicUrl + '\'' +
|
|
||||||
", supplyBonus=" + supplyBonus +
|
|
||||||
", supplyBalance=" + supplyBalance +
|
|
||||||
", customField1=" + customField1 +
|
|
||||||
", customField2=" + customField2 +
|
|
||||||
", customField3=" + customField3 +
|
|
||||||
", autoActivate=" + autoActivate +
|
|
||||||
", " + super.toString() +
|
|
||||||
']';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -15,9 +15,7 @@ import com.alibaba.fastjson.annotation.JSONField;
|
|||||||
* @date 2014年8月19日
|
* @date 2014年8月19日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see
|
* @see
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
@XmlRootElement
|
@XmlRootElement
|
||||||
@XmlAccessorType(XmlAccessType.FIELD)
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
public class JsPayNotify extends PayBaseInfo {
|
public class JsPayNotify extends PayBaseInfo {
|
||||||
|
|||||||
@ -19,9 +19,7 @@ import com.foxinmy.weixin4j.type.SignType;
|
|||||||
* @date 2014年11月5日
|
* @date 2014年11月5日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see
|
* @see
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
@XmlRootElement
|
@XmlRootElement
|
||||||
@XmlAccessorType(XmlAccessType.FIELD)
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
public class PayBaseInfo implements Serializable {
|
public class PayBaseInfo implements Serializable {
|
||||||
|
|||||||
@ -18,9 +18,7 @@ import com.foxinmy.weixin4j.util.DateUtil;
|
|||||||
* @author jinyu(foxinmy@gmail.com)
|
* @author jinyu(foxinmy@gmail.com)
|
||||||
* @date 2014年12月18日
|
* @date 2014年12月18日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
@XmlRootElement
|
@XmlRootElement
|
||||||
@XmlAccessorType(XmlAccessType.FIELD)
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
public class PayPackage extends MerchantResult {
|
public class PayPackage extends MerchantResult {
|
||||||
|
|||||||
@ -10,7 +10,6 @@ import com.alibaba.fastjson.annotation.JSONField;
|
|||||||
import com.foxinmy.weixin4j.util.DateUtil;
|
import com.foxinmy.weixin4j.util.DateUtil;
|
||||||
import com.foxinmy.weixin4j.util.RandomUtil;
|
import com.foxinmy.weixin4j.util.RandomUtil;
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
@XmlRootElement
|
@XmlRootElement
|
||||||
@XmlAccessorType(XmlAccessType.FIELD)
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
public class PayRequest extends PayBaseInfo {
|
public class PayRequest extends PayBaseInfo {
|
||||||
|
|||||||
@ -56,9 +56,7 @@ import com.foxinmy.weixin4j.util.Weixin4jConfigUtil;
|
|||||||
* @date 2015年1月3日
|
* @date 2015年1月3日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see <a href="http://pay.weixin.qq.com/wiki/doc/api/index.html">商户平台支付API</a>
|
* @see <a href="http://pay.weixin.qq.com/wiki/doc/api/index.html">商户平台支付API</a>
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public class WeixinPayProxy {
|
public class WeixinPayProxy {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -22,9 +22,7 @@ import com.foxinmy.weixin4j.util.DateUtil;
|
|||||||
* @date 2015年3月27日
|
* @date 2015年3月27日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see
|
* @see
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
@XmlRootElement
|
@XmlRootElement
|
||||||
@XmlAccessorType(XmlAccessType.FIELD)
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
public class CouponDetail extends MerchantResult {
|
public class CouponDetail extends MerchantResult {
|
||||||
|
|||||||
@ -16,9 +16,7 @@ import com.foxinmy.weixin4j.payment.mch.MerchantResult;
|
|||||||
* @date 2015年3月25日
|
* @date 2015年3月25日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see
|
* @see
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
@XmlRootElement
|
@XmlRootElement
|
||||||
@XmlAccessorType(XmlAccessType.FIELD)
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
public class CouponResult extends MerchantResult {
|
public class CouponResult extends MerchantResult {
|
||||||
|
|||||||
@ -21,9 +21,7 @@ import com.foxinmy.weixin4j.util.DateUtil;
|
|||||||
* @date 2015年3月27日
|
* @date 2015年3月27日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see
|
* @see
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
@XmlRootElement
|
@XmlRootElement
|
||||||
@XmlAccessorType(XmlAccessType.FIELD)
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
public class CouponStock extends MerchantResult {
|
public class CouponStock extends MerchantResult {
|
||||||
|
|||||||
@ -18,9 +18,7 @@ import com.foxinmy.weixin4j.type.mch.CouponType;
|
|||||||
* @date 2015年3月24日
|
* @date 2015年3月24日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see
|
* @see
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
@XmlRootElement
|
@XmlRootElement
|
||||||
@XmlAccessorType(XmlAccessType.FIELD)
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
public class OrderCouponInfo implements Serializable {
|
public class OrderCouponInfo implements Serializable {
|
||||||
|
|||||||
@ -17,9 +17,7 @@ import com.alibaba.fastjson.annotation.JSONField;
|
|||||||
* @date 2015年3月24日
|
* @date 2015年3月24日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see
|
* @see
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
@XmlRootElement
|
@XmlRootElement
|
||||||
@XmlAccessorType(XmlAccessType.FIELD)
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
public class RefundCouponInfo implements Serializable {
|
public class RefundCouponInfo implements Serializable {
|
||||||
|
|||||||
@ -21,9 +21,7 @@ import com.foxinmy.weixin4j.util.MapUtil;
|
|||||||
* @see com.foxinmy.weixin4j.payment.PayRequest
|
* @see com.foxinmy.weixin4j.payment.PayRequest
|
||||||
* @see <a href=
|
* @see <a href=
|
||||||
* "https://pay.weixin.qq.com/wiki/doc/api/app/app.php?chapter=8_1">APP支付</a>
|
* "https://pay.weixin.qq.com/wiki/doc/api/app/app.php?chapter=8_1">APP支付</a>
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public class APPPayRequest extends AbstractPayRequest {
|
public class APPPayRequest extends AbstractPayRequest {
|
||||||
public APPPayRequest(String prePayId, WeixinPayAccount payAccount) {
|
public APPPayRequest(String prePayId, WeixinPayAccount payAccount) {
|
||||||
super(prePayId, payAccount);
|
super(prePayId, payAccount);
|
||||||
|
|||||||
@ -4,7 +4,6 @@ import com.foxinmy.weixin4j.model.WeixinPayAccount;
|
|||||||
import com.foxinmy.weixin4j.sign.WeixinPaymentSignature;
|
import com.foxinmy.weixin4j.sign.WeixinPaymentSignature;
|
||||||
import com.foxinmy.weixin4j.sign.WeixinSignature;
|
import com.foxinmy.weixin4j.sign.WeixinSignature;
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public abstract class AbstractPayRequest implements MchPayRequest {
|
public abstract class AbstractPayRequest implements MchPayRequest {
|
||||||
|
|
||||||
private final String prePayId;
|
private final String prePayId;
|
||||||
|
|||||||
@ -17,9 +17,7 @@ import com.foxinmy.weixin4j.util.DateUtil;
|
|||||||
* @date 2015年4月1日
|
* @date 2015年4月1日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see
|
* @see
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
@XmlRootElement
|
@XmlRootElement
|
||||||
@XmlAccessorType(XmlAccessType.FIELD)
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
public class CorpPayment extends MerchantResult {
|
public class CorpPayment extends MerchantResult {
|
||||||
|
|||||||
@ -19,9 +19,7 @@ import com.foxinmy.weixin4j.util.DateUtil;
|
|||||||
* @date 2015年6月23日
|
* @date 2015年6月23日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see
|
* @see
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
@XmlRootElement
|
@XmlRootElement
|
||||||
@XmlAccessorType(XmlAccessType.FIELD)
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
public class CorpPaymentRecord extends MerchantResult {
|
public class CorpPaymentRecord extends MerchantResult {
|
||||||
|
|||||||
@ -18,9 +18,7 @@ import com.foxinmy.weixin4j.util.DateUtil;
|
|||||||
* @date 2015年4月1日
|
* @date 2015年4月1日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see
|
* @see
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
@XmlRootElement
|
@XmlRootElement
|
||||||
@XmlAccessorType(XmlAccessType.FIELD)
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
public class CorpPaymentResult extends MerchantResult {
|
public class CorpPaymentResult extends MerchantResult {
|
||||||
|
|||||||
@ -15,9 +15,7 @@ import com.foxinmy.weixin4j.type.CustomsCity;
|
|||||||
* @date 2016年3月27日
|
* @date 2016年3月27日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see
|
* @see
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public class CustomsOrder extends MerchantResult {
|
public class CustomsOrder extends MerchantResult {
|
||||||
|
|
||||||
private static final long serialVersionUID = 799510373861612386L;
|
private static final long serialVersionUID = 799510373861612386L;
|
||||||
|
|||||||
@ -15,9 +15,7 @@ import com.foxinmy.weixin4j.xml.ListsuffixResult;
|
|||||||
* @date 2016年3月27日
|
* @date 2016年3月27日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see
|
* @see
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public class CustomsOrderRecord extends MerchantResult {
|
public class CustomsOrderRecord extends MerchantResult {
|
||||||
|
|
||||||
private static final long serialVersionUID = -1675090110657154049L;
|
private static final long serialVersionUID = -1675090110657154049L;
|
||||||
|
|||||||
@ -16,9 +16,7 @@ import com.foxinmy.weixin4j.util.DateUtil;
|
|||||||
* @date 2016年3月27日
|
* @date 2016年3月27日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see
|
* @see
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public class CustomsOrderResult extends MerchantResult {
|
public class CustomsOrderResult extends MerchantResult {
|
||||||
|
|
||||||
private static final long serialVersionUID = 799510373861612386L;
|
private static final long serialVersionUID = 799510373861612386L;
|
||||||
|
|||||||
@ -22,9 +22,7 @@ import com.foxinmy.weixin4j.type.TradeType;
|
|||||||
* @see com.foxinmy.weixin4j.payment.PayRequest
|
* @see com.foxinmy.weixin4j.payment.PayRequest
|
||||||
* @see <a
|
* @see <a
|
||||||
* href="https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=7_1">网页端调起支付API</a>
|
* href="https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=7_1">网页端调起支付API</a>
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public class JSAPIPayRequest extends AbstractPayRequest {
|
public class JSAPIPayRequest extends AbstractPayRequest {
|
||||||
|
|
||||||
public JSAPIPayRequest(String prePayId, WeixinPayAccount payAccount) {
|
public JSAPIPayRequest(String prePayId, WeixinPayAccount payAccount) {
|
||||||
|
|||||||
@ -18,9 +18,7 @@ import com.foxinmy.weixin4j.type.TradeType;
|
|||||||
* @see com.foxinmy.weixin4j.payment.PayRequest
|
* @see com.foxinmy.weixin4j.payment.PayRequest
|
||||||
* @see <a
|
* @see <a
|
||||||
* href="https://pay.weixin.qq.com/wiki/doc/api/micropay.php?chapter=5_1">刷卡支付</a>
|
* href="https://pay.weixin.qq.com/wiki/doc/api/micropay.php?chapter=5_1">刷卡支付</a>
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public class MICROPayRequest extends Order implements MchPayRequest {
|
public class MICROPayRequest extends Order implements MchPayRequest {
|
||||||
|
|
||||||
private static final long serialVersionUID = 6147576305404111278L;
|
private static final long serialVersionUID = 6147576305404111278L;
|
||||||
|
|||||||
@ -20,9 +20,7 @@ import com.foxinmy.weixin4j.type.TradeType;
|
|||||||
* @date 2014年10月21日
|
* @date 2014年10月21日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see
|
* @see
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
@XmlRootElement
|
@XmlRootElement
|
||||||
@XmlAccessorType(XmlAccessType.FIELD)
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
public class MchPayPackage extends PayPackage {
|
public class MchPayPackage extends PayPackage {
|
||||||
|
|||||||
@ -16,9 +16,7 @@ import com.foxinmy.weixin4j.type.TradeType;
|
|||||||
* @see MICROPayRequest 刷卡支付
|
* @see MICROPayRequest 刷卡支付
|
||||||
* @see APPPayRequest APP支付
|
* @see APPPayRequest APP支付
|
||||||
* @see WAPPayRequest WAP支付
|
* @see WAPPayRequest WAP支付
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public interface MchPayRequest {
|
public interface MchPayRequest {
|
||||||
/**
|
/**
|
||||||
* 预支付交易ID
|
* 预支付交易ID
|
||||||
|
|||||||
@ -17,9 +17,7 @@ import com.foxinmy.weixin4j.type.SignType;
|
|||||||
* @date 2014年10月21日
|
* @date 2014年10月21日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see
|
* @see
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
@XmlRootElement
|
@XmlRootElement
|
||||||
@XmlAccessorType(XmlAccessType.FIELD)
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
public class MerchantResult extends XmlResult {
|
public class MerchantResult extends XmlResult {
|
||||||
|
|||||||
@ -13,9 +13,7 @@ import com.foxinmy.weixin4j.type.CurrencyType;
|
|||||||
* @date 2016年7月21日
|
* @date 2016年7月21日
|
||||||
* @since JDK 1.7
|
* @since JDK 1.7
|
||||||
* @see
|
* @see
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public class MerchantTradeResult extends MerchantResult {
|
public class MerchantTradeResult extends MerchantResult {
|
||||||
|
|
||||||
private static final long serialVersionUID = 4205906286092873877L;
|
private static final long serialVersionUID = 4205906286092873877L;
|
||||||
|
|||||||
@ -15,9 +15,7 @@ import com.foxinmy.weixin4j.type.TradeType;
|
|||||||
* @see com.foxinmy.weixin4j.payment.PayRequest
|
* @see com.foxinmy.weixin4j.payment.PayRequest
|
||||||
* @see <a
|
* @see <a
|
||||||
* href="https://pay.weixin.qq.com/wiki/doc/api/native.php?chapter=6_1">NATIVE扫码支付(模式二)</a>
|
* href="https://pay.weixin.qq.com/wiki/doc/api/native.php?chapter=6_1">NATIVE扫码支付(模式二)</a>
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public class NATIVEPayRequest extends AbstractPayRequest {
|
public class NATIVEPayRequest extends AbstractPayRequest {
|
||||||
|
|
||||||
private final String codeUrl;
|
private final String codeUrl;
|
||||||
|
|||||||
@ -15,9 +15,7 @@ import com.alibaba.fastjson.annotation.JSONField;
|
|||||||
* @date 2014年10月30日
|
* @date 2014年10月30日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see
|
* @see
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
@XmlRootElement
|
@XmlRootElement
|
||||||
@XmlAccessorType(XmlAccessType.FIELD)
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
public class NativePayNotify extends OpenIdResult {
|
public class NativePayNotify extends OpenIdResult {
|
||||||
|
|||||||
@ -19,9 +19,7 @@ import com.foxinmy.weixin4j.util.RandomUtil;
|
|||||||
* @date 2014年10月28日
|
* @date 2014年10月28日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see
|
* @see
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
@XmlRootElement
|
@XmlRootElement
|
||||||
@XmlAccessorType(XmlAccessType.FIELD)
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
public class NativePayResponse extends MerchantResult {
|
public class NativePayResponse extends MerchantResult {
|
||||||
|
|||||||
@ -15,9 +15,7 @@ import com.alibaba.fastjson.annotation.JSONField;
|
|||||||
* @date 2015年7月23日
|
* @date 2015年7月23日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see
|
* @see
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
@XmlRootElement
|
@XmlRootElement
|
||||||
@XmlAccessorType(XmlAccessType.FIELD)
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
public class OpenIdResult extends MerchantResult {
|
public class OpenIdResult extends MerchantResult {
|
||||||
|
|||||||
@ -25,9 +25,7 @@ import com.foxinmy.weixin4j.xml.ListsuffixResult;
|
|||||||
* @date 2014年11月2日
|
* @date 2014年11月2日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see
|
* @see
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
@XmlRootElement
|
@XmlRootElement
|
||||||
@XmlAccessorType(XmlAccessType.FIELD)
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
public class Order extends MerchantTradeResult {
|
public class Order extends MerchantTradeResult {
|
||||||
|
|||||||
@ -16,9 +16,7 @@ import com.foxinmy.weixin4j.type.TradeType;
|
|||||||
* @date 2014年10月21日
|
* @date 2014年10月21日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see
|
* @see
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
@XmlRootElement
|
@XmlRootElement
|
||||||
@XmlAccessorType(XmlAccessType.FIELD)
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
public class PrePay extends MerchantResult {
|
public class PrePay extends MerchantResult {
|
||||||
|
|||||||
@ -20,9 +20,7 @@ import com.foxinmy.weixin4j.util.DateUtil;
|
|||||||
* href="https://pay.weixin.qq.com/wiki/doc/api/tools/cash_coupon.php?chapter=13_1">普通红包</a>
|
* href="https://pay.weixin.qq.com/wiki/doc/api/tools/cash_coupon.php?chapter=13_1">普通红包</a>
|
||||||
* @see <a
|
* @see <a
|
||||||
* href="https://pay.weixin.qq.com/wiki/doc/api/tools/cash_coupon.php?chapter=16_1">裂变红包</a>
|
* href="https://pay.weixin.qq.com/wiki/doc/api/tools/cash_coupon.php?chapter=16_1">裂变红包</a>
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
@XmlRootElement
|
@XmlRootElement
|
||||||
@XmlAccessorType(XmlAccessType.FIELD)
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
public class Redpacket extends MerchantResult {
|
public class Redpacket extends MerchantResult {
|
||||||
|
|||||||
@ -25,9 +25,7 @@ import com.foxinmy.weixin4j.util.DateUtil;
|
|||||||
* @date 2015年6月4日
|
* @date 2015年6月4日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see
|
* @see
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
@XmlRootElement
|
@XmlRootElement
|
||||||
@XmlAccessorType(XmlAccessType.FIELD)
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
public class RedpacketRecord extends XmlResult {
|
public class RedpacketRecord extends XmlResult {
|
||||||
|
|||||||
@ -17,9 +17,7 @@ import com.foxinmy.weixin4j.util.MapUtil;
|
|||||||
* @date 2017年1月4日
|
* @date 2017年1月4日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see
|
* @see
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public class RedpacketRisk {
|
public class RedpacketRisk {
|
||||||
private Map<String, String> risk;
|
private Map<String, String> risk;
|
||||||
|
|
||||||
|
|||||||
@ -18,9 +18,7 @@ import com.foxinmy.weixin4j.util.DateUtil;
|
|||||||
* @date 2015年4月1日
|
* @date 2015年4月1日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see
|
* @see
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
@XmlRootElement
|
@XmlRootElement
|
||||||
@XmlAccessorType(XmlAccessType.FIELD)
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
public class RedpacketSendResult extends MerchantResult {
|
public class RedpacketSendResult extends MerchantResult {
|
||||||
|
|||||||
@ -24,9 +24,7 @@ import com.foxinmy.weixin4j.xml.ListsuffixResult;
|
|||||||
* @author jinyu(foxinmy@gmail.com)
|
* @author jinyu(foxinmy@gmail.com)
|
||||||
* @date 2016年7月21日
|
* @date 2016年7月21日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
@XmlRootElement
|
@XmlRootElement
|
||||||
@XmlAccessorType(XmlAccessType.FIELD)
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
public class RefundDetail implements Serializable {
|
public class RefundDetail implements Serializable {
|
||||||
|
|||||||
@ -17,9 +17,7 @@ import com.foxinmy.weixin4j.xml.ListsuffixResult;
|
|||||||
* @author jinyu(foxinmy@gmail.com)
|
* @author jinyu(foxinmy@gmail.com)
|
||||||
* @date 2014年11月1日
|
* @date 2014年11月1日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
@XmlRootElement
|
@XmlRootElement
|
||||||
@XmlAccessorType(XmlAccessType.FIELD)
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
public class RefundRecord extends MerchantTradeResult {
|
public class RefundRecord extends MerchantTradeResult {
|
||||||
|
|||||||
@ -19,9 +19,7 @@ import com.foxinmy.weixin4j.xml.ListsuffixResult;
|
|||||||
* @date 2014年11月6日
|
* @date 2014年11月6日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see
|
* @see
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
@XmlRootElement
|
@XmlRootElement
|
||||||
@XmlAccessorType(XmlAccessType.FIELD)
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
public class RefundResult extends MerchantTradeResult {
|
public class RefundResult extends MerchantTradeResult {
|
||||||
|
|||||||
@ -4,7 +4,6 @@ import javax.xml.bind.annotation.XmlAccessType;
|
|||||||
import javax.xml.bind.annotation.XmlAccessorType;
|
import javax.xml.bind.annotation.XmlAccessorType;
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
@XmlRootElement
|
@XmlRootElement
|
||||||
@XmlAccessorType(XmlAccessType.FIELD)
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
public class SceneInfoApp {
|
public class SceneInfoApp {
|
||||||
|
|||||||
@ -7,7 +7,6 @@ import javax.xml.bind.annotation.XmlRootElement;
|
|||||||
|
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
import com.alibaba.fastjson.annotation.JSONField;
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
@XmlRootElement
|
@XmlRootElement
|
||||||
@XmlAccessorType(XmlAccessType.FIELD)
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
public class SceneInfoStore {
|
public class SceneInfoStore {
|
||||||
|
|||||||
@ -17,7 +17,6 @@ import com.foxinmy.weixin4j.util.DateUtil;
|
|||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see
|
* @see
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public class SettlementRecord extends MerchantResult {
|
public class SettlementRecord extends MerchantResult {
|
||||||
|
|
||||||
private static final long serialVersionUID = 7952659545609519979L;
|
private static final long serialVersionUID = 7952659545609519979L;
|
||||||
|
|||||||
@ -16,7 +16,6 @@ import com.foxinmy.weixin4j.type.TradeType;
|
|||||||
* @see <a
|
* @see <a
|
||||||
* href="https://pay.weixin.qq.com/wiki/doc/api/wap.php?chapter=15_1">WAP支付</a>
|
* href="https://pay.weixin.qq.com/wiki/doc/api/wap.php?chapter=15_1">WAP支付</a>
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public class WAPPayRequest extends AbstractPayRequest {
|
public class WAPPayRequest extends AbstractPayRequest {
|
||||||
/**
|
/**
|
||||||
* 微信支付URL
|
* 微信支付URL
|
||||||
|
|||||||
@ -10,9 +10,7 @@ import com.foxinmy.weixin4j.util.MapUtil;
|
|||||||
* @date 2016年3月26日
|
* @date 2016年3月26日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see
|
* @see
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public abstract class AbstractWeixinSignature implements WeixinSignature {
|
public abstract class AbstractWeixinSignature implements WeixinSignature {
|
||||||
/**
|
/**
|
||||||
* 是否编码
|
* 是否编码
|
||||||
|
|||||||
@ -12,9 +12,7 @@ import com.foxinmy.weixin4j.util.DigestUtil;
|
|||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see <a
|
* @see <a
|
||||||
* href="https://pay.weixin.qq.com/wiki/doc/api/external/jsapi.php?chapter=4_3">支付签名说明</a>
|
* href="https://pay.weixin.qq.com/wiki/doc/api/external/jsapi.php?chapter=4_3">支付签名说明</a>
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public class WeixinPaymentSignature extends AbstractWeixinSignature {
|
public class WeixinPaymentSignature extends AbstractWeixinSignature {
|
||||||
/**
|
/**
|
||||||
* 支付密钥
|
* 支付密钥
|
||||||
|
|||||||
@ -10,9 +10,7 @@ import com.foxinmy.weixin4j.type.SignType;
|
|||||||
* @date 2016年3月26日
|
* @date 2016年3月26日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see
|
* @see
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public interface WeixinSignature {
|
public interface WeixinSignature {
|
||||||
/**
|
/**
|
||||||
* 是否编码
|
* 是否编码
|
||||||
|
|||||||
@ -9,9 +9,7 @@ package com.foxinmy.weixin4j.type;
|
|||||||
* @date 2015年8月19日
|
* @date 2015年8月19日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see
|
* @see
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public enum BankType {
|
public enum BankType {
|
||||||
/**
|
/**
|
||||||
* 工商银行(借记卡)
|
* 工商银行(借记卡)
|
||||||
|
|||||||
@ -8,9 +8,7 @@ package com.foxinmy.weixin4j.type;
|
|||||||
* @date 2016年3月27日
|
* @date 2016年3月27日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see
|
* @see
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public enum CredentialType {
|
public enum CredentialType {
|
||||||
IDCARD("身份证");
|
IDCARD("身份证");
|
||||||
CredentialType(String name) {
|
CredentialType(String name) {
|
||||||
|
|||||||
@ -8,9 +8,7 @@ package com.foxinmy.weixin4j.type;
|
|||||||
* @date 2014年11月2日
|
* @date 2014年11月2日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see
|
* @see
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public enum CurrencyType {
|
public enum CurrencyType {
|
||||||
CNY("人民币"), HKD("港元"), TWD("台币"), EUR("欧元"), USD("美元"), GBP("英镑"), JPY("日元"), CAD(
|
CNY("人民币"), HKD("港元"), TWD("台币"), EUR("欧元"), USD("美元"), GBP("英镑"), JPY("日元"), CAD(
|
||||||
"加拿大元"), AUD("澳大利亚元"), NZD("新西兰元"), KRW("韩元"), THB("泰铢");
|
"加拿大元"), AUD("澳大利亚元"), NZD("新西兰元"), KRW("韩元"), THB("泰铢");
|
||||||
|
|||||||
@ -8,9 +8,7 @@ package com.foxinmy.weixin4j.type;
|
|||||||
* @date 2016年3月27日
|
* @date 2016年3月27日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see
|
* @see
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public enum CustomsCity {
|
public enum CustomsCity {
|
||||||
NO("无需上报海关"), GUANGZHOU("广州"), HANGZHOU("杭州"), NINGBO("宁波"), ZHENGZHOU_BS(
|
NO("无需上报海关"), GUANGZHOU("广州"), HANGZHOU("杭州"), NINGBO("宁波"), ZHENGZHOU_BS(
|
||||||
"郑州(保税物流中心)"), CHONGQING("重庆"), XIAN("西安"), SHANGHAI("上海"), ZHENGZHOU_ZH(
|
"郑州(保税物流中心)"), CHONGQING("重庆"), XIAN("西安"), SHANGHAI("上海"), ZHENGZHOU_ZH(
|
||||||
|
|||||||
@ -8,9 +8,7 @@ package com.foxinmy.weixin4j.type;
|
|||||||
* @date 2016年3月27日
|
* @date 2016年3月27日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see
|
* @see
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public enum CustomsSatus {
|
public enum CustomsSatus {
|
||||||
UNDECLARED("未申报"), SUBMITTED("申报已提交"), PROCESSING("申报中"), SUCCESS("申报成功"), FAIL(
|
UNDECLARED("未申报"), SUBMITTED("申报已提交"), PROCESSING("申报中"), SUCCESS("申报成功"), FAIL(
|
||||||
"申报失败"), EXCEPT("海关接口异常");
|
"申报失败"), EXCEPT("海关接口异常");
|
||||||
|
|||||||
@ -10,9 +10,7 @@ import java.io.Serializable;
|
|||||||
* @date 2014年11月1日
|
* @date 2014年11月1日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see
|
* @see
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public class IdQuery implements Serializable {
|
public class IdQuery implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = -5273675987521807370L;
|
private static final long serialVersionUID = -5273675987521807370L;
|
||||||
|
|||||||
@ -8,9 +8,7 @@ package com.foxinmy.weixin4j.type;
|
|||||||
* @date 2014年11月1日
|
* @date 2014年11月1日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see
|
* @see
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public enum IdType {
|
public enum IdType {
|
||||||
/**
|
/**
|
||||||
* 微信退款单号
|
* 微信退款单号
|
||||||
|
|||||||
@ -8,9 +8,7 @@ package com.foxinmy.weixin4j.type;
|
|||||||
* @date 2014年11月5日
|
* @date 2014年11月5日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see
|
* @see
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public enum SignType {
|
public enum SignType {
|
||||||
SHA1, MD5, HMAC$SHA256
|
SHA1, MD5, HMAC$SHA256
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,9 +8,7 @@ package com.foxinmy.weixin4j.type;
|
|||||||
* @date 2016年12月21日
|
* @date 2016年12月21日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see
|
* @see
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public enum TarType {
|
public enum TarType {
|
||||||
GZIP
|
GZIP
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,9 +8,7 @@ package com.foxinmy.weixin4j.type;
|
|||||||
* @date 2014年11月2日
|
* @date 2014年11月2日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see
|
* @see
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public enum TradeState {
|
public enum TradeState {
|
||||||
/**
|
/**
|
||||||
* 支付成功
|
* 支付成功
|
||||||
|
|||||||
@ -8,9 +8,7 @@ package com.foxinmy.weixin4j.type;
|
|||||||
* @date 2014年10月21日
|
* @date 2014年10月21日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see
|
* @see
|
||||||
* @deprecated 迁移到weixin4j-pay子模块
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public enum TradeType {
|
public enum TradeType {
|
||||||
/**
|
/**
|
||||||
* JS支付
|
* JS支付
|
||||||
|
|||||||
@ -34,10 +34,5 @@ public enum CardType {
|
|||||||
/**
|
/**
|
||||||
* 会员卡
|
* 会员卡
|
||||||
*/
|
*/
|
||||||
MEMBER_CARD,
|
MEMBER_CARD;
|
||||||
|
|
||||||
/**
|
|
||||||
* 通用(礼品)卡
|
|
||||||
*/
|
|
||||||
GENERAL_CARD
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,19 +0,0 @@
|
|||||||
package com.foxinmy.weixin4j.type.card;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 礼品卡类型
|
|
||||||
*
|
|
||||||
* @className SubCardType
|
|
||||||
* @author kit(kit.li@qq.com)
|
|
||||||
* @date 2018年10月23日
|
|
||||||
*/
|
|
||||||
public enum SubCardType {
|
|
||||||
/**
|
|
||||||
* 礼品卡
|
|
||||||
*/
|
|
||||||
GIFT_CARD,
|
|
||||||
/**
|
|
||||||
* 兑换卡
|
|
||||||
*/
|
|
||||||
VOUCHER
|
|
||||||
}
|
|
||||||
@ -8,9 +8,7 @@ package com.foxinmy.weixin4j.type.mch;
|
|||||||
* @date 2014年10月31日
|
* @date 2014年10月31日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see
|
* @see
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public enum BillType {
|
public enum BillType {
|
||||||
/**
|
/**
|
||||||
* 全部
|
* 全部
|
||||||
|
|||||||
@ -9,7 +9,6 @@ package com.foxinmy.weixin4j.type.mch;
|
|||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see
|
* @see
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public enum CorpPaymentCheckNameType {
|
public enum CorpPaymentCheckNameType {
|
||||||
/**
|
/**
|
||||||
* 不校验真实姓名
|
* 不校验真实姓名
|
||||||
|
|||||||
@ -8,9 +8,7 @@ package com.foxinmy.weixin4j.type.mch;
|
|||||||
* @date 2015年3月27日
|
* @date 2015年3月27日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see
|
* @see
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public enum CouponStatus {
|
public enum CouponStatus {
|
||||||
/**
|
/**
|
||||||
* 已激活
|
* 已激活
|
||||||
|
|||||||
@ -8,9 +8,7 @@ package com.foxinmy.weixin4j.type.mch;
|
|||||||
* @date 2015年3月27日
|
* @date 2015年3月27日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see
|
* @see
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public enum CouponStockStatus {
|
public enum CouponStockStatus {
|
||||||
/**
|
/**
|
||||||
* 未激活
|
* 未激活
|
||||||
|
|||||||
@ -8,9 +8,7 @@ package com.foxinmy.weixin4j.type.mch;
|
|||||||
* @date 2015年3月27日
|
* @date 2015年3月27日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see
|
* @see
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public enum CouponStockType {
|
public enum CouponStockType {
|
||||||
/**
|
/**
|
||||||
* 批量型
|
* 批量型
|
||||||
|
|||||||
@ -8,9 +8,7 @@ package com.foxinmy.weixin4j.type.mch;
|
|||||||
* @date 2015年3月27日
|
* @date 2015年3月27日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see
|
* @see
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public enum CouponType {
|
public enum CouponType {
|
||||||
/**
|
/**
|
||||||
* 使用无门槛
|
* 使用无门槛
|
||||||
|
|||||||
@ -7,9 +7,7 @@ package com.foxinmy.weixin4j.type.mch;
|
|||||||
* @author jinyu(foxinmy@gmail.com)
|
* @author jinyu(foxinmy@gmail.com)
|
||||||
* @date 2017年1月4日
|
* @date 2017年1月4日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public enum RedpacketSceneType {
|
public enum RedpacketSceneType {
|
||||||
/**
|
/**
|
||||||
* 商品促销
|
* 商品促销
|
||||||
|
|||||||
@ -8,9 +8,7 @@ package com.foxinmy.weixin4j.type.mch;
|
|||||||
* @date 2015年6月4日
|
* @date 2015年6月4日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see
|
* @see
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public enum RedpacketSendType {
|
public enum RedpacketSendType {
|
||||||
/**
|
/**
|
||||||
* 通过API接口发放
|
* 通过API接口发放
|
||||||
|
|||||||
@ -7,9 +7,7 @@ package com.foxinmy.weixin4j.type.mch;
|
|||||||
* @date 2015年6月4日
|
* @date 2015年6月4日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see
|
* @see
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public enum RedpacketStatus {
|
public enum RedpacketStatus {
|
||||||
/**
|
/**
|
||||||
* 发放中
|
* 发放中
|
||||||
|
|||||||
@ -8,9 +8,7 @@ package com.foxinmy.weixin4j.type.mch;
|
|||||||
* @date 2015年6月4日
|
* @date 2015年6月4日
|
||||||
* @since JDK 1.6
|
* @since JDK 1.6
|
||||||
* @see
|
* @see
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public enum RedpacketType {
|
public enum RedpacketType {
|
||||||
/**
|
/**
|
||||||
* 裂变红包
|
* 裂变红包
|
||||||
|
|||||||
@ -5,9 +5,7 @@ package com.foxinmy.weixin4j.type.mch;
|
|||||||
* @className RefundAccountType
|
* @className RefundAccountType
|
||||||
* @author jinyu(foxinmy@gmail.com)
|
* @author jinyu(foxinmy@gmail.com)
|
||||||
* @date 2016年12月12日
|
* @date 2016年12月12日
|
||||||
* @deprecated 迁移到子模块weixin4j-pay
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public enum RefundAccountType {
|
public enum RefundAccountType {
|
||||||
/**
|
/**
|
||||||
* ---未结算资金退款(默认使用未结算资金退款)
|
* ---未结算资金退款(默认使用未结算资金退款)
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user