From bdf947e2ca80887be0ac1d93bc67054473477b0d Mon Sep 17 00:00:00 2001 From: Binary Wang Date: Fri, 31 Jul 2026 00:17:22 +0800 Subject: [PATCH 01/31] =?UTF-8?q?:art:=20#4078=20=E3=80=90=E5=B0=8F?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E3=80=91=E8=8E=B7=E5=8F=96=E6=89=8B=E6=9C=BA?= =?UTF-8?q?=E5=8F=B7=E7=9A=84=E6=96=B9=E6=B3=95=E6=94=AF=E6=8C=81openid?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chanjar/weixin/common/util/DataUtils.java | 6 ++- .../weixin/common/util/DataUtilsTest.java | 10 ++++ .../wx/miniapp/api/WxMaUserService.java | 13 +++++ .../miniapp/api/impl/BaseWxMaServiceImpl.java | 2 +- .../miniapp/api/impl/WxMaUserServiceImpl.java | 9 ++++ .../WxMaUserServiceImplPhoneNumberTest.java | 50 +++++++++++++++++++ 6 files changed, 87 insertions(+), 3 deletions(-) create mode 100644 weixin-java-miniapp/src/test/java/cn/binarywang/wx/miniapp/api/impl/WxMaUserServiceImplPhoneNumberTest.java diff --git a/weixin-java-common/src/main/java/me/chanjar/weixin/common/util/DataUtils.java b/weixin-java-common/src/main/java/me/chanjar/weixin/common/util/DataUtils.java index 095363cf8d..2e9f5d4c7b 100644 --- a/weixin-java-common/src/main/java/me/chanjar/weixin/common/util/DataUtils.java +++ b/weixin-java-common/src/main/java/me/chanjar/weixin/common/util/DataUtils.java @@ -17,8 +17,10 @@ public class DataUtils { */ public static E handleDataWithSecret(E data) { E dataForLog = data; - if (data instanceof String && StringUtils.contains((String) data, "secret=")) { - dataForLog = (E) RegExUtils.replaceAll((String) data, "(^|[?&])secret=[^&]*", "$1secret=******"); + if (data instanceof String) { + String stringData = (String) data; + stringData = RegExUtils.replaceAll(stringData, "(^|[?&])secret=[^&]*", "$1secret=******"); + dataForLog = (E) RegExUtils.replaceAll(stringData, "(\\\"openid\\\"\\s*:\\s*\\\")[^\\\"]*(\\\")", "$1******$2"); } return dataForLog; } diff --git a/weixin-java-common/src/test/java/me/chanjar/weixin/common/util/DataUtilsTest.java b/weixin-java-common/src/test/java/me/chanjar/weixin/common/util/DataUtilsTest.java index 1bda61a237..c5088e78c9 100644 --- a/weixin-java-common/src/test/java/me/chanjar/weixin/common/util/DataUtilsTest.java +++ b/weixin-java-common/src/test/java/me/chanjar/weixin/common/util/DataUtilsTest.java @@ -47,4 +47,14 @@ public void testHandleDataWithSecretEncodedValue() { assertFalse(s.contains("%2F"), "Encoded characters in the secret must be masked too"); assertTrue(s.contains("&secret=******&"), "Secret should be replaced with asterisks"); } + + @Test + public void testHandleDataWithOpenidInJson() { + String data = "{\"code\":\"phone-code\",\"openid\":\"user-openid\"}"; + + String result = DataUtils.handleDataWithSecret(data); + + assertFalse(result.contains("user-openid")); + assertTrue(result.contains("\"openid\":\"******\"")); + } } diff --git a/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/api/WxMaUserService.java b/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/api/WxMaUserService.java index bc8b69a14f..65b817f79f 100644 --- a/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/api/WxMaUserService.java +++ b/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/api/WxMaUserService.java @@ -73,6 +73,19 @@ public interface WxMaUserService { */ WxMaPhoneNumberInfo getPhoneNumber(String code) throws WxErrorException; + /** + * 获取手机号信息,并校验手机号获取凭证与用户的绑定关系。 + * + * @param code 每个code只能使用一次,code的有效期为5min。code获取方式参考手机号快速验证组件 + * @param openid 用户openid,传入后微信服务端将校验其与code的绑定关系 + * @return 用户手机号信息 + * @throws WxErrorException . + * @apiNote 该接口用于将code换取用户手机号。 + */ + default WxMaPhoneNumberInfo getPhoneNumber(String code, String openid) throws WxErrorException { + return this.getPhoneNumber(code); + } + /** * 获取手机号信息,基础库:2.21.2及以上或2023年8月28日起 * diff --git a/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/api/impl/BaseWxMaServiceImpl.java b/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/api/impl/BaseWxMaServiceImpl.java index 9d6c2c0fa6..bf69439a65 100644 --- a/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/api/impl/BaseWxMaServiceImpl.java +++ b/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/api/impl/BaseWxMaServiceImpl.java @@ -374,7 +374,7 @@ public WxMaApiResponse execute( Map headers, String data) throws WxErrorException { - String dataForLog = "Headers: " + headers.toString() + " Body: " + data; + String dataForLog = "Headers: " + headers.toString() + " Body: " + DataUtils.handleDataWithSecret(data); return executeWithRetry( (uriWithAccessToken) -> executor.execute(uriWithAccessToken, headers, data, WxType.MiniApp), uri, diff --git a/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/api/impl/WxMaUserServiceImpl.java b/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/api/impl/WxMaUserServiceImpl.java index c9c7a7b773..abbb021e8c 100644 --- a/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/api/impl/WxMaUserServiceImpl.java +++ b/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/api/impl/WxMaUserServiceImpl.java @@ -16,6 +16,7 @@ import me.chanjar.weixin.common.util.SignUtils; import me.chanjar.weixin.common.util.json.GsonParser; import org.apache.commons.codec.digest.DigestUtils; +import org.apache.commons.lang3.StringUtils; import java.util.Map; @@ -67,8 +68,16 @@ public WxMaPhoneNumberInfo getPhoneNoInfo(String sessionKey, String encryptedDat @Override public WxMaPhoneNumberInfo getPhoneNumber(String code) throws WxErrorException { + return this.getPhoneNumber(code, null); + } + + @Override + public WxMaPhoneNumberInfo getPhoneNumber(String code, String openid) throws WxErrorException { JsonObject param = new JsonObject(); param.addProperty("code", code); + if (StringUtils.isNotBlank(openid)) { + param.addProperty("openid", openid); + } String responseContent = this.service.post(GET_PHONE_NUMBER_URL, param.toString()); JsonObject response = GsonParser.parse(responseContent); if (response.has(PHONE_INFO)) { diff --git a/weixin-java-miniapp/src/test/java/cn/binarywang/wx/miniapp/api/impl/WxMaUserServiceImplPhoneNumberTest.java b/weixin-java-miniapp/src/test/java/cn/binarywang/wx/miniapp/api/impl/WxMaUserServiceImplPhoneNumberTest.java new file mode 100644 index 0000000000..610cd13bf8 --- /dev/null +++ b/weixin-java-miniapp/src/test/java/cn/binarywang/wx/miniapp/api/impl/WxMaUserServiceImplPhoneNumberTest.java @@ -0,0 +1,50 @@ +package cn.binarywang.wx.miniapp.api.impl; + +import cn.binarywang.wx.miniapp.api.WxMaService; +import com.google.gson.JsonObject; +import me.chanjar.weixin.common.error.WxErrorException; +import me.chanjar.weixin.common.util.json.GsonParser; +import org.mockito.ArgumentCaptor; +import org.testng.annotations.Test; + +import static cn.binarywang.wx.miniapp.constant.WxMaApiUrlConstants.User.GET_PHONE_NUMBER_URL; +import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertFalse; + +/** + * {@link WxMaUserServiceImpl} 获取手机号接口的单元测试。 + */ +public class WxMaUserServiceImplPhoneNumberTest { + + @Test + public void shouldSendOpenidWhenGettingPhoneNumber() throws WxErrorException { + WxMaService wxMaService = mock(WxMaService.class); + when(wxMaService.post(anyString(), anyString())).thenReturn("{\"phone_info\":{}}"); + + new WxMaUserServiceImpl(wxMaService).getPhoneNumber("phone-code", "user-openid"); + + ArgumentCaptor requestBody = ArgumentCaptor.forClass(String.class); + verify(wxMaService).post(eq(GET_PHONE_NUMBER_URL), requestBody.capture()); + JsonObject request = GsonParser.parse(requestBody.getValue()); + assertEquals(request.get("code").getAsString(), "phone-code"); + assertEquals(request.get("openid").getAsString(), "user-openid"); + } + + @Test + public void shouldIgnoreBlankOpenidWhenGettingPhoneNumber() throws WxErrorException { + WxMaService wxMaService = mock(WxMaService.class); + when(wxMaService.post(anyString(), anyString())).thenReturn("{\"phone_info\":{}}"); + + new WxMaUserServiceImpl(wxMaService).getPhoneNumber("phone-code", " "); + + ArgumentCaptor requestBody = ArgumentCaptor.forClass(String.class); + verify(wxMaService).post(eq(GET_PHONE_NUMBER_URL), requestBody.capture()); + JsonObject request = GsonParser.parse(requestBody.getValue()); + assertFalse(request.has("openid")); + } +} From 6014c833bce5a4ea8437f43aeaf6fdd55ebd6586 Mon Sep 17 00:00:00 2001 From: Binary Wang Date: Fri, 31 Jul 2026 00:21:52 +0800 Subject: [PATCH 02/31] =?UTF-8?q?:art:=20#4079=20=E3=80=90=E4=BC=81?= =?UTF-8?q?=E4=B8=9A=E5=BE=AE=E4=BF=A1=E3=80=91=E6=94=AF=E6=8C=81=E9=95=BF?= =?UTF-8?q?=E6=95=B4=E5=9E=8B=E7=9A=84=E4=BC=81=E4=B8=9A=E5=BE=AE=E4=BF=A1?= =?UTF-8?q?=E5=BA=94=E7=94=A8ID?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../services/AbstractWxCpConfiguration.java | 2 +- .../cp/properties/WxCpSingleProperties.java | 2 +- .../wxjava/cp/properties/WxCpProperties.java | 2 +- ...bstractWxCpConfigStorageConfiguration.java | 2 +- .../weixin/cp/api/WxCpAgentService.java | 4 ++-- .../weixin/cp/api/WxCpCorpGroupService.java | 2 +- .../weixin/cp/api/WxCpMenuService.java | 6 +++--- .../weixin/cp/api/WxCpOAuth2Service.java | 2 +- .../cp/api/impl/WxCpAgentServiceImpl.java | 4 ++-- .../cp/api/impl/WxCpCorpGroupServiceImpl.java | 2 +- .../cp/api/impl/WxCpMenuServiceImpl.java | 6 +++--- .../cp/api/impl/WxCpMessageServiceImpl.java | 4 ++-- .../cp/api/impl/WxCpOAuth2ServiceImpl.java | 2 +- .../cp/api/impl/WxCpTaskCardServiceImpl.java | 4 ++-- .../me/chanjar/weixin/cp/bean/WxCpAgent.java | 2 +- .../cp/bean/WxCpAgentJsapiSignature.java | 2 +- .../WxCpCorpGroupCorpGetTokenReq.java | 2 +- .../bean/message/WxCpLinkedCorpMessage.java | 10 +++++++++- .../weixin/cp/bean/message/WxCpMessage.java | 10 +++++++++- .../message/WxCpSchoolContactMessage.java | 10 +++++++++- .../cp/bean/messagebuilder/BaseBuilder.java | 8 ++++++-- .../weixin/cp/config/WxCpConfigStorage.java | 2 +- .../cp/config/WxCpCorpGroupConfigStorage.java | 16 +++++++-------- .../impl/AbstractWxCpInRedisConfigImpl.java | 2 +- .../impl/WxCpCorpGroupDefaultConfigImpl.java | 20 +++++++++---------- .../impl/WxCpCorpGroupRedissonConfigImpl.java | 20 +++++++++---------- .../cp/config/impl/WxCpDefaultConfigImpl.java | 10 +++++++--- .../cp/config/impl/WxCpRedisConfigImpl.java | 6 +++--- .../cp/corpgroup/service/WxCpCgService.java | 14 ++++++------- .../service/impl/BaseWxCpCgServiceImpl.java | 14 ++++++------- .../cp/api/impl/BaseWxCpServiceImplTest.java | 2 +- .../cp/api/impl/WxCpAgentServiceImplTest.java | 10 +++++----- .../impl/WxCpCorpGroupServiceImplTest.java | 2 +- .../message/WxCpLinkedCorpMessageTest.java | 16 +++++++-------- .../cp/bean/message/WxCpMessageTest.java | 10 +++++----- .../message/WxCpSchoolContactMessageTest.java | 18 ++++++++--------- .../AbstractWxCpInRedisConfigImplTest.java | 2 +- .../cp/config/impl/DemoToStringFix.java | 2 +- .../impl/WxCpDefaultConfigImplTest.java | 17 ++++++++++++++++ ...WxCpCgServiceApacheHttpClientImplTest.java | 2 +- .../impl/WxCpTpMessageServiceImplTest.java | 2 +- 41 files changed, 162 insertions(+), 113 deletions(-) create mode 100644 weixin-java-cp/src/test/java/me/chanjar/weixin/cp/config/impl/WxCpDefaultConfigImplTest.java diff --git a/spring-boot-starters/wx-java-cp-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/cp/configuration/services/AbstractWxCpConfiguration.java b/spring-boot-starters/wx-java-cp-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/cp/configuration/services/AbstractWxCpConfiguration.java index a10bdf9bed..a793a8501f 100644 --- a/spring-boot-starters/wx-java-cp-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/cp/configuration/services/AbstractWxCpConfiguration.java +++ b/spring-boot-starters/wx-java-cp-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/cp/configuration/services/AbstractWxCpConfiguration.java @@ -125,7 +125,7 @@ private WxCpService wxCpService(WxCpConfigStorage wxCpConfigStorage, WxCpMultiPr private void configCorp(WxCpDefaultConfigImpl config, WxCpSingleProperties wxCpSingleProperties) { String corpId = wxCpSingleProperties.getCorpId(); String corpSecret = wxCpSingleProperties.getCorpSecret(); - Integer agentId = wxCpSingleProperties.getAgentId(); + Long agentId = wxCpSingleProperties.getAgentId(); String token = wxCpSingleProperties.getToken(); String aesKey = wxCpSingleProperties.getAesKey(); // 企业微信,私钥,会话存档路径 diff --git a/spring-boot-starters/wx-java-cp-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/cp/properties/WxCpSingleProperties.java b/spring-boot-starters/wx-java-cp-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/cp/properties/WxCpSingleProperties.java index fcfa654a15..740f5a2a3b 100644 --- a/spring-boot-starters/wx-java-cp-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/cp/properties/WxCpSingleProperties.java +++ b/spring-boot-starters/wx-java-cp-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/cp/properties/WxCpSingleProperties.java @@ -52,7 +52,7 @@ public class WxCpSingleProperties implements Serializable { *

使用自建应用 Secret 时,需要填写对应应用的 AgentId。

*

使用通讯录同步 Secret 时,无需填写此字段。

*/ - private Integer agentId; + private Long agentId; /** * 微信企业号应用 EncodingAESKey */ diff --git a/spring-boot-starters/wx-java-cp-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/cp/properties/WxCpProperties.java b/spring-boot-starters/wx-java-cp-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/cp/properties/WxCpProperties.java index c93a7e187f..63e730d1b4 100644 --- a/spring-boot-starters/wx-java-cp-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/cp/properties/WxCpProperties.java +++ b/spring-boot-starters/wx-java-cp-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/cp/properties/WxCpProperties.java @@ -34,7 +34,7 @@ public class WxCpProperties { /** * 微信企业号应用 ID */ - private Integer agentId; + private Long agentId; /** * 微信企业号应用 EncodingAESKey */ diff --git a/spring-boot-starters/wx-java-cp-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/cp/storage/AbstractWxCpConfigStorageConfiguration.java b/spring-boot-starters/wx-java-cp-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/cp/storage/AbstractWxCpConfigStorageConfiguration.java index 2b1d8c13c5..70f620a58d 100644 --- a/spring-boot-starters/wx-java-cp-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/cp/storage/AbstractWxCpConfigStorageConfiguration.java +++ b/spring-boot-starters/wx-java-cp-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/cp/storage/AbstractWxCpConfigStorageConfiguration.java @@ -15,7 +15,7 @@ public abstract class AbstractWxCpConfigStorageConfiguration { protected WxCpDefaultConfigImpl config(WxCpDefaultConfigImpl config, WxCpProperties properties) { String corpId = properties.getCorpId(); String corpSecret = properties.getCorpSecret(); - Integer agentId = properties.getAgentId(); + Long agentId = properties.getAgentId(); String token = properties.getToken(); String aesKey = properties.getAesKey(); // 企业微信,私钥,会话存档路径 diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpAgentService.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpAgentService.java index 05f06f1da9..7302a88f0c 100644 --- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpAgentService.java +++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpAgentService.java @@ -27,7 +27,7 @@ public interface WxCpAgentService { * @return wx cp agent * @throws WxErrorException the wx error exception */ - WxCpAgent get(Integer agentId) throws WxErrorException; + WxCpAgent get(Long agentId) throws WxErrorException; /** *
@@ -65,6 +65,6 @@ public interface WxCpAgentService {
    * @return admin list
    * @throws WxErrorException the wx error exception
    */
-  WxCpTpAdmin getAdminList(Integer agentId) throws WxErrorException;
+  WxCpTpAdmin getAdminList(Long agentId) throws WxErrorException;
 
 }
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpCorpGroupService.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpCorpGroupService.java
index 69aea4bca7..16882669b7 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpCorpGroupService.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpCorpGroupService.java
@@ -23,5 +23,5 @@ public interface WxCpCorpGroupService {
    * @return the list
    * @throws WxErrorException the wx error exception
    */
-  List listAppShareInfo(Integer agentId, Integer businessType, String corpId, Integer limit, String cursor) throws WxErrorException;
+  List listAppShareInfo(Long agentId, Integer businessType, String corpId, Integer limit, String cursor) throws WxErrorException;
 }
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpMenuService.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpMenuService.java
index 07f300dd14..bfa2c1c938 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpMenuService.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpMenuService.java
@@ -40,7 +40,7 @@ public interface WxCpMenuService {
    * @throws WxErrorException the wx error exception
    * @see #create(me.chanjar.weixin.common.bean.menu.WxMenu) #create(me.chanjar.weixin.common.bean.menu.WxMenu)
    */
-  void create(Integer agentId, WxMenu menu) throws WxErrorException;
+  void create(Long agentId, WxMenu menu) throws WxErrorException;
 
   /**
    * 
@@ -67,7 +67,7 @@ public interface WxCpMenuService {
    * @throws WxErrorException the wx error exception
    * @see #delete() #delete()
    */
-  void delete(Integer agentId) throws WxErrorException;
+  void delete(Long agentId) throws WxErrorException;
 
   /**
    * 
@@ -96,5 +96,5 @@ public interface WxCpMenuService {
    * @throws WxErrorException the wx error exception
    * @see #get() #get()
    */
-  WxMenu get(Integer agentId) throws WxErrorException;
+  WxMenu get(Long agentId) throws WxErrorException;
 }
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpOAuth2Service.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpOAuth2Service.java
index 1824196720..695534ba73 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpOAuth2Service.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpOAuth2Service.java
@@ -85,7 +85,7 @@ public interface WxCpOAuth2Service {
    * @throws WxErrorException 异常
    * @see #getUserInfo(String) #getUserInfo(String)
    */
-  WxCpOauth2UserInfo getUserInfo(Integer agentId, String code) throws WxErrorException;
+  WxCpOauth2UserInfo getUserInfo(Long agentId, String code) throws WxErrorException;
 
   /**
    * 获取家校访问用户身份
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpAgentServiceImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpAgentServiceImpl.java
index cc08d33bb1..6f2ade2e49 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpAgentServiceImpl.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpAgentServiceImpl.java
@@ -34,7 +34,7 @@ public class WxCpAgentServiceImpl implements WxCpAgentService {
   private final WxCpService mainService;
 
   @Override
-  public WxCpAgent get(Integer agentId) throws WxErrorException {
+  public WxCpAgent get(Long agentId) throws WxErrorException {
     if (agentId == null) {
       throw new IllegalArgumentException("缺少agentid参数");
     }
@@ -67,7 +67,7 @@ public List list() throws WxErrorException {
   }
 
   @Override
-  public WxCpTpAdmin getAdminList(Integer agentId) throws WxErrorException {
+  public WxCpTpAdmin getAdminList(Long agentId) throws WxErrorException {
     if (agentId == null) {
       throw new IllegalArgumentException("缺少agentid参数");
     }
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpCorpGroupServiceImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpCorpGroupServiceImpl.java
index e3dc1cbe1c..73d11cc15d 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpCorpGroupServiceImpl.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpCorpGroupServiceImpl.java
@@ -25,7 +25,7 @@ public class WxCpCorpGroupServiceImpl implements WxCpCorpGroupService {
   private final WxCpService cpService;
 
   @Override
-  public List listAppShareInfo(Integer agentId, Integer businessType, String corpId,
+  public List listAppShareInfo(Long agentId, Integer businessType, String corpId,
                                                   Integer limit, String cursor) throws WxErrorException {
     final String url = this.cpService.getWxCpConfigStorage().getApiUrl(LIST_SHARE_APP_INFO);
     JsonObject jsonObject = new JsonObject();
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpMenuServiceImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpMenuServiceImpl.java
index d008e77083..0920c2b3e0 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpMenuServiceImpl.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpMenuServiceImpl.java
@@ -27,7 +27,7 @@ public void create(WxMenu menu) throws WxErrorException {
   }
 
   @Override
-  public void create(Integer agentId, WxMenu menu) throws WxErrorException {
+  public void create(Long agentId, WxMenu menu) throws WxErrorException {
     String url = String.format(this.mainService.getWxCpConfigStorage().getApiUrl(MENU_CREATE), agentId);
     this.mainService.post(url, menu.toJson());
   }
@@ -38,7 +38,7 @@ public void delete() throws WxErrorException {
   }
 
   @Override
-  public void delete(Integer agentId) throws WxErrorException {
+  public void delete(Long agentId) throws WxErrorException {
     String url = String.format(this.mainService.getWxCpConfigStorage().getApiUrl(MENU_DELETE), agentId);
     this.mainService.get(url, null);
   }
@@ -49,7 +49,7 @@ public WxMenu get() throws WxErrorException {
   }
 
   @Override
-  public WxMenu get(Integer agentId) throws WxErrorException {
+  public WxMenu get(Long agentId) throws WxErrorException {
     String url = String.format(this.mainService.getWxCpConfigStorage().getApiUrl(MENU_GET), agentId);
     try {
       String resultContent = this.mainService.get(url, null);
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpMessageServiceImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpMessageServiceImpl.java
index 6daea8ef2f..def73e4152 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpMessageServiceImpl.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpMessageServiceImpl.java
@@ -21,7 +21,7 @@ public class WxCpMessageServiceImpl implements WxCpMessageService {
 
   @Override
   public WxCpMessageSendResult send(WxCpMessage message) throws WxErrorException {
-    Integer agentId = message.getAgentId();
+    Long agentId = message.getAgentId();
     if (null == agentId) {
       message.setAgentId(this.cpService.getWxCpConfigStorage().getAgentId());
     }
@@ -38,7 +38,7 @@ public WxCpMessageSendStatistics getStatistics(int timeType) throws WxErrorExcep
 
   @Override
   public WxCpLinkedCorpMessageSendResult sendLinkedCorpMessage(WxCpLinkedCorpMessage message) throws WxErrorException {
-    Integer agentId = message.getAgentId();
+    Long agentId = message.getAgentId();
     if (null == agentId) {
       message.setAgentId(this.cpService.getWxCpConfigStorage().getAgentId());
     }
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpOAuth2ServiceImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpOAuth2ServiceImpl.java
index d04a051c0e..9b390b5ec8 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpOAuth2ServiceImpl.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpOAuth2ServiceImpl.java
@@ -69,7 +69,7 @@ public WxCpOauth2UserInfo getUserInfo(String code) throws WxErrorException {
   }
 
   @Override
-  public WxCpOauth2UserInfo getUserInfo(Integer agentId, String code) throws WxErrorException {
+  public WxCpOauth2UserInfo getUserInfo(Long agentId, String code) throws WxErrorException {
     String responseText =
       this.mainService.get(String.format(this.mainService.getWxCpConfigStorage().getApiUrl(GET_USER_INFO), code,
         agentId), null);
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpTaskCardServiceImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpTaskCardServiceImpl.java
index 8469451428..0cf0ab6665 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpTaskCardServiceImpl.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpTaskCardServiceImpl.java
@@ -28,7 +28,7 @@ public class WxCpTaskCardServiceImpl implements WxCpTaskCardService {
 
   @Override
   public void update(List userIds, String taskId, String replaceName) throws WxErrorException {
-    Integer agentId = this.mainService.getWxCpConfigStorage().getAgentId();
+    Long agentId = this.mainService.getWxCpConfigStorage().getAgentId();
 
     Map data = new HashMap<>(4);
     data.put("userids", userIds);
@@ -45,7 +45,7 @@ public void update(List userIds, String taskId, String replaceName) thro
   public void updateTemplateCardButton(List userIds, List partyIds,
                                        List tagIds, Integer atAll,
                                        String responseCode, String replaceName) throws WxErrorException {
-    Integer agentId = this.mainService.getWxCpConfigStorage().getAgentId();
+    Long agentId = this.mainService.getWxCpConfigStorage().getAgentId();
     Map data = new HashMap<>(7);
     data.put("userids", userIds);
     data.put("partyids", partyIds);
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpAgent.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpAgent.java
index 5d61b3a199..8f96a729a0 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpAgent.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpAgent.java
@@ -32,7 +32,7 @@ public class WxCpAgent implements Serializable {
   private String errMsg;
 
   @SerializedName("agentid")
-  private Integer agentId;
+  private Long agentId;
 
   @SerializedName("name")
   private String name;
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpAgentJsapiSignature.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpAgentJsapiSignature.java
index 4562d9b9b0..8ca7a6cb95 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpAgentJsapiSignature.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpAgentJsapiSignature.java
@@ -21,7 +21,7 @@ public class WxCpAgentJsapiSignature implements Serializable {
 
   private String corpid;
 
-  private Integer agentid;
+  private Long agentid;
 
   private long timestamp;
 
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/corpgroup/WxCpCorpGroupCorpGetTokenReq.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/corpgroup/WxCpCorpGroupCorpGetTokenReq.java
index 6370fc7c11..7fa00a3ada 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/corpgroup/WxCpCorpGroupCorpGetTokenReq.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/corpgroup/WxCpCorpGroupCorpGetTokenReq.java
@@ -17,5 +17,5 @@ public class WxCpCorpGroupCorpGetTokenReq implements Serializable {
   @SerializedName("business_type")
   private int businessType;
   @SerializedName("agentid")
-  private int agentId;
+  private long agentId;
 }
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpLinkedCorpMessage.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpLinkedCorpMessage.java
index 7e777384eb..46784158f3 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpLinkedCorpMessage.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpLinkedCorpMessage.java
@@ -55,7 +55,15 @@ public class WxCpLinkedCorpMessage implements Serializable {
   /**
    * 企业应用的id,整型。可在应用的设置页面查看
    */
-  private Integer agentId;
+  private Long agentId;
+
+  public void setAgentId(long agentId) {
+    this.agentId = Long.valueOf(agentId);
+  }
+
+  public void setAgentId(Long agentId) {
+    this.agentId = agentId;
+  }
   private String msgType;
   /**
    * 消息内容,最长不超过2048个字节
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpMessage.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpMessage.java
index ca3fbceccb..c25b5208f1 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpMessage.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpMessage.java
@@ -45,7 +45,15 @@ public class WxCpMessage implements Serializable {
   /**
    * 企业应用的id,整型。企业内部开发,可在应用的设置页面查看;第三方服务商,可通过接口 获取企业授权信息 获取该参数值
    */
-  private Integer agentId;
+  private Long agentId;
+
+  public void setAgentId(long agentId) {
+    this.agentId = Long.valueOf(agentId);
+  }
+
+  public void setAgentId(Long agentId) {
+    this.agentId = agentId;
+  }
   /**
    * 消息类型
    * 文本消息: text
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpSchoolContactMessage.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpSchoolContactMessage.java
index a13205cd6b..04ec5b135b 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpSchoolContactMessage.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpSchoolContactMessage.java
@@ -74,7 +74,15 @@ public class WxCpSchoolContactMessage implements Serializable {
    * 企业应用的id,整型。可在应用的设置页面查看
    */
   @SerializedName("agentid")
-  private Integer agentId;
+  private Long agentId;
+
+  public void setAgentId(long agentId) {
+    this.agentId = Long.valueOf(agentId);
+  }
+
+  public void setAgentId(Long agentId) {
+    this.agentId = agentId;
+  }
 
   /**
    * 消息内容,最长不超过2048个字节(支持id转译)
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/BaseBuilder.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/BaseBuilder.java
index e7c2267018..fa0c747c16 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/BaseBuilder.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/messagebuilder/BaseBuilder.java
@@ -15,7 +15,7 @@ public abstract class BaseBuilder {
   /**
    * The Agent id.
    */
-  protected Integer agentId;
+  protected Long agentId;
   /**
    * The To user.
    */
@@ -39,11 +39,15 @@ public abstract class BaseBuilder {
    * @param agentId the agent id
    * @return the t
    */
-  public T agentId(Integer agentId) {
+  public T agentId(Long agentId) {
     this.agentId = agentId;
     return (T) this;
   }
 
+  public T agentId(long agentId) {
+    return this.agentId(Long.valueOf(agentId));
+  }
+
   /**
    * To user t.
    *
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/WxCpConfigStorage.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/WxCpConfigStorage.java
index 7f66f05094..0efe7dd606 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/WxCpConfigStorage.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/WxCpConfigStorage.java
@@ -158,7 +158,7 @@ public interface WxCpConfigStorage {
    *
    * @return the agent id
    */
-  Integer getAgentId();
+  Long getAgentId();
 
   /**
    * Gets token.
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/WxCpCorpGroupConfigStorage.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/WxCpCorpGroupConfigStorage.java
index df758ac3a2..61b3b4043b 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/WxCpCorpGroupConfigStorage.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/WxCpCorpGroupConfigStorage.java
@@ -36,7 +36,7 @@ public interface WxCpCorpGroupConfigStorage {
    * @param corpAccessToken  the corp access token
    * @param expiresInSeconds the expires in seconds
    */
-  void updateCorpAccessToken(String corpId, Integer agentId, String corpAccessToken, int expiresInSeconds);
+  void updateCorpAccessToken(String corpId, Long agentId, String corpAccessToken, int expiresInSeconds);
 
   /**
    * 授权企业的access token相关
@@ -45,7 +45,7 @@ public interface WxCpCorpGroupConfigStorage {
    * @param agentId 应用ID
    * @return the access token
    */
-  String getCorpAccessToken(String corpId, Integer agentId);
+  String getCorpAccessToken(String corpId, Long agentId);
 
   /**
    * Gets access token entity.
@@ -54,7 +54,7 @@ public interface WxCpCorpGroupConfigStorage {
    * @param agentId 应用ID
    * @return the access token entity
    */
-  WxAccessToken getCorpAccessTokenEntity(String corpId, Integer agentId);
+  WxAccessToken getCorpAccessTokenEntity(String corpId, Long agentId);
 
   /**
    * Is access token expired boolean.
@@ -63,7 +63,7 @@ public interface WxCpCorpGroupConfigStorage {
    * @param agentId 应用ID
    * @return the boolean
    */
-  boolean isCorpAccessTokenExpired(String corpId, Integer agentId);
+  boolean isCorpAccessTokenExpired(String corpId, Long agentId);
 
   /**
    * Expire access token.
@@ -71,7 +71,7 @@ public interface WxCpCorpGroupConfigStorage {
    * @param corpId  企业ID
    * @param agentId 应用ID
    */
-  void expireCorpAccessToken(String corpId, Integer agentId);
+  void expireCorpAccessToken(String corpId, Long agentId);
 
   /**
    * 网络代理相关
@@ -122,11 +122,11 @@ public interface WxCpCorpGroupConfigStorage {
    * @param agentId 应用ID
    * @return the access token lock
    */
-  Lock getCorpAccessTokenLock(String corpId, Integer agentId);
+  Lock getCorpAccessTokenLock(String corpId, Long agentId);
 
   void setCorpId(String corpId);
 
-  void setAgentId(Integer agentId);
+  void setAgentId(Long agentId);
 
   /**
    * Gets corp id.
@@ -140,5 +140,5 @@ public interface WxCpCorpGroupConfigStorage {
    *
    * @return the agent id
    */
-  Integer getAgentId();
+  Long getAgentId();
 }
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/impl/AbstractWxCpInRedisConfigImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/impl/AbstractWxCpInRedisConfigImpl.java
index 448d2b62dd..dd9879a42a 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/impl/AbstractWxCpInRedisConfigImpl.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/impl/AbstractWxCpInRedisConfigImpl.java
@@ -74,7 +74,7 @@ public AbstractWxCpInRedisConfigImpl(@NonNull WxRedisOps redisOps, String keyPre
    * @param agentId 应用 agentId
    */
   @Override
-  public void setAgentId(Integer agentId) {
+  public void setAgentId(Long agentId) {
     super.setAgentId(agentId);
     String ukey;
     if (agentId != null) {
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/impl/WxCpCorpGroupDefaultConfigImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/impl/WxCpCorpGroupDefaultConfigImpl.java
index b3d4834426..ac57fbeb7a 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/impl/WxCpCorpGroupDefaultConfigImpl.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/impl/WxCpCorpGroupDefaultConfigImpl.java
@@ -39,7 +39,7 @@ public class WxCpCorpGroupDefaultConfigImpl implements WxCpCorpGroupConfigStorag
   /**
    * 微信企业号应用 ID
    */
-  private volatile Integer agentId;
+  private volatile Long agentId;
 
   @Override
   public void setBaseApiUrl(String baseUrl) {
@@ -65,17 +65,17 @@ public void setCorpId(String corpId) {
   }
 
   @Override
-  public Integer getAgentId() {
+  public Long getAgentId() {
     return agentId;
   }
 
   @Override
-  public void setAgentId(Integer agentId) {
+  public void setAgentId(Long agentId) {
     this.agentId = agentId;
   }
 
   @Override
-  public void updateCorpAccessToken(String corpId, Integer agentId, String corpAccessToken, int expiresInSeconds) {
+  public void updateCorpAccessToken(String corpId, Long agentId, String corpAccessToken, int expiresInSeconds) {
     String key = generateAccessTokenKey(corpId, agentId);
     corpAccessTokenMap.put(key, corpAccessToken);
     //预留200秒的时间
@@ -83,12 +83,12 @@ public void updateCorpAccessToken(String corpId, Integer agentId, String corpAcc
   }
 
   @Override
-  public String getCorpAccessToken(String corpId, Integer agentId) {
+  public String getCorpAccessToken(String corpId, Long agentId) {
     return this.corpAccessTokenMap.get(generateAccessTokenKey(corpId, agentId));
   }
 
   @Override
-  public WxAccessToken getCorpAccessTokenEntity(String corpId, Integer agentId) {
+  public WxAccessToken getCorpAccessTokenEntity(String corpId, Long agentId) {
     String key = generateAccessTokenKey(corpId, agentId);
     String accessToken = corpAccessTokenMap.getOrDefault(key, StringUtils.EMPTY);
     Long expire = corpAccessTokenExpireTimeMap.getOrDefault(key, 0L);
@@ -99,7 +99,7 @@ public WxAccessToken getCorpAccessTokenEntity(String corpId, Integer agentId) {
   }
 
   @Override
-  public boolean isCorpAccessTokenExpired(String corpId, Integer agentId) {
+  public boolean isCorpAccessTokenExpired(String corpId, Long agentId) {
     //不存在或者过期
     String key = generateAccessTokenKey(corpId, agentId);
     return corpAccessTokenExpireTimeMap.get(key) == null
@@ -107,7 +107,7 @@ public boolean isCorpAccessTokenExpired(String corpId, Integer agentId) {
   }
 
   @Override
-  public void expireCorpAccessToken(String corpId, Integer agentId) {
+  public void expireCorpAccessToken(String corpId, Long agentId) {
     String key = generateAccessTokenKey(corpId, agentId);
     corpAccessTokenMap.remove(key);
     corpAccessTokenExpireTimeMap.remove(key);
@@ -189,12 +189,12 @@ public boolean autoRefreshToken() {
   }
 
   @Override
-  public Lock getCorpAccessTokenLock(String corpId, Integer agentId) {
+  public Lock getCorpAccessTokenLock(String corpId, Long agentId) {
     return this.corpAccessTokenLocker
       .computeIfAbsent(generateAccessTokenKey(corpId, agentId), key -> new ReentrantLock());
   }
 
-  private String generateAccessTokenKey(String corpId, Integer agentId) {
+  private String generateAccessTokenKey(String corpId, Long agentId) {
     return String.join(":", this.corpId, String.valueOf(this.agentId), corpId, String.valueOf(agentId));
   }
 }
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/impl/WxCpCorpGroupRedissonConfigImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/impl/WxCpCorpGroupRedissonConfigImpl.java
index 1ef05ba8b3..d5b566a5e5 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/impl/WxCpCorpGroupRedissonConfigImpl.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/impl/WxCpCorpGroupRedissonConfigImpl.java
@@ -60,7 +60,7 @@ public class WxCpCorpGroupRedissonConfigImpl implements WxCpCorpGroupConfigStora
   /**
    * 微信企业号应用 ID
    */
-  private volatile Integer agentId;
+  private volatile Long agentId;
 
   @Override
   public void setBaseApiUrl(String baseUrl) {
@@ -86,27 +86,27 @@ public void setCorpId(String corpId) {
   }
 
   @Override
-  public Integer getAgentId() {
+  public Long getAgentId() {
     return agentId;
   }
 
   @Override
-  public void setAgentId(Integer agentId) {
+  public void setAgentId(Long agentId) {
     this.agentId = agentId;
   }
 
   @Override
-  public void updateCorpAccessToken(String corpId, Integer agentId, String corpAccessToken, int expiresInSeconds) {
+  public void updateCorpAccessToken(String corpId, Long agentId, String corpAccessToken, int expiresInSeconds) {
     wxRedisOps.setValue(generateAccessTokenKey(corpId, agentId), corpAccessToken, expiresInSeconds, TimeUnit.SECONDS);
   }
 
   @Override
-  public String getCorpAccessToken(String corpId, Integer agentId) {
+  public String getCorpAccessToken(String corpId, Long agentId) {
     return wxRedisOps.getValue(generateAccessTokenKey(corpId, agentId));
   }
 
   @Override
-  public WxAccessToken getCorpAccessTokenEntity(String corpId, Integer agentId) {
+  public WxAccessToken getCorpAccessTokenEntity(String corpId, Long agentId) {
     String key = generateAccessTokenKey(corpId, agentId);
     String accessToken = wxRedisOps.getValue(key);
     Long expire = wxRedisOps.getExpire(key);
@@ -120,13 +120,13 @@ public WxAccessToken getCorpAccessTokenEntity(String corpId, Integer agentId) {
   }
 
   @Override
-  public boolean isCorpAccessTokenExpired(String corpId, Integer agentId) {
+  public boolean isCorpAccessTokenExpired(String corpId, Long agentId) {
     String key = generateAccessTokenKey(corpId, agentId);
     return wxRedisOps.getExpire(key) == 0L || wxRedisOps.getExpire(key) == -2;
   }
 
   @Override
-  public void expireCorpAccessToken(String corpId, Integer agentId) {
+  public void expireCorpAccessToken(String corpId, Long agentId) {
     wxRedisOps.expire(generateAccessTokenKey(corpId, agentId), 0, TimeUnit.SECONDS);
   }
 
@@ -206,11 +206,11 @@ public boolean autoRefreshToken() {
   }
 
   @Override
-  public Lock getCorpAccessTokenLock(String corpId, Integer agentId) {
+  public Lock getCorpAccessTokenLock(String corpId, Long agentId) {
     return this.getLockByKey(String.join(":", corpId, String.valueOf(agentId), LOCKER_CORP_ACCESS_TOKEN));
   }
 
-  private String generateAccessTokenKey(String corpId, Integer agentId) {
+  private String generateAccessTokenKey(String corpId, Long agentId) {
     return String.join(":", keyPrefix, CG_ACCESS_TOKEN_KEY, corpId, String.valueOf(agentId));
   }
 
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/impl/WxCpDefaultConfigImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/impl/WxCpDefaultConfigImpl.java
index 6435370150..484e0c4284 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/impl/WxCpDefaultConfigImpl.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/impl/WxCpDefaultConfigImpl.java
@@ -30,7 +30,7 @@ public class WxCpDefaultConfigImpl implements WxCpConfigStorage, Serializable {
   /**
    * The Agent id.
    */
-  protected volatile Integer agentId;
+  protected volatile Long agentId;
   /**
    * The Jsapi ticket lock.
    */
@@ -320,7 +320,7 @@ public void setAesKey(String aesKey) {
   }
 
   @Override
-  public Integer getAgentId() {
+  public Long getAgentId() {
     return this.agentId;
   }
 
@@ -329,10 +329,14 @@ public Integer getAgentId() {
    *
    * @param agentId the agent id
    */
-  public void setAgentId(Integer agentId) {
+  public void setAgentId(Long agentId) {
     this.agentId = agentId;
   }
 
+  public void setAgentId(long agentId) {
+    this.setAgentId(Long.valueOf(agentId));
+  }
+
   /**
    * 设置企微会话存档路径.
    *
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/impl/WxCpRedisConfigImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/impl/WxCpRedisConfigImpl.java
index 85d136e01d..a013a9b930 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/impl/WxCpRedisConfigImpl.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/impl/WxCpRedisConfigImpl.java
@@ -40,7 +40,7 @@ public class WxCpRedisConfigImpl implements WxCpConfigStorage {
   private volatile String corpSecret;
   private volatile String token;
   private volatile String aesKey;
-  private volatile Integer agentId;
+  private volatile Long agentId;
   private volatile String msgAuditPriKey;
   private volatile String msgAuditLibPath;
   private volatile String oauth2redirectUri;
@@ -312,7 +312,7 @@ public void setCorpSecret(String corpSecret) {
   }
 
   @Override
-  public Integer getAgentId() {
+  public Long getAgentId() {
     return this.agentId;
   }
 
@@ -321,7 +321,7 @@ public Integer getAgentId() {
    *
    * @param agentId the agent id
    */
-  public void setAgentId(Integer agentId) {
+  public void setAgentId(Long agentId) {
     this.agentId = agentId;
   }
 
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/corpgroup/service/WxCpCgService.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/corpgroup/service/WxCpCgService.java
index f94c14a4f1..a8d0de682e 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/corpgroup/service/WxCpCgService.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/corpgroup/service/WxCpCgService.java
@@ -24,11 +24,11 @@ public interface WxCpCgService {
    * @param corpAccessToken  the corp access token
    * @param expiresInSeconds the expires in seconds
    */
-  void updateCorpAccessToken(String corpId, Integer agentId, String corpAccessToken, int expiresInSeconds);
+  void updateCorpAccessToken(String corpId, Long agentId, String corpAccessToken, int expiresInSeconds);
 
-  String getCorpAccessToken(String corpId, Integer agentId, Integer businessType) throws WxErrorException;
+  String getCorpAccessToken(String corpId, Long agentId, Integer businessType) throws WxErrorException;
 
-  String getCorpAccessToken(String corpId, Integer agentId, Integer businessType, boolean forceRefresh) throws WxErrorException;
+  String getCorpAccessToken(String corpId, Long agentId, Integer businessType, boolean forceRefresh) throws WxErrorException;
 
   /**
    * 授权企业的access token相关
@@ -39,7 +39,7 @@ public interface WxCpCgService {
    * @return the access token
    * @throws WxErrorException 微信错误异常
    */
-  WxAccessToken getCorpAccessTokenEntity(String corpId, Integer agentId, Integer businessType) throws WxErrorException;
+  WxAccessToken getCorpAccessTokenEntity(String corpId, Long agentId, Integer businessType) throws WxErrorException;
 
   /**
    * Gets access token entity.
@@ -51,7 +51,7 @@ public interface WxCpCgService {
    * @return the access token entity
    * @throws WxErrorException 微信错误异常
    */
-  WxAccessToken getCorpAccessTokenEntity(String corpId, Integer agentId, Integer businessType, boolean forceRefresh) throws WxErrorException;
+  WxAccessToken getCorpAccessTokenEntity(String corpId, Long agentId, Integer businessType, boolean forceRefresh) throws WxErrorException;
 
   /**
    * Is access token expired boolean.
@@ -60,7 +60,7 @@ public interface WxCpCgService {
    * @param agentId 应用ID
    * @return the boolean
    */
-  boolean isCorpAccessTokenExpired(String corpId, Integer agentId);
+  boolean isCorpAccessTokenExpired(String corpId, Long agentId);
 
   /**
    * Expire access token.
@@ -68,7 +68,7 @@ public interface WxCpCgService {
    * @param corpId  企业ID
    * @param agentId 应用ID
    */
-  void expireCorpAccessToken(String corpId, Integer agentId);
+  void expireCorpAccessToken(String corpId, Long agentId);
 
   /**
    * 当本Service没有实现某个API的时候,可以用这个,针对所有微信API中的GET请求.
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/corpgroup/service/impl/BaseWxCpCgServiceImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/corpgroup/service/impl/BaseWxCpCgServiceImpl.java
index e4fe2a686a..5439849f2a 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/corpgroup/service/impl/BaseWxCpCgServiceImpl.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/corpgroup/service/impl/BaseWxCpCgServiceImpl.java
@@ -43,17 +43,17 @@ public abstract class BaseWxCpCgServiceImpl implements WxCpCgService, Requ
   private final WxCpLinkedCorpService linkedCorpService = new WxCpLinkedCorpServiceImpl(this);
 
   @Override
-  public void updateCorpAccessToken(String corpId, Integer agentId, String corpAccessToken, int expiresInSeconds) {
+  public void updateCorpAccessToken(String corpId, Long agentId, String corpAccessToken, int expiresInSeconds) {
 
   }
 
   @Override
-  public String getCorpAccessToken(String corpId, Integer agentId, Integer businessType) throws WxErrorException {
+  public String getCorpAccessToken(String corpId, Long agentId, Integer businessType) throws WxErrorException {
     return getCorpAccessToken(corpId, agentId, businessType, false);
   }
 
   @Override
-  public String getCorpAccessToken(String corpId, Integer agentId, Integer businessType, boolean forceRefresh) throws WxErrorException {
+  public String getCorpAccessToken(String corpId, Long agentId, Integer businessType, boolean forceRefresh) throws WxErrorException {
     if (!this.configStorage.isCorpAccessTokenExpired(corpId, agentId) && !forceRefresh) {
       return this.configStorage.getCorpAccessToken(corpId, agentId);
     }
@@ -71,23 +71,23 @@ public String getCorpAccessToken(String corpId, Integer agentId, Integer busines
   }
 
   @Override
-  public WxAccessToken getCorpAccessTokenEntity(String corpId, Integer agentId, Integer businessType) throws WxErrorException {
+  public WxAccessToken getCorpAccessTokenEntity(String corpId, Long agentId, Integer businessType) throws WxErrorException {
     return this.getCorpAccessTokenEntity(corpId, agentId, businessType, false);
   }
 
 
   @Override
-  public WxAccessToken getCorpAccessTokenEntity(String corpId, Integer agentId, Integer businessType, boolean forceRefresh) throws WxErrorException {
+  public WxAccessToken getCorpAccessTokenEntity(String corpId, Long agentId, Integer businessType, boolean forceRefresh) throws WxErrorException {
     return this.configStorage.getCorpAccessTokenEntity(corpId, agentId);
   }
 
   @Override
-  public boolean isCorpAccessTokenExpired(String corpId, Integer agentId) {
+  public boolean isCorpAccessTokenExpired(String corpId, Long agentId) {
     return this.configStorage.isCorpAccessTokenExpired(corpId, agentId);
   }
 
   @Override
-  public void expireCorpAccessToken(String corpId, Integer agentId) {
+  public void expireCorpAccessToken(String corpId, Long agentId) {
     this.configStorage.expireCorpAccessToken(corpId, agentId);
   }
 
diff --git a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/BaseWxCpServiceImplTest.java b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/BaseWxCpServiceImplTest.java
index bdc85afcfc..115eafd182 100644
--- a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/BaseWxCpServiceImplTest.java
+++ b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/BaseWxCpServiceImplTest.java
@@ -121,7 +121,7 @@ public WxCpConfigStorage getWxCpConfigStorage() {
         return config;
       }
     };
-    config.setAgentId(1);
+    config.setAgentId(1L);
     service.setWxCpConfigStorage(config);
     RequestExecutor re = mock(RequestExecutor.class);
 
diff --git a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpAgentServiceImplTest.java b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpAgentServiceImplTest.java
index cbd947b925..e9004c6cf9 100644
--- a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpAgentServiceImplTest.java
+++ b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpAgentServiceImplTest.java
@@ -43,7 +43,7 @@ public class WxCpAgentServiceImplTest {
    */
   @Test
   public void testGet() throws Exception {
-    final Integer agentId = this.wxCpService.getWxCpConfigStorage().getAgentId();
+    final Long agentId = this.wxCpService.getWxCpConfigStorage().getAgentId();
     WxCpAgent wxCpAgent = this.wxCpService.getAgentService().get(agentId);
 
     assertThat(wxCpAgent.getAgentId()).isEqualTo(agentId);
@@ -60,7 +60,7 @@ public void testGet() throws Exception {
    */
   @Test
   public void testSet() throws WxErrorException {
-    final Integer agentId = this.wxCpService.getWxCpConfigStorage().getAgentId();
+    final Long agentId = this.wxCpService.getWxCpConfigStorage().getAgentId();
 
     this.wxCpService.getAgentService().set(WxCpAgent.builder()
       .description("abcddd")
@@ -92,7 +92,7 @@ public void testList() throws WxErrorException {
    */
   @Test
   public void testGetAdminList() throws WxErrorException {
-    final Integer agentId = this.wxCpService.getWxCpConfigStorage().getAgentId();
+    final Long agentId = this.wxCpService.getWxCpConfigStorage().getAgentId();
     WxCpTpAdmin adminList = this.wxCpService.getAgentService().getAdminList(agentId);
 
     assertThat(adminList).isNotNull();
@@ -124,7 +124,7 @@ public void testGet() throws Exception {
       when(wxService.getAgentService()).thenReturn(new WxCpAgentServiceImpl(wxService));
 
       WxCpAgentService wxAgentService = this.wxService.getAgentService();
-      WxCpAgent wxCpAgent = wxAgentService.get(9);
+      WxCpAgent wxCpAgent = wxAgentService.get(9L);
 
       assertEquals(9, wxCpAgent.getAgentId().intValue());
 
@@ -171,7 +171,7 @@ public void testGetAdminList() throws Exception {
       when(wxService.getAgentService()).thenReturn(new WxCpAgentServiceImpl(wxService));
 
       WxCpAgentService wxAgentService = this.wxService.getAgentService();
-      WxCpTpAdmin adminList = wxAgentService.getAdminList(9);
+      WxCpTpAdmin adminList = wxAgentService.getAdminList(9L);
 
       assertEquals(0, adminList.getErrcode().intValue());
       assertEquals(2, adminList.getAdmin().size());
diff --git a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpCorpGroupServiceImplTest.java b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpCorpGroupServiceImplTest.java
index e78ce5c008..44928e3e74 100644
--- a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpCorpGroupServiceImplTest.java
+++ b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpCorpGroupServiceImplTest.java
@@ -23,7 +23,7 @@ public class WxCpCorpGroupServiceImplTest {
 
   @Test
   public void testListAppShareInfo() throws WxErrorException {
-    Integer agentId = wxService.getWxCpConfigStorage().getAgentId();
+    Long agentId = wxService.getWxCpConfigStorage().getAgentId();
     Integer businessType = 1;
     String corpId = null;
     Integer limit = null;
diff --git a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/bean/message/WxCpLinkedCorpMessageTest.java b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/bean/message/WxCpLinkedCorpMessageTest.java
index cab57e1510..e008e47720 100644
--- a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/bean/message/WxCpLinkedCorpMessageTest.java
+++ b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/bean/message/WxCpLinkedCorpMessageTest.java
@@ -27,7 +27,7 @@ public void testToJson_text() {
       .toUsers(new String[]{"userid1", "userid2", "CorpId1/userid1", "CorpId2/userid2"})
       .toParties(new String[]{"partyid1", "partyid2", "LinkedId1/partyid1", "LinkedId2/partyid2"})
       .toTags(new String[]{"tagid1", "tagid2"})
-      .agentId(1)
+      .agentId(1L)
       .isToAll(false)
       .isSafe(false)
       .content("你的快递已到,请携带工卡前往邮件中心领取。\n出发前可查看邮件中心视频实况,聪明避开排队。")
@@ -61,7 +61,7 @@ public void testToJson_image() {
       .toUsers(new String[]{"userid1", "userid2", "CorpId1/userid1", "CorpId2/userid2"})
       .toParties(new String[]{"partyid1", "partyid2", "LinkedId1/partyid1", "LinkedId2/partyid2"})
       .toTags(new String[]{"tagid1", "tagid2"})
-      .agentId(1)
+      .agentId(1L)
       .isToAll(false)
       .isSafe(false)
       .mediaId("MEDIA_ID")
@@ -94,7 +94,7 @@ public void testToJson_video() {
       .toUsers(new String[]{"userid1", "userid2", "CorpId1/userid1", "CorpId2/userid2"})
       .toParties(new String[]{"partyid1", "partyid2", "LinkedId1/partyid1", "LinkedId2/partyid2"})
       .toTags(new String[]{"tagid1", "tagid2"})
-      .agentId(1)
+      .agentId(1L)
       .isToAll(false)
       .isSafe(false)
       .mediaId("MEDIA_ID")
@@ -131,7 +131,7 @@ public void testToJson_file() {
       .toUsers(new String[]{"userid1", "userid2", "CorpId1/userid1", "CorpId2/userid2"})
       .toParties(new String[]{"partyid1", "partyid2", "LinkedId1/partyid1", "LinkedId2/partyid2"})
       .toTags(new String[]{"tagid1", "tagid2"})
-      .agentId(1)
+      .agentId(1L)
       .isToAll(false)
       .isSafe(false)
       .mediaId("1Yv-zXfHjSjU-7LH-GwtYqDGS-zz6w22KmWAT5COgP7o")
@@ -164,7 +164,7 @@ public void testToJson_textCard() {
       .toUsers(new String[]{"userid1", "userid2", "CorpId1/userid1", "CorpId2/userid2"})
       .toParties(new String[]{"partyid1", "partyid2", "LinkedId1/partyid1", "LinkedId2/partyid2"})
       .toTags(new String[]{"tagid1", "tagid2"})
-      .agentId(1)
+      .agentId(1L)
       .isToAll(false)
       .title("领奖通知")
       .description("
2016年9月26日
恭喜你抽中iPhone 7一台,领奖码:xxxx
**事项详情**\n" + diff --git a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/bean/message/WxCpMessageTest.java b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/bean/message/WxCpMessageTest.java index 9d6210b460..04f22a3d80 100644 --- a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/bean/message/WxCpMessageTest.java +++ b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/bean/message/WxCpMessageTest.java @@ -238,7 +238,7 @@ public void TestTemplateCardBuilder_text_notice() { WxCpMessage reply = WxCpMessage.TEMPLATECARD().toUser("OPENID") .toParty("PartyID1 | PartyID2") .toTag("TagID1 | TagID2") - .agentId(1000002) + .agentId(1000002L) .cardType(WxConsts.TemplateCardType.TEXT_NOTICE) .taskId("task_id") .sourceIconUrl("图片的url") @@ -328,7 +328,7 @@ public void TestTemplateCardBuilder_news_notice() { .build(); WxCpMessage reply = WxCpMessage.TEMPLATECARD().toUser("OPENID") - .agentId(1000002) + .agentId(1000002L) .cardType(WxConsts.TemplateCardType.NEWS_NOTICE) .sourceIconUrl("图片的url") .sourceDesc("企业微信") @@ -395,7 +395,7 @@ public void TestTemplateCardBuilder_button_interaction() { .build(); WxCpMessage reply = WxCpMessage.TEMPLATECARD().toUser("OPENID") - .agentId(1000002) + .agentId(1000002L) .cardType(WxConsts.TemplateCardType.BUTTON_INTERACTION) .sourceIconUrl("图片的url") .sourceDesc("企业微信") @@ -444,7 +444,7 @@ public void TestTemplateCardBuilder_vote_interaction() { .build(); WxCpMessage reply = WxCpMessage.TEMPLATECARD().toUser("OPENID") - .agentId(1000002) + .agentId(1000002L) .cardType(WxConsts.TemplateCardType.VOTE_INTERACTION) .sourceIconUrl("图片的url") .sourceDesc("企业微信") @@ -510,7 +510,7 @@ public void TestTemplateCardBuilder_multiple_interaction() { WxCpMessage reply = WxCpMessage.TEMPLATECARD().toUser("OPENID") - .agentId(1000002) + .agentId(1000002L) .cardType(WxConsts.TemplateCardType.MULTIPLE_INTERACTION) .sourceIconUrl("图片的url") .sourceDesc("企业微信") diff --git a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/bean/message/WxCpSchoolContactMessageTest.java b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/bean/message/WxCpSchoolContactMessageTest.java index f261827059..8fd627ec9c 100644 --- a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/bean/message/WxCpSchoolContactMessageTest.java +++ b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/bean/message/WxCpSchoolContactMessageTest.java @@ -109,7 +109,7 @@ public void testToJson_text() { .toStudentUserId(new String[]{"student_userid1", "student_userid2"}) .toParty(new String[]{"partyid1", "partyid2"}) .toAll(false) - .agentId(1) + .agentId(1L) .content("你的快递已到,请携带工卡前往邮件中心领取。\n出发前可查看邮件中心视频实况,聪明避开排队。") .enableIdTrans(false) .enableDuplicateCheck(false) @@ -123,7 +123,7 @@ public void testToJson_text() { schoolContactMessage1.setToStudentUserId(new String[]{"student_userid1", "student_userid2"}); schoolContactMessage1.setToParty(new String[]{"partyid1", "partyid2"}); schoolContactMessage1.setToAll(false); - schoolContactMessage1.setAgentId(1); + schoolContactMessage1.setAgentId(1L); schoolContactMessage1.setContent("你的快递已到,请携带工卡前往邮件中心领取"); schoolContactMessage1.setEnableIdTrans(false); schoolContactMessage1.setEnableDuplicateCheck(false); @@ -163,7 +163,7 @@ public void testToJson_image() { .toStudentUserId(new String[]{"student_userid1", "student_userid2"}) .toParty(new String[]{"partyid1", "partyid2"}) .toAll(false) - .agentId(1) + .agentId(1L) .mediaId("MEDIA_ID") .build(); @@ -198,7 +198,7 @@ public void testToJson_voice() { .toStudentUserId(new String[]{"student_userid1", "student_userid2"}) .toParty(new String[]{"partyid1", "partyid2"}) .toAll(false) - .agentId(1) + .agentId(1L) .mediaId("MEDIA_ID") .build(); @@ -233,7 +233,7 @@ public void testToJson_video() { .toStudentUserId(new String[]{"student_userid1", "student_userid2"}) .toParty(new String[]{"partyid1", "partyid2"}) .toAll(false) - .agentId(1) + .agentId(1L) .mediaId("MEDIA_ID") .title("Title") .description("Description") @@ -272,7 +272,7 @@ public void testToJson_file() { .toStudentUserId(new String[]{"student_userid1", "student_userid2"}) .toParty(new String[]{"partyid1", "partyid2"}) .toAll(false) - .agentId(1) + .agentId(1L) .mediaId("1Yv-zXfHjSjU-7LH-GwtYqDGS-zz6w22KmWAT5COgP7o") .build(); @@ -307,7 +307,7 @@ public void testToJson_news() { .toStudentUserId(new String[]{"student_userid1", "student_userid2"}) .toParty(new String[]{"partyid1", "partyid2"}) .toAll(false) - .agentId(1) + .agentId(1L) .articles(Lists.newArrayList(NewArticle.builder() .title("中秋节礼品领取") .description("今年中秋节公司有豪礼相送") @@ -357,7 +357,7 @@ public void testToJson_mpnews() { .toStudentUserId(new String[]{"student_userid1", "student_userid2"}) .toParty(new String[]{"partyid1", "partyid2"}) .toAll(false) - .agentId(1) + .agentId(1L) .mpNewsArticles(Lists.newArrayList(MpnewsArticle.newBuilder() .title("Title") .thumbMediaId("MEDIA_ID") @@ -409,7 +409,7 @@ public void testToJson_miniProgram() { .toStudentUserId(new String[]{"student_userid1", "student_userid2"}) .toParty(new String[]{"partyid1", "partyid2"}) .toAll(false) - .agentId(1) + .agentId(1L) .appId("APPID") .title("欢迎报名夏令营") .thumbMediaId("MEDIA_ID") diff --git a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/config/impl/AbstractWxCpInRedisConfigImplTest.java b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/config/impl/AbstractWxCpInRedisConfigImplTest.java index 201286943e..3f96797a83 100644 --- a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/config/impl/AbstractWxCpInRedisConfigImplTest.java +++ b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/config/impl/AbstractWxCpInRedisConfigImplTest.java @@ -29,7 +29,7 @@ public void setUp() { // 使用匿名类提供具体实现用于测试 }; config.setCorpId("testCorpId"); - config.setAgentId(1); + config.setAgentId(1L); } /** diff --git a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/config/impl/DemoToStringFix.java b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/config/impl/DemoToStringFix.java index 48fe9a6639..1edbe6b4ca 100644 --- a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/config/impl/DemoToStringFix.java +++ b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/config/impl/DemoToStringFix.java @@ -30,7 +30,7 @@ public void expire(String key, int expire, java.util.concurrent.TimeUnit timeUni }; config.setCorpId("demoCorpId"); - config.setAgentId(1001); + config.setAgentId(1001L); System.out.println("Testing toString() method:"); try { diff --git a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/config/impl/WxCpDefaultConfigImplTest.java b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/config/impl/WxCpDefaultConfigImplTest.java new file mode 100644 index 0000000000..06807137e0 --- /dev/null +++ b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/config/impl/WxCpDefaultConfigImplTest.java @@ -0,0 +1,17 @@ +package me.chanjar.weixin.cp.config.impl; + +import org.testng.annotations.Test; + +import static org.testng.Assert.assertEquals; + +public class WxCpDefaultConfigImplTest { + + @Test + public void shouldStoreAgentIdBeyondIntegerRange() { + WxCpDefaultConfigImpl config = new WxCpDefaultConfigImpl(); + + config.setAgentId(1013699173317L); + + assertEquals(config.getAgentId(), Long.valueOf(1013699173317L)); + } +} diff --git a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/corpgroup/service/impl/WxCpCgServiceApacheHttpClientImplTest.java b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/corpgroup/service/impl/WxCpCgServiceApacheHttpClientImplTest.java index 4c99dbf5ed..7fcd0b91e7 100644 --- a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/corpgroup/service/impl/WxCpCgServiceApacheHttpClientImplTest.java +++ b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/corpgroup/service/impl/WxCpCgServiceApacheHttpClientImplTest.java @@ -38,7 +38,7 @@ public class WxCpCgServiceApacheHttpClientImplTest { //下游企业的corpId String corpId = ""; //下游企业的agentId - int agentId = 0; + Long agentId = 0L; int businessType = 0; String userId = ""; WxCpCorpGroupCorpGetTokenReq wxCpCorpGroupCorpGetTokenReq; diff --git a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/tp/service/impl/WxCpTpMessageServiceImplTest.java b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/tp/service/impl/WxCpTpMessageServiceImplTest.java index ff0a143b71..48ee6bb804 100644 --- a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/tp/service/impl/WxCpTpMessageServiceImplTest.java +++ b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/tp/service/impl/WxCpTpMessageServiceImplTest.java @@ -77,7 +77,7 @@ public void testSendMessage() throws WxErrorException { + "?access_token=" + accessToken; when(wxCpTpService.post(eq(expectedUrl), anyString(), eq(true))).thenReturn(mockResponse); - WxCpMessage message = WxCpMessage.TEXT().toUser("zhangsan").content("hello").agentId(1).build(); + WxCpMessage message = WxCpMessage.TEXT().toUser("zhangsan").content("hello").agentId(1L).build(); WxCpMessageSendResult result = wxCpTpMessageService.send(message, corpId); assertNotNull(result); From 79c9e21eac083ae2210e06b30f56699fecb50564 Mon Sep 17 00:00:00 2001 From: Binary Wang Date: Sat, 1 Aug 2026 00:07:50 +0800 Subject: [PATCH 03/31] :memo: Create wiki.json for devin --- .devin/wiki.json | 128 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 .devin/wiki.json diff --git a/.devin/wiki.json b/.devin/wiki.json new file mode 100644 index 0000000000..4a56bf4028 --- /dev/null +++ b/.devin/wiki.json @@ -0,0 +1,128 @@ +{ + "repo_notes": [ + { + "content": "请将整个 WxJava Wiki 以简体中文生成。所有页面标题、正文、图表标题、表格标题和说明文字均使用中文。代码、类名、方法名、包名、配置键和 Maven artifactId 保持原样;首次出现的专业术语可写为中文(English)。内容应面向 Java 开发者,准确说明公众号、小程序、企业微信、微信支付等模块。" + } + ], + "pages": [ + { + "title": "WxJava 概览", + "purpose": "介绍 WxJava 仓库,说明其核心用途、模块结构和一般使用方式,并链接到模块架构与快速入门等子页面。", + "page_notes": [{ "content": "" }] + }, + { + "title": "模块架构", + "purpose": "说明 WxJava 的整体模块架构及组件依赖关系,包括通用核心库、服务模块、Spring Boot Starter、Solon 插件和 GraalVM 支持。", + "parent": "WxJava 概览", + "page_notes": [{ "content": "" }] + }, + { + "title": "快速入门", + "purpose": "提供在不同场景中使用 WxJava 的快速入门说明,包括 Maven/Gradle 依赖配置、基础服务初始化和 HTTP 客户端选择。", + "parent": "WxJava 概览", + "page_notes": [{ "content": "" }] + }, + { + "title": "通用组件", + "purpose": "记录所有 WxJava 模块共用的工具类、常量和通用模式,并链接到消息处理与 HTTP 基础设施等子页面。", + "page_notes": [{ "content": "" }] + }, + { + "title": "消息处理框架", + "purpose": "说明不同模块使用的核心消息处理与路由架构,包括 WxConsts 消息类型、XML 消息解析、XStream 序列化,以及路由器、处理器和拦截器模式。", + "parent": "通用组件", + "page_notes": [{ "content": "" }] + }, + { + "title": "HTTP 客户端基础设施", + "purpose": "记录 HTTP 客户端抽象层,包括 RequestExecutor 策略模式、Apache HttpClient 4/5、OkHttp 和 Jodd-Http 支持、代理配置及 HttpClient 升级指南。", + "parent": "通用组件", + "page_notes": [{ "content": "" }] + }, + { + "title": "分布式状态与锁", + "purpose": "说明 WxJava 如何借助 Redis(Jedis、Redisson、Spring Data Redis)管理 access token 等凭据的分布式状态,包括 WxRedisOps 抽象和分布式锁实现。", + "parent": "通用组件", + "page_notes": [{ "content": "" }] + }, + { + "title": "微信公众号(MP)模块", + "purpose": "记录用于接入微信公众号的 MP 模块,概述 WxMpService、配置方式,并链接到服务实现、消息路由和子服务等页面。", + "page_notes": [{ "content": "" }] + }, + { + "title": "MP 服务实现", + "purpose": "详述 WxMpService 及其 Apache、OkHttp、Jodd HTTP 客户端实现、access token 生命周期、多账号切换,以及 BaseWxMpServiceImpl 请求处理流程。", + "parent": "微信公众号(MP)模块", + "page_notes": [{ "content": "" }] + }, + { + "title": "MP 消息路由", + "purpose": "说明 MP 模块的消息路由、处理器和拦截器,包括 WxMpMessageRouter 规则配置、WxMpXmlMessage 解析和 XML 被动回复消息构建器。", + "parent": "微信公众号(MP)模块", + "page_notes": [{ "content": "" }] + }, + { + "title": "MP 子服务", + "purpose": "记录 MP 模块的专用子服务,包括用户管理、客服(Kefu)、模板消息、群发消息、素材管理、卡券、菜单、二维码、数据立方体分析和订阅通知。", + "parent": "微信公众号(MP)模块", + "page_notes": [{ "content": "" }] + }, + { + "title": "企业微信(CP)模块", + "purpose": "记录接入企业微信的 CP 模块,概述 WxCpService、配置存储,并链接到客户联系、用户管理、OA 功能和第三方平台等子页面。", + "page_notes": [{ "content": "" }] + }, + { + "title": "CP 客户联系管理", + "purpose": "说明如何管理企业微信外部联系人(客户),包括 ContactWay 配置、客户详情获取、ID 迁移、群聊管理、客户转接、拦截规则和商品图册。", + "parent": "企业微信(CP)模块", + "page_notes": [{ "content": "" }] + }, + { + "title": "CP 用户管理", + "purpose": "详述企业微信的用户管理操作,包括 WxCpUserService、WxCpUser 对象、OAuth2 认证、部门与标签管理、应用管理和人事员工字段管理。", + "parent": "企业微信(CP)模块", + "page_notes": [{ "content": "" }] + }, + { + "title": "CP OA 与消息能力", + "purpose": "记录办公自动化(OA)能力,包括打卡、审批、WeDrive 文件管理,以及 CP 消息能力,包括群机器人、客服(KF)、智能机器人和消息审计(会话存档)。", + "parent": "企业微信(CP)模块", + "page_notes": [{ "content": "" }] + }, + { + "title": "CP 第三方平台(TP)", + "purpose": "记录面向企业微信 ISV 的 CP 第三方平台服务(WxCpTpService),包括永久授权码管理、消息路由、定制应用、版本与订单管理和许可服务。", + "parent": "企业微信(CP)模块", + "page_notes": [{ "content": "" }] + }, + { + "title": "微信支付模块", + "purpose": "记录接入微信支付 API 的支付模块,概述 WxPayService、V2/V3 API 差异,并链接到配置、核心操作和专用支付服务等子页面。", + "page_notes": [{ "content": "" }] + }, + { + "title": "微信支付配置", + "purpose": "说明微信支付的配置选项和安全设置,包括 WxPayConfig、多商户/多 appId 支持、V3 证书管理、AutoUpdateCertificatesVerifier、SignatureExec 和可信主机配置。", + "parent": "微信支付模块", + "page_notes": [{ "content": "" }] + }, + { + "title": "电商服务", + "purpose": "记录微信支付中的专用电商操作,包括服务商模式的 EcommerceService、二级商户进件(Applyment4Sub)、分账(V2/V3)、转账、投诉处理和微信支付分。", + "parent": "微信支付模块", + "page_notes": [{ "content": "" }] + }, + { + "title": "支付核心操作与数据对象", + "purpose": "记录核心支付操作(统一下单、退款、查询、回调通知)以及 V2/V3 请求和结果数据对象的层次结构,包括 WxPayUnifiedOrderRequest、退款对象、订单通知结果和企业付款(EntPay)。", + "parent": "微信支付模块", + "page_notes": [{ "content": "" }] + }, + { + "title": "微信小程序模块", + "purpose": "记录面向微信小程序的 MiniApp 模块,概述 WxMaService、配置方式,并链接到服务实现、消息处理和专用子服务等页面。", + "page_notes": [{ "content": "" }] + }, + { From f96fd58d1c9fb09accaf492f166cf21a3c81dce4 Mon Sep 17 00:00:00 2001 From: Binary Wang Date: Sat, 1 Aug 2026 10:55:07 +0800 Subject: [PATCH 04/31] :memo: Add DeepWiki badge to README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 86b203d573..849abb6b18 100644 --- a/README.md +++ b/README.md @@ -8,12 +8,12 @@ [![Build Status](https://img.shields.io/circleci/project/github/binarywang/WxJava/develop.svg?sanitize=true&label=Build)](https://circleci.com/gh/binarywang/WxJava/tree/develop) [![使用IntelliJ IDEA开发维护](https://img.shields.io/badge/IntelliJ%20IDEA-支持-blue.svg)](https://www.jetbrains.com/?from=WxJava-weixin-java-tools) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) +[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/binarywang/WxJava) [Featured|HelloGitHub](https://hellogithub.com/repository/6de6147050c94db4aedfd7098d19f8d8) [binarywang/WxJava | 趋势转变](https://trendshift.io/repositories/12152) [Star History](https://www.star-history.com/binarywang/wxjava) - ### 微信 `Java` 开发工具包,支持包括微信支付、开放平台、公众号、企业微信、视频号、小程序等微信功能模块的后端开发。 ### 特别赞助 From c315d083aa05f05cfd84221e5aae4345bdc7cf50 Mon Sep 17 00:00:00 2001 From: Binary Wang Date: Tue, 4 Aug 2026 19:11:24 +0800 Subject: [PATCH 05/31] :memo: Add missing entries for WeChat MiniApp and Open Platform --- .devin/wiki.json | 53 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/.devin/wiki.json b/.devin/wiki.json index 4a56bf4028..3e491c4855 100644 --- a/.devin/wiki.json +++ b/.devin/wiki.json @@ -126,3 +126,56 @@ "page_notes": [{ "content": "" }] }, { + "title": "小程序服务与配置", + "purpose": "详述 WxMaService 接口、BaseWxMaServiceImpl 请求处理流程、多租户配置、API 签名机制、WxMaConfig 实现(内存、Redis、Redisson)和 HTTP 客户端变体。", + "parent": "微信小程序模块", + "page_notes": [{ "content": "" }] + }, + { + "title": "小程序消息与用户服务", + "purpose": "记录小程序消息路由(WxMaMessageRouter)、WxMaMessage 解析、客服(Kefu)消息、模板/订阅消息、用户服务(jsCode2Session、手机号)、二维码生成和直播服务。", + "parent": "微信小程序模块", + "page_notes": [{ "content": "" }] + }, + { + "title": "小程序代码管理与开放平台集成", + "purpose": "记录小程序代码生命周期管理(提交、审核、发布)、代码模板、类目管理,以及通过开放平台进行第三方小程序管理的集成方式。", + "parent": "微信小程序模块", + "page_notes": [{ "content": "" }] + }, + { + "title": "微信开放平台模块", + "purpose": "记录面向第三方应用开发者的开放平台模块,概述 WxOpenComponentService、授权流程,并链接到组件服务和小程序/公众号管理等子页面。", + "page_notes": [{ "content": "" }] + }, + { + "title": "开放平台组件服务", + "purpose": "详述 WxOpenComponentService 的实现、组件 access token 管理、verify ticket 处理、预授权码生成、授权码交换、服务工厂方法和平台事件消息路由。", + "parent": "微信开放平台模块", + "page_notes": [{ "content": "" }] + }, + { + "title": "开放平台小程序与公众号管理", + "purpose": "记录通过开放平台对小程序(WxOpenMaService)和公众号(WxOpenMpService)的代管理能力,包括代码管理、域名配置、ICP备案、快速注册和隐私设置。", + "parent": "微信开放平台模块", + "page_notes": [{ "content": "" }] + }, + { + "title": "微信视频号模块", + "purpose": "记录面向视频号和微信小店的 weixin-java-channel 模块,涵盖 WxChannelService 接口、商品/订单/售后管理、直播、优选联盟功能,以及 Spring Boot/Solon 集成。", + "page_notes": [{ "content": "" }] + }, + { + "title": "视频号服务 API", + "purpose": "详述 WxChannelService 接口及其子服务,包括商品管理、订单处理、售后处理、优惠券管理、资金操作、VIP 会员和罗盘分析服务。", + "parent": "微信视频号模块", + "page_notes": [{ "content": "" }] + }, + { + "title": "视频号直播与优选联盟能力", + "purpose": "记录视频号直播服务(WxFinderLiveService、WxChannelLiveDashboardService)、优选联盟的供货商、推广员、商品和橱窗服务,以及视频号助手能力。", + "parent": "微信视频号模块", + "page_notes": [{ "content": "" }] + } + ] +} From eb42a331b312db53f69f8bf9ba6c758237d35834 Mon Sep 17 00:00:00 2001 From: Binary Wang Date: Tue, 11 Aug 2026 13:40:21 +0800 Subject: [PATCH 06/31] =?UTF-8?q?:art:=20#4087=20=E3=80=90=E5=BE=AE?= =?UTF-8?q?=E4=BF=A1=E6=94=AF=E4=BB=98=E3=80=91=E5=85=BC=E5=AE=B9=E6=94=B6?= =?UTF-8?q?=E4=BB=98=E9=80=9A=E6=97=A7=E7=89=88=E4=B8=8B=E5=8D=95=E6=A8=A1?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...8-08-legacy-ecommerce-api-compatibility.md | 60 ++ ...gacy-ecommerce-api-compatibility-design.md | 35 + .../CombineTransactionsNotifyResult.java | 30 + .../ecommerce/CombineTransactionsRequest.java | 460 +++++++++++++ .../ecommerce/CombineTransactionsResult.java | 354 ++++++++++ .../PartnerTransactionsCloseRequest.java | 63 ++ .../PartnerTransactionsNotifyResult.java | 28 + .../PartnerTransactionsQueryRequest.java | 70 ++ .../ecommerce/PartnerTransactionsRequest.java | 647 ++++++++++++++++++ .../ecommerce/PartnerTransactionsResult.java | 601 ++++++++++++++++ .../wxpay/bean/ecommerce/SignatureHeader.java | 42 ++ .../bean/ecommerce/TransactionsResult.java | 127 ++++ .../bean/ecommerce/enums/TradeTypeEnum.java | 38 + .../wxpay/service/EcommerceService.java | 100 ++- .../service/impl/EcommerceServiceImpl.java | 6 +- .../LegacyEcommerceApiCompatibilityTest.java | 20 + 16 files changed, 2677 insertions(+), 4 deletions(-) create mode 100644 docs/superpowers/plans/2026-08-08-legacy-ecommerce-api-compatibility.md create mode 100644 docs/superpowers/specs/2026-08-08-legacy-ecommerce-api-compatibility-design.md create mode 100644 weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/CombineTransactionsNotifyResult.java create mode 100644 weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/CombineTransactionsRequest.java create mode 100644 weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/CombineTransactionsResult.java create mode 100644 weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/PartnerTransactionsCloseRequest.java create mode 100644 weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/PartnerTransactionsNotifyResult.java create mode 100644 weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/PartnerTransactionsQueryRequest.java create mode 100644 weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/PartnerTransactionsRequest.java create mode 100644 weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/PartnerTransactionsResult.java create mode 100644 weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/SignatureHeader.java create mode 100644 weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/TransactionsResult.java create mode 100644 weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/enums/TradeTypeEnum.java create mode 100644 weixin-java-pay/src/test/java/com/github/binarywang/wxpay/service/LegacyEcommerceApiCompatibilityTest.java diff --git a/docs/superpowers/plans/2026-08-08-legacy-ecommerce-api-compatibility.md b/docs/superpowers/plans/2026-08-08-legacy-ecommerce-api-compatibility.md new file mode 100644 index 0000000000..5c1098fbf3 --- /dev/null +++ b/docs/superpowers/plans/2026-08-08-legacy-ecommerce-api-compatibility.md @@ -0,0 +1,60 @@ +# 收付通旧 API 过渡兼容层 Implementation Plan + +> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. + +**Goal:** Restore the public e-commerce payment API removed by #4014 as deprecated adapters over the unified V3 API. + +**Architecture:** Deprecated legacy models remain in `bean.ecommerce`; `EcommerceService` exposes overloads with those legacy types. Each overload maps the input to the unified request/enums, invokes the existing unified method, and maps the response back, so transport and signature logic remain singular. + +**Tech Stack:** Java 8, Maven, TestNG, Gson, Lombok. + +## Global Constraints + +- Keep all new #4014 API signatures and behavior unchanged. +- Mark every restored legacy public class and service method `@Deprecated` with migration Javadoc. +- Do not recreate legacy HTTP, signing, or notification-verification implementations. +- Remove the compatibility layer only in 5.0. + +--- + +### Task 1: Restore legacy model surface + +**Files:** +- Create: `weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/{TransactionsResult,CombineTransactionsRequest,CombineTransactionsResult,CombineTransactionsNotifyResult,PartnerTransactionsRequest,PartnerTransactionsResult,PartnerTransactionsNotifyResult,PartnerTransactionsQueryRequest,PartnerTransactionsCloseRequest,SignatureHeader}.java` +- Create: `weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/enums/TradeTypeEnum.java` +- Test: `weixin-java-pay/src/test/java/com/github/binarywang/wxpay/service/LegacyEcommerceApiCompatibilityTest.java` + +**Interfaces:** +- Produces legacy types with their pre-#4014 fully qualified names and accessors. + +- [ ] **Step 1: Write a failing compilation test importing the old types.** +- [ ] **Step 2: Run `mvn -pl weixin-java-pay -Dtest=LegacyEcommerceApiCompatibilityTest test` and confirm compilation fails because the old types do not exist.** +- [ ] **Step 3: Restore the old model source and annotate each class `@Deprecated`.** +- [ ] **Step 4: Re-run the focused Maven test and confirm compilation succeeds.** + +### Task 2: Add service-level adapters + +**Files:** +- Modify: `weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/EcommerceService.java` +- Create: `weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/LegacyEcommerceApiAdapter.java` +- Test: `weixin-java-pay/src/test/java/com/github/binarywang/wxpay/service/LegacyEcommerceApiCompatibilityTest.java` + +**Interfaces:** +- Consumes restored legacy models from Task 1 and current unified V3 APIs. +- Produces deprecated overloads for `combine`, `combineTransactions`, notification parsing, query/close, partner order creation, query/close and notification parsing. + +- [ ] **Step 1: Write failing tests using legacy `EcommerceService` signatures and asserting delegation to the corresponding unified method.** +- [ ] **Step 2: Run the focused Maven test and confirm each test fails because no legacy overload exists.** +- [ ] **Step 3: Implement mapping helpers and `default` legacy overloads that delegate to current methods.** +- [ ] **Step 4: Re-run the focused Maven test and confirm the legacy paths pass.** + +### Task 3: Regression verification and documentation + +**Files:** +- Modify: `weixin-java-pay/src/test/java/com/github/binarywang/wxpay/service/LegacyEcommerceApiCompatibilityTest.java` +- Modify: `docs/superpowers/specs/2026-08-08-legacy-ecommerce-api-compatibility-design.md` + +- [ ] **Step 1: Add tests proving current unified API calls still resolve to their current methods.** +- [ ] **Step 2: Run `mvn -pl weixin-java-pay test` and verify the module builds successfully.** +- [ ] **Step 3: Inspect `git diff --check` and `git diff` for accidental edits.** +- [ ] **Step 4: Commit the implementation and tests with a Chinese message.** diff --git a/docs/superpowers/specs/2026-08-08-legacy-ecommerce-api-compatibility-design.md b/docs/superpowers/specs/2026-08-08-legacy-ecommerce-api-compatibility-design.md new file mode 100644 index 0000000000..25908d3ba8 --- /dev/null +++ b/docs/superpowers/specs/2026-08-08-legacy-ecommerce-api-compatibility-design.md @@ -0,0 +1,35 @@ +# 收付通旧 API 过渡兼容层设计 + +## 目标 + +在保留 #4014 统一收付通 API 的前提下,恢复该 PR 删除的公开旧 API,使依赖 4.8.4 收付通模型和 `EcommerceService` 方法的应用能够升级到包含服务商电子发票能力的 4.8.5.x 版本。 + +## 方案选择 + +1. **仅恢复 `TransactionsResult`**:改动最少,但旧请求、枚举和服务方法仍无法编译,不能解决实际升级问题。 +2. **保留独立的旧实现**:兼容性最高,但会重新引入两套 HTTP、验签和签名逻辑,容易再次发生行为漂移。 +3. **废弃的适配层(采用)**:恢复旧模型及方法签名,由旧方法转换为统一模型后调用新 API。这样保留调用方兼容性,只有一套网络实现和业务行为。 + +## 架构 + +恢复的 `com.github.binarywang.wxpay.bean.ecommerce` 下模型均标记 `@Deprecated`。`EcommerceService` 对旧参数类型提供同名重载的 `default` 方法;这些方法使用一个包内适配器把旧请求、枚举和结果转换为新模型,然后委托新的统一方法。 + +旧 API 与新 API 的参数类型位于不同包,因此可安全重载。新 API 的名称、签名和执行路径不变。兼容层覆盖 #4014 删除的下单、查询、关单和通知模型/入口,而不是只恢复一个结果类。 + +## 行为与迁移 + +- 旧调用方继续导入 `bean.ecommerce` 类型即可编译和运行。 +- 新调用方继续使用 `bean.request`、`bean.result`、`bean.notify` 的统一类型,不受兼容层影响。 +- 兼容层直接委托新 API;请求 JSON、验签和网络调用遵循当前统一实现。 +- 所有旧入口在 Javadoc 中给出新 API 的迁移目标,并标记为将在 5.0 移除。 +- 同时使用旧、新包的通配符导入可能引发同名类型歧义;用户应使用显式 import。 + +## 测试 + +为每个兼容入口增加测试,验证旧类型可调用、适配后委托至对应新 API,并验证返回模型中的核心字段和支付调起参数保持可用。测试同时覆盖新 API,确保新路径没有回归。 + +## 非目标 + +- 不恢复已删除的旧网络实现。 +- 不新增任何微信支付接口。 +- 不承诺 5.0 后继续保留旧模型。 diff --git a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/CombineTransactionsNotifyResult.java b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/CombineTransactionsNotifyResult.java new file mode 100644 index 0000000000..efc5f7b2cc --- /dev/null +++ b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/CombineTransactionsNotifyResult.java @@ -0,0 +1,30 @@ +package com.github.binarywang.wxpay.bean.ecommerce; + +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * 合单支付 通知结果 + *
+ *   文档地址:https://pay.weixin.qq.com/wiki/doc/apiv3/wxpay/pay/combine/chapter3_7.shtml
+ * 
+ */ +@Data +@NoArgsConstructor +@Deprecated +public class CombineTransactionsNotifyResult implements Serializable { + + private static final long serialVersionUID = -4710926828683593250L; + /** + * 源数据 + */ + private NotifyResponse rawData; + + /** + * 解密后的数据 + */ + private CombineTransactionsResult result; + +} diff --git a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/CombineTransactionsRequest.java b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/CombineTransactionsRequest.java new file mode 100644 index 0000000000..e062a3fbd1 --- /dev/null +++ b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/CombineTransactionsRequest.java @@ -0,0 +1,460 @@ +package com.github.binarywang.wxpay.bean.ecommerce; + +import com.google.gson.annotations.SerializedName; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; +import java.util.List; + +/** + * 合单支付API + *
+ * 文档地址:https://pay.weixin.qq.com/wiki/doc/apiv3/wxpay/pages/e-combine.shtml
+ * 
+ */ +@Data +@NoArgsConstructor +@Deprecated +public class CombineTransactionsRequest implements Serializable { + private static final long serialVersionUID = -1242741645939606441L; + /** + *
+   * 字段名:合单商户appid
+   * 变量名:combine_appid
+   * 是否必填:是
+   * 类型:string(32)
+   * 描述:
+   *   合单发起方的appid。
+   *  示例值:wxd678efh567hg6787
+   * 
+ */ + @SerializedName(value = "combine_appid") + private String combineAppid; + + /** + *
+   * 字段名:合单商户号
+   * 变量名:combine_mchid
+   * 是否必填:是
+   * 类型:string(32)
+   * 描述:
+   *  合单发起方商户号。
+   *  示例值:1900000109
+   * 
+ */ + @SerializedName(value = "combine_mchid") + private String combineMchid; + + /** + *
+   * 字段名:合单商户订单号
+   * 变量名:combine_out_trade_no
+   * 是否必填:是
+   * 类型:string(32)
+   * 描述:
+   *  合单支付总订单号,要求32个字符内,只能是数字、大小写字母_-|*@ ,且在同一个商户号下唯一。
+   *  示例值:P20150806125346
+   * 
+ */ + @SerializedName(value = "combine_out_trade_no") + private String combineOutTradeNo; + + /** + *
+   * 字段名:+场景信息
+   * 变量名:scene_info
+   * 是否必填:否
+   * 类型:object
+   * 描述:支付场景信息描述
+   * 
+ */ + @SerializedName(value = "scene_info") + private SceneInfo sceneInfo; + + /** + *
+   * 字段名:+子单信息
+   * 变量名:sub_orders
+   * 是否必填:是
+   * 类型:array
+   * 描述:
+   *  最多支持子单条数:50
+   *
+   * 
+ */ + @SerializedName(value = "sub_orders") + private List subOrders; + + /** + *
+   * 字段名:+支付者
+   * 变量名:combine_payer_info
+   * 是否必填:否(JSAPI必填)
+   * 类型:object
+   * 描述:支付者信息
+   * 
+ */ + @SerializedName(value = "combine_payer_info") + private CombinePayerInfo combinePayerInfo; + + /** + *
+   * 字段名:交易起始时间
+   * 变量名:time_start
+   * 是否必填:否
+   * 类型:string(14)
+   * 描述:
+   *  订单生成时间,遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC 8小时,即北京时间)。例如:2015-05-20T13:29:35+08:00表示,北京时间2015年5月20日 13点29分35秒。
+   *  示例值:2019-12-31T15:59:60+08:00
+   * 
+ */ + @SerializedName(value = "time_start") + private String timeStart; + + /** + *
+   * 字段名:交易结束时间
+   * 变量名:time_expire
+   * 是否必填:否
+   * 类型:string(14)
+   * 描述:
+   *  订单失效时间,遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC 8小时,即北京时间)。例如:2015-05-20T13:29:35+08:00表示,北京时间2015年5月20日 13点29分35秒。
+   *  示例值:2019-12-31T15:59:60+08:00
+   * 
+ */ + @SerializedName(value = "time_expire") + private String timeExpire; + + /** + *
+   * 字段名:通知地址
+   * 变量名:notify_url
+   * 是否必填:是
+   * 类型:string(256)
+   * 描述:
+   *  接收微信支付异步通知回调地址,通知url必须为直接可访问的URL,不能携带参数。
+   *  格式: URL
+   *  示例值:https://yourapp.com/notify
+   * 
+ */ + @SerializedName(value = "notify_url") + private String notifyUrl; + + + @Data + @NoArgsConstructor + public static class SceneInfo implements Serializable { + /** + *
+     * 字段名:商户端设备号
+     * 变量名:device_id
+     * 是否必填:否
+     * 类型:string(16)
+     * 描述:
+     *  终端设备号(门店号或收银设备ID)。
+     *  特殊规则:长度最小7个字节
+     *  示例值:POS1:1
+     * 
+ */ + @SerializedName(value = "device_id") + private String deviceId; + + /** + *
+     * 字段名:用户终端IP
+     * 变量名:payer_client_ip
+     * 是否必填:是
+     * 类型:string(45)
+     * 描述:
+     *  用户端实际ip
+     *  格式: ip(ipv4+ipv6)
+     *  示例值:14.17.22.32
+     * 
+ */ + @SerializedName(value = "payer_client_ip") + private String payerClientIp; + + /** + *
+     * 字段名:H5场景信息
+     * 变量名:h5_info
+     * 是否必填:否(H5支付必填)
+     * 类型:object
+     * 描述:
+     *  H5场景信息
+     * 
+ */ + @SerializedName(value = "h5_info") + private H5Info h5Info; + } + + @Data + @NoArgsConstructor + public static class SubOrders implements Serializable { + /** + *
+     * 字段名:子单商户号
+     * 变量名:mchid
+     * 是否必填:是
+     * 类型:string(32)
+     * 描述:
+     *  子单发起方商户号,必须与发起方appid有绑定关系。
+     *  示例值:1900000109
+     *  此处一般填写服务商商户号
+     * 
+ */ + @SerializedName(value = "mchid") + private String mchid; + + /** + *
+     * 字段名:附加信息
+     * 变量名:attach
+     * 是否必填:是
+     * 类型:string(128)
+     * 描述:
+     *  附加数据,在查询API和支付通知中原样返回,可作为自定义参数使用。
+     *  示例值:深圳分店
+     * 
+ */ + @SerializedName(value = "attach") + private String attach; + + /** + *
+     * 字段名:+订单金额
+     * 变量名:amount
+     * 是否必填:是
+     * 类型:object
+     * 描述:
+     * 
+ */ + @SerializedName(value = "amount") + private Amount amount; + + /** + *
+     * 字段名:子单商户订单号
+     * 变量名:out_trade_no
+     * 是否必填:是
+     * 类型:string(32)
+     * 描述:
+     *  商户系统内部订单号,要求32个字符内,只能是数字、大小写字母_-|*@ ,且在同一个商户号下唯一。
+     *  特殊规则:最小字符长度为6
+     *  示例值:20150806125346
+     * 
+ */ + @SerializedName(value = "out_trade_no") + private String outTradeNo; + + /** + *
+     * 字段名:二级商户号
+     * 变量名:sub_mchid
+     * 是否必填:是
+     * 类型:string(32)
+     * 描述:
+     *  二级商户商户号,由微信支付生成并下发。
+     *  注意:仅适用于电商平台 服务商
+     *  示例值:1900000109
+     * 
+ */ + @SerializedName(value = "sub_mchid") + private String subMchid; + + /** + *
+     * 字段名:商品描述
+     * 变量名:description
+     * 是否必填:是
+     * 类型:string(128)
+     * 描述:
+     *  商品简单描述。需传入应用市场上的APP名字-实际商品名称,例如:天天爱消除-游戏充值。
+     *  示例值:腾讯充值中心-QQ会员充值
+     * 
+ */ + @SerializedName(value = "description") + private String description; + + /** + *
+     * 字段名:+结算信息
+     * 变量名:settle_info
+     * 是否必填:否
+     * 类型:Object
+     * 描述:结算信息
+     * 
+ */ + @SerializedName(value = "settle_info") + private SettleInfo settleInfo; + + } + + @Data + @NoArgsConstructor + public static class CombinePayerInfo implements Serializable { + /** + *
+     * 字段名:用户标识
+     * 变量名:openid
+     * 是否必填:是
+     * 类型:string(128)
+     * 描述:
+     *  使用合单appid获取的对应用户openid。是用户在商户appid下的唯一标识。
+     *  示例值:oUpF8uMuAJO_M2pxb1Q9zNjWeS6o
+     * 
+ */ + @SerializedName(value = "openid") + private String openid; + + } + + @Data + @NoArgsConstructor + public static class Amount implements Serializable { + /** + *
+     * 字段名:标价金额
+     * 变量名:total_amount
+     * 是否必填:是
+     * 类型:int64
+     * 描述:
+     *  子单金额,单位为分。
+     *  示例值:100
+     * 
+ */ + @SerializedName(value = "total_amount") + private Integer totalAmount; + + /** + *
+     * 字段名:标价币种
+     * 变量名:currency
+     * 是否必填:是
+     * 类型:string(8)
+     * 描述:
+     *  符合ISO 4217标准的三位字母代码,人民币:CNY。
+     *  示例值:CNY
+     * 
+ */ + @SerializedName(value = "currency") + private String currency; + + } + + @Data + @NoArgsConstructor + public static class SettleInfo implements Serializable { + /** + *
+     * 字段名:是否指定分账
+     * 变量名:profit_sharing
+     * 是否必填:否
+     * 类型:bool
+     * 描述:
+     *  是否分账,与外层profit_sharing同时存在时,以本字段为准。
+     *  true:是
+     *  false:否
+     *  示例值:true
+     * 
+ */ + @SerializedName(value = "profit_sharing") + private Boolean profitSharing; + + /** + *
+     * 字段名:补差金额
+     * 变量名:subsidy_amount
+     * 是否必填:否
+     * 类型:int64
+     * 描述:
+     *  SettleInfo.profit_sharing为true时,该金额才生效。
+     *  示例值:10
+     * 
+ */ + @SerializedName(value = "subsidy_amount") + private Integer subsidyAmount; + + } + + @Data + @NoArgsConstructor + public static class H5Info implements Serializable { + + /** + *
+     * 字段名:场景类型
+     * 变量名:type
+     * 是否必填:是
+     * 类型:string(32)
+     * 描述:
+     *  场景类型,枚举值:
+     *  iOS:IOS移动应用;
+     *  Android:安卓移动应用;
+     *  Wap:WAP网站应用;
+     *  示例值:iOS
+     * 
+ */ + @SerializedName(value = "type") + private String type; + + /** + *
+     * 字段名:应用名称
+     * 变量名:app_name
+     * 是否必填:否
+     * 类型:string(64)
+     * 描述:
+     *  应用名称
+     *  示例值:王者荣耀
+     * 
+ */ + @SerializedName(value = "app_name") + private String appName; + + /** + *
+     * 字段名:网站URL
+     * 变量名:app_url
+     * 是否必填:否
+     * 类型:string(128)
+     * 描述:
+     *  网站URL
+     *  示例值:https://pay.qq.com
+     * 
+ */ + @SerializedName(value = "app_url") + private String appUrl; + + /** + *
+     * 字段名:iOS平台BundleID
+     * 变量名:bundle_id
+     * 是否必填:否
+     * 类型:string(128)
+     * 描述:
+     *  iOS平台BundleID
+     *  示例值:com.tencent.wzryiOS
+     * 
+ */ + @SerializedName(value = "bundle_id") + private String bundleId; + + /** + *
+     * 字段名:Android平台PackageName
+     * 变量名:package_name
+     * 是否必填:否
+     * 类型:string(128)
+     * 描述:
+     *  Android平台PackageName
+     *  示例值:com.tencent.tmgp.sgame
+     * 
+ */ + @SerializedName(value = "package_name") + private String packageName; + + } + +} diff --git a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/CombineTransactionsResult.java b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/CombineTransactionsResult.java new file mode 100644 index 0000000000..cdab5934fc --- /dev/null +++ b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/CombineTransactionsResult.java @@ -0,0 +1,354 @@ +package com.github.binarywang.wxpay.bean.ecommerce; + +import com.google.gson.annotations.SerializedName; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; +import java.util.List; + +/** + * 合单支付 查询结果 + *
+ *   文档地址:https://pay.weixin.qq.com/wiki/doc/apiv3/wxpay/pay/combine/chapter3_3.shtml
+ * 
+ */ +@Data +@NoArgsConstructor +@Deprecated +public class CombineTransactionsResult implements Serializable { + + /** + *
+   * 字段名:合单商户appid
+   * 变量名:combine_appid
+   * 是否必填:是
+   * 类型:string(32)
+   * 描述:
+   *  合单发起方的appid。(即电商平台appid)
+   *  示例值:wxd678efh567hg6787
+   * 
+ */ + @SerializedName(value = "combine_appid") + private String combineAppid; + + /** + *
+   * 字段名:合单商户号
+   * 变量名:combine_mchid
+   * 是否必填:是
+   * 类型:string(32)
+   * 描述:
+   *  合单发起方商户号。(即电商平台mchid)
+   *  示例值:1900000109
+   * 
+ */ + @SerializedName(value = "combine_mchid") + private String combineMchid; + + /** + *
+   * 字段名:合单商户订单号
+   * 变量名:combine_out_trade_no
+   * 是否必填:是
+   * 类型:string(32)
+   * 描述:
+   *  合单支付总订单号,要求32个字符内,只能是数字、大小写字母_-|*@ ,且在同一个商户号下唯一。
+   *  示例值:P20150806125346
+   * 
+ */ + @SerializedName(value = "combine_out_trade_no") + private String combineOutTradeNo; + + /** + *
+   * 字段名:+场景信息
+   * 变量名:scene_info
+   * 是否必填:否
+   * 类型:object
+   * 描述:支付场景信息描述
+   * 
+ */ + @SerializedName(value = "scene_info") + private SceneInfo sceneInfo; + + /** + *
+   * 字段名:+子单信息
+   * 变量名:sub_orders
+   * 是否必填:是
+   * 类型:array
+   * 描述:
+   *  最多支持子单条数:50
+   *
+   * 
+ */ + @SerializedName(value = "sub_orders") + private List subOrders; + + /** + *
+   * 字段名:+支付者
+   * 变量名:combine_payer_info
+   * 是否必填:否
+   * 类型:object
+   * 描述:示例值:见请求示例
+   * 
+ */ + @SerializedName(value = "combine_payer_info") + private CombinePayerInfo combinePayerInfo; + + @Data + @NoArgsConstructor + public static class SubOrders implements Serializable { + /** + *
+     * 字段名:子单商户号
+     * 变量名:mchid
+     * 是否必填:是
+     * 类型:string(32)
+     * 描述:
+     *  子单发起方商户号,必须与发起方Appid有绑定关系。(即电商平台mchid)
+     *  示例值:1900000109
+     * 
+ */ + @SerializedName(value = "mchid") + private String mchid; + + /** + *
+     * 字段名:交易类型
+     * 变量名:trade_type
+     * 是否必填:是
+     * 类型:string (16)
+     * 描述:
+     *  枚举值:
+     *  NATIVE:扫码支付
+     *  JSAPI:公众号支付
+     *  APP:APP支付
+     *  MWEB:H5支付
+     *  示例值: JSAPI
+     * 
+ */ + @SerializedName(value = "trade_type") + private String tradeType; + + /** + *
+     * 字段名:交易状态
+     * 变量名:trade_state
+     * 是否必填:是
+     * 类型:string (32)
+     * 描述:
+     *  枚举值:
+     *  SUCCESS:支付成功
+     *  REFUND:转入退款
+     *  NOTPAY:未支付
+     *  CLOSED:已关闭
+     *  USERPAYING:用户支付中
+     *  PAYERROR:支付失败(其他原因,如银行返回失败)
+     *  示例值: SUCCESS
+     * 
+ */ + @SerializedName(value = "trade_state") + private String tradeState; + + /** + *
+     * 字段名:付款银行
+     * 变量名:bank_type
+     * 是否必填:否
+     * 类型:string(16)
+     * 描述:
+     *  银行类型,采用字符串类型的银行标识。
+     *  示例值:CMC
+     * 
+ */ + @SerializedName(value = "bank_type") + private String bankType; + + /** + *
+     * 字段名:附加信息
+     * 变量名:attach
+     * 是否必填:是
+     * 类型:string(128)
+     * 描述:
+     *  附加数据,在查询API和支付通知中原样返回,可作为自定义参数使用。
+     *  示例值:深圳分店
+     * 
+ */ + @SerializedName(value = "attach") + private String attach; + + /** + *
+     * 字段名:支付完成时间
+     * 变量名:success_time
+     * 是否必填:是
+     * 类型:string(16)
+     * 描述:
+     *  订单支付时间,遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss:sss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss:sss表示时分秒毫秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC 8小时,即北京时间)。例如:2015-05-20T13:29:35.120+08:00表示,北京时间2015年5月20日 13点29分35秒。
+     *  示例值:2015-05-20T13:29:35.120+08:00
+     * 
+ */ + @SerializedName(value = "success_time") + private String successTime; + + /** + *
+     * 字段名:微信订单号
+     * 变量名:transaction_id
+     * 是否必填:是
+     * 类型:string(32)
+     * 描述:
+     *  微信支付订单号。
+     *  示例值: 1009660380201506130728806387
+     * 
+ */ + @SerializedName(value = "transaction_id") + private String transactionId; + + /** + *
+     * 字段名:子单商户订单号
+     * 变量名:out_trade_no
+     * 是否必填:是
+     * 类型:string(32)
+     * 描述:
+     *  商户系统内部订单号,要求32个字符内,只能是数字、大小写字母_-|*@ ,且在同一个商户号下唯一。
+     *  特殊规则:最小字符长度为6
+     *  示例值:20150806125346
+     * 
+ */ + @SerializedName(value = "out_trade_no") + private String outTradeNo; + + /** + *
+     * 字段名:二级商户号
+     * 变量名:sub_mchid
+     * 是否必填:是
+     * 类型:string(32)
+     * 描述:
+     *  二级商户商户号,由微信支付生成并下发。
+     *  注意:仅适用于电商平台 服务商
+     *  示例值:1900000109
+     * 
+ */ + @SerializedName(value = "sub_mchid") + private String subMchid; + + /** + *
+     * 字段名:+订单金额
+     * 变量名:amount
+     * 是否必填:是
+     * 类型:object
+     * 描述:订单金额信息
+     * 
+ */ + @SerializedName(value = "amount") + private Amount amount; + + } + + @Data + @NoArgsConstructor + public static class SceneInfo implements Serializable { + /** + *
+     * 字段名:商户端设备号
+     * 变量名:device_id
+     * 是否必填:否
+     * 类型:string(16)
+     * 描述:
+     *  终端设备号(门店号或收银设备ID)。
+     *  特殊规则:长度最小7个字节
+     *  示例值:POS1:1
+     * 
+ */ + @SerializedName(value = "device_id") + private String deviceId; + + } + + @Data + @NoArgsConstructor + public static class CombinePayerInfo implements Serializable { + /** + *
+     * 字段名:用户标识
+     * 变量名:openid
+     * 是否必填:是
+     * 类型:string(128)
+     * 描述:
+     *  使用合单appid获取的对应用户openid。是用户在商户appid下的唯一标识。
+     *  示例值:oUpF8uMuAJO_M2pxb1Q9zNjWeS6o
+     * 
+ */ + @SerializedName(value = "openid") + private String openid; + + } + + @Data + @NoArgsConstructor + public static class Amount implements Serializable { + /** + *
+     * 字段名:标价金额
+     * 变量名:total_amount
+     * 是否必填:是
+     * 类型:int64
+     * 描述:
+     *  子单金额,单位为分。
+     *  示例值:100
+     * 
+ */ + @SerializedName(value = "total_amount") + private Integer totalAmount; + + /** + *
+     * 字段名:标价币种
+     * 变量名:currency
+     * 是否必填:是
+     * 类型:string(8)
+     * 描述:
+     *  符合ISO 4217标准的三位字母代码,人民币:CNY。
+     *  示例值:CNY
+     * 
+ */ + @SerializedName(value = "currency") + private String currency; + + /** + *
+     * 字段名:现金支付金额
+     * 变量名:payer_amount
+     * 是否必填:是
+     * 类型:int64
+     * 描述:
+     *  订单现金支付金额。
+     *  示例值:10
+     * 
+ */ + @SerializedName(value = "payer_amount") + private Integer payerAmount; + + /** + *
+     * 字段名:现金支付币种
+     * 变量名:payer_currency
+     * 是否必填:是
+     * 类型:string(8)
+     * 描述:
+     *  货币类型,符合ISO 4217标准的三位字母代码,默认人民币:CNY。
+     *  示例值: CNY
+     * 
+ */ + @SerializedName(value = "payer_currency") + private String payerCurrency; + } +} diff --git a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/PartnerTransactionsCloseRequest.java b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/PartnerTransactionsCloseRequest.java new file mode 100644 index 0000000000..224879ebd1 --- /dev/null +++ b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/PartnerTransactionsCloseRequest.java @@ -0,0 +1,63 @@ +package com.github.binarywang.wxpay.bean.ecommerce; + +import com.google.gson.annotations.SerializedName; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * 关闭普通订单请求 + * + * @author f00lish + * created on 2020/12/09 + */ +@Data +@NoArgsConstructor +@Deprecated +public class PartnerTransactionsCloseRequest implements Serializable { + + private static final long serialVersionUID = -7602636370950088329L; + + /** + *
+   * 字段名:服务商户号
+   * 变量名:sp_mchid
+   * 是否必填:是
+   * 类型:string(32)
+   * 描述:
+   *  服务商户号,由微信支付生成并下发
+   * 示例值:1230000109
+   * 
+ */ + @SerializedName(value = "sp_mchid") + private String spMchid; + + /** + *
+   * 字段名:二级商户号
+   * 变量名:sub_mchid
+   * 是否必填:是
+   * 类型:string(32)
+   * 描述:
+   *  二级商户的商户号,有微信支付生成并下发。
+   * 示例值:1900000109
+   * 
+ */ + @SerializedName(value = "sub_mchid") + private String subMchid; + + /** + *
+   * 字段名:商户订单号
+   * 变量名:out_trade_no
+   * 是否必填:是
+   * 类型:string(32)
+   * 描述:
+   *  商户系统内部订单号,只能是数字、大小写字母_-*且在同一个商户号下唯一,详见【商户订单号】。
+   * 特殊规则:最小字符长度为6
+   * 示例值:1217752501201407033233368018
+   * 
+ */ + private transient String outTradeNo; +} diff --git a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/PartnerTransactionsNotifyResult.java b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/PartnerTransactionsNotifyResult.java new file mode 100644 index 0000000000..6b4bac8a94 --- /dev/null +++ b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/PartnerTransactionsNotifyResult.java @@ -0,0 +1,28 @@ +package com.github.binarywang.wxpay.bean.ecommerce; + +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * 普通支付 通知结果 + *
+ *   文档地址:https://pay.weixin.qq.com/wiki/doc/apiv3/wxpay/ecommerce/e_transactions/chapter3_11.shtml
+ * 
+ */ +@Data +@NoArgsConstructor +@Deprecated +public class PartnerTransactionsNotifyResult implements Serializable { + private static final long serialVersionUID = -6602962275015706689L; + /** + * 源数据 + */ + private NotifyResponse rawData; + + /** + * 解密后的数据 + */ + private PartnerTransactionsResult result; +} diff --git a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/PartnerTransactionsQueryRequest.java b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/PartnerTransactionsQueryRequest.java new file mode 100644 index 0000000000..97cf2fe707 --- /dev/null +++ b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/PartnerTransactionsQueryRequest.java @@ -0,0 +1,70 @@ +package com.github.binarywang.wxpay.bean.ecommerce; + +import com.google.gson.annotations.SerializedName; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +@Data +@NoArgsConstructor +@Deprecated +public class PartnerTransactionsQueryRequest implements Serializable { + + + /** + *
+   * 字段名:服务商户号
+   * 变量名:sp_mchid
+   * 是否必填:是
+   * 类型:string(32)
+   * 描述:
+   *  服务商户号,由微信支付生成并下发
+   * 示例值:1230000109
+   * 
+ */ + @SerializedName(value = "sp_mchid") + private String spMchid; + + /** + *
+   * 字段名:二级商户号
+   * 变量名:sub_mchid
+   * 是否必填:是
+   * 类型:string(32)
+   * 描述:
+   *  二级商户的商户号,有微信支付生成并下发。
+   * 示例值:1900000109
+   * 
+ */ + @SerializedName(value = "sub_mchid") + private String subMchid; + + /** + *
+   * 字段名:微信支付订单号
+   * 变量名:transaction_id
+   * 是否必填:是
+   * 类型:string(32)
+   * 描述:
+   *  微信支付系统生成的订单号
+   * 示例值:1217752501201407033233368018
+   * 
+ */ + @SerializedName(value = "transaction_id") + private String transactionId; + /** + *
+   * 字段名:商户订单号
+   * 变量名:out_trade_no
+   * 是否必填:是
+   * 类型:string(32)
+   * 描述:
+   *  商户系统内部订单号,只能是数字、大小写字母_-*且在同一个商户号下唯一,详见【商户订单号】。
+   * 特殊规则:最小字符长度为6
+   * 示例值:1217752501201407033233368018
+   * 
+ */ + @SerializedName(value = "out_trade_no") + private String outTradeNo; +} diff --git a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/PartnerTransactionsRequest.java b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/PartnerTransactionsRequest.java new file mode 100644 index 0000000000..19e2ccca1e --- /dev/null +++ b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/PartnerTransactionsRequest.java @@ -0,0 +1,647 @@ +package com.github.binarywang.wxpay.bean.ecommerce; + +import com.google.gson.annotations.SerializedName; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.List; + +/** + * 普通支付(电商收付通)API + *
+ * 文档地址:https://pay.weixin.qq.com/wiki/doc/apiv3/wxpay/pages/e_transactions.shtml
+ * 
+ * + * @author cloudX + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +@Deprecated +public class PartnerTransactionsRequest implements Serializable { + private static final long serialVersionUID = -1550405819444680465L; + + /** + *
+   * 字段名:服务商公众号ID
+   * 变量名:sp_appid
+   * 是否必填:是
+   * 类型:string(32)
+   * 描述:
+   *  服务商申请的公众号或移动应用appid
+   *  示例值:wx8888888888888888
+   * 
+ */ + @SerializedName(value = "sp_appid") + private String spAppid; + /** + *
+   * 字段名:服务商户号
+   * 变量名:sp_mchid
+   * 是否必填:是
+   * 类型:string(32)
+   * 描述:
+   *  服务商户号,由微信支付生成并下发
+   *  示例值:1230000109
+   * 
+ */ + @SerializedName(value = "sp_mchid") + private String spMchid; + /** + *
+   * 字段名:子商户公众号ID
+   * 变量名:sub_appid
+   * 是否必填:否
+   * 类型:string(32)
+   * 描述:
+   *  子商户申请的公众号或移动应用appid。
+   *  示例值:wxd678efh567hg6999
+   * 
+ */ + @SerializedName(value = "sub_appid") + private String subAppid; + /** + *
+   * 字段名:二级商户号
+   * 变量名:sub_mchid
+   * 是否必填:是
+   * 类型:string(32)
+   * 描述:
+   *  二级商户的商户号,有微信支付生成并下发。
+   *  示例值:1900000109
+   * 
+ */ + @SerializedName(value = "sub_mchid") + private String subMchid; + /** + *
+   * 字段名:商品描述
+   * 变量名:description
+   * 是否必填:是
+   * 类型:string(127)
+   * 描述:
+   *  商品描述
+   *  示例值:Image形象店-深圳腾大-QQ公仔
+   * 
+ */ + @SerializedName(value = "description") + private String description; + /** + *
+   * 字段名:商户订单号
+   * 变量名:out_trade_no
+   * 是否必填:是
+   * 类型:string(127)
+   * 描述:
+   *  商户系统内部订单号, 只能是数字、大小写字母_-*且在同一个商户号下唯一,详见【商户订单号】
+   *  特殊规则:最小字符长度为6
+   *  示例值:1217752501201407033233368018
+   * 
+ */ + @SerializedName(value = "out_trade_no") + private String outTradeNo; + /** + *
+   * 字段名:交易结束时间
+   * 变量名:time_expire
+   * 是否必填:否
+   * 类型:string(14)
+   * 描述:
+   *  订单失效时间,遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC 8小时,即北京时间)。例如:2015-05-20T13:29:35+08:00表示,北京时间2015年5月20日 13点29分35秒。
+   *  示例值:2019-12-31T15:59:60+08:00
+   * 
+ */ + @SerializedName(value = "time_expire") + private String timeExpire; + /** + *
+   * 字段名:附加数据
+   * 变量名:attach
+   * 是否必填:否
+   * 类型:string(128)
+   * 描述:
+   *  附加数据,在查询API和支付通知中原样返回,可作为自定义参数使用。
+   *  示例值:自定义数据
+   * 
+ */ + @SerializedName(value = "attach") + private String attach; + /** + *
+   * 字段名:通知地址
+   * 变量名:notify_url
+   * 是否必填:是
+   * 类型:string(127)
+   * 描述:
+   *  通知URL必须为直接可访问的URL,不允许携带查询串。
+   *  示例值:https://www.weixin.qq.com/wxpay/pay.php
+   * 
+ */ + @SerializedName(value = "notify_url") + private String notifyUrl; + /** + *
+   * 字段名:订单优惠标记
+   * 变量名:goods_tag
+   * 是否必填:否
+   * 类型:string(32)
+   * 描述:
+   *  订单优惠标记
+   *  示例值:WXG
+   * 
+ */ + @SerializedName(value = "goods_tag") + private String goodsTag; + /** + *
+   * 字段名:电子发票入口开放标识
+   * 变量名:support_fapiao
+   * 是否必填:否
+   * 类型:boolean
+   * 描述:传入true时,支付成功消息和支付详情页将出现开票入口。需要在微信支付商户平台或微信公众平台开通电子发票功能,传此字段才可生效。
+   * 
+ */ + @SerializedName(value = "support_fapiao") + private Boolean supportFapiao; + /** + *
+   * 字段名:+结算信息
+   * 变量名:settle_info
+   * 是否必填:否
+   * 类型:Object
+   * 描述:结算信息
+   * 
+ */ + @SerializedName(value = "settle_info") + private SettleInfo settleInfo; + /** + *
+   * 字段名:订单金额
+   * 变量名:amount
+   * 是否必填:是
+   * 类型:object
+   * 描述:
+   *  订单金额信息
+   * 
+ */ + @SerializedName(value = "amount") + private Amount amount; + /** + *
+   * 字段名:优惠功能
+   * 变量名:detail
+   * 是否必填:否
+   * 类型:object
+   * 描述:
+   *  优惠功能
+   * 
+ */ + @SerializedName(value = "detail") + private Discount detail; + /** + *
+   * 字段名:支付者
+   * 变量名:payer
+   * 是否必填:是(仅JSAPI支付必传)
+   * 类型:object
+   * 描述:
+   *  支付者信息
+   * 
+ */ + @SerializedName(value = "payer") + private Payer payer; + /** + *
+   * 字段名:场景信息
+   * 变量名:scene_info
+   * 是否必填:是(仅H5支付必传)
+   * 类型:object
+   * 描述:
+   *  支付场景描述
+   * 
+ */ + @SerializedName(value = "scene_info") + private SceneInfo sceneInfo; + + @Data + @NoArgsConstructor + public static class Discount implements Serializable { + private static final long serialVersionUID = 1090134053810201492L; + + /** + *
+     * 字段名:订单原价
+     * 变量名:cost_price
+     * 是否必填:否
+     * 类型:int64
+     * 描述:
+     *  1、商户侧一张小票订单可能被分多次支付,订单原价用于记录整张小票的交易金额。
+     *  2、当订单原价与支付金额不相等,则不享受优惠。
+     *  3、该字段主要用于防止同一张小票分多次支付,以享受多次优惠的情况,正常支付订单不必上传此参数。
+     *  示例值:608800
+     * 
+ */ + @SerializedName(value = "cost_price") + private Integer costPrice; + /** + *
+     * 字段名:商品小票ID
+     * 变量名:invoice_id
+     * 是否必填:否
+     * 类型:string(32)
+     * 描述:
+     *  商品小票ID
+     *  示例值:微信123
+     * 
+ */ + @SerializedName(value = "invoice_id") + private String invoiceId; + /** + *
+     * 字段名:单品列表
+     * 变量名:goods_detail
+     * 是否必填:否
+     * 类型:array
+     * 描述:
+     *  单品列表信息
+     *  条目个数限制:【1,undefined】
+     * 
+ */ + @SerializedName(value = "goods_detail") + private List goodsDetails; + } + + @Data + @NoArgsConstructor + @AllArgsConstructor + public static class Amount implements Serializable { + private static final long serialVersionUID = -4967636398225864273L; + + /** + *
+     * 字段名:总金额
+     * 变量名:total
+     * 是否必填:是
+     * 类型:int64
+     * 描述:
+     *  订单总金额,单位为分。
+     *  示例值:100
+     * 
+ */ + @SerializedName(value = "total") + private Integer total; + /** + *
+     * 字段名:币类型
+     * 变量名:currency
+     * 是否必填:否
+     * 类型:string(16)
+     * 描述:
+     *  CNY:人民币,境内商户号仅支持人民币。
+     *  示例值:CNY
+     * 
+ */ + @SerializedName(value = "currency") + private String currency; + } + + @Data + @NoArgsConstructor + @AllArgsConstructor + public static class Payer implements Serializable { + private static final long serialVersionUID = -3946401119476159971L; + + /** + *
+     * 字段名:用户服务标识
+     * 变量名:sp_openid
+     * 是否必填:是
+     * 类型:string(128)
+     * 描述:
+     *  用户在服务商appid下的唯一标识。
+     *  示例值:oUpF8uMuAJO_M2pxb1Q9zNjWeS6o
+     * 
+ */ + @SerializedName(value = "sp_openid") + private String spOpenid; + /** + *
+     * 字段名:用户子标识
+     * 变量名:sub_openid
+     * 是否必填:否
+     * 类型:string(128)
+     * 描述:
+     *  用户在子商户appid下的唯一标识。
+     *  示例值:oUpF8uMuAJO_M2pxb1Q9zNjWeS6o
+     * 
+ */ + @SerializedName(value = "sub_openid") + private String subOpenid; + } + + @Data + @NoArgsConstructor + public static class SettleInfo implements Serializable { + private static final long serialVersionUID = 4438958789491671746L; + + /** + *
+     * 字段名:是否指定分账
+     * 变量名:profit_sharing
+     * 是否必填:否
+     * 类型:bool
+     * 描述:
+     *  是否分账,与外层profit_sharing同时存在时,以本字段为准。
+     *  true:是
+     *  false:否
+     *  示例值:true
+     * 
+ */ + @SerializedName(value = "profit_sharing") + private Boolean profitSharing; + /** + *
+     * 字段名:补差金额
+     * 变量名:subsidy_amount
+     * 是否必填:否
+     * 类型:int64
+     * 描述:
+     *  SettleInfo.profit_sharing为true时,该金额才生效。
+     *    注意:单笔订单最高补差金额为5000元
+     *  示例值:10
+     * 
+ */ + @SerializedName(value = "subsidy_amount") + private BigDecimal subsidyAmount; + } + + @Data + @NoArgsConstructor + public static class GoodsDetail implements Serializable { + private static final long serialVersionUID = -2574001236925022932L; + + /** + *
+     * 字段名:商户侧商品编码
+     * 变量名:merchant_goods_id
+     * 是否必填:是
+     * 类型:string(32)
+     * 描述:
+     *  由半角的大小写字母、数字、中划线、下划线中的一种或几种组成。
+     * 示例值:商品编码
+     * 
+ */ + @SerializedName(value = "merchant_goods_id") + private String merchantGoodsId; + /** + *
+     * 字段名:微信侧商品编码
+     * 变量名:wechatpay_goods_id
+     * 是否必填:否
+     * 类型:string(32)
+     * 描述:
+     *  微信支付定义的统一商品编号(没有可不传)
+     * 示例值:1001
+     * 
+ */ + @SerializedName(value = "wechatpay_goods_id") + private String wechatpayGoodsId; + /** + *
+     * 字段名:商品名称
+     * 变量名:goods_name
+     * 是否必填:否
+     * 类型:string(256)
+     * 描述:
+     *  商品的实际名称
+     * 示例值:iPhoneX 256G
+     * 
+ */ + @SerializedName(value = "goods_name") + private String goodsName; + /** + *
+     * 字段名:商品数量
+     * 变量名:quantity
+     * 是否必填:是
+     * 类型:int64
+     * 描述:
+     *  用户购买的数量
+     * 示例值:1
+     * 
+ */ + @SerializedName(value = "quantity") + private Integer quantity; + /** + *
+     * 字段名:商品单价
+     * 变量名:unit_price
+     * 是否必填:是
+     * 类型:int64
+     * 描述:
+     *  商品单价,单位为分
+     * 示例值:828800
+     * 
+ */ + @SerializedName(value = "unit_price") + private Integer unitPrice; + } + + @Data + @NoArgsConstructor + public static class SceneInfo implements Serializable { + private static final long serialVersionUID = 4678263124015070957L; + + /** + *
+     * 字段名:商户端设备号
+     * 变量名:device_id
+     * 是否必填:否
+     * 类型:string(16)
+     * 描述:
+     *  终端设备号(门店号或收银设备ID)。
+     *  特殊规则:长度最小7个字节
+     *  示例值:POS1:1
+     * 
+ */ + @SerializedName(value = "device_id") + private String deviceId; + /** + *
+     * 字段名:用户终端IP
+     * 变量名:payer_client_ip
+     * 是否必填:是
+     * 类型:string(45)
+     * 描述:
+     *  用户端实际ip
+     *  格式: ip(ipv4+ipv6)
+     *  示例值:14.17.22.32
+     * 
+ */ + @SerializedName(value = "payer_client_ip") + private String payerClientIp; + /** + *
+     * 字段名:H5场景信息
+     * 变量名:h5_info
+     * 是否必填:否(H5支付必填)
+     * 类型:object
+     * 描述:
+     *  H5场景信息
+     * 
+ */ + @SerializedName(value = "h5_info") + private H5Info h5Info; + /** + *
+     * 字段名:商户门店信息
+     * 变量名:store_info
+     * 是否必填:否(H5支付必填)
+     * 类型:object
+     * 描述:
+     *  商户门店信息
+     * 
+ */ + @SerializedName(value = "store_info") + private StoreInfo storeInfo; + } + + @Data + @NoArgsConstructor + public static class H5Info implements Serializable { + private static final long serialVersionUID = -6865738707329486532L; + + /** + *
+     * 字段名:场景类型
+     * 变量名:type
+     * 是否必填:是
+     * 类型:string(32)
+     * 描述:
+     *  场景类型,枚举值:
+     *  iOS:IOS移动应用;
+     *  Android:安卓移动应用;
+     *  Wap:WAP网站应用;
+     *  示例值:iOS
+     * 
+ */ + @SerializedName(value = "type") + private String type; + /** + *
+     * 字段名:应用名称
+     * 变量名:app_name
+     * 是否必填:否
+     * 类型:string(64)
+     * 描述:
+     *  应用名称
+     *  示例值:王者荣耀
+     * 
+ */ + @SerializedName(value = "app_name") + private String appName; + /** + *
+     * 字段名:网站URL
+     * 变量名:app_url
+     * 是否必填:否
+     * 类型:string(128)
+     * 描述:
+     *  网站URL
+     *  示例值:https://pay.qq.com
+     * 
+ */ + @SerializedName(value = "app_url") + private String appUrl; + /** + *
+     * 字段名:iOS平台BundleID
+     * 变量名:bundle_id
+     * 是否必填:否
+     * 类型:string(128)
+     * 描述:
+     *  iOS平台BundleID
+     *  示例值:com.tencent.wzryiOS
+     * 
+ */ + @SerializedName(value = "bundle_id") + private String bundleId; + /** + *
+     * 字段名:Android平台PackageName
+     * 变量名:package_name
+     * 是否必填:否
+     * 类型:string(128)
+     * 描述:
+     *  Android平台PackageName
+     *  示例值:com.tencent.tmgp.sgame
+     * 
+ */ + @SerializedName(value = "package_name") + private String packageName; + } + + @Data + @NoArgsConstructor + public static class StoreInfo implements Serializable { + private static final long serialVersionUID = -8002411737407580701L; + + /** + *
+     * 字段名:门店编号
+     * 变量名:id
+     * 是否必填:否
+     * 类型:string(32)
+     * 描述:
+     *  商户侧门店编号
+     * 示例值:0001
+     * 
+ */ + @SerializedName(value = "id") + private String id; + /** + *
+     * 字段名:门店名称
+     * 变量名:name
+     * 是否必填:是
+     * 类型:string(256)
+     * 描述:
+     *  商户侧门店名称
+     * 示例值:腾讯大厦分店
+     * 
+ */ + @SerializedName(value = "name") + private String name; + /** + *
+     * 字段名:地区编码
+     * 变量名:area_code
+     * 是否必填:是
+     * 类型:string(32)
+     * 描述:
+     *  地区编码,详细请见省市区编号对照表(https://pay.weixin.qq.com/wiki/doc/apiv3/wxpay/ecommerce/applyments/chapter4_1.shtml)。
+     * 示例值:440305
+     * 
+ */ + @SerializedName(value = "area_code") + private String areaCode; + /** + *
+     * 字段名:详细地址
+     * 变量名:address
+     * 是否必填:是
+     * 类型:string(512)
+     * 描述:
+     *  详细的商户门店地址
+     * 示例值:广东省深圳市南山区科技中一道10000号
+     * 
+ */ + @SerializedName(value = "address") + private String address; + } +} diff --git a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/PartnerTransactionsResult.java b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/PartnerTransactionsResult.java new file mode 100644 index 0000000000..aa7ca7fcd1 --- /dev/null +++ b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/PartnerTransactionsResult.java @@ -0,0 +1,601 @@ +package com.github.binarywang.wxpay.bean.ecommerce; + +import com.google.gson.annotations.SerializedName; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; +import java.util.List; + +/** + * 普通支付 查询结果 + *
+ *   文档地址:https://pay.weixin.qq.com/wiki/doc/apiv3/wxpay/ecommerce/e_transactions/chapter3_5.shtml
+ * 
+ * @author cloudX + */ +@Data +@NoArgsConstructor +@Deprecated +public class PartnerTransactionsResult implements Serializable { + private static final long serialVersionUID = 2371448241965534820L; + + /** + *
+   * 字段名:服务商公众号ID
+   * 变量名:sp_appid
+   * 是否必填:是
+   * 类型:string(32)
+   * 描述:
+   *  服务商申请的公众号或移动应用appid。
+   *  示例值:wx8888888888888888
+   * 
+ */ + @SerializedName(value = "sp_appid") + private String spAppid; + + /** + *
+   * 字段名:服务商户号
+   * 变量名:sp_mchid
+   * 是否必填:是
+   * 类型:string(32)
+   * 描述:
+   *  服务商户号,由微信支付生成并下发
+   *  示例值:1230000109
+   * 
+ */ + @SerializedName(value = "sp_mchid") + private String spMchid; + + /** + *
+   * 字段名:二级商户公众号ID
+   * 变量名:sub_appid
+   * 是否必填:否
+   * 类型:string(32)
+   * 描述:
+   *  二级商户申请的公众号或移动应用appid。
+   *  示例值:wxd678efh567hg6999
+   * 
+ */ + @SerializedName(value = "sub_appid") + private String subAppid; + + /** + *
+   * 字段名:二级商户号
+   * 变量名:sub_mchid
+   * 是否必填:是
+   * 类型:string(32)
+   * 描述:
+   *  二级商户的商户号,有微信支付生成并下发。
+   *  示例值:1900000109
+   * 
+ */ + @SerializedName(value = "sub_mchid") + private String subMchid; + + /** + *
+   * 字段名:+商户订单号
+   * 变量名:out_trade_no
+   * 是否必填:是
+   * 类型:string(32)
+   * 描述:商户系统内部订单号,只能是数字、大小写字母_-*且在同一个商户号下唯一,详见【商户订单号】。
+   * 特殊规则:最小字符长度为6
+   * 示例值:1217752501201407033233368018
+   * 
+ */ + @SerializedName(value = "out_trade_no") + private String outTradeNo; + + /** + *
+   * 字段名:微信支付订单号
+   * 变量名:transaction_id
+   * 是否必填:否
+   * 类型:string(32)
+   * 描述:微信支付系统生成的订单号。
+   * 示例值:1217752501201407033233368018
+   * 
+ */ + @SerializedName(value = "transaction_id") + private String transactionId; + + /** + *
+   * 字段名:交易类型
+   * 变量名:trade_type
+   * 是否必填:否
+   * 类型:string(16)
+   * 描述:交易类型,枚举值:
+   *  JSAPI:公众号支付
+   *  NATIVE:扫码支付
+   *  APP:APP支付
+   *  MICROPAY:付款码支付
+   *  MWEB:H5支付
+   *  FACEPAY:刷脸支付
+   *
+   * 示例值: MICROPAY
+   * 
+ */ + @SerializedName(value = "trade_type") + private String tradeType; + + /** + *
+   * 字段名:交易状态
+   * 变量名:trade_state
+   * 是否必填:是
+   * 类型:string(32)
+   * 描述:交易状态,枚举值:
+   *  SUCCESS:支付成功
+   *  REFUND:转入退款
+   *  NOTPAY:未支付
+   *  CLOSED:已关闭
+   *  REVOKED:已撤销(付款码支付)
+   *  USERPAYING:用户支付中(付款码支付)
+   *  PAYERROR:支付失败(其他原因,如银行返回失败)
+   *
+   * 示例值:SUCCESS
+   * 
+ */ + @SerializedName(value = "trade_state") + private String tradeState; + + /** + *
+   * 字段名:交易状态描述
+   * 变量名:trade_state_desc
+   * 是否必填:是
+   * 类型:string(256)
+   * 描述:交易状态描述
+   * 示例值:支付失败,请重新下单支付
+   * 
+ */ + @SerializedName(value = "trade_state_desc") + private String tradeStateDesc; + + /** + *
+   * 字段名:付款银行
+   * 变量名:bank_type
+   * 是否必填:否
+   * 类型:string(16)
+   * 描述:银行类型,采用字符串类型的银行标识。
+   * 示例值:CMC
+   * 
+ */ + @SerializedName(value = "bank_type") + private String bankType; + + /** + *
+   * 字段名:附加数据
+   * 变量名:attach
+   * 是否必填:否
+   * 类型:string(128)
+   * 描述:附加数据,在查询API和支付通知中原样返回,可作为自定义参数使用
+   * 示例值:自定义数据
+   * 
+ */ + @SerializedName(value = "attach") + private String attach; + + /** + *
+   * 字段名:支付完成时间
+   * 变量名:success_time
+   * 是否必填:否
+   * 类型:string(64)
+   * 描述:支付完成时间,遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC 8小时,即北京时间)。例如:2015-05-20T13:29:35+08:00表示,北京时间2015年5月20日 13点29分35秒。
+   * 示例值:2018-06-08T10:34:56+08:00
+   * 
+ */ + @SerializedName(value = "success_time") + private String successTime; + + /** + *
+   * 字段名:支付者信息
+   * 变量名:payer
+   * 是否必填:是
+   * 类型:object
+   * 描述:基础支付支付者信息
+   * 
+ */ + private CombinePayerInfo payer; + + /** + *
+   * 字段名:支付者
+   * 变量名:combine_payer_info
+   * 是否必填:否
+   * 类型:object
+   * 描述:合单支付支付者信息,示例值:见请求示例
+   * 
+ */ + @SerializedName(value = "combine_payer_info") + private CombinePayerInfo combinePayerInfo; + + /** + *
+   * 字段名:订单金额
+   * 变量名:amount
+   * 是否必填:是
+   * 类型:object
+   * 描述:订单金额信息
+   * 
+ */ + @SerializedName(value = "amount") + private Amount amount; + + /** + *
+   * 字段名:场景信息
+   * 变量名:scene_info
+   * 是否必填:否
+   * 类型:object
+   * 描述:支付场景信息描述
+   * 
+ */ + @SerializedName(value = "scene_info") + private SceneInfo sceneInfo; + + /** + *
+   * 字段名:优惠功能
+   * 变量名:promotion_detail
+   * 是否必填:否
+   * 类型:array
+   * 描述:优惠功能,享受优惠时返回该字段。
+   * 
+ */ + @SerializedName(value = "promotion_detail") + private List promotionDetails; + + @Data + @NoArgsConstructor + public static class SceneInfo implements Serializable { + /** + *
+     * 字段名:商户端设备号
+     * 变量名:device_id
+     * 是否必填:否
+     * 类型:string(16)
+     * 描述:
+     *  终端设备号(门店号或收银设备ID)。
+     *  特殊规则:长度最小7个字节
+     *  示例值:POS1:1
+     * 
+ */ + @SerializedName(value = "device_id") + private String deviceId; + + } + + @Data + @NoArgsConstructor + public static class CombinePayerInfo implements Serializable { + /** + *
+     * 字段名:用户标识
+     * 变量名:sp_openid
+     * 是否必填:是
+     * 类型:string(128)
+     * 描述:
+     *  用户在服务商appid下的唯一标识。
+     *  示例值:oUpF8uMuAJO_M2pxb1Q9zNjWeS6o
+     * 
+ */ + @SerializedName(value = "sp_openid") + private String spOpenid; + + + /** + *
+     * 字段名:二级商户用户标识
+     * 变量名:sub_openid
+     * 是否必填:否
+     * 类型:string(128)
+     * 描述:
+     *  用户在二级商户appid下的唯一标识。
+     *  示例值:oUpF8uMuAJO_M2pxb1Q9zNjWeS6o
+     * 
+ */ + @SerializedName(value = "sub_openid") + private String subOpenid; + + } + + @Data + @NoArgsConstructor + public static class Amount implements Serializable { + /** + *
+     * 字段名:总金额
+     * 变量名:total
+     * 是否必填:否
+     * 类型:int
+     * 描述:
+     *  订单总金额,单位为分
+     *  示例值:100
+     * 
+ */ + @SerializedName(value = "total") + private Integer total; + + + /** + *
+     * 字段名:用户支付金额
+     * 变量名:payer_total
+     * 是否必填:否
+     * 类型:int
+     * 描述:
+     *  用户支付金额,单位为分。
+     *  示例值:100
+     * 
+ */ + @SerializedName(value = "payer_total") + private Integer payerTotal; + + + /** + *
+     * 字段名:货币类型
+     * 变量名:currency
+     * 是否必填:否
+     * 类型:string(16)
+     * 描述:
+     *  CNY:人民币,境内商户号仅支持人民币。
+     *  示例值:CNY
+     * 
+ */ + @SerializedName(value = "currency") + private String currency; + + + /** + *
+     * 字段名:用户支付币种
+     * 变量名:payer_currency
+     * 是否必填:否
+     * 类型:string(8)
+     * 描述:
+     *  用户支付币种
+     *  示例值: CNY
+     * 
+ */ + @SerializedName(value = "payer_currency") + private String payerCurrency; + } + + @Data + @NoArgsConstructor + public static class PromotionDetail implements Serializable { + + /** + *
+     * 字段名:券ID
+     * 变量名:coupon_id
+     * 是否必填:是
+     * 类型:string(32)
+     * 描述: 券ID
+     * 示例值:109519
+     * 
+ */ + @SerializedName(value = "coupon_id") + private String couponId; + + /** + *
+     * 字段名:优惠名称
+     * 变量名:name
+     * 是否必填:否
+     * 类型:string(64)
+     * 描述: 优惠名称
+     * 示例值:单品惠-6
+     * 
+ */ + @SerializedName(value = "name") + private String name; + /** + *
+     * 字段名:优惠范围
+     * 变量名:scope
+     * 是否必填:否
+     * 类型:string(32)
+     * 描述: 优惠名称
+     * 示例值:
+     *    GLOBAL:全场代金券
+     *    SINGLE:单品优惠
+     * 示例值:GLOBAL
+     * 
+ */ + @SerializedName(value = "scope") + private String scope; + + /** + *
+     * 字段名:优惠类型
+     * 变量名:type
+     * 是否必填:否
+     * 类型:string(32)
+     * 描述:
+     *    CASH:充值
+     *    NOCASH:预充值
+     * 示例值:CASH
+     * 
+ */ + @SerializedName(value = "type") + private String type; + + /** + *
+     * 字段名:优惠券面额
+     * 变量名:amount
+     * 是否必填:是
+     * 类型:int
+     * 描述: 优惠券面额
+     * 示例值:100
+     * 
+ */ + @SerializedName(value = "amount") + private Integer amount; + + /** + *
+     * 字段名:活动ID
+     * 变量名:stock_id
+     * 是否必填:否
+     * 类型:string(32)
+     * 描述:活动ID
+     * 示例值:931386
+     * 
+ */ + @SerializedName(value = "stock_id") + private String stockId; + + /** + *
+     * 字段名:微信出资
+     * 变量名:wechatpay_contribute
+     * 是否必填:否
+     * 类型:int
+     * 描述:微信出资,单位为分
+     * 示例值:0
+     * 
+ */ + @SerializedName(value = "wechatpay_contribute") + private Integer wechatpayContribute; + + /** + *
+     * 字段名:商户出资
+     * 变量名:merchant_contribute
+     * 是否必填:否
+     * 类型:int
+     * 描述:商户出资,单位为分
+     * 示例值:0
+     * 
+ */ + @SerializedName(value = "merchant_contribute") + private Integer merchantContribute; + + /** + *
+     * 字段名:其他出资
+     * 变量名:other_contribute
+     * 是否必填:否
+     * 类型:int
+     * 描述:其他出资,单位为分
+     * 示例值:0
+     * 
+ */ + @SerializedName(value = "other_contribute") + private Integer otherContribute; + + /** + *
+     * 字段名:优惠币种
+     * 变量名:currency
+     * 是否必填:否
+     * 类型:String(16)
+     * 描述:
+     *    CNY:人民币,境内商户号仅支持人民币。
+     * 示例值:CNY
+     * 
+ */ + @SerializedName(value = "currency") + private String currency; + + /** + *
+     * 字段名:单品列表
+     * 变量名:goods_detail
+     * 是否必填:否
+     * 类型:array
+     * 描述:单品列表信息
+     * 
+ */ + @SerializedName(value = "goods_detail") + private List goodsDetails; + + + } + + @Data + @NoArgsConstructor + public static class GoodsDetail implements Serializable { + + /** + *
+     * 字段名:商品编码
+     * 变量名:goods_id
+     * 是否必填:是
+     * 类型:string(32)
+     * 描述:商品编码
+     * 示例值:M1006
+     * 
+ */ + @SerializedName(value = "goods_id") + private String goodsId; + + /** + *
+     * 字段名:商品数量
+     * 变量名:quantity
+     * 是否必填:是
+     * 类型:int64
+     * 描述:
+     *  用户购买的数量
+     * 示例值:1
+     * 
+ */ + @SerializedName(value = "quantity") + private Integer quantity; + + /** + *
+     * 字段名:商品单价
+     * 变量名:unit_price
+     * 是否必填:是
+     * 类型:int64
+     * 描述:
+     *  商品单价,单位为分
+     * 示例值:100
+     * 
+ */ + @SerializedName(value = "unit_price") + private Integer unitPrice; + + /** + *
+     * 字段名:商品优惠金额
+     * 变量名:discount_amount
+     * 是否必填:是
+     * 类型:int
+     * 描述:商品优惠金额
+     * 示例值:0
+     * 
+ */ + @SerializedName(value = "discount_amount") + private Integer discountAmount; + + /** + *
+     * 字段名:商品备注
+     * 变量名:goods_remark
+     * 是否必填:否
+     * 类型:string(128)
+     * 描述:商品备注信息
+     * 示例值:商品备注信息
+     * 
+ */ + @SerializedName(value = "goods_remark") + private String goodsRemark; + } + +} diff --git a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/SignatureHeader.java b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/SignatureHeader.java new file mode 100644 index 0000000000..9bf268278d --- /dev/null +++ b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/SignatureHeader.java @@ -0,0 +1,42 @@ +package com.github.binarywang.wxpay.bean.ecommerce; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * 微信通知接口头部信息,需要做签名验证 + * 文档地址: https://wechatpay-api.gitbook.io/wechatpay-api-v3/qian-ming-zhi-nan-1/qian-ming-yan-zheng + * + * @author cloudX + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +@Deprecated +public class SignatureHeader implements Serializable { + private static final long serialVersionUID = -6958015499416059949L; + /** + * 时间戳 + */ + private String timeStamp; + + /** + * 随机串 + */ + private String nonce; + + /** + * 已签名字符串 + */ + private String signed; + + /** + * 证书序列号 + */ + private String serialNo; +} diff --git a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/TransactionsResult.java b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/TransactionsResult.java new file mode 100644 index 0000000000..98bf5858e6 --- /dev/null +++ b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/TransactionsResult.java @@ -0,0 +1,127 @@ +package com.github.binarywang.wxpay.bean.ecommerce; + +import com.github.binarywang.wxpay.bean.ecommerce.enums.TradeTypeEnum; +import com.github.binarywang.wxpay.v3.util.SignUtils; +import com.google.gson.annotations.SerializedName; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.security.PrivateKey; + +/** + * 合单支付 JSAPI支付结果响应 + */ +@Data +@NoArgsConstructor +@Deprecated +public class TransactionsResult implements Serializable { + private static final long serialVersionUID = 1760592667519950149L; + /** + *
+   * 字段名:预支付交易会话标识 (APP支付、JSAPI支付 会返回)
+   * 变量名:prepay_id
+   * 是否必填:是
+   * 类型:string(64)
+   * 描述:
+   *  数字和字母。微信生成的预支付会话标识,用于后续接口调用使用。
+   *  示例值:wx201410272009395522657a690389285100
+   * 
+ */ + @SerializedName("prepay_id") + private String prepayId; + + /** + *
+   * 字段名:支付跳转链接   (H5支付 会返回)
+   * 变量名:h5_url
+   * 是否必填:是
+   * 类型:string(512)
+   * 描述:
+   *  支付跳转链接
+   *  示例值:https://wx.tenpay.com/cgi-bin/mmpayweb-bin/checkmweb?prepay_id=wx2016121516420242444321ca0631331346&package=1405458241
+   * 
+ */ + @SerializedName("h5_url") + private String h5Url; + + /** + *
+   * 字段名:二维码链接  (NATIVE支付 会返回)
+   * 变量名:h5_url
+   * 是否必填:是
+   * 类型:string(512)
+   * 描述:
+   *  二维码链接
+   * 示例值:weixin://pay.weixin.qq.com/bizpayurl/up?pr=NwY5Mz9&groupid=00
+   * 
+ */ + @SerializedName("code_url") + private String codeUrl; + + @Data + @Accessors(chain = true) + public static class JsapiResult implements Serializable { + private String appId; + private String timeStamp; + private String nonceStr; + /** + * 由于package为java保留关键字,因此改为packageValue,序列化时会自动转换为package字段名 + */ + @SerializedName("package") + private String packageValue; + private String signType; + private String paySign; + + private String getSignStr() { + return String.format("%s\n%s\n%s\n%s\n", appId, timeStamp, nonceStr, packageValue); + } + } + + @Data + @Accessors(chain = true) + public static class AppResult implements Serializable { + private String appid; + private String partnerid; + private String prepayid; + /** + * 由于package为java保留关键字,因此改为packageValue,序列化时会自动转换为package字段名 + */ + @SerializedName("package") + private String packageValue; + private String noncestr; + private String timestamp; + private String sign; + + private String getSignStr() { + return String.format("%s\n%s\n%s\n%s\n", appid, timestamp, noncestr, prepayid); + } + } + + public T getPayInfo(TradeTypeEnum tradeType, String appId, String mchId, PrivateKey privateKey) { + String timestamp = String.valueOf(System.currentTimeMillis() / 1000); + String nonceStr = SignUtils.genRandomStr(); + switch (tradeType) { + case JSAPI: + JsapiResult jsapiResult = new JsapiResult(); + jsapiResult.setAppId(appId).setTimeStamp(timestamp) + .setPackageValue("prepay_id=" + this.prepayId).setNonceStr(nonceStr) + //签名类型,默认为RSA,仅支持RSA。 + .setSignType("RSA").setPaySign(SignUtils.sign(jsapiResult.getSignStr(), privateKey)); + return (T) jsapiResult; + case MWEB: + return (T) this.h5Url; + case APP: + AppResult appResult = new AppResult(); + appResult.setAppid(appId).setPrepayid(this.prepayId).setPartnerid(mchId) + .setNoncestr(nonceStr).setTimestamp(timestamp) + //暂填写固定值Sign=WXPay + .setPackageValue("Sign=WXPay").setSign(SignUtils.sign(appResult.getSignStr(), privateKey)); + return (T) appResult; + case NATIVE: + return (T) this.codeUrl; + } + return null; + } +} diff --git a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/enums/TradeTypeEnum.java b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/enums/TradeTypeEnum.java new file mode 100644 index 0000000000..5514dc22fc --- /dev/null +++ b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/enums/TradeTypeEnum.java @@ -0,0 +1,38 @@ +package com.github.binarywang.wxpay.bean.ecommerce.enums; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * 支付方式 + */ +@Getter +@AllArgsConstructor +@Deprecated +public enum TradeTypeEnum { + /** + * APP + */ + APP("/v3/combine-transactions/app", "/v3/pay/partner/transactions/app"), + /** + * JSAPI + */ + JSAPI("/v3/combine-transactions/jsapi", "/v3/pay/partner/transactions/jsapi"), + /** + * NATIVE + */ + NATIVE("/v3/combine-transactions/native", "/v3/pay/partner/transactions/native"), + /** + * MWEB + */ + MWEB("/v3/combine-transactions/h5", "/v3/pay/partner/transactions/h5"); + + /** + * 合单url + */ + private final String combineUrl; + /** + * 单独下单url + */ + private final String partnerUrl; +} diff --git a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/EcommerceService.java b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/EcommerceService.java index 5ef94e531d..6475bec7f1 100644 --- a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/EcommerceService.java +++ b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/EcommerceService.java @@ -13,6 +13,7 @@ import com.github.binarywang.wxpay.bean.result.WxPayUnifiedOrderV3Result; import com.github.binarywang.wxpay.bean.result.enums.TradeTypeEnum; import com.github.binarywang.wxpay.exception.WxPayException; +import com.google.gson.Gson; import java.io.File; import java.io.IOException; @@ -28,6 +29,99 @@ * created on 2020 /08/17 */ public interface EcommerceService { + Gson LEGACY_ECOMMERCE_GSON = new Gson(); + + /** + * @deprecated 从 4.8.5.B 起,请改用 {@link #combine(TradeTypeEnum, com.github.binarywang.wxpay.bean.request.CombineTransactionsRequest)};5.0 将移除该兼容入口。 + */ + @Deprecated + default com.github.binarywang.wxpay.bean.ecommerce.TransactionsResult combine( + com.github.binarywang.wxpay.bean.ecommerce.enums.TradeTypeEnum tradeType, + com.github.binarywang.wxpay.bean.ecommerce.CombineTransactionsRequest request) throws WxPayException { + com.github.binarywang.wxpay.bean.request.CombineTransactionsRequest unifiedRequest = + LEGACY_ECOMMERCE_GSON.fromJson(LEGACY_ECOMMERCE_GSON.toJson(request), + com.github.binarywang.wxpay.bean.request.CombineTransactionsRequest.class); + CombineTransactionsResult unifiedResult = combine(toUnifiedTradeType(tradeType), unifiedRequest); + return LEGACY_ECOMMERCE_GSON.fromJson(LEGACY_ECOMMERCE_GSON.toJson(unifiedResult), + com.github.binarywang.wxpay.bean.ecommerce.TransactionsResult.class); + } + + /** @deprecated 从 4.8.5.B 起,请改用使用统一请求模型的同名方法;5.0 将移除该兼容入口。 */ + @Deprecated + default T combineTransactions(com.github.binarywang.wxpay.bean.ecommerce.enums.TradeTypeEnum tradeType, + com.github.binarywang.wxpay.bean.ecommerce.CombineTransactionsRequest request) throws WxPayException { + return combineTransactions(toUnifiedTradeType(tradeType), LEGACY_ECOMMERCE_GSON.fromJson(LEGACY_ECOMMERCE_GSON.toJson(request), + com.github.binarywang.wxpay.bean.request.CombineTransactionsRequest.class)); + } + + /** @deprecated 从 4.8.5.B 起,请改用 {@link #parseCombineNotifyResult(String, SignatureHeader)};5.0 将移除。 */ + @Deprecated + default com.github.binarywang.wxpay.bean.ecommerce.CombineTransactionsNotifyResult parseCombineNotifyResult(String notifyData, + com.github.binarywang.wxpay.bean.ecommerce.SignatureHeader header) throws WxPayException { + CombineNotifyResult result = parseCombineNotifyResult(notifyData, toUnifiedSignatureHeader(header)); + return LEGACY_ECOMMERCE_GSON.fromJson(LEGACY_ECOMMERCE_GSON.toJson(result), + com.github.binarywang.wxpay.bean.ecommerce.CombineTransactionsNotifyResult.class); + } + + /** @deprecated 从 4.8.5.B 起,请改用 {@link #queryCombine(String)};5.0 将移除。 */ + @Deprecated + default com.github.binarywang.wxpay.bean.ecommerce.CombineTransactionsResult queryCombineTransactions(String outTradeNo) throws WxPayException { + return LEGACY_ECOMMERCE_GSON.fromJson(LEGACY_ECOMMERCE_GSON.toJson(queryCombine(outTradeNo)), + com.github.binarywang.wxpay.bean.ecommerce.CombineTransactionsResult.class); + } + + /** @deprecated 从 4.8.5.B 起,请改用 {@link #unifiedPartnerOrder(TradeTypeEnum, WxPayPartnerUnifiedOrderV3Request)};5.0 将移除。 */ + @Deprecated + default com.github.binarywang.wxpay.bean.ecommerce.TransactionsResult partner( + com.github.binarywang.wxpay.bean.ecommerce.enums.TradeTypeEnum tradeType, + com.github.binarywang.wxpay.bean.ecommerce.PartnerTransactionsRequest request) throws WxPayException { + WxPayUnifiedOrderV3Result result = unifiedPartnerOrder(toUnifiedTradeType(tradeType), LEGACY_ECOMMERCE_GSON.fromJson( + LEGACY_ECOMMERCE_GSON.toJson(request), WxPayPartnerUnifiedOrderV3Request.class)); + return LEGACY_ECOMMERCE_GSON.fromJson(LEGACY_ECOMMERCE_GSON.toJson(result), + com.github.binarywang.wxpay.bean.ecommerce.TransactionsResult.class); + } + + /** @deprecated 从 4.8.5.B 起,请改用 {@link #createPartnerOrder(TradeTypeEnum, WxPayPartnerUnifiedOrderV3Request)};5.0 将移除。 */ + @Deprecated + default T partnerTransactions(com.github.binarywang.wxpay.bean.ecommerce.enums.TradeTypeEnum tradeType, + com.github.binarywang.wxpay.bean.ecommerce.PartnerTransactionsRequest request) throws WxPayException { + return createPartnerOrder(toUnifiedTradeType(tradeType), LEGACY_ECOMMERCE_GSON.fromJson(LEGACY_ECOMMERCE_GSON.toJson(request), + WxPayPartnerUnifiedOrderV3Request.class)); + } + + /** @deprecated 从 4.8.5.B 起,请改用使用 {@link SignatureHeader} 的同名方法;5.0 将移除。 */ + @Deprecated + default com.github.binarywang.wxpay.bean.ecommerce.PartnerTransactionsNotifyResult parsePartnerNotifyResult(String notifyData, + com.github.binarywang.wxpay.bean.ecommerce.SignatureHeader header) throws WxPayException { + return LEGACY_ECOMMERCE_GSON.fromJson(LEGACY_ECOMMERCE_GSON.toJson(parsePartnerNotifyResult(notifyData, toUnifiedSignatureHeader(header))), + com.github.binarywang.wxpay.bean.ecommerce.PartnerTransactionsNotifyResult.class); + } + + /** @deprecated 从 4.8.5.B 起,请改用 {@link #queryPartnerOrder(WxPayPartnerOrderQueryV3Request)};5.0 将移除。 */ + @Deprecated + default com.github.binarywang.wxpay.bean.ecommerce.PartnerTransactionsResult queryPartnerTransactions( + com.github.binarywang.wxpay.bean.ecommerce.PartnerTransactionsQueryRequest request) throws WxPayException { + return LEGACY_ECOMMERCE_GSON.fromJson(LEGACY_ECOMMERCE_GSON.toJson(queryPartnerOrder(LEGACY_ECOMMERCE_GSON.fromJson( + LEGACY_ECOMMERCE_GSON.toJson(request), WxPayPartnerOrderQueryV3Request.class))), + com.github.binarywang.wxpay.bean.ecommerce.PartnerTransactionsResult.class); + } + + /** @deprecated 从 4.8.5.B 起,请改用 {@link #closePartnerOrder(WxPayPartnerOrderCloseV3Request)};5.0 将移除。 */ + @Deprecated + default String closePartnerTransactions(com.github.binarywang.wxpay.bean.ecommerce.PartnerTransactionsCloseRequest request) throws WxPayException { + closePartnerOrder(LEGACY_ECOMMERCE_GSON.fromJson(LEGACY_ECOMMERCE_GSON.toJson(request), WxPayPartnerOrderCloseV3Request.class)); + return null; + } + + static TradeTypeEnum toUnifiedTradeType(com.github.binarywang.wxpay.bean.ecommerce.enums.TradeTypeEnum tradeType) { + return tradeType == com.github.binarywang.wxpay.bean.ecommerce.enums.TradeTypeEnum.MWEB ? TradeTypeEnum.H5 : TradeTypeEnum.valueOf(tradeType.name()); + } + + static SignatureHeader toUnifiedSignatureHeader(com.github.binarywang.wxpay.bean.ecommerce.SignatureHeader header) { + return header == null ? null : SignatureHeader.builder().timeStamp(header.getTimeStamp()).nonce(header.getNonce()) + .signature(header.getSigned()).serial(header.getSerialNo()).build(); + } + /** *
    * 二级商户进件API
@@ -80,7 +174,8 @@ public interface EcommerceService {
    * @return 微信合单支付返回 CombineTransactionsResult
    * @throws WxPayException the wx pay exception
    */
-  CombineTransactionsResult combine(TradeTypeEnum tradeType, CombineTransactionsRequest request) throws WxPayException;
+  CombineTransactionsResult combine(TradeTypeEnum tradeType,
+                                   com.github.binarywang.wxpay.bean.request.CombineTransactionsRequest request) throws WxPayException;
 
   /**
    * 
@@ -95,7 +190,8 @@ public interface EcommerceService {
    * @return 调起支付需要的参数 t
    * @throws WxPayException the wx pay exception
    */
-   T combineTransactions(TradeTypeEnum tradeType, CombineTransactionsRequest request) throws WxPayException;
+   T combineTransactions(TradeTypeEnum tradeType,
+                            com.github.binarywang.wxpay.bean.request.CombineTransactionsRequest request) throws WxPayException;
 
   /**
    * 
diff --git a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/EcommerceServiceImpl.java b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/EcommerceServiceImpl.java
index 0f99d428fc..605ff78be5 100644
--- a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/EcommerceServiceImpl.java
+++ b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/EcommerceServiceImpl.java
@@ -70,12 +70,14 @@ public ApplymentsStatusResult queryApplyStatusByOutRequestNo(String outRequestNo
   }
 
   @Override
-  public CombineTransactionsResult combine(TradeTypeEnum tradeType, CombineTransactionsRequest request) throws WxPayException {
+  public CombineTransactionsResult combine(TradeTypeEnum tradeType,
+                                           com.github.binarywang.wxpay.bean.request.CombineTransactionsRequest request) throws WxPayException {
     return this.payService.combine(tradeType, request);
   }
 
   @Override
-  public  T combineTransactions(TradeTypeEnum tradeType, CombineTransactionsRequest request) throws WxPayException {
+  public  T combineTransactions(TradeTypeEnum tradeType,
+                                    com.github.binarywang.wxpay.bean.request.CombineTransactionsRequest request) throws WxPayException {
     return this.payService.combineTransactions(tradeType, request);
   }
 
diff --git a/weixin-java-pay/src/test/java/com/github/binarywang/wxpay/service/LegacyEcommerceApiCompatibilityTest.java b/weixin-java-pay/src/test/java/com/github/binarywang/wxpay/service/LegacyEcommerceApiCompatibilityTest.java
new file mode 100644
index 0000000000..ad044640f1
--- /dev/null
+++ b/weixin-java-pay/src/test/java/com/github/binarywang/wxpay/service/LegacyEcommerceApiCompatibilityTest.java
@@ -0,0 +1,20 @@
+package com.github.binarywang.wxpay.service;
+
+import com.github.binarywang.wxpay.bean.ecommerce.TransactionsResult;
+import com.github.binarywang.wxpay.bean.ecommerce.enums.TradeTypeEnum;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+/**
+ * Compile-time compatibility checks for the pre-#4014 e-commerce API.
+ */
+public class LegacyEcommerceApiCompatibilityTest {
+
+  @Test
+  public void shouldKeepLegacyTransactionResultAndTradeTypeAvailable() {
+    TransactionsResult result = new TransactionsResult();
+
+    Assert.assertNotNull(result);
+    Assert.assertEquals(TradeTypeEnum.JSAPI.name(), "JSAPI");
+  }
+}

From 1286cfd3f38109e48d9784054ad243a1ae9906ca Mon Sep 17 00:00:00 2001
From: softboy99 
Date: Wed, 12 Aug 2026 13:14:51 +0800
Subject: [PATCH 07/31] =?UTF-8?q?:new:=20#4092=20=E3=80=90=E4=BC=81?=
 =?UTF-8?q?=E4=B8=9A=E5=BE=AE=E4=BF=A1=E3=80=91=E5=A2=9E=E5=8A=A0=E5=BE=85?=
 =?UTF-8?q?=E5=8A=9EAPI=E7=9A=84=E6=94=AF=E6=8C=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../me/chanjar/weixin/cp/api/WxCpService.java |   7 ++
 .../weixin/cp/api/WxCpTodoService.java        |  47 ++++++++
 .../cp/api/impl/BaseWxCpServiceImpl.java      |   6 +
 .../cp/api/impl/WxCpTodoServiceImpl.java      |  50 ++++++++
 .../chanjar/weixin/cp/bean/todo/WxCpTodo.java | 110 ++++++++++++++++++
 .../weixin/cp/constant/WxCpApiPathConsts.java |  18 +++
 .../cp/api/impl/WxCpTodoServiceImplTest.java  |  76 ++++++++++++
 weixin-java-cp/src/test/resources/testng.xml  |   1 +
 8 files changed, 315 insertions(+)
 create mode 100644 weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpTodoService.java
 create mode 100644 weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpTodoServiceImpl.java
 create mode 100644 weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/todo/WxCpTodo.java
 create mode 100644 weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpTodoServiceImplTest.java

diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpService.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpService.java
index 269a69a475..9a715c1e91 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpService.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpService.java
@@ -673,4 +673,11 @@ public interface WxCpService extends WxService {
    * @return 人事助手服务 hr service
    */
   WxCpHrService getHrService();
+
+  /**
+   * 获取待办服务
+   *
+   * @return 待办服务 todo service
+   */
+  WxCpTodoService getTodoService();
 }
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpTodoService.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpTodoService.java
new file mode 100644
index 0000000000..82f17c2303
--- /dev/null
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpTodoService.java
@@ -0,0 +1,47 @@
+package me.chanjar.weixin.cp.api;
+
+import me.chanjar.weixin.common.error.WxErrorException;
+import me.chanjar.weixin.cp.bean.todo.WxCpTodo;
+
+import java.util.List;
+
+/**
+ * 企业微信待办接口.
+ * 

+ * 官方文档: + * 获取待办详情, + * 更新待办状态 + * + * @author Binary Wang created on 2026-08-11 + */ +public interface WxCpTodoService { + /** + * 获取待办详情. + *

+ * 该接口用于获取指定的待办详情,请求参数仅包含必填的 todo_id,响应直接返回单个待办对象。 + *

+ * 请求方式: POST(HTTPS) + * 请求地址: https://qyapi.weixin.qq.com/cgi-bin/todo/get?access_token=ACCESS_TOKEN + * + * @param todoId 待办ID + * @return 待办详情 wx cp todo + * @throws WxErrorException the wx error exception + */ + WxCpTodo get(String todoId) throws WxErrorException; + + /** + * 更新待办状态. + *

+ * 该接口用于修改指定的待办信息,支持修改待办整体状态(status 字段)、待办参与人及其状态(attendees[].userid / status 字段)。 + * 仅允许修改当前应用创建的待办,不允许修改已删除的待办。 + *

+ * 请求方式: POST(HTTPS) + * 请求地址: https://qyapi.weixin.qq.com/cgi-bin/todo/update?access_token=ACCESS_TOKEN + * + * @param todoId 待办ID + * @param status 待办整体状态,可不传:0 - 完成;1 - 进行中。为 null 时不修改整体状态 + * @param attendees 待办参与人列表,最多支持20个参与人。为 null 或空时不修改参与人列表 + * @throws WxErrorException the wx error exception + */ + void update(String todoId, Integer status, List attendees) throws WxErrorException; +} diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/BaseWxCpServiceImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/BaseWxCpServiceImpl.java index a3ec703ca4..e351e58444 100644 --- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/BaseWxCpServiceImpl.java +++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/BaseWxCpServiceImpl.java @@ -77,6 +77,7 @@ public abstract class BaseWxCpServiceImpl implements WxCpService, RequestH private final WxCpCorpGroupService corpGroupService = new WxCpCorpGroupServiceImpl(this); private final WxCpIntelligentRobotService intelligentRobotService = new WxCpIntelligentRobotServiceImpl(this); private final WxCpHrService hrService = new WxCpHrServiceImpl(this); + private final WxCpTodoService todoService = new WxCpTodoServiceImpl(this); /** * 全局的是否正在刷新access token的锁. @@ -753,4 +754,9 @@ public WxCpIntelligentRobotService getIntelligentRobotService() { public WxCpHrService getHrService() { return this.hrService; } + + @Override + public WxCpTodoService getTodoService() { + return this.todoService; + } } diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpTodoServiceImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpTodoServiceImpl.java new file mode 100644 index 0000000000..627784b36c --- /dev/null +++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpTodoServiceImpl.java @@ -0,0 +1,50 @@ +package me.chanjar.weixin.cp.api.impl; + +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import me.chanjar.weixin.common.error.WxErrorException; +import me.chanjar.weixin.cp.api.WxCpService; +import me.chanjar.weixin.cp.api.WxCpTodoService; +import me.chanjar.weixin.cp.bean.todo.WxCpTodo; +import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.Todo.*; + +/** + * 企业微信待办接口实现类. + * + * @author Binary Wang created on 2026-08-11 + */ +@Slf4j +@RequiredArgsConstructor +public class WxCpTodoServiceImpl implements WxCpTodoService { + private final WxCpService cpService; + + @Override + public WxCpTodo get(String todoId) throws WxErrorException { + final Map param = new HashMap<>(1); + param.put("todo_id", todoId); + final String response = this.cpService.post(this.cpService.getWxCpConfigStorage().getApiUrl(TODO_GET), + WxCpGsonBuilder.create().toJson(param)); + return WxCpGsonBuilder.create().fromJson(response, WxCpTodo.class); + } + + @Override + public void update(String todoId, Integer status, List attendees) throws WxErrorException { + final Map param = new HashMap<>(3); + param.put("todo_id", todoId); + if (status != null) { + param.put("status", status); + } + if (attendees != null && !attendees.isEmpty()) { + param.put("attendees", attendees); + } + + this.cpService.post(this.cpService.getWxCpConfigStorage().getApiUrl(TODO_UPDATE), + WxCpGsonBuilder.create().toJson(param)); + } +} diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/todo/WxCpTodo.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/todo/WxCpTodo.java new file mode 100644 index 0000000000..a33eb1f4c3 --- /dev/null +++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/todo/WxCpTodo.java @@ -0,0 +1,110 @@ +package me.chanjar.weixin.cp.bean.todo; + +import com.google.gson.annotations.SerializedName; +import lombok.Data; +import lombok.experimental.Accessors; +import me.chanjar.weixin.common.bean.ToJson; +import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder; + +import java.io.Serializable; +import java.util.List; + +/** + * 待办信息bean. + *

+ * 官方文档: + * 获取待办详情 + * + * @author Binary Wang created on 2026-08-11 + */ +@Data +@Accessors(chain = true) +public class WxCpTodo implements Serializable, ToJson { + private static final long serialVersionUID = -1L; + + /** + * 待办ID + */ + @SerializedName("todo_id") + private String todoId; + /** + * 待办内容 + */ + @SerializedName("content") + private String content; + /** + * 待办创建人ID + */ + @SerializedName("creator") + private String creator; + /** + * 待办状态。 + * 0 - 已完成 + * 1 - 进行中 + * 2 - 已删除 + */ + @SerializedName("status") + private Integer status; + /** + * 待办创建时间戳(整型秒数) + */ + @SerializedName("create_time") + private Long createTime; + /** + * 待办参与人列表 + */ + @SerializedName("attendees") + private List attendees; + /** + * 待办截止时间戳(整型秒数) + */ + @SerializedName("end_time") + private Long endTime; + /** + * 提醒列表 + */ + @SerializedName("reminders") + private List reminders; + + @Override + public String toJson() { + return WxCpGsonBuilder.create().toJson(this); + } + + /** + * 待办参与人. + */ + @Data + @Accessors(chain = true) + public static class Attendee implements Serializable { + private static final long serialVersionUID = -1L; + + /** + * 待办参与人ID + */ + @SerializedName("userid") + private String userid; + /** + * 参与人的待办状态。 + * 0 - 完成 + * 1 - 进行中 + */ + @SerializedName("status") + private Integer status; + } + + /** + * 待办提醒. + */ + @Data + @Accessors(chain = true) + public static class Reminder implements Serializable { + private static final long serialVersionUID = -1L; + + /** + * 提醒时间戳(整型秒数) + */ + @SerializedName("remind_time") + private Long remindTime; + } +} diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/constant/WxCpApiPathConsts.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/constant/WxCpApiPathConsts.java index 642e579870..d95bf0a130 100644 --- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/constant/WxCpApiPathConsts.java +++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/constant/WxCpApiPathConsts.java @@ -1884,4 +1884,22 @@ interface Hr { */ String UPDATE_EMPLOYEE_FIELD_INFO = "/cgi-bin/hr/update_staff_info"; } + + /** + * 待办相关接口. + * 官方文档:https://developer.work.weixin.qq.com/document/path/101524 + */ + interface Todo { + /** + * 获取待办详情 + * https://developer.work.weixin.qq.com/document/path/101524 + */ + String TODO_GET = "/cgi-bin/todo/get"; + + /** + * 更新待办状态 + * https://developer.work.weixin.qq.com/document/path/101534 + */ + String TODO_UPDATE = "/cgi-bin/todo/update"; + } } diff --git a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpTodoServiceImplTest.java b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpTodoServiceImplTest.java new file mode 100644 index 0000000000..d8569592ef --- /dev/null +++ b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpTodoServiceImplTest.java @@ -0,0 +1,76 @@ +package me.chanjar.weixin.cp.api.impl; + +import com.google.inject.Inject; +import me.chanjar.weixin.common.error.WxErrorException; +import me.chanjar.weixin.cp.api.ApiTestModule; +import me.chanjar.weixin.cp.api.WxCpService; +import me.chanjar.weixin.cp.bean.todo.WxCpTodo; +import org.testng.annotations.Guice; +import org.testng.annotations.Test; + +import java.util.Arrays; + +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertNotNull; + +/** + * 单元测试类. + * + * @author Binary Wang created on 2026-08-11 + */ +@Guice(modules = ApiTestModule.class) +public class WxCpTodoServiceImplTest { + /** + * The Wx service. + */ + @Inject + protected WxCpService wxService; + + private static final String TODO_ID = "17c7d2bd9f20d652840f72f59e796AAA"; + + /** + * Test get. + * + * @throws WxErrorException the wx error exception + */ + @Test + public void testGet() throws WxErrorException { + final WxCpTodo todo = this.wxService.getTodoService().get(TODO_ID); + assertNotNull(todo, "get() 返回的待办对象不应为 null"); + assertEquals(todo.getTodoId(), TODO_ID, "返回的 todo_id 应与请求一致"); + } + + /** + * Test update status only. + * + * @throws WxErrorException the wx error exception + */ + @Test + public void testUpdateStatusOnly() throws WxErrorException { + this.wxService.getTodoService().update(TODO_ID, 0, null); + // 更新成功后通过 get() 回查,验证整体状态确实写入 + final WxCpTodo todo = this.wxService.getTodoService().get(TODO_ID); + assertNotNull(todo, "回查待办不应为 null"); + assertEquals(todo.getStatus(), Integer.valueOf(0), "待办整体状态应为 0(完成)"); + } + + /** + * Test update with attendees. + * + * @throws WxErrorException the wx error exception + */ + @Test + public void testUpdateWithAttendees() throws WxErrorException { + this.wxService.getTodoService().update(TODO_ID, 1, + Arrays.asList( + new WxCpTodo.Attendee().setUserid("lisi").setStatus(0), + new WxCpTodo.Attendee().setUserid("zhangsan").setStatus(1) + )); + // 更新成功后通过 get() 回查,验证参与人列表确实写入 + final WxCpTodo todo = this.wxService.getTodoService().get(TODO_ID); + assertNotNull(todo, "回查待办不应为 null"); + assertNotNull(todo.getAttendees(), "attendees 列表不应为 null"); + assertEquals(todo.getAttendees().size(), 2, "参与人数量应为 2"); + assertEquals(todo.getStatus(), Integer.valueOf(1), "待办整体状态应为 1(进行中)"); + } +} diff --git a/weixin-java-cp/src/test/resources/testng.xml b/weixin-java-cp/src/test/resources/testng.xml index f63d3f30f5..cb3b8362e8 100644 --- a/weixin-java-cp/src/test/resources/testng.xml +++ b/weixin-java-cp/src/test/resources/testng.xml @@ -24,6 +24,7 @@ + From be7b151a7da0fdfd98f082cf89d567e8a363186f Mon Sep 17 00:00:00 2001 From: Binary Wang Date: Wed, 12 Aug 2026 13:34:26 +0800 Subject: [PATCH 08/31] =?UTF-8?q?:art:=20#4090=20=E3=80=90=E5=BE=AE?= =?UTF-8?q?=E4=BF=A1=E6=94=AF=E4=BB=98=E3=80=91=E5=85=81=E8=AE=B8V2?= =?UTF-8?q?=E6=B2=99=E7=AE=B1=E4=B8=8EV3=E9=85=8D=E7=BD=AE=E5=85=B1?= =?UTF-8?q?=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/BaseWxPayServiceImpl.java | 9 ++-- .../impl/WxPayServiceApacheHttpImpl.java | 5 ++ .../impl/WxPayServiceHttpComponentsImpl.java | 4 ++ .../service/impl/WxPayServiceSandboxTest.java | 53 +++++++++++++++++++ 4 files changed, 68 insertions(+), 3 deletions(-) create mode 100644 weixin-java-pay/src/test/java/com/github/binarywang/wxpay/service/impl/WxPayServiceSandboxTest.java diff --git a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/BaseWxPayServiceImpl.java b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/BaseWxPayServiceImpl.java index d17c3ae698..8489f80624 100644 --- a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/BaseWxPayServiceImpl.java +++ b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/BaseWxPayServiceImpl.java @@ -368,14 +368,17 @@ public String getConfigKey(String mchId, String appId) { @Override public String getPayBaseUrl() { if (this.getConfig().isUseSandboxEnv()) { - if (StringUtils.isNotBlank(this.getConfig().getApiV3Key())) { - throw new WxRuntimeException("微信支付V3 目前不支持沙箱模式!"); - } return this.getConfig().getApiHostWithPathPrefix() + "/xdc/apiv2sandbox"; } return this.getConfig().getApiHostWithPathPrefix(); } + protected void checkV3SandboxNotSupported() { + if (this.getConfig().isUseSandboxEnv()) { + throw new WxRuntimeException("微信支付V3 目前不支持沙箱模式!"); + } + } + @Override public WxPayRefundResult refund(WxPayRefundRequest request) throws WxPayException { request.checkAndSign(this.getConfig()); diff --git a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/WxPayServiceApacheHttpImpl.java b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/WxPayServiceApacheHttpImpl.java index 12b85670f9..5926bbacfb 100644 --- a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/WxPayServiceApacheHttpImpl.java +++ b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/WxPayServiceApacheHttpImpl.java @@ -128,6 +128,7 @@ public String postV3(String url, String requestStr) throws WxPayException { } private String requestV3(String url, String requestStr, HttpRequestBase httpRequestBase) throws WxPayException { + this.checkV3SandboxNotSupported(); CloseableHttpClient httpClient = this.createApiV3HttpClient(); try (CloseableHttpResponse response = httpClient.execute(httpRequestBase)) { //v3已经改为通过状态码判断200 204 成功 @@ -163,6 +164,7 @@ public String patchV3(String url, String requestStr) throws WxPayException { @Override public String postV3WithWechatpaySerial(String url, String requestStr) throws WxPayException { + this.checkV3SandboxNotSupported(); HttpPost httpPost = this.createHttpPost(url, requestStr); this.configureRequest(httpPost); CloseableHttpClient httpClient = this.createApiV3HttpClient(); @@ -199,6 +201,7 @@ public String postV3(String url, HttpPost httpPost) throws WxPayException { @Override public String requestV3(String url, HttpRequestBase httpRequest) throws WxPayException { + this.checkV3SandboxNotSupported(); this.configureRequest(httpRequest); CloseableHttpClient httpClient = this.createApiV3HttpClient(); try (CloseableHttpResponse response = httpClient.execute(httpRequest)) { @@ -243,6 +246,7 @@ public String getV3WithWechatPaySerial(String url) throws WxPayException { @Override public InputStream downloadV3(String url) throws WxPayException { + this.checkV3SandboxNotSupported(); HttpGet httpGet = new WxPayV3DownloadHttpGet(url); this.configureRequest(httpGet); CloseableHttpClient httpClient = this.createApiV3HttpClient(); @@ -285,6 +289,7 @@ public String deleteV3(String url) throws WxPayException { } private void configureRequest(HttpRequestBase request) { + this.checkV3SandboxNotSupported(); String serialNumber = getWechatPaySerial(getConfig()); String method = request.getMethod(); request.addHeader(ACCEPT, APPLICATION_JSON); diff --git a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/WxPayServiceHttpComponentsImpl.java b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/WxPayServiceHttpComponentsImpl.java index cc5423302b..837587e76d 100644 --- a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/WxPayServiceHttpComponentsImpl.java +++ b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/WxPayServiceHttpComponentsImpl.java @@ -125,6 +125,7 @@ public String postV3(String url, String requestStr) throws WxPayException { } private String requestV3(String url, String requestStr, HttpRequestBase httpRequestBase) throws WxPayException { + this.checkV3SandboxNotSupported(); CloseableHttpClient httpClient = this.createApiV3HttpClient(); try (CloseableHttpResponse response = httpClient.execute(httpRequestBase)) { //v3已经改为通过状态码判断200 204 成功 @@ -160,6 +161,7 @@ public String patchV3(String url, String requestStr) throws WxPayException { @Override public String postV3WithWechatpaySerial(String url, String requestStr) throws WxPayException { + this.checkV3SandboxNotSupported(); HttpPost httpPost = this.createHttpPost(url, requestStr); this.configureRequest(httpPost); CloseableHttpClient httpClient = this.createApiV3HttpClient(); @@ -196,6 +198,7 @@ public String postV3(String url, HttpPost httpPost) throws WxPayException { @Override public String requestV3(String url, HttpRequestBase httpRequest) throws WxPayException { + this.checkV3SandboxNotSupported(); this.configureRequest(httpRequest); CloseableHttpClient httpClient = this.createApiV3HttpClient(); try (CloseableHttpResponse response = httpClient.execute(httpRequest)) { @@ -240,6 +243,7 @@ public String getV3WithWechatPaySerial(String url) throws WxPayException { @Override public InputStream downloadV3(String url) throws WxPayException { + this.checkV3SandboxNotSupported(); HttpGet httpGet = new WxPayV3DownloadHttpGet(url); this.configureRequest(httpGet); CloseableHttpClient httpClient = this.createApiV3HttpClient(); diff --git a/weixin-java-pay/src/test/java/com/github/binarywang/wxpay/service/impl/WxPayServiceSandboxTest.java b/weixin-java-pay/src/test/java/com/github/binarywang/wxpay/service/impl/WxPayServiceSandboxTest.java new file mode 100644 index 0000000000..2daa9845a7 --- /dev/null +++ b/weixin-java-pay/src/test/java/com/github/binarywang/wxpay/service/impl/WxPayServiceSandboxTest.java @@ -0,0 +1,53 @@ +package com.github.binarywang.wxpay.service.impl; + +import com.github.binarywang.wxpay.config.WxPayConfig; +import me.chanjar.weixin.common.error.WxRuntimeException; +import org.testng.annotations.Test; + +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.expectThrows; + +public class WxPayServiceSandboxTest { + + @Test + public void shouldUseV2SandboxUrlWhenV3KeyIsConfigured() { + WxPayConfig config = new WxPayConfig(); + config.setApiHostUrl("https://api.mch.weixin.qq.com"); + config.setApiHostUrlPath("/payment-proxy"); + config.setApiV3Key("v3-key"); + config.setUseSandboxEnv(true); + + WxPayServiceImpl service = new WxPayServiceImpl(); + service.setConfig(config); + + assertEquals(service.getPayBaseUrl(), "https://api.mch.weixin.qq.com/payment-proxy/xdc/apiv2sandbox"); + } + + @Test + public void shouldRejectV3RequestWhenSandboxIsEnabled() { + WxPayConfig config = new WxPayConfig(); + config.setUseSandboxEnv(true); + + WxPayServiceImpl service = new WxPayServiceImpl(); + service.setConfig(config); + + WxRuntimeException exception = expectThrows(WxRuntimeException.class, + () -> service.postV3("https://api.mch.weixin.qq.com/v3/pay/transactions/jsapi", "{}")); + + assertEquals(exception.getMessage(), "微信支付V3 目前不支持沙箱模式!"); + } + + @Test + public void shouldRejectHttpComponentsV3RequestWhenSandboxIsEnabled() { + WxPayConfig config = new WxPayConfig(); + config.setUseSandboxEnv(true); + + WxPayServiceHttpComponentsImpl service = new WxPayServiceHttpComponentsImpl(); + service.setConfig(config); + + WxRuntimeException exception = expectThrows(WxRuntimeException.class, + () -> service.postV3("https://api.mch.weixin.qq.com/v3/pay/transactions/jsapi", "{}")); + + assertEquals(exception.getMessage(), "微信支付V3 目前不支持沙箱模式!"); + } +} From 1c43293a3c2c9d7e91304b6d037fb017f680d0c6 Mon Sep 17 00:00:00 2001 From: Binary Wang Date: Wed, 12 Aug 2026 13:37:06 +0800 Subject: [PATCH 09/31] :wrench: ignore worktrees --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 6a5b5f7519..6b88025471 100644 --- a/.gitignore +++ b/.gitignore @@ -54,3 +54,4 @@ sonar-project.properties # STS .factorypath *.zip +.worktrees From 2f1aa7bd092bf353f6f97c852f6ce07ea66b4feb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 14 Aug 2026 09:42:12 +0800 Subject: [PATCH 10/31] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20Bump=20org.apache.ht?= =?UTF-8?q?tpcomponents.client5:httpclient5=20from=205.5.2=20to=205.6.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/HTTPCLIENT_UPGRADE_GUIDE.md | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/HTTPCLIENT_UPGRADE_GUIDE.md b/docs/HTTPCLIENT_UPGRADE_GUIDE.md index 5cabb10674..717b1d1709 100644 --- a/docs/HTTPCLIENT_UPGRADE_GUIDE.md +++ b/docs/HTTPCLIENT_UPGRADE_GUIDE.md @@ -15,7 +15,7 @@ | HTTP 客户端 | 版本 | 配置值 | 状态 | 说明 | |------------|------|--------|------|------| -| Apache HttpClient 5.x | 5.5 | `HttpComponents` | ⭐ 推荐 | 最新稳定版本 | +| Apache HttpClient 5.x | 5.6.3 | `HttpComponents` | ⭐ 推荐 | 最新稳定版本 | | Apache HttpClient 4.x | 4.5.13 | `HttpClient` | ✅ 支持 | 向后兼容 | | OkHttp | 4.12.0 | `OkHttp` | ✅ 支持 | 需自行添加依赖 | | Jodd-http | 6.3.0 | `JoddHttp` | ✅ 支持 | 需自行添加依赖 | diff --git a/pom.xml b/pom.xml index 188e0d627e..6c1c379ce1 100644 --- a/pom.xml +++ b/pom.xml @@ -138,7 +138,7 @@ UTF-8 4.5.13 - 5.5.2 + 5.6.3 9.4.57.v20241219 1.84 2.3.3.RELEASE From 6a4f0db39e634992ad358469a817b6e1cad866b4 Mon Sep 17 00:00:00 2001 From: Binary Wang Date: Tue, 18 Aug 2026 12:44:36 +0800 Subject: [PATCH 11/31] =?UTF-8?q?:art:=20=E5=85=BC=E5=AE=B9=E6=97=A7?= =?UTF-8?q?=E7=89=88=E9=80=80=E6=AC=BE=E6=8F=90=E7=8E=B0=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E8=A7=A3=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wxpay/service/EcommerceService.java | 18 ++++++++++++++++++ .../LegacyEcommerceApiCompatibilityTest.java | 8 ++++++++ 2 files changed, 26 insertions(+) diff --git a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/EcommerceService.java b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/EcommerceService.java index 6475bec7f1..d4e3449935 100644 --- a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/EcommerceService.java +++ b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/EcommerceService.java @@ -532,6 +532,15 @@ T combineTransactions(TradeTypeEnum tradeType, */ RefundNotifyResult parseRefundNotifyResult(String notifyData, SignatureHeader header) throws WxPayException; + /** + * @deprecated 从 4.8.5.B 起,请改用使用 {@link SignatureHeader} 的同名方法;5.0 将移除。 + */ + @Deprecated + default RefundNotifyResult parseRefundNotifyResult(String notifyData, + com.github.binarywang.wxpay.bean.ecommerce.SignatureHeader header) throws WxPayException { + return parseRefundNotifyResult(notifyData, toUnifiedSignatureHeader(header)); + } + /** *

    * 提现状态变更通知回调数据处理
@@ -545,6 +554,15 @@  T combineTransactions(TradeTypeEnum tradeType,
    */
   WithdrawNotifyResult parseWithdrawNotifyResult(String notifyData, SignatureHeader header) throws WxPayException;
 
+  /**
+   * @deprecated 从 4.8.5.B 起,请改用使用 {@link SignatureHeader} 的同名方法;5.0 将移除。
+   */
+  @Deprecated
+  default WithdrawNotifyResult parseWithdrawNotifyResult(String notifyData,
+                                                         com.github.binarywang.wxpay.bean.ecommerce.SignatureHeader header) throws WxPayException {
+    return parseWithdrawNotifyResult(notifyData, toUnifiedSignatureHeader(header));
+  }
+
   /**
    * 
    * 二级商户账户余额提现API
diff --git a/weixin-java-pay/src/test/java/com/github/binarywang/wxpay/service/LegacyEcommerceApiCompatibilityTest.java b/weixin-java-pay/src/test/java/com/github/binarywang/wxpay/service/LegacyEcommerceApiCompatibilityTest.java
index ad044640f1..a82dadb76d 100644
--- a/weixin-java-pay/src/test/java/com/github/binarywang/wxpay/service/LegacyEcommerceApiCompatibilityTest.java
+++ b/weixin-java-pay/src/test/java/com/github/binarywang/wxpay/service/LegacyEcommerceApiCompatibilityTest.java
@@ -17,4 +17,12 @@ public void shouldKeepLegacyTransactionResultAndTradeTypeAvailable() {
     Assert.assertNotNull(result);
     Assert.assertEquals(TradeTypeEnum.JSAPI.name(), "JSAPI");
   }
+
+  @Test
+  public void shouldKeepLegacyRefundAndWithdrawNotificationSignatures() throws Exception {
+    Class legacyHeader = com.github.binarywang.wxpay.bean.ecommerce.SignatureHeader.class;
+
+    Assert.assertNotNull(EcommerceService.class.getMethod("parseRefundNotifyResult", String.class, legacyHeader));
+    Assert.assertNotNull(EcommerceService.class.getMethod("parseWithdrawNotifyResult", String.class, legacyHeader));
+  }
 }

From 509bce53f3493db01093ebfac89a1c055e40dbf9 Mon Sep 17 00:00:00 2001
From: "devin-ai-integration[bot]"
 <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Date: Tue, 18 Aug 2026 12:53:37 +0800
Subject: [PATCH 12/31] =?UTF-8?q?:art:=20=E8=A1=A5=E5=85=85=E5=8D=95?=
 =?UTF-8?q?=E5=85=83=E6=B5=8B=E8=AF=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../channel/util/WxChCryptUtilsTest.java      | 100 +++++++++++++
 .../weixin/channel/util/XmlUtilsTest.java     |  75 ++++++++++
 .../src/test/resources/testng.xml             |   8 +
 .../result/WxFastMaCanSetCategoryResult.java  |  23 ++-
 .../bean/message/WxOpenXmlMessageTest.java    | 138 ++++++++++++++++++
 .../WxFastMaCanSetCategoryResultTest.java     |   6 +
 .../weixin/open/util/WxOpenCryptUtilTest.java |  87 +++++++++++
 .../open/util/json/WxOpenGsonBuilderTest.java |  92 ++++++++++++
 .../src/test/resources/testng.xml             |   7 +
 9 files changed, 534 insertions(+), 2 deletions(-)
 create mode 100644 weixin-java-channel/src/test/java/me/chanjar/weixin/channel/util/WxChCryptUtilsTest.java
 create mode 100644 weixin-java-channel/src/test/java/me/chanjar/weixin/channel/util/XmlUtilsTest.java
 create mode 100644 weixin-java-open/src/test/java/me/chanjar/weixin/open/bean/message/WxOpenXmlMessageTest.java
 create mode 100644 weixin-java-open/src/test/java/me/chanjar/weixin/open/util/WxOpenCryptUtilTest.java
 create mode 100644 weixin-java-open/src/test/java/me/chanjar/weixin/open/util/json/WxOpenGsonBuilderTest.java

diff --git a/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/util/WxChCryptUtilsTest.java b/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/util/WxChCryptUtilsTest.java
new file mode 100644
index 0000000000..0e3b9da080
--- /dev/null
+++ b/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/util/WxChCryptUtilsTest.java
@@ -0,0 +1,100 @@
+package me.chanjar.weixin.channel.util;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertNotNull;
+import static org.testng.Assert.assertTrue;
+import static org.testng.Assert.expectThrows;
+
+import java.nio.charset.StandardCharsets;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import javax.crypto.Cipher;
+import javax.crypto.spec.IvParameterSpec;
+import javax.crypto.spec.SecretKeySpec;
+import me.chanjar.weixin.channel.config.impl.WxChannelDefaultConfigImpl;
+import me.chanjar.weixin.common.error.WxRuntimeException;
+import me.chanjar.weixin.common.util.crypto.SHA1;
+import org.apache.commons.codec.binary.Base64;
+import org.testng.annotations.Test;
+
+/**
+ * {@link WxChCryptUtils} 单元测试
+ */
+public class WxChCryptUtilsTest {
+
+  private static final String APP_ID = "wx0000000000000002";
+  private static final String TOKEN = "test_channel_token";
+  /** 43 位 EncodingAESKey 占位值,非真实密钥 */
+  private static final String AES_KEY = "MDEyMzQ1Njc4OWFiY2RlZjAxMjM0NTY3ODlhYmNkZWY";
+
+  private static final Pattern ENCRYPT_PATTERN = Pattern.compile("");
+  private static final Pattern SIGNATURE_PATTERN =
+    Pattern.compile("");
+  private static final Pattern TIMESTAMP_PATTERN = Pattern.compile("(.*?)");
+  private static final Pattern NONCE_PATTERN = Pattern.compile("");
+
+  private WxChCryptUtils cryptUtils() {
+    WxChannelDefaultConfigImpl config = new WxChannelDefaultConfigImpl();
+    config.setAppid(APP_ID);
+    config.setToken(TOKEN);
+    config.setAesKey(AES_KEY);
+    return new WxChCryptUtils(config);
+  }
+
+  private String group(Pattern pattern, String text) {
+    Matcher matcher = pattern.matcher(text);
+    assertTrue(matcher.find(), "未匹配到期望的节点:" + pattern.pattern());
+    return matcher.group(1);
+  }
+
+  @Test
+  public void testEncryptThenDecrypt() {
+    WxChCryptUtils cryptUtils = cryptUtils();
+    String plainText = ""
+      + "";
+
+    String encryptedXml = cryptUtils.encrypt(plainText);
+    assertNotNull(encryptedXml);
+
+    String encrypt = group(ENCRYPT_PATTERN, encryptedXml);
+    String signature = group(SIGNATURE_PATTERN, encryptedXml);
+    String timestamp = group(TIMESTAMP_PATTERN, encryptedXml);
+    String nonce = group(NONCE_PATTERN, encryptedXml);
+
+    assertEquals(signature, SHA1.gen(TOKEN, timestamp, nonce, encrypt));
+    assertEquals(cryptUtils.decryptXml(signature, timestamp, nonce, encryptedXml), plainText);
+  }
+
+  @Test
+  public void testDecryptXmlWithWrongSignature() {
+    WxChCryptUtils cryptUtils = cryptUtils();
+    String encryptedXml = cryptUtils.encrypt("");
+    String timestamp = group(TIMESTAMP_PATTERN, encryptedXml);
+    String nonce = group(NONCE_PATTERN, encryptedXml);
+
+    expectThrows(WxRuntimeException.class,
+      () -> cryptUtils.decryptXml("wrong_signature", timestamp, nonce, encryptedXml));
+  }
+
+  @Test
+  public void testDecryptWithSessionKey() throws Exception {
+    byte[] keyBytes = "0123456789abcdef".getBytes(StandardCharsets.UTF_8);
+    byte[] ivBytes = "fedcba9876543210".getBytes(StandardCharsets.UTF_8);
+    String plainText = "{\"openid\":\"o0000000000000000000\"}";
+
+    Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
+    cipher.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(keyBytes, "AES"), new IvParameterSpec(ivBytes));
+    String encryptedData = Base64.encodeBase64String(cipher.doFinal(plainText.getBytes(StandardCharsets.UTF_8)));
+
+    String decrypted = WxChCryptUtils.decrypt(Base64.encodeBase64String(keyBytes), encryptedData,
+      Base64.encodeBase64String(ivBytes));
+    assertEquals(decrypted, plainText);
+  }
+
+  @Test
+  public void testDecryptWithInvalidSessionKey() {
+    expectThrows(RuntimeException.class,
+      () -> WxChCryptUtils.decrypt(Base64.encodeBase64String("short_key".getBytes(StandardCharsets.UTF_8)),
+        "invalid", Base64.encodeBase64String("fedcba9876543210".getBytes(StandardCharsets.UTF_8))));
+  }
+}
diff --git a/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/util/XmlUtilsTest.java b/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/util/XmlUtilsTest.java
new file mode 100644
index 0000000000..e22e31760a
--- /dev/null
+++ b/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/util/XmlUtilsTest.java
@@ -0,0 +1,75 @@
+package me.chanjar.weixin.channel.util;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertNotNull;
+import static org.testng.Assert.assertNull;
+
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.dataformat.xml.XmlMapper;
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+import java.nio.charset.StandardCharsets;
+import me.chanjar.weixin.channel.bean.base.AttrInfo;
+import org.testng.annotations.Test;
+
+/**
+ * {@link XmlUtils} 单元测试
+ */
+public class XmlUtilsTest {
+
+  private static final String XML = "这是Key这是Value";
+
+  @Test
+  public void testEncode() {
+    String xml = XmlUtils.encode(new AttrInfo("这是Key", "这是Value"));
+    assertNotNull(xml);
+    assertEquals(xml, XML);
+  }
+
+  @Test
+  public void testEncodeWithObjectMapper() {
+    String xml = XmlUtils.encode(new XmlMapper(), new AttrInfo("这是Key", "这是Value"));
+    assertNotNull(xml);
+    assertEquals(XmlUtils.decode(xml, AttrInfo.class).getKey(), "这是Key");
+  }
+
+  @Test
+  public void testDecode() {
+    AttrInfo info = XmlUtils.decode(XML, AttrInfo.class);
+    assertNotNull(info);
+    assertEquals(info.getKey(), "这是Key");
+    assertEquals(info.getValue(), "这是Value");
+  }
+
+  @Test
+  public void testDecodeUnknownProperty() {
+    String xml = "kv";
+    AttrInfo info = XmlUtils.decode(xml, AttrInfo.class);
+    assertNotNull(info);
+    assertEquals(info.getKey(), "k");
+    assertNull(info.getValue());
+  }
+
+  @Test
+  public void testDecodeEmptyOrInvalidXml() {
+    assertNull(XmlUtils.decode((String) null, AttrInfo.class));
+    assertNull(XmlUtils.decode("", AttrInfo.class));
+    assertNull(XmlUtils.decode("not a xml", AttrInfo.class));
+  }
+
+  @Test
+  public void testDecodeWithTypeReference() {
+    AttrInfo info = XmlUtils.decode(XML, new TypeReference() {
+    });
+    assertNotNull(info);
+    assertEquals(info.getValue(), "这是Value");
+  }
+
+  @Test
+  public void testDecodeInputStream() {
+    InputStream is = new ByteArrayInputStream(XML.getBytes(StandardCharsets.UTF_8));
+    AttrInfo info = XmlUtils.decode(is, AttrInfo.class);
+    assertNotNull(info);
+    assertEquals(info.getKey(), "这是Key");
+  }
+}
diff --git a/weixin-java-channel/src/test/resources/testng.xml b/weixin-java-channel/src/test/resources/testng.xml
index afa0aa32f2..819ebcf5f9 100644
--- a/weixin-java-channel/src/test/resources/testng.xml
+++ b/weixin-java-channel/src/test/resources/testng.xml
@@ -8,4 +8,12 @@
       -->
     
   
+  
+    
+      
+      
+      
+      
+    
+  
 
diff --git a/weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/result/WxFastMaCanSetCategoryResult.java b/weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/result/WxFastMaCanSetCategoryResult.java
index b3d0dd9d94..18e885d671 100644
--- a/weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/result/WxFastMaCanSetCategoryResult.java
+++ b/weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/result/WxFastMaCanSetCategoryResult.java
@@ -3,6 +3,7 @@
 import com.google.gson.annotations.SerializedName;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
+import org.apache.commons.lang3.math.NumberUtils;
 
 import java.util.List;
 
@@ -16,11 +17,29 @@
 @EqualsAndHashCode(callSuper = false)
 public class WxFastMaCanSetCategoryResult extends WxOpenResult {
   private static final long serialVersionUID = -2469386233538980102L;
-  @SerializedName("errcode")
-  private int errCode;
   @SerializedName("categories_list")
   private CategoriesListBean categoriesList;
 
+  /**
+   * 错误码,已弃用,未来将删除
+   *
+   * @see WxOpenResult#getErrcode() 应使用此方法
+   */
+  @Deprecated
+  public int getErrCode() {
+    return NumberUtils.toInt(this.errcode);
+  }
+
+  /**
+   * 错误码,已弃用,未来将删除
+   *
+   * @see WxOpenResult#setErrcode(String) 应使用此方法
+   */
+  @Deprecated
+  public void setErrCode(int errCode) {
+    this.errcode = String.valueOf(errCode);
+  }
+
   @Data
   public static class CategoriesListBean {
     private List categories;
diff --git a/weixin-java-open/src/test/java/me/chanjar/weixin/open/bean/message/WxOpenXmlMessageTest.java b/weixin-java-open/src/test/java/me/chanjar/weixin/open/bean/message/WxOpenXmlMessageTest.java
new file mode 100644
index 0000000000..26bc8a505a
--- /dev/null
+++ b/weixin-java-open/src/test/java/me/chanjar/weixin/open/bean/message/WxOpenXmlMessageTest.java
@@ -0,0 +1,138 @@
+package me.chanjar.weixin.open.bean.message;
+
+import me.chanjar.weixin.common.util.crypto.SHA1;
+import me.chanjar.weixin.open.api.impl.WxOpenInMemoryConfigStorage;
+import me.chanjar.weixin.open.util.WxOpenCryptUtil;
+import org.testng.annotations.Test;
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+import java.nio.charset.StandardCharsets;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertNotNull;
+import static org.testng.Assert.assertTrue;
+
+/**
+ * {@link WxOpenXmlMessage} 单元测试
+ */
+public class WxOpenXmlMessageTest {
+
+  private static final String COMPONENT_APP_ID = "wx0000000000000001";
+  private static final String COMPONENT_TOKEN = "test_component_token";
+  /** 43 位 EncodingAESKey 占位值,非真实密钥 */
+  private static final String COMPONENT_AES_KEY = "MDEyMzQ1Njc4OWFiY2RlZjAxMjM0NTY3ODlhYmNkZWY";
+
+  private static final Pattern ENCRYPT_PATTERN = Pattern.compile("");
+  private static final Pattern TIMESTAMP_PATTERN = Pattern.compile("(.*?)");
+  private static final Pattern NONCE_PATTERN = Pattern.compile("");
+
+  private static final String VERIFY_TICKET_XML = "\n"
+    + "  \n"
+    + "  1413192605\n"
+    + "  \n"
+    + "  \n"
+    + "";
+
+  private WxOpenInMemoryConfigStorage config() {
+    WxOpenInMemoryConfigStorage config = new WxOpenInMemoryConfigStorage();
+    config.setComponentAppId(COMPONENT_APP_ID);
+    config.setComponentToken(COMPONENT_TOKEN);
+    config.setComponentAesKey(COMPONENT_AES_KEY);
+    return config;
+  }
+
+  private String group(Pattern pattern, String text) {
+    Matcher matcher = pattern.matcher(text);
+    assertTrue(matcher.find(), "未匹配到期望的节点:" + pattern.pattern());
+    return matcher.group(1);
+  }
+
+  @Test
+  public void testFromXmlComponentVerifyTicket() {
+    WxOpenXmlMessage message = WxOpenXmlMessage.fromXml(VERIFY_TICKET_XML);
+    assertNotNull(message);
+    assertEquals(message.getAppId(), COMPONENT_APP_ID);
+    assertEquals(message.getCreateTime(), Long.valueOf(1413192605L));
+    assertEquals(message.getInfoType(), "component_verify_ticket");
+    assertEquals(message.getComponentVerifyTicket(), "ticket@@@abcdefg");
+  }
+
+  @Test
+  public void testFromXmlAuthorized() {
+    String xml = "\n"
+      + "  \n"
+      + "  1413192760\n"
+      + "  \n"
+      + "  \n"
+      + "  \n"
+      + "  600\n"
+      + "  \n"
+      + "";
+
+    WxOpenXmlMessage message = WxOpenXmlMessage.fromXml(xml);
+    assertNotNull(message);
+    assertEquals(message.getInfoType(), "authorized");
+    assertEquals(message.getAuthorizerAppid(), "wx0000000000000002");
+    assertEquals(message.getAuthorizationCode(), "auth_code_value");
+    assertEquals(message.getAuthorizationCodeExpiredTime(), Long.valueOf(600L));
+    assertEquals(message.getPreAuthCode(), "pre_auth_code_value");
+  }
+
+  @Test
+  public void testFromXmlFastRegisterWeApp() {
+    String xml = "\n"
+      + "  \n"
+      + "  1535442403\n"
+      + "  \n"
+      + "  wx0000000000000003\n"
+      + "  0\n"
+      + "  auth_code_value\n"
+      + "  \n"
+      + "  \n"
+      + "    \n"
+      + "  \n"
+      + "";
+
+    WxOpenXmlMessage message = WxOpenXmlMessage.fromXml(xml);
+    assertNotNull(message);
+    assertEquals(message.getSubAppId(), "wx0000000000000003");
+    assertEquals(message.getRegistAppId(), "wx0000000000000003");
+    assertEquals(message.getStatus(), 0);
+    assertEquals(message.getAuthCode(), "auth_code_value");
+    assertEquals(message.getMsg(), "OK");
+    assertNotNull(message.getInfo());
+    assertEquals(message.getInfo().getName(), "тест");
+  }
+
+  @Test
+  public void testFromXmlInputStream() {
+    InputStream is = new ByteArrayInputStream(VERIFY_TICKET_XML.getBytes(StandardCharsets.UTF_8));
+    WxOpenXmlMessage message = WxOpenXmlMessage.fromXml(is);
+    assertNotNull(message);
+    assertEquals(message.getComponentVerifyTicket(), "ticket@@@abcdefg");
+  }
+
+  @Test
+  public void testFromEncryptedXml() {
+    WxOpenInMemoryConfigStorage config = config();
+    String encryptedXml = new WxOpenCryptUtil(config).encrypt(VERIFY_TICKET_XML);
+
+    String encrypt = group(ENCRYPT_PATTERN, encryptedXml);
+    String timestamp = group(TIMESTAMP_PATTERN, encryptedXml);
+    String nonce = group(NONCE_PATTERN, encryptedXml);
+    String signature = SHA1.gen(COMPONENT_TOKEN, timestamp, nonce, encrypt);
+
+    WxOpenXmlMessage message = WxOpenXmlMessage.fromEncryptedXml(encryptedXml, config, timestamp, nonce, signature);
+    assertNotNull(message);
+    assertEquals(message.getComponentVerifyTicket(), "ticket@@@abcdefg");
+    assertEquals(message.getContext(), VERIFY_TICKET_XML);
+
+    InputStream is = new ByteArrayInputStream(encryptedXml.getBytes(StandardCharsets.UTF_8));
+    WxOpenXmlMessage fromStream = WxOpenXmlMessage.fromEncryptedXml(is, config, timestamp, nonce, signature);
+    assertNotNull(fromStream);
+    assertEquals(fromStream.getInfoType(), "component_verify_ticket");
+  }
+}
diff --git a/weixin-java-open/src/test/java/me/chanjar/weixin/open/bean/result/WxFastMaCanSetCategoryResultTest.java b/weixin-java-open/src/test/java/me/chanjar/weixin/open/bean/result/WxFastMaCanSetCategoryResultTest.java
index 11ae649699..aa9f86722d 100644
--- a/weixin-java-open/src/test/java/me/chanjar/weixin/open/bean/result/WxFastMaCanSetCategoryResultTest.java
+++ b/weixin-java-open/src/test/java/me/chanjar/weixin/open/bean/result/WxFastMaCanSetCategoryResultTest.java
@@ -3,7 +3,9 @@
 import me.chanjar.weixin.open.util.json.WxOpenGsonBuilder;
 import org.testng.annotations.Test;
 
+import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertNotNull;
+import static org.testng.Assert.assertTrue;
 
 
 public class WxFastMaCanSetCategoryResultTest {
@@ -73,6 +75,10 @@ public void testFromJson() throws Exception {
 
     assertNotNull(res);
     assertNotNull(res.getCategoriesList());
+    assertEquals(res.getErrcode(), "0");
+    assertEquals(res.getErrmsg(), "ok");
+    assertEquals(res.getErrCode(), 0);
+    assertTrue(res.isSuccess());
     System.out.println(res);
   }
 
diff --git a/weixin-java-open/src/test/java/me/chanjar/weixin/open/util/WxOpenCryptUtilTest.java b/weixin-java-open/src/test/java/me/chanjar/weixin/open/util/WxOpenCryptUtilTest.java
new file mode 100644
index 0000000000..d6135d6044
--- /dev/null
+++ b/weixin-java-open/src/test/java/me/chanjar/weixin/open/util/WxOpenCryptUtilTest.java
@@ -0,0 +1,87 @@
+package me.chanjar.weixin.open.util;
+
+import me.chanjar.weixin.common.error.WxRuntimeException;
+import me.chanjar.weixin.common.util.crypto.SHA1;
+import me.chanjar.weixin.open.api.impl.WxOpenInMemoryConfigStorage;
+import org.testng.annotations.Test;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertNotNull;
+import static org.testng.Assert.assertTrue;
+import static org.testng.Assert.expectThrows;
+
+/**
+ * {@link WxOpenCryptUtil} 单元测试
+ */
+public class WxOpenCryptUtilTest {
+
+  private static final String COMPONENT_APP_ID = "wx0000000000000001";
+  private static final String COMPONENT_TOKEN = "test_component_token";
+  /** 43 位 EncodingAESKey 占位值,非真实密钥 */
+  private static final String COMPONENT_AES_KEY = "MDEyMzQ1Njc4OWFiY2RlZjAxMjM0NTY3ODlhYmNkZWY";
+
+  private static final Pattern ENCRYPT_PATTERN = Pattern.compile("");
+  private static final Pattern SIGNATURE_PATTERN =
+    Pattern.compile("");
+  private static final Pattern TIMESTAMP_PATTERN = Pattern.compile("(.*?)");
+  private static final Pattern NONCE_PATTERN = Pattern.compile("");
+
+  private WxOpenInMemoryConfigStorage config(String aesKey) {
+    WxOpenInMemoryConfigStorage config = new WxOpenInMemoryConfigStorage();
+    config.setComponentAppId(COMPONENT_APP_ID);
+    config.setComponentToken(COMPONENT_TOKEN);
+    config.setComponentAesKey(aesKey);
+    return config;
+  }
+
+  private String group(Pattern pattern, String text) {
+    Matcher matcher = pattern.matcher(text);
+    assertTrue(matcher.find(), "未匹配到期望的节点:" + pattern.pattern());
+    return matcher.group(1);
+  }
+
+  @Test
+  public void testEncryptThenDecrypt() {
+    WxOpenCryptUtil cryptUtil = new WxOpenCryptUtil(config(COMPONENT_AES_KEY));
+    String plainText = ""
+      + "";
+
+    String encryptedXml = cryptUtil.encrypt(plainText);
+    assertNotNull(encryptedXml);
+
+    String encrypt = group(ENCRYPT_PATTERN, encryptedXml);
+    String signature = group(SIGNATURE_PATTERN, encryptedXml);
+    String timestamp = group(TIMESTAMP_PATTERN, encryptedXml);
+    String nonce = group(NONCE_PATTERN, encryptedXml);
+
+    assertEquals(signature, SHA1.gen(COMPONENT_TOKEN, timestamp, nonce, encrypt));
+    assertEquals(cryptUtil.decryptXml(signature, timestamp, nonce, encryptedXml), plainText);
+    assertEquals(cryptUtil.decryptContent(signature, timestamp, nonce, encrypt), plainText);
+  }
+
+  @Test
+  public void testDecryptWithWrongSignature() {
+    WxOpenCryptUtil cryptUtil = new WxOpenCryptUtil(config(COMPONENT_AES_KEY));
+    String encryptedXml = cryptUtil.encrypt("");
+
+    String timestamp = group(TIMESTAMP_PATTERN, encryptedXml);
+    String nonce = group(NONCE_PATTERN, encryptedXml);
+
+    expectThrows(WxRuntimeException.class,
+      () -> cryptUtil.decryptXml("wrong_signature", timestamp, nonce, encryptedXml));
+  }
+
+  @Test
+  public void testAesKeyWithSpaces() {
+    String plainText = "";
+    WxOpenCryptUtil cryptUtil = new WxOpenCryptUtil(config(COMPONENT_AES_KEY));
+    WxOpenCryptUtil cryptUtilWithSpaces = new WxOpenCryptUtil(
+      config(" " + COMPONENT_AES_KEY.substring(0, 10) + " " + COMPONENT_AES_KEY.substring(10) + " "));
+
+    String randomStr = "1234567890123456";
+    assertEquals(cryptUtilWithSpaces.encrypt(randomStr, plainText), cryptUtil.encrypt(randomStr, plainText));
+  }
+}
diff --git a/weixin-java-open/src/test/java/me/chanjar/weixin/open/util/json/WxOpenGsonBuilderTest.java b/weixin-java-open/src/test/java/me/chanjar/weixin/open/util/json/WxOpenGsonBuilderTest.java
new file mode 100644
index 0000000000..c8ead8c09d
--- /dev/null
+++ b/weixin-java-open/src/test/java/me/chanjar/weixin/open/util/json/WxOpenGsonBuilderTest.java
@@ -0,0 +1,92 @@
+package me.chanjar.weixin.open.util.json;
+
+import com.google.gson.Gson;
+import me.chanjar.weixin.open.bean.WxOpenAuthorizerAccessToken;
+import me.chanjar.weixin.open.bean.WxOpenComponentAccessToken;
+import me.chanjar.weixin.open.bean.auth.WxOpenAuthorizationInfo;
+import me.chanjar.weixin.open.bean.result.WxOpenQueryAuthResult;
+import org.testng.annotations.Test;
+
+import java.util.Arrays;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertNotNull;
+import static org.testng.Assert.assertSame;
+import static org.testng.Assert.assertTrue;
+
+/**
+ * {@link WxOpenGsonBuilder} 及其注册的反序列化适配器单元测试
+ */
+public class WxOpenGsonBuilderTest {
+
+  @Test
+  public void testCreateReturnsSameInstance() {
+    assertSame(WxOpenGsonBuilder.create(), WxOpenGsonBuilder.create());
+  }
+
+  @Test
+  public void testComponentAccessToken() {
+    String json = "{\"component_access_token\":\"component_access_token_value\",\"expires_in\":7200}";
+    WxOpenComponentAccessToken token = WxOpenGsonBuilder.create().fromJson(json, WxOpenComponentAccessToken.class);
+    assertNotNull(token);
+    assertEquals(token.getComponentAccessToken(), "component_access_token_value");
+    assertEquals(token.getExpiresIn(), 7200);
+  }
+
+  @Test
+  public void testAuthorizerAccessToken() {
+    String json = "{\"authorizer_access_token\":\"access_token_value\","
+      + "\"authorizer_refresh_token\":\"refresh_token_value\",\"expires_in\":7200}";
+    WxOpenAuthorizerAccessToken token = WxOpenGsonBuilder.create().fromJson(json, WxOpenAuthorizerAccessToken.class);
+    assertNotNull(token);
+    assertEquals(token.getAuthorizerAccessToken(), "access_token_value");
+    assertEquals(token.getAuthorizerRefreshToken(), "refresh_token_value");
+    assertEquals(token.getExpiresIn(), 7200);
+  }
+
+  @Test
+  public void testAuthorizationInfo() {
+    String json = "{\"authorizer_appid\":\"wx0000000000000002\","
+      + "\"authorizer_access_token\":\"access_token_value\","
+      + "\"authorizer_refresh_token\":\"refresh_token_value\","
+      + "\"expires_in\":7200,"
+      + "\"func_info\":[{\"funcscope_category\":{\"id\":1}},{\"funcscope_category\":{\"id\":15}},{}]}";
+
+    WxOpenAuthorizationInfo info = WxOpenGsonBuilder.create().fromJson(json, WxOpenAuthorizationInfo.class);
+    assertNotNull(info);
+    assertEquals(info.getAuthorizerAppid(), "wx0000000000000002");
+    assertEquals(info.getAuthorizerAccessToken(), "access_token_value");
+    assertEquals(info.getAuthorizerRefreshToken(), "refresh_token_value");
+    assertEquals(info.getExpiresIn(), 7200);
+    assertEquals(info.getFuncInfo(), Arrays.asList(1, 15));
+  }
+
+  @Test
+  public void testAuthorizationInfoWithoutFuncInfo() {
+    WxOpenAuthorizationInfo info = WxOpenGsonBuilder.create()
+      .fromJson("{\"authorizer_appid\":\"wx0000000000000002\"}", WxOpenAuthorizationInfo.class);
+    assertNotNull(info);
+    assertNotNull(info.getFuncInfo());
+    assertTrue(info.getFuncInfo().isEmpty());
+  }
+
+  @Test
+  public void testQueryAuthResult() {
+    String json = "{\"authorization_info\":{\"authorizer_appid\":\"wx0000000000000002\","
+      + "\"authorizer_access_token\":\"access_token_value\",\"expires_in\":7200,"
+      + "\"authorizer_refresh_token\":\"refresh_token_value\","
+      + "\"func_info\":[{\"funcscope_category\":{\"id\":1}}]}}";
+
+    WxOpenQueryAuthResult result = WxOpenGsonBuilder.create().fromJson(json, WxOpenQueryAuthResult.class);
+    assertNotNull(result);
+    assertNotNull(result.getAuthorizationInfo());
+    assertEquals(result.getAuthorizationInfo().getAuthorizerAppid(), "wx0000000000000002");
+    assertEquals(result.getAuthorizationInfo().getFuncInfo(), Arrays.asList(1));
+  }
+
+  @Test
+  public void testHtmlEscapingDisabled() {
+    Gson gson = WxOpenGsonBuilder.create();
+    assertEquals(gson.toJson("a&b"), "\"a&b\"");
+  }
+}
diff --git a/weixin-java-open/src/test/resources/testng.xml b/weixin-java-open/src/test/resources/testng.xml
index 8ade76f3e3..4fc5e6b52e 100644
--- a/weixin-java-open/src/test/resources/testng.xml
+++ b/weixin-java-open/src/test/resources/testng.xml
@@ -8,4 +8,11 @@
       
     
   
+  
+    
+      
+      
+      
+    
+  
 

From dceeaf3b00d9bc4af185a4330d2effe44f81231d Mon Sep 17 00:00:00 2001
From: Binary Wang 
Date: Tue, 18 Aug 2026 15:12:04 +0800
Subject: [PATCH 13/31] =?UTF-8?q?:art:=20=E6=B6=88=E9=99=A4=E6=97=A7?=
 =?UTF-8?q?=E9=80=9A=E7=9F=A5=E5=A4=B4=E7=A9=BA=E5=80=BC=E9=87=8D=E8=BD=BD?=
 =?UTF-8?q?=E6=AD=A7=E4=B9=89?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../wxpay/bean/ecommerce/SignatureHeader.java | 124 +++++++++++++++---
 .../wxpay/bean/notify/SignatureHeader.java    |   4 +-
 .../LegacyEcommerceApiCompatibilityTest.java  |  63 ++++++++-
 3 files changed, 173 insertions(+), 18 deletions(-)

diff --git a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/SignatureHeader.java b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/SignatureHeader.java
index 9bf268278d..cbae860439 100644
--- a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/SignatureHeader.java
+++ b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/SignatureHeader.java
@@ -1,9 +1,9 @@
 package com.github.binarywang.wxpay.bean.ecommerce;
 
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Data;
-import lombok.NoArgsConstructor;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
 
 import java.io.Serializable;
 
@@ -13,30 +13,124 @@
  *
  * @author cloudX
  */
-@Data
-@Builder
-@NoArgsConstructor
-@AllArgsConstructor
 @Deprecated
-public class SignatureHeader implements Serializable {
+@Getter
+@Setter
+@EqualsAndHashCode(callSuper = false)
+@ToString(callSuper = false)
+public class SignatureHeader extends com.github.binarywang.wxpay.bean.notify.SignatureHeader implements Serializable {
   private static final long serialVersionUID = -6958015499416059949L;
+
+  /**
+   * 已签名字符串
+   */
+  private String signed;
+
+  /**
+   * 证书序列号
+   */
+  private String serialNo;
+
   /**
-   * 时间戳
+   * 保留在旧类中的序列化字段,避免升级后反序列化旧数据时丢失。
    */
   private String timeStamp;
 
   /**
-   * 随机串
+   * 保留在旧类中的序列化字段,避免升级后反序列化旧数据时丢失。
    */
   private String nonce;
 
+  public SignatureHeader() {
+    super();
+  }
+
   /**
-   * 已签名字符串
+   * 保留 4.8.4 及以前版本的构造器签名。
    */
-  private String signed;
+  public SignatureHeader(String timeStamp, String nonce, String signed, String serialNo) {
+    setTimeStamp(timeStamp);
+    setNonce(nonce);
+    this.signed = signed;
+    this.serialNo = serialNo;
+  }
+
+  private SignatureHeader(SignatureHeaderBuilder builder) {
+    super(builder);
+    this.timeStamp = builder.timeStamp;
+    this.nonce = builder.nonce;
+    this.signed = builder.signed;
+    this.serialNo = builder.serialNo;
+  }
+
+  @Override
+  public String getTimeStamp() {
+    return this.timeStamp;
+  }
+
+  @Override
+  public void setTimeStamp(String timeStamp) {
+    super.setTimeStamp(timeStamp);
+    this.timeStamp = timeStamp;
+  }
+
+  @Override
+  public String getNonce() {
+    return this.nonce;
+  }
+
+  @Override
+  public void setNonce(String nonce) {
+    super.setNonce(nonce);
+    this.nonce = nonce;
+  }
 
   /**
-   * 证书序列号
+   * 保留旧版 builder 的类型和方法返回值描述符。
    */
-  private String serialNo;
+  public static SignatureHeaderBuilder builder() {
+    return new SignatureHeaderBuilder();
+  }
+
+  public static class SignatureHeaderBuilder extends com.github.binarywang.wxpay.bean.notify.SignatureHeader
+    .SignatureHeaderBuilder {
+    private String timeStamp;
+    private String nonce;
+    private String signed;
+    private String serialNo;
+
+    @Override
+    public SignatureHeaderBuilder timeStamp(String timeStamp) {
+      super.timeStamp(timeStamp);
+      this.timeStamp = timeStamp;
+      return this;
+    }
+
+    @Override
+    public SignatureHeaderBuilder nonce(String nonce) {
+      super.nonce(nonce);
+      this.nonce = nonce;
+      return this;
+    }
+
+    public SignatureHeaderBuilder signed(String signed) {
+      this.signed = signed;
+      return this;
+    }
+
+    public SignatureHeaderBuilder serialNo(String serialNo) {
+      this.serialNo = serialNo;
+      return this;
+    }
+
+    @Override
+    protected SignatureHeaderBuilder self() {
+      return this;
+    }
+
+    @Override
+    public SignatureHeader build() {
+      return new SignatureHeader(this);
+    }
+  }
 }
diff --git a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/notify/SignatureHeader.java b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/notify/SignatureHeader.java
index cd1fbc42dc..1381759fd9 100644
--- a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/notify/SignatureHeader.java
+++ b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/notify/SignatureHeader.java
@@ -1,9 +1,9 @@
 package com.github.binarywang.wxpay.bean.notify;
 
 import lombok.AllArgsConstructor;
-import lombok.Builder;
 import lombok.Data;
 import lombok.NoArgsConstructor;
+import lombok.experimental.SuperBuilder;
 
 import java.io.Serializable;
 
@@ -14,7 +14,7 @@
  * @author thinstar
  */
 @Data
-@Builder
+@SuperBuilder
 @NoArgsConstructor
 @AllArgsConstructor
 public class SignatureHeader implements Serializable {
diff --git a/weixin-java-pay/src/test/java/com/github/binarywang/wxpay/service/LegacyEcommerceApiCompatibilityTest.java b/weixin-java-pay/src/test/java/com/github/binarywang/wxpay/service/LegacyEcommerceApiCompatibilityTest.java
index a82dadb76d..21f371d124 100644
--- a/weixin-java-pay/src/test/java/com/github/binarywang/wxpay/service/LegacyEcommerceApiCompatibilityTest.java
+++ b/weixin-java-pay/src/test/java/com/github/binarywang/wxpay/service/LegacyEcommerceApiCompatibilityTest.java
@@ -5,8 +5,12 @@
 import org.testng.Assert;
 import org.testng.annotations.Test;
 
+import java.io.ByteArrayInputStream;
+import java.io.ObjectInputStream;
+import java.util.Base64;
+
 /**
- * Compile-time compatibility checks for the pre-#4014 e-commerce API.
+ * Compatibility checks for the pre-#4014 e-commerce API.
  */
 public class LegacyEcommerceApiCompatibilityTest {
 
@@ -25,4 +29,61 @@ public void shouldKeepLegacyRefundAndWithdrawNotificationSignatures() throws Exc
     Assert.assertNotNull(EcommerceService.class.getMethod("parseRefundNotifyResult", String.class, legacyHeader));
     Assert.assertNotNull(EcommerceService.class.getMethod("parseWithdrawNotifyResult", String.class, legacyHeader));
   }
+
+  @Test
+  public void shouldKeepLegacySignatureHeaderConstructorAndBuilderAbi() throws Exception {
+    com.github.binarywang.wxpay.bean.ecommerce.SignatureHeader legacyHeader =
+      com.github.binarywang.wxpay.bean.ecommerce.SignatureHeader.builder()
+        .timeStamp("timestamp")
+        .nonce("nonce")
+        .signed("signed")
+        .serialNo("serial-no")
+        .build();
+
+    Assert.assertNotNull(com.github.binarywang.wxpay.bean.ecommerce.SignatureHeader.class.getConstructor(
+      String.class, String.class, String.class, String.class));
+    Assert.assertEquals(com.github.binarywang.wxpay.bean.ecommerce.SignatureHeader.SignatureHeaderBuilder.class,
+      com.github.binarywang.wxpay.bean.ecommerce.SignatureHeader.SignatureHeaderBuilder.class
+        .getMethod("timeStamp", String.class).getReturnType());
+    Assert.assertEquals(com.github.binarywang.wxpay.bean.ecommerce.SignatureHeader.SignatureHeaderBuilder.class,
+      com.github.binarywang.wxpay.bean.ecommerce.SignatureHeader.SignatureHeaderBuilder.class
+        .getMethod("nonce", String.class).getReturnType());
+    Assert.assertTrue(com.github.binarywang.wxpay.bean.notify.SignatureHeader.class
+      .isAssignableFrom(legacyHeader.getClass()));
+    com.github.binarywang.wxpay.bean.notify.SignatureHeader unifiedHeader =
+      EcommerceService.toUnifiedSignatureHeader(legacyHeader);
+    Assert.assertEquals(unifiedHeader.getTimeStamp(), "timestamp");
+    Assert.assertEquals(unifiedHeader.getNonce(), "nonce");
+    Assert.assertEquals(unifiedHeader.getSignature(), "signed");
+    Assert.assertEquals(unifiedHeader.getSerial(), "serial-no");
+  }
+
+  @Test
+  public void shouldIncludeTimestampAndNonceInLegacyHeaderEquality() {
+    com.github.binarywang.wxpay.bean.ecommerce.SignatureHeader first =
+      new com.github.binarywang.wxpay.bean.ecommerce.SignatureHeader("timestamp-1", "nonce", "signed", "serial-no");
+    com.github.binarywang.wxpay.bean.ecommerce.SignatureHeader second =
+      new com.github.binarywang.wxpay.bean.ecommerce.SignatureHeader("timestamp-2", "nonce", "signed", "serial-no");
+
+    Assert.assertNotEquals(first, second);
+  }
+
+  @Test
+  public void shouldReadLegacySerializedHeaderFields() throws Exception {
+    String legacySerializedHeader = "rO0ABXNyADpjb20uZ2l0aHViLmJpbmFyeXdhbmcud3hwYXkuYmVhbi5lY29tbWVyY2UuU2lnbmF0dXJlSGVhZGVyn3ApxLekv9MCAARMAAVub25jZXQAEkxqYXZhL2xhbmcvU3RyaW5nO0wACHNlcmlhbE5vcQB+AAFMAAZzaWduZWRxAH4AAUwACXRpbWVTdGFtcHEAfgABeHB0AAVub25jZXQACXNlcmlhbC1ub3QABnNpZ25lZHQACXRpbWVzdGFtcA==";
+    ObjectInputStream input = new ObjectInputStream(new ByteArrayInputStream(
+      Base64.getDecoder().decode(legacySerializedHeader)));
+    com.github.binarywang.wxpay.bean.ecommerce.SignatureHeader header =
+      (com.github.binarywang.wxpay.bean.ecommerce.SignatureHeader) input.readObject();
+
+    Assert.assertEquals(header.getTimeStamp(), "timestamp");
+    Assert.assertEquals(header.getNonce(), "nonce");
+    Assert.assertEquals(header.getSigned(), "signed");
+    Assert.assertEquals(header.getSerialNo(), "serial-no");
+  }
+
+  private void shouldCompileNullNotificationHeaderCalls(EcommerceService ecommerceService) throws Exception {
+    ecommerceService.parseRefundNotifyResult("notify-data", null);
+    ecommerceService.parseWithdrawNotifyResult("notify-data", null);
+  }
 }

From ade05b7c74159ede3a015af446d3b96594b28a1c Mon Sep 17 00:00:00 2001
From: Binary Wang 
Date: Sat, 22 Aug 2026 11:57:44 +0800
Subject: [PATCH 14/31] =?UTF-8?q?:art:=20#4100=20=E3=80=90=E4=BC=81?=
 =?UTF-8?q?=E4=B8=9A=E5=BE=AE=E4=BF=A1=E3=80=91=E6=94=AF=E6=8C=81=E6=99=BA?=
 =?UTF-8?q?=E8=83=BD=E6=9C=BA=E5=99=A8=E4=BA=BA=20API=20=E6=A8=A1=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 weixin-java-cp/INTELLIGENT_ROBOT.md           | 54 ++++++------
 .../cp/api/WxCpIntelligentRobotService.java   | 36 ++++++++
 .../cp/api/impl/BaseWxCpServiceImpl.java      | 12 ++-
 .../impl/WxCpIntelligentRobotServiceImpl.java | 16 ++++
 .../crypto/WxCpIntelligentRobotCryptUtil.java | 88 +++++++++++++++++++
 .../api/impl/BaseWxCpServiceImplLogTest.java  | 19 ++++
 ...xCpIntelligentRobotApiModeServiceTest.java | 57 ++++++++++++
 .../WxCpIntelligentRobotCryptUtilTest.java    | 40 +++++++++
 weixin-java-cp/src/test/resources/testng.xml  |  3 +
 9 files changed, 294 insertions(+), 31 deletions(-)
 create mode 100644 weixin-java-cp/src/main/java/me/chanjar/weixin/cp/util/crypto/WxCpIntelligentRobotCryptUtil.java
 create mode 100644 weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/BaseWxCpServiceImplLogTest.java
 create mode 100644 weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpIntelligentRobotApiModeServiceTest.java
 create mode 100644 weixin-java-cp/src/test/java/me/chanjar/weixin/cp/util/crypto/WxCpIntelligentRobotCryptUtilTest.java

diff --git a/weixin-java-cp/INTELLIGENT_ROBOT.md b/weixin-java-cp/INTELLIGENT_ROBOT.md
index 18dd0c677f..0fbe205f1a 100644
--- a/weixin-java-cp/INTELLIGENT_ROBOT.md
+++ b/weixin-java-cp/INTELLIGENT_ROBOT.md
@@ -1,6 +1,9 @@
 # 企业微信智能机器人接口
 
-本模块提供企业微信智能机器人相关的API接口实现。
+本模块提供企业微信智能机器人相关的 API 接口实现。
+
+> `createRobot`、`chat`、`sendMessage` 等既有方法走企业应用 `access_token` 接口,
+> 需要在 `WxCpConfigStorage` 中配置应用 `agentId` 和 `secret`。它们不适用于机器人后台创建的新版 API 模式。
 
 ## 官方文档
 
@@ -73,7 +76,7 @@ String sessionId = "session123";
 robotService.resetSession(robotId, userid, sessionId);
 ```
 
-### 主动发送消息
+### 旧版 access_token 主动发送消息
 
 智能机器人可以主动向用户发送消息,用于推送通知或提醒。
 
@@ -89,34 +92,29 @@ String msgId = response.getMsgId();
 String sessionId = response.getSessionId();
 ```
 
-### 接收用户消息
+### 新版 API 模式:接收回调与回复消息
 
-当用户向智能机器人发送消息时,企业微信会通过回调接口推送消息。可以使用 `WxCpXmlMessage` 接收和解析这些消息:
+在机器人后台开启 API 模式后,配置 URL、Token、EncodingAESKey。企业微信会推送加密 JSON 回调;
+它不是 XML,也不需要企业应用 `secret`。从请求参数取得 `msg_signature`、`timestamp`、`nonce`,
+从请求体取得 `encrypt` 字段后,可以直接解密和解析:
 
 ```java
-// 在接收回调消息的接口中
-WxCpXmlMessage message = WxCpXmlMessage.fromEncryptedXml(
-    requestBody, wxCpConfigStorage, timestamp, nonce, msgSignature
-);
-
-// 获取智能机器人相关字段
-String robotId = message.getRobotId();        // 机器人ID
-String sessionId = message.getSessionId();    // 会话ID
-String content = message.getContent();         // 消息内容
-String fromUser = message.getFromUserName();   // 发送用户
-
-// 处理消息并回复
-// ...
+WxCpIntelligentRobotMessage callbackMessage =
+    robotService.parseEncryptedCallbackMessage(
+        msgSignature, timestamp, nonce, encryptedJson,
+        token, encodingAesKey, aiBotId);
+
+String responseUrl = callbackMessage.getResponseUrl();
+String content = callbackMessage.getText().getContent();
 ```
 
-对于智能机器人 API 模式的 JSON 回调消息,可使用 `WxCpIntelligentRobotMessage` 解析:
+回复时使用回调中的短期 `response_url`,不调用基于 `access_token` 的 `sendMessage`:
 
 ```java
-WxCpIntelligentRobotMessage callbackMessage =
-    robotService.parseCallbackMessage(jsonBody);
-String botId = callbackMessage.getAiBotId();
-String userId = callbackMessage.getFrom().getUserid();
-String msgType = callbackMessage.getMsgType();
+String replyJson = "{\"msgtype\":\"text\",\"text\":{\"content\":\"您好\"}}";
+robotService.replyMessage(
+    responseUrl, replyJson, token, encodingAesKey, aiBotId,
+    String.valueOf(System.currentTimeMillis() / 1000), java.util.UUID.randomUUID().toString());
 ```
 
 ### 删除智能机器人
@@ -144,7 +142,8 @@ robotService.deleteRobot(robotId);
 
 ### 消息接收
 
-- `WxCpXmlMessage`: 支持接收智能机器人回调消息,包含 `robotId` 和 `sessionId` 字段
+- `WxCpIntelligentRobotMessage`: 智能机器人 API 模式的已解密 JSON 回调消息
+- `WxCpIntelligentRobotCryptUtil`: 智能机器人 API 模式的消息加解密工具
 
 ### 服务接口
 
@@ -153,7 +152,6 @@ robotService.deleteRobot(robotId);
 
 ## 注意事项
 
-1. 需要确保企业微信应用具有智能机器人相关权限
-2. 智能机器人功能可能需要特定的企业微信版本支持
-3. 会话ID可以用于保持对话的连续性,提升用户体验
-4. 机器人状态: 0表示停用,1表示启用
+1. 新版 API 模式的 Token、EncodingAESKey 和机器人 ID 由机器人后台配置,不要填写企业应用 secret。
+2. `response_url` 是回调附带的临时地址,应及时使用,且不应持久化。
+3. `parseCallbackMessage` 仅用于已解密的 JSON;HTTP 回调入口应使用 `parseEncryptedCallbackMessage`。
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpIntelligentRobotService.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpIntelligentRobotService.java
index 58f4373ceb..1d71bac99a 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpIntelligentRobotService.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpIntelligentRobotService.java
@@ -82,4 +82,40 @@ public interface WxCpIntelligentRobotService {
    */
   WxCpIntelligentRobotMessage parseCallbackMessage(String callbackMessageJson);
 
+  /**
+   * 解密并解析智能机器人 API 模式回调消息.
+   *
+   * @param msgSignature   回调 URL 参数中的签名
+   * @param timestamp      回调 URL 参数中的时间戳
+   * @param nonce          回调 URL 参数中的随机串
+   * @param encryptedJson  回调 JSON 信封中的 encrypt 字段
+   * @param token          机器人后台配置的 Token
+   * @param encodingAesKey 机器人后台配置的 EncodingAESKey
+   * @param aiBotId        机器人 ID
+   * @return 解密并解析后的回调消息
+   */
+  default WxCpIntelligentRobotMessage parseEncryptedCallbackMessage(String msgSignature, String timestamp, String nonce,
+                                                                     String encryptedJson, String token, String encodingAesKey,
+                                                                     String aiBotId) {
+    throw new UnsupportedOperationException("当前智能机器人服务不支持 API 模式回调解析");
+  }
+
+  /**
+   * 加密并向智能机器人 API 模式的临时 response_url 回复消息.
+   *
+   * @param responseUrl    回调消息中的 response_url
+   * @param plainJson      回复的明文 JSON
+   * @param token          机器人后台配置的 Token
+   * @param encodingAesKey 机器人后台配置的 EncodingAESKey
+   * @param aiBotId        机器人 ID
+   * @param timestamp      回复时间戳
+   * @param nonce          回复随机串
+   * @return 企业微信响应内容
+   * @throws WxErrorException 微信接口异常
+   */
+  default String replyMessage(String responseUrl, String plainJson, String token, String encodingAesKey, String aiBotId,
+                              String timestamp, String nonce) throws WxErrorException {
+    throw new UnsupportedOperationException("当前智能机器人服务不支持 API 模式消息回复");
+  }
+
 }
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/BaseWxCpServiceImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/BaseWxCpServiceImpl.java
index e351e58444..eb8abd773f 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/BaseWxCpServiceImpl.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/BaseWxCpServiceImpl.java
@@ -430,23 +430,29 @@ protected  T executeInternal(RequestExecutor executor, String uri, E
    * 普通请求,不自动带accessToken
    */
   private  T executeNormal(RequestExecutor executor, String uri, E data) throws WxErrorException {
+    String uriForLog = redactQueryString(uri);
     try {
       T result = executor.execute(uri, data, WxType.CP);
-      log.debug("\n【请求地址】: {}\n【请求参数】:{}\n【响应数据】:{}", uri, data, result);
+      log.debug("\n【请求地址】: {}\n【请求参数】:{}\n【响应数据】:{}", uriForLog, data, result);
       return result;
     } catch (WxErrorException e) {
       WxError error = e.getError();
       if (error.getErrorCode() != 0) {
-        log.error("\n【请求地址】: {}\n【请求参数】:{}\n【错误信息】:{}", uri, data, error);
+        log.error("\n【请求地址】: {}\n【请求参数】:{}\n【错误信息】:{}", uriForLog, data, error);
         throw new WxErrorException(error, e);
       }
       return null;
     } catch (IOException e) {
-      log.error("\n【请求地址】: {}\n【请求参数】:{}\n【异常信息】:{}", uri, data, e.getMessage());
+      log.error("\n【请求地址】: {}\n【请求参数】:{}\n【异常信息】:{}", uriForLog, data, e.getMessage());
       throw new WxErrorException(e);
     }
   }
 
+  static String redactQueryString(String uri) {
+    int queryStart = uri.indexOf('?');
+    return queryStart < 0 ? uri : uri.substring(0, queryStart) + "?******";
+  }
+
   @Override
   public void setWxCpConfigStorage(WxCpConfigStorage wxConfigProvider) {
     this.configStorage = wxConfigProvider;
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpIntelligentRobotServiceImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpIntelligentRobotServiceImpl.java
index aba1ee85c4..a5ccdca5e1 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpIntelligentRobotServiceImpl.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpIntelligentRobotServiceImpl.java
@@ -6,6 +6,7 @@
 import me.chanjar.weixin.cp.api.WxCpIntelligentRobotService;
 import me.chanjar.weixin.cp.api.WxCpService;
 import me.chanjar.weixin.cp.bean.intelligentrobot.*;
+import me.chanjar.weixin.cp.util.crypto.WxCpIntelligentRobotCryptUtil;
 import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
 
 import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.IntelligentRobot.*;
@@ -72,4 +73,19 @@ public WxCpIntelligentRobotMessage parseCallbackMessage(String callbackMessageJs
     return WxCpIntelligentRobotMessage.fromJson(callbackMessageJson);
   }
 
+  @Override
+  public WxCpIntelligentRobotMessage parseEncryptedCallbackMessage(String msgSignature, String timestamp, String nonce,
+                                                                    String encryptedJson, String token,
+                                                                    String encodingAesKey, String aiBotId) {
+    WxCpIntelligentRobotCryptUtil cryptUtil = new WxCpIntelligentRobotCryptUtil(token, encodingAesKey, aiBotId);
+    return parseCallbackMessage(cryptUtil.decrypt(msgSignature, timestamp, nonce, encryptedJson));
+  }
+
+  @Override
+  public String replyMessage(String responseUrl, String plainJson, String token, String encodingAesKey,
+                             String aiBotId, String timestamp, String nonce) throws WxErrorException {
+    WxCpIntelligentRobotCryptUtil cryptUtil = new WxCpIntelligentRobotCryptUtil(token, encodingAesKey, aiBotId);
+    return this.cpService.postWithoutToken(responseUrl, cryptUtil.encrypt(plainJson, timestamp, nonce));
+  }
+
 }
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/util/crypto/WxCpIntelligentRobotCryptUtil.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/util/crypto/WxCpIntelligentRobotCryptUtil.java
new file mode 100644
index 0000000000..512c3073c6
--- /dev/null
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/util/crypto/WxCpIntelligentRobotCryptUtil.java
@@ -0,0 +1,88 @@
+package me.chanjar.weixin.cp.util.crypto;
+
+import com.google.gson.JsonObject;
+import me.chanjar.weixin.common.util.crypto.SHA1;
+import me.chanjar.weixin.common.util.crypto.WxCryptUtil;
+import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
+import me.chanjar.weixin.common.error.WxRuntimeException;
+import org.apache.commons.codec.binary.Base64;
+
+import javax.crypto.Cipher;
+import javax.crypto.spec.IvParameterSpec;
+import javax.crypto.spec.SecretKeySpec;
+import java.nio.charset.StandardCharsets;
+import java.util.Arrays;
+import java.util.UUID;
+
+/**
+ * 企业微信智能机器人 API 模式消息加解密工具.
+ *
+ * 

机器人 API 模式使用机器人后台配置的 Token、EncodingAESKey 和机器人 ID, + * 与企业应用 access_token 无关。

+ */ +public class WxCpIntelligentRobotCryptUtil extends WxCryptUtil { + + public WxCpIntelligentRobotCryptUtil(String token, String encodingAesKey, String aiBotId) { + super(token, encodingAesKey, aiBotId); + } + + /** + * 解密机器人 API 模式的 JSON 回调消息. + */ + public String decrypt(String msgSignature, String timestamp, String nonce, String encryptedContent) { + String signature = SHA1.gen(this.token, timestamp, nonce, encryptedContent); + if (!signature.equals(msgSignature)) { + throw new WxRuntimeException("加密消息签名校验失败"); + } + + try { + Cipher cipher = Cipher.getInstance("AES/CBC/NoPadding"); + cipher.init(Cipher.DECRYPT_MODE, new SecretKeySpec(this.aesKey, "AES"), + new IvParameterSpec(Arrays.copyOfRange(this.aesKey, 0, 16))); + byte[] bytes = me.chanjar.weixin.common.util.crypto.PKCS7Encoder.decode( + cipher.doFinal(Base64.decodeBase64(encryptedContent))); + if (bytes.length < 20) { + throw new WxRuntimeException("解密后数据长度异常,可能为错误的密文或EncodingAESKey"); + } + + int plainTextLength = 0; + for (int index = 16; index < 20; index++) { + plainTextLength = (plainTextLength << 8) | (bytes[index] & 0xff); + } + int plainTextEnd = 20 + plainTextLength; + if (plainTextLength < 0 || plainTextEnd > bytes.length) { + throw new WxRuntimeException("解密后数据格式非法:消息长度不正确,可能为错误的密文或EncodingAESKey"); + } + + String receiverId = new String(Arrays.copyOfRange(bytes, plainTextEnd, bytes.length), StandardCharsets.UTF_8); + if (!this.appidOrCorpid.equals(receiverId)) { + throw new WxRuntimeException("智能机器人ID不正确,请核实!"); + } + return new String(Arrays.copyOfRange(bytes, 20, plainTextEnd), StandardCharsets.UTF_8); + } catch (WxRuntimeException e) { + throw e; + } catch (Exception e) { + throw new WxRuntimeException(e); + } + } + + /** + * 加密机器人 API 模式的 JSON 回复消息. + */ + public String encrypt(String plainJson, String timestamp, String nonce) { + String encryptedContent = encrypt(UUID.randomUUID().toString().replace("-", "").substring(0, 16), plainJson); + JsonObject result = new JsonObject(); + result.addProperty("encrypt", encryptedContent); + result.addProperty("msg_signature", SHA1.gen(this.token, timestamp, nonce, encryptedContent)); + result.addProperty("timestamp", timestamp); + result.addProperty("nonce", nonce); + return WxCpGsonBuilder.create().toJson(result); + } + + /** + * 解密 URL 校验请求中的 echostr. + */ + public String verifyUrl(String msgSignature, String timestamp, String nonce, String echoStr) { + return decrypt(msgSignature, timestamp, nonce, echoStr); + } +} diff --git a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/BaseWxCpServiceImplLogTest.java b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/BaseWxCpServiceImplLogTest.java new file mode 100644 index 0000000000..2164cbeacd --- /dev/null +++ b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/BaseWxCpServiceImplLogTest.java @@ -0,0 +1,19 @@ +package me.chanjar.weixin.cp.api.impl; + +import org.testng.annotations.Test; + +import static org.testng.Assert.assertEquals; + +public class BaseWxCpServiceImplLogTest { + + @Test + public void redactQueryStringShouldHideTemporaryResponseUrlCredentials() { + assertEquals(BaseWxCpServiceImpl.redactQueryString("https://example.com/reply?token=temporary-secret&nonce=123"), + "https://example.com/reply?******"); + } + + @Test + public void redactQueryStringShouldKeepUrlWithoutQueryString() { + assertEquals(BaseWxCpServiceImpl.redactQueryString("https://example.com/reply"), "https://example.com/reply"); + } +} diff --git a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpIntelligentRobotApiModeServiceTest.java b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpIntelligentRobotApiModeServiceTest.java new file mode 100644 index 0000000000..67ade67f1c --- /dev/null +++ b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpIntelligentRobotApiModeServiceTest.java @@ -0,0 +1,57 @@ +package me.chanjar.weixin.cp.api.impl; + +import com.google.gson.JsonObject; +import me.chanjar.weixin.common.util.json.GsonParser; +import me.chanjar.weixin.cp.api.WxCpService; +import me.chanjar.weixin.cp.bean.intelligentrobot.WxCpIntelligentRobotMessage; +import me.chanjar.weixin.cp.util.crypto.WxCpIntelligentRobotCryptUtil; +import org.mockito.ArgumentCaptor; +import org.testng.annotations.Test; + +import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; +import static org.testng.Assert.assertEquals; + +public class WxCpIntelligentRobotApiModeServiceTest { + private static final String TOKEN = "test-token"; + private static final String AES_KEY = "abcdefghijklmnopqrstuvwxyz0123456789ABCDEFA"; + private static final String AI_BOT_ID = "bot_1"; + private static final String TIMESTAMP = "1710000000"; + private static final String NONCE = "test-nonce"; + + @Test + public void shouldParseEncryptedCallbackMessage() { + String callbackJson = "{\"msgid\":\"msg_1\",\"aibotid\":\"bot_1\",\"msgtype\":\"text\"," + + "\"from\":{\"userid\":\"user_1\"},\"text\":{\"content\":\"hello\"}}"; + WxCpIntelligentRobotCryptUtil cryptUtil = new WxCpIntelligentRobotCryptUtil(TOKEN, AES_KEY, AI_BOT_ID); + JsonObject encrypted = GsonParser.parse(cryptUtil.encrypt(callbackJson, TIMESTAMP, NONCE)); + WxCpIntelligentRobotServiceImpl service = new WxCpIntelligentRobotServiceImpl(mock(WxCpService.class)); + + WxCpIntelligentRobotMessage message = service.parseEncryptedCallbackMessage( + encrypted.get("msg_signature").getAsString(), TIMESTAMP, NONCE, encrypted.get("encrypt").getAsString(), + TOKEN, AES_KEY, AI_BOT_ID); + + assertEquals(message.getMsgId(), "msg_1"); + assertEquals(message.getText().getContent(), "hello"); + } + + @Test + public void shouldReplyThroughResponseUrlWithoutAccessToken() throws Exception { + WxCpService cpService = mock(WxCpService.class); + when(cpService.postWithoutToken(anyString(), anyString())).thenReturn("ok"); + WxCpIntelligentRobotServiceImpl service = new WxCpIntelligentRobotServiceImpl(cpService); + String responseUrl = "https://example.com/response"; + String plainJson = "{\"msgtype\":\"text\"}"; + + assertEquals(service.replyMessage(responseUrl, plainJson, TOKEN, AES_KEY, AI_BOT_ID, TIMESTAMP, NONCE), "ok"); + + ArgumentCaptor bodyCaptor = ArgumentCaptor.forClass(String.class); + verify(cpService).postWithoutToken(org.mockito.ArgumentMatchers.eq(responseUrl), bodyCaptor.capture()); + JsonObject encrypted = GsonParser.parse(bodyCaptor.getValue()); + WxCpIntelligentRobotCryptUtil cryptUtil = new WxCpIntelligentRobotCryptUtil(TOKEN, AES_KEY, AI_BOT_ID); + assertEquals(cryptUtil.decrypt(encrypted.get("msg_signature").getAsString(), TIMESTAMP, NONCE, + encrypted.get("encrypt").getAsString()), plainJson); + } +} diff --git a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/util/crypto/WxCpIntelligentRobotCryptUtilTest.java b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/util/crypto/WxCpIntelligentRobotCryptUtilTest.java new file mode 100644 index 0000000000..f1e6123fab --- /dev/null +++ b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/util/crypto/WxCpIntelligentRobotCryptUtilTest.java @@ -0,0 +1,40 @@ +package me.chanjar.weixin.cp.util.crypto; + +import com.google.gson.JsonObject; +import me.chanjar.weixin.common.util.json.GsonParser; +import me.chanjar.weixin.common.error.WxRuntimeException; +import org.testng.annotations.Test; + +import static org.testng.Assert.assertEquals; + +public class WxCpIntelligentRobotCryptUtilTest { + private static final String TOKEN = "test-token"; + private static final String AES_KEY = "abcdefghijklmnopqrstuvwxyz0123456789ABCDEFA"; + private static final String AI_BOT_ID = "aibot-123"; + private static final String TIMESTAMP = "1710000000"; + private static final String NONCE = "test-nonce"; + + @Test + public void encryptShouldProduceDecryptableJsonEnvelope() { + WxCpIntelligentRobotCryptUtil cryptUtil = new WxCpIntelligentRobotCryptUtil(TOKEN, AES_KEY, AI_BOT_ID); + String plainJson = "{\"msgtype\":\"text\",\"text\":{\"content\":\"hello\"}}"; + + JsonObject encrypted = GsonParser.parse(cryptUtil.encrypt(plainJson, TIMESTAMP, NONCE)); + + assertEquals(encrypted.get("timestamp").getAsString(), TIMESTAMP); + assertEquals(encrypted.get("nonce").getAsString(), NONCE); + assertEquals(cryptUtil.decrypt(encrypted.get("msg_signature").getAsString(), TIMESTAMP, NONCE, + encrypted.get("encrypt").getAsString()), plainJson); + } + + @Test(expectedExceptions = WxRuntimeException.class) + public void decryptShouldRejectMessageForAnotherRobot() { + String plainJson = "{\"msgtype\":\"text\"}"; + WxCpIntelligentRobotCryptUtil source = new WxCpIntelligentRobotCryptUtil(TOKEN, AES_KEY, AI_BOT_ID); + JsonObject encrypted = GsonParser.parse(source.encrypt(plainJson, TIMESTAMP, NONCE)); + WxCpIntelligentRobotCryptUtil otherRobot = new WxCpIntelligentRobotCryptUtil(TOKEN, AES_KEY, "aibot-456"); + + otherRobot.decrypt(encrypted.get("msg_signature").getAsString(), TIMESTAMP, NONCE, + encrypted.get("encrypt").getAsString()); + } +} diff --git a/weixin-java-cp/src/test/resources/testng.xml b/weixin-java-cp/src/test/resources/testng.xml index cb3b8362e8..a8f5713235 100644 --- a/weixin-java-cp/src/test/resources/testng.xml +++ b/weixin-java-cp/src/test/resources/testng.xml @@ -12,6 +12,8 @@ + + @@ -25,6 +27,7 @@ + From 779538763a32a32c248db07ea6f2147df07d90e4 Mon Sep 17 00:00:00 2001 From: Binary Wang Date: Sat, 22 Aug 2026 18:33:20 +0800 Subject: [PATCH 15/31] =?UTF-8?q?:new:=20#4106=20=E3=80=90=E8=A7=86?= =?UTF-8?q?=E9=A2=91=E5=8F=B7=E3=80=91=E6=94=AF=E6=8C=81=E5=94=AE=E5=90=8E?= =?UTF-8?q?=E4=BF=9D=E9=9A=9C=E5=8D=95=E7=9B=B8=E5=85=B3=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 + weixin-java-channel/pom.xml | 5 + .../api/WxChannelAfterSaleService.java | 72 ++++++++ .../impl/WxChannelAfterSaleServiceImpl.java | 38 ++++ .../bean/after/GuaranteeModifyRequest.java | 34 ++++ .../bean/after/GuaranteeOrderIdParam.java | 25 +++ .../after/GuaranteeOrderInfoResponse.java | 59 +++++++ .../bean/after/GuaranteeOrderListParam.java | 44 +++++ .../after/GuaranteeOrderListResponse.java | 64 +++++++ .../bean/after/GuaranteeProofRequest.java | 35 ++++ .../bean/after/GuaranteeRefuseRequest.java | 35 ++++ .../constant/WxChannelApiUrlConstants.java | 12 ++ ...nnelAfterSaleServiceImplGuaranteeTest.java | 163 ++++++++++++++++++ 13 files changed, 589 insertions(+) create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeModifyRequest.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderIdParam.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderInfoResponse.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderListParam.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderListResponse.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeProofRequest.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeRefuseRequest.java create mode 100644 weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelAfterSaleServiceImplGuaranteeTest.java diff --git a/.gitignore b/.gitignore index 6b88025471..34150b7b36 100644 --- a/.gitignore +++ b/.gitignore @@ -55,3 +55,6 @@ sonar-project.properties .factorypath *.zip .worktrees + +# Local Superpowers working documents; do not commit. +/docs/superpowers/ diff --git a/weixin-java-channel/pom.xml b/weixin-java-channel/pom.xml index 86d398b173..10417674f6 100644 --- a/weixin-java-channel/pom.xml +++ b/weixin-java-channel/pom.xml @@ -84,6 +84,11 @@ testng test + + org.mockito + mockito-core + test + ch.qos.logback logback-classic diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelAfterSaleService.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelAfterSaleService.java index b8d1156b66..89d3c169be 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelAfterSaleService.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelAfterSaleService.java @@ -199,4 +199,76 @@ WxChannelBaseResponse addComplaintEvidence(String complaintId, String content, L * @throws WxErrorException 异常 */ WxChannelBaseResponse merchantUpdateAfterSale(AfterSaleMerchantUpdateParam param) throws WxErrorException; + + /** + * 获取保障单列表。 + * 文档地址:https://developers.weixin.qq.com/doc/channels/API/channels-shop-aftersale/guarantee/api_searchguaranteeorder + * + * @param param 查询参数 + * @return 保障单列表 + * @throws WxErrorException 异常 + */ + default GuaranteeOrderListResponse listGuaranteeOrder(GuaranteeOrderListParam param) throws WxErrorException { + throw new UnsupportedOperationException(); + } + + /** + * 获取保障单详情。 + * 文档地址:https://developers.weixin.qq.com/doc/channels/API/channels-shop-aftersale/guarantee/api_getguaranteeorder + * + * @param guaranteeOrderId 保障单号 + * @return 保障单详情 + * @throws WxErrorException 异常 + */ + default GuaranteeOrderInfoResponse getGuaranteeOrder(String guaranteeOrderId) throws WxErrorException { + throw new UnsupportedOperationException(); + } + + /** + * 同意保障单申请。 + * 文档地址:https://developers.weixin.qq.com/doc/channels/API/channels-shop-aftersale/guarantee/api_merchantacceptguarantee + * + * @param guaranteeOrderId 保障单号 + * @return 响应结果 + * @throws WxErrorException 异常 + */ + default WxChannelBaseResponse acceptGuarantee(String guaranteeOrderId) throws WxErrorException { + throw new UnsupportedOperationException(); + } + + /** + * 商家协商保障单。 + * 文档地址:https://developers.weixin.qq.com/doc/channels/API/channels-shop-aftersale/guarantee/api_merchantmodifyguarantee + * + * @param request 协商参数 + * @return 响应结果 + * @throws WxErrorException 异常 + */ + default WxChannelBaseResponse modifyGuarantee(GuaranteeModifyRequest request) throws WxErrorException { + throw new UnsupportedOperationException(); + } + + /** + * 商家举证保障单。 + * 文档地址:https://developers.weixin.qq.com/doc/channels/API/channels-shop-aftersale/guarantee/api_merchantproofguarantee + * + * @param request 举证参数 + * @return 响应结果 + * @throws WxErrorException 异常 + */ + default WxChannelBaseResponse proofGuarantee(GuaranteeProofRequest request) throws WxErrorException { + throw new UnsupportedOperationException(); + } + + /** + * 拒绝保障单申请。 + * 文档地址:https://developers.weixin.qq.com/doc/channels/API/channels-shop-aftersale/guarantee/api_merchantrefuseguarantee + * + * @param request 拒绝参数 + * @return 响应结果 + * @throws WxErrorException 异常 + */ + default WxChannelBaseResponse refuseGuarantee(GuaranteeRefuseRequest request) throws WxErrorException { + throw new UnsupportedOperationException(); + } } diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelAfterSaleServiceImpl.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelAfterSaleServiceImpl.java index c7cdf9167a..5f8c738741 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelAfterSaleServiceImpl.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelAfterSaleServiceImpl.java @@ -136,4 +136,42 @@ public WxChannelBaseResponse merchantUpdateAfterSale(AfterSaleMerchantUpdatePara return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); } + @Override + public GuaranteeOrderListResponse listGuaranteeOrder(GuaranteeOrderListParam param) throws WxErrorException { + String resJson = shopService.post(GUARANTEE_ORDER_LIST_URL, param); + return ResponseUtils.decode(resJson, GuaranteeOrderListResponse.class); + } + + @Override + public GuaranteeOrderInfoResponse getGuaranteeOrder(String guaranteeOrderId) throws WxErrorException { + GuaranteeOrderIdParam param = new GuaranteeOrderIdParam(guaranteeOrderId); + String resJson = shopService.post(GUARANTEE_ORDER_GET_URL, param); + return ResponseUtils.decode(resJson, GuaranteeOrderInfoResponse.class); + } + + @Override + public WxChannelBaseResponse acceptGuarantee(String guaranteeOrderId) throws WxErrorException { + GuaranteeOrderIdParam param = new GuaranteeOrderIdParam(guaranteeOrderId); + String resJson = shopService.post(GUARANTEE_ORDER_ACCEPT_URL, param); + return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); + } + + @Override + public WxChannelBaseResponse modifyGuarantee(GuaranteeModifyRequest request) throws WxErrorException { + String resJson = shopService.post(GUARANTEE_ORDER_MODIFY_URL, request); + return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); + } + + @Override + public WxChannelBaseResponse proofGuarantee(GuaranteeProofRequest request) throws WxErrorException { + String resJson = shopService.post(GUARANTEE_ORDER_PROOF_URL, request); + return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); + } + + @Override + public WxChannelBaseResponse refuseGuarantee(GuaranteeRefuseRequest request) throws WxErrorException { + String resJson = shopService.post(GUARANTEE_ORDER_REFUSE_URL, request); + return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); + } + } diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeModifyRequest.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeModifyRequest.java new file mode 100644 index 0000000000..0141ac05d5 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeModifyRequest.java @@ -0,0 +1,34 @@ +package me.chanjar.weixin.channel.bean.after; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * 商家协商保障单请求参数。 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@JsonInclude(Include.NON_NULL) +public class GuaranteeModifyRequest extends GuaranteeOrderIdParam { + + private static final long serialVersionUID = 4268864541609439068L; + + /** 商品破损程度。 */ + @JsonProperty("bad_level") + private Integer badLevel; + + /** 商家协商备注。 */ + @JsonProperty("merchant_remark") + private String merchantRemark; + + public GuaranteeModifyRequest(String guaranteeOrderId, Integer badLevel, String merchantRemark) { + super(guaranteeOrderId); + this.badLevel = badLevel; + this.merchantRemark = merchantRemark; + } +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderIdParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderIdParam.java new file mode 100644 index 0000000000..930e82422a --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderIdParam.java @@ -0,0 +1,25 @@ +package me.chanjar.weixin.channel.bean.after; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 保障单号参数。 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@JsonInclude(Include.NON_NULL) +public class GuaranteeOrderIdParam implements Serializable { + + private static final long serialVersionUID = -6638498743123537413L; + + /** 保障单号。 */ + @JsonProperty("guarantee_order_id") + private String guaranteeOrderId; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderInfoResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderInfoResponse.java new file mode 100644 index 0000000000..7b286807a5 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderInfoResponse.java @@ -0,0 +1,59 @@ +package me.chanjar.weixin.channel.bean.after; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; + +/** + * 保障单详情响应。 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class GuaranteeOrderInfoResponse extends WxChannelBaseResponse { + + private static final long serialVersionUID = 7354122991247317485L; + + /** 保障单详情。 */ + @JsonProperty("guarantee_order") + private GuaranteeOrder guaranteeOrder; + + /** + * 保障单详情。 + */ + @Data + @NoArgsConstructor + public static class GuaranteeOrder implements Serializable { + + private static final long serialVersionUID = -2398976447575813507L; + + /** 保障单号。 */ + @JsonProperty("guarantee_order_id") + private String guaranteeOrderId; + + /** 保障单状态。 */ + @JsonProperty("status") + private String status; + + /** 商品信息。 */ + @JsonProperty("product_info") + private ProductInfo productInfo; + } + + /** + * 详情商品信息。 + */ + @Data + @NoArgsConstructor + public static class ProductInfo implements Serializable { + + private static final long serialVersionUID = -2455740986246085934L; + + /** 商品 SPU ID。 */ + @JsonProperty("product_id") + private String productId; + } +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderListParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderListParam.java new file mode 100644 index 0000000000..fbe11f91ef --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderListParam.java @@ -0,0 +1,44 @@ +package me.chanjar.weixin.channel.bean.after; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 保障单列表请求参数。 + */ +@Data +@NoArgsConstructor +@JsonInclude(Include.NON_NULL) +public class GuaranteeOrderListParam implements Serializable { + + private static final long serialVersionUID = 1622570776364341988L; + + @JsonProperty("guarantee_order_id_list") + private List guaranteeOrderIdList; + + @JsonProperty("order_id_list") + private List orderIdList; + + @JsonProperty("type") + private Integer type; + + @JsonProperty("begin_time") + private Long beginTime; + + @JsonProperty("end_time") + private Long endTime; + + @JsonProperty("status_list") + private String statusList; + + @JsonProperty("offset") + private Integer offset; + + @JsonProperty("limit") + private Integer limit; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderListResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderListResponse.java new file mode 100644 index 0000000000..90daa0cc11 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderListResponse.java @@ -0,0 +1,64 @@ +package me.chanjar.weixin.channel.bean.after; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; + +/** + * 保障单列表响应。 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class GuaranteeOrderListResponse extends WxChannelBaseResponse { + + private static final long serialVersionUID = 9105476087203713187L; + + /** 保障单总数。 */ + @JsonProperty("total_num") + private Integer totalNum; + + /** 保障单列表。 */ + @JsonProperty("guarantee_order_list") + private List guaranteeOrderList; + + /** + * 保障单列表项。 + */ + @Data + @NoArgsConstructor + public static class GuaranteeOrder implements Serializable { + + private static final long serialVersionUID = 7151952524213202281L; + + /** 保障单号。 */ + @JsonProperty("guarantee_order_id") + private String guaranteeOrderId; + + /** 保障单状态。 */ + @JsonProperty("status") + private String status; + + /** 商品信息列表。 */ + @JsonProperty("product_info") + private List productInfo; + } + + /** + * 列表商品信息。 + */ + @Data + @NoArgsConstructor + public static class ProductInfo implements Serializable { + + private static final long serialVersionUID = -2565763879505631638L; + + /** 商品 SPU ID。 */ + @JsonProperty("product_id") + private String productId; + } +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeProofRequest.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeProofRequest.java new file mode 100644 index 0000000000..7bd1a95f38 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeProofRequest.java @@ -0,0 +1,35 @@ +package me.chanjar.weixin.channel.bean.after; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * 商家举证保障单请求参数。 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@JsonInclude(Include.NON_NULL) +public class GuaranteeProofRequest extends GuaranteeOrderIdParam { + + private static final long serialVersionUID = 6599721896742974275L; + + /** 举证内容。 */ + @JsonProperty("content") + private String content; + + /** 举证图片 media_id 列表。 */ + @JsonProperty("pic_list") + private List picList; + + public GuaranteeProofRequest(String guaranteeOrderId, String content, List picList) { + super(guaranteeOrderId); + this.content = content; + this.picList = picList; + } +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeRefuseRequest.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeRefuseRequest.java new file mode 100644 index 0000000000..be967ebff7 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeRefuseRequest.java @@ -0,0 +1,35 @@ +package me.chanjar.weixin.channel.bean.after; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * 商家拒绝保障单请求参数。 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@JsonInclude(Include.NON_NULL) +public class GuaranteeRefuseRequest extends GuaranteeOrderIdParam { + + private static final long serialVersionUID = -6905594717805091393L; + + /** 拒绝原因。 */ + @JsonProperty("reason") + private String reason; + + /** 拒绝凭证图片 media_id 列表。 */ + @JsonProperty("pic_list") + private List picList; + + public GuaranteeRefuseRequest(String guaranteeOrderId, String reason, List picList) { + super(guaranteeOrderId); + this.reason = reason; + this.picList = picList; + } +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/constant/WxChannelApiUrlConstants.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/constant/WxChannelApiUrlConstants.java index 0b62bf59de..8aa4fec117 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/constant/WxChannelApiUrlConstants.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/constant/WxChannelApiUrlConstants.java @@ -302,6 +302,18 @@ public interface AfterSale { String AFTER_SALE_REJECT_EXCHANGE_RESHIP_URL = "https://api.weixin.qq.com/channels/ec/aftersale/rejectexchangereship"; /** 商家协商*/ String AFTER_SALE_MERCHANT_UPDATE_URL = "https://api.weixin.qq.com/channels/ec/aftersale/merchantupdateaftersale"; + /** 获取保障单列表 */ + String GUARANTEE_ORDER_LIST_URL = "https://api.weixin.qq.com/channels/ec/aftersale/searchguaranteeorder"; + /** 获取保障单详情 */ + String GUARANTEE_ORDER_GET_URL = "https://api.weixin.qq.com/channels/ec/aftersale/getguaranteeorder"; + /** 同意保障单申请 */ + String GUARANTEE_ORDER_ACCEPT_URL = "https://api.weixin.qq.com/channels/ec/aftersale/merchantacceptguarantee"; + /** 商家协商保障单 */ + String GUARANTEE_ORDER_MODIFY_URL = "https://api.weixin.qq.com/channels/ec/aftersale/merchantmodifyguarantee"; + /** 商家举证保障单 */ + String GUARANTEE_ORDER_PROOF_URL = "https://api.weixin.qq.com/channels/ec/aftersale/merchantproofguarantee"; + /** 拒绝保障单申请 */ + String GUARANTEE_ORDER_REFUSE_URL = "https://api.weixin.qq.com/channels/ec/aftersale/merchantrefuseguarantee"; } /** 纠纷相关接口 */ diff --git a/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelAfterSaleServiceImplGuaranteeTest.java b/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelAfterSaleServiceImplGuaranteeTest.java new file mode 100644 index 0000000000..e8eaee0fcf --- /dev/null +++ b/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelAfterSaleServiceImplGuaranteeTest.java @@ -0,0 +1,163 @@ +package me.chanjar.weixin.channel.api.impl; + +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertFalse; +import static org.testng.Assert.assertTrue; +import static org.testng.Assert.fail; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; +import static org.mockito.Answers.CALLS_REAL_METHODS; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.AfterSale.GUARANTEE_ORDER_ACCEPT_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.AfterSale.GUARANTEE_ORDER_GET_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.AfterSale.GUARANTEE_ORDER_LIST_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.AfterSale.GUARANTEE_ORDER_MODIFY_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.AfterSale.GUARANTEE_ORDER_PROOF_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.AfterSale.GUARANTEE_ORDER_REFUSE_URL; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.util.Arrays; +import me.chanjar.weixin.channel.api.WxChannelAfterSaleService; +import me.chanjar.weixin.channel.bean.after.GuaranteeModifyRequest; +import me.chanjar.weixin.channel.bean.after.GuaranteeOrderIdParam; +import me.chanjar.weixin.channel.bean.after.GuaranteeOrderInfoResponse; +import me.chanjar.weixin.channel.bean.after.GuaranteeOrderListParam; +import me.chanjar.weixin.channel.bean.after.GuaranteeOrderListResponse; +import me.chanjar.weixin.channel.bean.after.GuaranteeProofRequest; +import me.chanjar.weixin.channel.bean.after.GuaranteeRefuseRequest; +import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; +import org.testng.annotations.Test; + + +/** + * 保障单模型 JSON 映射测试。 + */ +public class WxChannelAfterSaleServiceImplGuaranteeTest { + + private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); + + @Test + public void shouldSerializeGuaranteeOperationRequestsWithOfficialFieldNames() throws Exception { + JsonNode modify = OBJECT_MAPPER.readTree(OBJECT_MAPPER.writeValueAsString( + new GuaranteeModifyRequest("2000001077270153", 50, "协商说明"))); + assertEquals(modify.get("guarantee_order_id").asText(), "2000001077270153"); + assertEquals(modify.get("bad_level").asInt(), 50); + assertEquals(modify.get("merchant_remark").asText(), "协商说明"); + + JsonNode proof = OBJECT_MAPPER.readTree(OBJECT_MAPPER.writeValueAsString( + new GuaranteeProofRequest("2000001077270153", "举证说明", Arrays.asList("media-1")))); + assertEquals(proof.get("content").asText(), "举证说明"); + assertEquals(proof.get("pic_list").get(0).asText(), "media-1"); + + JsonNode refuse = OBJECT_MAPPER.readTree(OBJECT_MAPPER.writeValueAsString( + new GuaranteeRefuseRequest("2000001077270153", "拒绝原因", Arrays.asList("media-2")))); + assertEquals(refuse.get("reason").asText(), "拒绝原因"); + assertEquals(refuse.get("pic_list").get(0).asText(), "media-2"); + } + + @Test + public void shouldDeserializeGuaranteeOrderListAndDetail() throws Exception { + String listJson = "{\"errcode\":0,\"total_num\":1,\"guarantee_order_list\":[{" + + "\"guarantee_order_id\":\"2000001077270153\",\"status\":\"PENDING\"," + + "\"product_info\":[{\"product_id\":\"123\"}]}]}"; + GuaranteeOrderListResponse listResponse = OBJECT_MAPPER.readValue( + listJson, GuaranteeOrderListResponse.class); + assertEquals(listResponse.getTotalNum(), Integer.valueOf(1)); + assertEquals(listResponse.getGuaranteeOrderList().get(0).getGuaranteeOrderId(), "2000001077270153"); + assertEquals(listResponse.getGuaranteeOrderList().get(0).getStatus(), "PENDING"); + assertEquals(listResponse.getGuaranteeOrderList().get(0).getProductInfo().get(0).getProductId(), "123"); + + String detailJson = "{\"errcode\":0,\"guarantee_order\":{" + + "\"guarantee_order_id\":\"2000001077270153\",\"status\":\"PENDING\"," + + "\"product_info\":{\"product_id\":\"123\"}}}"; + GuaranteeOrderInfoResponse detailResponse = OBJECT_MAPPER.readValue( + detailJson, GuaranteeOrderInfoResponse.class); + assertEquals(detailResponse.getGuaranteeOrder().getGuaranteeOrderId(), "2000001077270153"); + assertEquals(detailResponse.getGuaranteeOrder().getStatus(), "PENDING"); + assertEquals(detailResponse.getGuaranteeOrder().getProductInfo().getProductId(), "123"); + } + + @Test + public void shouldSerializeGuaranteeOrderListParamWithOfficialFieldNames() throws Exception { + GuaranteeOrderListParam param = OBJECT_MAPPER.readValue( + "{\"guarantee_order_id_list\":[\"g-1\"],\"order_id_list\":[\"o-1\"],\"type\":2," + + "\"begin_time\":1,\"end_time\":2,\"status_list\":\"PENDING\",\"offset\":3,\"limit\":10}", GuaranteeOrderListParam.class); + + JsonNode json = OBJECT_MAPPER.readTree(OBJECT_MAPPER.writeValueAsString(param)); + assertEquals(json.get("guarantee_order_id_list").get(0).asText(), "g-1"); + assertEquals(json.get("order_id_list").get(0).asText(), "o-1"); + assertEquals(json.get("type").asInt(), 2); + assertEquals(json.get("begin_time").asLong(), 1L); + assertEquals(json.get("end_time").asLong(), 2L); + assertEquals(json.get("status_list").asText(), "PENDING"); + assertEquals(json.get("offset").asInt(), 3); + assertEquals(json.get("limit").asInt(), 10); + } + + @Test + public void shouldExposeGuaranteeMethodsAsDefaultMethods() throws Exception { + assertTrue(WxChannelAfterSaleService.class.getMethod("listGuaranteeOrder", GuaranteeOrderListParam.class) + .isDefault()); + assertTrue(WxChannelAfterSaleService.class.getMethod("getGuaranteeOrder", String.class).isDefault()); + assertTrue(WxChannelAfterSaleService.class.getMethod("acceptGuarantee", String.class).isDefault()); + assertTrue(WxChannelAfterSaleService.class.getMethod("modifyGuarantee", GuaranteeModifyRequest.class).isDefault()); + assertTrue(WxChannelAfterSaleService.class.getMethod("proofGuarantee", GuaranteeProofRequest.class).isDefault()); + assertTrue(WxChannelAfterSaleService.class.getMethod("refuseGuarantee", GuaranteeRefuseRequest.class).isDefault()); + + WxChannelAfterSaleService service = mock(WxChannelAfterSaleService.class, CALLS_REAL_METHODS); + try { + service.acceptGuarantee("guarantee-1"); + fail("Expected UnsupportedOperationException"); + } catch (UnsupportedOperationException ignored) { + // Expected from the compatibility default method. + } + } + + @Test + public void shouldDelegateGuaranteeOrderEndpointsAndDecodeResponses() throws Exception { + BaseWxChannelServiceImpl shopService = mock(BaseWxChannelServiceImpl.class); + WxChannelAfterSaleServiceImpl service = new WxChannelAfterSaleServiceImpl(shopService); + GuaranteeOrderListParam listParam = new GuaranteeOrderListParam(); + listParam.setLimit(10); + GuaranteeModifyRequest modifyRequest = new GuaranteeModifyRequest("guarantee-1", 50, "协商说明"); + GuaranteeProofRequest proofRequest = new GuaranteeProofRequest("guarantee-1", "举证说明", + Arrays.asList("media-1")); + GuaranteeRefuseRequest refuseRequest = new GuaranteeRefuseRequest("guarantee-1", "拒绝原因", + Arrays.asList("media-2")); + + when(shopService.post(eq(GUARANTEE_ORDER_LIST_URL), eq(listParam))).thenReturn( + "{\"errcode\":0,\"total_num\":1,\"guarantee_order_list\":[{\"guarantee_order_id\":\"guarantee-1\"}]}" ); + when(shopService.post(eq(GUARANTEE_ORDER_GET_URL), eq(new GuaranteeOrderIdParam("guarantee-1")))).thenReturn( + "{\"errcode\":0,\"guarantee_order\":{\"guarantee_order_id\":\"guarantee-1\"}}" ); + when(shopService.post(eq(GUARANTEE_ORDER_ACCEPT_URL), eq(new GuaranteeOrderIdParam("guarantee-1")))) + .thenReturn("{\"errcode\":0,\"errmsg\":\"ok\"}"); + when(shopService.post(eq(GUARANTEE_ORDER_MODIFY_URL), eq(modifyRequest))) + .thenReturn("{\"errcode\":0,\"errmsg\":\"ok\"}"); + when(shopService.post(eq(GUARANTEE_ORDER_PROOF_URL), eq(proofRequest))) + .thenReturn("{\"errcode\":0,\"errmsg\":\"ok\"}"); + when(shopService.post(eq(GUARANTEE_ORDER_REFUSE_URL), eq(refuseRequest))) + .thenReturn("{\"errcode\":40001,\"errmsg\":\"invalid credential\"}"); + + GuaranteeOrderListResponse listResponse = service.listGuaranteeOrder(listParam); + GuaranteeOrderInfoResponse detailResponse = service.getGuaranteeOrder("guarantee-1"); + WxChannelBaseResponse acceptResponse = service.acceptGuarantee("guarantee-1"); + WxChannelBaseResponse modifyResponse = service.modifyGuarantee(modifyRequest); + WxChannelBaseResponse proofResponse = service.proofGuarantee(proofRequest); + WxChannelBaseResponse refuseResponse = service.refuseGuarantee(refuseRequest); + + assertEquals(listResponse.getGuaranteeOrderList().get(0).getGuaranteeOrderId(), "guarantee-1"); + assertEquals(detailResponse.getGuaranteeOrder().getGuaranteeOrderId(), "guarantee-1"); + assertTrue(acceptResponse.isSuccess()); + assertTrue(modifyResponse.isSuccess()); + assertTrue(proofResponse.isSuccess()); + assertFalse(refuseResponse.isSuccess()); + verify(shopService).post(GUARANTEE_ORDER_LIST_URL, listParam); + verify(shopService).post(GUARANTEE_ORDER_GET_URL, new GuaranteeOrderIdParam("guarantee-1")); + verify(shopService).post(GUARANTEE_ORDER_ACCEPT_URL, new GuaranteeOrderIdParam("guarantee-1")); + verify(shopService).post(GUARANTEE_ORDER_MODIFY_URL, modifyRequest); + verify(shopService).post(GUARANTEE_ORDER_PROOF_URL, proofRequest); + verify(shopService).post(GUARANTEE_ORDER_REFUSE_URL, refuseRequest); + } +} From 1246de1c1911587c7be3b28950626021dd92b866 Mon Sep 17 00:00:00 2001 From: Binary Wang Date: Sat, 22 Aug 2026 18:48:36 +0800 Subject: [PATCH 16/31] =?UTF-8?q?:new:=20#4102=20=E3=80=90=E8=A7=86?= =?UTF-8?q?=E9=A2=91=E5=8F=B7=E3=80=91=20=E6=94=AF=E6=8C=81=E5=BE=AE?= =?UTF-8?q?=E4=BF=A1=E5=B0=8F=E5=BA=97=E7=94=B5=E5=AD=90=E9=9D=A2=E5=8D=95?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../channel/api/WxChannelEwaybillService.java | 78 +++++++++ .../weixin/channel/api/WxChannelService.java | 9 + .../api/impl/BaseWxChannelServiceImpl.java | 18 +- .../impl/WxChannelEwaybillServiceImpl.java | 165 ++++++++++++++++++ .../ewaybill/AbstractEwaybillRequest.java | 37 ++++ .../ewaybill/AbstractEwaybillResponse.java | 33 ++++ .../bean/ewaybill/AccountInfoResponse.java | 10 ++ .../bean/ewaybill/AddSubOrderRequest.java | 10 ++ .../bean/ewaybill/BatchPrintOrderRequest.java | 12 ++ .../bean/ewaybill/CreateOrderRequest.java | 10 ++ .../bean/ewaybill/CreateOrderResponse.java | 10 ++ .../bean/ewaybill/DeliveryListResponse.java | 10 ++ .../bean/ewaybill/EwaybillOrderIdParam.java | 14 ++ .../bean/ewaybill/OrderDetailResponse.java | 10 ++ .../bean/ewaybill/PreCreateRequest.java | 10 ++ .../bean/ewaybill/PreCreateResponse.java | 10 ++ .../bean/ewaybill/PrintContentParam.java | 22 +++ .../bean/ewaybill/PrintContentResponse.java | 10 ++ .../bean/ewaybill/PrintOrderRequest.java | 13 ++ .../bean/ewaybill/TemplateCodeParam.java | 18 ++ .../bean/ewaybill/TemplateConfigResponse.java | 10 ++ .../bean/ewaybill/TemplateCreateRequest.java | 10 ++ .../bean/ewaybill/TemplateIdParam.java | 22 +++ .../bean/ewaybill/TemplateIdResponse.java | 21 +++ .../bean/ewaybill/TemplateInfoResponse.java | 10 ++ .../bean/ewaybill/TemplateUpdateRequest.java | 10 ++ .../channel/bean/ewaybill/WaybillIdParam.java | 22 +++ .../bean/ewaybill/WaybillIdsParam.java | 23 +++ .../constant/WxChannelApiUrlConstants.java | 36 ++++ .../WxChannelEwaybillServiceAccessorTest.java | 17 ++ .../bean/ewaybill/PrintContentParamTest.java | 29 +++ .../ewaybill/WxChannelEwaybillBeanTest.java | 66 +++++++ 32 files changed, 782 insertions(+), 3 deletions(-) create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelEwaybillService.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelEwaybillServiceImpl.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/AbstractEwaybillRequest.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/AbstractEwaybillResponse.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/AccountInfoResponse.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/AddSubOrderRequest.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/BatchPrintOrderRequest.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/CreateOrderRequest.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/CreateOrderResponse.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/DeliveryListResponse.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/EwaybillOrderIdParam.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/OrderDetailResponse.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/PreCreateRequest.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/PreCreateResponse.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/PrintContentParam.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/PrintContentResponse.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/PrintOrderRequest.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateCodeParam.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateConfigResponse.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateCreateRequest.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateIdParam.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateIdResponse.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateInfoResponse.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateUpdateRequest.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/WaybillIdParam.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/WaybillIdsParam.java create mode 100644 weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelEwaybillServiceAccessorTest.java create mode 100644 weixin-java-channel/src/test/java/me/chanjar/weixin/channel/bean/ewaybill/PrintContentParamTest.java create mode 100644 weixin-java-channel/src/test/java/me/chanjar/weixin/channel/bean/ewaybill/WxChannelEwaybillBeanTest.java diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelEwaybillService.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelEwaybillService.java new file mode 100644 index 0000000000..714f75b44b --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelEwaybillService.java @@ -0,0 +1,78 @@ +package me.chanjar.weixin.channel.api; + +import java.util.List; +import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; +import me.chanjar.weixin.channel.bean.ewaybill.AccountInfoResponse; +import me.chanjar.weixin.channel.bean.ewaybill.AddSubOrderRequest; +import me.chanjar.weixin.channel.bean.ewaybill.CreateOrderRequest; +import me.chanjar.weixin.channel.bean.ewaybill.CreateOrderResponse; +import me.chanjar.weixin.channel.bean.ewaybill.DeliveryListResponse; +import me.chanjar.weixin.channel.bean.ewaybill.PrintOrderRequest; +import me.chanjar.weixin.channel.bean.ewaybill.BatchPrintOrderRequest; +import me.chanjar.weixin.channel.bean.ewaybill.OrderDetailResponse; +import me.chanjar.weixin.channel.bean.ewaybill.PreCreateRequest; +import me.chanjar.weixin.channel.bean.ewaybill.PreCreateResponse; +import me.chanjar.weixin.channel.bean.ewaybill.PrintContentResponse; +import me.chanjar.weixin.channel.bean.ewaybill.TemplateConfigResponse; +import me.chanjar.weixin.channel.bean.ewaybill.TemplateCreateRequest; +import me.chanjar.weixin.channel.bean.ewaybill.TemplateIdResponse; +import me.chanjar.weixin.channel.bean.ewaybill.TemplateInfoResponse; +import me.chanjar.weixin.channel.bean.ewaybill.TemplateUpdateRequest; +import me.chanjar.weixin.common.error.WxErrorException; + +/** + * 视频号小店电子面单服务接口 + * + * @author GitHub Copilot + */ +public interface WxChannelEwaybillService { + + /** 获取可用的标准面单模板。 @return 模板配置 @throws WxErrorException 微信接口调用失败 */ + TemplateConfigResponse getTemplateConfig() throws WxErrorException; + + /** 创建商家面单模板。 @param req 官方模板创建字段 @return 新模板 ID @throws WxErrorException 调用失败 */ + TemplateIdResponse createTemplate(TemplateCreateRequest req) throws WxErrorException; + + /** 删除商家面单模板。 @param templateId 模板 ID @return 操作结果 @throws WxErrorException 调用失败 */ + WxChannelBaseResponse deleteTemplate(String templateId) throws WxErrorException; + + /** 更新商家面单模板。 @param req 官方模板更新字段 @return 操作结果 @throws WxErrorException 调用失败 */ + WxChannelBaseResponse updateTemplate(TemplateUpdateRequest req) throws WxErrorException; + + /** 查询标准模板信息。 @param templateCode 标准模板编码 @return 模板详情 @throws WxErrorException 调用失败 */ + TemplateInfoResponse getTemplate(String templateCode) throws WxErrorException; + + /** 按模板 ID 查询商家模板。 @param templateId 模板 ID @return 模板详情 @throws WxErrorException 调用失败 */ + TemplateInfoResponse getTemplateById(String templateId) throws WxErrorException; + + /** 查询已开通电子面单的网点和账号。 @return 账号信息 @throws WxErrorException 调用失败 */ + AccountInfoResponse getAccount() throws WxErrorException; + + /** 查询已开通电子面单的快递公司。 @return 快递公司列表 @throws WxErrorException 调用失败 */ + DeliveryListResponse getDeliveryList() throws WxErrorException; + + /** 预取电子面单号。 @param req 官方预取号字段 @return 预取号结果 @throws WxErrorException 调用失败 */ + PreCreateResponse preCreateOrder(PreCreateRequest req) throws WxErrorException; + + /** 获取电子面单号。 @param req 官方取号字段,含收寄件信息 @return 面单号结果 @throws WxErrorException 调用失败 */ + CreateOrderResponse createOrder(CreateOrderRequest req) throws WxErrorException; + + /** 追加电子面单子件。 @param req 官方子件字段 @return 操作结果 @throws WxErrorException 调用失败 */ + WxChannelBaseResponse addSubOrder(AddSubOrderRequest req) throws WxErrorException; + + /** 取消电子面单下单。 @param waybillId 运单 ID @return 操作结果 @throws WxErrorException 调用失败 */ + WxChannelBaseResponse cancelOrder(PrintOrderRequest req) throws WxErrorException; + + /** 查询电子面单详情。 @param waybillId 运单 ID @return 面单详情 @throws WxErrorException 调用失败 */ + OrderDetailResponse getOrder(String ewaybillOrderId) throws WxErrorException; + + /** 获取打印报文。 @param waybillIds 运单 ID 列表 @param templateId 可选模板 ID @return 打印内容 @throws WxErrorException 调用失败 */ + PrintContentResponse getPrintContent(String ewaybillOrderId, String templateId) + throws WxErrorException; + + /** 通知单个运单打印成功。 @param waybillId 运单 ID @return 操作结果 @throws WxErrorException 调用失败 */ + WxChannelBaseResponse printOrder(PrintOrderRequest req) throws WxErrorException; + + /** 批量通知运单打印成功。 @param waybillIds 运单 ID 列表 @return 操作结果 @throws WxErrorException 调用失败 */ + WxChannelBaseResponse batchPrintOrder(BatchPrintOrderRequest req) throws WxErrorException; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelService.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelService.java index ab5497e212..64c21408c3 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelService.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelService.java @@ -210,4 +210,13 @@ public interface WxChannelService extends BaseWxChannelService { */ WxChannelFavoriteService getFavoriteService(); + /** + * 电子面单服务 + * + * @return 电子面单服务 + */ + default WxChannelEwaybillService getEwaybillService() { + throw new UnsupportedOperationException("当前 WxChannelService 实现不支持电子面单服务"); + } + } diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/BaseWxChannelServiceImpl.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/BaseWxChannelServiceImpl.java index 5283769932..fd432e9725 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/BaseWxChannelServiceImpl.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/BaseWxChannelServiceImpl.java @@ -64,6 +64,7 @@ public abstract class BaseWxChannelServiceImpl implements WxChannelService private WxChannelQicService qicService = null; private WxTalentService talentService = null; private WxChannelFavoriteService favoriteService = null; + private WxChannelEwaybillService ewaybillService = null; protected WxChannelConfig config; private int retrySleepMillis = 1000; @@ -235,7 +236,8 @@ protected T executeInternal(RequestExecutor executor, String uri, E try { T result = executor.execute(uriWithAccessToken, data, WxType.Channel); - log.debug("\n【请求地址】: {}\n【请求参数】:{}\n【响应数据】:{}", uriWithAccessToken, dataForLog, + log.debug("\n【请求地址】: {}\n【请求参数】:{}\n【响应数据】:{}", uriWithAccessToken, + printResult ? dataForLog : "...", printResult ? result : "..."); return result; } catch (WxErrorException e) { @@ -262,12 +264,14 @@ protected T executeInternal(RequestExecutor executor, String uri, E } if (error.getErrorCode() != 0) { - log.warn("\n【请求地址】: {}\n【请求参数】:{}\n【错误信息】:{}", uriWithAccessToken, dataForLog, error); + log.warn("\n【请求地址】: {}\n【请求参数】:{}\n【错误信息】:{}", uriWithAccessToken, + printResult ? dataForLog : "...", error); throw new WxErrorException(error, e); } return null; } catch (IOException e) { - log.warn("\n【请求地址】: {}\n【请求参数】:{}\n【异常信息】:{}", uriWithAccessToken, dataForLog, e.getMessage()); + log.warn("\n【请求地址】: {}\n【请求参数】:{}\n【异常信息】:{}", uriWithAccessToken, + printResult ? dataForLog : "...", e.getMessage()); throw new WxRuntimeException(e); } } @@ -509,4 +513,12 @@ public synchronized WxChannelFavoriteService getFavoriteService() { return favoriteService; } + @Override + public synchronized WxChannelEwaybillService getEwaybillService() { + if (ewaybillService == null) { + ewaybillService = new WxChannelEwaybillServiceImpl(this); + } + return ewaybillService; + } + } diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelEwaybillServiceImpl.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelEwaybillServiceImpl.java new file mode 100644 index 0000000000..293230585f --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelEwaybillServiceImpl.java @@ -0,0 +1,165 @@ +package me.chanjar.weixin.channel.api.impl; + +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Ewaybill.ADD_SUB_ORDER_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Ewaybill.BATCH_PRINT_ORDER_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Ewaybill.CANCEL_ORDER_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Ewaybill.CREATE_ORDER_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Ewaybill.CREATE_TEMPLATE_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Ewaybill.DELETE_TEMPLATE_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Ewaybill.GET_ACCOUNT_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Ewaybill.GET_DELIVERY_LIST_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Ewaybill.GET_ORDER_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Ewaybill.GET_PRINT_CONTENT_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Ewaybill.GET_TEMPLATE_BY_ID_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Ewaybill.GET_TEMPLATE_CONFIG_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Ewaybill.GET_TEMPLATE_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Ewaybill.PRE_CREATE_ORDER_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Ewaybill.PRINT_ORDER_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Ewaybill.UPDATE_TEMPLATE_URL; + +import java.util.List; +import me.chanjar.weixin.channel.api.WxChannelEwaybillService; +import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; +import me.chanjar.weixin.channel.bean.ewaybill.AccountInfoResponse; +import me.chanjar.weixin.channel.bean.ewaybill.AddSubOrderRequest; +import me.chanjar.weixin.channel.bean.ewaybill.CreateOrderRequest; +import me.chanjar.weixin.channel.bean.ewaybill.CreateOrderResponse; +import me.chanjar.weixin.channel.bean.ewaybill.DeliveryListResponse; +import me.chanjar.weixin.channel.bean.ewaybill.EwaybillOrderIdParam; +import me.chanjar.weixin.channel.bean.ewaybill.PrintOrderRequest; +import me.chanjar.weixin.channel.bean.ewaybill.BatchPrintOrderRequest; +import me.chanjar.weixin.channel.bean.ewaybill.OrderDetailResponse; +import me.chanjar.weixin.channel.bean.ewaybill.PreCreateRequest; +import me.chanjar.weixin.channel.bean.ewaybill.PreCreateResponse; +import me.chanjar.weixin.channel.bean.ewaybill.PrintContentResponse; +import me.chanjar.weixin.channel.bean.ewaybill.PrintContentParam; +import me.chanjar.weixin.channel.bean.ewaybill.TemplateCodeParam; +import me.chanjar.weixin.channel.bean.ewaybill.TemplateConfigResponse; +import me.chanjar.weixin.channel.bean.ewaybill.TemplateCreateRequest; +import me.chanjar.weixin.channel.bean.ewaybill.TemplateIdParam; +import me.chanjar.weixin.channel.bean.ewaybill.TemplateIdResponse; +import me.chanjar.weixin.channel.bean.ewaybill.TemplateInfoResponse; +import me.chanjar.weixin.channel.bean.ewaybill.TemplateUpdateRequest; +import me.chanjar.weixin.channel.bean.ewaybill.WaybillIdParam; +import me.chanjar.weixin.channel.bean.ewaybill.WaybillIdsParam; +import me.chanjar.weixin.channel.util.JsonUtils; +import me.chanjar.weixin.channel.util.ResponseUtils; +import me.chanjar.weixin.common.error.WxErrorException; +import me.chanjar.weixin.common.util.http.SimplePostRequestExecutor; + +/** + * 视频号小店电子面单服务实现。 + * + * @author GitHub Copilot + */ +public class WxChannelEwaybillServiceImpl implements WxChannelEwaybillService { + + /** 微信商店服务 */ + private final BaseWxChannelServiceImpl shopService; + + public WxChannelEwaybillServiceImpl(BaseWxChannelServiceImpl shopService) { + this.shopService = shopService; + } + + @Override + public TemplateConfigResponse getTemplateConfig() throws WxErrorException { + String resJson = post(GET_TEMPLATE_CONFIG_URL, "{}"); + return ResponseUtils.decode(resJson, TemplateConfigResponse.class); + } + + @Override + public TemplateIdResponse createTemplate(TemplateCreateRequest req) throws WxErrorException { + String resJson = post(CREATE_TEMPLATE_URL, req); + return ResponseUtils.decode(resJson, TemplateIdResponse.class); + } + + @Override + public WxChannelBaseResponse deleteTemplate(String templateId) throws WxErrorException { + String resJson = post(DELETE_TEMPLATE_URL, new TemplateIdParam(templateId)); + return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); + } + + @Override + public WxChannelBaseResponse updateTemplate(TemplateUpdateRequest req) throws WxErrorException { + String resJson = post(UPDATE_TEMPLATE_URL, req); + return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); + } + + @Override + public TemplateInfoResponse getTemplate(String templateCode) throws WxErrorException { + String resJson = post(GET_TEMPLATE_URL, new TemplateCodeParam(templateCode)); + return ResponseUtils.decode(resJson, TemplateInfoResponse.class); + } + + @Override + public TemplateInfoResponse getTemplateById(String templateId) throws WxErrorException { + String resJson = post(GET_TEMPLATE_BY_ID_URL, new TemplateIdParam(templateId)); + return ResponseUtils.decode(resJson, TemplateInfoResponse.class); + } + + @Override + public AccountInfoResponse getAccount() throws WxErrorException { + String resJson = post(GET_ACCOUNT_URL, "{}"); + return ResponseUtils.decode(resJson, AccountInfoResponse.class); + } + + @Override + public DeliveryListResponse getDeliveryList() throws WxErrorException { + String resJson = post(GET_DELIVERY_LIST_URL, "{}"); + return ResponseUtils.decode(resJson, DeliveryListResponse.class); + } + + @Override + public PreCreateResponse preCreateOrder(PreCreateRequest req) throws WxErrorException { + String resJson = post(PRE_CREATE_ORDER_URL, req); + return ResponseUtils.decode(resJson, PreCreateResponse.class); + } + + @Override + public CreateOrderResponse createOrder(CreateOrderRequest req) throws WxErrorException { + String resJson = post(CREATE_ORDER_URL, req); + return ResponseUtils.decode(resJson, CreateOrderResponse.class); + } + + @Override + public WxChannelBaseResponse addSubOrder(AddSubOrderRequest req) throws WxErrorException { + String resJson = post(ADD_SUB_ORDER_URL, req); + return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); + } + + @Override + public WxChannelBaseResponse cancelOrder(PrintOrderRequest req) throws WxErrorException { + String resJson = post(CANCEL_ORDER_URL, req); + return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); + } + + @Override + public OrderDetailResponse getOrder(String ewaybillOrderId) throws WxErrorException { + String resJson = post(GET_ORDER_URL, new EwaybillOrderIdParam(ewaybillOrderId)); + return ResponseUtils.decode(resJson, OrderDetailResponse.class); + } + + @Override + public PrintContentResponse getPrintContent(String ewaybillOrderId, String templateId) + throws WxErrorException { + String resJson = post(GET_PRINT_CONTENT_URL, new PrintContentParam(ewaybillOrderId, templateId)); + return ResponseUtils.decode(resJson, PrintContentResponse.class); + } + + @Override + public WxChannelBaseResponse printOrder(PrintOrderRequest req) throws WxErrorException { + String resJson = post(PRINT_ORDER_URL, req); + return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); + } + + @Override + public WxChannelBaseResponse batchPrintOrder(BatchPrintOrderRequest req) throws WxErrorException { + String resJson = post(BATCH_PRINT_ORDER_URL, req); + return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); + } + + private String post(String url, Object request) throws WxErrorException { + return shopService.executeWithoutLog( + SimplePostRequestExecutor.create(shopService), url, JsonUtils.encode(request)); + } +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/AbstractEwaybillRequest.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/AbstractEwaybillRequest.java new file mode 100644 index 0000000000..d863c7c895 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/AbstractEwaybillRequest.java @@ -0,0 +1,37 @@ +package me.chanjar.weixin.channel.bean.ewaybill; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.io.Serializable; +import java.util.LinkedHashMap; +import java.util.Map; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 电子面单通用请求参数容器。 + * + *

字段按官方文档动态透传,避免非官方字段定义。

+ * + * @author GitHub Copilot + */ +@Data +@NoArgsConstructor +public abstract class AbstractEwaybillRequest implements Serializable { + + private static final long serialVersionUID = 4213577159985597237L; + + @JsonIgnore + private Map params = new LinkedHashMap<>(); + + @JsonAnySetter + public void addParam(String key, Object value) { + params.put(key, value); + } + + @JsonAnyGetter + public Map anyParams() { + return params; + } +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/AbstractEwaybillResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/AbstractEwaybillResponse.java new file mode 100644 index 0000000000..f62aab4ada --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/AbstractEwaybillResponse.java @@ -0,0 +1,33 @@ +package me.chanjar.weixin.channel.bean.ewaybill; + +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.util.LinkedHashMap; +import java.util.Map; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; + +/** + * 电子面单通用响应参数容器。 + * + *

未显式声明字段将保存到 extra 字段,便于兼容官方接口变更。

+ * + * @author GitHub Copilot + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public abstract class AbstractEwaybillResponse extends WxChannelBaseResponse { + + private static final long serialVersionUID = -2460196179063989718L; + + @JsonIgnore + private Map extra = new LinkedHashMap<>(); + + @JsonAnySetter + public void addExtra(String key, Object value) { + extra.put(key, value); + } +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/AccountInfoResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/AccountInfoResponse.java new file mode 100644 index 0000000000..4a460bcc6d --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/AccountInfoResponse.java @@ -0,0 +1,10 @@ +package me.chanjar.weixin.channel.bean.ewaybill; + +/** + * 电子面单网点/账号信息响应。 + * + * @author GitHub Copilot + */ +public class AccountInfoResponse extends AbstractEwaybillResponse { + private static final long serialVersionUID = 5682783958522805959L; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/AddSubOrderRequest.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/AddSubOrderRequest.java new file mode 100644 index 0000000000..2e0b90e1f8 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/AddSubOrderRequest.java @@ -0,0 +1,10 @@ +package me.chanjar.weixin.channel.bean.ewaybill; + +/** + * 电子面单子件追加请求。 + * + * @author GitHub Copilot + */ +public class AddSubOrderRequest extends AbstractEwaybillRequest { + private static final long serialVersionUID = 4250200603210217269L; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/BatchPrintOrderRequest.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/BatchPrintOrderRequest.java new file mode 100644 index 0000000000..a06d26b875 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/BatchPrintOrderRequest.java @@ -0,0 +1,12 @@ +package me.chanjar.weixin.channel.bean.ewaybill; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@NoArgsConstructor +public class BatchPrintOrderRequest { + @JsonProperty("req_list") private List reqList; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/CreateOrderRequest.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/CreateOrderRequest.java new file mode 100644 index 0000000000..87e8bad3cd --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/CreateOrderRequest.java @@ -0,0 +1,10 @@ +package me.chanjar.weixin.channel.bean.ewaybill; + +/** + * 电子面单取号请求。 + * + * @author GitHub Copilot + */ +public class CreateOrderRequest extends AbstractEwaybillRequest { + private static final long serialVersionUID = 2521225918646916853L; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/CreateOrderResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/CreateOrderResponse.java new file mode 100644 index 0000000000..89eafa012d --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/CreateOrderResponse.java @@ -0,0 +1,10 @@ +package me.chanjar.weixin.channel.bean.ewaybill; + +/** + * 电子面单取号响应。 + * + * @author GitHub Copilot + */ +public class CreateOrderResponse extends AbstractEwaybillResponse { + private static final long serialVersionUID = 9115454170108519187L; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/DeliveryListResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/DeliveryListResponse.java new file mode 100644 index 0000000000..eef815afc1 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/DeliveryListResponse.java @@ -0,0 +1,10 @@ +package me.chanjar.weixin.channel.bean.ewaybill; + +/** + * 开通快递公司列表响应。 + * + * @author GitHub Copilot + */ +public class DeliveryListResponse extends AbstractEwaybillResponse { + private static final long serialVersionUID = 494164885034906535L; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/EwaybillOrderIdParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/EwaybillOrderIdParam.java new file mode 100644 index 0000000000..81a099f9ff --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/EwaybillOrderIdParam.java @@ -0,0 +1,14 @@ +package me.chanjar.weixin.channel.bean.ewaybill; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@NoArgsConstructor +@AllArgsConstructor +public class EwaybillOrderIdParam { + @JsonProperty("ewaybill_order_id") + private String ewaybillOrderId; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/OrderDetailResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/OrderDetailResponse.java new file mode 100644 index 0000000000..4717bdcd6a --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/OrderDetailResponse.java @@ -0,0 +1,10 @@ +package me.chanjar.weixin.channel.bean.ewaybill; + +/** + * 面单详情响应。 + * + * @author GitHub Copilot + */ +public class OrderDetailResponse extends AbstractEwaybillResponse { + private static final long serialVersionUID = -2406734055149395916L; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/PreCreateRequest.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/PreCreateRequest.java new file mode 100644 index 0000000000..b76d4f8c38 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/PreCreateRequest.java @@ -0,0 +1,10 @@ +package me.chanjar.weixin.channel.bean.ewaybill; + +/** + * 电子面单预取号请求。 + * + * @author GitHub Copilot + */ +public class PreCreateRequest extends AbstractEwaybillRequest { + private static final long serialVersionUID = 3761501770378571724L; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/PreCreateResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/PreCreateResponse.java new file mode 100644 index 0000000000..ded9e53dab --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/PreCreateResponse.java @@ -0,0 +1,10 @@ +package me.chanjar.weixin.channel.bean.ewaybill; + +/** + * 电子面单预取号响应。 + * + * @author GitHub Copilot + */ +public class PreCreateResponse extends AbstractEwaybillResponse { + private static final long serialVersionUID = -6302826807350860584L; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/PrintContentParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/PrintContentParam.java new file mode 100644 index 0000000000..3ef3e240bd --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/PrintContentParam.java @@ -0,0 +1,22 @@ +package me.chanjar.weixin.channel.bean.ewaybill; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** 获取电子面单打印报文请求参数。 */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class PrintContentParam implements Serializable { + private static final long serialVersionUID = 6898522842175667816L; + + @JsonProperty("ewaybill_order_id") + private String ewaybillOrderId; + + @JsonProperty("template_id") + private String templateId; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/PrintContentResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/PrintContentResponse.java new file mode 100644 index 0000000000..6a66ffca15 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/PrintContentResponse.java @@ -0,0 +1,10 @@ +package me.chanjar.weixin.channel.bean.ewaybill; + +/** + * 打印报文响应。 + * + * @author GitHub Copilot + */ +public class PrintContentResponse extends AbstractEwaybillResponse { + private static final long serialVersionUID = 1097526332493027364L; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/PrintOrderRequest.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/PrintOrderRequest.java new file mode 100644 index 0000000000..14be4f62ca --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/PrintOrderRequest.java @@ -0,0 +1,13 @@ +package me.chanjar.weixin.channel.bean.ewaybill; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@NoArgsConstructor +public class PrintOrderRequest extends EwaybillOrderIdParam { + @JsonProperty("delivery_id") private String deliveryId; + @JsonProperty("waybill_id") private String waybillId; + @JsonProperty("re_print") private Boolean rePrint; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateCodeParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateCodeParam.java new file mode 100644 index 0000000000..ae062ea74d --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateCodeParam.java @@ -0,0 +1,18 @@ +package me.chanjar.weixin.channel.bean.ewaybill; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** 面单标准模板编码请求参数。 */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class TemplateCodeParam implements Serializable { + private static final long serialVersionUID = 4473438799300843172L; + + @JsonProperty("template_code") + private String templateCode; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateConfigResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateConfigResponse.java new file mode 100644 index 0000000000..f97a7ef52f --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateConfigResponse.java @@ -0,0 +1,10 @@ +package me.chanjar.weixin.channel.bean.ewaybill; + +/** + * 面单标准模板响应。 + * + * @author GitHub Copilot + */ +public class TemplateConfigResponse extends AbstractEwaybillResponse { + private static final long serialVersionUID = 6779567498624326386L; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateCreateRequest.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateCreateRequest.java new file mode 100644 index 0000000000..382f355645 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateCreateRequest.java @@ -0,0 +1,10 @@ +package me.chanjar.weixin.channel.bean.ewaybill; + +/** + * 新增面单模板请求。 + * + * @author GitHub Copilot + */ +public class TemplateCreateRequest extends AbstractEwaybillRequest { + private static final long serialVersionUID = 2974771986022948202L; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateIdParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateIdParam.java new file mode 100644 index 0000000000..5289c45231 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateIdParam.java @@ -0,0 +1,22 @@ +package me.chanjar.weixin.channel.bean.ewaybill; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 模板ID请求参数。 + * + * @author GitHub Copilot + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class TemplateIdParam implements Serializable { + private static final long serialVersionUID = -2397006631686547550L; + + @JsonProperty("template_id") + private String templateId; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateIdResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateIdResponse.java new file mode 100644 index 0000000000..878ef5b25c --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateIdResponse.java @@ -0,0 +1,21 @@ +package me.chanjar.weixin.channel.bean.ewaybill; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * 面单模板ID响应。 + * + * @author GitHub Copilot + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class TemplateIdResponse extends AbstractEwaybillResponse { + private static final long serialVersionUID = -6756111662032438585L; + + @JsonProperty("template_id") + private String templateId; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateInfoResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateInfoResponse.java new file mode 100644 index 0000000000..62d50dc148 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateInfoResponse.java @@ -0,0 +1,10 @@ +package me.chanjar.weixin.channel.bean.ewaybill; + +/** + * 面单模板信息响应。 + * + * @author GitHub Copilot + */ +public class TemplateInfoResponse extends AbstractEwaybillResponse { + private static final long serialVersionUID = 5718279884380636289L; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateUpdateRequest.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateUpdateRequest.java new file mode 100644 index 0000000000..752aea3043 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateUpdateRequest.java @@ -0,0 +1,10 @@ +package me.chanjar.weixin.channel.bean.ewaybill; + +/** + * 更新面单模板请求。 + * + * @author GitHub Copilot + */ +public class TemplateUpdateRequest extends AbstractEwaybillRequest { + private static final long serialVersionUID = -6201137374059216895L; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/WaybillIdParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/WaybillIdParam.java new file mode 100644 index 0000000000..a62821d32c --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/WaybillIdParam.java @@ -0,0 +1,22 @@ +package me.chanjar.weixin.channel.bean.ewaybill; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 运单ID请求参数。 + * + * @author GitHub Copilot + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class WaybillIdParam implements Serializable { + private static final long serialVersionUID = -7601452772833268240L; + + @JsonProperty("waybill_id") + private String waybillId; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/WaybillIdsParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/WaybillIdsParam.java new file mode 100644 index 0000000000..49129280bf --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/WaybillIdsParam.java @@ -0,0 +1,23 @@ +package me.chanjar.weixin.channel.bean.ewaybill; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 批量运单ID请求参数。 + * + * @author GitHub Copilot + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class WaybillIdsParam implements Serializable { + private static final long serialVersionUID = -9030594599179993010L; + + @JsonProperty("waybill_ids") + private List waybillIds; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/constant/WxChannelApiUrlConstants.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/constant/WxChannelApiUrlConstants.java index 8aa4fec117..b095589bf9 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/constant/WxChannelApiUrlConstants.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/constant/WxChannelApiUrlConstants.java @@ -337,6 +337,42 @@ public interface Delivery { String DELIVERY_SEND_URL = "https://api.weixin.qq.com/channels/ec/order/delivery/send"; } + /** 电子面单相关接口 */ + public interface Ewaybill { + /** 获取面单标准模板 */ + String GET_TEMPLATE_CONFIG_URL = "https://api.weixin.qq.com/channels/ec/logistics/ewaybill/biz/template/config"; + /** 新增面单模板 */ + String CREATE_TEMPLATE_URL = "https://api.weixin.qq.com/channels/ec/logistics/ewaybill/biz/template/create"; + /** 删除面单模板 */ + String DELETE_TEMPLATE_URL = "https://api.weixin.qq.com/channels/ec/logistics/ewaybill/biz/template/delete"; + /** 更新面单模板 */ + String UPDATE_TEMPLATE_URL = "https://api.weixin.qq.com/channels/ec/logistics/ewaybill/biz/template/update"; + /** 获取面单模板信息 */ + String GET_TEMPLATE_URL = "https://api.weixin.qq.com/channels/ec/logistics/ewaybill/biz/template/get"; + /** 根据模板ID获取面单模板信息 */ + String GET_TEMPLATE_BY_ID_URL = "https://api.weixin.qq.com/channels/ec/logistics/ewaybill/biz/template/getbyid"; + /** 查询开通的电子面单网点/账号信息 */ + String GET_ACCOUNT_URL = "https://api.weixin.qq.com/channels/ec/logistics/ewaybill/biz/account/get"; + /** 查询开通的快递公司列表 */ + String GET_DELIVERY_LIST_URL = "https://api.weixin.qq.com/channels/ec/logistics/ewaybill/biz/delivery/get"; + /** 电子面单预取号 */ + String PRE_CREATE_ORDER_URL = "https://api.weixin.qq.com/channels/ec/logistics/ewaybill/biz/order/precreate"; + /** 电子面单取号 */ + String CREATE_ORDER_URL = "https://api.weixin.qq.com/channels/ec/logistics/ewaybill/biz/order/create"; + /** 电子面单子件追加 */ + String ADD_SUB_ORDER_URL = "https://api.weixin.qq.com/channels/ec/logistics/ewaybill/biz/order/addsuborder"; + /** 电子面单取消下单 */ + String CANCEL_ORDER_URL = "https://api.weixin.qq.com/channels/ec/logistics/ewaybill/biz/order/cancel"; + /** 查询面单详情 */ + String GET_ORDER_URL = "https://api.weixin.qq.com/channels/ec/logistics/ewaybill/biz/order/get"; + /** 获取打印报文 */ + String GET_PRINT_CONTENT_URL = "https://api.weixin.qq.com/channels/ec/logistics/ewaybill/biz/print/get"; + /** 打印成功通知 */ + String PRINT_ORDER_URL = "https://api.weixin.qq.com/channels/ec/logistics/ewaybill/biz/order/print"; + /** 批量打印通知 */ + String BATCH_PRINT_ORDER_URL = "https://api.weixin.qq.com/channels/ec/logistics/ewaybill/biz/order/batchprint"; + } + /** 运费模板相关接口 */ public interface FreightTemplate { diff --git a/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelEwaybillServiceAccessorTest.java b/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelEwaybillServiceAccessorTest.java new file mode 100644 index 0000000000..0f53dad6c9 --- /dev/null +++ b/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelEwaybillServiceAccessorTest.java @@ -0,0 +1,17 @@ +package me.chanjar.weixin.channel.api.impl; + +import static org.testng.Assert.assertNotNull; + +import org.testng.annotations.Test; + +/** + * @author GitHub Copilot + */ +public class WxChannelEwaybillServiceAccessorTest { + + @Test + public void testGetEwaybillService() { + WxChannelServiceImpl service = new WxChannelServiceImpl(); + assertNotNull(service.getEwaybillService()); + } +} diff --git a/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/bean/ewaybill/PrintContentParamTest.java b/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/bean/ewaybill/PrintContentParamTest.java new file mode 100644 index 0000000000..9b2e234366 --- /dev/null +++ b/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/bean/ewaybill/PrintContentParamTest.java @@ -0,0 +1,29 @@ +package me.chanjar.weixin.channel.bean.ewaybill; + +import static org.testng.Assert.assertFalse; +import static org.testng.Assert.assertTrue; + +import java.util.Arrays; +import me.chanjar.weixin.channel.util.JsonUtils; +import org.testng.annotations.Test; + +/** 电子面单打印请求 JSON 契约测试。 */ +public class PrintContentParamTest { + + @Test + public void shouldHaveNoArgsConstructor() { + PrintContentParam param = new PrintContentParam(); + param.setEwaybillOrderId("order_1"); + + assertTrue(JsonUtils.encode(param).contains("\"ewaybill_order_id\"")); + } + + @Test + public void shouldEncodeWaybillIdsAndOptionalTemplateId() { + String json = JsonUtils.encode(new PrintContentParam("order_1", "tpl_1")); + + assertTrue(json.contains("\"ewaybill_order_id\"")); + assertTrue(json.contains("\"template_id\":\"tpl_1\"")); + assertFalse(json.contains("\"waybill_id\"")); + } +} diff --git a/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/bean/ewaybill/WxChannelEwaybillBeanTest.java b/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/bean/ewaybill/WxChannelEwaybillBeanTest.java new file mode 100644 index 0000000000..dcb79908bc --- /dev/null +++ b/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/bean/ewaybill/WxChannelEwaybillBeanTest.java @@ -0,0 +1,66 @@ +package me.chanjar.weixin.channel.bean.ewaybill; + +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertFalse; +import static org.testng.Assert.assertNotNull; +import static org.testng.Assert.assertTrue; + +import java.util.Arrays; +import me.chanjar.weixin.channel.util.JsonUtils; +import me.chanjar.weixin.channel.util.ResponseUtils; +import org.testng.annotations.Test; + +/** + * @author GitHub Copilot + */ +public class WxChannelEwaybillBeanTest { + + @Test + public void testTemplateIdParamEncode() { + TemplateIdParam param = new TemplateIdParam("tpl_1"); + String json = JsonUtils.encode(param); + assertNotNull(json); + assertTrue(json.contains("\"template_id\":\"tpl_1\"")); + } + + @Test + public void testTemplateCodeParamNoArgsConstructor() { + TemplateCodeParam param = new TemplateCodeParam(); + param.setTemplateCode("standard_tpl"); + + assertTrue(JsonUtils.encode(param).contains("\"template_code\":\"standard_tpl\"")); + } + + @Test + public void testWaybillIdsParamEncode() { + WaybillIdsParam param = new WaybillIdsParam(Arrays.asList("wb_1", "wb_2")); + String json = JsonUtils.encode(param); + assertNotNull(json); + assertTrue(json.contains("\"waybill_ids\"")); + assertTrue(json.contains("wb_1")); + assertTrue(json.contains("wb_2")); + } + + @Test + public void testDynamicRequestEncode() { + PreCreateRequest request = new PreCreateRequest(); + request.addParam("order_id", "o_1"); + request.addParam("package_quantity", 2); + + String json = JsonUtils.encode(request); + assertNotNull(json); + assertTrue(json.contains("\"order_id\":\"o_1\"")); + assertTrue(json.contains("\"package_quantity\":2")); + assertFalse(json.contains("\"params\"")); + } + + @Test + public void testDynamicResponseDecode() { + String json = "{\"errcode\":0,\"errmsg\":\"ok\",\"future_extension\":\"value\"}"; + PrintContentResponse response = ResponseUtils.decode(json, PrintContentResponse.class); + + assertNotNull(response); + assertTrue(response.isSuccess()); + assertEquals(response.getExtra().get("future_extension"), "value"); + } +} From d9caa8aa4673cf8af0dce7ea2a54ff8b44061a28 Mon Sep 17 00:00:00 2001 From: Binary Wang Date: Sat, 22 Aug 2026 18:58:43 +0800 Subject: [PATCH 17/31] =?UTF-8?q?:new:=20#4109=20=E3=80=90=E8=A7=86?= =?UTF-8?q?=E9=A2=91=E5=8F=B7=E3=80=91=E5=BE=AE=E4=BF=A1=E5=B0=8F=E5=BA=97?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=95=86=E5=93=81=E8=B5=A0=E5=93=81=E3=80=81?= =?UTF-8?q?=E9=99=90=E6=97=B6=E6=8A=A2=E8=B4=AD=E3=80=81=E5=BA=93=E5=AD=98?= =?UTF-8?q?=E5=8F=8A=E5=95=86=E5=93=81=E8=BE=85=E5=8A=A9=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E7=AD=89=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- weixin-java-channel/pom.xml | 1 + .../channel/api/WxChannelGiftService.java | 102 +++++++++++ .../api/WxChannelLimitedDiscountService.java | 62 +++++++ .../api/WxChannelProductAssistantService.java | 77 ++++++++ .../api/WxChannelProductStockService.java | 56 ++++++ .../weixin/channel/api/WxChannelService.java | 36 ++++ .../api/impl/BaseWxChannelServiceImpl.java | 29 ++- .../api/impl/WxChannelGiftServiceImpl.java | 104 +++++++++++ .../WxChannelLimitedDiscountServiceImpl.java | 68 +++++++ .../WxChannelProductAssistantServiceImpl.java | 77 ++++++++ .../api/impl/WxChannelProductServiceImpl.java | 105 ++++------- .../WxChannelProductStockServiceImpl.java | 62 +++++++ .../channel/bean/limit/LimitSkuUpdate.java | 32 ++++ .../bean/limit/LimitTaskUpdateParam.java | 41 +++++ .../bean/limit/LimitTaskUpdateResponse.java | 26 +++ .../assistant/BeginTimingSaleParam.java | 24 +++ .../assistant/CancelTimingSaleParam.java | 20 +++ .../assistant/CategoryPreCheckParam.java | 20 +++ .../assistant/CategoryPreCheckResponse.java | 27 +++ .../product/assistant/ExternalAttribute.java | 24 +++ .../ExternalProductMappingNewParam.java | 41 +++++ .../ExternalProductMappingNewResponse.java | 23 +++ .../ExternalProductMappingParam.java | 32 ++++ .../ExternalProductMappingResponse.java | 35 ++++ .../assistant/ProductBrandRecommendParam.java | 33 ++++ .../ProductBrandRecommendResponse.java | 30 ++++ .../bean/product/stock/StockFlowExtInfo.java | 44 +++++ .../bean/product/stock/StockFlowInfo.java | 44 +++++ .../bean/product/stock/StockFlowParam.java | 57 ++++++ .../bean/product/stock/StockFlowResponse.java | 48 +++++ .../constant/WxChannelApiUrlConstants.java | 17 ++ ...ChannelLimitedDiscountServiceImplTest.java | 62 +++++++ ...hannelProductAssistantServiceImplTest.java | 169 ++++++++++++++++++ .../WxChannelProductStockServiceImplTest.java | 81 +++++++++ .../api/impl/WxChannelServiceImplTest.java | 154 ++++++++++++++++ .../src/test/resources/testng.xml | 8 + 36 files changed, 1797 insertions(+), 74 deletions(-) create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelGiftService.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelLimitedDiscountService.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelProductAssistantService.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelProductStockService.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelGiftServiceImpl.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelLimitedDiscountServiceImpl.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelProductAssistantServiceImpl.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelProductStockServiceImpl.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/limit/LimitSkuUpdate.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/limit/LimitTaskUpdateParam.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/limit/LimitTaskUpdateResponse.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/BeginTimingSaleParam.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/CancelTimingSaleParam.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/CategoryPreCheckParam.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/CategoryPreCheckResponse.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ExternalAttribute.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ExternalProductMappingNewParam.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ExternalProductMappingNewResponse.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ExternalProductMappingParam.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ExternalProductMappingResponse.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ProductBrandRecommendParam.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ProductBrandRecommendResponse.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/stock/StockFlowExtInfo.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/stock/StockFlowInfo.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/stock/StockFlowParam.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/stock/StockFlowResponse.java create mode 100644 weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelLimitedDiscountServiceImplTest.java create mode 100644 weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelProductAssistantServiceImplTest.java create mode 100644 weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelProductStockServiceImplTest.java create mode 100644 weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelServiceImplTest.java diff --git a/weixin-java-channel/pom.xml b/weixin-java-channel/pom.xml index 10417674f6..7542900495 100644 --- a/weixin-java-channel/pom.xml +++ b/weixin-java-channel/pom.xml @@ -133,6 +133,7 @@ org.apache.maven.plugins maven-surefire-plugin + false src/test/resources/testng.xml diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelGiftService.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelGiftService.java new file mode 100644 index 0000000000..23655e1905 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelGiftService.java @@ -0,0 +1,102 @@ +package me.chanjar.weixin.channel.api; + +import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; +import me.chanjar.weixin.channel.bean.product.GiftActivityAddResponse; +import me.chanjar.weixin.channel.bean.product.GiftActivityInfo; +import me.chanjar.weixin.channel.bean.product.GiftProductAddResponse; +import me.chanjar.weixin.channel.bean.product.GiftProductGetResponse; +import me.chanjar.weixin.channel.bean.product.GiftProductInfo; +import me.chanjar.weixin.channel.bean.product.GiftProductListParam; +import me.chanjar.weixin.channel.bean.product.GiftProductListResponse; +import me.chanjar.weixin.common.error.WxErrorException; + +/** + * 微信小店赠品与买赠活动服务。 + */ +public interface WxChannelGiftService { + + /** + * 添加非卖商品。 + * + * @param info 赠品信息 + * @return 添加赠品响应 + * @throws WxErrorException 异常 + */ + GiftProductAddResponse addGiftProduct(GiftProductInfo info) throws WxErrorException; + + /** + * 更新非卖商品。 + * + * @param info 赠品信息 + * @return 操作响应 + * @throws WxErrorException 异常 + */ + WxChannelBaseResponse updateGiftProduct(GiftProductInfo info) throws WxErrorException; + + /** + * 在售商品转赠品。 + * + * @param productId 商品ID + * @return 操作响应 + * @throws WxErrorException 异常 + */ + WxChannelBaseResponse setProductAsGift(String productId) throws WxErrorException; + + /** + * 获取赠品。 + * + * @param productId 赠品商品ID + * @return 赠品详情响应 + * @throws WxErrorException 异常 + */ + GiftProductGetResponse getGiftProduct(String productId) throws WxErrorException; + + /** + * 获取赠品列表。 + * + * @param param 查询参数 + * @return 赠品列表 + * @throws WxErrorException 异常 + */ + GiftProductListResponse listGiftProduct(GiftProductListParam param) throws WxErrorException; + + /** + * 更新赠品库存。 + * + * @param productId 赠品商品ID + * @param skuId 赠品sku_id + * @param diffType 修改类型 1增加 2减少 3设置 + * @param num 增加、减少或者设置的库存值 + * @return 操作响应 + * @throws WxErrorException 异常 + */ + WxChannelBaseResponse updateGiftStock(String productId, String skuId, Integer diffType, Integer num) + throws WxErrorException; + + /** + * 创建赠品活动。 + * + * @param info 活动信息 + * @return 创建赠品活动响应 + * @throws WxErrorException 异常 + */ + GiftActivityAddResponse addGiftActivity(GiftActivityInfo info) throws WxErrorException; + + /** + * 删除赠品活动。 + * + * @param activityId 活动ID + * @return 操作响应 + * @throws WxErrorException 异常 + */ + WxChannelBaseResponse deleteGiftActivity(String activityId) throws WxErrorException; + + /** + * 停止赠品活动。 + * + * @param activityId 活动ID + * @return 操作响应 + * @throws WxErrorException 异常 + */ + WxChannelBaseResponse stopGiftActivity(String activityId) throws WxErrorException; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelLimitedDiscountService.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelLimitedDiscountService.java new file mode 100644 index 0000000000..40e6776f60 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelLimitedDiscountService.java @@ -0,0 +1,62 @@ +package me.chanjar.weixin.channel.api; + +import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; +import me.chanjar.weixin.channel.bean.limit.LimitTaskAddResponse; +import me.chanjar.weixin.channel.bean.limit.LimitTaskListResponse; +import me.chanjar.weixin.channel.bean.limit.LimitTaskParam; +import me.chanjar.weixin.channel.bean.limit.LimitTaskUpdateParam; +import me.chanjar.weixin.channel.bean.limit.LimitTaskUpdateResponse; +import me.chanjar.weixin.common.error.WxErrorException; + +/** + * 微信小店限时抢购服务。 + */ +public interface WxChannelLimitedDiscountService { + + /** + * 添加限时抢购任务。 + * + * @param param 限时抢购任务 + * @return 添加任务响应 + * @throws WxErrorException 异常 + */ + LimitTaskAddResponse addLimitTask(LimitTaskParam param) throws WxErrorException; + + /** + * 拉取限时抢购任务列表。 + * + * @param pageSize 每页数量 + * @param nextKey 翻页上下文 + * @param status 抢购活动状态 + * @return 任务列表响应 + * @throws WxErrorException 异常 + */ + LimitTaskListResponse listLimitTask(Integer pageSize, String nextKey, Integer status) throws WxErrorException; + + /** + * 停止限时抢购任务。 + * + * @param taskId 限时抢购任务ID + * @return 操作响应 + * @throws WxErrorException 异常 + */ + WxChannelBaseResponse stopLimitTask(String taskId) throws WxErrorException; + + /** + * 删除限时抢购任务。 + * + * @param taskId 限时抢购任务ID + * @return 操作响应 + * @throws WxErrorException 异常 + */ + WxChannelBaseResponse deleteLimitTask(String taskId) throws WxErrorException; + + /** + * 更新限时抢购任务。 + * + * @param param 更新任务参数 + * @return 更新任务响应 + * @throws WxErrorException 异常 + */ + LimitTaskUpdateResponse updateLimitTask(LimitTaskUpdateParam param) throws WxErrorException; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelProductAssistantService.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelProductAssistantService.java new file mode 100644 index 0000000000..2f39249f0c --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelProductAssistantService.java @@ -0,0 +1,77 @@ +package me.chanjar.weixin.channel.api; + +import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; +import me.chanjar.weixin.channel.bean.product.assistant.BeginTimingSaleParam; +import me.chanjar.weixin.channel.bean.product.assistant.CancelTimingSaleParam; +import me.chanjar.weixin.channel.bean.product.assistant.CategoryPreCheckParam; +import me.chanjar.weixin.channel.bean.product.assistant.CategoryPreCheckResponse; +import me.chanjar.weixin.channel.bean.product.assistant.ExternalProductMappingNewParam; +import me.chanjar.weixin.channel.bean.product.assistant.ExternalProductMappingNewResponse; +import me.chanjar.weixin.channel.bean.product.assistant.ExternalProductMappingParam; +import me.chanjar.weixin.channel.bean.product.assistant.ExternalProductMappingResponse; +import me.chanjar.weixin.channel.bean.product.assistant.ProductBrandRecommendParam; +import me.chanjar.weixin.channel.bean.product.assistant.ProductBrandRecommendResponse; +import me.chanjar.weixin.common.error.WxErrorException; + +/** + * 微信小店商品辅助功能服务。 + */ +public interface WxChannelProductAssistantService { + + /** + * 发品前校验。 + * + * @param param 校验参数 + * @return 校验结果 + * @throws WxErrorException 异常 + */ + CategoryPreCheckResponse categoryPreCheck(CategoryPreCheckParam param) throws WxErrorException; + + /** + * 获取商品品牌推荐。 + * + * @param param 推荐参数 + * @return 推荐结果 + * @throws WxErrorException 异常 + */ + ProductBrandRecommendResponse getProductBrandRecommend(ProductBrandRecommendParam param) + throws WxErrorException; + + /** + * 获取站内外商品属性映射。 + * + * @param param 映射参数 + * @return 映射结果 + * @throws WxErrorException 异常 + */ + ExternalProductMappingResponse externalProductMapping(ExternalProductMappingParam param) + throws WxErrorException; + + /** + * 获取商品属性映射及推荐。 + * + * @param param 映射参数 + * @return 映射结果 + * @throws WxErrorException 异常 + */ + ExternalProductMappingNewResponse externalProductMappingNew(ExternalProductMappingNewParam param) + throws WxErrorException; + + /** + * 将定时开售商品改为立即开售。 + * + * @param param 开售参数 + * @return 操作结果 + * @throws WxErrorException 异常 + */ + WxChannelBaseResponse beginTimingSale(BeginTimingSaleParam param) throws WxErrorException; + + /** + * 取消商品定时开售。 + * + * @param param 取消参数 + * @return 操作结果 + * @throws WxErrorException 异常 + */ + WxChannelBaseResponse cancelTimingSale(CancelTimingSaleParam param) throws WxErrorException; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelProductStockService.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelProductStockService.java new file mode 100644 index 0000000000..dc2fa4f587 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelProductStockService.java @@ -0,0 +1,56 @@ +package me.chanjar.weixin.channel.api; + +import java.util.List; +import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; +import me.chanjar.weixin.channel.bean.product.SkuStockBatchResponse; +import me.chanjar.weixin.channel.bean.product.SkuStockResponse; +import me.chanjar.weixin.channel.bean.product.stock.StockFlowParam; +import me.chanjar.weixin.channel.bean.product.stock.StockFlowResponse; +import me.chanjar.weixin.common.error.WxErrorException; + +/** + * 微信小店商品库存服务。 + */ +public interface WxChannelProductStockService { + + /** + * 更新商品库存。 + * + * @param productId 商品ID + * @param skuId 商品sku_id + * @param diffType 修改类型 1增加 2减少 3设置 + * @param num 增加、减少或者设置的库存值 + * @return 操作响应 + * @throws WxErrorException 异常 + */ + WxChannelBaseResponse updateStock(String productId, String skuId, Integer diffType, Integer num) + throws WxErrorException; + + /** + * 获取商品实时库存。 + * + * @param productId 商品ID + * @param skuId 商品sku_id + * @return 库存响应 + * @throws WxErrorException 异常 + */ + SkuStockResponse getSkuStock(String productId, String skuId) throws WxErrorException; + + /** + * 批量获取库存信息。 + * + * @param productIds 商品ID列表,单次请求不超过50个 + * @return 库存信息 + * @throws WxErrorException 异常 + */ + SkuStockBatchResponse getSkuStockBatch(List productIds) throws WxErrorException; + + /** + * 获取商品库存流水。 + * + * @param param 库存流水查询参数 + * @return 库存流水响应 + * @throws WxErrorException 异常 + */ + StockFlowResponse getStockFlow(StockFlowParam param) throws WxErrorException; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelService.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelService.java index 64c21408c3..52cc924bc9 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelService.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelService.java @@ -35,6 +35,42 @@ public interface WxChannelService extends BaseWxChannelService { */ WxChannelProductService getProductService(); + /** + * 赠品与买赠活动服务 + * + * @return 赠品与买赠活动服务 + */ + default WxChannelGiftService getGiftService() { + throw new UnsupportedOperationException("Gift service is not supported by this implementation"); + } + + /** + * 限时抢购服务 + * + * @return 限时抢购服务 + */ + default WxChannelLimitedDiscountService getLimitedDiscountService() { + throw new UnsupportedOperationException("Limited discount service is not supported by this implementation"); + } + + /** + * 商品库存服务 + * + * @return 商品库存服务 + */ + default WxChannelProductStockService getProductStockService() { + throw new UnsupportedOperationException("Product stock service is not supported by this implementation"); + } + + /** + * 商品辅助功能服务 + * + * @return 商品辅助功能服务 + */ + default WxChannelProductAssistantService getProductAssistantService() { + throw new UnsupportedOperationException("Product assistant service is not supported by this implementation"); + } + /** * 仓库服务 * diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/BaseWxChannelServiceImpl.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/BaseWxChannelServiceImpl.java index fd432e9725..b167af0d4d 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/BaseWxChannelServiceImpl.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/BaseWxChannelServiceImpl.java @@ -37,7 +37,14 @@ public abstract class BaseWxChannelServiceImpl implements WxChannelService private final WxChannelBasicService basicService = new WxChannelBasicServiceImpl(this); private final WxChannelCategoryService categoryService = new WxChannelCategoryServiceImpl(this); private final WxChannelBrandService brandService = new WxChannelBrandServiceImpl(this); - private final WxChannelProductService productService = new WxChannelProductServiceImpl(this); + private final WxChannelGiftService giftService = new WxChannelGiftServiceImpl(this); + private final WxChannelLimitedDiscountService limitedDiscountService = + new WxChannelLimitedDiscountServiceImpl(this); + private final WxChannelProductStockService productStockService = new WxChannelProductStockServiceImpl(this); + private final WxChannelProductAssistantService productAssistantService = + new WxChannelProductAssistantServiceImpl(this); + private final WxChannelProductService productService = new WxChannelProductServiceImpl( + this, giftService, limitedDiscountService, productStockService); private final WxChannelWarehouseService warehouseService = new WxChannelWarehouseServiceImpl(this); private final WxChannelOrderService orderService = new WxChannelOrderServiceImpl(this); private final WxChannelAfterSaleService afterSaleService = new WxChannelAfterSaleServiceImpl(this); @@ -336,6 +343,26 @@ public WxChannelProductService getProductService() { return productService; } + @Override + public WxChannelGiftService getGiftService() { + return giftService; + } + + @Override + public WxChannelLimitedDiscountService getLimitedDiscountService() { + return limitedDiscountService; + } + + @Override + public WxChannelProductStockService getProductStockService() { + return productStockService; + } + + @Override + public WxChannelProductAssistantService getProductAssistantService() { + return productAssistantService; + } + @Override public WxChannelWarehouseService getWarehouseService() { return warehouseService; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelGiftServiceImpl.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelGiftServiceImpl.java new file mode 100644 index 0000000000..5d6a16bdc1 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelGiftServiceImpl.java @@ -0,0 +1,104 @@ +package me.chanjar.weixin.channel.api.impl; + +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.GIFT_ACTIVITY_ADD_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.GIFT_ACTIVITY_DELETE_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.GIFT_ACTIVITY_STOP_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.GIFT_PRODUCT_ADD_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.GIFT_PRODUCT_GET_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.GIFT_PRODUCT_LIST_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.GIFT_PRODUCT_ON_SALE_SET_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.GIFT_PRODUCT_STOCK_UPDATE_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.GIFT_PRODUCT_UPDATE_URL; + +import me.chanjar.weixin.channel.api.WxChannelGiftService; +import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; +import me.chanjar.weixin.channel.bean.product.GiftActivityAddParam; +import me.chanjar.weixin.channel.bean.product.GiftActivityAddResponse; +import me.chanjar.weixin.channel.bean.product.GiftActivityInfo; +import me.chanjar.weixin.channel.bean.product.GiftProductAddResponse; +import me.chanjar.weixin.channel.bean.product.GiftProductGetResponse; +import me.chanjar.weixin.channel.bean.product.GiftProductInfo; +import me.chanjar.weixin.channel.bean.product.GiftProductListParam; +import me.chanjar.weixin.channel.bean.product.GiftProductListResponse; +import me.chanjar.weixin.channel.bean.product.SkuStockParam; +import me.chanjar.weixin.channel.util.JsonUtils; +import me.chanjar.weixin.channel.util.ResponseUtils; +import me.chanjar.weixin.common.error.WxErrorException; + +/** + * 微信小店赠品与买赠活动服务实现。 + */ +public class WxChannelGiftServiceImpl implements WxChannelGiftService { + + private final BaseWxChannelServiceImpl shopService; + + public WxChannelGiftServiceImpl(BaseWxChannelServiceImpl shopService) { + this.shopService = shopService; + } + + @Override + public GiftProductAddResponse addGiftProduct(GiftProductInfo info) throws WxErrorException { + String reqJson = JsonUtils.encode(info); + String resJson = shopService.post(GIFT_PRODUCT_ADD_URL, reqJson); + return ResponseUtils.decode(resJson, GiftProductAddResponse.class); + } + + @Override + public WxChannelBaseResponse updateGiftProduct(GiftProductInfo info) throws WxErrorException { + String reqJson = JsonUtils.encode(info); + String resJson = shopService.post(GIFT_PRODUCT_UPDATE_URL, reqJson); + return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); + } + + @Override + public WxChannelBaseResponse setProductAsGift(String productId) throws WxErrorException { + String reqJson = "{\"product_id\":\"" + productId + "\"}"; + String resJson = shopService.post(GIFT_PRODUCT_ON_SALE_SET_URL, reqJson); + return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); + } + + @Override + public GiftProductGetResponse getGiftProduct(String productId) throws WxErrorException { + String reqJson = "{\"product_id\":\"" + productId + "\"}"; + String resJson = shopService.post(GIFT_PRODUCT_GET_URL, reqJson); + return ResponseUtils.decode(resJson, GiftProductGetResponse.class); + } + + @Override + public GiftProductListResponse listGiftProduct(GiftProductListParam param) throws WxErrorException { + String reqJson = JsonUtils.encode(param); + String resJson = shopService.post(GIFT_PRODUCT_LIST_URL, reqJson); + return ResponseUtils.decode(resJson, GiftProductListResponse.class); + } + + @Override + public WxChannelBaseResponse updateGiftStock(String productId, String skuId, Integer diffType, Integer num) + throws WxErrorException { + SkuStockParam param = new SkuStockParam(productId, skuId, diffType, num); + String reqJson = JsonUtils.encode(param); + String resJson = shopService.post(GIFT_PRODUCT_STOCK_UPDATE_URL, reqJson); + return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); + } + + @Override + public GiftActivityAddResponse addGiftActivity(GiftActivityInfo info) throws WxErrorException { + GiftActivityAddParam param = new GiftActivityAddParam(info); + String reqJson = JsonUtils.encode(param); + String resJson = shopService.post(GIFT_ACTIVITY_ADD_URL, reqJson); + return ResponseUtils.decode(resJson, GiftActivityAddResponse.class); + } + + @Override + public WxChannelBaseResponse deleteGiftActivity(String activityId) throws WxErrorException { + String reqJson = "{\"activity_id\":\"" + activityId + "\"}"; + String resJson = shopService.post(GIFT_ACTIVITY_DELETE_URL, reqJson); + return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); + } + + @Override + public WxChannelBaseResponse stopGiftActivity(String activityId) throws WxErrorException { + String reqJson = "{\"activity_id\":\"" + activityId + "\"}"; + String resJson = shopService.post(GIFT_ACTIVITY_STOP_URL, reqJson); + return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); + } +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelLimitedDiscountServiceImpl.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelLimitedDiscountServiceImpl.java new file mode 100644 index 0000000000..26cca4d400 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelLimitedDiscountServiceImpl.java @@ -0,0 +1,68 @@ +package me.chanjar.weixin.channel.api.impl; + +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.ADD_LIMIT_TASK_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.DELETE_LIMIT_TASK_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.LIST_LIMIT_TASK_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.STOP_LIMIT_TASK_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.UPDATE_LIMIT_TASK_URL; + +import me.chanjar.weixin.channel.api.WxChannelLimitedDiscountService; +import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; +import me.chanjar.weixin.channel.bean.limit.LimitTaskAddResponse; +import me.chanjar.weixin.channel.bean.limit.LimitTaskListParam; +import me.chanjar.weixin.channel.bean.limit.LimitTaskListResponse; +import me.chanjar.weixin.channel.bean.limit.LimitTaskParam; +import me.chanjar.weixin.channel.bean.limit.LimitTaskUpdateParam; +import me.chanjar.weixin.channel.bean.limit.LimitTaskUpdateResponse; +import me.chanjar.weixin.channel.util.JsonUtils; +import me.chanjar.weixin.channel.util.ResponseUtils; +import me.chanjar.weixin.common.error.WxErrorException; + +/** + * 微信小店限时抢购服务实现。 + */ +public class WxChannelLimitedDiscountServiceImpl implements WxChannelLimitedDiscountService { + + private final BaseWxChannelServiceImpl shopService; + + public WxChannelLimitedDiscountServiceImpl(BaseWxChannelServiceImpl shopService) { + this.shopService = shopService; + } + + @Override + public LimitTaskAddResponse addLimitTask(LimitTaskParam param) throws WxErrorException { + String reqJson = JsonUtils.encode(param); + String resJson = shopService.post(ADD_LIMIT_TASK_URL, reqJson); + return ResponseUtils.decode(resJson, LimitTaskAddResponse.class); + } + + @Override + public LimitTaskListResponse listLimitTask(Integer pageSize, String nextKey, Integer status) + throws WxErrorException { + LimitTaskListParam param = new LimitTaskListParam(pageSize, nextKey, status); + String reqJson = JsonUtils.encode(param); + String resJson = shopService.post(LIST_LIMIT_TASK_URL, reqJson); + return ResponseUtils.decode(resJson, LimitTaskListResponse.class); + } + + @Override + public WxChannelBaseResponse stopLimitTask(String taskId) throws WxErrorException { + String reqJson = "{\"task_id\": \"" + taskId + "\"}"; + String resJson = shopService.post(STOP_LIMIT_TASK_URL, reqJson); + return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); + } + + @Override + public WxChannelBaseResponse deleteLimitTask(String taskId) throws WxErrorException { + String reqJson = "{\"task_id\": \"" + taskId + "\"}"; + String resJson = shopService.post(DELETE_LIMIT_TASK_URL, reqJson); + return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); + } + + @Override + public LimitTaskUpdateResponse updateLimitTask(LimitTaskUpdateParam param) throws WxErrorException { + String reqJson = JsonUtils.encode(param); + String resJson = shopService.post(UPDATE_LIMIT_TASK_URL, reqJson); + return ResponseUtils.decode(resJson, LimitTaskUpdateResponse.class); + } +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelProductAssistantServiceImpl.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelProductAssistantServiceImpl.java new file mode 100644 index 0000000000..7f1de84d02 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelProductAssistantServiceImpl.java @@ -0,0 +1,77 @@ +package me.chanjar.weixin.channel.api.impl; + +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.BEGIN_TIMING_SALE_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.CANCEL_TIMING_SALE_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.CATEGORY_PRE_CHECK_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.EXTERNAL_PRODUCT_MAPPING_NEW_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.EXTERNAL_PRODUCT_MAPPING_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.PRODUCT_BRAND_RECOMMEND_URL; + +import me.chanjar.weixin.channel.api.WxChannelProductAssistantService; +import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; +import me.chanjar.weixin.channel.bean.product.assistant.BeginTimingSaleParam; +import me.chanjar.weixin.channel.bean.product.assistant.CancelTimingSaleParam; +import me.chanjar.weixin.channel.bean.product.assistant.CategoryPreCheckParam; +import me.chanjar.weixin.channel.bean.product.assistant.CategoryPreCheckResponse; +import me.chanjar.weixin.channel.bean.product.assistant.ExternalProductMappingNewParam; +import me.chanjar.weixin.channel.bean.product.assistant.ExternalProductMappingNewResponse; +import me.chanjar.weixin.channel.bean.product.assistant.ExternalProductMappingParam; +import me.chanjar.weixin.channel.bean.product.assistant.ExternalProductMappingResponse; +import me.chanjar.weixin.channel.bean.product.assistant.ProductBrandRecommendParam; +import me.chanjar.weixin.channel.bean.product.assistant.ProductBrandRecommendResponse; +import me.chanjar.weixin.channel.util.JsonUtils; +import me.chanjar.weixin.channel.util.ResponseUtils; +import me.chanjar.weixin.common.error.WxErrorException; + +/** + * 微信小店商品辅助功能服务实现。 + */ +public class WxChannelProductAssistantServiceImpl implements WxChannelProductAssistantService { + + /** 微信商店服务 */ + private final BaseWxChannelServiceImpl shopService; + + public WxChannelProductAssistantServiceImpl(BaseWxChannelServiceImpl shopService) { + this.shopService = shopService; + } + + @Override + public CategoryPreCheckResponse categoryPreCheck(CategoryPreCheckParam param) throws WxErrorException { + return post(CATEGORY_PRE_CHECK_URL, param, CategoryPreCheckResponse.class); + } + + @Override + public ProductBrandRecommendResponse getProductBrandRecommend(ProductBrandRecommendParam param) + throws WxErrorException { + return post(PRODUCT_BRAND_RECOMMEND_URL, param, ProductBrandRecommendResponse.class); + } + + @Override + public ExternalProductMappingResponse externalProductMapping(ExternalProductMappingParam param) + throws WxErrorException { + return post(EXTERNAL_PRODUCT_MAPPING_URL, param, ExternalProductMappingResponse.class); + } + + @Override + public ExternalProductMappingNewResponse externalProductMappingNew(ExternalProductMappingNewParam param) + throws WxErrorException { + return post(EXTERNAL_PRODUCT_MAPPING_NEW_URL, param, ExternalProductMappingNewResponse.class); + } + + @Override + public WxChannelBaseResponse beginTimingSale(BeginTimingSaleParam param) throws WxErrorException { + return post(BEGIN_TIMING_SALE_URL, param, WxChannelBaseResponse.class); + } + + @Override + public WxChannelBaseResponse cancelTimingSale(CancelTimingSaleParam param) throws WxErrorException { + return post(CANCEL_TIMING_SALE_URL, param, WxChannelBaseResponse.class); + } + + private T post(String url, Object param, Class responseType) + throws WxErrorException { + String reqJson = JsonUtils.encode(param); + String resJson = shopService.post(url, reqJson); + return ResponseUtils.decode(resJson, responseType); + } +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelProductServiceImpl.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelProductServiceImpl.java index b3974e0aa7..a7fc91c840 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelProductServiceImpl.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelProductServiceImpl.java @@ -1,44 +1,29 @@ package me.chanjar.weixin.channel.api.impl; -import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.ADD_LIMIT_TASK_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.CANCEL_AUDIT_URL; -import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.DELETE_LIMIT_TASK_URL; -import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.GIFT_ACTIVITY_ADD_URL; -import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.GIFT_ACTIVITY_DELETE_URL; -import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.GIFT_ACTIVITY_STOP_URL; -import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.GIFT_PRODUCT_ADD_URL; -import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.GIFT_PRODUCT_GET_URL; -import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.GIFT_PRODUCT_LIST_URL; -import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.GIFT_PRODUCT_ON_SALE_SET_URL; -import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.GIFT_PRODUCT_STOCK_UPDATE_URL; -import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.GIFT_PRODUCT_UPDATE_URL; -import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.LIST_LIMIT_TASK_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_ADD_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_AUDIT_FREE_UPDATE_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_DELISTING_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_DEL_URL; -import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_GET_STOCK_BATCH_URL; -import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_GET_STOCK_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_GET_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_H5URL_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_LISTING_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_LIST_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_QRCODE_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_TAGLINK_URL; -import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_UPDATE_STOCK_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_UPDATE_URL; -import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.STOP_LIMIT_TASK_URL; import java.util.List; import lombok.extern.slf4j.Slf4j; +import me.chanjar.weixin.channel.api.WxChannelGiftService; +import me.chanjar.weixin.channel.api.WxChannelLimitedDiscountService; import me.chanjar.weixin.channel.api.WxChannelProductService; +import me.chanjar.weixin.channel.api.WxChannelProductStockService; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; import me.chanjar.weixin.channel.bean.limit.LimitTaskAddResponse; -import me.chanjar.weixin.channel.bean.limit.LimitTaskListParam; import me.chanjar.weixin.channel.bean.limit.LimitTaskListResponse; import me.chanjar.weixin.channel.bean.limit.LimitTaskParam; -import me.chanjar.weixin.channel.bean.product.GiftActivityAddParam; import me.chanjar.weixin.channel.bean.product.GiftActivityAddResponse; import me.chanjar.weixin.channel.bean.product.GiftActivityInfo; import me.chanjar.weixin.channel.bean.product.GiftProductAddResponse; @@ -46,9 +31,7 @@ import me.chanjar.weixin.channel.bean.product.GiftProductInfo; import me.chanjar.weixin.channel.bean.product.GiftProductListParam; import me.chanjar.weixin.channel.bean.product.GiftProductListResponse; -import me.chanjar.weixin.channel.bean.product.SkuStockBatchParam; import me.chanjar.weixin.channel.bean.product.SkuStockBatchResponse; -import me.chanjar.weixin.channel.bean.product.SkuStockParam; import me.chanjar.weixin.channel.bean.product.SkuStockResponse; import me.chanjar.weixin.channel.bean.product.SpuFastInfo; import me.chanjar.weixin.channel.bean.product.SpuGetResponse; @@ -74,9 +57,22 @@ public class WxChannelProductServiceImpl implements WxChannelProductService { /** 微信商店服务 */ private final BaseWxChannelServiceImpl shopService; + private final WxChannelGiftService giftService; + private final WxChannelLimitedDiscountService limitedDiscountService; + private final WxChannelProductStockService productStockService; public WxChannelProductServiceImpl(BaseWxChannelServiceImpl shopService) { + this(shopService, new WxChannelGiftServiceImpl(shopService), + new WxChannelLimitedDiscountServiceImpl(shopService), new WxChannelProductStockServiceImpl(shopService)); + } + + WxChannelProductServiceImpl(BaseWxChannelServiceImpl shopService, WxChannelGiftService giftService, + WxChannelLimitedDiscountService limitedDiscountService, + WxChannelProductStockService productStockService) { this.shopService = shopService; + this.giftService = giftService; + this.limitedDiscountService = limitedDiscountService; + this.productStockService = productStockService; } @Override @@ -117,10 +113,7 @@ public WxChannelBaseResponse updateProductAuditFree(SpuFastInfo info) throws WxE @Override public WxChannelBaseResponse updateStock(String productId, String skuId, Integer diffType, Integer num) throws WxErrorException { - SkuStockParam param = new SkuStockParam(productId, skuId, diffType, num); - String reqJson = JsonUtils.encode(param); - String resJson = shopService.post(SPU_UPDATE_STOCK_URL, reqJson); - return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); + return productStockService.updateStock(productId, skuId, diffType, num); } /** @@ -194,17 +187,12 @@ public WxChannelBaseResponse downProduct(String productId) throws WxErrorExcepti @Override public SkuStockResponse getSkuStock(String productId, String skuId) throws WxErrorException { - String reqJson = "{\"product_id\":\"" + productId + "\",\"sku_id\":\"" + skuId + "\"}"; - String resJson = shopService.post(SPU_GET_STOCK_URL, reqJson); - return ResponseUtils.decode(resJson, SkuStockResponse.class); + return productStockService.getSkuStock(productId, skuId); } @Override public SkuStockBatchResponse getSkuStockBatch(List productIds) throws WxErrorException { - SkuStockBatchParam param = new SkuStockBatchParam(productIds); - String reqJson = JsonUtils.encode(param); - String resJson = shopService.post(SPU_GET_STOCK_BATCH_URL, reqJson); - return ResponseUtils.decode(resJson, SkuStockBatchResponse.class); + return productStockService.getSkuStockBatch(productIds); } @Override @@ -230,97 +218,68 @@ public ProductTagLinkResponse getProductTagLink(String productId) throws WxError @Override public GiftProductAddResponse addGiftProduct(GiftProductInfo info) throws WxErrorException { - String reqJson = JsonUtils.encode(info); - String resJson = shopService.post(GIFT_PRODUCT_ADD_URL, reqJson); - return ResponseUtils.decode(resJson, GiftProductAddResponse.class); + return giftService.addGiftProduct(info); } @Override public WxChannelBaseResponse updateGiftProduct(GiftProductInfo info) throws WxErrorException { - String reqJson = JsonUtils.encode(info); - String resJson = shopService.post(GIFT_PRODUCT_UPDATE_URL, reqJson); - return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); + return giftService.updateGiftProduct(info); } @Override public WxChannelBaseResponse setProductAsGift(String productId) throws WxErrorException { - String reqJson = "{\"product_id\":\"" + productId + "\"}"; - String resJson = shopService.post(GIFT_PRODUCT_ON_SALE_SET_URL, reqJson); - return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); + return giftService.setProductAsGift(productId); } @Override public GiftProductGetResponse getGiftProduct(String productId) throws WxErrorException { - String reqJson = "{\"product_id\":\"" + productId + "\"}"; - String resJson = shopService.post(GIFT_PRODUCT_GET_URL, reqJson); - return ResponseUtils.decode(resJson, GiftProductGetResponse.class); + return giftService.getGiftProduct(productId); } @Override public GiftProductListResponse listGiftProduct(GiftProductListParam param) throws WxErrorException { - String reqJson = JsonUtils.encode(param); - String resJson = shopService.post(GIFT_PRODUCT_LIST_URL, reqJson); - return ResponseUtils.decode(resJson, GiftProductListResponse.class); + return giftService.listGiftProduct(param); } @Override public WxChannelBaseResponse updateGiftStock(String productId, String skuId, Integer diffType, Integer num) throws WxErrorException { - SkuStockParam param = new SkuStockParam(productId, skuId, diffType, num); - String reqJson = JsonUtils.encode(param); - String resJson = shopService.post(GIFT_PRODUCT_STOCK_UPDATE_URL, reqJson); - return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); + return giftService.updateGiftStock(productId, skuId, diffType, num); } @Override public GiftActivityAddResponse addGiftActivity(GiftActivityInfo info) throws WxErrorException { - GiftActivityAddParam param = new GiftActivityAddParam(info); - String reqJson = JsonUtils.encode(param); - String resJson = shopService.post(GIFT_ACTIVITY_ADD_URL, reqJson); - return ResponseUtils.decode(resJson, GiftActivityAddResponse.class); + return giftService.addGiftActivity(info); } @Override public WxChannelBaseResponse deleteGiftActivity(String activityId) throws WxErrorException { - String reqJson = "{\"activity_id\":\"" + activityId + "\"}"; - String resJson = shopService.post(GIFT_ACTIVITY_DELETE_URL, reqJson); - return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); + return giftService.deleteGiftActivity(activityId); } @Override public WxChannelBaseResponse stopGiftActivity(String activityId) throws WxErrorException { - String reqJson = "{\"activity_id\":\"" + activityId + "\"}"; - String resJson = shopService.post(GIFT_ACTIVITY_STOP_URL, reqJson); - return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); + return giftService.stopGiftActivity(activityId); } @Override public LimitTaskAddResponse addLimitTask(LimitTaskParam param) throws WxErrorException { - String reqJson = JsonUtils.encode(param); - String resJson = shopService.post(ADD_LIMIT_TASK_URL, reqJson); - return ResponseUtils.decode(resJson, LimitTaskAddResponse.class); + return limitedDiscountService.addLimitTask(param); } @Override public LimitTaskListResponse listLimitTask(Integer pageSize, String nextKey, Integer status) throws WxErrorException { - LimitTaskListParam param = new LimitTaskListParam(pageSize, nextKey, status); - String reqJson = JsonUtils.encode(param); - String resJson = shopService.post(LIST_LIMIT_TASK_URL, reqJson); - return ResponseUtils.decode(resJson, LimitTaskListResponse.class); + return limitedDiscountService.listLimitTask(pageSize, nextKey, status); } @Override public WxChannelBaseResponse stopLimitTask(String taskId) throws WxErrorException { - String reqJson = "{\"task_id\": \"" + taskId + "\"}"; - String resJson = shopService.post(STOP_LIMIT_TASK_URL, reqJson); - return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); + return limitedDiscountService.stopLimitTask(taskId); } @Override public WxChannelBaseResponse deleteLimitTask(String taskId) throws WxErrorException { - String reqJson = "{\"task_id\": \"" + taskId + "\"}"; - String resJson = shopService.post(DELETE_LIMIT_TASK_URL, reqJson); - return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); + return limitedDiscountService.deleteLimitTask(taskId); } } diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelProductStockServiceImpl.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelProductStockServiceImpl.java new file mode 100644 index 0000000000..1b3b371420 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelProductStockServiceImpl.java @@ -0,0 +1,62 @@ +package me.chanjar.weixin.channel.api.impl; + +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_GET_STOCK_BATCH_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_GET_STOCK_FLOW_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_GET_STOCK_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_UPDATE_STOCK_URL; + +import java.util.List; +import me.chanjar.weixin.channel.api.WxChannelProductStockService; +import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; +import me.chanjar.weixin.channel.bean.product.SkuStockBatchParam; +import me.chanjar.weixin.channel.bean.product.SkuStockBatchResponse; +import me.chanjar.weixin.channel.bean.product.SkuStockParam; +import me.chanjar.weixin.channel.bean.product.SkuStockResponse; +import me.chanjar.weixin.channel.bean.product.stock.StockFlowParam; +import me.chanjar.weixin.channel.bean.product.stock.StockFlowResponse; +import me.chanjar.weixin.channel.util.JsonUtils; +import me.chanjar.weixin.channel.util.ResponseUtils; +import me.chanjar.weixin.common.error.WxErrorException; + +/** + * 微信小店商品库存服务实现。 + */ +public class WxChannelProductStockServiceImpl implements WxChannelProductStockService { + + private final BaseWxChannelServiceImpl shopService; + + public WxChannelProductStockServiceImpl(BaseWxChannelServiceImpl shopService) { + this.shopService = shopService; + } + + @Override + public WxChannelBaseResponse updateStock(String productId, String skuId, Integer diffType, Integer num) + throws WxErrorException { + SkuStockParam param = new SkuStockParam(productId, skuId, diffType, num); + String reqJson = JsonUtils.encode(param); + String resJson = shopService.post(SPU_UPDATE_STOCK_URL, reqJson); + return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); + } + + @Override + public SkuStockResponse getSkuStock(String productId, String skuId) throws WxErrorException { + String reqJson = "{\"product_id\":\"" + productId + "\",\"sku_id\":\"" + skuId + "\"}"; + String resJson = shopService.post(SPU_GET_STOCK_URL, reqJson); + return ResponseUtils.decode(resJson, SkuStockResponse.class); + } + + @Override + public SkuStockBatchResponse getSkuStockBatch(List productIds) throws WxErrorException { + SkuStockBatchParam param = new SkuStockBatchParam(productIds); + String reqJson = JsonUtils.encode(param); + String resJson = shopService.post(SPU_GET_STOCK_BATCH_URL, reqJson); + return ResponseUtils.decode(resJson, SkuStockBatchResponse.class); + } + + @Override + public StockFlowResponse getStockFlow(StockFlowParam param) throws WxErrorException { + String reqJson = JsonUtils.encode(param); + String resJson = shopService.post(SPU_GET_STOCK_FLOW_URL, reqJson); + return ResponseUtils.decode(resJson, StockFlowResponse.class); + } +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/limit/LimitSkuUpdate.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/limit/LimitSkuUpdate.java new file mode 100644 index 0000000000..98c14a4024 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/limit/LimitSkuUpdate.java @@ -0,0 +1,32 @@ +package me.chanjar.weixin.channel.bean.limit; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 限时抢购任务的 SKU 更新信息。 + */ +@Data +@NoArgsConstructor +public class LimitSkuUpdate implements Serializable { + + private static final long serialVersionUID = 4209672674401016015L; + + /** SKU 所属商品 ID。 */ + @JsonProperty("product_id") + private String productId; + + /** SKU ID。 */ + @JsonProperty("sku_id") + private String skuId; + + /** SKU 抢购价格,单位为分。 */ + @JsonProperty("sale_price") + private Integer salePrice; + + /** 参与抢购的商品库存。 */ + @JsonProperty("sale_stock") + private Integer saleStock; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/limit/LimitTaskUpdateParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/limit/LimitTaskUpdateParam.java new file mode 100644 index 0000000000..40c7650cea --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/limit/LimitTaskUpdateParam.java @@ -0,0 +1,41 @@ +package me.chanjar.weixin.channel.bean.limit; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 更新限时抢购任务请求参数。 + */ +@Data +@NoArgsConstructor +public class LimitTaskUpdateParam implements Serializable { + + private static final long serialVersionUID = 7277247203887803045L; + + /** 限时抢购任务 ID。 */ + @JsonProperty("task_id") + private String taskId; + + /** 当前活动状态:0 待开始,1 进行中。 */ + @JsonProperty("status") + private Integer status; + + /** 活动开始时间,秒级时间戳。 */ + @JsonProperty("start_time") + private Long startTime; + + /** 活动结束时间,秒级时间戳。 */ + @JsonProperty("end_time") + private Long endTime; + + /** 活动名称。 */ + @JsonProperty("title") + private String title; + + /** SKU 抢购信息列表。 */ + @JsonProperty("limited_discount_skus") + private List skus; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/limit/LimitTaskUpdateResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/limit/LimitTaskUpdateResponse.java new file mode 100644 index 0000000000..73afc8247e --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/limit/LimitTaskUpdateResponse.java @@ -0,0 +1,26 @@ +package me.chanjar.weixin.channel.bean.limit; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; + +/** + * 更新限时抢购任务响应。 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class LimitTaskUpdateResponse extends WxChannelBaseResponse { + + private static final long serialVersionUID = 4429517792042527433L; + + /** 限时抢购任务 ID。 */ + @JsonProperty("task_id") + private String taskId; + + /** 活动名称。 */ + @JsonProperty("title") + private String title; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/BeginTimingSaleParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/BeginTimingSaleParam.java new file mode 100644 index 0000000000..2a624ec434 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/BeginTimingSaleParam.java @@ -0,0 +1,24 @@ +package me.chanjar.weixin.channel.bean.product.assistant; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 商品立即开售参数。 + */ +@Data +@NoArgsConstructor +public class BeginTimingSaleParam implements Serializable { + + private static final long serialVersionUID = -1525220756273987016L; + + /** 商品 ID。 */ + @JsonProperty("product_id") + private String productId; + + /** 定时开售任务 ID。 */ + @JsonProperty("task_id") + private String taskId; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/CancelTimingSaleParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/CancelTimingSaleParam.java new file mode 100644 index 0000000000..25980a1489 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/CancelTimingSaleParam.java @@ -0,0 +1,20 @@ +package me.chanjar.weixin.channel.bean.product.assistant; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 取消商品开售参数。 + */ +@Data +@NoArgsConstructor +public class CancelTimingSaleParam implements Serializable { + + private static final long serialVersionUID = -3750831026611057323L; + + /** 商品 ID。 */ + @JsonProperty("product_id") + private String productId; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/CategoryPreCheckParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/CategoryPreCheckParam.java new file mode 100644 index 0000000000..ee93066660 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/CategoryPreCheckParam.java @@ -0,0 +1,20 @@ +package me.chanjar.weixin.channel.bean.product.assistant; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 发品前校验参数。 + */ +@Data +@NoArgsConstructor +public class CategoryPreCheckParam implements Serializable { + + private static final long serialVersionUID = 3616569394767815856L; + + /** 叶子类目 ID,不传时只校验店铺相关条件。 */ + @JsonProperty("cat_id") + private Long catId; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/CategoryPreCheckResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/CategoryPreCheckResponse.java new file mode 100644 index 0000000000..8559f2b0e2 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/CategoryPreCheckResponse.java @@ -0,0 +1,27 @@ +package me.chanjar.weixin.channel.bean.product.assistant; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; + +/** + * 发品前校验响应。 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class CategoryPreCheckResponse extends WxChannelBaseResponse { + + private static final long serialVersionUID = 8912798390684239592L; + + /** 是否全部校验通过。 */ + @JsonProperty("all_pass") + private Boolean allPass; + + /** 校验不通过的原因。 */ + @JsonProperty("fail_reasons") + private List failReasons; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ExternalAttribute.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ExternalAttribute.java new file mode 100644 index 0000000000..e173a85d02 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ExternalAttribute.java @@ -0,0 +1,24 @@ +package me.chanjar.weixin.channel.bean.product.assistant; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 商品属性键值对。 + */ +@Data +@NoArgsConstructor +public class ExternalAttribute implements Serializable { + + private static final long serialVersionUID = -8639178782951125101L; + + /** 属性名。 */ + @JsonProperty("key") + private String key; + + /** 属性值。 */ + @JsonProperty("value") + private String value; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ExternalProductMappingNewParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ExternalProductMappingNewParam.java new file mode 100644 index 0000000000..89e0be65cd --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ExternalProductMappingNewParam.java @@ -0,0 +1,41 @@ +package me.chanjar.weixin.channel.bean.product.assistant; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 商品属性映射及推荐参数。 + */ +@Data +@NoArgsConstructor +public class ExternalProductMappingNewParam implements Serializable { + + private static final long serialVersionUID = -4942505655791636645L; + + /** 叶子类目 ID。 */ + @JsonProperty("cat_id") + private Long catId; + + /** 外部商品类目名称。 */ + @JsonProperty("external_category_name") + private String externalCategoryName; + + /** 商品主图,至少一张。 */ + @JsonProperty("head_imgs") + private List headImgs; + + /** 商品详情图。 */ + @JsonProperty("detail_imgs") + private List detailImgs; + + /** 商品标题。 */ + @JsonProperty("title") + private String title; + + /** 外部商品属性列表。 */ + @JsonProperty("external_attributes") + private List externalAttributes; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ExternalProductMappingNewResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ExternalProductMappingNewResponse.java new file mode 100644 index 0000000000..87b09e03b4 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ExternalProductMappingNewResponse.java @@ -0,0 +1,23 @@ +package me.chanjar.weixin.channel.bean.product.assistant; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; + +/** + * 商品属性映射及推荐响应。 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class ExternalProductMappingNewResponse extends WxChannelBaseResponse { + + private static final long serialVersionUID = -6192580254142696913L; + + /** 映射属性结果。 */ + @JsonProperty("attributes") + private List attributes; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ExternalProductMappingParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ExternalProductMappingParam.java new file mode 100644 index 0000000000..c31e0f0f2d --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ExternalProductMappingParam.java @@ -0,0 +1,32 @@ +package me.chanjar.weixin.channel.bean.product.assistant; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 站内外商品属性映射参数。 + */ +@Data +@NoArgsConstructor +public class ExternalProductMappingParam implements Serializable { + + private static final long serialVersionUID = 1944528166283981889L; + + /** 叶子类目 ID。 */ + @JsonProperty("cat_id") + private Long catId; + + /** 外部商品属性名。 */ + @JsonProperty("external_attribute_name") + private String externalAttributeName; + + /** 外部商品属性值。 */ + @JsonProperty("external_attribute_value") + private String externalAttributeValue; + + /** 外部商品类目名称。 */ + @JsonProperty("external_category_name") + private String externalCategoryName; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ExternalProductMappingResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ExternalProductMappingResponse.java new file mode 100644 index 0000000000..e97d4a94d0 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ExternalProductMappingResponse.java @@ -0,0 +1,35 @@ +package me.chanjar.weixin.channel.bean.product.assistant; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; + +/** + * 站内外商品属性映射响应。 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class ExternalProductMappingResponse extends WxChannelBaseResponse { + + private static final long serialVersionUID = -2267639791023044849L; + + /** 外部商品属性名。 */ + @JsonProperty("external_attribute_name") + private String externalAttributeName; + + /** 外部商品属性值。 */ + @JsonProperty("external_attribute_value") + private String externalAttributeValue; + + /** 内部商品属性名。 */ + @JsonProperty("internal_attribute_name") + private String internalAttributeName; + + /** 内部商品属性值。 */ + @JsonProperty("internal_attribute_value") + private List internalAttributeValue; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ProductBrandRecommendParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ProductBrandRecommendParam.java new file mode 100644 index 0000000000..36a47bfc40 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ProductBrandRecommendParam.java @@ -0,0 +1,33 @@ +package me.chanjar.weixin.channel.bean.product.assistant; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 商品品牌推荐参数。 + */ +@Data +@NoArgsConstructor +public class ProductBrandRecommendParam implements Serializable { + + private static final long serialVersionUID = 4516219198778673928L; + + /** 叶子类目 ID。 */ + @JsonProperty("cat_id") + private Long catId; + + /** 商品主图,至少一张。 */ + @JsonProperty("head_imgs") + private List headImgs; + + /** 商品详情图。 */ + @JsonProperty("detail_imgs") + private List detailImgs; + + /** 商品标题。 */ + @JsonProperty("title") + private String title; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ProductBrandRecommendResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ProductBrandRecommendResponse.java new file mode 100644 index 0000000000..b7c0081085 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ProductBrandRecommendResponse.java @@ -0,0 +1,30 @@ +package me.chanjar.weixin.channel.bean.product.assistant; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; + +/** + * 商品品牌推荐响应。 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class ProductBrandRecommendResponse extends WxChannelBaseResponse { + + private static final long serialVersionUID = -7903894941180639923L; + + /** 品牌 ID。 */ + @JsonProperty("brand_id") + private Long brandId; + + /** 品牌中文名称。 */ + @JsonProperty("brand_name_chinese") + private String brandNameChinese; + + /** 品牌英文名称。 */ + @JsonProperty("brand_name_english") + private String brandNameEnglish; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/stock/StockFlowExtInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/stock/StockFlowExtInfo.java new file mode 100644 index 0000000000..c08e35c477 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/stock/StockFlowExtInfo.java @@ -0,0 +1,44 @@ +package me.chanjar.weixin.channel.bean.product.stock; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 库存流水额外信息。 + */ +@Data +@NoArgsConstructor +public class StockFlowExtInfo implements Serializable { + + private static final long serialVersionUID = 1170328051641116647L; + + /** 归还的源库存子类型。 */ + @JsonProperty("unmove_from_stock_sub_type") + private Integer unmoveFromStockSubType; + + /** 分配的目标库存子类型。 */ + @JsonProperty("move_to_stock_sub_type") + private Integer moveToStockSubType; + + /** 操作来源。 */ + @JsonProperty("upload_source") + private Integer uploadSource; + + /** 订单 ID。 */ + @JsonProperty("order_id") + private String orderId; + + /** 区域仓库 ID。 */ + @JsonProperty("out_warehouse_id") + private String outWarehouseId; + + /** 限时抢购任务 ID。 */ + @JsonProperty("limited_discount_id") + private String limitedDiscountId; + + /** 达人的视频号 finder_id。 */ + @JsonProperty("finder_id") + private String finderId; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/stock/StockFlowInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/stock/StockFlowInfo.java new file mode 100644 index 0000000000..a15b0018ea --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/stock/StockFlowInfo.java @@ -0,0 +1,44 @@ +package me.chanjar.weixin.channel.bean.product.stock; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 库存流水信息。 + */ +@Data +@NoArgsConstructor +public class StockFlowInfo implements Serializable { + + private static final long serialVersionUID = 4094168882102603379L; + + /** 操作数量。 */ + @JsonProperty("amount") + private Integer amount; + + /** 操作前数量。 */ + @JsonProperty("beginning_amount") + private Integer beginningAmount; + + /** 操作后数量。 */ + @JsonProperty("ending_amount") + private Integer endingAmount; + + /** 库存子类型。 */ + @JsonProperty("stock_sub_type") + private Integer stockSubType; + + /** 库存事件类型。 */ + @JsonProperty("op_type") + private Integer opType; + + /** 流水发生时间,秒级时间戳。 */ + @JsonProperty("update_time") + private Long updateTime; + + /** 额外信息。 */ + @JsonProperty("ext_info") + private StockFlowExtInfo extInfo; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/stock/StockFlowParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/stock/StockFlowParam.java new file mode 100644 index 0000000000..cacd2ca3e6 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/stock/StockFlowParam.java @@ -0,0 +1,57 @@ +package me.chanjar.weixin.channel.bean.product.stock; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 获取库存流水请求参数。 + */ +@Data +@NoArgsConstructor +public class StockFlowParam implements Serializable { + + private static final long serialVersionUID = -7882480822919984178L; + + /** 内部商品 ID。 */ + @JsonProperty("product_id") + private String productId; + + /** 内部 SKU ID。 */ + @JsonProperty("sku_id") + private String skuId; + + /** 库存类型。 */ + @JsonProperty("stock_type") + private Integer stockType; + + /** 达人的视频号 finder_id。 */ + @JsonProperty("finder_id") + private String finderId; + + /** 查询开始时间,秒级时间戳。 */ + @JsonProperty("begin_time") + private Long beginTime; + + /** 查询结束时间,秒级时间戳。 */ + @JsonProperty("end_time") + private Long endTime; + + /** 库存事件类型列表。 */ + @JsonProperty("op_type_list") + private List opTypeList; + + /** 每页数量。 */ + @JsonProperty("page_size") + private Integer pageSize; + + /** 上次请求返回的翻页上下文。 */ + @JsonProperty("next_key") + private String nextKey; + + /** 库存类型 ID。 */ + @JsonProperty("stock_type_id") + private String stockTypeId; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/stock/StockFlowResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/stock/StockFlowResponse.java new file mode 100644 index 0000000000..4f779b64ab --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/stock/StockFlowResponse.java @@ -0,0 +1,48 @@ +package me.chanjar.weixin.channel.bean.product.stock; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; + +/** + * 获取库存流水响应。 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class StockFlowResponse extends WxChannelBaseResponse { + + private static final long serialVersionUID = -7420844779570799705L; + + /** 本次翻页的上下文。 */ + private String nextKey; + + /** 库存流水。 */ + private List stockFlowInfoList; + + @JsonProperty("data") + private void unpackData(StockFlowData data) { + if (data == null) { + return; + } + this.nextKey = data.getNextKey(); + this.stockFlowInfoList = data.getStockFlowInfoList(); + } + + @Data + @NoArgsConstructor + private static class StockFlowData implements Serializable { + + private static final long serialVersionUID = -5455751387420196045L; + + @JsonProperty("next_key") + private String nextKey; + + @JsonProperty("stock_flow_info_list") + private List stockFlowInfoList; + } +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/constant/WxChannelApiUrlConstants.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/constant/WxChannelApiUrlConstants.java index b095589bf9..92ece47b2e 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/constant/WxChannelApiUrlConstants.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/constant/WxChannelApiUrlConstants.java @@ -166,6 +166,8 @@ public interface Spu { String SPU_GET_STOCK_BATCH_URL = "https://api.weixin.qq.com/channels/ec/product/stock/batchget"; /** 更新商品库存 */ String SPU_UPDATE_STOCK_URL = "https://api.weixin.qq.com/channels/ec/product/stock/update"; + /** 获取库存流水 */ + String SPU_GET_STOCK_FLOW_URL = "https://api.weixin.qq.com/channels/ec/product/stock/getflow"; /** 添加非卖商品 */ String GIFT_PRODUCT_ADD_URL = "https://api.weixin.qq.com/channels/ec/product/gift/add"; /** 更新非卖商品 */ @@ -192,6 +194,21 @@ public interface Spu { String STOP_LIMIT_TASK_URL = "https://api.weixin.qq.com/channels/ec/product/limiteddiscounttask/stop"; /** 删除限时抢购任务 */ String DELETE_LIMIT_TASK_URL = "https://api.weixin.qq.com/channels/ec/product/limiteddiscounttask/delete"; + /** 更新限时抢购任务 */ + String UPDATE_LIMIT_TASK_URL = "https://api.weixin.qq.com/channels/ec/product/limiteddiscounttask/update"; + /** 发品前校验 */ + String CATEGORY_PRE_CHECK_URL = "https://api.weixin.qq.com/channels/ec/product/categoryprecheck"; + /** 商品品牌推荐 */ + String PRODUCT_BRAND_RECOMMEND_URL = "https://api.weixin.qq.com/channels/ec/product/productbrandrecommend"; + /** 站内外商品属性映射 */ + String EXTERNAL_PRODUCT_MAPPING_URL = "https://api.weixin.qq.com/channels/ec/product/externalproductmapping"; + /** 商品属性映射及推荐 */ + String EXTERNAL_PRODUCT_MAPPING_NEW_URL = + "https://api.weixin.qq.com/channels/ec/product/externalproductmappingnew"; + /** 商品立即开售 */ + String BEGIN_TIMING_SALE_URL = "https://api.weixin.qq.com/channels/ec/product/begintimingsale"; + /** 取消商品开售 */ + String CANCEL_TIMING_SALE_URL = "https://api.weixin.qq.com/channels/ec/product/canceltimingsale"; } /** 区域仓库 */ diff --git a/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelLimitedDiscountServiceImplTest.java b/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelLimitedDiscountServiceImplTest.java new file mode 100644 index 0000000000..2ee7c5b701 --- /dev/null +++ b/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelLimitedDiscountServiceImplTest.java @@ -0,0 +1,62 @@ +package me.chanjar.weixin.channel.api.impl; + +import static org.testng.Assert.assertEquals; + +import java.util.Arrays; +import me.chanjar.weixin.channel.bean.limit.LimitSkuUpdate; +import me.chanjar.weixin.channel.bean.limit.LimitTaskUpdateParam; +import me.chanjar.weixin.channel.bean.limit.LimitTaskUpdateResponse; +import me.chanjar.weixin.common.error.WxErrorException; +import org.testng.annotations.Test; + +/** + * Tests for {@link WxChannelLimitedDiscountServiceImpl}. + */ +public class WxChannelLimitedDiscountServiceImplTest { + + @Test + public void shouldUpdateLimitedDiscountTaskAndDecodeResponse() throws WxErrorException { + CapturingChannelService channelService = new CapturingChannelService(); + channelService.response = "{\"errcode\":0,\"errmsg\":\"ok\"," + + "\"task_id\":\"task-id\",\"title\":\"updated title\"}"; + LimitSkuUpdate sku = new LimitSkuUpdate(); + sku.setProductId("product-id"); + sku.setSkuId("sku-id"); + sku.setSalePrice(2888); + sku.setSaleStock(5); + LimitTaskUpdateParam param = new LimitTaskUpdateParam(); + param.setTaskId("task-id"); + param.setStatus(0); + param.setStartTime(1_700_000_000L); + param.setEndTime(1_700_003_600L); + param.setTitle("updated title"); + param.setSkus(Arrays.asList(sku)); + + LimitTaskUpdateResponse response = channelService.getLimitedDiscountService().updateLimitTask(param); + + assertEquals(channelService.url, + "https://api.weixin.qq.com/channels/ec/product/limiteddiscounttask/update"); + assertEquals(channelService.request, + "{\"task_id\":\"task-id\",\"status\":0,\"start_time\":1700000000," + + "\"end_time\":1700003600,\"title\":\"updated title\"," + + "\"limited_discount_skus\":[{\"product_id\":\"product-id\"," + + "\"sku_id\":\"sku-id\",\"sale_price\":2888,\"sale_stock\":5}]}"); + assertEquals(response.getErrCode(), 0); + assertEquals(response.getErrMsg(), "ok"); + assertEquals(response.getTaskId(), "task-id"); + assertEquals(response.getTitle(), "updated title"); + } + + private static class CapturingChannelService extends WxChannelServiceImpl { + private String url; + private String request; + private String response; + + @Override + public String post(String url, String postData) { + this.url = url; + this.request = postData; + return this.response; + } + } +} diff --git a/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelProductAssistantServiceImplTest.java b/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelProductAssistantServiceImplTest.java new file mode 100644 index 0000000000..7c19b137f9 --- /dev/null +++ b/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelProductAssistantServiceImplTest.java @@ -0,0 +1,169 @@ +package me.chanjar.weixin.channel.api.impl; + +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertTrue; + +import java.util.Arrays; +import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; +import me.chanjar.weixin.channel.bean.product.assistant.BeginTimingSaleParam; +import me.chanjar.weixin.channel.bean.product.assistant.CancelTimingSaleParam; +import me.chanjar.weixin.channel.bean.product.assistant.CategoryPreCheckParam; +import me.chanjar.weixin.channel.bean.product.assistant.CategoryPreCheckResponse; +import me.chanjar.weixin.channel.bean.product.assistant.ExternalAttribute; +import me.chanjar.weixin.channel.bean.product.assistant.ExternalProductMappingNewParam; +import me.chanjar.weixin.channel.bean.product.assistant.ExternalProductMappingNewResponse; +import me.chanjar.weixin.channel.bean.product.assistant.ExternalProductMappingParam; +import me.chanjar.weixin.channel.bean.product.assistant.ExternalProductMappingResponse; +import me.chanjar.weixin.channel.bean.product.assistant.ProductBrandRecommendParam; +import me.chanjar.weixin.channel.bean.product.assistant.ProductBrandRecommendResponse; +import me.chanjar.weixin.common.error.WxErrorException; +import org.testng.annotations.Test; + +/** + * Tests for {@link WxChannelProductAssistantServiceImpl}. + */ +public class WxChannelProductAssistantServiceImplTest { + + @Test + public void shouldPreCheckCategoryAndDecodeResponse() throws WxErrorException { + CapturingChannelService channelService = new CapturingChannelService(); + channelService.response = "{\"errcode\":0,\"errmsg\":\"ok\"," + + "\"all_pass\":false,\"fail_reasons\":[\"保证金不足\"]}"; + CategoryPreCheckParam param = new CategoryPreCheckParam(); + param.setCatId(6261L); + + CategoryPreCheckResponse response = channelService.getProductAssistantService().categoryPreCheck(param); + + assertEquals(channelService.url, "https://api.weixin.qq.com/channels/ec/product/categoryprecheck"); + assertEquals(channelService.request, "{\"cat_id\":6261}"); + assertEquals(response.getErrCode(), 0); + assertEquals(response.getErrMsg(), "ok"); + assertEquals(response.getAllPass(), Boolean.FALSE); + assertEquals(response.getFailReasons(), Arrays.asList("保证金不足")); + } + + @Test + public void shouldRecommendProductBrandAndDecodeResponse() throws WxErrorException { + CapturingChannelService channelService = new CapturingChannelService(); + channelService.response = "{\"errcode\":0,\"errmsg\":\"ok\",\"brand_id\":2100000000," + + "\"brand_name_chinese\":\"品牌\",\"brand_name_english\":\"brand\"}"; + ProductBrandRecommendParam param = new ProductBrandRecommendParam(); + param.setCatId(6000L); + param.setHeadImgs(Arrays.asList("https://example.com/head.jpg")); + param.setDetailImgs(Arrays.asList("https://example.com/detail.jpg")); + param.setTitle("测试商品"); + + ProductBrandRecommendResponse response = + channelService.getProductAssistantService().getProductBrandRecommend(param); + + assertEquals(channelService.url, "https://api.weixin.qq.com/channels/ec/product/productbrandrecommend"); + assertEquals(channelService.request, + "{\"cat_id\":6000,\"head_imgs\":[\"https://example.com/head.jpg\"]," + + "\"detail_imgs\":[\"https://example.com/detail.jpg\"],\"title\":\"测试商品\"}"); + assertEquals(response.getErrCode(), 0); + assertEquals(response.getErrMsg(), "ok"); + assertEquals(response.getBrandId(), Long.valueOf(2_100_000_000L)); + assertEquals(response.getBrandNameChinese(), "品牌"); + assertEquals(response.getBrandNameEnglish(), "brand"); + } + + @Test + public void shouldMapExternalProductAttributeAndDecodeResponse() throws WxErrorException { + CapturingChannelService channelService = new CapturingChannelService(); + channelService.response = "{\"errcode\":0,\"errmsg\":\"ok\"," + + "\"external_attribute_name\":\"帮面材质\",\"external_attribute_value\":\"塑胶\"," + + "\"internal_attribute_name\":\"鞋面材质\",\"internal_attribute_value\":[\"塑胶\"]}"; + ExternalProductMappingParam param = new ExternalProductMappingParam(); + param.setCatId(6261L); + param.setExternalAttributeName("帮面材质"); + param.setExternalAttributeValue("塑胶"); + param.setExternalCategoryName("母婴:童鞋:雨鞋"); + + ExternalProductMappingResponse response = + channelService.getProductAssistantService().externalProductMapping(param); + + assertEquals(channelService.url, "https://api.weixin.qq.com/channels/ec/product/externalproductmapping"); + assertEquals(channelService.request, + "{\"cat_id\":6261,\"external_attribute_name\":\"帮面材质\"," + + "\"external_attribute_value\":\"塑胶\",\"external_category_name\":\"母婴:童鞋:雨鞋\"}"); + assertEquals(response.getErrCode(), 0); + assertEquals(response.getExternalAttributeName(), "帮面材质"); + assertEquals(response.getExternalAttributeValue(), "塑胶"); + assertEquals(response.getInternalAttributeName(), "鞋面材质"); + assertEquals(response.getInternalAttributeValue(), Arrays.asList("塑胶")); + } + + @Test + public void shouldMapMultipleExternalProductAttributesAndDecodeResponse() throws WxErrorException { + CapturingChannelService channelService = new CapturingChannelService(); + channelService.response = "{\"errcode\":0,\"errmsg\":\"ok\"," + + "\"attributes\":[{\"key\":\"鞋面材质\",\"value\":\"塑胶\"}]}"; + ExternalAttribute externalAttribute = new ExternalAttribute(); + externalAttribute.setKey("帮面材质"); + externalAttribute.setValue("塑胶"); + ExternalProductMappingNewParam param = new ExternalProductMappingNewParam(); + param.setCatId(6000L); + param.setExternalCategoryName("母婴:童鞋:雨鞋"); + param.setHeadImgs(Arrays.asList("https://example.com/head.jpg")); + param.setDetailImgs(Arrays.asList("https://example.com/detail.jpg")); + param.setTitle("测试商品"); + param.setExternalAttributes(Arrays.asList(externalAttribute)); + + ExternalProductMappingNewResponse response = + channelService.getProductAssistantService().externalProductMappingNew(param); + + assertEquals(channelService.url, "https://api.weixin.qq.com/channels/ec/product/externalproductmappingnew"); + assertEquals(channelService.request, + "{\"cat_id\":6000,\"external_category_name\":\"母婴:童鞋:雨鞋\"," + + "\"head_imgs\":[\"https://example.com/head.jpg\"]," + + "\"detail_imgs\":[\"https://example.com/detail.jpg\"],\"title\":\"测试商品\"," + + "\"external_attributes\":[{\"key\":\"帮面材质\",\"value\":\"塑胶\"}]}"); + assertEquals(response.getErrCode(), 0); + assertEquals(response.getAttributes().size(), 1); + assertEquals(response.getAttributes().get(0).getKey(), "鞋面材质"); + assertEquals(response.getAttributes().get(0).getValue(), "塑胶"); + } + + @Test + public void shouldBeginTimingSaleWithStringIdentifiers() throws WxErrorException { + CapturingChannelService channelService = new CapturingChannelService(); + channelService.response = "{\"errcode\":0,\"errmsg\":\"ok\"}"; + BeginTimingSaleParam param = new BeginTimingSaleParam(); + param.setProductId("9007199254740993"); + param.setTaskId("000123456789"); + + WxChannelBaseResponse response = channelService.getProductAssistantService().beginTimingSale(param); + + assertEquals(channelService.url, "https://api.weixin.qq.com/channels/ec/product/begintimingsale"); + assertEquals(channelService.request, + "{\"product_id\":\"9007199254740993\",\"task_id\":\"000123456789\"}"); + assertTrue(response.isSuccess()); + } + + @Test + public void shouldCancelTimingSaleWithStringProductIdentifier() throws WxErrorException { + CapturingChannelService channelService = new CapturingChannelService(); + channelService.response = "{\"errcode\":0,\"errmsg\":\"ok\"}"; + CancelTimingSaleParam param = new CancelTimingSaleParam(); + param.setProductId("9007199254740993"); + + WxChannelBaseResponse response = channelService.getProductAssistantService().cancelTimingSale(param); + + assertEquals(channelService.url, "https://api.weixin.qq.com/channels/ec/product/canceltimingsale"); + assertEquals(channelService.request, "{\"product_id\":\"9007199254740993\"}"); + assertTrue(response.isSuccess()); + } + + private static class CapturingChannelService extends WxChannelServiceImpl { + private String url; + private String request; + private String response; + + @Override + public String post(String url, String postData) { + this.url = url; + this.request = postData; + return this.response; + } + } +} diff --git a/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelProductStockServiceImplTest.java b/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelProductStockServiceImplTest.java new file mode 100644 index 0000000000..86c26043fb --- /dev/null +++ b/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelProductStockServiceImplTest.java @@ -0,0 +1,81 @@ +package me.chanjar.weixin.channel.api.impl; + +import static org.testng.Assert.assertEquals; + +import java.util.Arrays; +import me.chanjar.weixin.channel.bean.product.stock.StockFlowInfo; +import me.chanjar.weixin.channel.bean.product.stock.StockFlowParam; +import me.chanjar.weixin.channel.bean.product.stock.StockFlowResponse; +import me.chanjar.weixin.common.error.WxErrorException; +import org.testng.annotations.Test; + +/** + * Tests for {@link WxChannelProductStockServiceImpl}. + */ +public class WxChannelProductStockServiceImplTest { + + @Test + public void shouldGetStockFlowAndDecodeResponse() throws WxErrorException { + CapturingChannelService channelService = new CapturingChannelService(); + channelService.response = "{\"errcode\":0,\"errmsg\":\"ok\",\"data\":{" + + "\"stock_flow_info_list\":[{\"amount\":300,\"beginning_amount\":842," + + "\"ending_amount\":542,\"stock_sub_type\":1,\"op_type\":6," + + "\"update_time\":1689735682,\"ext_info\":{\"unmove_from_stock_sub_type\":3," + + "\"move_to_stock_sub_type\":4," + + "\"upload_source\":2,\"order_id\":\"order-id\"," + + "\"out_warehouse_id\":\"warehouse-id\"," + + "\"limited_discount_id\":\"discount-id\",\"finder_id\":\"finder-id\"}}]," + + "\"next_key\":\"next-page\"}}"; + StockFlowParam param = new StockFlowParam(); + param.setProductId("product-id"); + param.setSkuId("sku-id"); + param.setStockType(1); + param.setFinderId("finder-id"); + param.setBeginTime(1_689_218_360L); + param.setEndTime(1_689_736_760L); + param.setOpTypeList(Arrays.asList(1, 2)); + param.setPageSize(10); + param.setNextKey("current-page"); + param.setStockTypeId("stock-type-id"); + + StockFlowResponse response = channelService.getProductStockService().getStockFlow(param); + + assertEquals(channelService.url, "https://api.weixin.qq.com/channels/ec/product/stock/getflow"); + assertEquals(channelService.request, + "{\"product_id\":\"product-id\",\"sku_id\":\"sku-id\",\"stock_type\":1," + + "\"finder_id\":\"finder-id\",\"begin_time\":1689218360," + + "\"end_time\":1689736760,\"op_type_list\":[1,2],\"page_size\":10," + + "\"next_key\":\"current-page\",\"stock_type_id\":\"stock-type-id\"}"); + assertEquals(response.getErrCode(), 0); + assertEquals(response.getErrMsg(), "ok"); + assertEquals(response.getNextKey(), "next-page"); + assertEquals(response.getStockFlowInfoList().size(), 1); + StockFlowInfo flow = response.getStockFlowInfoList().get(0); + assertEquals(flow.getAmount(), Integer.valueOf(300)); + assertEquals(flow.getBeginningAmount(), Integer.valueOf(842)); + assertEquals(flow.getEndingAmount(), Integer.valueOf(542)); + assertEquals(flow.getStockSubType(), Integer.valueOf(1)); + assertEquals(flow.getOpType(), Integer.valueOf(6)); + assertEquals(flow.getUpdateTime(), Long.valueOf(1_689_735_682L)); + assertEquals(flow.getExtInfo().getUnmoveFromStockSubType(), Integer.valueOf(3)); + assertEquals(flow.getExtInfo().getMoveToStockSubType(), Integer.valueOf(4)); + assertEquals(flow.getExtInfo().getUploadSource(), Integer.valueOf(2)); + assertEquals(flow.getExtInfo().getOrderId(), "order-id"); + assertEquals(flow.getExtInfo().getOutWarehouseId(), "warehouse-id"); + assertEquals(flow.getExtInfo().getLimitedDiscountId(), "discount-id"); + assertEquals(flow.getExtInfo().getFinderId(), "finder-id"); + } + + private static class CapturingChannelService extends WxChannelServiceImpl { + private String url; + private String request; + private String response; + + @Override + public String post(String url, String postData) { + this.url = url; + this.request = postData; + return this.response; + } + } +} diff --git a/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelServiceImplTest.java b/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelServiceImplTest.java new file mode 100644 index 0000000000..a4bb5db6c2 --- /dev/null +++ b/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelServiceImplTest.java @@ -0,0 +1,154 @@ +package me.chanjar.weixin.channel.api.impl; + +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertNotNull; +import static org.testng.Assert.assertTrue; + +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Date; +import java.util.List; +import me.chanjar.weixin.channel.api.WxChannelService; +import me.chanjar.weixin.channel.bean.limit.LimitSku; +import me.chanjar.weixin.channel.bean.limit.LimitTaskParam; +import me.chanjar.weixin.channel.bean.product.GiftProductInfo; +import org.testng.annotations.Test; + +/** + * Verifies domain service accessors and product service compatibility delegates. + */ +public class WxChannelServiceImplTest { + + @Test + public void shouldKeepNewDomainServiceAccessorsCompatibleWithExistingImplementations() throws Exception { + assertDefaultMethod("getGiftService"); + assertDefaultMethod("getLimitedDiscountService"); + assertDefaultMethod("getProductStockService"); + assertDefaultMethod("getProductAssistantService"); + } + + @Test + public void shouldExposeProductDomainServices() { + CapturingChannelService channelService = new CapturingChannelService(); + assertNotNull(channelService.getGiftService()); + assertNotNull(channelService.getLimitedDiscountService()); + assertNotNull(channelService.getProductStockService()); + assertNotNull(channelService.getProductAssistantService()); + } + + @Test + public void shouldRouteGiftProductCallsExactlyOnce() throws Exception { + CapturingChannelService channelService = new CapturingChannelService(); + GiftProductInfo info = new GiftProductInfo(); + info.setListing(1); + + assertRequest(channelService, new RequestCall() { + @Override + public void call() throws Exception { + channelService.getGiftService().addGiftProduct(info); + } + }, "https://api.weixin.qq.com/channels/ec/product/gift/add", "{\"listing\":1}"); + assertRequest(channelService, new RequestCall() { + @Override + public void call() throws Exception { + channelService.getProductService().addGiftProduct(info); + } + }, "https://api.weixin.qq.com/channels/ec/product/gift/add", "{\"listing\":1}"); + } + + @Test + public void shouldRouteLimitedDiscountCallsExactlyOnce() throws Exception { + CapturingChannelService channelService = new CapturingChannelService(); + LimitTaskParam param = new LimitTaskParam(); + param.setProductId("product-id"); + param.setStartTime(new Date(1_000)); + param.setEndTime(new Date(2_000)); + param.setSkus(Arrays.asList(new LimitSku("sku-id", 100, 2))); + + assertRequest(channelService, new RequestCall() { + @Override + public void call() throws Exception { + channelService.getLimitedDiscountService().addLimitTask(param); + } + }, "https://api.weixin.qq.com/channels/ec/product/limiteddiscounttask/add", + "{\"product_id\":\"product-id\",\"start_time\":1000,\"end_time\":2000," + + "\"limited_discount_skus\":[{\"sku_id\":\"sku-id\",\"sale_price\":100,\"sale_stock\":2}]}"); + assertRequest(channelService, new RequestCall() { + @Override + public void call() throws Exception { + channelService.getProductService().addLimitTask(param); + } + }, "https://api.weixin.qq.com/channels/ec/product/limiteddiscounttask/add", + "{\"product_id\":\"product-id\",\"start_time\":1000,\"end_time\":2000," + + "\"limited_discount_skus\":[{\"sku_id\":\"sku-id\",\"sale_price\":100,\"sale_stock\":2}]}"); + } + + @Test + public void shouldRouteStockCallsExactlyOnce() throws Exception { + CapturingChannelService channelService = new CapturingChannelService(); + + assertRequest(channelService, new RequestCall() { + @Override + public void call() throws Exception { + channelService.getProductStockService().updateStock("product-id", "sku-id", 1, 2); + } + }, "https://api.weixin.qq.com/channels/ec/product/stock/update", + "{\"product_id\":\"product-id\",\"sku_id\":\"sku-id\",\"diff_type\":1,\"num\":2}"); + assertRequest(channelService, new RequestCall() { + @Override + public void call() throws Exception { + channelService.getProductService().updateStock("product-id", "sku-id", 1, 2); + } + }, "https://api.weixin.qq.com/channels/ec/product/stock/update", + "{\"product_id\":\"product-id\",\"sku_id\":\"sku-id\",\"diff_type\":1,\"num\":2}"); + } + + private void assertDefaultMethod(String methodName) throws Exception { + Method method = WxChannelService.class.getMethod(methodName); + assertTrue(method.isDefault(), methodName + " must remain compatible with existing implementations"); + } + + private void assertRequest(CapturingChannelService channelService, RequestCall call, + String expectedUrl, String expectedJson) throws Exception { + channelService.clearRequests(); + call.call(); + List requests = channelService.getRequests(); + assertEquals(requests.size(), 1); + assertEquals(requests.get(0).url, expectedUrl); + assertEquals(requests.get(0).json, expectedJson); + } + + private interface RequestCall { + void call() throws Exception; + } + + private static class CapturingChannelService extends WxChannelServiceImpl { + private final List requests = new ArrayList<>(); + + @Override + public String post(String url, String postData) { + this.requests.add(new Request(url, postData)); + return "{\"errcode\":0}"; + } + + private List getRequests() { + return new ArrayList<>(this.requests); + } + + private void clearRequests() { + this.requests.clear(); + } + } + + private static class Request { + private final String url; + private final String json; + + private Request(String url, String json) { + this.url = url; + this.json = json; + } + + } +} diff --git a/weixin-java-channel/src/test/resources/testng.xml b/weixin-java-channel/src/test/resources/testng.xml index 819ebcf5f9..caa7a2c548 100644 --- a/weixin-java-channel/src/test/resources/testng.xml +++ b/weixin-java-channel/src/test/resources/testng.xml @@ -16,4 +16,12 @@ + + + + + + + + From 4e2fbf725e999406842c7463a7984e9a1224890f Mon Sep 17 00:00:00 2001 From: Binary Wang Date: Sat, 22 Aug 2026 19:17:34 +0800 Subject: [PATCH 18/31] =?UTF-8?q?:art:=20=E5=BF=BD=E7=95=A5=20Agent=20?= =?UTF-8?q?=E7=94=9F=E6=88=90=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 +- ...8-08-legacy-ecommerce-api-compatibility.md | 60 ------------------- ...gacy-ecommerce-api-compatibility-design.md | 35 ----------- 3 files changed, 1 insertion(+), 96 deletions(-) delete mode 100644 docs/superpowers/plans/2026-08-08-legacy-ecommerce-api-compatibility.md delete mode 100644 docs/superpowers/specs/2026-08-08-legacy-ecommerce-api-compatibility-design.md diff --git a/.gitignore b/.gitignore index 34150b7b36..6f2306e97f 100644 --- a/.gitignore +++ b/.gitignore @@ -55,6 +55,6 @@ sonar-project.properties .factorypath *.zip .worktrees - # Local Superpowers working documents; do not commit. /docs/superpowers/ +/.firecrawl/ diff --git a/docs/superpowers/plans/2026-08-08-legacy-ecommerce-api-compatibility.md b/docs/superpowers/plans/2026-08-08-legacy-ecommerce-api-compatibility.md deleted file mode 100644 index 5c1098fbf3..0000000000 --- a/docs/superpowers/plans/2026-08-08-legacy-ecommerce-api-compatibility.md +++ /dev/null @@ -1,60 +0,0 @@ -# 收付通旧 API 过渡兼容层 Implementation Plan - -> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. - -**Goal:** Restore the public e-commerce payment API removed by #4014 as deprecated adapters over the unified V3 API. - -**Architecture:** Deprecated legacy models remain in `bean.ecommerce`; `EcommerceService` exposes overloads with those legacy types. Each overload maps the input to the unified request/enums, invokes the existing unified method, and maps the response back, so transport and signature logic remain singular. - -**Tech Stack:** Java 8, Maven, TestNG, Gson, Lombok. - -## Global Constraints - -- Keep all new #4014 API signatures and behavior unchanged. -- Mark every restored legacy public class and service method `@Deprecated` with migration Javadoc. -- Do not recreate legacy HTTP, signing, or notification-verification implementations. -- Remove the compatibility layer only in 5.0. - ---- - -### Task 1: Restore legacy model surface - -**Files:** -- Create: `weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/{TransactionsResult,CombineTransactionsRequest,CombineTransactionsResult,CombineTransactionsNotifyResult,PartnerTransactionsRequest,PartnerTransactionsResult,PartnerTransactionsNotifyResult,PartnerTransactionsQueryRequest,PartnerTransactionsCloseRequest,SignatureHeader}.java` -- Create: `weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/enums/TradeTypeEnum.java` -- Test: `weixin-java-pay/src/test/java/com/github/binarywang/wxpay/service/LegacyEcommerceApiCompatibilityTest.java` - -**Interfaces:** -- Produces legacy types with their pre-#4014 fully qualified names and accessors. - -- [ ] **Step 1: Write a failing compilation test importing the old types.** -- [ ] **Step 2: Run `mvn -pl weixin-java-pay -Dtest=LegacyEcommerceApiCompatibilityTest test` and confirm compilation fails because the old types do not exist.** -- [ ] **Step 3: Restore the old model source and annotate each class `@Deprecated`.** -- [ ] **Step 4: Re-run the focused Maven test and confirm compilation succeeds.** - -### Task 2: Add service-level adapters - -**Files:** -- Modify: `weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/EcommerceService.java` -- Create: `weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/LegacyEcommerceApiAdapter.java` -- Test: `weixin-java-pay/src/test/java/com/github/binarywang/wxpay/service/LegacyEcommerceApiCompatibilityTest.java` - -**Interfaces:** -- Consumes restored legacy models from Task 1 and current unified V3 APIs. -- Produces deprecated overloads for `combine`, `combineTransactions`, notification parsing, query/close, partner order creation, query/close and notification parsing. - -- [ ] **Step 1: Write failing tests using legacy `EcommerceService` signatures and asserting delegation to the corresponding unified method.** -- [ ] **Step 2: Run the focused Maven test and confirm each test fails because no legacy overload exists.** -- [ ] **Step 3: Implement mapping helpers and `default` legacy overloads that delegate to current methods.** -- [ ] **Step 4: Re-run the focused Maven test and confirm the legacy paths pass.** - -### Task 3: Regression verification and documentation - -**Files:** -- Modify: `weixin-java-pay/src/test/java/com/github/binarywang/wxpay/service/LegacyEcommerceApiCompatibilityTest.java` -- Modify: `docs/superpowers/specs/2026-08-08-legacy-ecommerce-api-compatibility-design.md` - -- [ ] **Step 1: Add tests proving current unified API calls still resolve to their current methods.** -- [ ] **Step 2: Run `mvn -pl weixin-java-pay test` and verify the module builds successfully.** -- [ ] **Step 3: Inspect `git diff --check` and `git diff` for accidental edits.** -- [ ] **Step 4: Commit the implementation and tests with a Chinese message.** diff --git a/docs/superpowers/specs/2026-08-08-legacy-ecommerce-api-compatibility-design.md b/docs/superpowers/specs/2026-08-08-legacy-ecommerce-api-compatibility-design.md deleted file mode 100644 index 25908d3ba8..0000000000 --- a/docs/superpowers/specs/2026-08-08-legacy-ecommerce-api-compatibility-design.md +++ /dev/null @@ -1,35 +0,0 @@ -# 收付通旧 API 过渡兼容层设计 - -## 目标 - -在保留 #4014 统一收付通 API 的前提下,恢复该 PR 删除的公开旧 API,使依赖 4.8.4 收付通模型和 `EcommerceService` 方法的应用能够升级到包含服务商电子发票能力的 4.8.5.x 版本。 - -## 方案选择 - -1. **仅恢复 `TransactionsResult`**:改动最少,但旧请求、枚举和服务方法仍无法编译,不能解决实际升级问题。 -2. **保留独立的旧实现**:兼容性最高,但会重新引入两套 HTTP、验签和签名逻辑,容易再次发生行为漂移。 -3. **废弃的适配层(采用)**:恢复旧模型及方法签名,由旧方法转换为统一模型后调用新 API。这样保留调用方兼容性,只有一套网络实现和业务行为。 - -## 架构 - -恢复的 `com.github.binarywang.wxpay.bean.ecommerce` 下模型均标记 `@Deprecated`。`EcommerceService` 对旧参数类型提供同名重载的 `default` 方法;这些方法使用一个包内适配器把旧请求、枚举和结果转换为新模型,然后委托新的统一方法。 - -旧 API 与新 API 的参数类型位于不同包,因此可安全重载。新 API 的名称、签名和执行路径不变。兼容层覆盖 #4014 删除的下单、查询、关单和通知模型/入口,而不是只恢复一个结果类。 - -## 行为与迁移 - -- 旧调用方继续导入 `bean.ecommerce` 类型即可编译和运行。 -- 新调用方继续使用 `bean.request`、`bean.result`、`bean.notify` 的统一类型,不受兼容层影响。 -- 兼容层直接委托新 API;请求 JSON、验签和网络调用遵循当前统一实现。 -- 所有旧入口在 Javadoc 中给出新 API 的迁移目标,并标记为将在 5.0 移除。 -- 同时使用旧、新包的通配符导入可能引发同名类型歧义;用户应使用显式 import。 - -## 测试 - -为每个兼容入口增加测试,验证旧类型可调用、适配后委托至对应新 API,并验证返回模型中的核心字段和支付调起参数保持可用。测试同时覆盖新 API,确保新路径没有回归。 - -## 非目标 - -- 不恢复已删除的旧网络实现。 -- 不新增任何微信支付接口。 -- 不承诺 5.0 后继续保留旧模型。 From f994a17074895b31d3ec211fc5287d161702aae3 Mon Sep 17 00:00:00 2001 From: Binary Wang Date: Sat, 22 Aug 2026 20:29:24 +0800 Subject: [PATCH 19/31] =?UTF-8?q?:new:=20#4103=20=E3=80=90=E8=A7=86?= =?UTF-8?q?=E9=A2=91=E5=8F=B7=E3=80=91=E8=A1=A5=E9=BD=90=E5=94=AE=E5=90=8E?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E4=BB=A3=E5=8F=91=E8=B5=B7=E5=94=AE=E5=90=8E?= =?UTF-8?q?=E3=80=81=E9=80=80=E5=B7=AE=E4=BB=B7=E3=80=81=E8=99=9A=E6=8B=9F?= =?UTF-8?q?=E5=8F=B7=E3=80=81=E6=9E=81=E9=80=9F=E6=8D=A2=E8=B4=A7=E3=80=81?= =?UTF-8?q?=E4=BF=9D=E9=9A=9C=E5=8D=95=E5=92=8C=E5=B7=A5=E5=8D=95=E5=90=8C?= =?UTF-8?q?=E6=AD=A5=E7=AD=89=E6=8E=A5=E5=8F=A3=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bean/after/AfterSaleCreateResponse.java | 15 ++++ .../AfterSaleGenAfterSaleOrderParam.java | 25 ++++++ ...terSaleHandleFastExchangeReceiptParam.java | 29 +++++++ .../after/AfterSaleRefundPriceDiffParam.java | 33 ++++++++ .../after/AfterSaleVirtualTelNumResponse.java | 18 +++++ .../channel/bean/after/ExchangeSkuInfo.java | 14 ++++ .../after/GuaranteeMerchantModifyParam.java | 19 +++++ .../after/GuaranteeMerchantProofParam.java | 19 +++++ .../bean/after/GuaranteeOrderResponse.java | 16 ++++ .../bean/after/SyncWorkOrderParam.java | 79 +++++++++++++++++++ .../constant/WxChannelApiUrlConstants.java | 9 +++ .../bean/after/AfterSaleContractTest.java | 39 +++++++++ .../src/test/resources/testng.xml | 1 + 13 files changed, 316 insertions(+) create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleCreateResponse.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleGenAfterSaleOrderParam.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleHandleFastExchangeReceiptParam.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleRefundPriceDiffParam.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleVirtualTelNumResponse.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/ExchangeSkuInfo.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeMerchantModifyParam.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeMerchantProofParam.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderResponse.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/SyncWorkOrderParam.java create mode 100644 weixin-java-channel/src/test/java/me/chanjar/weixin/channel/bean/after/AfterSaleContractTest.java diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleCreateResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleCreateResponse.java new file mode 100644 index 0000000000..64b3b8f4cf --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleCreateResponse.java @@ -0,0 +1,15 @@ +package me.chanjar.weixin.channel.bean.after; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; + +@Data +@EqualsAndHashCode(callSuper = true) +public class AfterSaleCreateResponse extends WxChannelBaseResponse { + private static final long serialVersionUID = 2680676438284658410L; + + @JsonProperty("after_sale_order_id") + private String afterSaleOrderId; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleGenAfterSaleOrderParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleGenAfterSaleOrderParam.java new file mode 100644 index 0000000000..50928e7cdc --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleGenAfterSaleOrderParam.java @@ -0,0 +1,25 @@ +package me.chanjar.weixin.channel.bean.after; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +public class AfterSaleGenAfterSaleOrderParam extends AfterSaleRefundPriceDiffParam { + private static final long serialVersionUID = -6873909673739068936L; + + @JsonProperty("count") + private Integer count; + + @JsonProperty("type") + private String type; + + @JsonProperty("address_id") + private String addressId; + + @JsonProperty("exchange_sku_info") + private ExchangeSkuInfo exchangeSkuInfo; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleHandleFastExchangeReceiptParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleHandleFastExchangeReceiptParam.java new file mode 100644 index 0000000000..13c24f3f5d --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleHandleFastExchangeReceiptParam.java @@ -0,0 +1,29 @@ +package me.chanjar.weixin.channel.bean.after; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +public class AfterSaleHandleFastExchangeReceiptParam extends AfterSaleIdParam { + private static final long serialVersionUID = 5430106715116197677L; + + @JsonProperty("act") + private Integer act; + + @JsonProperty("reject_reason") + private String rejectReason; + + @JsonProperty("reject_reason_type") + private Integer rejectReasonType; + + @JsonProperty("merchant_text") + private String merchantText; + + @JsonProperty("reject_confirm_exchange") + private List rejectConfirmExchange; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleRefundPriceDiffParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleRefundPriceDiffParam.java new file mode 100644 index 0000000000..e6dfd08449 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleRefundPriceDiffParam.java @@ -0,0 +1,33 @@ +package me.chanjar.weixin.channel.bean.after; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; + +@Data +@JsonInclude(JsonInclude.Include.NON_NULL) +public class AfterSaleRefundPriceDiffParam implements Serializable { + private static final long serialVersionUID = 3875058376021518123L; + + @JsonProperty("request_id") + private String requestId; + + @JsonProperty("order_id") + private String orderId; + + @JsonProperty("product_id") + private String productId; + + @JsonProperty("sku_id") + private String skuId; + + @JsonProperty("amount") + private Integer amount; + + @JsonProperty("reason") + private String reason; + + @JsonProperty("desc") + private String desc; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleVirtualTelNumResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleVirtualTelNumResponse.java new file mode 100644 index 0000000000..c78d72e7cb --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleVirtualTelNumResponse.java @@ -0,0 +1,18 @@ +package me.chanjar.weixin.channel.bean.after; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; + +@Data +@EqualsAndHashCode(callSuper = true) +public class AfterSaleVirtualTelNumResponse extends WxChannelBaseResponse { + private static final long serialVersionUID = -2715343569103426942L; + + @JsonProperty("virtual_tel_number") + private String virtualTelNumber; + + @JsonProperty("virtual_tel_expire_time") + private Long virtualTelExpireTime; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/ExchangeSkuInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/ExchangeSkuInfo.java new file mode 100644 index 0000000000..696f912ef2 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/ExchangeSkuInfo.java @@ -0,0 +1,14 @@ +package me.chanjar.weixin.channel.bean.after; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; + +@Data +@JsonInclude(JsonInclude.Include.NON_NULL) +public class ExchangeSkuInfo implements Serializable { + private static final long serialVersionUID = 1L; + @JsonProperty("new_sku_id") + private String newSkuId; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeMerchantModifyParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeMerchantModifyParam.java new file mode 100644 index 0000000000..914cd908e9 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeMerchantModifyParam.java @@ -0,0 +1,19 @@ +package me.chanjar.weixin.channel.bean.after; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +public class GuaranteeMerchantModifyParam extends GuaranteeOrderIdParam { + private static final long serialVersionUID = 9193536167701367687L; + + @JsonProperty("bad_level") + private Integer badLevel; + + @JsonProperty("merchant_remark") + private String merchantRemark; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeMerchantProofParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeMerchantProofParam.java new file mode 100644 index 0000000000..e7760deaa7 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeMerchantProofParam.java @@ -0,0 +1,19 @@ +package me.chanjar.weixin.channel.bean.after; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +public class GuaranteeMerchantProofParam extends GuaranteeOrderIdParam { + private static final long serialVersionUID = -2365495841866160967L; + + @JsonProperty("content") + private String content; + + @JsonProperty("pic_list") + private java.util.List picList; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderResponse.java new file mode 100644 index 0000000000..6f6256a9db --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderResponse.java @@ -0,0 +1,16 @@ +package me.chanjar.weixin.channel.bean.after; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.JsonNode; +import lombok.Data; +import lombok.EqualsAndHashCode; +import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; + +@Data +@EqualsAndHashCode(callSuper = true) +public class GuaranteeOrderResponse extends WxChannelBaseResponse { + private static final long serialVersionUID = 3977781489692530604L; + + @JsonProperty("guarantee_order") + private JsonNode guaranteeOrder; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/SyncWorkOrderParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/SyncWorkOrderParam.java new file mode 100644 index 0000000000..9416bf021e --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/SyncWorkOrderParam.java @@ -0,0 +1,79 @@ +package me.chanjar.weixin.channel.bean.after; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; + +@Data +@JsonInclude(JsonInclude.Include.NON_NULL) +public class SyncWorkOrderParam implements Serializable { + private static final long serialVersionUID = -7336088606071452113L; + + @JsonProperty("complaint_id") + private String complaintId; + + @JsonProperty("work_order_info") + private WorkOrderInfo workOrderInfo; + + @Data + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class WorkOrderInfo implements Serializable { + private static final long serialVersionUID = 8573016851280130766L; + + @JsonProperty("version") + private Integer version; + + @JsonProperty("items") + private List items; + + @JsonProperty("work_order_id") + private String workOrderId; + } + + @Data + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class WorkOrderItem implements Serializable { + private static final long serialVersionUID = 6925580701152256736L; + + @JsonProperty("status") + private Integer status; + + @JsonProperty("desc") + private String desc; + + @JsonProperty("update_time") + private Long updateTime; + + @JsonProperty("result_type") + private Integer resultType; + + @JsonProperty("refund_amount") + private Integer refundAmount; + + @JsonProperty("media_list") + private List mediaList; + } + + @Data + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class WorkOrderMedia implements Serializable { + private static final long serialVersionUID = 2258990333977395631L; + + @JsonProperty("type") + private Integer type; + + @JsonProperty("picture") + private WorkOrderPicture picture; + } + + @Data + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class WorkOrderPicture implements Serializable { + private static final long serialVersionUID = -3339842364541603289L; + + @JsonProperty("tmp_media_id") + private String tmpMediaId; + } +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/constant/WxChannelApiUrlConstants.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/constant/WxChannelApiUrlConstants.java index 92ece47b2e..bb1bb48295 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/constant/WxChannelApiUrlConstants.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/constant/WxChannelApiUrlConstants.java @@ -298,6 +298,15 @@ public interface PrivateNumber { /** 售后相关接口 */ public interface AfterSale { + String AFTER_SALE_GEN_AFTER_SALE_ORDER_URL = "https://api.weixin.qq.com/channels/ec/aftersale/genaftersaleorder"; + String AFTER_SALE_REFUND_PRICE_DIFF_URL = "https://api.weixin.qq.com/channels/ec/aftersale/refundpricediff"; + String AFTER_SALE_APPLY_VIRTUAL_TEL_NUM_URL = "https://api.weixin.qq.com/channels/ec/aftersale/applyvirtualtelnum"; + String AFTER_SALE_HANDLE_FAST_EXCHANGE_RECEIPT_URL = "https://api.weixin.qq.com/channels/ec/aftersale/handlefastexchangereceipt"; + String AFTER_SALE_GET_GUARANTEE_ORDER_URL = "https://api.weixin.qq.com/channels/ec/aftersale/getguaranteeorder"; + String AFTER_SALE_MERCHANT_ACCEPT_GUARANTEE_URL = "https://api.weixin.qq.com/channels/ec/aftersale/merchantacceptguarantee"; + String AFTER_SALE_MERCHANT_MODIFY_GUARANTEE_URL = "https://api.weixin.qq.com/channels/ec/aftersale/merchantmodifyguarantee"; + String AFTER_SALE_MERCHANT_PROOF_GUARANTEE_URL = "https://api.weixin.qq.com/channels/ec/aftersale/merchantproofguarantee"; + String AFTER_SALE_SYNC_WORK_ORDER_URL = "https://api.weixin.qq.com/channels/ec/aftersale/syncworkorder"; /** 获取售后列表 */ String AFTER_SALE_LIST_URL = "https://api.weixin.qq.com/channels/ec/aftersale/getaftersalelist"; diff --git a/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/bean/after/AfterSaleContractTest.java b/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/bean/after/AfterSaleContractTest.java new file mode 100644 index 0000000000..b226cfb1bd --- /dev/null +++ b/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/bean/after/AfterSaleContractTest.java @@ -0,0 +1,39 @@ +package me.chanjar.weixin.channel.bean.after; + +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertTrue; + +import com.fasterxml.jackson.databind.ObjectMapper; +import java.util.Collections; +import org.testng.annotations.Test; + +public class AfterSaleContractTest { + private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); + + @Test + public void shouldUseOfficialAfterSaleAndGuaranteeFieldNames() throws Exception { + AfterSaleGenAfterSaleOrderParam afterSaleParam = new AfterSaleGenAfterSaleOrderParam(); + ExchangeSkuInfo exchangeSkuInfo = new ExchangeSkuInfo(); + exchangeSkuInfo.setNewSkuId("new-sku"); + afterSaleParam.setExchangeSkuInfo(exchangeSkuInfo); + + AfterSaleHandleFastExchangeReceiptParam receiptParam = new AfterSaleHandleFastExchangeReceiptParam(); + receiptParam.setRejectConfirmExchange(Collections.singletonList("media-1")); + + GuaranteeOrderIdParam guaranteeParam = new GuaranteeOrderIdParam("guarantee-1"); + assertTrue(OBJECT_MAPPER.writeValueAsString(afterSaleParam).contains("\"exchange_sku_info\":{\"new_sku_id\":\"new-sku\"}")); + assertTrue(OBJECT_MAPPER.writeValueAsString(receiptParam).contains("\"reject_confirm_exchange\":[\"media-1\"]")); + assertTrue(OBJECT_MAPPER.writeValueAsString(guaranteeParam).contains("\"guarantee_order_id\":\"guarantee-1\"")); + } + + @Test + public void shouldDecodeOfficialResponseFields() throws Exception { + AfterSaleCreateResponse createResponse = OBJECT_MAPPER.readValue( + "{\"errcode\":0,\"after_sale_order_id\":\"after-1\"}", AfterSaleCreateResponse.class); + GuaranteeOrderResponse guaranteeResponse = OBJECT_MAPPER.readValue( + "{\"errcode\":0,\"guarantee_order\":{\"guarantee_order_id\":\"guarantee-1\"}}", GuaranteeOrderResponse.class); + + assertEquals(createResponse.getAfterSaleOrderId(), "after-1"); + assertEquals(guaranteeResponse.getGuaranteeOrder().get("guarantee_order_id").asText(), "guarantee-1"); + } +} diff --git a/weixin-java-channel/src/test/resources/testng.xml b/weixin-java-channel/src/test/resources/testng.xml index caa7a2c548..c5c07eb23a 100644 --- a/weixin-java-channel/src/test/resources/testng.xml +++ b/weixin-java-channel/src/test/resources/testng.xml @@ -14,6 +14,7 @@ + From 9a616de2a5cb58bca1d0911a04b4045202cabcee Mon Sep 17 00:00:00 2001 From: Binary Wang Date: Sat, 22 Aug 2026 20:38:40 +0800 Subject: [PATCH 20/31] =?UTF-8?q?:bug:=20#4110=20=E3=80=90=E5=B0=8F?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E3=80=91=E4=BF=AE=E6=AD=A3=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=8D=A1=E7=89=87=E5=87=A0=E4=B8=AA=E6=8E=A5=E5=8F=A3=E7=9A=84?= =?UTF-8?q?=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- weixin-java-miniapp/pom.xml | 1 + .../wx/miniapp/api/WxMaSubscribeService.java | 6 +- .../miniapp/constant/WxMaApiUrlConstants.java | 6 +- .../impl/WxMaSubscribeServiceImplUrlTest.java | 55 +++++++++++++++++++ .../src/test/resources/testng.xml | 9 +++ 5 files changed, 71 insertions(+), 6 deletions(-) create mode 100644 weixin-java-miniapp/src/test/java/cn/binarywang/wx/miniapp/api/impl/WxMaSubscribeServiceImplUrlTest.java create mode 100644 weixin-java-miniapp/src/test/resources/testng.xml diff --git a/weixin-java-miniapp/pom.xml b/weixin-java-miniapp/pom.xml index d2722652f7..66e859dd0c 100644 --- a/weixin-java-miniapp/pom.xml +++ b/weixin-java-miniapp/pom.xml @@ -115,6 +115,7 @@ org.apache.maven.plugins maven-surefire-plugin + false src/test/resources/testng.xml diff --git a/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/api/WxMaSubscribeService.java b/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/api/WxMaSubscribeService.java index 1dbb9f64c9..d1ecf1c833 100644 --- a/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/api/WxMaSubscribeService.java +++ b/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/api/WxMaSubscribeService.java @@ -122,7 +122,7 @@ public interface WxMaSubscribeService { * 激活与更新服务卡片 * * 详情请见: 激活与更新服务卡片 - * 接口url格式: POST https://api.weixin.qq.com/wxa/setusernotify?access_token=ACCESS_TOKEN + * 接口url格式: POST https://api.weixin.qq.com/wxa/set_user_notify?access_token=ACCESS_TOKEN *
* * @param request 请求参数 @@ -135,7 +135,7 @@ public interface WxMaSubscribeService { * 更新服务卡片扩展信息 * * 详情请见: 更新服务卡片扩展信息 - * 接口url格式: POST https://api.weixin.qq.com/wxa/setusernotifyext?access_token=ACCESS_TOKEN + * 接口url格式: POST https://api.weixin.qq.com/wxa/set_user_notifyext?access_token=ACCESS_TOKEN *
* * @param request 请求参数 @@ -148,7 +148,7 @@ public interface WxMaSubscribeService { * 查询服务卡片状态 * * 详情请见: 查询服务卡片状态 - * 接口url格式: POST https://api.weixin.qq.com/wxa/getusernotify?access_token=ACCESS_TOKEN + * 接口url格式: POST https://api.weixin.qq.com/wxa/get_user_notify?access_token=ACCESS_TOKEN *
* * @param request 请求参数 diff --git a/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/constant/WxMaApiUrlConstants.java b/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/constant/WxMaApiUrlConstants.java index 1054f7df2b..e16cd982a8 100644 --- a/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/constant/WxMaApiUrlConstants.java +++ b/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/constant/WxMaApiUrlConstants.java @@ -370,13 +370,13 @@ public interface Subscribe { String SUBSCRIBE_MSG_SEND_URL = "https://api.weixin.qq.com/cgi-bin/message/subscribe/send"; /** 激活与更新服务卡片 */ - String SERVICE_NOTIFY_SET_URL = "https://api.weixin.qq.com/wxa/setusernotify"; + String SERVICE_NOTIFY_SET_URL = "https://api.weixin.qq.com/wxa/set_user_notify"; /** 更新服务卡片扩展信息 */ - String SERVICE_NOTIFY_SET_EXT_URL = "https://api.weixin.qq.com/wxa/setusernotifyext"; + String SERVICE_NOTIFY_SET_EXT_URL = "https://api.weixin.qq.com/wxa/set_user_notifyext"; /** 查询服务卡片状态 */ - String SERVICE_NOTIFY_GET_URL = "https://api.weixin.qq.com/wxa/getusernotify"; + String SERVICE_NOTIFY_GET_URL = "https://api.weixin.qq.com/wxa/get_user_notify"; } public interface User { diff --git a/weixin-java-miniapp/src/test/java/cn/binarywang/wx/miniapp/api/impl/WxMaSubscribeServiceImplUrlTest.java b/weixin-java-miniapp/src/test/java/cn/binarywang/wx/miniapp/api/impl/WxMaSubscribeServiceImplUrlTest.java new file mode 100644 index 0000000000..1b4c09d5fd --- /dev/null +++ b/weixin-java-miniapp/src/test/java/cn/binarywang/wx/miniapp/api/impl/WxMaSubscribeServiceImplUrlTest.java @@ -0,0 +1,55 @@ +package cn.binarywang.wx.miniapp.api.impl; + +import cn.binarywang.wx.miniapp.api.WxMaService; +import cn.binarywang.wx.miniapp.api.WxMaSubscribeService; +import cn.binarywang.wx.miniapp.bean.WxMaGetUserNotifyRequest; +import cn.binarywang.wx.miniapp.bean.WxMaServiceNotifyExtRequest; +import cn.binarywang.wx.miniapp.bean.WxMaServiceNotifyRequest; +import me.chanjar.weixin.common.error.WxErrorException; +import org.mockito.Mockito; +import org.testng.annotations.Test; + +import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + +public class WxMaSubscribeServiceImplUrlTest { + + @Test + public void setUserNotifyUsesOfficialEndpoint() throws WxErrorException { + WxMaService service = successService(); + + subscribeService(service).setUserNotify(WxMaServiceNotifyRequest.builder().build()); + + verify(service).post(eq("https://api.weixin.qq.com/wxa/set_user_notify"), anyString()); + } + + @Test + public void setUserNotifyExtUsesOfficialEndpoint() throws WxErrorException { + WxMaService service = successService(); + + subscribeService(service).setUserNotifyExt(WxMaServiceNotifyExtRequest.builder().build()); + + verify(service).post(eq("https://api.weixin.qq.com/wxa/set_user_notifyext"), anyString()); + } + + @Test + public void getUserNotifyUsesOfficialEndpoint() throws WxErrorException { + WxMaService service = successService(); + + subscribeService(service).getUserNotify(WxMaGetUserNotifyRequest.builder().build()); + + verify(service).post(eq("https://api.weixin.qq.com/wxa/get_user_notify"), anyString()); + } + + private WxMaSubscribeService subscribeService(WxMaService service) { + return new WxMaSubscribeServiceImpl(service); + } + + private WxMaService successService() throws WxErrorException { + WxMaService service = Mockito.mock(WxMaService.class); + when(service.post(anyString(), anyString())).thenReturn("{\"errcode\":0,\"errmsg\":\"ok\"}"); + return service; + } +} diff --git a/weixin-java-miniapp/src/test/resources/testng.xml b/weixin-java-miniapp/src/test/resources/testng.xml new file mode 100644 index 0000000000..b34a4415d7 --- /dev/null +++ b/weixin-java-miniapp/src/test/resources/testng.xml @@ -0,0 +1,9 @@ + + + + + + + + + From 5bb9deeb5da27440fd19e0669d09364609f68eab Mon Sep 17 00:00:00 2001 From: Binary Wang Date: Sat, 22 Aug 2026 20:42:45 +0800 Subject: [PATCH 21/31] =?UTF-8?q?:new:=20#4104=20=E3=80=90=E8=A7=86?= =?UTF-8?q?=E9=A2=91=E5=8F=B7=E3=80=91=E8=A1=A5=E9=BD=90=E5=BE=AE=E4=BF=A1?= =?UTF-8?q?=E5=B0=8F=E5=BA=97=E5=95=86=E5=93=81=E7=AE=A1=E7=90=86=E7=9A=84?= =?UTF-8?q?13=20=E4=B8=AA=E6=9C=8D=E5=8A=A1=E6=8E=A5=E5=8F=A3=E4=B8=8E?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=A8=A1=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 + .../channel/api/WxChannelProductService.java | 137 +++++++++ .../api/impl/WxChannelProductServiceImpl.java | 128 ++++++++ .../AddProductThirdPartySourceParam.java | 22 ++ .../AddProductThirdPartySourceResponse.java | 16 + .../ExternalProductMappingNewParam.java | 31 ++ .../ExternalProductMappingNewResponse.java | 29 ++ .../product/ExternalProductMappingParam.java | 20 ++ .../ExternalProductMappingResponse.java | 23 ++ .../product/ProductAuditQuotaResponse.java | 39 +++ .../product/ProductAuditStrategyInfo.java | 18 ++ .../product/ProductAuditStrategyResponse.java | 16 + .../product/ProductAuditStrategySetParam.java | 14 + .../product/ProductBrandRecommendParam.java | 20 ++ .../ProductBrandRecommendResponse.java | 20 ++ .../product/ProductCategoryClassifyParam.java | 20 ++ .../ProductCategoryClassifyResponse.java | 48 +++ .../product/ProductCategoryPreCheckParam.java | 14 + .../ProductCategoryPreCheckResponse.java | 19 ++ .../bean/product/ProductSchemeParam.java | 19 ++ .../bean/product/ProductSchemeResponse.java | 14 + .../bean/product/ProductStockFlowParam.java | 33 ++ .../product/ProductStockFlowResponse.java | 28 ++ .../bean/product/ProductTimingSaleParam.java | 16 + .../constant/WxChannelApiUrlConstants.java | 28 +- ...annelProductManagementServiceImplTest.java | 283 ++++++++++++++++++ .../src/test/resources/testng.xml | 1 + 27 files changed, 1057 insertions(+), 2 deletions(-) create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/AddProductThirdPartySourceParam.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/AddProductThirdPartySourceResponse.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ExternalProductMappingNewParam.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ExternalProductMappingNewResponse.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ExternalProductMappingParam.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ExternalProductMappingResponse.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductAuditQuotaResponse.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductAuditStrategyInfo.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductAuditStrategyResponse.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductAuditStrategySetParam.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductBrandRecommendParam.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductBrandRecommendResponse.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductCategoryClassifyParam.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductCategoryClassifyResponse.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductCategoryPreCheckParam.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductCategoryPreCheckResponse.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductSchemeParam.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductSchemeResponse.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductStockFlowParam.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductStockFlowResponse.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductTimingSaleParam.java create mode 100644 weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelProductManagementServiceImplTest.java diff --git a/.gitignore b/.gitignore index 6f2306e97f..eda4f369c8 100644 --- a/.gitignore +++ b/.gitignore @@ -51,6 +51,9 @@ sonar-project.properties !/.mvn/wrapper/maven-wrapper.jar *.versionsBackup +# Local Superpowers planning artifacts +docs/superpowers/ + # STS .factorypath *.zip diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelProductService.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelProductService.java index ce85e9f0a4..fb019eefe5 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelProductService.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelProductService.java @@ -13,6 +13,26 @@ import me.chanjar.weixin.channel.bean.product.GiftProductInfo; import me.chanjar.weixin.channel.bean.product.GiftProductListParam; import me.chanjar.weixin.channel.bean.product.GiftProductListResponse; +import me.chanjar.weixin.channel.bean.product.AddProductThirdPartySourceParam; +import me.chanjar.weixin.channel.bean.product.AddProductThirdPartySourceResponse; +import me.chanjar.weixin.channel.bean.product.ExternalProductMappingNewParam; +import me.chanjar.weixin.channel.bean.product.ExternalProductMappingNewResponse; +import me.chanjar.weixin.channel.bean.product.ExternalProductMappingParam; +import me.chanjar.weixin.channel.bean.product.ExternalProductMappingResponse; +import me.chanjar.weixin.channel.bean.product.ProductAuditQuotaResponse; +import me.chanjar.weixin.channel.bean.product.ProductAuditStrategyResponse; +import me.chanjar.weixin.channel.bean.product.ProductAuditStrategySetParam; +import me.chanjar.weixin.channel.bean.product.ProductBrandRecommendParam; +import me.chanjar.weixin.channel.bean.product.ProductBrandRecommendResponse; +import me.chanjar.weixin.channel.bean.product.ProductCategoryClassifyParam; +import me.chanjar.weixin.channel.bean.product.ProductCategoryClassifyResponse; +import me.chanjar.weixin.channel.bean.product.ProductCategoryPreCheckParam; +import me.chanjar.weixin.channel.bean.product.ProductCategoryPreCheckResponse; +import me.chanjar.weixin.channel.bean.product.ProductSchemeParam; +import me.chanjar.weixin.channel.bean.product.ProductSchemeResponse; +import me.chanjar.weixin.channel.bean.product.ProductStockFlowParam; +import me.chanjar.weixin.channel.bean.product.ProductStockFlowResponse; +import me.chanjar.weixin.channel.bean.product.ProductTimingSaleParam; import me.chanjar.weixin.channel.bean.product.SkuStockBatchResponse; import me.chanjar.weixin.channel.bean.product.SkuStockResponse; import me.chanjar.weixin.channel.bean.product.SpuFastInfo; @@ -213,6 +233,123 @@ WxChannelBaseResponse updateStock(String productId, String skuId, Integer diffTy */ ProductTagLinkResponse getProductTagLink(String productId) throws WxErrorException; + /** + * 获取商品的移动应用跳转 scheme 码. + * + * @param param 商品 ID、来源 appid、过期时间和附加信息 + * @return 商品跳转 scheme 码 + * @throws WxErrorException 调用微信接口失败 + */ + ProductSchemeResponse getProductScheme(ProductSchemeParam param) throws WxErrorException; + + /** + * 商品类目推荐. + * + * @param param 请求类型、商品标题、主图和可选类目 ID;当请求类型为 2 时必须提供类目 ID + * @return 推荐类目及店铺经营权限 + * @throws WxErrorException 调用微信接口失败 + */ + ProductCategoryClassifyResponse classifyProductCategory(ProductCategoryClassifyParam param) throws WxErrorException; + + /** + * 将定时开售商品改为立即开售. + * + * @param param 商品 ID 和定时开售任务 ID + * @return 操作结果 + * @throws WxErrorException 调用微信接口失败 + */ + WxChannelBaseResponse beginTimingSale(ProductTimingSaleParam param) throws WxErrorException; + + /** + * 取消商品开售. + * + * @param productId 商品 ID + * @return 操作结果 + * @throws WxErrorException 调用微信接口失败 + */ + WxChannelBaseResponse cancelTimingSale(String productId) throws WxErrorException; + + /** + * 查询站内外商品属性映射. + * + * @param param 叶子类目 ID、外部类目和外部属性 + * @return 对应的站内属性及可选属性值 + * @throws WxErrorException 调用微信接口失败 + */ + ExternalProductMappingResponse externalProductMapping(ExternalProductMappingParam param) throws WxErrorException; + + /** + * 发品前校验店铺类目资质. + * + * @param param 待发布商品的叶子类目 ID + * @return 校验结果和未通过原因 + * @throws WxErrorException 调用微信接口失败 + */ + ProductCategoryPreCheckResponse categoryPreCheck(ProductCategoryPreCheckParam param) throws WxErrorException; + + /** + * 获取店铺维度的商品上架策略. + * + * @return 当前上架策略 + * @throws WxErrorException 调用微信接口失败 + */ + ProductAuditStrategyResponse getProductAuditStrategy() throws WxErrorException; + + /** + * 设置店铺维度的商品上架策略. + * + * @param param 要设置的上架策略 + * @return 操作结果 + * @throws WxErrorException 调用微信接口失败 + */ + WxChannelBaseResponse setProductAuditStrategy(ProductAuditStrategySetParam param) throws WxErrorException; + + /** + * 获取当前店铺的商品提审限额. + * + * @return 提审总额度和新品剩余额度 + * @throws WxErrorException 调用微信接口失败 + */ + ProductAuditQuotaResponse getProductAuditQuota() throws WxErrorException; + + /** + * 商品属性映射及推荐. + * + * @param param 叶子类目、商品标题、主图及可选的外部属性 + * @return 推荐的站内属性 + * @throws WxErrorException 调用微信接口失败 + */ + ExternalProductMappingNewResponse externalProductMappingNew(ExternalProductMappingNewParam param) + throws WxErrorException; + + /** + * 根据商品信息推荐店铺已有资质的品牌. + * + * @param param 商品叶子类目、标题和图片 + * @return 推荐品牌 + * @throws WxErrorException 调用微信接口失败 + */ + ProductBrandRecommendResponse productBrandRecommend(ProductBrandRecommendParam param) throws WxErrorException; + + /** + * 新增第三方货源信息. + * + * @param param 场景、发布方式、货主及货源商品信息 + * @return 包含第三方货源 ID 的操作结果 + * @throws WxErrorException 调用微信接口失败 + */ + AddProductThirdPartySourceResponse addProductThirdPartySource(AddProductThirdPartySourceParam param) + throws WxErrorException; + + /** + * 获取商品库存流水. + * + * @param param 商品、SKU、库存类型、时间范围和分页参数;pageSize 必填,stockType 为 1 时 finderId 必填,库存类型非 0 和 1 时 stockTypeId 必填 + * @return 库存流水及下一页标识 + * @throws WxErrorException 调用微信接口失败 + */ + ProductStockFlowResponse getStockFlow(ProductStockFlowParam param) throws WxErrorException; + /** * 添加非卖商品 * diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelProductServiceImpl.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelProductServiceImpl.java index a7fc91c840..fb00f1874d 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelProductServiceImpl.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelProductServiceImpl.java @@ -2,18 +2,45 @@ import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.CANCEL_AUDIT_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.DELETE_LIMIT_TASK_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.GIFT_ACTIVITY_ADD_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.GIFT_ACTIVITY_DELETE_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.GIFT_ACTIVITY_STOP_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.GIFT_PRODUCT_ADD_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.GIFT_PRODUCT_GET_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.GIFT_PRODUCT_LIST_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.GIFT_PRODUCT_ON_SALE_SET_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.GIFT_PRODUCT_STOCK_UPDATE_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.GIFT_PRODUCT_UPDATE_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.LIST_LIMIT_TASK_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_ADD_PRODUCT_THIRD_PARTY_SOURCE_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_ADD_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_AUDIT_FREE_UPDATE_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_AUDIT_STRATEGY_GET_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_AUDIT_STRATEGY_SET_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_BEGIN_TIMING_SALE_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_CANCEL_TIMING_SALE_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_CATEGORY_CLASSIFY_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_CATEGORY_PRE_CHECK_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_DELISTING_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_DEL_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_EXTERNAL_PRODUCT_MAPPING_NEW_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_EXTERNAL_PRODUCT_MAPPING_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_GET_AUDIT_QUOTA_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_GET_STOCK_BATCH_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_GET_STOCK_FLOW_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_GET_STOCK_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_GET_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_H5URL_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_LISTING_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_LIST_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_PRODUCT_BRAND_RECOMMEND_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_QRCODE_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_SCHEME_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_TAGLINK_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_UPDATE_URL; +import java.util.Collections; import java.util.List; import lombok.extern.slf4j.Slf4j; import me.chanjar.weixin.channel.api.WxChannelGiftService; @@ -24,6 +51,13 @@ import me.chanjar.weixin.channel.bean.limit.LimitTaskAddResponse; import me.chanjar.weixin.channel.bean.limit.LimitTaskListResponse; import me.chanjar.weixin.channel.bean.limit.LimitTaskParam; +import me.chanjar.weixin.channel.bean.product.AddProductThirdPartySourceParam; +import me.chanjar.weixin.channel.bean.product.AddProductThirdPartySourceResponse; +import me.chanjar.weixin.channel.bean.product.ExternalProductMappingNewParam; +import me.chanjar.weixin.channel.bean.product.ExternalProductMappingNewResponse; +import me.chanjar.weixin.channel.bean.product.ExternalProductMappingParam; +import me.chanjar.weixin.channel.bean.product.ExternalProductMappingResponse; +import me.chanjar.weixin.channel.bean.product.GiftActivityAddParam; import me.chanjar.weixin.channel.bean.product.GiftActivityAddResponse; import me.chanjar.weixin.channel.bean.product.GiftActivityInfo; import me.chanjar.weixin.channel.bean.product.GiftProductAddResponse; @@ -31,6 +65,21 @@ import me.chanjar.weixin.channel.bean.product.GiftProductInfo; import me.chanjar.weixin.channel.bean.product.GiftProductListParam; import me.chanjar.weixin.channel.bean.product.GiftProductListResponse; +import me.chanjar.weixin.channel.bean.product.ProductAuditQuotaResponse; +import me.chanjar.weixin.channel.bean.product.ProductAuditStrategyResponse; +import me.chanjar.weixin.channel.bean.product.ProductAuditStrategySetParam; +import me.chanjar.weixin.channel.bean.product.ProductBrandRecommendParam; +import me.chanjar.weixin.channel.bean.product.ProductBrandRecommendResponse; +import me.chanjar.weixin.channel.bean.product.ProductCategoryClassifyParam; +import me.chanjar.weixin.channel.bean.product.ProductCategoryClassifyResponse; +import me.chanjar.weixin.channel.bean.product.ProductCategoryPreCheckParam; +import me.chanjar.weixin.channel.bean.product.ProductCategoryPreCheckResponse; +import me.chanjar.weixin.channel.bean.product.ProductSchemeParam; +import me.chanjar.weixin.channel.bean.product.ProductSchemeResponse; +import me.chanjar.weixin.channel.bean.product.ProductStockFlowParam; +import me.chanjar.weixin.channel.bean.product.ProductStockFlowResponse; +import me.chanjar.weixin.channel.bean.product.ProductTimingSaleParam; +import me.chanjar.weixin.channel.bean.product.SkuStockBatchParam; import me.chanjar.weixin.channel.bean.product.SkuStockBatchResponse; import me.chanjar.weixin.channel.bean.product.SkuStockResponse; import me.chanjar.weixin.channel.bean.product.SpuFastInfo; @@ -216,6 +265,85 @@ public ProductTagLinkResponse getProductTagLink(String productId) throws WxError return ResponseUtils.decode(resJson, ProductTagLinkResponse.class); } + @Override + public ProductSchemeResponse getProductScheme(ProductSchemeParam param) throws WxErrorException { + return postAndDecode(SPU_SCHEME_URL, param, ProductSchemeResponse.class); + } + + @Override + public ProductCategoryClassifyResponse classifyProductCategory(ProductCategoryClassifyParam param) + throws WxErrorException { + return postAndDecode(SPU_CATEGORY_CLASSIFY_URL, param, ProductCategoryClassifyResponse.class); + } + + @Override + public WxChannelBaseResponse beginTimingSale(ProductTimingSaleParam param) throws WxErrorException { + return postAndDecode(SPU_BEGIN_TIMING_SALE_URL, param, WxChannelBaseResponse.class); + } + + @Override + public WxChannelBaseResponse cancelTimingSale(String productId) throws WxErrorException { + return postAndDecode(SPU_CANCEL_TIMING_SALE_URL, Collections.singletonMap("product_id", productId), + WxChannelBaseResponse.class); + } + + @Override + public ExternalProductMappingResponse externalProductMapping(ExternalProductMappingParam param) + throws WxErrorException { + return postAndDecode(SPU_EXTERNAL_PRODUCT_MAPPING_URL, param, ExternalProductMappingResponse.class); + } + + @Override + public ProductCategoryPreCheckResponse categoryPreCheck(ProductCategoryPreCheckParam param) + throws WxErrorException { + return postAndDecode(SPU_CATEGORY_PRE_CHECK_URL, param, ProductCategoryPreCheckResponse.class); + } + + @Override + public ProductAuditStrategyResponse getProductAuditStrategy() throws WxErrorException { + return postAndDecode(SPU_AUDIT_STRATEGY_GET_URL, "{}", ProductAuditStrategyResponse.class); + } + + @Override + public WxChannelBaseResponse setProductAuditStrategy(ProductAuditStrategySetParam param) throws WxErrorException { + return postAndDecode(SPU_AUDIT_STRATEGY_SET_URL, param, WxChannelBaseResponse.class); + } + + @Override + public ProductAuditQuotaResponse getProductAuditQuota() throws WxErrorException { + return postAndDecode(SPU_GET_AUDIT_QUOTA_URL, "{}", ProductAuditQuotaResponse.class); + } + + @Override + public ExternalProductMappingNewResponse externalProductMappingNew(ExternalProductMappingNewParam param) + throws WxErrorException { + return postAndDecode(SPU_EXTERNAL_PRODUCT_MAPPING_NEW_URL, param, ExternalProductMappingNewResponse.class); + } + + @Override + public ProductBrandRecommendResponse productBrandRecommend(ProductBrandRecommendParam param) + throws WxErrorException { + return postAndDecode(SPU_PRODUCT_BRAND_RECOMMEND_URL, param, ProductBrandRecommendResponse.class); + } + + @Override + public AddProductThirdPartySourceResponse addProductThirdPartySource(AddProductThirdPartySourceParam param) + throws WxErrorException { + return postAndDecode(SPU_ADD_PRODUCT_THIRD_PARTY_SOURCE_URL, param, AddProductThirdPartySourceResponse.class); + } + + @Override + public ProductStockFlowResponse getStockFlow(ProductStockFlowParam param) throws WxErrorException { + return postAndDecode(SPU_GET_STOCK_FLOW_URL, param, ProductStockFlowResponse.class); + } + + private T postAndDecode(String url, Object param, Class responseType) + throws WxErrorException { + String reqJson = param instanceof String ? (String) param : JsonUtils.encode(param); + String resJson = shopService.post(url, reqJson); + return ResponseUtils.decode(resJson, responseType); + } + @Override public GiftProductAddResponse addGiftProduct(GiftProductInfo info) throws WxErrorException { return giftService.addGiftProduct(info); diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/AddProductThirdPartySourceParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/AddProductThirdPartySourceParam.java new file mode 100644 index 0000000000..6f258358b6 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/AddProductThirdPartySourceParam.java @@ -0,0 +1,22 @@ +package me.chanjar.weixin.channel.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.JsonNode; +import java.io.Serializable; +import lombok.Data; + +/** 新增第三方货源信息请求参数. */ +@Data +public class AddProductThirdPartySourceParam implements Serializable { + private static final long serialVersionUID = -5784320217481497742L; + + @JsonProperty("scene_value") + private Integer sceneValue; + @JsonProperty("publish_method") + private Integer publishMethod; + private JsonNode supplier; + @JsonProperty("supplier_shop_performance") + private JsonNode supplierShopPerformance; + @JsonProperty("product_source_info") + private JsonNode productSourceInfo; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/AddProductThirdPartySourceResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/AddProductThirdPartySourceResponse.java new file mode 100644 index 0000000000..aec4cef996 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/AddProductThirdPartySourceResponse.java @@ -0,0 +1,16 @@ +package me.chanjar.weixin.channel.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; + +/** 新增第三方货源信息响应. */ +@Data +@EqualsAndHashCode(callSuper = true) +public class AddProductThirdPartySourceResponse extends WxChannelBaseResponse { + private static final long serialVersionUID = -7528226120383065861L; + + @JsonProperty("third_party_source_id") + private Long thirdPartySourceId; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ExternalProductMappingNewParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ExternalProductMappingNewParam.java new file mode 100644 index 0000000000..d78ac8d313 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ExternalProductMappingNewParam.java @@ -0,0 +1,31 @@ +package me.chanjar.weixin.channel.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; + +/** 商品属性映射及推荐请求参数. */ +@Data +public class ExternalProductMappingNewParam implements Serializable { + private static final long serialVersionUID = -7982070319116550518L; + + @JsonProperty("cat_id") + private Long catId; + @JsonProperty("external_category_name") + private String externalCategoryName; + @JsonProperty("head_imgs") + private List headImgs; + @JsonProperty("detail_imgs") + private List detailImgs; + private String title; + @JsonProperty("external_attributes") + private List externalAttributes; + + @Data + public static class ExternalAttribute implements Serializable { + private static final long serialVersionUID = 300805187240781417L; + private String key; + private String value; + } +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ExternalProductMappingNewResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ExternalProductMappingNewResponse.java new file mode 100644 index 0000000000..8342071a4b --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ExternalProductMappingNewResponse.java @@ -0,0 +1,29 @@ +package me.chanjar.weixin.channel.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; +import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; + +/** 商品属性映射及推荐响应. */ +@Data +@EqualsAndHashCode(callSuper = true) +public class ExternalProductMappingNewResponse extends WxChannelBaseResponse { + private static final long serialVersionUID = 4536547956225312823L; + + @JsonProperty("attributes") + private List attributes; + + /** 推荐属性. */ + @Data + @NoArgsConstructor + public static class Attribute implements Serializable { + private static final long serialVersionUID = -4072024462101489333L; + + private String key; + private String value; + } +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ExternalProductMappingParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ExternalProductMappingParam.java new file mode 100644 index 0000000000..849ec64aed --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ExternalProductMappingParam.java @@ -0,0 +1,20 @@ +package me.chanjar.weixin.channel.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; + +/** 站内外商品属性映射请求参数. */ +@Data +public class ExternalProductMappingParam implements Serializable { + private static final long serialVersionUID = 3288069294712374035L; + + @JsonProperty("cat_id") + private Long catId; + @JsonProperty("external_attribute_name") + private String externalAttributeName; + @JsonProperty("external_attribute_value") + private String externalAttributeValue; + @JsonProperty("external_category_name") + private String externalCategoryName; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ExternalProductMappingResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ExternalProductMappingResponse.java new file mode 100644 index 0000000000..8899edcfdf --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ExternalProductMappingResponse.java @@ -0,0 +1,23 @@ +package me.chanjar.weixin.channel.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; + +/** 站内外商品属性映射响应. */ +@Data +@EqualsAndHashCode(callSuper = true) +public class ExternalProductMappingResponse extends WxChannelBaseResponse { + private static final long serialVersionUID = -8356596972896906087L; + + @JsonProperty("external_attribute_name") + private String externalAttributeName; + @JsonProperty("external_attribute_value") + private String externalAttributeValue; + @JsonProperty("internal_attribute_name") + private String internalAttributeName; + @JsonProperty("internal_attribute_value") + private List internalAttributeValue; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductAuditQuotaResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductAuditQuotaResponse.java new file mode 100644 index 0000000000..2f17d0e180 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductAuditQuotaResponse.java @@ -0,0 +1,39 @@ +package me.chanjar.weixin.channel.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.EqualsAndHashCode; +import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; + +/** 商品提审限额响应. */ +@Data +@EqualsAndHashCode(callSuper = true) +public class ProductAuditQuotaResponse extends WxChannelBaseResponse { + private static final long serialVersionUID = -6242837308752181147L; + + @JsonProperty("audit_quota") + private AuditQuota auditQuota; + + @Data + public static class AuditQuota implements Serializable { + private static final long serialVersionUID = 6066821247844334714L; + + @JsonProperty("block_status") + private Integer blockStatus; + @JsonProperty("avail_quota") + private Integer availQuota; + @JsonProperty("total_quota") + private Integer totalQuota; + @JsonProperty("unlimited_type") + private Integer unlimitedType; + @JsonProperty("audit_total_quota") + private Integer auditTotalQuota; + @JsonProperty("audit_total_remaining") + private Integer auditTotalRemaining; + @JsonProperty("new_product_total_quota") + private Integer newProductTotalQuota; + @JsonProperty("new_product_remaining") + private Integer newProductRemaining; + } +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductAuditStrategyInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductAuditStrategyInfo.java new file mode 100644 index 0000000000..5bcdcacb84 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductAuditStrategyInfo.java @@ -0,0 +1,18 @@ +package me.chanjar.weixin.channel.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; + +/** 商品上架策略信息. */ +@Data +public class ProductAuditStrategyInfo implements Serializable { + private static final long serialVersionUID = -2747596416115475981L; + + @JsonProperty("hide_err_field_flag") + private Integer hideErrFieldFlag; + @JsonProperty("hit_duplicated_flag") + private Integer hitDuplicatedFlag; + @JsonProperty("hit_low_risk_rule_flag") + private Integer hitLowRiskRuleFlag; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductAuditStrategyResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductAuditStrategyResponse.java new file mode 100644 index 0000000000..92684bcba0 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductAuditStrategyResponse.java @@ -0,0 +1,16 @@ +package me.chanjar.weixin.channel.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; + +/** 商品上架策略响应. */ +@Data +@EqualsAndHashCode(callSuper = true) +public class ProductAuditStrategyResponse extends WxChannelBaseResponse { + private static final long serialVersionUID = -1074784511408331849L; + + @JsonProperty("audit_strategy") + private ProductAuditStrategyInfo auditStrategy; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductAuditStrategySetParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductAuditStrategySetParam.java new file mode 100644 index 0000000000..b07ff314e5 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductAuditStrategySetParam.java @@ -0,0 +1,14 @@ +package me.chanjar.weixin.channel.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; + +/** 设置商品上架策略请求参数. */ +@Data +public class ProductAuditStrategySetParam implements Serializable { + private static final long serialVersionUID = 7542738744842032508L; + + @JsonProperty("audit_strategy") + private ProductAuditStrategyInfo auditStrategy; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductBrandRecommendParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductBrandRecommendParam.java new file mode 100644 index 0000000000..1fbdc0bb05 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductBrandRecommendParam.java @@ -0,0 +1,20 @@ +package me.chanjar.weixin.channel.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; + +/** 商品品牌推荐请求参数. */ +@Data +public class ProductBrandRecommendParam implements Serializable { + private static final long serialVersionUID = 6462717198206491138L; + + @JsonProperty("cat_id") + private Long catId; + @JsonProperty("head_imgs") + private List headImgs; + @JsonProperty("detail_imgs") + private List detailImgs; + private String title; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductBrandRecommendResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductBrandRecommendResponse.java new file mode 100644 index 0000000000..59344058f6 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductBrandRecommendResponse.java @@ -0,0 +1,20 @@ +package me.chanjar.weixin.channel.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; + +/** 商品品牌推荐响应. */ +@Data +@EqualsAndHashCode(callSuper = true) +public class ProductBrandRecommendResponse extends WxChannelBaseResponse { + private static final long serialVersionUID = 4350605866373432810L; + + @JsonProperty("brand_id") + private Long brandId; + @JsonProperty("brand_name_chinese") + private String brandNameChinese; + @JsonProperty("brand_name_english") + private String brandNameEnglish; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductCategoryClassifyParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductCategoryClassifyParam.java new file mode 100644 index 0000000000..2e0a452434 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductCategoryClassifyParam.java @@ -0,0 +1,20 @@ +package me.chanjar.weixin.channel.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; + +/** 商品类目推荐请求参数. */ +@Data +public class ProductCategoryClassifyParam implements Serializable { + private static final long serialVersionUID = 4665563979720739777L; + + @JsonProperty("req_type") + private Integer reqType; + private String title; + @JsonProperty("head_imgs") + private List headImgs; + @JsonProperty("cat_id") + private String catId; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductCategoryClassifyResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductCategoryClassifyResponse.java new file mode 100644 index 0000000000..acf31b7f23 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductCategoryClassifyResponse.java @@ -0,0 +1,48 @@ +package me.chanjar.weixin.channel.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; + +/** 商品类目推荐响应. */ +@Data +@EqualsAndHashCode(callSuper = true) +public class ProductCategoryClassifyResponse extends WxChannelBaseResponse { + private static final long serialVersionUID = 8258747142248203374L; + + private List categories; + @JsonProperty("wrong_cat") + private Boolean wrongCat; + + @Data + public static class CategoryInfo implements Serializable { + private static final long serialVersionUID = -4800760946330901306L; + + private List cats; + } + + @Data + public static class CategoryLevel implements Serializable { + private static final long serialVersionUID = 8010801623725584755L; + + @JsonProperty("cat_info") + private Category catInfo; + @JsonProperty("has_permission") + private Boolean hasPermission; + } + + @Data + public static class Category implements Serializable { + private static final long serialVersionUID = -9013991576741902059L; + + @JsonProperty("cat_id") + private String catId; + @JsonProperty("cat_name") + private String catName; + @JsonProperty("is_shop_no_audit") + private Boolean shopNoAudit; + } +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductCategoryPreCheckParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductCategoryPreCheckParam.java new file mode 100644 index 0000000000..aab6474724 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductCategoryPreCheckParam.java @@ -0,0 +1,14 @@ +package me.chanjar.weixin.channel.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; + +/** 发品前校验请求参数. */ +@Data +public class ProductCategoryPreCheckParam implements Serializable { + private static final long serialVersionUID = 5155253060483296766L; + + @JsonProperty("cat_id") + private Long catId; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductCategoryPreCheckResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductCategoryPreCheckResponse.java new file mode 100644 index 0000000000..42a8221a70 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductCategoryPreCheckResponse.java @@ -0,0 +1,19 @@ +package me.chanjar.weixin.channel.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; + +/** 发品前校验响应. */ +@Data +@EqualsAndHashCode(callSuper = true) +public class ProductCategoryPreCheckResponse extends WxChannelBaseResponse { + private static final long serialVersionUID = 7136603000806024499L; + + @JsonProperty("all_pass") + private Boolean allPass; + @JsonProperty("fail_reasons") + private List failReasons; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductSchemeParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductSchemeParam.java new file mode 100644 index 0000000000..f63774c329 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductSchemeParam.java @@ -0,0 +1,19 @@ +package me.chanjar.weixin.channel.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; + +/** 获取商品移动应用跳转 scheme 码请求参数. */ +@Data +public class ProductSchemeParam implements Serializable { + private static final long serialVersionUID = 613832623081127830L; + + @JsonProperty("product_id") + private String productId; + @JsonProperty("from_appid") + private String fromAppid; + private Integer expire; + @JsonProperty("ext_info") + private String extInfo; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductSchemeResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductSchemeResponse.java new file mode 100644 index 0000000000..d44c6b4a13 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductSchemeResponse.java @@ -0,0 +1,14 @@ +package me.chanjar.weixin.channel.bean.product; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; + +/** 获取商品移动应用跳转 scheme 码响应. */ +@Data +@EqualsAndHashCode(callSuper = true) +public class ProductSchemeResponse extends WxChannelBaseResponse { + private static final long serialVersionUID = 7310433919100539990L; + + private String openlink; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductStockFlowParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductStockFlowParam.java new file mode 100644 index 0000000000..1354705bdb --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductStockFlowParam.java @@ -0,0 +1,33 @@ +package me.chanjar.weixin.channel.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; + +/** 获取库存流水请求参数. */ +@Data +public class ProductStockFlowParam implements Serializable { + private static final long serialVersionUID = -407227347279113050L; + + @JsonProperty("product_id") + private String productId; + @JsonProperty("sku_id") + private String skuId; + @JsonProperty("stock_type") + private Integer stockType; + @JsonProperty("finder_id") + private String finderId; + @JsonProperty("begin_time") + private Long beginTime; + @JsonProperty("end_time") + private Long endTime; + @JsonProperty("op_type_list") + private List opTypeList; + @JsonProperty("page_size") + private Integer pageSize; + @JsonProperty("next_key") + private String nextKey; + @JsonProperty("stock_type_id") + private String stockTypeId; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductStockFlowResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductStockFlowResponse.java new file mode 100644 index 0000000000..d94df28e8e --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductStockFlowResponse.java @@ -0,0 +1,28 @@ +package me.chanjar.weixin.channel.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.JsonNode; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; + +/** 获取库存流水响应. */ +@Data +@EqualsAndHashCode(callSuper = true) +public class ProductStockFlowResponse extends WxChannelBaseResponse { + private static final long serialVersionUID = 7600529379926896515L; + + private StockFlowData data; + + @Data + public static class StockFlowData implements Serializable { + private static final long serialVersionUID = -4963813730951045381L; + + @JsonProperty("stock_flow_info_list") + private List stockFlowInfoList; + @JsonProperty("next_key") + private String nextKey; + } +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductTimingSaleParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductTimingSaleParam.java new file mode 100644 index 0000000000..bb0e173965 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductTimingSaleParam.java @@ -0,0 +1,16 @@ +package me.chanjar.weixin.channel.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; + +/** 商品立即开售请求参数. */ +@Data +public class ProductTimingSaleParam implements Serializable { + private static final long serialVersionUID = -7185451543781817487L; + + @JsonProperty("product_id") + private String productId; + @JsonProperty("task_id") + private Long taskId; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/constant/WxChannelApiUrlConstants.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/constant/WxChannelApiUrlConstants.java index bb1bb48295..86de88947b 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/constant/WxChannelApiUrlConstants.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/constant/WxChannelApiUrlConstants.java @@ -158,16 +158,40 @@ public interface Spu { String SPU_H5URL_URL = "https://api.weixin.qq.com/channels/ec/product/h5url/get"; /** 获取商品二维码 */ String SPU_QRCODE_URL = "https://api.weixin.qq.com/channels/ec/product/qrcode/get"; + /** 获取商品移动应用跳转 scheme 码 */ + String SPU_SCHEME_URL = "https://api.weixin.qq.com/channels/ec/product/scheme/get"; /** 获取商品口令 */ String SPU_TAGLINK_URL = "https://api.weixin.qq.com/channels/ec/product/taglink/get"; + /** 商品类目推荐 */ + String SPU_CATEGORY_CLASSIFY_URL = "https://api.weixin.qq.com/channels/ec/product/category/classify"; + /** 商品立即开售 */ + String SPU_BEGIN_TIMING_SALE_URL = "https://api.weixin.qq.com/channels/ec/product/begintimingsale"; + /** 取消商品开售 */ + String SPU_CANCEL_TIMING_SALE_URL = "https://api.weixin.qq.com/channels/ec/product/canceltimingsale"; + /** 站内外商品属性映射 */ + String SPU_EXTERNAL_PRODUCT_MAPPING_URL = "https://api.weixin.qq.com/channels/ec/product/externalproductmapping"; + /** 发品前校验 */ + String SPU_CATEGORY_PRE_CHECK_URL = "https://api.weixin.qq.com/channels/ec/product/categoryprecheck"; + /** 获取商品上架策略 */ + String SPU_AUDIT_STRATEGY_GET_URL = "https://api.weixin.qq.com/channels/ec/product/auditstrategy/get"; + /** 设置商品上架策略 */ + String SPU_AUDIT_STRATEGY_SET_URL = "https://api.weixin.qq.com/channels/ec/product/auditstrategy/set"; + /** 获取商品提审限额 */ + String SPU_GET_AUDIT_QUOTA_URL = "https://api.weixin.qq.com/channels/ec/product/getauditquota"; + /** 商品属性映射及推荐 */ + String SPU_EXTERNAL_PRODUCT_MAPPING_NEW_URL = "https://api.weixin.qq.com/channels/ec/product/externalproductmappingnew"; + /** 商品品牌推荐 */ + String SPU_PRODUCT_BRAND_RECOMMEND_URL = "https://api.weixin.qq.com/channels/ec/product/productbrandrecommend"; + /** 新增第三方货源信息 */ + String SPU_ADD_PRODUCT_THIRD_PARTY_SOURCE_URL = "https://api.weixin.qq.com/channels/ec/product/addproductthirdpartysource"; /** 获取实时库存 */ String SPU_GET_STOCK_URL = "https://api.weixin.qq.com/channels/ec/product/stock/get"; + /** 获取库存流水 */ + String SPU_GET_STOCK_FLOW_URL = "https://api.weixin.qq.com/channels/ec/product/stock/getflow"; /** 获取实时库存 */ String SPU_GET_STOCK_BATCH_URL = "https://api.weixin.qq.com/channels/ec/product/stock/batchget"; /** 更新商品库存 */ String SPU_UPDATE_STOCK_URL = "https://api.weixin.qq.com/channels/ec/product/stock/update"; - /** 获取库存流水 */ - String SPU_GET_STOCK_FLOW_URL = "https://api.weixin.qq.com/channels/ec/product/stock/getflow"; /** 添加非卖商品 */ String GIFT_PRODUCT_ADD_URL = "https://api.weixin.qq.com/channels/ec/product/gift/add"; /** 更新非卖商品 */ diff --git a/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelProductManagementServiceImplTest.java b/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelProductManagementServiceImplTest.java new file mode 100644 index 0000000000..9ccaeed3d7 --- /dev/null +++ b/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelProductManagementServiceImplTest.java @@ -0,0 +1,283 @@ +package me.chanjar.weixin.channel.api.impl; + +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertTrue; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.ObjectOutputStream; +import java.util.Arrays; +import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; +import me.chanjar.weixin.channel.bean.product.AddProductThirdPartySourceParam; +import me.chanjar.weixin.channel.bean.product.AddProductThirdPartySourceResponse; +import me.chanjar.weixin.channel.bean.product.ExternalProductMappingNewParam; +import me.chanjar.weixin.channel.bean.product.ExternalProductMappingNewResponse; +import me.chanjar.weixin.channel.bean.product.ExternalProductMappingParam; +import me.chanjar.weixin.channel.bean.product.ExternalProductMappingResponse; +import me.chanjar.weixin.channel.bean.product.ProductAuditQuotaResponse; +import me.chanjar.weixin.channel.bean.product.ProductAuditStrategyInfo; +import me.chanjar.weixin.channel.bean.product.ProductAuditStrategyResponse; +import me.chanjar.weixin.channel.bean.product.ProductAuditStrategySetParam; +import me.chanjar.weixin.channel.bean.product.ProductBrandRecommendParam; +import me.chanjar.weixin.channel.bean.product.ProductBrandRecommendResponse; +import me.chanjar.weixin.channel.bean.product.ProductCategoryClassifyParam; +import me.chanjar.weixin.channel.bean.product.ProductCategoryClassifyResponse; +import me.chanjar.weixin.channel.bean.product.ProductCategoryPreCheckParam; +import me.chanjar.weixin.channel.bean.product.ProductCategoryPreCheckResponse; +import me.chanjar.weixin.channel.bean.product.ProductSchemeParam; +import me.chanjar.weixin.channel.bean.product.ProductSchemeResponse; +import me.chanjar.weixin.channel.bean.product.ProductStockFlowParam; +import me.chanjar.weixin.channel.bean.product.ProductStockFlowResponse; +import me.chanjar.weixin.channel.bean.product.ProductTimingSaleParam; +import me.chanjar.weixin.channel.util.JsonUtils; +import me.chanjar.weixin.common.error.WxErrorException; +import org.testng.annotations.Test; + +/** Tests the product-management endpoint contracts without making network calls. */ +public class WxChannelProductManagementServiceImplTest { + + @Test + public void shouldGetProductScheme() throws WxErrorException { + RecordingChannelService channelService = response("{\"errcode\":0,\"errmsg\":\"ok\",\"openlink\":\"weixin://dl/business/?t=abc\"}"); + ProductSchemeParam param = new ProductSchemeParam(); + param.setProductId("10001"); + param.setFromAppid("wx-app"); + param.setExpire(3600); + param.setExtInfo("source"); + + ProductSchemeResponse result = productService(channelService).getProductScheme(param); + + assertRequest(channelService, "/channels/ec/product/scheme/get", "{\"product_id\":\"10001\",\"from_appid\":\"wx-app\",\"expire\":3600,\"ext_info\":\"source\"}"); + assertEquals(result.getOpenlink(), "weixin://dl/business/?t=abc"); + } + + @Test + public void shouldClassifyProductCategoryAndDecodePermission() throws WxErrorException { + RecordingChannelService channelService = response("{\"errcode\":0,\"errmsg\":\"ok\",\"categories\":[{\"cats\":[{\"cat_info\":{\"cat_id\":\"6000\",\"cat_name\":\"童鞋\"},\"has_permission\":true}]}],\"wrong_cat\":false}"); + ProductCategoryClassifyParam param = new ProductCategoryClassifyParam(); + param.setReqType(2); + param.setTitle("儿童雨鞋"); + param.setHeadImgs(Arrays.asList("https://example.com/image")); + param.setCatId("6000"); + + ProductCategoryClassifyResponse result = productService(channelService).classifyProductCategory(param); + + assertRequest(channelService, "/channels/ec/product/category/classify", "{\"req_type\":2,\"title\":\"儿童雨鞋\",\"head_imgs\":[\"https://example.com/image\"],\"cat_id\":\"6000\"}"); + assertEquals(result.getCategories().get(0).getCats().get(0).getCatInfo().getCatId(), "6000"); + assertTrue(result.getCategories().get(0).getCats().get(0).getHasPermission()); + } + + @Test + public void shouldBeginTimingSale() throws WxErrorException { + RecordingChannelService channelService = response(okResponse()); + ProductTimingSaleParam param = new ProductTimingSaleParam(); + param.setProductId("10001"); + param.setTaskId(123L); + + WxChannelBaseResponse result = productService(channelService).beginTimingSale(param); + + assertRequest(channelService, "/channels/ec/product/begintimingsale", "{\"product_id\":\"10001\",\"task_id\":123}"); + assertTrue(result.isSuccess()); + } + + @Test + public void shouldCancelTimingSale() throws WxErrorException { + RecordingChannelService channelService = response(okResponse()); + + WxChannelBaseResponse result = productService(channelService).cancelTimingSale("10001"); + + assertRequest(channelService, "/channels/ec/product/canceltimingsale", "{\"product_id\":\"10001\"}"); + assertTrue(result.isSuccess()); + } + + @Test + public void shouldMapExternalProductAttribute() throws WxErrorException { + RecordingChannelService channelService = response("{\"errcode\":0,\"errmsg\":\"ok\",\"external_attribute_name\":\"材质\",\"external_attribute_value\":\"塑胶\",\"internal_attribute_name\":\"鞋面材质\",\"internal_attribute_value\":[\"塑胶\"]}"); + ExternalProductMappingParam param = new ExternalProductMappingParam(); + param.setCatId(6000L); + param.setExternalAttributeName("材质"); + param.setExternalAttributeValue("塑胶"); + param.setExternalCategoryName("母婴:童鞋"); + + ExternalProductMappingResponse result = productService(channelService).externalProductMapping(param); + + assertRequest(channelService, "/channels/ec/product/externalproductmapping", "{\"cat_id\":6000,\"external_attribute_name\":\"材质\",\"external_attribute_value\":\"塑胶\",\"external_category_name\":\"母婴:童鞋\"}"); + assertEquals(result.getInternalAttributeValue(), Arrays.asList("塑胶")); + } + + @Test + public void shouldPreCheckCategory() throws WxErrorException { + RecordingChannelService channelService = response("{\"errcode\":0,\"errmsg\":\"ok\",\"all_pass\":false,\"fail_reasons\":[\"缺少资质\"]}"); + ProductCategoryPreCheckParam param = new ProductCategoryPreCheckParam(); + param.setCatId(6000L); + + ProductCategoryPreCheckResponse result = productService(channelService).categoryPreCheck(param); + + assertRequest(channelService, "/channels/ec/product/categoryprecheck", "{\"cat_id\":6000}"); + assertEquals(result.getFailReasons(), Arrays.asList("缺少资质")); + } + + @Test + public void shouldGetProductAuditStrategy() throws WxErrorException { + RecordingChannelService channelService = response("{\"errcode\":0,\"errmsg\":\"ok\",\"audit_strategy\":{\"hide_err_field_flag\":1,\"hit_duplicated_flag\":0,\"hit_low_risk_rule_flag\":1}}"); + + ProductAuditStrategyResponse result = productService(channelService).getProductAuditStrategy(); + + assertRequest(channelService, "/channels/ec/product/auditstrategy/get", "{}"); + assertEquals(result.getAuditStrategy().getHideErrFieldFlag(), Integer.valueOf(1)); + } + + @Test + public void shouldSetProductAuditStrategy() throws WxErrorException { + RecordingChannelService channelService = response(okResponse()); + ProductAuditStrategyInfo strategy = new ProductAuditStrategyInfo(); + strategy.setHideErrFieldFlag(1); + ProductAuditStrategySetParam param = new ProductAuditStrategySetParam(); + param.setAuditStrategy(strategy); + + WxChannelBaseResponse result = productService(channelService).setProductAuditStrategy(param); + + assertRequest(channelService, "/channels/ec/product/auditstrategy/set", "{\"audit_strategy\":{\"hide_err_field_flag\":1}}"); + assertTrue(result.isSuccess()); + } + + @Test + public void shouldGetProductAuditQuota() throws WxErrorException { + RecordingChannelService channelService = response("{\"errcode\":0,\"errmsg\":\"ok\",\"audit_quota\":{\"block_status\":0,\"avail_quota\":20,\"total_quota\":100,\"unlimited_type\":0,\"audit_total_quota\":100,\"audit_total_remaining\":80,\"new_product_total_quota\":50,\"new_product_remaining\":40}}"); + + ProductAuditQuotaResponse result = productService(channelService).getProductAuditQuota(); + + assertRequest(channelService, "/channels/ec/product/getauditquota", "{}"); + assertEquals(result.getAuditQuota().getNewProductRemaining(), Integer.valueOf(40)); + } + + @Test + public void shouldMapAndRecommendExternalProductAttributes() throws WxErrorException { + RecordingChannelService channelService = response("{\"errcode\":0,\"errmsg\":\"ok\",\"attributes\":[{\"key\":\"鞋面材质\",\"value\":\"塑胶\"}]}"); + ExternalProductMappingNewParam.ExternalAttribute attribute = new ExternalProductMappingNewParam.ExternalAttribute(); + attribute.setKey("材质"); + attribute.setValue("塑胶"); + ExternalProductMappingNewParam param = new ExternalProductMappingNewParam(); + param.setCatId(6000L); + param.setExternalCategoryName("母婴:童鞋"); + param.setHeadImgs(Arrays.asList("https://example.com/head")); + param.setTitle("儿童雨鞋"); + param.setExternalAttributes(Arrays.asList(attribute)); + + ExternalProductMappingNewResponse result = productService(channelService).externalProductMappingNew(param); + + assertRequest(channelService, "/channels/ec/product/externalproductmappingnew", "{\"cat_id\":6000,\"external_category_name\":\"母婴:童鞋\",\"head_imgs\":[\"https://example.com/head\"],\"title\":\"儿童雨鞋\",\"external_attributes\":[{\"key\":\"材质\",\"value\":\"塑胶\"}]}"); + assertTrue(result.getAttributes().get(0) instanceof ExternalProductMappingNewResponse.Attribute); + assertEquals(result.getAttributes().get(0).getKey(), "鞋面材质"); + } + + @Test + public void shouldRecommendProductBrand() throws WxErrorException { + RecordingChannelService channelService = response("{\"errcode\":0,\"errmsg\":\"ok\",\"brand_id\":123,\"brand_name_chinese\":\"品牌\",\"brand_name_english\":\"Brand\"}"); + ProductBrandRecommendParam param = new ProductBrandRecommendParam(); + param.setCatId(6000L); + param.setHeadImgs(Arrays.asList("https://example.com/head")); + param.setTitle("商品"); + + ProductBrandRecommendResponse result = productService(channelService).productBrandRecommend(param); + + assertRequest(channelService, "/channels/ec/product/productbrandrecommend", "{\"cat_id\":6000,\"head_imgs\":[\"https://example.com/head\"],\"title\":\"商品\"}"); + assertEquals(result.getBrandId(), Long.valueOf(123)); + } + + @Test + public void shouldAddThirdPartyProductSource() throws WxErrorException { + RecordingChannelService channelService = response("{\"errcode\":0,\"errmsg\":\"ok\",\"third_party_source_id\":12345}"); + AddProductThirdPartySourceParam param = new AddProductThirdPartySourceParam(); + param.setSceneValue(1); + param.setPublishMethod(2); + + AddProductThirdPartySourceResponse result = productService(channelService).addProductThirdPartySource(param); + + assertRequest(channelService, "/channels/ec/product/addproductthirdpartysource", "{\"scene_value\":1,\"publish_method\":2}"); + assertEquals(result.getThirdPartySourceId(), Long.valueOf(12345)); + } + + @Test + public void shouldGetStockFlowWithRequiredPaginationAndStockTypeId() throws WxErrorException { + RecordingChannelService channelService = response("{\"errcode\":0,\"errmsg\":\"ok\",\"data\":{\"stock_flow_info_list\":[{\"amount\":2}],\"next_key\":\"next\"}}"); + ProductStockFlowParam param = new ProductStockFlowParam(); + param.setProductId("10001"); + param.setSkuId("10002"); + param.setStockType(2); + param.setStockTypeId("activity-1"); + param.setBeginTime(100L); + param.setEndTime(200L); + param.setPageSize(10); + + ProductStockFlowResponse result = productService(channelService).getStockFlow(param); + + assertRequest(channelService, "/channels/ec/product/stock/getflow", "{\"product_id\":\"10001\",\"sku_id\":\"10002\",\"stock_type\":2,\"begin_time\":100,\"end_time\":200,\"page_size\":10,\"stock_type_id\":\"activity-1\"}"); + assertEquals(result.getData().getStockFlowInfoList().size(), 1); + assertEquals(result.getData().getNextKey(), "next"); + } + + @Test + public void shouldSerializeNestedProductManagementResponses() throws IOException { + ProductAuditQuotaResponse.AuditQuota auditQuota = new ProductAuditQuotaResponse.AuditQuota(); + ProductCategoryClassifyResponse.Category category = new ProductCategoryClassifyResponse.Category(); + ProductCategoryClassifyResponse.CategoryLevel categoryLevel = new ProductCategoryClassifyResponse.CategoryLevel(); + ProductCategoryClassifyResponse.CategoryInfo categoryInfo = new ProductCategoryClassifyResponse.CategoryInfo(); + ProductStockFlowResponse.StockFlowData stockFlowData = new ProductStockFlowResponse.StockFlowData(); + + assertSerializable(auditQuota); + assertSerializable(category); + assertSerializable(categoryLevel); + assertSerializable(categoryInfo); + assertSerializable(stockFlowData); + } + + private static WxChannelProductServiceImpl productService(RecordingChannelService channelService) { + return new WxChannelProductServiceImpl(channelService); + } + + private static RecordingChannelService response(String response) { + return new RecordingChannelService(response); + } + + private static String okResponse() { + return "{\"errcode\":0,\"errmsg\":\"ok\"}"; + } + + private static void assertRequest(RecordingChannelService channelService, String path, String expectedJson) { + assertTrue(channelService.getUrl().endsWith(path)); + assertEquals(JsonUtils.decode(channelService.getRequestJson(), Object.class), JsonUtils.decode(expectedJson, Object.class)); + } + + private static void assertSerializable(Object value) throws IOException { + ByteArrayOutputStream output = new ByteArrayOutputStream(); + try (ObjectOutputStream objectOutput = new ObjectOutputStream(output)) { + objectOutput.writeObject(value); + } + } + + private static class RecordingChannelService extends WxChannelServiceHttpClientImpl { + private final String response; + private String url; + private String requestJson; + + RecordingChannelService(String response) { + this.response = response; + } + + @Override + public String post(String url, String postData) { + this.url = url; + this.requestJson = postData; + return response; + } + + String getUrl() { + return url; + } + + String getRequestJson() { + return requestJson; + } + } +} diff --git a/weixin-java-channel/src/test/resources/testng.xml b/weixin-java-channel/src/test/resources/testng.xml index c5c07eb23a..f4850bdf21 100644 --- a/weixin-java-channel/src/test/resources/testng.xml +++ b/weixin-java-channel/src/test/resources/testng.xml @@ -3,6 +3,7 @@ + From 0122878b14d7a1859e8b6dcb81df7e3f6231e0cd Mon Sep 17 00:00:00 2001 From: Binary Wang Date: Sat, 22 Aug 2026 20:56:47 +0800 Subject: [PATCH 22/31] =?UTF-8?q?:new:=20#4105=20=E3=80=90=E8=A7=86?= =?UTF-8?q?=E9=A2=91=E5=8F=B7=E3=80=91=E5=A2=9E=E5=8A=A0=E5=BE=AE=E4=BF=A1?= =?UTF-8?q?=E5=B0=8F=E5=BA=97=E5=95=86=E5=AE=B6=E5=AE=A2=E6=9C=8D=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plans/2026-08-22-channel-merchant-kf.md | 45 ++++++ .../2026-08-22-channel-merchant-kf-design.md | 18 +++ .../channel/api/WxChannelKfService.java | 41 +++++ .../weixin/channel/api/WxChannelService.java | 9 ++ .../api/impl/BaseWxChannelServiceImpl.java | 9 ++ .../api/impl/WxChannelKfServiceImpl.java | 45 ++++++ .../bean/kf/WxChannelKfCosUploadResponse.java | 20 +++ .../bean/kf/WxChannelKfSendMsgParam.java | 90 +++++++++++ .../bean/kf/WxChannelKfSendMsgResponse.java | 20 +++ .../constant/WxChannelApiUrlConstants.java | 9 ++ .../api/impl/WxChannelKfServiceImplTest.java | 120 +++++++++++++++ .../channel/bean/kf/WxChannelKfBeanTest.java | 141 ++++++++++++++++++ .../src/test/resources/testng.xml | 6 + .../weixin/common/bean/CommonUploadParam.java | 22 ++- 14 files changed, 594 insertions(+), 1 deletion(-) create mode 100644 docs/superpowers/plans/2026-08-22-channel-merchant-kf.md create mode 100644 docs/superpowers/specs/2026-08-22-channel-merchant-kf-design.md create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelKfService.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelKfServiceImpl.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/kf/WxChannelKfCosUploadResponse.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/kf/WxChannelKfSendMsgParam.java create mode 100644 weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/kf/WxChannelKfSendMsgResponse.java create mode 100644 weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelKfServiceImplTest.java create mode 100644 weixin-java-channel/src/test/java/me/chanjar/weixin/channel/bean/kf/WxChannelKfBeanTest.java diff --git a/docs/superpowers/plans/2026-08-22-channel-merchant-kf.md b/docs/superpowers/plans/2026-08-22-channel-merchant-kf.md new file mode 100644 index 0000000000..99aa235cb1 --- /dev/null +++ b/docs/superpowers/plans/2026-08-22-channel-merchant-kf.md @@ -0,0 +1,45 @@ +# 视频号小店商家客服 API Implementation Plan + +> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. + +**Goal:** 为 `weixin-java-channel` 增加商家客服媒体上传和消息发送 API。 + +**Architecture:** 以独立的客服子服务封装两条官方 API,通过既有 `BaseWxChannelServiceImpl` 完成鉴权、JSON 请求与 multipart 上传。请求模型保持强类型,服务层测试使用可记录调用的测试替身,避免真实网络依赖。 + +**Tech Stack:** Java 8、Maven、TestNG、Lombok、Jackson 注解。 + +## Global Constraints + +- Java 8 兼容,不新增依赖。 +- API 路径固定为 `/channels/ec/commkf/cosupload` 和 `/channels/ec/commkf/sendmsg`。 +- 使用 TestNG,所有新增测试不使用真实微信凭据。 + +--- + +### Task 1: 请求与响应模型 + +**Files:** +- Create: `weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/kf/WxChannelKfCosUploadResponse.java` +- Create: `weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/kf/WxChannelKfSendMsgParam.java` +- Create: `weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/kf/WxChannelKfSendMsgResponse.java` +- Test: `weixin-java-channel/src/test/java/me/chanjar/weixin/channel/bean/kf/WxChannelKfBeanTest.java` + +- [ ] Write JSON encode/decode tests for `request_id`, `open_id`, `msg_type`, `text.content`, `cos_url` and `msg_id`. +- [ ] Run the test and verify it fails because the classes do not exist. +- [ ] Add the minimal annotated model classes and nested message content types. +- [ ] Run the test and verify it passes. + +### Task 2: 服务入口与请求执行 + +**Files:** +- Create: `weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelKfService.java` +- Create: `weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelKfServiceImpl.java` +- Modify: `weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelService.java` +- Modify: `weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/BaseWxChannelServiceImpl.java` +- Modify: `weixin-java-channel/src/main/java/me/chanjar/weixin/channel/constant/WxChannelApiUrlConstants.java` +- Test: `weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelKfServiceImplTest.java` + +- [ ] Write tests proving the service uses the documented URLs, uploads `file`, `open_id`, `msg_type`, decodes both responses, and caches `getKfService()`. +- [ ] Run the test and verify it fails because the API is absent. +- [ ] Add the minimal service API, implementation, constants and cached service entry point. +- [ ] Run the focused tests and module test suite, then inspect `git diff --check`. diff --git a/docs/superpowers/specs/2026-08-22-channel-merchant-kf-design.md b/docs/superpowers/specs/2026-08-22-channel-merchant-kf-design.md new file mode 100644 index 0000000000..12ecfd95c8 --- /dev/null +++ b/docs/superpowers/specs/2026-08-22-channel-merchant-kf-design.md @@ -0,0 +1,18 @@ +# 视频号小店商家客服 API 设计 + +## 目标 + +实现 Issue #3991 所列的商家客服媒体上传与消息发送 API,并使调用入口、请求模型和响应解析与现有 `weixin-java-channel` 服务保持一致。 + +## 设计 + +- 在 `WxChannelService` 暴露 `getKfService()`,由 `BaseWxChannelServiceImpl` 缓存并懒加载 `WxChannelKfServiceImpl`。 +- `WxChannelKfService` 提供媒体上传(带文件名和便捷重载)以及接收强类型请求参数的消息发送方法。上传请求通过既有 `CommonUploadParam` 发送 multipart 数据。 +- 消息模型用 `@JsonProperty` 显式映射微信字段,支持 text、image、video、file、product_share 和 order_share 六类内容;响应继承项目既有基础响应。 +- API 常量使用官方文档确认的 `/channels/ec/commkf/cosupload` 和 `/channels/ec/commkf/sendmsg` 路径。 + +## 质量边界 + +- 保持 Java 8 兼容,不增加依赖,不变更现有公共 API。 +- 使用 TestNG 覆盖请求/响应 JSON 映射、服务 URL、上传表单字段及服务入口缓存;测试不依赖真实微信凭据。 +- PR 使用 `Closes #3991` 关联并关闭原始 Issue;旧 PR #4037 在新 PR 创建后以替代说明关闭。 diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelKfService.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelKfService.java new file mode 100644 index 0000000000..41fb153eb3 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelKfService.java @@ -0,0 +1,41 @@ +package me.chanjar.weixin.channel.api; + +import me.chanjar.weixin.channel.bean.kf.WxChannelKfSendMsgParam; +import me.chanjar.weixin.channel.bean.kf.WxChannelKfSendMsgResponse; +import me.chanjar.weixin.common.error.WxErrorException; + +/** 视频号小店商家客服服务。 */ +public interface WxChannelKfService { + + /** + * 上传多媒体资源。 + * + * @param openId 用户 open_id + * @param msgType 文件类型,仅支持 video、file、image + * @param file 文件字节内容 + * @return COS 地址 + * @throws WxErrorException 微信异常 + */ + String uploadMedia(String openId, String msgType, byte[] file) throws WxErrorException; + + /** + * 上传多媒体资源。 + * + * @param openId 用户 open_id + * @param msgType 文件类型,仅支持 video、file、image + * @param fileName 文件名 + * @param file 文件字节内容 + * @return COS 地址 + * @throws WxErrorException 微信异常 + */ + String uploadMedia(String openId, String msgType, String fileName, byte[] file) throws WxErrorException; + + /** + * 发送客服消息。 + * + * @param param 请求参数 + * @return 发送结果 + * @throws WxErrorException 微信异常 + */ + WxChannelKfSendMsgResponse sendMessage(WxChannelKfSendMsgParam param) throws WxErrorException; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelService.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelService.java index 52cc924bc9..5a4c4d3d41 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelService.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelService.java @@ -7,6 +7,15 @@ */ public interface WxChannelService extends BaseWxChannelService { + /** + * 商家客服服务。 + * + * @return 商家客服服务 + */ + default WxChannelKfService getKfService() { + throw new UnsupportedOperationException("WxChannelService implementation does not support getKfService()"); + } + /** * 基础接口服务 * diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/BaseWxChannelServiceImpl.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/BaseWxChannelServiceImpl.java index b167af0d4d..427a24d3b7 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/BaseWxChannelServiceImpl.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/BaseWxChannelServiceImpl.java @@ -72,6 +72,7 @@ public abstract class BaseWxChannelServiceImpl implements WxChannelService private WxTalentService talentService = null; private WxChannelFavoriteService favoriteService = null; private WxChannelEwaybillService ewaybillService = null; + private WxChannelKfService kfService = null; protected WxChannelConfig config; private int retrySleepMillis = 1000; @@ -548,4 +549,12 @@ public synchronized WxChannelEwaybillService getEwaybillService() { return ewaybillService; } + @Override + public synchronized WxChannelKfService getKfService() { + if (kfService == null) { + kfService = new WxChannelKfServiceImpl(this); + } + return kfService; + } + } diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelKfServiceImpl.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelKfServiceImpl.java new file mode 100644 index 0000000000..21bef92e1e --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelKfServiceImpl.java @@ -0,0 +1,45 @@ +package me.chanjar.weixin.channel.api.impl; + +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Kf.COS_UPLOAD_URL; +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Kf.SEND_MSG_URL; + +import me.chanjar.weixin.channel.api.WxChannelKfService; +import me.chanjar.weixin.channel.bean.kf.WxChannelKfCosUploadResponse; +import me.chanjar.weixin.channel.bean.kf.WxChannelKfSendMsgParam; +import me.chanjar.weixin.channel.bean.kf.WxChannelKfSendMsgResponse; +import me.chanjar.weixin.channel.util.JsonUtils; +import me.chanjar.weixin.channel.util.ResponseUtils; +import me.chanjar.weixin.common.bean.CommonUploadParam; +import me.chanjar.weixin.common.error.WxErrorException; +import me.chanjar.weixin.common.util.http.SimplePostRequestExecutor; + +/** 视频号小店商家客服服务实现。 */ +public class WxChannelKfServiceImpl implements WxChannelKfService { + + private final BaseWxChannelServiceImpl channelService; + + public WxChannelKfServiceImpl(BaseWxChannelServiceImpl channelService) { + this.channelService = channelService; + } + + @Override + public String uploadMedia(String openId, String msgType, byte[] file) throws WxErrorException { + return uploadMedia(openId, msgType, null, file); + } + + @Override + public String uploadMedia(String openId, String msgType, String fileName, byte[] file) throws WxErrorException { + CommonUploadParam uploadParam = CommonUploadParam.fromBytes("file", fileName, file) + .addFormField("open_id", openId) + .addFormField("msg_type", msgType); + String responseJson = channelService.upload(COS_UPLOAD_URL, uploadParam); + return ResponseUtils.decode(responseJson, WxChannelKfCosUploadResponse.class).getCosUrl(); + } + + @Override + public WxChannelKfSendMsgResponse sendMessage(WxChannelKfSendMsgParam param) throws WxErrorException { + String responseJson = channelService.executeWithoutLog(SimplePostRequestExecutor.create(channelService), SEND_MSG_URL, + JsonUtils.encode(param)); + return ResponseUtils.decode(responseJson, WxChannelKfSendMsgResponse.class); + } +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/kf/WxChannelKfCosUploadResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/kf/WxChannelKfCosUploadResponse.java new file mode 100644 index 0000000000..e5261dbf66 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/kf/WxChannelKfCosUploadResponse.java @@ -0,0 +1,20 @@ +package me.chanjar.weixin.channel.bean.kf; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; + +/** 客服素材上传响应。 */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class WxChannelKfCosUploadResponse extends WxChannelBaseResponse { + + private static final long serialVersionUID = 1L; + + /** 素材在 COS 上的地址。 */ + @JsonProperty("cos_url") + private String cosUrl; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/kf/WxChannelKfSendMsgParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/kf/WxChannelKfSendMsgParam.java new file mode 100644 index 0000000000..0653c5edca --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/kf/WxChannelKfSendMsgParam.java @@ -0,0 +1,90 @@ +package me.chanjar.weixin.channel.bean.kf; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** 发送客服消息请求参数。 */ +@Data +@NoArgsConstructor +public class WxChannelKfSendMsgParam implements Serializable { + + private static final long serialVersionUID = 1L; + + /** 请求幂等标识。 */ + @JsonProperty("request_id") + private String requestId; + + /** 接收消息的用户 openid。 */ + @JsonProperty("open_id") + private String openId; + + /** 消息类型。 */ + @JsonProperty("msg_type") + private String msgType; + + /** 文本消息内容。 */ + @JsonProperty("text") + private Text text; + + /** 图片消息内容。 */ + @JsonProperty("image") + private CosUrlMessage image; + + /** 视频消息内容。 */ + @JsonProperty("video") + private CosUrlMessage video; + + /** 文件消息内容。 */ + @JsonProperty("file") + private CosUrlMessage file; + + /** 商品卡片消息内容。 */ + @JsonProperty("product_share") + private ProductShareMessage productShare; + + /** 订单卡片消息内容。 */ + @JsonProperty("order_share") + private OrderShareMessage orderShare; + + @Data + @NoArgsConstructor + public static class Text implements Serializable { + + private static final long serialVersionUID = 1L; + + @JsonProperty("content") + private String content; + } + + @Data + @NoArgsConstructor + public static class CosUrlMessage implements Serializable { + + private static final long serialVersionUID = 1L; + + @JsonProperty("cos_url") + private String cosUrl; + } + + @Data + @NoArgsConstructor + public static class ProductShareMessage implements Serializable { + + private static final long serialVersionUID = 1L; + + @JsonProperty("product_id") + private String productId; + } + + @Data + @NoArgsConstructor + public static class OrderShareMessage implements Serializable { + + private static final long serialVersionUID = 1L; + + @JsonProperty("order_id") + private String orderId; + } +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/kf/WxChannelKfSendMsgResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/kf/WxChannelKfSendMsgResponse.java new file mode 100644 index 0000000000..570e309fa3 --- /dev/null +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/kf/WxChannelKfSendMsgResponse.java @@ -0,0 +1,20 @@ +package me.chanjar.weixin.channel.bean.kf; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; + +/** 发送客服消息响应。 */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class WxChannelKfSendMsgResponse extends WxChannelBaseResponse { + + private static final long serialVersionUID = 1L; + + /** 消息 id。 */ + @JsonProperty("msg_id") + private String msgId; +} diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/constant/WxChannelApiUrlConstants.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/constant/WxChannelApiUrlConstants.java index 86de88947b..105879dae2 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/constant/WxChannelApiUrlConstants.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/constant/WxChannelApiUrlConstants.java @@ -49,6 +49,15 @@ public interface Favorite { String GET_FAVORITE_COUNT = "https://api.weixin.qq.com/channels/ec/favorites/count/get"; } + /** 商家客服相关接口 */ + public interface Kf { + + /** 上传客服素材 */ + String COS_UPLOAD_URL = "https://api.weixin.qq.com/channels/ec/commkf/cosupload"; + /** 发送客服消息 */ + String SEND_MSG_URL = "https://api.weixin.qq.com/channels/ec/commkf/sendmsg"; + } + /** 商品类目相关接口 */ public interface Category { diff --git a/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelKfServiceImplTest.java b/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelKfServiceImplTest.java new file mode 100644 index 0000000000..02353aab37 --- /dev/null +++ b/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelKfServiceImplTest.java @@ -0,0 +1,120 @@ +package me.chanjar.weixin.channel.api.impl; + +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertNotNull; +import static org.testng.Assert.assertSame; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import me.chanjar.weixin.channel.bean.kf.WxChannelKfSendMsgParam; +import me.chanjar.weixin.channel.bean.kf.WxChannelKfSendMsgResponse; +import me.chanjar.weixin.channel.util.JsonUtils; +import me.chanjar.weixin.common.bean.CommonUploadParam; +import me.chanjar.weixin.common.error.WxErrorException; +import me.chanjar.weixin.common.util.http.RequestExecutor; +import org.testng.annotations.Test; + +/** 商家客服服务离线测试。 */ +public class WxChannelKfServiceImplTest { + + @Test + public void shouldUploadMediaWithDocumentedUrlAndMultipartFields() throws WxErrorException { + RecordingChannelService channelService = new RecordingChannelService(); + channelService.uploadResult = "{\"errcode\":0,\"errmsg\":\"ok\",\"cos_url\":\"https://cos.example.com/image.png\"}"; + + String cosUrl = new WxChannelKfServiceImpl(channelService) + .uploadMedia("open-id", "image", "image.png", new byte[]{1, 2, 3}); + + assertEquals(channelService.uploadUrl, "https://api.weixin.qq.com/channels/ec/commkf/cosupload"); + assertNotNull(channelService.uploadParam); + assertEquals(channelService.uploadParam.getName(), "file"); + assertEquals(channelService.uploadParam.getData().getFileName(), "image.png"); + assertEquals(channelService.uploadParam.getData().readAllBytes(), new byte[]{1, 2, 3}); + assertEquals(channelService.uploadParam.getFormFields().get("open_id"), "open-id"); + assertEquals(channelService.uploadParam.getFormFields().get("msg_type"), "image"); + assertEquals(cosUrl, "https://cos.example.com/image.png"); + } + + @Test + public void shouldSendJsonMessageAndDecodeResponse() throws WxErrorException { + RecordingChannelService channelService = new RecordingChannelService(); + channelService.postResult = "{\"errcode\":0,\"errmsg\":\"ok\",\"msg_id\":\"message-id\"}"; + WxChannelKfSendMsgParam param = new WxChannelKfSendMsgParam(); + param.setRequestId("request-id"); + param.setOpenId("open-id"); + param.setMsgType("text"); + WxChannelKfSendMsgParam.Text text = new WxChannelKfSendMsgParam.Text(); + text.setContent("hello"); + param.setText(text); + + WxChannelKfSendMsgResponse response = new WxChannelKfServiceImpl(channelService).sendMessage(param); + + assertEquals(channelService.postUrl, "https://api.weixin.qq.com/channels/ec/commkf/sendmsg"); + assertEquals(channelService.postJson, + "{\"request_id\":\"request-id\",\"open_id\":\"open-id\",\"msg_type\":\"text\",\"text\":{\"content\":\"hello\"}}"); + assertEquals(channelService.executeWithoutLogCalled, true); + assertEquals(response.getMsgId(), "message-id"); + assertEquals(response.getErrCode(), 0); + } + + @Test + public void shouldProvideFreshUploadStreamForEachAttempt() throws IOException { + CommonUploadParam uploadParam = CommonUploadParam.fromBytes("file", "image.png", new byte[]{1, 2, 3}); + + assertEquals(readAllBytes(uploadParam.getData().getInputStream()), new byte[]{1, 2, 3}); + assertEquals(readAllBytes(uploadParam.getData().getInputStream()), new byte[]{1, 2, 3}); + } + + @Test + public void shouldCacheKfServiceEntryPoint() { + WxChannelServiceImpl channelService = new WxChannelServiceImpl(); + + assertSame(channelService.getKfService(), channelService.getKfService()); + } + + private static class RecordingChannelService extends WxChannelServiceImpl { + + private String uploadResult; + private String postResult; + private String uploadUrl; + private CommonUploadParam uploadParam; + private String postUrl; + private String postJson; + private boolean executeWithoutLogCalled; + + @Override + public String upload(String url, CommonUploadParam param) { + this.uploadUrl = url; + this.uploadParam = param; + return uploadResult; + } + + @Override + public String post(String url, Object obj) { + this.postUrl = url; + this.postJson = JsonUtils.encode(obj); + return postResult; + } + + @Override + @SuppressWarnings("unchecked") + public T executeWithoutLog(RequestExecutor executor, String uri, E data) { + this.executeWithoutLogCalled = true; + this.postUrl = uri; + this.postJson = (String) data; + return (T) postResult; + } + } + + private byte[] readAllBytes(InputStream inputStream) throws IOException { + try (InputStream stream = inputStream; ByteArrayOutputStream outputStream = new ByteArrayOutputStream()) { + byte[] buffer = new byte[16]; + int count; + while ((count = stream.read(buffer)) != -1) { + outputStream.write(buffer, 0, count); + } + return outputStream.toByteArray(); + } + } +} diff --git a/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/bean/kf/WxChannelKfBeanTest.java b/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/bean/kf/WxChannelKfBeanTest.java new file mode 100644 index 0000000000..458cf44f25 --- /dev/null +++ b/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/bean/kf/WxChannelKfBeanTest.java @@ -0,0 +1,141 @@ +package me.chanjar.weixin.channel.bean.kf; + +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertFalse; +import static org.testng.Assert.assertNotNull; +import static org.testng.Assert.assertTrue; + +import me.chanjar.weixin.channel.util.JsonUtils; +import org.testng.annotations.Test; + +/** JSON serialization tests for channel customer service models. */ +public class WxChannelKfBeanTest { + + @Test + public void testSendMsgParamJson() { + WxChannelKfSendMsgParam param = createSendMsgParam("text"); + WxChannelKfSendMsgParam.Text text = new WxChannelKfSendMsgParam.Text(); + text.setContent("hello"); + param.setText(text); + + String json = JsonUtils.encode(param); + assertNotNull(json); + assertFalse(json.contains("requestId")); + assertFalse(json.contains("openId")); + assertFalse(json.contains("msgType")); + WxChannelKfSendMsgParam decoded = JsonUtils.decode(json, WxChannelKfSendMsgParam.class); + assertEquals(decoded.getRequestId(), "request-1"); + assertEquals(decoded.getOpenId(), "open-1"); + assertEquals(decoded.getMsgType(), "text"); + assertNotNull(decoded.getText()); + assertEquals(decoded.getText().getContent(), "hello"); + } + + @Test + public void testImageMessageJson() { + WxChannelKfSendMsgParam param = createSendMsgParam("image"); + WxChannelKfSendMsgParam.CosUrlMessage image = new WxChannelKfSendMsgParam.CosUrlMessage(); + image.setCosUrl("https://example.test/image"); + param.setImage(image); + + assertCosUrlMessageJson(param, "image", "https://example.test/image"); + } + + @Test + public void testVideoMessageJson() { + WxChannelKfSendMsgParam param = createSendMsgParam("video"); + WxChannelKfSendMsgParam.CosUrlMessage video = new WxChannelKfSendMsgParam.CosUrlMessage(); + video.setCosUrl("https://example.test/video"); + param.setVideo(video); + + assertCosUrlMessageJson(param, "video", "https://example.test/video"); + } + + @Test + public void testFileMessageJson() { + WxChannelKfSendMsgParam param = createSendMsgParam("file"); + WxChannelKfSendMsgParam.CosUrlMessage file = new WxChannelKfSendMsgParam.CosUrlMessage(); + file.setCosUrl("https://example.test/file"); + param.setFile(file); + + assertCosUrlMessageJson(param, "file", "https://example.test/file"); + } + + @Test + public void testProductShareMessageJson() { + WxChannelKfSendMsgParam param = createSendMsgParam("product_share"); + WxChannelKfSendMsgParam.ProductShareMessage product = + new WxChannelKfSendMsgParam.ProductShareMessage(); + product.setProductId("product-1"); + param.setProductShare(product); + + String json = JsonUtils.encode(param); + assertTrue(json.contains("\"product_share\":{\"product_id\":\"product-1\"}")); + assertFalse(json.contains("productShare")); + assertFalse(json.contains("productId")); + WxChannelKfSendMsgParam decoded = JsonUtils.decode(json, WxChannelKfSendMsgParam.class); + assertEquals(decoded.getProductShare().getProductId(), "product-1"); + } + + @Test + public void testOrderShareMessageJson() { + WxChannelKfSendMsgParam param = createSendMsgParam("order_share"); + WxChannelKfSendMsgParam.OrderShareMessage order = new WxChannelKfSendMsgParam.OrderShareMessage(); + order.setOrderId("order-1"); + param.setOrderShare(order); + + String json = JsonUtils.encode(param); + assertTrue(json.contains("\"order_share\":{\"order_id\":\"order-1\"}")); + assertFalse(json.contains("orderShare")); + assertFalse(json.contains("orderId")); + WxChannelKfSendMsgParam decoded = JsonUtils.decode(json, WxChannelKfSendMsgParam.class); + assertEquals(decoded.getOrderShare().getOrderId(), "order-1"); + } + + @Test + public void testCosUploadResponseJson() { + WxChannelKfCosUploadResponse response = JsonUtils.decode( + "{\"errcode\":0,\"errmsg\":\"ok\",\"cos_url\":\"https://example.test/media\"}", + WxChannelKfCosUploadResponse.class); + + assertEquals(response.getErrCode(), 0); + assertEquals(response.getCosUrl(), "https://example.test/media"); + assertEquals(JsonUtils.decode(JsonUtils.encode(response), WxChannelKfCosUploadResponse.class) + .getCosUrl(), "https://example.test/media"); + } + + @Test + public void testSendMsgResponseJson() { + WxChannelKfSendMsgResponse response = JsonUtils.decode( + "{\"errcode\":0,\"errmsg\":\"ok\",\"msg_id\":\"msg-1\"}", + WxChannelKfSendMsgResponse.class); + + assertEquals(response.getErrCode(), 0); + assertEquals(response.getMsgId(), "msg-1"); + assertEquals(JsonUtils.decode(JsonUtils.encode(response), WxChannelKfSendMsgResponse.class) + .getMsgId(), "msg-1"); + } + + private WxChannelKfSendMsgParam createSendMsgParam(String msgType) { + WxChannelKfSendMsgParam param = new WxChannelKfSendMsgParam(); + param.setRequestId("request-1"); + param.setOpenId("open-1"); + param.setMsgType(msgType); + return param; + } + + private void assertCosUrlMessageJson(WxChannelKfSendMsgParam param, String fieldName, + String cosUrl) { + String json = JsonUtils.encode(param); + assertTrue(json.contains("\"" + fieldName + "\":{\"cos_url\":\"" + cosUrl + "\"}")); + assertFalse(json.contains("cosUrl")); + WxChannelKfSendMsgParam decoded = JsonUtils.decode(json, WxChannelKfSendMsgParam.class); + if ("image".equals(fieldName)) { + assertEquals(decoded.getImage().getCosUrl(), cosUrl); + } else if ("video".equals(fieldName)) { + assertEquals(decoded.getVideo().getCosUrl(), cosUrl); + } else { + assertEquals(decoded.getFile().getCosUrl(), cosUrl); + } + } +} diff --git a/weixin-java-channel/src/test/resources/testng.xml b/weixin-java-channel/src/test/resources/testng.xml index f4850bdf21..579acb3252 100644 --- a/weixin-java-channel/src/test/resources/testng.xml +++ b/weixin-java-channel/src/test/resources/testng.xml @@ -26,4 +26,10 @@ + + + + + + diff --git a/weixin-java-common/src/main/java/me/chanjar/weixin/common/bean/CommonUploadParam.java b/weixin-java-common/src/main/java/me/chanjar/weixin/common/bean/CommonUploadParam.java index 42e1869502..34fb66da15 100644 --- a/weixin-java-common/src/main/java/me/chanjar/weixin/common/bean/CommonUploadParam.java +++ b/weixin-java-common/src/main/java/me/chanjar/weixin/common/bean/CommonUploadParam.java @@ -78,7 +78,27 @@ public static CommonUploadParam fromFile(String name, File file) { */ @SneakyThrows public static CommonUploadParam fromBytes(String name, @Nullable String fileName, byte[] bytes) { - return new CommonUploadParam(name, new CommonUploadData(fileName, new ByteArrayInputStream(bytes), bytes.length), null); + return new CommonUploadParam(name, new ByteArrayUploadData(fileName, bytes), null); + } + + private static class ByteArrayUploadData extends CommonUploadData { + + private final byte[] bytes; + + private ByteArrayUploadData(@Nullable String fileName, byte[] bytes) { + super(fileName, new ByteArrayInputStream(bytes), bytes.length); + this.bytes = bytes; + } + + @Override + public ByteArrayInputStream getInputStream() { + return new ByteArrayInputStream(bytes); + } + + @Override + public byte[] readAllBytes() { + return bytes.clone(); + } } /** From 92ac532377e6eca677114d6dfb44f55d61e8c9fc Mon Sep 17 00:00:00 2001 From: buaazyl Date: Sat, 22 Aug 2026 21:54:42 +0800 Subject: [PATCH 23/31] =?UTF-8?q?:new:=20#4107=20=E3=80=90=E5=BE=AE?= =?UTF-8?q?=E4=BF=A1=E6=94=AF=E4=BB=98=E3=80=91=E6=96=B0=E5=A2=9E=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E5=95=86=E7=82=B9=E9=87=91=E8=AE=A1=E5=88=92=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=EF=BC=8C=E5=B9=B6=E4=BF=AE=E5=A4=8DpatchV3=E7=BC=BA?= =?UTF-8?q?=E5=A4=B1Http=E5=A4=B4=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wxpay/bean/goldplan/GoldPlanResult.java | 22 ++++ .../wxpay/service/GoldPlanService.java | 104 ++++++++++++++++ .../wxpay/service/WxPayService.java | 7 ++ .../service/impl/BaseWxPayServiceImpl.java | 3 + .../service/impl/GoldPlanServiceImpl.java | 113 ++++++++++++++++++ .../impl/WxPayServiceApacheHttpImpl.java | 1 + .../impl/WxPayServiceHttpComponentsImpl.java | 1 + 7 files changed, 251 insertions(+) create mode 100644 weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/goldplan/GoldPlanResult.java create mode 100644 weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/GoldPlanService.java create mode 100644 weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/GoldPlanServiceImpl.java diff --git a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/goldplan/GoldPlanResult.java b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/goldplan/GoldPlanResult.java new file mode 100644 index 0000000000..9ab72f917a --- /dev/null +++ b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/goldplan/GoldPlanResult.java @@ -0,0 +1,22 @@ +package com.github.binarywang.wxpay.bean.goldplan; + +import com.google.gson.annotations.SerializedName; +import lombok.Data; + +import java.io.Serializable; + +/** + * 点金计划操作结果 + * + * @author zhangyl + */ +@Data +public class GoldPlanResult implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * 特约商户号 + */ + @SerializedName("sub_mchid") + private String subMchId; +} diff --git a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/GoldPlanService.java b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/GoldPlanService.java new file mode 100644 index 0000000000..a02e7b21df --- /dev/null +++ b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/GoldPlanService.java @@ -0,0 +1,104 @@ +package com.github.binarywang.wxpay.service; + +import com.github.binarywang.wxpay.bean.goldplan.GoldPlanResult; +import com.github.binarywang.wxpay.exception.WxPayException; + +import java.util.List; + +/** + * 点金计划 接口 + *

+ * 产品介绍 + *

+ * + * @author zhangyl + * @since 2026-08-22 + */ +public interface GoldPlanService { + + /** + * 为特约商户开通点金计划 + *

+ * 接口文档 + *

+ * + * @param subMchId 特约商户号 + * @param operationPayScene 支付场景,可选值为JSAPI_AND_MINIPROGRAM、JSAPI、MINIPROGRAM;不传时默认为JSAPI + * @return 点金计划操作结果 + * @throws WxPayException 微信支付请求异常 + */ + GoldPlanResult openGoldPlan(String subMchId, String operationPayScene) throws WxPayException; + + /** + * 为特约商户关闭点金计划 + *

+ * 接口文档 + *

+ * + * @param subMchId 特约商户号 + * @param operationPayScene 支付场景,可选值为JSAPI_AND_MINIPROGRAM、JSAPI、MINIPROGRAM;不传时默认为JSAPI + * @return 点金计划操作结果 + * @throws WxPayException 微信支付请求异常 + */ + GoldPlanResult closeGoldPlan(String subMchId, String operationPayScene) throws WxPayException; + + /** + * 为特约商户开通商家小票 + *

+ * 接口文档 + *

+ * + * @param subMchId 特约商户号 + * @return 商家小票操作结果 + * @throws WxPayException 微信支付请求异常 + */ + GoldPlanResult openCustomPage(String subMchId) throws WxPayException; + + /** + * 为特约商户关闭商家小票 + *

+ * 接口文档 + *

+ * + * @param subMchId 特约商户号 + * @return 商家小票操作结果 + * @throws WxPayException 微信支付请求异常 + */ + GoldPlanResult closeCustomPage(String subMchId) throws WxPayException; + + /** + * 设置特约商户的点金计划同业过滤标签 + *

+ * 接口文档 + *

+ * + * @param subMchId 特约商户号 + * @param advertisingIndustryFilters 同业过滤标签,最少一个,最多三个 + * @throws WxPayException 微信支付请求异常 + */ + void setAdvertisingIndustryFilter(String subMchId, List advertisingIndustryFilters) throws WxPayException; + + /** + * 为特约商户的点金计划页面开通广告展示 + *

+ * 接口文档 + *

+ * + * @param subMchId 特约商户号 + * @param advertisingIndustryFilters 同业过滤标签,可选,最多三个 + * @throws WxPayException 微信支付请求异常 + */ + void openAdvertisingShow(String subMchId, List advertisingIndustryFilters) throws WxPayException; + + /** + * 为特约商户的点金计划页面关闭广告展示 + *

+ * 接口文档 + *

+ * + * @param subMchId 特约商户号 + * @throws WxPayException 微信支付请求异常 + */ + void closeAdvertisingShow(String subMchId) throws WxPayException; + +} diff --git a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/WxPayService.java b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/WxPayService.java index 2aec711831..d0d43285da 100644 --- a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/WxPayService.java +++ b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/WxPayService.java @@ -408,6 +408,13 @@ default WxPayService switchoverTo(String mchIdOrConfigKey) { */ MerchantLimitationService getMerchantLimitationService(); + /** + * 获取点金计划服务类 + * + * @return 点金计划服务 + */ + GoldPlanService getGoldPlanService(); + /** * 获取服务商电子发票服务类。 * diff --git a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/BaseWxPayServiceImpl.java b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/BaseWxPayServiceImpl.java index 8489f80624..18e9b05b1a 100644 --- a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/BaseWxPayServiceImpl.java +++ b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/BaseWxPayServiceImpl.java @@ -148,6 +148,9 @@ public abstract class BaseWxPayServiceImpl implements WxPayService { @Getter private final MerchantLimitationService merchantLimitationService = new MerchantLimitationServiceImpl(this); + @Getter + private final GoldPlanService goldPlanService = new GoldPlanServiceImpl(this); + @Getter private final PartnerInvoiceService partnerInvoiceService = new PartnerInvoiceServiceImpl(this); diff --git a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/GoldPlanServiceImpl.java b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/GoldPlanServiceImpl.java new file mode 100644 index 0000000000..801ed6a266 --- /dev/null +++ b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/GoldPlanServiceImpl.java @@ -0,0 +1,113 @@ +package com.github.binarywang.wxpay.service.impl; + +import com.github.binarywang.wxpay.bean.goldplan.GoldPlanResult; +import com.github.binarywang.wxpay.exception.WxPayException; +import com.github.binarywang.wxpay.service.GoldPlanService; +import com.github.binarywang.wxpay.service.WxPayService; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import lombok.RequiredArgsConstructor; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * 点金计划 接口实现 + * + * @author zhangyl + * @since 2026-08-22 + */ +@RequiredArgsConstructor +public class GoldPlanServiceImpl implements GoldPlanService { + private static final Gson GSON = new GsonBuilder().create(); + private static final String OPEN = "OPEN"; + private static final String CLOSE = "CLOSE"; + + private final WxPayService payService; + + @Override + public GoldPlanResult openGoldPlan(String subMchId, String operationPayScene) throws WxPayException { + return changeGoldPlanStatus(subMchId, OPEN, operationPayScene); + } + + /** + * 调用微信支付接口开通或关闭点金计划 + * + * @param subMchId 特约商户号 + * @param operationType 操作类型 + * @param operationPayScene 支付场景 + * @return 点金计划操作结果 + * @throws WxPayException 微信支付请求异常 + */ + private GoldPlanResult changeGoldPlanStatus(String subMchId, String operationType, + String operationPayScene) throws WxPayException { + String url = String.format("%s/v3/goldplan/merchants/changegoldplanstatus", this.payService.getPayBaseUrl()); + Map request = new HashMap<>(4); + request.put("sub_mchid", subMchId); + request.put("operation_type", operationType); + request.put("operation_pay_scene", operationPayScene); + String result = this.payService.postV3(url, GSON.toJson(request)); + return GSON.fromJson(result, GoldPlanResult.class); + } + + @Override + public GoldPlanResult closeGoldPlan(String subMchId, String operationPayScene) throws WxPayException { + return changeGoldPlanStatus(subMchId, CLOSE, operationPayScene); + } + + @Override + public GoldPlanResult openCustomPage(String subMchId) throws WxPayException { + return changeCustomPageStatus(subMchId, OPEN); + } + + /** + * 调用微信支付接口开通或关闭商家小票 + * + * @param subMchId 特约商户号 + * @param operationType 操作类型 + * @return 商家小票操作结果 + * @throws WxPayException 微信支付请求异常 + */ + private GoldPlanResult changeCustomPageStatus(String subMchId, String operationType) throws WxPayException { + String url = String.format("%s/v3/goldplan/merchants/changecustompagestatus", this.payService.getPayBaseUrl()); + Map request = new HashMap<>(2); + request.put("sub_mchid", subMchId); + request.put("operation_type", operationType); + String result = this.payService.postV3(url, GSON.toJson(request)); + return GSON.fromJson(result, GoldPlanResult.class); + } + + @Override + public GoldPlanResult closeCustomPage(String subMchId) throws WxPayException { + return changeCustomPageStatus(subMchId, CLOSE); + } + + @Override + public void setAdvertisingIndustryFilter(String subMchId, List advertisingIndustryFilters) + throws WxPayException { + String url = String.format("%s/v3/goldplan/merchants/set-advertising-industry-filter", + this.payService.getPayBaseUrl()); + Map request = new HashMap<>(2); + request.put("sub_mchid", subMchId); + request.put("advertising_industry_filters", advertisingIndustryFilters); + this.payService.postV3(url, GSON.toJson(request)); + } + + @Override + public void openAdvertisingShow(String subMchId, List advertisingIndustryFilters) throws WxPayException { + String url = String.format("%s/v3/goldplan/merchants/open-advertising-show", this.payService.getPayBaseUrl()); + Map request = new HashMap<>(2); + request.put("sub_mchid", subMchId); + request.put("advertising_industry_filters", advertisingIndustryFilters); + this.payService.patchV3(url, GSON.toJson(request)); + } + + @Override + public void closeAdvertisingShow(String subMchId) throws WxPayException { + String url = String.format("%s/v3/goldplan/merchants/close-advertising-show", this.payService.getPayBaseUrl()); + Map request = new HashMap<>(1); + request.put("sub_mchid", subMchId); + this.payService.postV3(url, GSON.toJson(request)); + } +} diff --git a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/WxPayServiceApacheHttpImpl.java b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/WxPayServiceApacheHttpImpl.java index 5926bbacfb..69a67ca0b4 100644 --- a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/WxPayServiceApacheHttpImpl.java +++ b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/WxPayServiceApacheHttpImpl.java @@ -159,6 +159,7 @@ private String requestV3(String url, String requestStr, HttpRequestBase httpRequ public String patchV3(String url, String requestStr) throws WxPayException { HttpPatch httpPatch = new HttpPatch(url); httpPatch.setEntity(createEntry(requestStr)); + this.configureRequest(httpPatch); return this.requestV3(url, requestStr, httpPatch); } diff --git a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/WxPayServiceHttpComponentsImpl.java b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/WxPayServiceHttpComponentsImpl.java index 837587e76d..d28cbc890b 100644 --- a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/WxPayServiceHttpComponentsImpl.java +++ b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/WxPayServiceHttpComponentsImpl.java @@ -156,6 +156,7 @@ private String requestV3(String url, String requestStr, HttpRequestBase httpRequ public String patchV3(String url, String requestStr) throws WxPayException { HttpPatch httpPatch = new HttpPatch(url); httpPatch.setEntity(createEntry(requestStr)); + this.configureRequest(httpPatch); return this.requestV3(url, requestStr, httpPatch); } From 655c5f6235a485302863a0bc0c519f7a252e063e Mon Sep 17 00:00:00 2001 From: Binary Wang Date: Sat, 22 Aug 2026 21:55:25 +0800 Subject: [PATCH 24/31] =?UTF-8?q?:art:=20=E4=BF=AE=E5=A4=8D=E5=B0=8F?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E6=A8=A1=E5=9D=97=E5=8F=91=E5=B8=83=E6=97=B6?= =?UTF-8?q?=E7=9A=84=E6=B5=8B=E8=AF=95=E8=B7=B3=E8=BF=87=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- weixin-java-miniapp/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weixin-java-miniapp/pom.xml b/weixin-java-miniapp/pom.xml index 66e859dd0c..fdec2c98c9 100644 --- a/weixin-java-miniapp/pom.xml +++ b/weixin-java-miniapp/pom.xml @@ -115,7 +115,7 @@ org.apache.maven.plugins maven-surefire-plugin - false + ${maven.test.skip} src/test/resources/testng.xml From bb678253f9ec8906f8f5e446e88591f8f142cfcb Mon Sep 17 00:00:00 2001 From: Binary Wang Date: Sat, 22 Aug 2026 22:05:44 +0800 Subject: [PATCH 25/31] =?UTF-8?q?:art:=20=E4=BF=AE=E5=A4=8D=E8=A7=86?= =?UTF-8?q?=E9=A2=91=E5=8F=B7=E6=A8=A1=E5=9D=97=E5=8F=91=E5=B8=83=E6=97=B6?= =?UTF-8?q?=E7=9A=84=E6=B5=8B=E8=AF=95=E8=B7=B3=E8=BF=87=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- weixin-java-channel/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weixin-java-channel/pom.xml b/weixin-java-channel/pom.xml index 7542900495..f7c6247263 100644 --- a/weixin-java-channel/pom.xml +++ b/weixin-java-channel/pom.xml @@ -133,7 +133,7 @@ org.apache.maven.plugins maven-surefire-plugin - false + ${maven.test.skip} src/test/resources/testng.xml From 25423da46393c8ddd170217ba5badec04253fca3 Mon Sep 17 00:00:00 2001 From: Binary Wang Date: Sun, 23 Aug 2026 23:09:38 +0800 Subject: [PATCH 26/31] =?UTF-8?q?:bookmark:=20=E5=8F=91=E5=B8=83=204.8.6.B?= =?UTF-8?q?=20=E6=B5=8B=E8=AF=95=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- solon-plugins/pom.xml | 2 +- solon-plugins/wx-java-channel-multi-solon-plugin/pom.xml | 2 +- solon-plugins/wx-java-channel-solon-plugin/pom.xml | 2 +- solon-plugins/wx-java-cp-multi-solon-plugin/pom.xml | 2 +- solon-plugins/wx-java-cp-solon-plugin/pom.xml | 2 +- solon-plugins/wx-java-miniapp-multi-solon-plugin/pom.xml | 2 +- solon-plugins/wx-java-miniapp-solon-plugin/pom.xml | 2 +- solon-plugins/wx-java-mp-multi-solon-plugin/pom.xml | 2 +- solon-plugins/wx-java-mp-solon-plugin/pom.xml | 2 +- solon-plugins/wx-java-open-solon-plugin/pom.xml | 2 +- solon-plugins/wx-java-pay-solon-plugin/pom.xml | 2 +- solon-plugins/wx-java-qidian-solon-plugin/pom.xml | 2 +- spring-boot-starters/pom.xml | 2 +- .../wx-java-channel-multi-spring-boot-starter/pom.xml | 2 +- .../wx-java-channel-spring-boot-starter/pom.xml | 2 +- .../wx-java-cp-multi-spring-boot-starter/pom.xml | 2 +- spring-boot-starters/wx-java-cp-spring-boot-starter/pom.xml | 2 +- .../wx-java-cp-tp-multi-spring-boot-starter/pom.xml | 2 +- .../wx-java-miniapp-multi-spring-boot-starter/pom.xml | 2 +- .../wx-java-miniapp-spring-boot-starter/pom.xml | 2 +- .../wx-java-mp-multi-spring-boot-starter/pom.xml | 2 +- spring-boot-starters/wx-java-mp-spring-boot-starter/pom.xml | 2 +- .../wx-java-open-multi-spring-boot-starter/pom.xml | 2 +- spring-boot-starters/wx-java-open-spring-boot-starter/pom.xml | 2 +- .../wx-java-pay-multi-spring-boot-starter/pom.xml | 2 +- spring-boot-starters/wx-java-pay-spring-boot-starter/pom.xml | 2 +- spring-boot-starters/wx-java-qidian-spring-boot-starter/pom.xml | 2 +- weixin-graal/pom.xml | 2 +- weixin-java-aispeech/pom.xml | 2 +- weixin-java-channel/pom.xml | 2 +- weixin-java-common/pom.xml | 2 +- weixin-java-cp/pom.xml | 2 +- weixin-java-miniapp/pom.xml | 2 +- weixin-java-mp/pom.xml | 2 +- weixin-java-open/pom.xml | 2 +- weixin-java-pay/pom.xml | 2 +- weixin-java-qidian/pom.xml | 2 +- wx-java-bom/pom.xml | 2 +- 39 files changed, 39 insertions(+), 39 deletions(-) diff --git a/pom.xml b/pom.xml index 6c1c379ce1..29d6af96df 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.github.binarywang wx-java - 4.8.5.B + 4.8.6.B pom WxJava - Weixin/Wechat Java SDK 微信开发Java SDK diff --git a/solon-plugins/pom.xml b/solon-plugins/pom.xml index 9a54c787db..edb2459a6b 100644 --- a/solon-plugins/pom.xml +++ b/solon-plugins/pom.xml @@ -6,7 +6,7 @@ com.github.binarywang wx-java - 4.8.5.B + 4.8.6.B pom wx-java-solon-plugins diff --git a/solon-plugins/wx-java-channel-multi-solon-plugin/pom.xml b/solon-plugins/wx-java-channel-multi-solon-plugin/pom.xml index 7f144022e0..bc78a9c0ca 100644 --- a/solon-plugins/wx-java-channel-multi-solon-plugin/pom.xml +++ b/solon-plugins/wx-java-channel-multi-solon-plugin/pom.xml @@ -5,7 +5,7 @@ wx-java-solon-plugins com.github.binarywang - 4.8.5.B + 4.8.6.B 4.0.0 diff --git a/solon-plugins/wx-java-channel-solon-plugin/pom.xml b/solon-plugins/wx-java-channel-solon-plugin/pom.xml index ee463f661b..c32c4c6124 100644 --- a/solon-plugins/wx-java-channel-solon-plugin/pom.xml +++ b/solon-plugins/wx-java-channel-solon-plugin/pom.xml @@ -3,7 +3,7 @@ wx-java-solon-plugins com.github.binarywang - 4.8.5.B + 4.8.6.B 4.0.0 diff --git a/solon-plugins/wx-java-cp-multi-solon-plugin/pom.xml b/solon-plugins/wx-java-cp-multi-solon-plugin/pom.xml index bf52ba0508..2aa0d9623b 100644 --- a/solon-plugins/wx-java-cp-multi-solon-plugin/pom.xml +++ b/solon-plugins/wx-java-cp-multi-solon-plugin/pom.xml @@ -4,7 +4,7 @@ wx-java-solon-plugins com.github.binarywang - 4.8.5.B + 4.8.6.B 4.0.0 diff --git a/solon-plugins/wx-java-cp-solon-plugin/pom.xml b/solon-plugins/wx-java-cp-solon-plugin/pom.xml index 78d994f172..9a11e445b7 100644 --- a/solon-plugins/wx-java-cp-solon-plugin/pom.xml +++ b/solon-plugins/wx-java-cp-solon-plugin/pom.xml @@ -4,7 +4,7 @@ wx-java-solon-plugins com.github.binarywang - 4.8.5.B + 4.8.6.B 4.0.0 diff --git a/solon-plugins/wx-java-miniapp-multi-solon-plugin/pom.xml b/solon-plugins/wx-java-miniapp-multi-solon-plugin/pom.xml index 38569db2a7..94da753457 100644 --- a/solon-plugins/wx-java-miniapp-multi-solon-plugin/pom.xml +++ b/solon-plugins/wx-java-miniapp-multi-solon-plugin/pom.xml @@ -5,7 +5,7 @@ wx-java-solon-plugins com.github.binarywang - 4.8.5.B + 4.8.6.B 4.0.0 diff --git a/solon-plugins/wx-java-miniapp-solon-plugin/pom.xml b/solon-plugins/wx-java-miniapp-solon-plugin/pom.xml index 0879651425..3ff7b3ed0b 100644 --- a/solon-plugins/wx-java-miniapp-solon-plugin/pom.xml +++ b/solon-plugins/wx-java-miniapp-solon-plugin/pom.xml @@ -4,7 +4,7 @@ wx-java-solon-plugins com.github.binarywang - 4.8.5.B + 4.8.6.B 4.0.0 diff --git a/solon-plugins/wx-java-mp-multi-solon-plugin/pom.xml b/solon-plugins/wx-java-mp-multi-solon-plugin/pom.xml index 47ae9e94a9..9d1157e3ff 100644 --- a/solon-plugins/wx-java-mp-multi-solon-plugin/pom.xml +++ b/solon-plugins/wx-java-mp-multi-solon-plugin/pom.xml @@ -5,7 +5,7 @@ wx-java-solon-plugins com.github.binarywang - 4.8.5.B + 4.8.6.B 4.0.0 diff --git a/solon-plugins/wx-java-mp-solon-plugin/pom.xml b/solon-plugins/wx-java-mp-solon-plugin/pom.xml index 90787bdb04..e90f60b8bd 100644 --- a/solon-plugins/wx-java-mp-solon-plugin/pom.xml +++ b/solon-plugins/wx-java-mp-solon-plugin/pom.xml @@ -5,7 +5,7 @@ wx-java-solon-plugins com.github.binarywang - 4.8.5.B + 4.8.6.B 4.0.0 diff --git a/solon-plugins/wx-java-open-solon-plugin/pom.xml b/solon-plugins/wx-java-open-solon-plugin/pom.xml index 45bf5e0c52..9e9430ca52 100644 --- a/solon-plugins/wx-java-open-solon-plugin/pom.xml +++ b/solon-plugins/wx-java-open-solon-plugin/pom.xml @@ -5,7 +5,7 @@ wx-java-solon-plugins com.github.binarywang - 4.8.5.B + 4.8.6.B 4.0.0 diff --git a/solon-plugins/wx-java-pay-solon-plugin/pom.xml b/solon-plugins/wx-java-pay-solon-plugin/pom.xml index 7bd0a955f1..be3a4cff16 100644 --- a/solon-plugins/wx-java-pay-solon-plugin/pom.xml +++ b/solon-plugins/wx-java-pay-solon-plugin/pom.xml @@ -5,7 +5,7 @@ wx-java-solon-plugins com.github.binarywang - 4.8.5.B + 4.8.6.B 4.0.0 diff --git a/solon-plugins/wx-java-qidian-solon-plugin/pom.xml b/solon-plugins/wx-java-qidian-solon-plugin/pom.xml index 0e47ac7c4e..0502386510 100644 --- a/solon-plugins/wx-java-qidian-solon-plugin/pom.xml +++ b/solon-plugins/wx-java-qidian-solon-plugin/pom.xml @@ -3,7 +3,7 @@ wx-java-solon-plugins com.github.binarywang - 4.8.5.B + 4.8.6.B 4.0.0 diff --git a/spring-boot-starters/pom.xml b/spring-boot-starters/pom.xml index 9de6f2d82d..06e8fe4267 100644 --- a/spring-boot-starters/pom.xml +++ b/spring-boot-starters/pom.xml @@ -6,7 +6,7 @@ com.github.binarywang wx-java - 4.8.5.B + 4.8.6.B pom wx-java-spring-boot-starters diff --git a/spring-boot-starters/wx-java-channel-multi-spring-boot-starter/pom.xml b/spring-boot-starters/wx-java-channel-multi-spring-boot-starter/pom.xml index a1acf3a571..175e183171 100644 --- a/spring-boot-starters/wx-java-channel-multi-spring-boot-starter/pom.xml +++ b/spring-boot-starters/wx-java-channel-multi-spring-boot-starter/pom.xml @@ -5,7 +5,7 @@ wx-java-spring-boot-starters com.github.binarywang - 4.8.5.B + 4.8.6.B 4.0.0 diff --git a/spring-boot-starters/wx-java-channel-spring-boot-starter/pom.xml b/spring-boot-starters/wx-java-channel-spring-boot-starter/pom.xml index 8c8620f072..5a3f08f01d 100644 --- a/spring-boot-starters/wx-java-channel-spring-boot-starter/pom.xml +++ b/spring-boot-starters/wx-java-channel-spring-boot-starter/pom.xml @@ -3,7 +3,7 @@ wx-java-spring-boot-starters com.github.binarywang - 4.8.5.B + 4.8.6.B 4.0.0 diff --git a/spring-boot-starters/wx-java-cp-multi-spring-boot-starter/pom.xml b/spring-boot-starters/wx-java-cp-multi-spring-boot-starter/pom.xml index f00b416488..1b5d8971bc 100644 --- a/spring-boot-starters/wx-java-cp-multi-spring-boot-starter/pom.xml +++ b/spring-boot-starters/wx-java-cp-multi-spring-boot-starter/pom.xml @@ -4,7 +4,7 @@ wx-java-spring-boot-starters com.github.binarywang - 4.8.5.B + 4.8.6.B 4.0.0 diff --git a/spring-boot-starters/wx-java-cp-spring-boot-starter/pom.xml b/spring-boot-starters/wx-java-cp-spring-boot-starter/pom.xml index 9e204e82cb..08d352231c 100644 --- a/spring-boot-starters/wx-java-cp-spring-boot-starter/pom.xml +++ b/spring-boot-starters/wx-java-cp-spring-boot-starter/pom.xml @@ -4,7 +4,7 @@ wx-java-spring-boot-starters com.github.binarywang - 4.8.5.B + 4.8.6.B 4.0.0 diff --git a/spring-boot-starters/wx-java-cp-tp-multi-spring-boot-starter/pom.xml b/spring-boot-starters/wx-java-cp-tp-multi-spring-boot-starter/pom.xml index 3a66ab1b8a..3666e7ba91 100644 --- a/spring-boot-starters/wx-java-cp-tp-multi-spring-boot-starter/pom.xml +++ b/spring-boot-starters/wx-java-cp-tp-multi-spring-boot-starter/pom.xml @@ -4,7 +4,7 @@ wx-java-spring-boot-starters com.github.binarywang - 4.8.5.B + 4.8.6.B 4.0.0 diff --git a/spring-boot-starters/wx-java-miniapp-multi-spring-boot-starter/pom.xml b/spring-boot-starters/wx-java-miniapp-multi-spring-boot-starter/pom.xml index 7f561529b0..1c7e8f1d33 100644 --- a/spring-boot-starters/wx-java-miniapp-multi-spring-boot-starter/pom.xml +++ b/spring-boot-starters/wx-java-miniapp-multi-spring-boot-starter/pom.xml @@ -5,7 +5,7 @@ wx-java-spring-boot-starters com.github.binarywang - 4.8.5.B + 4.8.6.B 4.0.0 diff --git a/spring-boot-starters/wx-java-miniapp-spring-boot-starter/pom.xml b/spring-boot-starters/wx-java-miniapp-spring-boot-starter/pom.xml index 40a18523e9..3a2bc80986 100644 --- a/spring-boot-starters/wx-java-miniapp-spring-boot-starter/pom.xml +++ b/spring-boot-starters/wx-java-miniapp-spring-boot-starter/pom.xml @@ -4,7 +4,7 @@ wx-java-spring-boot-starters com.github.binarywang - 4.8.5.B + 4.8.6.B 4.0.0 diff --git a/spring-boot-starters/wx-java-mp-multi-spring-boot-starter/pom.xml b/spring-boot-starters/wx-java-mp-multi-spring-boot-starter/pom.xml index 90318a0d57..01790349ec 100644 --- a/spring-boot-starters/wx-java-mp-multi-spring-boot-starter/pom.xml +++ b/spring-boot-starters/wx-java-mp-multi-spring-boot-starter/pom.xml @@ -5,7 +5,7 @@ wx-java-spring-boot-starters com.github.binarywang - 4.8.5.B + 4.8.6.B 4.0.0 diff --git a/spring-boot-starters/wx-java-mp-spring-boot-starter/pom.xml b/spring-boot-starters/wx-java-mp-spring-boot-starter/pom.xml index 6b4993ca77..326caf55be 100644 --- a/spring-boot-starters/wx-java-mp-spring-boot-starter/pom.xml +++ b/spring-boot-starters/wx-java-mp-spring-boot-starter/pom.xml @@ -5,7 +5,7 @@ wx-java-spring-boot-starters com.github.binarywang - 4.8.5.B + 4.8.6.B 4.0.0 diff --git a/spring-boot-starters/wx-java-open-multi-spring-boot-starter/pom.xml b/spring-boot-starters/wx-java-open-multi-spring-boot-starter/pom.xml index 5b9e2d4df7..6f09c3bdd8 100644 --- a/spring-boot-starters/wx-java-open-multi-spring-boot-starter/pom.xml +++ b/spring-boot-starters/wx-java-open-multi-spring-boot-starter/pom.xml @@ -5,7 +5,7 @@ wx-java-spring-boot-starters com.github.binarywang - 4.8.5.B + 4.8.6.B 4.0.0 diff --git a/spring-boot-starters/wx-java-open-spring-boot-starter/pom.xml b/spring-boot-starters/wx-java-open-spring-boot-starter/pom.xml index e6cc597ebc..cf67f4d0cd 100644 --- a/spring-boot-starters/wx-java-open-spring-boot-starter/pom.xml +++ b/spring-boot-starters/wx-java-open-spring-boot-starter/pom.xml @@ -5,7 +5,7 @@ wx-java-spring-boot-starters com.github.binarywang - 4.8.5.B + 4.8.6.B 4.0.0 diff --git a/spring-boot-starters/wx-java-pay-multi-spring-boot-starter/pom.xml b/spring-boot-starters/wx-java-pay-multi-spring-boot-starter/pom.xml index 39cb67b4a8..04ea639588 100644 --- a/spring-boot-starters/wx-java-pay-multi-spring-boot-starter/pom.xml +++ b/spring-boot-starters/wx-java-pay-multi-spring-boot-starter/pom.xml @@ -5,7 +5,7 @@ wx-java-spring-boot-starters com.github.binarywang - 4.8.5.B + 4.8.6.B 4.0.0 diff --git a/spring-boot-starters/wx-java-pay-spring-boot-starter/pom.xml b/spring-boot-starters/wx-java-pay-spring-boot-starter/pom.xml index 4c1a99c0a5..6625201696 100644 --- a/spring-boot-starters/wx-java-pay-spring-boot-starter/pom.xml +++ b/spring-boot-starters/wx-java-pay-spring-boot-starter/pom.xml @@ -5,7 +5,7 @@ wx-java-spring-boot-starters com.github.binarywang - 4.8.5.B + 4.8.6.B 4.0.0 diff --git a/spring-boot-starters/wx-java-qidian-spring-boot-starter/pom.xml b/spring-boot-starters/wx-java-qidian-spring-boot-starter/pom.xml index 71851fd59d..d34e2de0f6 100644 --- a/spring-boot-starters/wx-java-qidian-spring-boot-starter/pom.xml +++ b/spring-boot-starters/wx-java-qidian-spring-boot-starter/pom.xml @@ -3,7 +3,7 @@ wx-java-spring-boot-starters com.github.binarywang - 4.8.5.B + 4.8.6.B 4.0.0 diff --git a/weixin-graal/pom.xml b/weixin-graal/pom.xml index 881dc911fe..f689fe886f 100644 --- a/weixin-graal/pom.xml +++ b/weixin-graal/pom.xml @@ -6,7 +6,7 @@ com.github.binarywang wx-java - 4.8.5.B + 4.8.6.B weixin-graal diff --git a/weixin-java-aispeech/pom.xml b/weixin-java-aispeech/pom.xml index 6b5e68a1fa..fdc8441990 100644 --- a/weixin-java-aispeech/pom.xml +++ b/weixin-java-aispeech/pom.xml @@ -6,7 +6,7 @@ com.github.binarywang wx-java - 4.8.5.B + 4.8.6.B weixin-java-aispeech diff --git a/weixin-java-channel/pom.xml b/weixin-java-channel/pom.xml index f7c6247263..2f50ec1049 100644 --- a/weixin-java-channel/pom.xml +++ b/weixin-java-channel/pom.xml @@ -6,7 +6,7 @@ com.github.binarywang wx-java - 4.8.5.B + 4.8.6.B weixin-java-channel diff --git a/weixin-java-common/pom.xml b/weixin-java-common/pom.xml index 5916ab6e37..80701f31c1 100644 --- a/weixin-java-common/pom.xml +++ b/weixin-java-common/pom.xml @@ -6,7 +6,7 @@ com.github.binarywang wx-java - 4.8.5.B + 4.8.6.B weixin-java-common diff --git a/weixin-java-cp/pom.xml b/weixin-java-cp/pom.xml index 791d63c7fa..4fe6759f52 100644 --- a/weixin-java-cp/pom.xml +++ b/weixin-java-cp/pom.xml @@ -7,7 +7,7 @@ com.github.binarywang wx-java - 4.8.5.B + 4.8.6.B weixin-java-cp diff --git a/weixin-java-miniapp/pom.xml b/weixin-java-miniapp/pom.xml index fdec2c98c9..2a4daa7469 100644 --- a/weixin-java-miniapp/pom.xml +++ b/weixin-java-miniapp/pom.xml @@ -7,7 +7,7 @@ com.github.binarywang wx-java - 4.8.5.B + 4.8.6.B weixin-java-miniapp diff --git a/weixin-java-mp/pom.xml b/weixin-java-mp/pom.xml index f1fd8b843b..12aa981a0a 100644 --- a/weixin-java-mp/pom.xml +++ b/weixin-java-mp/pom.xml @@ -7,7 +7,7 @@ com.github.binarywang wx-java - 4.8.5.B + 4.8.6.B weixin-java-mp diff --git a/weixin-java-open/pom.xml b/weixin-java-open/pom.xml index bc312c1e67..509733caa4 100644 --- a/weixin-java-open/pom.xml +++ b/weixin-java-open/pom.xml @@ -7,7 +7,7 @@ com.github.binarywang wx-java - 4.8.5.B + 4.8.6.B weixin-java-open diff --git a/weixin-java-pay/pom.xml b/weixin-java-pay/pom.xml index 53b75f138d..cc1f84b59d 100644 --- a/weixin-java-pay/pom.xml +++ b/weixin-java-pay/pom.xml @@ -5,7 +5,7 @@ com.github.binarywang wx-java - 4.8.5.B + 4.8.6.B 4.0.0 diff --git a/weixin-java-qidian/pom.xml b/weixin-java-qidian/pom.xml index c1a8802260..48f3cfd155 100644 --- a/weixin-java-qidian/pom.xml +++ b/weixin-java-qidian/pom.xml @@ -7,7 +7,7 @@ com.github.binarywang wx-java - 4.8.5.B + 4.8.6.B weixin-java-qidian diff --git a/wx-java-bom/pom.xml b/wx-java-bom/pom.xml index 53bce8ecf3..a7f6703631 100644 --- a/wx-java-bom/pom.xml +++ b/wx-java-bom/pom.xml @@ -6,7 +6,7 @@ com.github.binarywang wx-java - 4.8.5.B + 4.8.6.B wx-java-bom From ce51e0331b0f32200ddef92047e2bebe12ef428c Mon Sep 17 00:00:00 2001 From: LJY <123919612+LJY-SG@users.noreply.github.com> Date: Tue, 25 Aug 2026 15:58:31 +0800 Subject: [PATCH 27/31] =?UTF-8?q?:bug:=20#4114=E3=80=90=E5=BE=AE=E4=BF=A1?= =?UTF-8?q?=E6=94=AF=E4=BB=98=E3=80=91=E4=BF=AE=E5=A4=8D=E7=94=B5=E5=95=86?= =?UTF-8?q?=E6=97=A7=E6=8E=A5=E5=8F=A3closePartnerTransactions=E4=B8=A2?= =?UTF-8?q?=E5=A4=B1outTradeNo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wxpay/service/EcommerceService.java | 17 ++++++++++++++++- .../LegacyEcommerceApiCompatibilityTest.java | 17 +++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/EcommerceService.java b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/EcommerceService.java index d4e3449935..997a6689da 100644 --- a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/EcommerceService.java +++ b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/EcommerceService.java @@ -109,7 +109,7 @@ default com.github.binarywang.wxpay.bean.ecommerce.PartnerTransactionsResult que /** @deprecated 从 4.8.5.B 起,请改用 {@link #closePartnerOrder(WxPayPartnerOrderCloseV3Request)};5.0 将移除。 */ @Deprecated default String closePartnerTransactions(com.github.binarywang.wxpay.bean.ecommerce.PartnerTransactionsCloseRequest request) throws WxPayException { - closePartnerOrder(LEGACY_ECOMMERCE_GSON.fromJson(LEGACY_ECOMMERCE_GSON.toJson(request), WxPayPartnerOrderCloseV3Request.class)); + closePartnerOrder(toUnifiedPartnerOrderCloseRequest(request)); return null; } @@ -122,6 +122,21 @@ static SignatureHeader toUnifiedSignatureHeader(com.github.binarywang.wxpay.bean .signature(header.getSigned()).serial(header.getSerialNo()).build(); } + /** + * 旧电商关闭请求转统一模型。 + *

{@code outTradeNo} 在两侧均为 path 参数({@code transient}),不能走 Gson 往返,否则会丢失。 + */ + static WxPayPartnerOrderCloseV3Request toUnifiedPartnerOrderCloseRequest( + com.github.binarywang.wxpay.bean.ecommerce.PartnerTransactionsCloseRequest request) { + if (request == null) { + return null; + } + return new WxPayPartnerOrderCloseV3Request() + .setSpMchId(request.getSpMchid()) + .setSubMchId(request.getSubMchid()) + .setOutTradeNo(request.getOutTradeNo()); + } + /** *

    * 二级商户进件API
diff --git a/weixin-java-pay/src/test/java/com/github/binarywang/wxpay/service/LegacyEcommerceApiCompatibilityTest.java b/weixin-java-pay/src/test/java/com/github/binarywang/wxpay/service/LegacyEcommerceApiCompatibilityTest.java
index 21f371d124..f0b5783415 100644
--- a/weixin-java-pay/src/test/java/com/github/binarywang/wxpay/service/LegacyEcommerceApiCompatibilityTest.java
+++ b/weixin-java-pay/src/test/java/com/github/binarywang/wxpay/service/LegacyEcommerceApiCompatibilityTest.java
@@ -1,7 +1,9 @@
 package com.github.binarywang.wxpay.service;
 
+import com.github.binarywang.wxpay.bean.ecommerce.PartnerTransactionsCloseRequest;
 import com.github.binarywang.wxpay.bean.ecommerce.TransactionsResult;
 import com.github.binarywang.wxpay.bean.ecommerce.enums.TradeTypeEnum;
+import com.github.binarywang.wxpay.bean.request.WxPayPartnerOrderCloseV3Request;
 import org.testng.Assert;
 import org.testng.annotations.Test;
 
@@ -68,6 +70,21 @@ public void shouldIncludeTimestampAndNonceInLegacyHeaderEquality() {
     Assert.assertNotEquals(first, second);
   }
 
+  @Test
+  public void shouldPreserveOutTradeNoWhenMappingLegacyCloseRequest() {
+    PartnerTransactionsCloseRequest legacyRequest = new PartnerTransactionsCloseRequest();
+    legacyRequest.setSpMchid("1230000109");
+    legacyRequest.setSubMchid("1900000109");
+    legacyRequest.setOutTradeNo("1217752501201407033233368018");
+
+    WxPayPartnerOrderCloseV3Request unifiedRequest =
+      EcommerceService.toUnifiedPartnerOrderCloseRequest(legacyRequest);
+
+    Assert.assertEquals(unifiedRequest.getSpMchId(), "1230000109");
+    Assert.assertEquals(unifiedRequest.getSubMchId(), "1900000109");
+    Assert.assertEquals(unifiedRequest.getOutTradeNo(), "1217752501201407033233368018");
+  }
+
   @Test
   public void shouldReadLegacySerializedHeaderFields() throws Exception {
     String legacySerializedHeader = "rO0ABXNyADpjb20uZ2l0aHViLmJpbmFyeXdhbmcud3hwYXkuYmVhbi5lY29tbWVyY2UuU2lnbmF0dXJlSGVhZGVyn3ApxLekv9MCAARMAAVub25jZXQAEkxqYXZhL2xhbmcvU3RyaW5nO0wACHNlcmlhbE5vcQB+AAFMAAZzaWduZWRxAH4AAUwACXRpbWVTdGFtcHEAfgABeHB0AAVub25jZXQACXNlcmlhbC1ub3QABnNpZ25lZHQACXRpbWVzdGFtcA==";

From 230ed0a696855dc50a954331d8c0a023f15b3b0b Mon Sep 17 00:00:00 2001
From: Binary Wang 
Date: Mon, 31 Aug 2026 17:38:53 +0800
Subject: [PATCH 28/31] =?UTF-8?q?:art:=20#4117=20=E3=80=90=E5=BE=AE?=
 =?UTF-8?q?=E4=BF=A1=E5=B0=8F=E5=BA=97=E3=80=91=E5=BE=AE=E4=BF=A1=E5=B0=8F?=
 =?UTF-8?q?=E5=BA=97=E7=8B=AC=E7=AB=8B=E6=A8=A1=E5=9D=97=E5=88=9B=E5=BB=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 docs/WEIXIN_JAVA_STORE_MIGRATION.md           |  64 ++
 pom.xml                                       |   1 +
 solon-plugins/pom.xml                         |   2 +
 .../README.md                                 | 111 +++
 .../wx-java-store-multi-solon-plugin/pom.xml  |  43 ++
 .../AbstractWxStoreConfiguration.java         | 146 ++++
 .../services/WxStoreInJedisConfiguration.java |  77 ++
 .../WxStoreInMemoryConfiguration.java         |  40 ++
 .../WxStoreInRedissonConfiguration.java       |  65 ++
 .../wxjava/store/enums/HttpClientType.java    |  23 +
 .../solon/wxjava/store/enums/StorageType.java |  26 +
 .../integration/WxStoreMultiPluginImpl.java   |  25 +
 .../properties/WxStoreMultiProperties.java    |  96 +++
 .../WxStoreMultiRedisProperties.java          |  63 ++
 .../properties/WxStoreSingleProperties.java   |  43 ++
 .../store/service/WxStoreMultiServices.java   |  26 +
 .../service/WxStoreMultiServicesImpl.java     |  36 +
 ...x-java-multi-store-solon-plugin.properties |   2 +
 .../src/test/java/features/test/LoadTest.java |  15 +
 .../src/test/resources/app.properties         |  36 +
 .../wx-java-store-solon-plugin/README.md      |  91 +++
 .../wx-java-store-solon-plugin/pom.xml        |  31 +
 .../WxStoreServiceAutoConfiguration.java      |  39 ++
 ...ractWxStoreConfigStorageConfiguration.java |  40 ++
 ...toreInJedisConfigStorageConfiguration.java |  74 ++
 ...oreInMemoryConfigStorageConfiguration.java |  29 +
 ...eInRedissonConfigStorageConfiguration.java |  62 ++
 .../wxjava/store/enums/HttpClientType.java    |  17 +
 .../solon/wxjava/store/enums/StorageType.java |  25 +
 .../store/integration/WxStorePluginImpl.java  |  25 +
 .../store/properties/RedisProperties.java     |  42 ++
 .../store/properties/WxStoreProperties.java   | 114 +++
 .../wx-java-store-solon-plugin.properties     |   2 +
 .../src/test/java/features/test/LoadTest.java |  15 +
 .../src/test/resources/app.yml                |   0
 spring-boot-starters/pom.xml                  |   2 +
 .../README.md                                 | 123 ++++
 .../pom.xml                                   |  73 ++
 .../WxStoreMultiAutoConfiguration.java        |  15 +
 .../WxStoreMultiServiceConfiguration.java     |  21 +
 .../AbstractWxStoreConfiguration.java         | 148 ++++
 .../services/WxStoreInJedisConfiguration.java |  74 ++
 .../WxStoreInMemoryConfiguration.java         |  36 +
 .../WxStoreInRedisTemplateConfiguration.java  |  42 ++
 .../WxStoreInRedissonConfiguration.java       |  62 ++
 .../wxjava/store/enums/HttpClientType.java    |  23 +
 .../wxjava/store/enums/StorageType.java       |  26 +
 .../properties/WxStoreMultiProperties.java    |  96 +++
 .../WxStoreMultiRedisProperties.java          |  63 ++
 .../properties/WxStoreSingleProperties.java   |  55 ++
 .../store/service/WxStoreMultiServices.java   |  26 +
 .../service/WxStoreMultiServicesImpl.java     |  36 +
 .../main/resources/META-INF/spring.factories  |   2 +
 ...ot.autoconfigure.AutoConfiguration.imports |   1 +
 .../README.md                                 | 102 +++
 .../wx-java-store-spring-boot-starter/pom.xml |  61 ++
 .../config/WxStoreAutoConfiguration.java      |  20 +
 .../WxStoreServiceAutoConfiguration.java      |  41 ++
 .../WxStoreStorageAutoConfiguration.java      |  23 +
 ...ractWxStoreConfigStorageConfiguration.java |  42 ++
 ...toreInJedisConfigStorageConfiguration.java |  73 ++
 ...oreInMemoryConfigStorageConfiguration.java |  29 +
 ...disTemplateConfigStorageConfiguration.java |  40 ++
 ...eInRedissonConfigStorageConfiguration.java |  62 ++
 .../wxjava/store/enums/HttpClientType.java    |  17 +
 .../wxjava/store/enums/StorageType.java       |  25 +
 .../store/properties/RedisProperties.java     |  42 ++
 .../store/properties/WxStoreProperties.java   | 126 ++++
 .../main/resources/META-INF/spring.factories  |   2 +
 ...ot.autoconfigure.AutoConfiguration.imports |   1 +
 .../channel/api/WxChannelAddressService.java  |   2 +
 .../api/WxChannelAfterSaleService.java        |   2 +
 .../channel/api/WxChannelBasicService.java    |   2 +
 .../channel/api/WxChannelBrandService.java    |   2 +
 .../channel/api/WxChannelCategoryService.java |   2 +
 .../api/WxChannelCompassShopService.java      |   2 +
 .../channel/api/WxChannelCouponService.java   |   2 +
 .../channel/api/WxChannelEwaybillService.java |   2 +
 .../channel/api/WxChannelFavoriteService.java |   2 +
 .../api/WxChannelFreightTemplateService.java  |   2 +
 .../channel/api/WxChannelFundService.java     |   2 +
 .../channel/api/WxChannelGiftService.java     |   2 +
 .../channel/api/WxChannelKfService.java       |   7 +-
 .../api/WxChannelLimitedDiscountService.java  |   2 +
 .../channel/api/WxChannelOrderService.java    |   2 +
 .../api/WxChannelProductAssistantService.java |   2 +
 .../channel/api/WxChannelProductService.java  |   2 +
 .../api/WxChannelProductStockService.java     |   2 +
 .../channel/api/WxChannelQicService.java      |   2 +
 .../weixin/channel/api/WxChannelService.java  |  75 ++
 .../channel/api/WxChannelSharerService.java   |   2 +
 .../channel/api/WxChannelSupplierService.java |   2 +
 .../channel/api/WxChannelVipService.java      |   2 +
 .../api/WxChannelWarehouseService.java        |   2 +
 .../api/WxStoreCooperationService.java        |   2 +
 .../channel/api/WxStoreHomePageService.java   |   2 +
 .../weixin/channel/api/WxTalentService.java   |   2 +
 .../channel/bean/address/AddressAddParam.java |   2 +
 .../channel/bean/address/AddressCode.java     |   2 +
 .../bean/address/AddressCodeResponse.java     |   2 +
 .../channel/bean/address/AddressDetail.java   |   2 +
 .../channel/bean/address/AddressIdParam.java  |   2 +
 .../bean/address/AddressIdResponse.java       |   2 +
 .../bean/address/AddressInfoResponse.java     |   2 +
 .../bean/address/AddressListParam.java        |   2 +
 .../bean/address/AddressListResponse.java     |   2 +
 .../bean/address/OfflineAddressType.java      |   2 +
 .../AfterSaleAcceptExchangeReshipParam.java   |   2 +
 .../bean/after/AfterSaleAcceptParam.java      |   2 +
 .../bean/after/AfterSaleCreateResponse.java   |   4 +
 .../channel/bean/after/AfterSaleDetail.java   |   2 +
 .../after/AfterSaleExchangeDeliveryInfo.java  |   2 +
 .../after/AfterSaleExchangeProductInfo.java   |   2 +
 .../AfterSaleGenAfterSaleOrderParam.java      |   4 +
 ...terSaleHandleFastExchangeReceiptParam.java |   4 +
 .../channel/bean/after/AfterSaleIdParam.java  |   2 +
 .../channel/bean/after/AfterSaleInfo.java     |   2 +
 .../bean/after/AfterSaleInfoResponse.java     |   2 +
 .../bean/after/AfterSaleListParam.java        |   2 +
 .../bean/after/AfterSaleListResponse.java     |   2 +
 .../after/AfterSaleMerchantUpdateParam.java   |   2 +
 .../bean/after/AfterSaleProductInfo.java      |   2 +
 .../channel/bean/after/AfterSaleReason.java   |   2 +
 .../bean/after/AfterSaleReasonResponse.java   |   2 +
 .../after/AfterSaleRefundPriceDiffParam.java  |   4 +
 .../AfterSaleRejectExchangeReshipParam.java   |   2 +
 .../bean/after/AfterSaleRejectParam.java      |   2 +
 .../bean/after/AfterSaleRejectReason.java     |   2 +
 .../after/AfterSaleRejectReasonResponse.java  |   2 +
 .../bean/after/AfterSaleReturnParam.java      |   2 +
 .../after/AfterSaleVirtualNumberInfo.java     |   2 +
 .../after/AfterSaleVirtualTelNumResponse.java |   4 +
 .../channel/bean/after/ExchangeSkuInfo.java   |   4 +
 .../after/GuaranteeMerchantModifyParam.java   |   4 +
 .../after/GuaranteeMerchantProofParam.java    |   4 +
 .../bean/after/GuaranteeModifyRequest.java    |   2 +
 .../bean/after/GuaranteeOrderIdParam.java     |   2 +
 .../after/GuaranteeOrderInfoResponse.java     |   2 +
 .../bean/after/GuaranteeOrderListParam.java   |   2 +
 .../after/GuaranteeOrderListResponse.java     |   2 +
 .../bean/after/GuaranteeOrderResponse.java    |   4 +
 .../bean/after/GuaranteeProofRequest.java     |   2 +
 .../bean/after/GuaranteeRefuseRequest.java    |   2 +
 .../bean/after/MerchantUploadInfo.java        |   2 +
 .../bean/after/RefundEvidenceParam.java       |   2 +
 .../weixin/channel/bean/after/RefundInfo.java |   2 +
 .../weixin/channel/bean/after/RefundResp.java |   2 +
 .../weixin/channel/bean/after/ReturnInfo.java |   2 +
 .../bean/after/SyncWorkOrderParam.java        |   4 +
 .../bean/audit/AuditApplyResponse.java        |   2 +
 .../channel/bean/audit/AuditResponse.java     |   2 +
 .../channel/bean/audit/AuditResult.java       |   2 +
 .../channel/bean/audit/CategoryAuditInfo.java |   2 +
 .../bean/audit/CategoryAuditRequest.java      |   2 +
 .../channel/bean/audit/CategoryBrand.java     |   2 +
 .../weixin/channel/bean/audit/CatsV2.java     |   2 +
 .../channel/bean/audit/ProductAuditInfo.java  |   2 +
 .../weixin/channel/bean/base/AddressInfo.java |   2 +
 .../weixin/channel/bean/base/AttrInfo.java    |   2 +
 .../weixin/channel/bean/base/OffsetParam.java |   2 +
 .../weixin/channel/bean/base/PageParam.java   |   2 +
 .../channel/bean/base/StreamPageParam.java    |   2 +
 .../weixin/channel/bean/base/TimeRange.java   |   2 +
 .../bean/base/WxChannelBaseResponse.java      |   2 +
 .../weixin/channel/bean/brand/BasicBrand.java |   2 +
 .../weixin/channel/bean/brand/Brand.java      |   2 +
 .../bean/brand/BrandApplicationDetail.java    |   2 +
 .../bean/brand/BrandApplyListResponse.java    |   2 +
 .../channel/bean/brand/BrandGrantDetail.java  |   2 +
 .../weixin/channel/bean/brand/BrandInfo.java  |   2 +
 .../channel/bean/brand/BrandInfoResponse.java |   2 +
 .../channel/bean/brand/BrandListResponse.java |   2 +
 .../weixin/channel/bean/brand/BrandParam.java |   2 +
 .../bean/brand/BrandRegisterDetail.java       |   2 +
 .../channel/bean/brand/BrandSearchParam.java  |   2 +
 .../category/AccountCategoryResponse.java     |   2 +
 .../CategoryAndQualificationList.java         |   2 +
 .../bean/category/CategoryDetailResult.java   |   2 +
 .../bean/category/CategoryQualification.java  |   8 +-
 .../CategoryQualificationResponse.java        |   2 +
 .../bean/category/PassCategoryInfo.java       |   2 +
 .../bean/category/PassCategoryResponse.java   |   2 +
 .../bean/category/QualificationInfo.java      |   2 +
 .../bean/category/RelationCategoryItem.java   |   2 +
 .../category/RelationCategoryRequest.java     |   2 +
 .../category/RelationCategoryResponse.java    |   2 +
 .../channel/bean/category/ShopCategory.java   |   2 +
 .../bean/category/ShopCategoryResponse.java   |   2 +
 .../bean/complaint/ComplaintHistory.java      |   2 +
 .../complaint/ComplaintOrderResponse.java     |   2 +
 .../bean/complaint/ComplaintParam.java        |   2 +
 .../bean/cooperation/CooperationData.java     |   2 +
 .../cooperation/CooperationListResponse.java  |   2 +
 .../bean/cooperation/CooperationQrCode.java   |   2 +
 .../CooperationQrCodeResponse.java            |   2 +
 .../cooperation/CooperationSharerParam.java   |   2 +
 .../bean/cooperation/CooperationStatus.java   |   2 +
 .../CooperationStatusResponse.java            |   2 +
 .../channel/bean/coupon/AutoValidInfo.java    |   2 +
 .../channel/bean/coupon/CouponDetailInfo.java |   2 +
 .../channel/bean/coupon/CouponIdInfo.java     |   2 +
 .../channel/bean/coupon/CouponIdResponse.java |   2 +
 .../channel/bean/coupon/CouponInfo.java       |   2 +
 .../bean/coupon/CouponInfoResponse.java       |   2 +
 .../channel/bean/coupon/CouponListParam.java  |   2 +
 .../bean/coupon/CouponListResponse.java       |   2 +
 .../channel/bean/coupon/CouponParam.java      |   2 +
 .../bean/coupon/CouponStatusParam.java        |   2 +
 .../bean/coupon/DiscountCondition.java        |   2 +
 .../channel/bean/coupon/DiscountInfo.java     |   2 +
 .../weixin/channel/bean/coupon/ExtInfo.java   |   2 +
 .../channel/bean/coupon/PromoteInfo.java      |   2 +
 .../channel/bean/coupon/ReceiveInfo.java      |   2 +
 .../weixin/channel/bean/coupon/StockInfo.java |   2 +
 .../channel/bean/coupon/UserCoupon.java       |   2 +
 .../channel/bean/coupon/UserCouponIdInfo.java |   2 +
 .../bean/coupon/UserCouponIdParam.java        |   2 +
 .../bean/coupon/UserCouponListParam.java      |   2 +
 .../bean/coupon/UserCouponListResponse.java   |   2 +
 .../bean/coupon/UserCouponResponse.java       |   2 +
 .../channel/bean/coupon/UserExtInfo.java      |   2 +
 .../weixin/channel/bean/coupon/ValidInfo.java |   2 +
 .../bean/delivery/DeliveryCompanyInfo.java    |   2 +
 .../delivery/DeliveryCompanyResponse.java     |   2 +
 .../channel/bean/delivery/DeliveryInfo.java   |   2 +
 .../bean/delivery/DeliverySendParam.java      |   2 +
 .../bean/delivery/FreightProductInfo.java     |   2 +
 .../bean/delivery/FreshInspectParam.java      |   2 +
 .../bean/delivery/PackageAuditInfo.java       |   2 +
 .../bean/ewaybill/AccountInfoResponse.java    |   2 +
 .../bean/ewaybill/AddSubOrderRequest.java     |   2 +
 .../bean/ewaybill/BatchPrintOrderRequest.java |   4 +
 .../bean/ewaybill/CreateOrderRequest.java     |   2 +
 .../bean/ewaybill/CreateOrderResponse.java    |   2 +
 .../bean/ewaybill/DeliveryListResponse.java   |   2 +
 .../bean/ewaybill/EwaybillOrderIdParam.java   |   4 +
 .../bean/ewaybill/OrderDetailResponse.java    |   2 +
 .../bean/ewaybill/PreCreateRequest.java       |   2 +
 .../bean/ewaybill/PreCreateResponse.java      |   2 +
 .../bean/ewaybill/PrintContentParam.java      |   5 +-
 .../bean/ewaybill/PrintContentResponse.java   |   2 +
 .../bean/ewaybill/PrintOrderRequest.java      |   4 +
 .../bean/ewaybill/TemplateCodeParam.java      |   5 +-
 .../bean/ewaybill/TemplateConfigResponse.java |   2 +
 .../bean/ewaybill/TemplateCreateRequest.java  |   2 +
 .../bean/ewaybill/TemplateIdParam.java        |   2 +
 .../bean/ewaybill/TemplateIdResponse.java     |   2 +
 .../bean/ewaybill/TemplateInfoResponse.java   |   2 +
 .../bean/ewaybill/TemplateUpdateRequest.java  |   2 +
 .../channel/bean/ewaybill/WaybillIdParam.java |   2 +
 .../bean/ewaybill/WaybillIdsParam.java        |   2 +
 .../bean/favorite/FavoriteCountResponse.java  |   2 +
 .../channel/bean/freight/AddressInfoList.java |   2 +
 .../bean/freight/AllConditionFreeDetail.java  |   2 +
 .../bean/freight/AllFreightCalcMethod.java    |   2 +
 .../bean/freight/ConditionFreeDetail.java     |   2 +
 .../bean/freight/FreightCalcMethod.java       |   2 +
 .../channel/bean/freight/FreightTemplate.java |   2 +
 .../channel/bean/freight/NotSendArea.java     |   2 +
 .../bean/freight/TemplateAddParam.java        |   2 +
 .../bean/freight/TemplateIdResponse.java      |   2 +
 .../bean/freight/TemplateInfoResponse.java    |   2 +
 .../bean/freight/TemplateListParam.java       |   2 +
 .../bean/freight/TemplateListResponse.java    |   2 +
 .../weixin/channel/bean/fund/AccountInfo.java |   2 +
 .../channel/bean/fund/AccountInfoParam.java   |   2 +
 .../bean/fund/AccountInfoResponse.java        |   2 +
 .../bean/fund/BalanceInfoResponse.java        |   2 +
 .../channel/bean/fund/FlowListResponse.java   |   2 +
 .../channel/bean/fund/FlowRelatedInfo.java    |   2 +
 .../weixin/channel/bean/fund/FundsFlow.java   |   2 +
 .../channel/bean/fund/FundsFlowResponse.java  |   2 +
 .../channel/bean/fund/FundsListParam.java     |   2 +
 .../bean/fund/WithdrawDetailResponse.java     |   2 +
 .../channel/bean/fund/WithdrawListParam.java  |   2 +
 .../bean/fund/WithdrawListResponse.java       |   2 +
 .../bean/fund/WithdrawSubmitParam.java        |   2 +
 .../bean/fund/WithdrawSubmitResponse.java     |   2 +
 .../channel/bean/fund/bank/BankCityInfo.java  |   2 +
 .../bean/fund/bank/BankCityResponse.java      |   2 +
 .../channel/bean/fund/bank/BankInfo.java      |   2 +
 .../bean/fund/bank/BankInfoResponse.java      |   2 +
 .../bean/fund/bank/BankListResponse.java      |   2 +
 .../bean/fund/bank/BankProvinceInfo.java      |   2 +
 .../bean/fund/bank/BankProvinceResponse.java  |   2 +
 .../bean/fund/bank/BankSearchParam.java       |   2 +
 .../channel/bean/fund/bank/BranchInfo.java    |   2 +
 .../bean/fund/bank/BranchInfoResponse.java    |   2 +
 .../bean/fund/bank/BranchSearchParam.java     |   2 +
 .../bean/fund/qrcode/QrCheckResponse.java     |   2 +
 .../bean/fund/qrcode/QrCodeResponse.java      |   2 +
 .../background/BackgroundApplyResponse.java   |   2 +
 .../background/BackgroundApplyResult.java     |   2 +
 .../background/BackgroundGetResponse.java     |   2 +
 .../bean/home/banner/BannerApplyDetail.java   |   2 +
 .../bean/home/banner/BannerApplyInfo.java     |   2 +
 .../bean/home/banner/BannerApplyParam.java    |   2 +
 .../bean/home/banner/BannerApplyResponse.java |   2 +
 .../bean/home/banner/BannerGetResponse.java   |   2 +
 .../channel/bean/home/banner/BannerInfo.java  |   2 +
 .../channel/bean/home/banner/BannerItem.java  |   2 +
 .../bean/home/banner/BannerItemDetail.java    |   2 +
 .../bean/home/banner/BannerItemFinder.java    |   2 +
 .../banner/BannerItemOfficialAccount.java     |   2 +
 .../bean/home/banner/BannerItemProduct.java   |   2 +
 .../channel/bean/home/tree/CatTreeNode.java   |   2 +
 .../channel/bean/home/tree/LevelTreeInfo.java |   2 +
 .../bean/home/tree/OneLevelTreeNode.java      |   2 +
 .../bean/home/tree/TreeAuditResult.java       |   2 +
 .../bean/home/tree/TreeAuditResultDetail.java |   2 +
 .../bean/home/tree/TreeProductEditInfo.java   |   2 +
 .../bean/home/tree/TreeProductEditParam.java  |   2 +
 .../bean/home/tree/TreeProductListInfo.java   |   2 +
 .../bean/home/tree/TreeProductListParam.java  |   2 +
 .../home/tree/TreeProductListResponse.java    |   2 +
 .../bean/home/tree/TreeProductListResult.java |   2 +
 .../bean/home/tree/TreeShowGetResponse.java   |   2 +
 .../channel/bean/home/tree/TreeShowInfo.java  |   2 +
 .../channel/bean/home/tree/TreeShowParam.java |   2 +
 .../bean/home/tree/TreeShowSetResponse.java   |   2 +
 .../home/window/WindowProductIndexParam.java  |   2 +
 .../home/window/WindowProductListParam.java   |   2 +
 .../home/window/WindowProductSetting.java     |   2 +
 .../window/WindowProductSettingResponse.java  |   2 +
 .../channel/bean/image/ChannelImageInfo.java  |   2 +
 .../bean/image/ChannelImageResponse.java      |   2 +
 .../bean/image/QualificationFileId.java       |   2 +
 .../bean/image/QualificationFileResponse.java |   2 +
 .../bean/image/UploadImageResponse.java       |   2 +
 .../bean/kf/WxChannelKfCosUploadResponse.java |   5 +-
 .../bean/kf/WxChannelKfSendMsgParam.java      |   5 +-
 .../bean/kf/WxChannelKfSendMsgResponse.java   |   5 +-
 .../weixin/channel/bean/limit/LimitSku.java   |   2 +
 .../channel/bean/limit/LimitSkuUpdate.java    |   2 +
 .../bean/limit/LimitTaskAddResponse.java      |   2 +
 .../channel/bean/limit/LimitTaskInfo.java     |   2 +
 .../bean/limit/LimitTaskListParam.java        |   2 +
 .../bean/limit/LimitTaskListResponse.java     |   2 +
 .../channel/bean/limit/LimitTaskParam.java    |   2 +
 .../bean/limit/LimitTaskUpdateParam.java      |   2 +
 .../bean/limit/LimitTaskUpdateResponse.java   |   2 +
 .../bean/message/after/AfterSaleMessage.java  |   2 +
 .../message/after/AfterSaleStatusInfo.java    |   2 +
 .../bean/message/after/ComplaintInfo.java     |   2 +
 .../bean/message/after/ComplaintMessage.java  |   2 +
 .../bean/message/coupon/CouponActionInfo.java |   2 +
 .../message/coupon/CouponActionMessage.java   |   2 +
 .../message/coupon/CouponReceiveMessage.java  |   2 +
 .../message/coupon/UserCouponActionInfo.java  |   2 +
 .../coupon/UserCouponExpireMessage.java       |   2 +
 .../message/coupon/UserCouponUseMessage.java  |   2 +
 .../message/fund/AccountNotifyMessage.java    |   2 +
 .../bean/message/fund/BankNotifyInfo.java     |   2 +
 .../bean/message/fund/QrNotifyInfo.java       |   2 +
 .../bean/message/fund/QrNotifyMessage.java    |   2 +
 .../bean/message/fund/WithdrawNotifyInfo.java |   2 +
 .../message/fund/WithdrawNotifyMessage.java   |   2 +
 .../bean/message/order/OrderCancelInfo.java   |   2 +
 .../message/order/OrderCancelMessage.java     |   2 +
 .../bean/message/order/OrderConfirmInfo.java  |   2 +
 .../message/order/OrderConfirmMessage.java    |   2 +
 .../bean/message/order/OrderDeliveryInfo.java |   2 +
 .../message/order/OrderDeliveryMessage.java   |   2 +
 .../bean/message/order/OrderExtInfo.java      |   2 +
 .../bean/message/order/OrderExtMessage.java   |   2 +
 .../bean/message/order/OrderIdInfo.java       |   2 +
 .../bean/message/order/OrderIdMessage.java    |   2 +
 .../bean/message/order/OrderPayInfo.java      |   2 +
 .../bean/message/order/OrderPayMessage.java   |   2 +
 .../bean/message/order/OrderSettleInfo.java   |   2 +
 .../message/order/OrderSettleMessage.java     |   2 +
 .../message/order/OrderStatusMessage.java     |   2 +
 .../bean/message/product/BrandMessage.java    |   2 +
 .../message/product/CategoryAuditMessage.java |   2 +
 .../bean/message/product/SpuAuditMessage.java |   2 +
 .../message/product/SpuStatusMessage.java     |   2 +
 .../bean/message/product/SpuStockMessage.java |   2 +
 .../message/sharer/SharerChangeMessage.java   |   2 +
 .../bean/message/store/CloseStoreMessage.java |   2 +
 .../message/store/NicknameUpdateMessage.java  |   2 +
 .../message/supplier/SupplierItemInfo.java    |   2 +
 .../message/supplier/SupplierItemMessage.java |   2 +
 .../channel/bean/message/vip/CouponInfo.java  |   2 +
 .../bean/message/vip/ExchangeInfo.java        |   2 +
 .../bean/message/vip/ExchangeInfoMessage.java |   2 +
 .../channel/bean/message/vip/ProductInfo.java |   2 +
 .../channel/bean/message/vip/UserInfo.java    |   2 +
 .../bean/message/vip/UserInfoMessage.java     |   2 +
 .../bean/message/voucher/VoucherInfo.java     |   2 +
 .../bean/message/voucher/VoucherMessage.java  |   2 +
 .../channel/bean/order/AfterSaleDetail.java   |   2 +
 .../bean/order/AfterSaleOrderInfo.java        |   2 +
 .../channel/bean/order/ChangeOrderInfo.java   |   2 +
 .../channel/bean/order/ChangeSkuInfo.java     |   2 +
 .../channel/bean/order/DecodeAddressInfo.java |   2 +
 .../order/DecodeSensitiveInfoResponse.java    |   2 +
 .../bean/order/DeliveryProductInfo.java       |   2 +
 .../bean/order/DeliveryUpdateParam.java       |   2 +
 .../channel/bean/order/DropshipInfo.java      |   2 +
 .../channel/bean/order/FreeGiftInfo.java      |   2 +
 .../channel/bean/order/MainProductInfo.java   |   2 +
 .../channel/bean/order/OrderAddressInfo.java  |   2 +
 .../channel/bean/order/OrderAddressParam.java |   2 +
 .../channel/bean/order/OrderAgentInfo.java    |   2 +
 .../bean/order/OrderCommissionInfo.java       |   2 +
 .../order/OrderCompensationDeliveryParam.java |   2 +
 .../channel/bean/order/OrderCouponInfo.java   |   2 +
 .../channel/bean/order/OrderCustomInfo.java   |   2 +
 .../channel/bean/order/OrderDeliveryInfo.java |   2 +
 .../channel/bean/order/OrderDetailInfo.java   |   2 +
 .../channel/bean/order/OrderExtInfo.java      |   2 +
 .../bean/order/OrderGreetingCardInfo.java     |   2 +
 .../channel/bean/order/OrderIdParam.java      |   2 +
 .../weixin/channel/bean/order/OrderInfo.java  |   2 +
 .../channel/bean/order/OrderInfoParam.java    |   2 +
 .../channel/bean/order/OrderInfoResponse.java |   2 +
 .../channel/bean/order/OrderListParam.java    |   2 +
 .../channel/bean/order/OrderListResponse.java |   2 +
 .../channel/bean/order/OrderPayInfo.java      |   2 +
 .../channel/bean/order/OrderPriceInfo.java    |   2 +
 .../channel/bean/order/OrderPriceParam.java   |   2 +
 .../bean/order/OrderProductExtraService.java  |   2 +
 .../channel/bean/order/OrderProductInfo.java  |   2 +
 .../channel/bean/order/OrderRefundInfo.java   |   2 +
 .../channel/bean/order/OrderRemarkParam.java  |   2 +
 .../bean/order/OrderSearchCondition.java      |   2 +
 .../channel/bean/order/OrderSearchParam.java  |   2 +
 .../channel/bean/order/OrderSettleInfo.java   |   2 +
 .../channel/bean/order/OrderSharerInfo.java   |   2 +
 .../bean/order/OrderSkuDeliverInfo.java       |   2 +
 .../channel/bean/order/OrderSkuShareInfo.java |   2 +
 .../channel/bean/order/OrderSourceInfo.java   |   2 +
 .../PreShipmentChangeSkuRejectParam.java      |   2 +
 .../order/PreShipmentChangeSkuResponse.java   |   2 +
 .../bean/order/PresentNoteAddParam.java       |   2 +
 .../bean/order/PresentSubOrderResponse.java   |   2 +
 .../order/PrivateNumberAddPhoneParam.java     |   2 +
 .../order/PrivateNumberGetPhoneResponse.java  |   2 +
 .../bean/order/PrivateNumberPhoneInfo.java    |   2 +
 .../PrivateNumberSendVerifyCodeParam.java     |   2 +
 .../bean/order/QualityInsepctInfo.java        |   2 +
 .../order/RealNumberViewAuditResponse.java    |   2 +
 .../channel/bean/order/RechargeInfo.java      |   2 +
 .../channel/bean/order/TelNumberExtInfo.java  |   2 +
 .../channel/bean/order/VirtualNumberInfo.java |   2 +
 .../bean/order/VirtualTelNumberResponse.java  |   2 +
 .../AddProductThirdPartySourceParam.java      |   5 +-
 .../AddProductThirdPartySourceResponse.java   |   5 +-
 .../channel/bean/product/AfterSaleInfo.java   |   2 +
 .../channel/bean/product/DescriptionInfo.java |   2 +
 .../channel/bean/product/ExpressInfo.java     |   2 +
 .../ExternalProductMappingNewParam.java       |   5 +-
 .../ExternalProductMappingNewResponse.java    |   5 +-
 .../product/ExternalProductMappingParam.java  |   5 +-
 .../ExternalProductMappingResponse.java       |   5 +-
 .../bean/product/ExtraServiceInfo.java        |   2 +
 .../bean/product/GiftActivityAddParam.java    |   2 +
 .../bean/product/GiftActivityAddResponse.java |   2 +
 .../bean/product/GiftActivityInfo.java        |   2 +
 .../bean/product/GiftProductAddResponse.java  |   2 +
 .../bean/product/GiftProductGetResponse.java  |   2 +
 .../channel/bean/product/GiftProductInfo.java |   2 +
 .../bean/product/GiftProductListParam.java    |   2 +
 .../bean/product/GiftProductListResponse.java |   2 +
 .../channel/bean/product/LimitInfo.java       |   2 +
 .../product/ProductAuditQuotaResponse.java    |   5 +-
 .../product/ProductAuditStrategyInfo.java     |   5 +-
 .../product/ProductAuditStrategyResponse.java |   5 +-
 .../product/ProductAuditStrategySetParam.java |   5 +-
 .../product/ProductBrandRecommendParam.java   |   5 +-
 .../ProductBrandRecommendResponse.java        |   5 +-
 .../product/ProductCategoryClassifyParam.java |   5 +-
 .../ProductCategoryClassifyResponse.java      |   5 +-
 .../product/ProductCategoryPreCheckParam.java |   5 +-
 .../ProductCategoryPreCheckResponse.java      |   5 +-
 .../channel/bean/product/ProductQuaInfo.java  |   2 +
 .../bean/product/ProductSaleLimitInfo.java    |   2 +
 .../bean/product/ProductSchemeParam.java      |   5 +-
 .../bean/product/ProductSchemeResponse.java   |   5 +-
 .../bean/product/ProductStockFlowParam.java   |   5 +-
 .../product/ProductStockFlowResponse.java     |   5 +-
 .../bean/product/ProductTimingSaleParam.java  |   5 +-
 .../channel/bean/product/SkuDeliverInfo.java  |   2 +
 .../channel/bean/product/SkuFastInfo.java     |   2 +
 .../weixin/channel/bean/product/SkuInfo.java  |   2 +
 .../bean/product/SkuStockBatchList.java       |   2 +
 .../bean/product/SkuStockBatchParam.java      |   2 +
 .../bean/product/SkuStockBatchResponse.java   |   2 +
 .../channel/bean/product/SkuStockInfo.java    |   2 +
 .../channel/bean/product/SkuStockParam.java   |   2 +
 .../bean/product/SkuStockResponse.java        |   2 +
 .../channel/bean/product/SpuCategory.java     |   2 +
 .../channel/bean/product/SpuFastInfo.java     |   2 +
 .../channel/bean/product/SpuGetResponse.java  |   2 +
 .../weixin/channel/bean/product/SpuInfo.java  |   2 +
 .../channel/bean/product/SpuListParam.java    |   2 +
 .../channel/bean/product/SpuListResponse.java |   2 +
 .../channel/bean/product/SpuSimpleInfo.java   |   2 +
 .../channel/bean/product/SpuSizeChart.java    |   2 +
 .../bean/product/SpuSizeChartItem.java        |   2 +
 .../channel/bean/product/SpuStockInfo.java    |   2 +
 .../channel/bean/product/SpuUpdateInfo.java   |   2 +
 .../bean/product/SpuUpdateResponse.java       |   2 +
 .../bean/product/TimingOnSaleInfo.java        |   2 +
 .../bean/product/WarehouseStockInfo.java      |   2 +
 .../assistant/BeginTimingSaleParam.java       |   2 +
 .../assistant/CancelTimingSaleParam.java      |   2 +
 .../assistant/CategoryPreCheckParam.java      |   2 +
 .../assistant/CategoryPreCheckResponse.java   |   2 +
 .../product/assistant/ExternalAttribute.java  |   2 +
 .../ExternalProductMappingNewParam.java       |   2 +
 .../ExternalProductMappingNewResponse.java    |   2 +
 .../ExternalProductMappingParam.java          |   2 +
 .../ExternalProductMappingResponse.java       |   2 +
 .../assistant/ProductBrandRecommendParam.java |   2 +
 .../ProductBrandRecommendResponse.java        |   2 +
 .../product/link/ProductH5UrlResponse.java    |   2 +
 .../product/link/ProductQrCodeResponse.java   |   2 +
 .../product/link/ProductTagLinkResponse.java  |   2 +
 .../bean/product/stock/StockFlowExtInfo.java  |   2 +
 .../bean/product/stock/StockFlowInfo.java     |   2 +
 .../bean/product/stock/StockFlowParam.java    |   2 +
 .../bean/product/stock/StockFlowResponse.java |   2 +
 .../channel/bean/qic/InspectCodeResponse.java |   4 +
 .../bean/qic/InspectConfigResponse.java       |   4 +
 .../bean/qic/RegisterLogisticsRequest.java    |   4 +
 .../bean/qic/SubmitConfigResponse.java        |   4 +
 .../bean/qic/SubmitInspectRequest.java        |   4 +
 .../channel/bean/sharer/FinderSceneInfo.java  |   2 +
 .../bean/sharer/SharerBindResponse.java       |   2 +
 .../channel/bean/sharer/SharerInfo.java       |   2 +
 .../bean/sharer/SharerInfoResponse.java       |   2 +
 .../channel/bean/sharer/SharerListParam.java  |   2 +
 .../channel/bean/sharer/SharerOrder.java      |   2 +
 .../channel/bean/sharer/SharerOrderParam.java |   2 +
 .../bean/sharer/SharerOrderResponse.java      |   2 +
 .../bean/sharer/SharerSearchParam.java        |   2 +
 .../bean/sharer/SharerSearchResponse.java     |   2 +
 .../bean/sharer/SharerUnbindParam.java        |   2 +
 .../bean/sharer/SharerUnbindResponse.java     |   2 +
 .../channel/bean/shop/ShopH5UrlResponse.java  |   2 +
 .../weixin/channel/bean/shop/ShopInfo.java    |   2 +
 .../channel/bean/shop/ShopInfoResponse.java   |   2 +
 .../channel/bean/shop/ShopQrCodeResponse.java |   2 +
 .../bean/shop/ShopTagLinkResponse.java        |   2 +
 .../bean/supplier/DistributeTypeResponse.java |   2 +
 .../bean/supplier/DropshipAssignRequest.java  |   2 +
 .../bean/supplier/DropshipDetailResponse.java |   2 +
 .../channel/bean/supplier/DropshipInfo.java   |   2 +
 .../bean/supplier/DropshipListRequest.java    |   2 +
 .../bean/supplier/DropshipListResponse.java   |   2 +
 .../bean/supplier/DropshipResponse.java       |   2 +
 .../bean/supplier/DropshipSearchRequest.java  |   2 +
 .../supplier/ProductDistributeRequest.java    |   2 +
 .../bean/supplier/ProductListResponse.java    |   2 +
 .../channel/bean/supplier/SupplierInfo.java   |   2 +
 .../bean/supplier/SupplierInfoResponse.java   |   2 +
 .../bean/supplier/SupplierListResponse.java   |   2 +
 .../bean/talent/TalentOrderDetailParam.java   |   2 +
 .../talent/TalentOrderDetailResponse.java     |   2 +
 .../bean/talent/TalentOrderListParam.java     |   2 +
 .../bean/talent/TalentOrderListResponse.java  |   2 +
 .../TalentWindowProductDetailParam.java       |   2 +
 .../TalentWindowProductDetailResponse.java    |   2 +
 .../talent/TalentWindowProductListParam.java  |   2 +
 .../TalentWindowProductListResponse.java      |   2 +
 .../channel/bean/token/StableTokenParam.java  |   2 +
 .../weixin/channel/bean/vip/ScoreInfo.java    |   2 +
 .../channel/bean/vip/UserGradeInfo.java       |   2 +
 .../weixin/channel/bean/vip/UserInfo.java     |   2 +
 .../channel/bean/vip/VipGradeParam.java       |   2 +
 .../weixin/channel/bean/vip/VipInfo.java      |   2 +
 .../weixin/channel/bean/vip/VipInfoParam.java |   2 +
 .../channel/bean/vip/VipInfoResponse.java     |   2 +
 .../weixin/channel/bean/vip/VipListParam.java |   2 +
 .../channel/bean/vip/VipListResponse.java     |   2 +
 .../channel/bean/vip/VipOpenIdParam.java      |   2 +
 .../channel/bean/vip/VipScoreParam.java       |   2 +
 .../channel/bean/vip/VipScoreResponse.java    |   2 +
 .../warehouse/LocationPriorityResponse.java   |   2 +
 .../bean/warehouse/PriorityLocationParam.java |   2 +
 .../channel/bean/warehouse/StockGetParam.java |   2 +
 .../bean/warehouse/UpdateLocationParam.java   |   2 +
 .../channel/bean/warehouse/Warehouse.java     |   2 +
 .../bean/warehouse/WarehouseIdsResponse.java  |   2 +
 .../bean/warehouse/WarehouseLocation.java     |   2 +
 .../warehouse/WarehouseLocationParam.java     |   2 +
 .../bean/warehouse/WarehouseParam.java        |   2 +
 .../bean/warehouse/WarehouseResponse.java     |   2 +
 .../bean/warehouse/WarehouseStockParam.java   |   2 +
 .../warehouse/WarehouseStockResponse.java     |   2 +
 .../request/AddWindowProductRequest.java      |   2 +
 .../request/GetWindowProductListRequest.java  |   2 +
 .../window/request/WindowProductRequest.java  |   2 +
 .../GetWindowProductListResponse.java         |   2 +
 .../response/GetWindowProductResponse.java    |   2 +
 .../api/WxChannelStoreCompatibilityTest.java  |  29 +
 .../src/test/resources/testng.xml             |   1 +
 weixin-java-store/pom.xml                     | 130 ++++
 .../store/api/BaseWxStoreMessageService.java  | 540 ++++++++++++++
 .../wxjava/store/api/BaseWxStoreService.java  | 135 ++++
 .../store/api/WxStoreAddressService.java      |  68 ++
 .../store/api/WxStoreAfterSaleService.java    | 274 ++++++++
 .../wxjava/store/api/WxStoreBasicService.java | 102 +++
 .../wxjava/store/api/WxStoreBrandService.java | 103 +++
 .../store/api/WxStoreCategoryService.java     | 132 ++++
 .../store/api/WxStoreCompassShopService.java  | 126 ++++
 .../store/api/WxStoreCooperationService.java  |  70 ++
 .../store/api/WxStoreCouponService.java       |  92 +++
 .../store/api/WxStoreEwaybillService.java     |  78 +++
 .../store/api/WxStoreFavoriteService.java     |  21 +
 .../api/WxStoreFreightTemplateService.java    |  57 ++
 .../wxjava/store/api/WxStoreFundService.java  | 189 +++++
 .../wxjava/store/api/WxStoreGiftService.java  | 102 +++
 .../store/api/WxStoreHomePageService.java     | 188 +++++
 .../wxjava/store/api/WxStoreKfService.java    |  41 ++
 .../api/WxStoreLimitedDiscountService.java    |  62 ++
 .../wxjava/store/api/WxStoreOrderService.java | 326 +++++++++
 .../api/WxStoreProductAssistantService.java   |  77 ++
 .../store/api/WxStoreProductService.java      | 480 +++++++++++++
 .../store/api/WxStoreProductStockService.java |  56 ++
 .../wxjava/store/api/WxStoreQicService.java   |  67 ++
 .../wxjava/store/api/WxStoreService.java      | 204 ++++++
 .../store/api/WxStoreSharerService.java       |  71 ++
 .../store/api/WxStoreSupplierService.java     |  70 ++
 .../wxjava/store/api/WxStoreVipService.java   |  97 +++
 .../store/api/WxStoreWarehouseService.java    | 137 ++++
 .../wxjava/store/api/WxTalentService.java     |  56 ++
 .../impl/BaseWxStoreMessageServiceImpl.java   | 418 +++++++++++
 .../api/impl/BaseWxStoreServiceImpl.java      | 478 +++++++++++++
 .../api/impl/WxStoreAddressServiceImpl.java   |  72 ++
 .../api/impl/WxStoreAfterSaleServiceImpl.java | 177 +++++
 .../api/impl/WxStoreBasicServiceImpl.java     | 124 ++++
 .../api/impl/WxStoreBrandServiceImpl.java     |  98 +++
 .../api/impl/WxStoreCategoryServiceImpl.java  | 139 ++++
 .../impl/WxStoreCompassShopServiceImpl.java   | 116 +++
 .../impl/WxStoreCooperationServiceImpl.java   |  68 ++
 .../api/impl/WxStoreCouponServiceImpl.java    |  88 +++
 .../api/impl/WxStoreEwaybillServiceImpl.java  | 165 +++++
 .../api/impl/WxStoreFavoriteServiceImpl.java  |  29 +
 .../WxStoreFreightTemplateServiceImpl.java    |  61 ++
 .../api/impl/WxStoreFundServiceImpl.java      | 167 +++++
 .../api/impl/WxStoreGiftServiceImpl.java      | 104 +++
 .../api/impl/WxStoreHomePageServiceImpl.java  | 164 +++++
 .../store/api/impl/WxStoreKfServiceImpl.java  |  45 ++
 .../WxStoreLimitedDiscountServiceImpl.java    |  68 ++
 .../api/impl/WxStoreOrderServiceImpl.java     | 294 ++++++++
 .../WxStoreProductAssistantServiceImpl.java   |  77 ++
 .../api/impl/WxStoreProductServiceImpl.java   | 413 +++++++++++
 .../impl/WxStoreProductStockServiceImpl.java  |  62 ++
 .../store/api/impl/WxStoreQicServiceImpl.java |  75 ++
 .../impl/WxStoreServiceHttpClientImpl.java    | 118 ++++
 .../WxStoreServiceHttpComponentsImpl.java     | 115 +++
 .../store/api/impl/WxStoreServiceImpl.java    |  26 +
 .../api/impl/WxStoreServiceOkHttpImpl.java    | 109 +++
 .../api/impl/WxStoreSharerServiceImpl.java    |  76 ++
 .../api/impl/WxStoreSupplierServiceImpl.java  | 132 ++++
 .../store/api/impl/WxStoreVipServiceImpl.java |  68 ++
 .../api/impl/WxStoreWarehouseServiceImpl.java | 123 ++++
 .../store/api/impl/WxTalentServiceImpl.java   |  59 ++
 .../store/bean/address/AddressAddParam.java   |  27 +
 .../store/bean/address/AddressCode.java       |  30 +
 .../bean/address/AddressCodeResponse.java     |  29 +
 .../store/bean/address/AddressDetail.java     |  66 ++
 .../store/bean/address/AddressIdParam.java    |  27 +
 .../store/bean/address/AddressIdResponse.java |  26 +
 .../bean/address/AddressInfoResponse.java     |  24 +
 .../store/bean/address/AddressListParam.java  |  26 +
 .../bean/address/AddressListResponse.java     |  26 +
 .../bean/address/OfflineAddressType.java      |  28 +
 .../AfterSaleAcceptExchangeReshipParam.java   |  35 +
 .../bean/after/AfterSaleAcceptParam.java      |  39 ++
 .../bean/after/AfterSaleCreateResponse.java   |  15 +
 .../store/bean/after/AfterSaleDetail.java     |  42 ++
 .../after/AfterSaleExchangeDeliveryInfo.java  |  35 +
 .../after/AfterSaleExchangeProductInfo.java   |  42 ++
 .../AfterSaleGenAfterSaleOrderParam.java      |  25 +
 ...terSaleHandleFastExchangeReceiptParam.java |  29 +
 .../store/bean/after/AfterSaleIdParam.java    |  26 +
 .../store/bean/after/AfterSaleInfo.java       | 101 +++
 .../bean/after/AfterSaleInfoResponse.java     |  23 +
 .../store/bean/after/AfterSaleListParam.java  |  42 ++
 .../bean/after/AfterSaleListResponse.java     |  32 +
 .../after/AfterSaleMerchantUpdateParam.java   |  57 ++
 .../bean/after/AfterSaleProductInfo.java      |  29 +
 .../store/bean/after/AfterSaleReason.java     |  33 +
 .../bean/after/AfterSaleReasonResponse.java   |  28 +
 .../after/AfterSaleRefundPriceDiffParam.java  |  33 +
 .../AfterSaleRejectExchangeReshipParam.java   |  41 ++
 .../bean/after/AfterSaleRejectParam.java      |  59 ++
 .../bean/after/AfterSaleRejectReason.java     |  44 ++
 .../after/AfterSaleRejectReasonResponse.java  |  29 +
 .../bean/after/AfterSaleReturnParam.java      |  36 +
 .../after/AfterSaleVirtualNumberInfo.java     |  26 +
 .../after/AfterSaleVirtualTelNumResponse.java |  18 +
 .../store/bean/after/ExchangeSkuInfo.java     |  14 +
 .../after/GuaranteeMerchantModifyParam.java   |  19 +
 .../after/GuaranteeMerchantProofParam.java    |  19 +
 .../bean/after/GuaranteeModifyRequest.java    |  34 +
 .../bean/after/GuaranteeOrderIdParam.java     |  25 +
 .../after/GuaranteeOrderInfoResponse.java     |  59 ++
 .../bean/after/GuaranteeOrderListParam.java   |  44 ++
 .../after/GuaranteeOrderListResponse.java     |  64 ++
 .../bean/after/GuaranteeOrderResponse.java    |  16 +
 .../bean/after/GuaranteeProofRequest.java     |  35 +
 .../bean/after/GuaranteeRefuseRequest.java    |  35 +
 .../store/bean/after/MerchantUploadInfo.java  |  27 +
 .../store/bean/after/RefundEvidenceParam.java |  35 +
 .../wxjava/store/bean/after/RefundInfo.java   |  25 +
 .../wxjava/store/bean/after/RefundResp.java   |  30 +
 .../wxjava/store/bean/after/ReturnInfo.java   |  29 +
 .../store/bean/after/SyncWorkOrderParam.java  |  79 +++
 .../store/bean/audit/AuditApplyResponse.java  |  24 +
 .../store/bean/audit/AuditResponse.java       |  24 +
 .../wxjava/store/bean/audit/AuditResult.java  |  26 +
 .../store/bean/audit/CategoryAuditInfo.java   |  79 +++
 .../bean/audit/CategoryAuditRequest.java      |  23 +
 .../store/bean/audit/CategoryBrand.java       |  23 +
 .../wxjava/store/bean/audit/CatsV2.java       |  22 +
 .../store/bean/audit/ProductAuditInfo.java    |  37 +
 .../wxjava/store/bean/base/AddressInfo.java   |  70 ++
 .../wxjava/store/bean/base/AttrInfo.java      |  28 +
 .../wxjava/store/bean/base/OffsetParam.java   |  30 +
 .../wxjava/store/bean/base/PageParam.java     |  28 +
 .../store/bean/base/StreamPageParam.java      |  28 +
 .../wxjava/store/bean/base/TimeRange.java     |  26 +
 .../store/bean/base/WxStoreBaseResponse.java  |  68 ++
 .../wxjava/store/bean/brand/BasicBrand.java   |  30 +
 .../wxjava/store/bean/brand/Brand.java        |  45 ++
 .../bean/brand/BrandApplicationDetail.java    |  31 +
 .../bean/brand/BrandApplyListResponse.java    |  33 +
 .../store/bean/brand/BrandGrantDetail.java    |  44 ++
 .../wxjava/store/bean/brand/BrandInfo.java    |  52 ++
 .../store/bean/brand/BrandInfoResponse.java   |  24 +
 .../store/bean/brand/BrandListResponse.java   |  33 +
 .../wxjava/store/bean/brand/BrandParam.java   |  26 +
 .../store/bean/brand/BrandRegisterDetail.java |  48 ++
 .../store/bean/brand/BrandSearchParam.java    |  31 +
 .../category/AccountCategoryResponse.java     |  25 +
 .../CategoryAndQualificationList.java         |  23 +
 .../bean/category/CategoryDetailResult.java   | 255 +++++++
 .../bean/category/CategoryQualification.java  |  50 ++
 .../CategoryQualificationResponse.java        |  28 +
 .../store/bean/category/PassCategoryInfo.java |  26 +
 .../bean/category/PassCategoryResponse.java   |  25 +
 .../bean/category/QualificationInfo.java      |  36 +
 .../bean/category/RelationCategoryItem.java   |  41 ++
 .../category/RelationCategoryRequest.java     |  28 +
 .../category/RelationCategoryResponse.java    |  25 +
 .../store/bean/category/ShopCategory.java     |  36 +
 .../bean/category/ShopCategoryResponse.java   |  29 +
 .../bean/compass/CompassFinderBaseParam.java  |  30 +
 .../compass/shop/CompassFinderIdParam.java    |  32 +
 .../compass/shop/FinderAuthListResponse.java  |  30 +
 .../bean/compass/shop/FinderGmvData.java      |  39 ++
 .../bean/compass/shop/FinderGmvItem.java      |  30 +
 .../bean/compass/shop/FinderListResponse.java |  26 +
 .../bean/compass/shop/FinderOverallData.java  |  35 +
 .../compass/shop/FinderOverallResponse.java   |  26 +
 .../compass/shop/FinderProductListItem.java   |  66 ++
 .../shop/FinderProductListResponse.java       |  28 +
 .../shop/FinderProductOverallResponse.java    |  25 +
 .../shop/FinderProductSimpleGmvData.java      |  26 +
 .../store/bean/compass/shop/ShopField.java    |  44 ++
 .../store/bean/compass/shop/ShopLiveData.java |  36 +
 .../compass/shop/ShopLiveListResponse.java    |  26 +
 .../store/bean/compass/shop/ShopOverall.java  |  42 ++
 .../compass/shop/ShopOverallResponse.java     |  27 +
 .../compass/shop/ShopProductCompassData.java  | 143 ++++
 .../compass/shop/ShopProductDataParam.java    |  32 +
 .../compass/shop/ShopProductDataResponse.java |  26 +
 .../bean/compass/shop/ShopProductInfo.java    |  51 ++
 .../compass/shop/ShopProductListResponse.java |  26 +
 .../compass/shop/ShopSaleProfileData.java     |  24 +
 .../shop/ShopSaleProfileDataParam.java        |  32 +
 .../shop/ShopSaleProfileDataResponse.java     |  25 +
 .../bean/complaint/ComplaintHistory.java      |  46 ++
 .../complaint/ComplaintOrderResponse.java     |  35 +
 .../store/bean/complaint/ComplaintParam.java  |  34 +
 .../bean/cooperation/CooperationData.java     |  47 ++
 .../cooperation/CooperationListResponse.java  |  25 +
 .../bean/cooperation/CooperationQrCode.java   |  23 +
 .../CooperationQrCodeResponse.java            |  24 +
 .../cooperation/CooperationSharerParam.java   |  30 +
 .../bean/cooperation/CooperationStatus.java   |  23 +
 .../CooperationStatusResponse.java            |  24 +
 .../store/bean/coupon/AutoValidInfo.java      |  21 +
 .../store/bean/coupon/CouponDetailInfo.java   |  43 ++
 .../store/bean/coupon/CouponIdInfo.java       |  24 +
 .../store/bean/coupon/CouponIdResponse.java   |  21 +
 .../wxjava/store/bean/coupon/CouponInfo.java  |  38 +
 .../store/bean/coupon/CouponInfoResponse.java |  20 +
 .../store/bean/coupon/CouponListParam.java    |  45 ++
 .../store/bean/coupon/CouponListResponse.java |  31 +
 .../wxjava/store/bean/coupon/CouponParam.java |  50 ++
 .../store/bean/coupon/CouponStatusParam.java  |  28 +
 .../store/bean/coupon/DiscountCondition.java  |  30 +
 .../store/bean/coupon/DiscountInfo.java       |  29 +
 .../wxjava/store/bean/coupon/ExtInfo.java     |  33 +
 .../wxjava/store/bean/coupon/PromoteInfo.java |  21 +
 .../wxjava/store/bean/coupon/ReceiveInfo.java |  33 +
 .../wxjava/store/bean/coupon/StockInfo.java   |  29 +
 .../wxjava/store/bean/coupon/UserCoupon.java  |  50 ++
 .../store/bean/coupon/UserCouponIdInfo.java   |  20 +
 .../store/bean/coupon/UserCouponIdParam.java  |  29 +
 .../bean/coupon/UserCouponListParam.java      |  24 +
 .../bean/coupon/UserCouponListResponse.java   |  30 +
 .../store/bean/coupon/UserCouponResponse.java |  27 +
 .../wxjava/store/bean/coupon/UserExtInfo.java |  21 +
 .../wxjava/store/bean/coupon/ValidInfo.java   |  33 +
 .../bean/delivery/DeliveryCompanyInfo.java    |  25 +
 .../delivery/DeliveryCompanyResponse.java     |  22 +
 .../store/bean/delivery/DeliveryInfo.java     |  34 +
 .../bean/delivery/DeliverySendParam.java      |  31 +
 .../bean/delivery/FreightProductInfo.java     |  36 +
 .../bean/delivery/FreshInspectParam.java      |  31 +
 .../store/bean/delivery/PackageAuditInfo.java |  32 +
 .../ewaybill/AbstractEwaybillRequest.java     |  37 +
 .../ewaybill/AbstractEwaybillResponse.java    |  33 +
 .../bean/ewaybill/AccountInfoResponse.java    |  10 +
 .../bean/ewaybill/AddSubOrderRequest.java     |  10 +
 .../bean/ewaybill/BatchPrintOrderRequest.java |  12 +
 .../bean/ewaybill/CreateOrderRequest.java     |  10 +
 .../bean/ewaybill/CreateOrderResponse.java    |  10 +
 .../bean/ewaybill/DeliveryListResponse.java   |  10 +
 .../bean/ewaybill/EwaybillOrderIdParam.java   |  14 +
 .../bean/ewaybill/OrderDetailResponse.java    |  10 +
 .../store/bean/ewaybill/PreCreateRequest.java |  10 +
 .../bean/ewaybill/PreCreateResponse.java      |  10 +
 .../bean/ewaybill/PrintContentParam.java      |  22 +
 .../bean/ewaybill/PrintContentResponse.java   |  10 +
 .../bean/ewaybill/PrintOrderRequest.java      |  13 +
 .../bean/ewaybill/TemplateCodeParam.java      |  18 +
 .../bean/ewaybill/TemplateConfigResponse.java |  10 +
 .../bean/ewaybill/TemplateCreateRequest.java  |  10 +
 .../store/bean/ewaybill/TemplateIdParam.java  |  22 +
 .../bean/ewaybill/TemplateIdResponse.java     |  21 +
 .../bean/ewaybill/TemplateInfoResponse.java   |  10 +
 .../bean/ewaybill/TemplateUpdateRequest.java  |  10 +
 .../store/bean/ewaybill/WaybillIdParam.java   |  22 +
 .../store/bean/ewaybill/WaybillIdsParam.java  |  23 +
 .../bean/favorite/FavoriteCountResponse.java  |  38 +
 .../store/bean/freight/AddressInfoList.java   |  23 +
 .../bean/freight/AllConditionFreeDetail.java  |  32 +
 .../bean/freight/AllFreightCalcMethod.java    |  31 +
 .../bean/freight/ConditionFreeDetail.java     |  38 +
 .../store/bean/freight/FreightCalcMethod.java |  43 ++
 .../store/bean/freight/FreightTemplate.java   |  71 ++
 .../store/bean/freight/NotSendArea.java       |  18 +
 .../store/bean/freight/TemplateAddParam.java  |  26 +
 .../bean/freight/TemplateIdResponse.java      |  24 +
 .../bean/freight/TemplateInfoResponse.java    |  24 +
 .../store/bean/freight/TemplateListParam.java |  27 +
 .../bean/freight/TemplateListResponse.java    |  24 +
 .../wxjava/store/bean/fund/AccountInfo.java   |  53 ++
 .../store/bean/fund/AccountInfoParam.java     |  25 +
 .../store/bean/fund/AccountInfoResponse.java  |  23 +
 .../store/bean/fund/BalanceInfoResponse.java  |  30 +
 .../store/bean/fund/FlowListResponse.java     |  30 +
 .../store/bean/fund/FlowRelatedInfo.java      |  45 ++
 .../wxjava/store/bean/fund/FundsFlow.java     |  51 ++
 .../store/bean/fund/FundsFlowResponse.java    |  23 +
 .../store/bean/fund/FundsListParam.java       |  49 ++
 .../bean/fund/WithdrawDetailResponse.java     |  55 ++
 .../store/bean/fund/WithdrawListParam.java    |  36 +
 .../store/bean/fund/WithdrawListResponse.java |  23 +
 .../store/bean/fund/WithdrawSubmitParam.java  |  32 +
 .../bean/fund/WithdrawSubmitResponse.java     |  23 +
 .../store/bean/fund/bank/BankCityInfo.java    |  29 +
 .../bean/fund/bank/BankCityResponse.java      |  28 +
 .../wxjava/store/bean/fund/bank/BankInfo.java |  46 ++
 .../bean/fund/bank/BankInfoResponse.java      |  28 +
 .../bean/fund/bank/BankListResponse.java      |  24 +
 .../bean/fund/bank/BankProvinceInfo.java      |  25 +
 .../bean/fund/bank/BankProvinceResponse.java  |  26 +
 .../store/bean/fund/bank/BankSearchParam.java |  37 +
 .../store/bean/fund/bank/BranchInfo.java      |  25 +
 .../bean/fund/bank/BranchInfoResponse.java    |  49 ++
 .../bean/fund/bank/BranchSearchParam.java     |  35 +
 .../bean/fund/qrcode/QrCheckResponse.java     |  36 +
 .../bean/fund/qrcode/QrCodeResponse.java      |  24 +
 .../background/BackgroundApplyResponse.java   |  25 +
 .../background/BackgroundApplyResult.java     |  35 +
 .../background/BackgroundGetResponse.java     |  28 +
 .../bean/home/banner/BannerApplyDetail.java   |  33 +
 .../bean/home/banner/BannerApplyInfo.java     |  35 +
 .../bean/home/banner/BannerApplyParam.java    |  28 +
 .../bean/home/banner/BannerApplyResponse.java |  25 +
 .../bean/home/banner/BannerGetResponse.java   |  28 +
 .../store/bean/home/banner/BannerInfo.java    |  31 +
 .../store/bean/home/banner/BannerItem.java    |  41 ++
 .../bean/home/banner/BannerItemDetail.java    |  33 +
 .../bean/home/banner/BannerItemFinder.java    |  29 +
 .../banner/BannerItemOfficialAccount.java     |  25 +
 .../bean/home/banner/BannerItemProduct.java   |  25 +
 .../store/bean/home/tree/CatTreeNode.java     |  32 +
 .../store/bean/home/tree/LevelTreeInfo.java   |  24 +
 .../bean/home/tree/OneLevelTreeNode.java      |  25 +
 .../store/bean/home/tree/TreeAuditResult.java |  27 +
 .../bean/home/tree/TreeAuditResultDetail.java |  27 +
 .../bean/home/tree/TreeProductEditInfo.java   |  33 +
 .../bean/home/tree/TreeProductEditParam.java  |  25 +
 .../bean/home/tree/TreeProductListInfo.java   |  36 +
 .../bean/home/tree/TreeProductListParam.java  |  24 +
 .../home/tree/TreeProductListResponse.java    |  24 +
 .../bean/home/tree/TreeProductListResult.java |  31 +
 .../bean/home/tree/TreeShowGetResponse.java   |  20 +
 .../store/bean/home/tree/TreeShowInfo.java    |  45 ++
 .../store/bean/home/tree/TreeShowParam.java   |  24 +
 .../bean/home/tree/TreeShowSetResponse.java   |  20 +
 .../home/window/WindowProductIndexParam.java  |  28 +
 .../home/window/WindowProductListParam.java   |  26 +
 .../home/window/WindowProductSetting.java     |  34 +
 .../window/WindowProductSettingResponse.java  |  33 +
 .../store/bean/image/QualificationFileId.java |  24 +
 .../bean/image/QualificationFileResponse.java |  24 +
 .../store/bean/image/StoreImageInfo.java      |  30 +
 .../store/bean/image/StoreImageResponse.java  |  32 +
 .../store/bean/image/UploadImageResponse.java |  24 +
 .../bean/kf/WxStoreKfCosUploadResponse.java   |  20 +
 .../store/bean/kf/WxStoreKfSendMsgParam.java  |  90 +++
 .../bean/kf/WxStoreKfSendMsgResponse.java     |  20 +
 .../wxjava/store/bean/limit/LimitSku.java     |  30 +
 .../store/bean/limit/LimitSkuUpdate.java      |  32 +
 .../bean/limit/LimitTaskAddResponse.java      |  23 +
 .../store/bean/limit/LimitTaskInfo.java       |  45 ++
 .../store/bean/limit/LimitTaskListParam.java  |  28 +
 .../bean/limit/LimitTaskListResponse.java     |  32 +
 .../store/bean/limit/LimitTaskParam.java      |  36 +
 .../bean/limit/LimitTaskUpdateParam.java      |  41 ++
 .../bean/limit/LimitTaskUpdateResponse.java   |  26 +
 .../store/bean/message/SessionMessage.java    |  27 +
 .../bean/message/after/AfterSaleMessage.java  |  27 +
 .../message/after/AfterSaleStatusInfo.java    |  33 +
 .../bean/message/after/ComplaintInfo.java     |  33 +
 .../bean/message/after/ComplaintMessage.java  |  28 +
 .../bean/message/coupon/CouponActionInfo.java |  48 ++
 .../message/coupon/CouponActionMessage.java   |  29 +
 .../message/coupon/CouponReceiveMessage.java  |  60 ++
 .../message/coupon/UserCouponActionInfo.java  |  45 ++
 .../coupon/UserCouponExpireMessage.java       |  29 +
 .../message/coupon/UserCouponUseMessage.java  |  28 +
 .../message/fund/AccountNotifyMessage.java    |  27 +
 .../bean/message/fund/BankNotifyInfo.java     |  24 +
 .../store/bean/message/fund/QrNotifyInfo.java |  34 +
 .../bean/message/fund/QrNotifyMessage.java    |  27 +
 .../bean/message/fund/WithdrawNotifyInfo.java |  29 +
 .../message/fund/WithdrawNotifyMessage.java   |  27 +
 .../bean/message/order/OrderCancelInfo.java   |  24 +
 .../message/order/OrderCancelMessage.java     |  27 +
 .../bean/message/order/OrderConfirmInfo.java  |  24 +
 .../message/order/OrderConfirmMessage.java    |  27 +
 .../bean/message/order/OrderDeliveryInfo.java |  25 +
 .../message/order/OrderDeliveryMessage.java   |  27 +
 .../bean/message/order/OrderExtInfo.java      |  24 +
 .../bean/message/order/OrderExtMessage.java   |  27 +
 .../store/bean/message/order/OrderIdInfo.java |  23 +
 .../bean/message/order/OrderIdMessage.java    |  27 +
 .../bean/message/order/OrderPayInfo.java      |  24 +
 .../bean/message/order/OrderPayMessage.java   |  27 +
 .../bean/message/order/OrderSettleInfo.java   |  24 +
 .../message/order/OrderSettleMessage.java     |  27 +
 .../message/order/OrderStatusMessage.java     |  54 ++
 .../bean/message/product/BrandMessage.java    |  72 ++
 .../message/product/CategoryAuditMessage.java |  63 ++
 .../bean/message/product/SpuAuditMessage.java |  83 +++
 .../message/product/SpuStatusMessage.java     |  72 ++
 .../bean/message/product/SpuStockMessage.java |  88 +++
 .../message/sharer/SharerChangeMessage.java   |  48 ++
 .../bean/message/store/CloseStoreMessage.java |  38 +
 .../message/store/NicknameUpdateMessage.java  |  43 ++
 .../message/supplier/SupplierItemInfo.java    |  44 ++
 .../message/supplier/SupplierItemMessage.java |  27 +
 .../store/bean/message/vip/CouponInfo.java    |  27 +
 .../store/bean/message/vip/ExchangeInfo.java  |  42 ++
 .../bean/message/vip/ExchangeInfoMessage.java |  28 +
 .../store/bean/message/vip/ProductInfo.java   |  27 +
 .../store/bean/message/vip/UserInfo.java      |  59 ++
 .../bean/message/vip/UserInfoMessage.java     |  28 +
 .../bean/message/voucher/VoucherInfo.java     | 106 +++
 .../bean/message/voucher/VoucherMessage.java  |  29 +
 .../store/bean/order/AfterSaleDetail.java     |  27 +
 .../store/bean/order/AfterSaleOrderInfo.java  |  30 +
 .../store/bean/order/ChangeOrderInfo.java     |  31 +
 .../store/bean/order/ChangeSkuInfo.java       |  42 ++
 .../store/bean/order/DecodeAddressInfo.java   |  22 +
 .../order/DecodeSensitiveInfoResponse.java    |  28 +
 .../store/bean/order/DeliveryProductInfo.java |  48 ++
 .../store/bean/order/DeliveryUpdateParam.java |  51 ++
 .../wxjava/store/bean/order/DropshipInfo.java |  24 +
 .../wxjava/store/bean/order/FreeGiftInfo.java |  25 +
 .../store/bean/order/MainProductInfo.java     |  42 ++
 .../store/bean/order/OrderAddressInfo.java    |  41 ++
 .../store/bean/order/OrderAddressParam.java   |  32 +
 .../store/bean/order/OrderAgentInfo.java      |  30 +
 .../store/bean/order/OrderCommissionInfo.java |  49 ++
 .../order/OrderCompensationDeliveryParam.java |  34 +
 .../store/bean/order/OrderCouponInfo.java     |  41 ++
 .../store/bean/order/OrderCustomInfo.java     |  33 +
 .../store/bean/order/OrderDeliveryInfo.java   |  59 ++
 .../store/bean/order/OrderDetailInfo.java     |  78 +++
 .../wxjava/store/bean/order/OrderExtInfo.java |  54 ++
 .../bean/order/OrderGreetingCardInfo.java     |  29 +
 .../wxjava/store/bean/order/OrderIdParam.java |  27 +
 .../wxjava/store/bean/order/OrderInfo.java    |  69 ++
 .../store/bean/order/OrderInfoParam.java      |  31 +
 .../store/bean/order/OrderInfoResponse.java   |  23 +
 .../store/bean/order/OrderListParam.java      |  39 ++
 .../store/bean/order/OrderListResponse.java   |  32 +
 .../wxjava/store/bean/order/OrderPayInfo.java |  30 +
 .../store/bean/order/OrderPriceInfo.java      | 140 ++++
 .../store/bean/order/OrderPriceParam.java     |  46 ++
 .../bean/order/OrderProductExtraService.java  |  28 +
 .../store/bean/order/OrderProductInfo.java    | 256 +++++++
 .../store/bean/order/OrderRefundInfo.java     |  21 +
 .../store/bean/order/OrderRemarkParam.java    |  28 +
 .../bean/order/OrderSearchCondition.java      |  62 ++
 .../store/bean/order/OrderSearchParam.java    |  30 +
 .../store/bean/order/OrderSettleInfo.java     |  49 ++
 .../store/bean/order/OrderSharerInfo.java     |  49 ++
 .../store/bean/order/OrderSkuDeliverInfo.java |  28 +
 .../store/bean/order/OrderSkuShareInfo.java   |  44 ++
 .../store/bean/order/OrderSourceInfo.java     |  66 ++
 .../PreShipmentChangeSkuRejectParam.java      |  32 +
 .../order/PreShipmentChangeSkuResponse.java   |  25 +
 .../store/bean/order/PresentNoteAddParam.java |  32 +
 .../bean/order/PresentSubOrderResponse.java   |  26 +
 .../order/PrivateNumberAddPhoneParam.java     |  28 +
 .../order/PrivateNumberGetPhoneResponse.java  |  26 +
 .../bean/order/PrivateNumberPhoneInfo.java    |  29 +
 .../PrivateNumberSendVerifyCodeParam.java     |  28 +
 .../store/bean/order/QualityInsepctInfo.java  |  22 +
 .../order/RealNumberViewAuditResponse.java    |  31 +
 .../wxjava/store/bean/order/RechargeInfo.java |  28 +
 .../store/bean/order/TelNumberExtInfo.java    |  37 +
 .../store/bean/order/VirtualNumberInfo.java   |  30 +
 .../bean/order/VirtualTelNumberResponse.java  |  30 +
 .../AddProductThirdPartySourceParam.java      |  22 +
 .../AddProductThirdPartySourceResponse.java   |  16 +
 .../store/bean/product/AfterSaleInfo.java     |  22 +
 .../store/bean/product/DescriptionInfo.java   |  27 +
 .../store/bean/product/ExpressInfo.java       |  28 +
 .../ExternalProductMappingNewParam.java       |  31 +
 .../ExternalProductMappingNewResponse.java    |  29 +
 .../product/ExternalProductMappingParam.java  |  20 +
 .../ExternalProductMappingResponse.java       |  23 +
 .../store/bean/product/ExtraServiceInfo.java  |  39 ++
 .../bean/product/GiftActivityAddParam.java    |  23 +
 .../bean/product/GiftActivityAddResponse.java |  23 +
 .../store/bean/product/GiftActivityInfo.java  |  92 +++
 .../bean/product/GiftProductAddResponse.java  |  24 +
 .../bean/product/GiftProductGetResponse.java  |  28 +
 .../store/bean/product/GiftProductInfo.java   |  11 +
 .../bean/product/GiftProductListParam.java    |  31 +
 .../bean/product/GiftProductListResponse.java |  33 +
 .../wxjava/store/bean/product/LimitInfo.java  |  28 +
 .../product/ProductAuditQuotaResponse.java    |  39 ++
 .../product/ProductAuditStrategyInfo.java     |  18 +
 .../product/ProductAuditStrategyResponse.java |  16 +
 .../product/ProductAuditStrategySetParam.java |  14 +
 .../product/ProductBrandRecommendParam.java   |  20 +
 .../ProductBrandRecommendResponse.java        |  20 +
 .../product/ProductCategoryClassifyParam.java |  20 +
 .../ProductCategoryClassifyResponse.java      |  48 ++
 .../product/ProductCategoryPreCheckParam.java |  14 +
 .../ProductCategoryPreCheckResponse.java      |  19 +
 .../store/bean/product/ProductQuaInfo.java    |  29 +
 .../bean/product/ProductSaleLimitInfo.java    |  30 +
 .../bean/product/ProductSchemeParam.java      |  19 +
 .../bean/product/ProductSchemeResponse.java   |  14 +
 .../bean/product/ProductStockFlowParam.java   |  33 +
 .../product/ProductStockFlowResponse.java     |  28 +
 .../bean/product/ProductTimingSaleParam.java  |  16 +
 .../store/bean/product/SkuDeliverInfo.java    |  43 ++
 .../store/bean/product/SkuFastInfo.java       |  60 ++
 .../wxjava/store/bean/product/SkuInfo.java    |  70 ++
 .../store/bean/product/SkuStockBatchList.java |  23 +
 .../bean/product/SkuStockBatchParam.java      |  24 +
 .../bean/product/SkuStockBatchResponse.java   |  24 +
 .../store/bean/product/SkuStockInfo.java      |  42 ++
 .../store/bean/product/SkuStockParam.java     |  34 +
 .../store/bean/product/SkuStockResponse.java  |  24 +
 .../store/bean/product/SpuCategory.java       |  22 +
 .../store/bean/product/SpuFastInfo.java       |  52 ++
 .../store/bean/product/SpuGetResponse.java    |  32 +
 .../wxjava/store/bean/product/SpuInfo.java    | 158 +++++
 .../store/bean/product/SpuListParam.java      |  32 +
 .../store/bean/product/SpuListResponse.java   |  33 +
 .../store/bean/product/SpuSimpleInfo.java     |  29 +
 .../store/bean/product/SpuSizeChart.java      |  27 +
 .../store/bean/product/SpuSizeChartItem.java  |  55 ++
 .../store/bean/product/SpuStockInfo.java      |  25 +
 .../store/bean/product/SpuUpdateInfo.java     |  24 +
 .../store/bean/product/SpuUpdateResponse.java |  25 +
 .../store/bean/product/TimingOnSaleInfo.java  |  36 +
 .../bean/product/WarehouseStockInfo.java      |  30 +
 .../assistant/BeginTimingSaleParam.java       |  24 +
 .../assistant/CancelTimingSaleParam.java      |  20 +
 .../assistant/CategoryPreCheckParam.java      |  20 +
 .../assistant/CategoryPreCheckResponse.java   |  27 +
 .../product/assistant/ExternalAttribute.java  |  24 +
 .../ExternalProductMappingNewParam.java       |  41 ++
 .../ExternalProductMappingNewResponse.java    |  23 +
 .../ExternalProductMappingParam.java          |  32 +
 .../ExternalProductMappingResponse.java       |  35 +
 .../assistant/ProductBrandRecommendParam.java |  33 +
 .../ProductBrandRecommendResponse.java        |  30 +
 .../product/link/ProductH5UrlResponse.java    |  22 +
 .../product/link/ProductQrCodeResponse.java   |  22 +
 .../product/link/ProductTagLinkResponse.java  |  22 +
 .../bean/product/stock/StockFlowExtInfo.java  |  44 ++
 .../bean/product/stock/StockFlowInfo.java     |  44 ++
 .../bean/product/stock/StockFlowParam.java    |  57 ++
 .../bean/product/stock/StockFlowResponse.java |  48 ++
 .../store/bean/qic/InspectCodeResponse.java   | 114 +++
 .../store/bean/qic/InspectConfigResponse.java |  62 ++
 .../bean/qic/RegisterLogisticsRequest.java    |  41 ++
 .../store/bean/qic/SubmitConfigResponse.java  |  98 +++
 .../store/bean/qic/SubmitInspectRequest.java  |  85 +++
 .../store/bean/sharer/FinderSceneInfo.java    |  38 +
 .../store/bean/sharer/SharerBindResponse.java |  31 +
 .../wxjava/store/bean/sharer/SharerInfo.java  |  39 ++
 .../store/bean/sharer/SharerInfoResponse.java |  25 +
 .../store/bean/sharer/SharerListParam.java    |  30 +
 .../wxjava/store/bean/sharer/SharerOrder.java |  70 ++
 .../store/bean/sharer/SharerOrderParam.java   |  36 +
 .../bean/sharer/SharerOrderResponse.java      |  24 +
 .../store/bean/sharer/SharerSearchParam.java  |  32 +
 .../bean/sharer/SharerSearchResponse.java     |  40 ++
 .../store/bean/sharer/SharerUnbindParam.java  |  25 +
 .../bean/sharer/SharerUnbindResponse.java     |  32 +
 .../store/bean/shop/ShopH5UrlResponse.java    |  22 +
 .../wxjava/store/bean/shop/ShopInfo.java      |  36 +
 .../store/bean/shop/ShopInfoResponse.java     |  19 +
 .../store/bean/shop/ShopQrCodeResponse.java   |  22 +
 .../store/bean/shop/ShopTagLinkResponse.java  |  22 +
 .../bean/supplier/DistributeTypeResponse.java |  25 +
 .../bean/supplier/DropshipAssignRequest.java  |  25 +
 .../bean/supplier/DropshipDetailResponse.java |  22 +
 .../store/bean/supplier/DropshipInfo.java     |  37 +
 .../bean/supplier/DropshipListRequest.java    |  37 +
 .../bean/supplier/DropshipListResponse.java   |  29 +
 .../store/bean/supplier/DropshipResponse.java |  28 +
 .../bean/supplier/DropshipSearchRequest.java  |  26 +
 .../supplier/ProductDistributeRequest.java    |  26 +
 .../bean/supplier/ProductListResponse.java    |  42 ++
 .../store/bean/supplier/SupplierInfo.java     |  28 +
 .../bean/supplier/SupplierInfoResponse.java   |  22 +
 .../bean/supplier/SupplierListResponse.java   |  29 +
 .../bean/talent/TalentOrderDetailParam.java   |  32 +
 .../talent/TalentOrderDetailResponse.java     | 203 ++++++
 .../bean/talent/TalentOrderListParam.java     |  52 ++
 .../bean/talent/TalentOrderListResponse.java  |  54 ++
 .../TalentWindowProductDetailParam.java       |  24 +
 .../TalentWindowProductDetailResponse.java    |  81 +++
 .../talent/TalentWindowProductListParam.java  |  32 +
 .../TalentWindowProductListResponse.java      |  58 ++
 .../store/bean/token/StableTokenParam.java    |  34 +
 .../wxjava/store/bean/vip/ScoreInfo.java      |  23 +
 .../wxjava/store/bean/vip/UserGradeInfo.java  |  27 +
 .../wxjava/store/bean/vip/UserInfo.java       |  23 +
 .../wxjava/store/bean/vip/VipGradeParam.java  |  31 +
 .../wxjava/store/bean/vip/VipInfo.java        |  47 ++
 .../wxjava/store/bean/vip/VipInfoParam.java   |  27 +
 .../store/bean/vip/VipInfoResponse.java       |  20 +
 .../wxjava/store/bean/vip/VipListParam.java   |  32 +
 .../store/bean/vip/VipListResponse.java       |  25 +
 .../wxjava/store/bean/vip/VipOpenIdParam.java |  24 +
 .../wxjava/store/bean/vip/VipScoreParam.java  |  39 ++
 .../store/bean/vip/VipScoreResponse.java      |  20 +
 .../warehouse/LocationPriorityResponse.java   |  25 +
 .../bean/warehouse/PriorityLocationParam.java |  24 +
 .../store/bean/warehouse/StockGetParam.java   |  29 +
 .../bean/warehouse/UpdateLocationParam.java   |  29 +
 .../store/bean/warehouse/Warehouse.java       |  36 +
 .../bean/warehouse/WarehouseIdsResponse.java  |  48 ++
 .../bean/warehouse/WarehouseLocation.java     |  36 +
 .../warehouse/WarehouseLocationParam.java     |  22 +
 .../store/bean/warehouse/WarehouseParam.java  |  20 +
 .../bean/warehouse/WarehouseResponse.java     |  21 +
 .../bean/warehouse/WarehouseStockParam.java   |  22 +
 .../warehouse/WarehouseStockResponse.java     |  34 +
 .../request/AddWindowProductRequest.java      |  39 ++
 .../request/GetWindowProductListRequest.java  |  57 ++
 .../window/request/WindowProductRequest.java  |  32 +
 .../GetWindowProductListResponse.java         |  55 ++
 .../response/GetWindowProductResponse.java    | 238 +++++++
 .../wxjava/store/common/StoreWxError.java     |  27 +
 .../wxjava/store/config/WxStoreConfig.java    | 193 +++++
 .../config/impl/WxStoreDefaultConfigImpl.java | 244 +++++++
 .../config/impl/WxStoreRedisConfigImpl.java   |  73 ++
 .../impl/WxStoreRedissonConfigImpl.java       |  89 +++
 .../store/constant/MessageEventConstants.java |  98 +++
 .../constant/WxStoreApiUrlConstants.java      | 658 ++++++++++++++++++
 .../wxjava/store/enums/AccountType.java       |  43 ++
 .../wxjava/store/enums/AfterSaleStatus.java   |  64 ++
 .../wxjava/store/enums/AfterSaleType.java     |  32 +
 .../wxjava/store/enums/AfterSalesReason.java  |  63 ++
 .../wxjava/store/enums/BannerType.java        |  37 +
 .../store/enums/CommissionOrderStatus.java    |  37 +
 .../wxjava/store/enums/ComplaintItemType.java | 112 +++
 .../wxjava/store/enums/ComplaintStatus.java   |  30 +
 .../wxjava/store/enums/CouponType.java        |  45 ++
 .../wxjava/store/enums/CouponValidType.java   |  34 +
 .../wxjava/store/enums/DeliveryType.java      |  42 ++
 .../wxjava/store/enums/FundsType.java         |  61 ++
 .../wxjava/store/enums/MessageType.java       |  21 +
 .../wxjava/store/enums/OrderScene.java        |  52 ++
 .../store/enums/PackageAuditItemType.java     |  37 +
 .../wxjava/store/enums/PromoteType.java       |  36 +
 .../wxjava/store/enums/QrCheckStatus.java     |  46 ++
 .../wxjava/store/enums/RefundReason.java      |  51 ++
 .../store/enums/SaleProfileUserType.java      |  56 ++
 .../wxjava/store/enums/SendTime.java          |  71 ++
 .../wxjava/store/enums/ShareScene.java        |  52 ++
 .../wxjava/store/enums/SharerType.java        |  35 +
 .../wxjava/store/enums/SpuEditStatus.java     |  46 ++
 .../wxjava/store/enums/SpuStatus.java         |  49 ++
 .../wxjava/store/enums/UserCouponStatus.java  |  33 +
 .../wxjava/store/enums/WithdrawStatus.java    |  51 ++
 .../wxjava/store/enums/WxCouponStatus.java    |  35 +
 .../wxjava/store/enums/WxOrderStatus.java     |  73 ++
 .../store/enums/WxStoreErrorMsgEnum.java      |  65 ++
 ...cheHttpStoreFileUploadRequestExecutor.java |  47 ++
 ...HttpStoreMediaDownloadRequestExecutor.java |  91 +++
 ...ponentsStoreFileUploadRequestExecutor.java |  47 ++
 ...entsStoreMediaDownloadRequestExecutor.java |  95 +++
 .../OkHttpStoreFileUploadRequestExecutor.java |  38 +
 ...HttpStoreMediaDownloadRequestExecutor.java |  60 ++
 .../StoreFileUploadRequestExecutor.java       |  38 +
 .../StoreMediaDownloadRequestExecutor.java    |  84 +++
 .../wxjava/store/message/WxStoreMessage.java  | 125 ++++
 .../store/message/WxStoreMessageRouter.java   | 236 +++++++
 .../message/WxStoreMessageRouterRule.java     | 172 +++++
 .../store/message/rule/HandlerConsumer.java   |  12 +
 .../message/rule/WxStoreMessageHandler.java   |  30 +
 .../rule/WxStoreMessageInterceptor.java       |  31 +
 .../message/rule/WxStoreMessageMatcher.java   |  20 +
 .../wxjava/store/util/JsonUtils.java          | 100 +++
 .../wxjava/store/util/ResponseUtils.java      |  63 ++
 .../wxjava/store/util/WxChCryptUtils.java     |  51 ++
 .../wxjava/store/util/XmlUtils.java           | 113 +++
 .../store/api/WxStoreServiceContractTest.java |  53 ++
 .../message/WxStoreMessageRouterTest.java     |  52 ++
 wx-java-bom/pom.xml                           |  25 +
 1245 files changed, 35724 insertions(+), 28 deletions(-)
 create mode 100644 docs/WEIXIN_JAVA_STORE_MIGRATION.md
 create mode 100644 solon-plugins/wx-java-store-multi-solon-plugin/README.md
 create mode 100644 solon-plugins/wx-java-store-multi-solon-plugin/pom.xml
 create mode 100644 solon-plugins/wx-java-store-multi-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/configuration/services/AbstractWxStoreConfiguration.java
 create mode 100644 solon-plugins/wx-java-store-multi-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/configuration/services/WxStoreInJedisConfiguration.java
 create mode 100644 solon-plugins/wx-java-store-multi-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/configuration/services/WxStoreInMemoryConfiguration.java
 create mode 100644 solon-plugins/wx-java-store-multi-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/configuration/services/WxStoreInRedissonConfiguration.java
 create mode 100644 solon-plugins/wx-java-store-multi-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/enums/HttpClientType.java
 create mode 100644 solon-plugins/wx-java-store-multi-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/enums/StorageType.java
 create mode 100644 solon-plugins/wx-java-store-multi-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/integration/WxStoreMultiPluginImpl.java
 create mode 100644 solon-plugins/wx-java-store-multi-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/properties/WxStoreMultiProperties.java
 create mode 100644 solon-plugins/wx-java-store-multi-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/properties/WxStoreMultiRedisProperties.java
 create mode 100644 solon-plugins/wx-java-store-multi-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/properties/WxStoreSingleProperties.java
 create mode 100644 solon-plugins/wx-java-store-multi-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/service/WxStoreMultiServices.java
 create mode 100644 solon-plugins/wx-java-store-multi-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/service/WxStoreMultiServicesImpl.java
 create mode 100644 solon-plugins/wx-java-store-multi-solon-plugin/src/main/resources/META-INF/solon/wx-java-multi-store-solon-plugin.properties
 create mode 100644 solon-plugins/wx-java-store-multi-solon-plugin/src/test/java/features/test/LoadTest.java
 create mode 100644 solon-plugins/wx-java-store-multi-solon-plugin/src/test/resources/app.properties
 create mode 100644 solon-plugins/wx-java-store-solon-plugin/README.md
 create mode 100644 solon-plugins/wx-java-store-solon-plugin/pom.xml
 create mode 100644 solon-plugins/wx-java-store-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/config/WxStoreServiceAutoConfiguration.java
 create mode 100644 solon-plugins/wx-java-store-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/config/storage/AbstractWxStoreConfigStorageConfiguration.java
 create mode 100644 solon-plugins/wx-java-store-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/config/storage/WxStoreInJedisConfigStorageConfiguration.java
 create mode 100644 solon-plugins/wx-java-store-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/config/storage/WxStoreInMemoryConfigStorageConfiguration.java
 create mode 100644 solon-plugins/wx-java-store-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/config/storage/WxStoreInRedissonConfigStorageConfiguration.java
 create mode 100644 solon-plugins/wx-java-store-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/enums/HttpClientType.java
 create mode 100644 solon-plugins/wx-java-store-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/enums/StorageType.java
 create mode 100644 solon-plugins/wx-java-store-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/integration/WxStorePluginImpl.java
 create mode 100644 solon-plugins/wx-java-store-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/properties/RedisProperties.java
 create mode 100644 solon-plugins/wx-java-store-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/properties/WxStoreProperties.java
 create mode 100644 solon-plugins/wx-java-store-solon-plugin/src/main/resources/META-INF/solon/wx-java-store-solon-plugin.properties
 create mode 100644 solon-plugins/wx-java-store-solon-plugin/src/test/java/features/test/LoadTest.java
 create mode 100644 solon-plugins/wx-java-store-solon-plugin/src/test/resources/app.yml
 create mode 100644 spring-boot-starters/wx-java-store-multi-spring-boot-starter/README.md
 create mode 100644 spring-boot-starters/wx-java-store-multi-spring-boot-starter/pom.xml
 create mode 100644 spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/autoconfigure/WxStoreMultiAutoConfiguration.java
 create mode 100644 spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/configuration/WxStoreMultiServiceConfiguration.java
 create mode 100644 spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/configuration/services/AbstractWxStoreConfiguration.java
 create mode 100644 spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/configuration/services/WxStoreInJedisConfiguration.java
 create mode 100644 spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/configuration/services/WxStoreInMemoryConfiguration.java
 create mode 100644 spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/configuration/services/WxStoreInRedisTemplateConfiguration.java
 create mode 100644 spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/configuration/services/WxStoreInRedissonConfiguration.java
 create mode 100644 spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/enums/HttpClientType.java
 create mode 100644 spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/enums/StorageType.java
 create mode 100644 spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/properties/WxStoreMultiProperties.java
 create mode 100644 spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/properties/WxStoreMultiRedisProperties.java
 create mode 100644 spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/properties/WxStoreSingleProperties.java
 create mode 100644 spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/service/WxStoreMultiServices.java
 create mode 100644 spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/service/WxStoreMultiServicesImpl.java
 create mode 100644 spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/resources/META-INF/spring.factories
 create mode 100644 spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
 create mode 100644 spring-boot-starters/wx-java-store-spring-boot-starter/README.md
 create mode 100644 spring-boot-starters/wx-java-store-spring-boot-starter/pom.xml
 create mode 100644 spring-boot-starters/wx-java-store-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/config/WxStoreAutoConfiguration.java
 create mode 100644 spring-boot-starters/wx-java-store-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/config/WxStoreServiceAutoConfiguration.java
 create mode 100644 spring-boot-starters/wx-java-store-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/config/WxStoreStorageAutoConfiguration.java
 create mode 100644 spring-boot-starters/wx-java-store-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/config/storage/AbstractWxStoreConfigStorageConfiguration.java
 create mode 100644 spring-boot-starters/wx-java-store-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/config/storage/WxStoreInJedisConfigStorageConfiguration.java
 create mode 100644 spring-boot-starters/wx-java-store-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/config/storage/WxStoreInMemoryConfigStorageConfiguration.java
 create mode 100644 spring-boot-starters/wx-java-store-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/config/storage/WxStoreInRedisTemplateConfigStorageConfiguration.java
 create mode 100644 spring-boot-starters/wx-java-store-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/config/storage/WxStoreInRedissonConfigStorageConfiguration.java
 create mode 100644 spring-boot-starters/wx-java-store-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/enums/HttpClientType.java
 create mode 100644 spring-boot-starters/wx-java-store-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/enums/StorageType.java
 create mode 100644 spring-boot-starters/wx-java-store-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/properties/RedisProperties.java
 create mode 100644 spring-boot-starters/wx-java-store-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/properties/WxStoreProperties.java
 create mode 100644 spring-boot-starters/wx-java-store-spring-boot-starter/src/main/resources/META-INF/spring.factories
 create mode 100644 spring-boot-starters/wx-java-store-spring-boot-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
 create mode 100644 weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/WxChannelStoreCompatibilityTest.java
 create mode 100644 weixin-java-store/pom.xml
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/BaseWxStoreMessageService.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/BaseWxStoreService.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreAddressService.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreAfterSaleService.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreBasicService.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreBrandService.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreCategoryService.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreCompassShopService.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreCooperationService.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreCouponService.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreEwaybillService.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreFavoriteService.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreFreightTemplateService.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreFundService.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreGiftService.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreHomePageService.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreKfService.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreLimitedDiscountService.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreOrderService.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreProductAssistantService.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreProductService.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreProductStockService.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreQicService.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreService.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreSharerService.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreSupplierService.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreVipService.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreWarehouseService.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxTalentService.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/BaseWxStoreMessageServiceImpl.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/BaseWxStoreServiceImpl.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreAddressServiceImpl.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreAfterSaleServiceImpl.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreBasicServiceImpl.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreBrandServiceImpl.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreCategoryServiceImpl.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreCompassShopServiceImpl.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreCooperationServiceImpl.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreCouponServiceImpl.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreEwaybillServiceImpl.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreFavoriteServiceImpl.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreFreightTemplateServiceImpl.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreFundServiceImpl.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreGiftServiceImpl.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreHomePageServiceImpl.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreKfServiceImpl.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreLimitedDiscountServiceImpl.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreOrderServiceImpl.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreProductAssistantServiceImpl.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreProductServiceImpl.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreProductStockServiceImpl.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreQicServiceImpl.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreServiceHttpClientImpl.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreServiceHttpComponentsImpl.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreServiceImpl.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreServiceOkHttpImpl.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreSharerServiceImpl.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreSupplierServiceImpl.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreVipServiceImpl.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreWarehouseServiceImpl.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxTalentServiceImpl.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/address/AddressAddParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/address/AddressCode.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/address/AddressCodeResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/address/AddressDetail.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/address/AddressIdParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/address/AddressIdResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/address/AddressInfoResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/address/AddressListParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/address/AddressListResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/address/OfflineAddressType.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleAcceptExchangeReshipParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleAcceptParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleCreateResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleDetail.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleExchangeDeliveryInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleExchangeProductInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleGenAfterSaleOrderParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleHandleFastExchangeReceiptParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleIdParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleInfoResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleListParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleListResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleMerchantUpdateParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleProductInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleReason.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleReasonResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleRefundPriceDiffParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleRejectExchangeReshipParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleRejectParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleRejectReason.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleRejectReasonResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleReturnParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleVirtualNumberInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleVirtualTelNumResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/ExchangeSkuInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/GuaranteeMerchantModifyParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/GuaranteeMerchantProofParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/GuaranteeModifyRequest.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/GuaranteeOrderIdParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/GuaranteeOrderInfoResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/GuaranteeOrderListParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/GuaranteeOrderListResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/GuaranteeOrderResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/GuaranteeProofRequest.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/GuaranteeRefuseRequest.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/MerchantUploadInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/RefundEvidenceParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/RefundInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/RefundResp.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/ReturnInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/SyncWorkOrderParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/audit/AuditApplyResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/audit/AuditResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/audit/AuditResult.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/audit/CategoryAuditInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/audit/CategoryAuditRequest.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/audit/CategoryBrand.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/audit/CatsV2.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/audit/ProductAuditInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/base/AddressInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/base/AttrInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/base/OffsetParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/base/PageParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/base/StreamPageParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/base/TimeRange.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/base/WxStoreBaseResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/brand/BasicBrand.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/brand/Brand.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/brand/BrandApplicationDetail.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/brand/BrandApplyListResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/brand/BrandGrantDetail.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/brand/BrandInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/brand/BrandInfoResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/brand/BrandListResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/brand/BrandParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/brand/BrandRegisterDetail.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/brand/BrandSearchParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/category/AccountCategoryResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/category/CategoryAndQualificationList.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/category/CategoryDetailResult.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/category/CategoryQualification.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/category/CategoryQualificationResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/category/PassCategoryInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/category/PassCategoryResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/category/QualificationInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/category/RelationCategoryItem.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/category/RelationCategoryRequest.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/category/RelationCategoryResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/category/ShopCategory.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/category/ShopCategoryResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/CompassFinderBaseParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/CompassFinderIdParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/FinderAuthListResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/FinderGmvData.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/FinderGmvItem.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/FinderListResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/FinderOverallData.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/FinderOverallResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/FinderProductListItem.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/FinderProductListResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/FinderProductOverallResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/FinderProductSimpleGmvData.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/ShopField.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/ShopLiveData.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/ShopLiveListResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/ShopOverall.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/ShopOverallResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/ShopProductCompassData.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/ShopProductDataParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/ShopProductDataResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/ShopProductInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/ShopProductListResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/ShopSaleProfileData.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/ShopSaleProfileDataParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/ShopSaleProfileDataResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/complaint/ComplaintHistory.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/complaint/ComplaintOrderResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/complaint/ComplaintParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/cooperation/CooperationData.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/cooperation/CooperationListResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/cooperation/CooperationQrCode.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/cooperation/CooperationQrCodeResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/cooperation/CooperationSharerParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/cooperation/CooperationStatus.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/cooperation/CooperationStatusResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/AutoValidInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/CouponDetailInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/CouponIdInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/CouponIdResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/CouponInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/CouponInfoResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/CouponListParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/CouponListResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/CouponParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/CouponStatusParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/DiscountCondition.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/DiscountInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/ExtInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/PromoteInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/ReceiveInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/StockInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/UserCoupon.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/UserCouponIdInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/UserCouponIdParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/UserCouponListParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/UserCouponListResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/UserCouponResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/UserExtInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/ValidInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/delivery/DeliveryCompanyInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/delivery/DeliveryCompanyResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/delivery/DeliveryInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/delivery/DeliverySendParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/delivery/FreightProductInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/delivery/FreshInspectParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/delivery/PackageAuditInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/AbstractEwaybillRequest.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/AbstractEwaybillResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/AccountInfoResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/AddSubOrderRequest.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/BatchPrintOrderRequest.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/CreateOrderRequest.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/CreateOrderResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/DeliveryListResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/EwaybillOrderIdParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/OrderDetailResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/PreCreateRequest.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/PreCreateResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/PrintContentParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/PrintContentResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/PrintOrderRequest.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/TemplateCodeParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/TemplateConfigResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/TemplateCreateRequest.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/TemplateIdParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/TemplateIdResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/TemplateInfoResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/TemplateUpdateRequest.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/WaybillIdParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/WaybillIdsParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/favorite/FavoriteCountResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/freight/AddressInfoList.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/freight/AllConditionFreeDetail.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/freight/AllFreightCalcMethod.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/freight/ConditionFreeDetail.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/freight/FreightCalcMethod.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/freight/FreightTemplate.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/freight/NotSendArea.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/freight/TemplateAddParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/freight/TemplateIdResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/freight/TemplateInfoResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/freight/TemplateListParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/freight/TemplateListResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/AccountInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/AccountInfoParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/AccountInfoResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/BalanceInfoResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/FlowListResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/FlowRelatedInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/FundsFlow.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/FundsFlowResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/FundsListParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/WithdrawDetailResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/WithdrawListParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/WithdrawListResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/WithdrawSubmitParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/WithdrawSubmitResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/bank/BankCityInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/bank/BankCityResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/bank/BankInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/bank/BankInfoResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/bank/BankListResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/bank/BankProvinceInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/bank/BankProvinceResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/bank/BankSearchParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/bank/BranchInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/bank/BranchInfoResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/bank/BranchSearchParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/qrcode/QrCheckResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/qrcode/QrCodeResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/background/BackgroundApplyResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/background/BackgroundApplyResult.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/background/BackgroundGetResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/banner/BannerApplyDetail.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/banner/BannerApplyInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/banner/BannerApplyParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/banner/BannerApplyResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/banner/BannerGetResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/banner/BannerInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/banner/BannerItem.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/banner/BannerItemDetail.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/banner/BannerItemFinder.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/banner/BannerItemOfficialAccount.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/banner/BannerItemProduct.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/CatTreeNode.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/LevelTreeInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/OneLevelTreeNode.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/TreeAuditResult.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/TreeAuditResultDetail.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/TreeProductEditInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/TreeProductEditParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/TreeProductListInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/TreeProductListParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/TreeProductListResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/TreeProductListResult.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/TreeShowGetResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/TreeShowInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/TreeShowParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/TreeShowSetResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/window/WindowProductIndexParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/window/WindowProductListParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/window/WindowProductSetting.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/window/WindowProductSettingResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/image/QualificationFileId.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/image/QualificationFileResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/image/StoreImageInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/image/StoreImageResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/image/UploadImageResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/kf/WxStoreKfCosUploadResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/kf/WxStoreKfSendMsgParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/kf/WxStoreKfSendMsgResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/limit/LimitSku.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/limit/LimitSkuUpdate.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/limit/LimitTaskAddResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/limit/LimitTaskInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/limit/LimitTaskListParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/limit/LimitTaskListResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/limit/LimitTaskParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/limit/LimitTaskUpdateParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/limit/LimitTaskUpdateResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/SessionMessage.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/after/AfterSaleMessage.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/after/AfterSaleStatusInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/after/ComplaintInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/after/ComplaintMessage.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/coupon/CouponActionInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/coupon/CouponActionMessage.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/coupon/CouponReceiveMessage.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/coupon/UserCouponActionInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/coupon/UserCouponExpireMessage.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/coupon/UserCouponUseMessage.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/fund/AccountNotifyMessage.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/fund/BankNotifyInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/fund/QrNotifyInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/fund/QrNotifyMessage.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/fund/WithdrawNotifyInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/fund/WithdrawNotifyMessage.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderCancelInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderCancelMessage.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderConfirmInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderConfirmMessage.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderDeliveryInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderDeliveryMessage.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderExtInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderExtMessage.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderIdInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderIdMessage.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderPayInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderPayMessage.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderSettleInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderSettleMessage.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderStatusMessage.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/product/BrandMessage.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/product/CategoryAuditMessage.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/product/SpuAuditMessage.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/product/SpuStatusMessage.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/product/SpuStockMessage.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/sharer/SharerChangeMessage.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/store/CloseStoreMessage.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/store/NicknameUpdateMessage.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/supplier/SupplierItemInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/supplier/SupplierItemMessage.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/vip/CouponInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/vip/ExchangeInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/vip/ExchangeInfoMessage.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/vip/ProductInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/vip/UserInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/vip/UserInfoMessage.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/voucher/VoucherInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/voucher/VoucherMessage.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/AfterSaleDetail.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/AfterSaleOrderInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/ChangeOrderInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/ChangeSkuInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/DecodeAddressInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/DecodeSensitiveInfoResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/DeliveryProductInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/DeliveryUpdateParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/DropshipInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/FreeGiftInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/MainProductInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderAddressInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderAddressParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderAgentInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderCommissionInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderCompensationDeliveryParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderCouponInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderCustomInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderDeliveryInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderDetailInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderExtInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderGreetingCardInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderIdParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderInfoParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderInfoResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderListParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderListResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderPayInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderPriceInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderPriceParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderProductExtraService.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderProductInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderRefundInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderRemarkParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderSearchCondition.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderSearchParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderSettleInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderSharerInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderSkuDeliverInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderSkuShareInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderSourceInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/PreShipmentChangeSkuRejectParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/PreShipmentChangeSkuResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/PresentNoteAddParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/PresentSubOrderResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/PrivateNumberAddPhoneParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/PrivateNumberGetPhoneResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/PrivateNumberPhoneInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/PrivateNumberSendVerifyCodeParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/QualityInsepctInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/RealNumberViewAuditResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/RechargeInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/TelNumberExtInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/VirtualNumberInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/VirtualTelNumberResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/AddProductThirdPartySourceParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/AddProductThirdPartySourceResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/AfterSaleInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/DescriptionInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ExpressInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ExternalProductMappingNewParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ExternalProductMappingNewResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ExternalProductMappingParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ExternalProductMappingResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ExtraServiceInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/GiftActivityAddParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/GiftActivityAddResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/GiftActivityInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/GiftProductAddResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/GiftProductGetResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/GiftProductInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/GiftProductListParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/GiftProductListResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/LimitInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductAuditQuotaResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductAuditStrategyInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductAuditStrategyResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductAuditStrategySetParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductBrandRecommendParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductBrandRecommendResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductCategoryClassifyParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductCategoryClassifyResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductCategoryPreCheckParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductCategoryPreCheckResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductQuaInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductSaleLimitInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductSchemeParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductSchemeResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductStockFlowParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductStockFlowResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductTimingSaleParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SkuDeliverInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SkuFastInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SkuInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SkuStockBatchList.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SkuStockBatchParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SkuStockBatchResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SkuStockInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SkuStockParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SkuStockResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SpuCategory.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SpuFastInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SpuGetResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SpuInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SpuListParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SpuListResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SpuSimpleInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SpuSizeChart.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SpuSizeChartItem.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SpuStockInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SpuUpdateInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SpuUpdateResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/TimingOnSaleInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/WarehouseStockInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/assistant/BeginTimingSaleParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/assistant/CancelTimingSaleParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/assistant/CategoryPreCheckParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/assistant/CategoryPreCheckResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/assistant/ExternalAttribute.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/assistant/ExternalProductMappingNewParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/assistant/ExternalProductMappingNewResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/assistant/ExternalProductMappingParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/assistant/ExternalProductMappingResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/assistant/ProductBrandRecommendParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/assistant/ProductBrandRecommendResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/link/ProductH5UrlResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/link/ProductQrCodeResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/link/ProductTagLinkResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/stock/StockFlowExtInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/stock/StockFlowInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/stock/StockFlowParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/stock/StockFlowResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/qic/InspectCodeResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/qic/InspectConfigResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/qic/RegisterLogisticsRequest.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/qic/SubmitConfigResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/qic/SubmitInspectRequest.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/sharer/FinderSceneInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/sharer/SharerBindResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/sharer/SharerInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/sharer/SharerInfoResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/sharer/SharerListParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/sharer/SharerOrder.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/sharer/SharerOrderParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/sharer/SharerOrderResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/sharer/SharerSearchParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/sharer/SharerSearchResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/sharer/SharerUnbindParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/sharer/SharerUnbindResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/shop/ShopH5UrlResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/shop/ShopInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/shop/ShopInfoResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/shop/ShopQrCodeResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/shop/ShopTagLinkResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/supplier/DistributeTypeResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/supplier/DropshipAssignRequest.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/supplier/DropshipDetailResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/supplier/DropshipInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/supplier/DropshipListRequest.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/supplier/DropshipListResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/supplier/DropshipResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/supplier/DropshipSearchRequest.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/supplier/ProductDistributeRequest.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/supplier/ProductListResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/supplier/SupplierInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/supplier/SupplierInfoResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/supplier/SupplierListResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/talent/TalentOrderDetailParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/talent/TalentOrderDetailResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/talent/TalentOrderListParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/talent/TalentOrderListResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/talent/TalentWindowProductDetailParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/talent/TalentWindowProductDetailResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/talent/TalentWindowProductListParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/talent/TalentWindowProductListResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/token/StableTokenParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/vip/ScoreInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/vip/UserGradeInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/vip/UserInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/vip/VipGradeParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/vip/VipInfo.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/vip/VipInfoParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/vip/VipInfoResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/vip/VipListParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/vip/VipListResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/vip/VipOpenIdParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/vip/VipScoreParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/vip/VipScoreResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/warehouse/LocationPriorityResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/warehouse/PriorityLocationParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/warehouse/StockGetParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/warehouse/UpdateLocationParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/warehouse/Warehouse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/warehouse/WarehouseIdsResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/warehouse/WarehouseLocation.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/warehouse/WarehouseLocationParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/warehouse/WarehouseParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/warehouse/WarehouseResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/warehouse/WarehouseStockParam.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/warehouse/WarehouseStockResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/window/request/AddWindowProductRequest.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/window/request/GetWindowProductListRequest.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/window/request/WindowProductRequest.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/window/response/GetWindowProductListResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/window/response/GetWindowProductResponse.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/common/StoreWxError.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/config/WxStoreConfig.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/config/impl/WxStoreDefaultConfigImpl.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/config/impl/WxStoreRedisConfigImpl.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/config/impl/WxStoreRedissonConfigImpl.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/constant/MessageEventConstants.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/constant/WxStoreApiUrlConstants.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/AccountType.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/AfterSaleStatus.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/AfterSaleType.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/AfterSalesReason.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/BannerType.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/CommissionOrderStatus.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/ComplaintItemType.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/ComplaintStatus.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/CouponType.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/CouponValidType.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/DeliveryType.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/FundsType.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/MessageType.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/OrderScene.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/PackageAuditItemType.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/PromoteType.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/QrCheckStatus.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/RefundReason.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/SaleProfileUserType.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/SendTime.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/ShareScene.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/SharerType.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/SpuEditStatus.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/SpuStatus.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/UserCouponStatus.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/WithdrawStatus.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/WxCouponStatus.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/WxOrderStatus.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/WxStoreErrorMsgEnum.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/executor/ApacheHttpStoreFileUploadRequestExecutor.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/executor/ApacheHttpStoreMediaDownloadRequestExecutor.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/executor/HttpComponentsStoreFileUploadRequestExecutor.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/executor/HttpComponentsStoreMediaDownloadRequestExecutor.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/executor/OkHttpStoreFileUploadRequestExecutor.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/executor/OkHttpStoreMediaDownloadRequestExecutor.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/executor/StoreFileUploadRequestExecutor.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/executor/StoreMediaDownloadRequestExecutor.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/message/WxStoreMessage.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/message/WxStoreMessageRouter.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/message/WxStoreMessageRouterRule.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/message/rule/HandlerConsumer.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/message/rule/WxStoreMessageHandler.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/message/rule/WxStoreMessageInterceptor.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/message/rule/WxStoreMessageMatcher.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/util/JsonUtils.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/util/ResponseUtils.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/util/WxChCryptUtils.java
 create mode 100644 weixin-java-store/src/main/java/com/binarywang/wxjava/store/util/XmlUtils.java
 create mode 100644 weixin-java-store/src/test/java/com/binarywang/wxjava/store/api/WxStoreServiceContractTest.java
 create mode 100644 weixin-java-store/src/test/java/com/binarywang/wxjava/store/message/WxStoreMessageRouterTest.java

diff --git a/docs/WEIXIN_JAVA_STORE_MIGRATION.md b/docs/WEIXIN_JAVA_STORE_MIGRATION.md
new file mode 100644
index 0000000000..4523660830
--- /dev/null
+++ b/docs/WEIXIN_JAVA_STORE_MIGRATION.md
@@ -0,0 +1,64 @@
+# 微信小店模块迁移指南
+
+从本版本开始,微信小店能力由独立的 `weixin-java-store` 模块提供。原有
+`weixin-java-channel` 小店 API 仍可继续使用,且行为不变;它们已标记为
+`@Deprecated`,以便在后续版本中引导迁移。
+
+## 依赖替换
+
+将:
+
+```xml
+
+  com.github.binarywang
+  weixin-java-channel
+
+```
+
+替换或并行增加为:
+
+```xml
+
+  com.github.binarywang
+  weixin-java-store
+
+```
+
+新模块不依赖 `weixin-java-channel`。仅接入微信小店的店铺、商品、订单、售后、
+物流和资金等经营能力时,只需依赖 `weixin-java-store`;只有同时需要视频号直播、
+Finder 或橱窗等视频号能力时,才额外依赖 `weixin-java-channel`。两者可以同时引入,
+适合按业务逐步迁移。
+
+## 包名与入口替换
+
+| 旧入口 | 新入口 |
+| --- | --- |
+| `me.chanjar.weixin.channel.api.WxChannelService` | `com.binarywang.wxjava.store.api.WxStoreService` |
+| `WxChannelProductService` | `WxStoreProductService` |
+| `WxChannelOrderService` | `WxStoreOrderService` |
+| `WxChannelAfterSaleService` | `WxStoreAfterSaleService` |
+| `WxChannelFundService` | `WxStoreFundService` |
+| `WxChannelWarehouseService` | `WxStoreWarehouseService` |
+
+所有新模型均位于 `com.binarywang.wxjava.store.bean.*`。旧模型不会改包或删除;
+由于新旧模型是独立类型,业务层应在迁移边界显式完成类型转换。
+
+## 框架集成
+
+微信小店提供独立的 Spring Boot 与 Solon 集成模块,并统一使用 `wx.store`
+作为配置前缀:
+
+| 场景 | 模块 |
+| --- | --- |
+| Spring Boot 单账号 | `wx-java-store-spring-boot-starter` |
+| Spring Boot 多账号 | `wx-java-store-multi-spring-boot-starter` |
+| Solon 单账号 | `wx-java-store-solon-plugin` |
+| Solon 多账号 | `wx-java-store-multi-solon-plugin` |
+
+原有 Channel Starter/Plugin 及其 `wx.channel` 配置保持不变,可与新的
+Store Starter/Plugin 并存。
+
+## 不属于 store 的能力
+
+视频号直播、Finder、联盟分销、留资组件与达人罗盘继续使用
+`weixin-java-channel`,不会被弃用,也不会由 `WxStoreService` 暴露。
diff --git a/pom.xml b/pom.xml
index 29d6af96df..75887b10fb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -126,6 +126,7 @@
     weixin-java-qidian
     weixin-java-aispeech
     weixin-java-channel
+    weixin-java-store
     spring-boot-starters
     solon-plugins
     wx-java-bom
diff --git a/solon-plugins/pom.xml b/solon-plugins/pom.xml
index edb2459a6b..3d83856a37 100644
--- a/solon-plugins/pom.xml
+++ b/solon-plugins/pom.xml
@@ -29,6 +29,8 @@
     wx-java-cp-solon-plugin
     wx-java-channel-solon-plugin
     wx-java-channel-multi-solon-plugin
+    wx-java-store-solon-plugin
+    wx-java-store-multi-solon-plugin
   
 
   
diff --git a/solon-plugins/wx-java-store-multi-solon-plugin/README.md b/solon-plugins/wx-java-store-multi-solon-plugin/README.md
new file mode 100644
index 0000000000..f57390930b
--- /dev/null
+++ b/solon-plugins/wx-java-store-multi-solon-plugin/README.md
@@ -0,0 +1,111 @@
+# wx-java-store-multi-solon-plugin
+
+## 快速开始
+
+1. 引入依赖
+    ```xml
+    
+        
+            com.github.binarywang
+            wx-java-store-multi-solon-plugin
+            ${version}
+        
+
+        
+        
+            redis.clients
+            jedis
+            ${jedis.version}
+        
+
+        
+        
+            org.redisson
+            redisson
+            ${redisson.version}
+        
+    
+    ```
+2. 添加配置(app.properties)
+    ```properties
+    # 视频号配置
+    ## 应用 1 配置(必填)
+    wx.store.apps.tenantId1.app-id=@appId
+    wx.store.apps.tenantId1.secret=@secret
+    ## 选填
+    wx.store.apps.tenantId1.use-stable-access-token=false
+    wx.store.apps.tenantId1.token=
+    wx.store.apps.tenantId1.aes-key=
+    ## 应用 2 配置(必填)
+    wx.store.apps.tenantId2.app-id=@appId
+    wx.store.apps.tenantId2.secret=@secret
+    ## 选填
+    wx.store.apps.tenantId2.use-stable-access-token=false
+    wx.store.apps.tenantId2.token=
+    wx.store.apps.tenantId2.aes-key=
+
+    # ConfigStorage 配置(选填)
+    ## 配置类型: memory(默认), jedis, redisson, redis_template
+    wx.store.config-storage.type=memory
+    ## 相关redis前缀配置: wx:store:multi(默认)
+    wx.store.config-storage.key-prefix=wx:store:multi
+    wx.store.config-storage.redis.host=127.0.0.1
+    wx.store.config-storage.redis.port=6379
+    wx.store.config-storage.redis.password=123456
+
+    # http 客户端配置(选填)
+    ## # http客户端类型: http_client(默认)
+    wx.store.config-storage.http-client-type=http_client
+    wx.store.config-storage.http-proxy-host=
+    wx.store.config-storage.http-proxy-port=
+    wx.store.config-storage.http-proxy-username=
+    wx.store.config-storage.http-proxy-password=
+    ## 最大重试次数,默认:5 次,如果小于 0,则为 0
+    wx.store.config-storage.max-retry-times=5
+    ## 重试时间间隔步进,默认:1000 毫秒,如果小于 0,则为 1000
+    wx.store.config-storage.retry-sleep-millis=1000
+    ```
+3. 自动注入的类型:`WxStoreMultiServices`
+
+4. 使用样例
+
+    ```java
+    import com.binarywang.solon.wxjava.store.service.WxStoreMultiServices;
+    import com.binarywang.wxjava.store.api.WxStoreService;
+    import com.binarywang.wxjava.store.api.WxFinderLiveService;
+    import com.binarywang.wxjava.store.bean.lead.component.response.FinderAttrResponse;
+    import me.chanjar.weixin.common.error.WxErrorException;
+    import org.noear.solon.annotation.Component;
+    import org.noear.solon.annotation.Inject;
+
+    @Component
+    public class DemoService {
+      @Inject
+      private WxStoreMultiServices wxStoreMultiServices;
+
+      public void test() throws WxErrorException {
+        // 应用 1 的 WxStoreService
+        WxStoreService wxStoreService1 = wxStoreMultiServices.getWxStoreService("tenantId1");
+        WxFinderLiveService finderLiveService = wxStoreService1.getFinderLiveService();
+        FinderAttrResponse response1 = finderLiveService.getFinderAttrByAppid();
+        // todo ...
+
+        // 应用 2 的 WxStoreService
+        WxStoreService wxStoreService2 = wxStoreMultiServices.getWxStoreService("tenantId2");
+        WxFinderLiveService finderLiveService2 = wxStoreService2.getFinderLiveService();
+        FinderAttrResponse response2 = finderLiveService2.getFinderAttrByAppid();
+        // todo ...
+
+        // 应用 3 的 WxStoreService
+        WxStoreService wxStoreService3 = wxStoreMultiServices.getWxStoreService("tenantId3");
+        // 判断是否为空
+        if (wxStoreService3 == null) {
+          // todo wxStoreService3 为空,请先配置 tenantId3 微信小店应用参数
+          return;
+        }
+        WxFinderLiveService finderLiveService3 = wxStoreService3.getFinderLiveService();
+        FinderAttrResponse response3 = finderLiveService3.getFinderAttrByAppid();
+        // todo ...
+      }
+    }
+    ```
diff --git a/solon-plugins/wx-java-store-multi-solon-plugin/pom.xml b/solon-plugins/wx-java-store-multi-solon-plugin/pom.xml
new file mode 100644
index 0000000000..1c17d2e8c0
--- /dev/null
+++ b/solon-plugins/wx-java-store-multi-solon-plugin/pom.xml
@@ -0,0 +1,43 @@
+
+
+  
+    wx-java-solon-plugins
+    com.github.binarywang
+    4.8.6.B
+  
+  4.0.0
+
+  wx-java-store-multi-solon-plugin
+  WxJava - Solon Plugin for Store::支持多账号配置
+  微信小店开发的 Solon Plugin::支持多账号配置
+
+  
+    
+      com.github.binarywang
+      weixin-java-store
+      ${project.version}
+    
+    
+      redis.clients
+      jedis
+      provided
+    
+    
+      org.redisson
+      redisson
+      provided
+    
+    
+      org.jodd
+      jodd-http
+      provided
+    
+    
+      com.squareup.okhttp3
+      okhttp
+      provided
+    
+  
+
diff --git a/solon-plugins/wx-java-store-multi-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/configuration/services/AbstractWxStoreConfiguration.java b/solon-plugins/wx-java-store-multi-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/configuration/services/AbstractWxStoreConfiguration.java
new file mode 100644
index 0000000000..f4e76d8e8e
--- /dev/null
+++ b/solon-plugins/wx-java-store-multi-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/configuration/services/AbstractWxStoreConfiguration.java
@@ -0,0 +1,146 @@
+package com.binarywang.solon.wxjava.store.configuration.services;
+
+import com.binarywang.solon.wxjava.store.enums.HttpClientType;
+import com.binarywang.solon.wxjava.store.properties.WxStoreMultiProperties;
+import com.binarywang.solon.wxjava.store.properties.WxStoreSingleProperties;
+import com.binarywang.solon.wxjava.store.service.WxStoreMultiServices;
+import com.binarywang.solon.wxjava.store.service.WxStoreMultiServicesImpl;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import com.binarywang.wxjava.store.api.WxStoreService;
+import com.binarywang.wxjava.store.api.impl.WxStoreServiceHttpComponentsImpl;
+import com.binarywang.wxjava.store.api.impl.WxStoreServiceHttpClientImpl;
+import com.binarywang.wxjava.store.api.impl.WxStoreServiceImpl;
+import com.binarywang.wxjava.store.config.WxStoreConfig;
+import com.binarywang.wxjava.store.config.impl.WxStoreDefaultConfigImpl;
+import org.apache.commons.lang3.StringUtils;
+
+import java.util.Collection;
+import java.util.Map;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+/**
+ * WxStoreConfigStorage 抽象配置类
+ *
+ * @author Winnie 2024/9/13
+ * @author noear
+ */
+@RequiredArgsConstructor
+@Slf4j
+public abstract class AbstractWxStoreConfiguration {
+  protected WxStoreMultiServices wxStoreMultiServices(WxStoreMultiProperties wxStoreMultiProperties) {
+    Map appsMap = wxStoreMultiProperties.getApps();
+    if (appsMap == null || appsMap.isEmpty()) {
+      log.warn("微信小店应用参数未配置,通过 WxStoreMultiServices#getWxStoreService(\"tenantId\")获取实例将返回空");
+      return new WxStoreMultiServicesImpl();
+    }
+    /**
+     * 校验 appId 是否唯一,避免使用 redis 缓存 token、ticket 时错乱。
+     *
+     * 查看 {@link com.binarywang.wxjava.store.config.impl.WxStoreRedisConfigImpl#setAppid(String)}
+     */
+    Collection apps = appsMap.values();
+    if (apps.size() > 1) {
+      // 校验 appId 是否唯一
+      boolean multi = apps.stream()
+        // 没有 appId,如果不判断是否为空,这里会报 NPE 异常
+        .collect(Collectors.groupingBy(c -> c.getAppId() == null ? 0 : c.getAppId(), Collectors.counting()))
+        .entrySet().stream().anyMatch(e -> e.getValue() > 1);
+      if (multi) {
+        throw new RuntimeException("请确保微信小店配置 appId 的唯一性");
+      }
+    }
+    WxStoreMultiServicesImpl services = new WxStoreMultiServicesImpl();
+
+    Set> entries = appsMap.entrySet();
+    for (Map.Entry entry : entries) {
+      String tenantId = entry.getKey();
+      WxStoreSingleProperties wxStoreSingleProperties = entry.getValue();
+      WxStoreDefaultConfigImpl storage = this.wxStoreConfigStorage(wxStoreMultiProperties);
+      this.configApp(storage, wxStoreSingleProperties);
+      this.configHttp(storage, wxStoreMultiProperties.getConfigStorage());
+      WxStoreService wxStoreService = this.wxStoreService(storage, wxStoreMultiProperties);
+      services.addWxStoreService(tenantId, wxStoreService);
+    }
+    return services;
+  }
+
+  /**
+   * 配置 WxStoreDefaultConfigImpl
+   *
+   * @param wxStoreMultiProperties 参数
+   * @return WxStoreDefaultConfigImpl
+   */
+  protected abstract WxStoreDefaultConfigImpl wxStoreConfigStorage(WxStoreMultiProperties wxStoreMultiProperties);
+
+  public WxStoreService wxStoreService(WxStoreConfig wxStoreConfig, WxStoreMultiProperties wxStoreMultiProperties) {
+    WxStoreMultiProperties.ConfigStorage storage = wxStoreMultiProperties.getConfigStorage();
+    HttpClientType httpClientType = storage.getHttpClientType();
+    WxStoreService wxStoreService;
+    switch (httpClientType) {
+//      case OK_HTTP:
+//        wxStoreService = new WxStoreServiceOkHttpImpl(false, false);
+//        break;
+      case HTTP_CLIENT:
+        wxStoreService = new WxStoreServiceHttpClientImpl();
+        break;
+      case HTTP_COMPONENTS:
+        wxStoreService = new WxStoreServiceHttpComponentsImpl();
+        break;
+      default:
+        wxStoreService = new WxStoreServiceImpl();
+        break;
+    }
+
+    wxStoreService.setConfig(wxStoreConfig);
+    int maxRetryTimes = storage.getMaxRetryTimes();
+    if (maxRetryTimes < 0) {
+      maxRetryTimes = 0;
+    }
+    int retrySleepMillis = storage.getRetrySleepMillis();
+    if (retrySleepMillis < 0) {
+      retrySleepMillis = 1000;
+    }
+    wxStoreService.setRetrySleepMillis(retrySleepMillis);
+    wxStoreService.setMaxRetryTimes(maxRetryTimes);
+    return wxStoreService;
+  }
+
+  private void configApp(WxStoreDefaultConfigImpl config, WxStoreSingleProperties wxStoreSingleProperties) {
+    String appId = wxStoreSingleProperties.getAppId();
+    String appSecret = wxStoreSingleProperties.getSecret();
+    String token = wxStoreSingleProperties.getToken();
+    String aesKey = wxStoreSingleProperties.getAesKey();
+    boolean useStableAccessToken = wxStoreSingleProperties.isUseStableAccessToken();
+
+    config.setAppid(appId);
+    config.setSecret(appSecret);
+    if (StringUtils.isNotBlank(token)) {
+      config.setToken(token);
+    }
+    if (StringUtils.isNotBlank(aesKey)) {
+      config.setAesKey(aesKey);
+    }
+    config.setStableAccessToken(useStableAccessToken);
+  }
+
+  private void configHttp(WxStoreDefaultConfigImpl config, WxStoreMultiProperties.ConfigStorage storage) {
+    String httpProxyHost = storage.getHttpProxyHost();
+    Integer httpProxyPort = storage.getHttpProxyPort();
+    String httpProxyUsername = storage.getHttpProxyUsername();
+    String httpProxyPassword = storage.getHttpProxyPassword();
+    if (StringUtils.isNotBlank(httpProxyHost)) {
+      config.setHttpProxyHost(httpProxyHost);
+      if (httpProxyPort != null) {
+        config.setHttpProxyPort(httpProxyPort);
+      }
+      if (StringUtils.isNotBlank(httpProxyUsername)) {
+        config.setHttpProxyUsername(httpProxyUsername);
+      }
+      if (StringUtils.isNotBlank(httpProxyPassword)) {
+        config.setHttpProxyPassword(httpProxyPassword);
+      }
+    }
+  }
+}
diff --git a/solon-plugins/wx-java-store-multi-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/configuration/services/WxStoreInJedisConfiguration.java b/solon-plugins/wx-java-store-multi-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/configuration/services/WxStoreInJedisConfiguration.java
new file mode 100644
index 0000000000..9e0793c2d4
--- /dev/null
+++ b/solon-plugins/wx-java-store-multi-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/configuration/services/WxStoreInJedisConfiguration.java
@@ -0,0 +1,77 @@
+package com.binarywang.solon.wxjava.store.configuration.services;
+
+import com.binarywang.solon.wxjava.store.properties.WxStoreMultiProperties;
+import com.binarywang.solon.wxjava.store.properties.WxStoreMultiRedisProperties;
+import com.binarywang.solon.wxjava.store.service.WxStoreMultiServices;
+import lombok.RequiredArgsConstructor;
+import com.binarywang.wxjava.store.config.impl.WxStoreDefaultConfigImpl;
+import com.binarywang.wxjava.store.config.impl.WxStoreRedisConfigImpl;
+import me.chanjar.weixin.common.redis.JedisWxRedisOps;
+import org.apache.commons.lang3.StringUtils;
+import org.noear.solon.annotation.Bean;
+import org.noear.solon.annotation.Condition;
+import org.noear.solon.annotation.Configuration;
+import org.noear.solon.core.AppContext;
+import redis.clients.jedis.JedisPool;
+import redis.clients.jedis.JedisPoolConfig;
+
+/**
+ * 自动装配基于 jedis 策略配置
+ *
+ * @author Winnie 2024/9/13
+ * @author noear
+ */
+@Configuration
+@Condition(
+  onProperty = "${"+WxStoreMultiProperties.PREFIX + ".configStorage.type} = jedis",
+  onClass = JedisPool.class
+)
+@RequiredArgsConstructor
+public class WxStoreInJedisConfiguration extends AbstractWxStoreConfiguration {
+  private final WxStoreMultiProperties wxStoreMultiProperties;
+  private final AppContext applicationContext;
+
+  @Bean
+  public WxStoreMultiServices wxStoreMultiServices() {
+    return this.wxStoreMultiServices(wxStoreMultiProperties);
+  }
+
+  @Override
+  protected WxStoreDefaultConfigImpl wxStoreConfigStorage(WxStoreMultiProperties wxStoreMultiProperties) {
+    return this.configRedis(wxStoreMultiProperties);
+  }
+
+  private WxStoreDefaultConfigImpl configRedis(WxStoreMultiProperties wxStoreMultiProperties) {
+    WxStoreMultiRedisProperties wxStoreMultiRedisProperties = wxStoreMultiProperties.getConfigStorage().getRedis();
+    JedisPool jedisPool;
+    if (wxStoreMultiRedisProperties != null && StringUtils.isNotEmpty(wxStoreMultiRedisProperties.getHost())) {
+      jedisPool = getJedisPool(wxStoreMultiProperties);
+    } else {
+      jedisPool = applicationContext.getBean(JedisPool.class);
+    }
+    return new WxStoreRedisConfigImpl(new JedisWxRedisOps(jedisPool), wxStoreMultiProperties.getConfigStorage().getKeyPrefix());
+  }
+
+  private JedisPool getJedisPool(WxStoreMultiProperties wxStoreMultiProperties) {
+    WxStoreMultiProperties.ConfigStorage storage = wxStoreMultiProperties.getConfigStorage();
+    WxStoreMultiRedisProperties redis = storage.getRedis();
+
+    JedisPoolConfig config = new JedisPoolConfig();
+    if (redis.getMaxActive() != null) {
+      config.setMaxTotal(redis.getMaxActive());
+    }
+    if (redis.getMaxIdle() != null) {
+      config.setMaxIdle(redis.getMaxIdle());
+    }
+    if (redis.getMaxWaitMillis() != null) {
+      config.setMaxWaitMillis(redis.getMaxWaitMillis());
+    }
+    if (redis.getMinIdle() != null) {
+      config.setMinIdle(redis.getMinIdle());
+    }
+    config.setTestOnBorrow(true);
+    config.setTestWhileIdle(true);
+
+    return new JedisPool(config, redis.getHost(), redis.getPort(), redis.getTimeout(), redis.getPassword(), redis.getDatabase());
+  }
+}
diff --git a/solon-plugins/wx-java-store-multi-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/configuration/services/WxStoreInMemoryConfiguration.java b/solon-plugins/wx-java-store-multi-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/configuration/services/WxStoreInMemoryConfiguration.java
new file mode 100644
index 0000000000..64764c22a2
--- /dev/null
+++ b/solon-plugins/wx-java-store-multi-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/configuration/services/WxStoreInMemoryConfiguration.java
@@ -0,0 +1,40 @@
+package com.binarywang.solon.wxjava.store.configuration.services;
+
+import com.binarywang.solon.wxjava.store.properties.WxStoreMultiProperties;
+import com.binarywang.solon.wxjava.store.service.WxStoreMultiServices;
+import lombok.RequiredArgsConstructor;
+import com.binarywang.wxjava.store.config.impl.WxStoreDefaultConfigImpl;
+import org.noear.solon.annotation.Bean;
+import org.noear.solon.annotation.Condition;
+import org.noear.solon.annotation.Configuration;
+import redis.clients.jedis.JedisPool;
+
+/**
+ * 自动装配基于内存策略配置
+ *
+ * @author Winnie 2024/9/13
+ * @author noear
+ */
+@Configuration
+@Condition(
+  onProperty = "${"+WxStoreMultiProperties.PREFIX + ".configStorage.type} = memory",
+  onClass = JedisPool.class
+)
+@RequiredArgsConstructor
+public class WxStoreInMemoryConfiguration extends AbstractWxStoreConfiguration {
+  private final WxStoreMultiProperties wxStoreMultiProperties;
+
+  @Bean
+  public WxStoreMultiServices wxStoreMultiServices() {
+    return this.wxStoreMultiServices(wxStoreMultiProperties);
+  }
+
+  @Override
+  protected WxStoreDefaultConfigImpl wxStoreConfigStorage(WxStoreMultiProperties wxStoreMultiProperties) {
+    return this.configInMemory();
+  }
+
+  private WxStoreDefaultConfigImpl configInMemory() {
+    return new WxStoreDefaultConfigImpl();
+  }
+}
diff --git a/solon-plugins/wx-java-store-multi-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/configuration/services/WxStoreInRedissonConfiguration.java b/solon-plugins/wx-java-store-multi-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/configuration/services/WxStoreInRedissonConfiguration.java
new file mode 100644
index 0000000000..fbb0f46063
--- /dev/null
+++ b/solon-plugins/wx-java-store-multi-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/configuration/services/WxStoreInRedissonConfiguration.java
@@ -0,0 +1,65 @@
+package com.binarywang.solon.wxjava.store.configuration.services;
+
+import com.binarywang.solon.wxjava.store.properties.WxStoreMultiProperties;
+import com.binarywang.solon.wxjava.store.properties.WxStoreMultiRedisProperties;
+import com.binarywang.solon.wxjava.store.service.WxStoreMultiServices;
+import lombok.RequiredArgsConstructor;
+import com.binarywang.wxjava.store.config.impl.WxStoreDefaultConfigImpl;
+import com.binarywang.wxjava.store.config.impl.WxStoreRedissonConfigImpl;
+import org.apache.commons.lang3.StringUtils;
+import org.noear.solon.annotation.Bean;
+import org.noear.solon.annotation.Condition;
+import org.noear.solon.annotation.Configuration;
+import org.noear.solon.core.AppContext;
+import org.redisson.Redisson;
+import org.redisson.api.RedissonClient;
+import org.redisson.config.Config;
+import org.redisson.config.TransportMode;
+
+/**
+ * 自动装配基于 redisson 策略配置
+ *
+ * @author Winnie 2024/9/13
+ * @author noear
+ */
+@Configuration
+@Condition(
+  onProperty = "${"+WxStoreMultiProperties.PREFIX + ".configStorage.type} = redisson",
+  onClass = Redisson.class
+)
+@RequiredArgsConstructor
+public class WxStoreInRedissonConfiguration extends AbstractWxStoreConfiguration {
+  private final WxStoreMultiProperties wxStoreMultiProperties;
+  private final AppContext applicationContext;
+
+  @Bean
+  public WxStoreMultiServices wxStoreMultiServices() {
+    return this.wxStoreMultiServices(wxStoreMultiProperties);
+  }
+
+  @Override
+  protected WxStoreDefaultConfigImpl wxStoreConfigStorage(WxStoreMultiProperties wxStoreMultiProperties) {
+    return this.configRedisson(wxStoreMultiProperties);
+  }
+
+  private WxStoreDefaultConfigImpl configRedisson(WxStoreMultiProperties wxStoreMultiProperties) {
+    WxStoreMultiRedisProperties redisProperties = wxStoreMultiProperties.getConfigStorage().getRedis();
+    RedissonClient redissonClient;
+    if (redisProperties != null && StringUtils.isNotEmpty(redisProperties.getHost())) {
+      redissonClient = getRedissonClient(wxStoreMultiProperties);
+    } else {
+      redissonClient = applicationContext.getBean(RedissonClient.class);
+    }
+    return new WxStoreRedissonConfigImpl(redissonClient, wxStoreMultiProperties.getConfigStorage().getKeyPrefix());
+  }
+
+  private RedissonClient getRedissonClient(WxStoreMultiProperties wxStoreMultiProperties) {
+    WxStoreMultiProperties.ConfigStorage storage = wxStoreMultiProperties.getConfigStorage();
+    WxStoreMultiRedisProperties redis = storage.getRedis();
+
+    Config config = new Config();
+    config.useSingleServer().setAddress("redis://" + redis.getHost() + ":" + redis.getPort()).setDatabase(redis.getDatabase()).setPassword(redis.getPassword());
+    config.setTransportMode(TransportMode.NIO);
+    return Redisson.create(config);
+  }
+}
diff --git a/solon-plugins/wx-java-store-multi-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/enums/HttpClientType.java b/solon-plugins/wx-java-store-multi-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/enums/HttpClientType.java
new file mode 100644
index 0000000000..eef3e7fc1c
--- /dev/null
+++ b/solon-plugins/wx-java-store-multi-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/enums/HttpClientType.java
@@ -0,0 +1,23 @@
+package com.binarywang.solon.wxjava.store.enums;
+
+/**
+ * httpclient类型
+ *
+ * @author Winnie
+ * @date 2024/9/13
+ */
+public enum HttpClientType {
+  /**
+   * HttpClient
+   */
+  HTTP_CLIENT,
+  /**
+   * HttpComponents
+   */
+  HTTP_COMPONENTS
+  // WxStoreServiceOkHttpImpl 实现经测试无法正常完成业务固暂不支持OK_HTTP方式
+//  /**
+//   * OkHttp.
+//   */
+//  OK_HTTP,
+}
diff --git a/solon-plugins/wx-java-store-multi-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/enums/StorageType.java b/solon-plugins/wx-java-store-multi-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/enums/StorageType.java
new file mode 100644
index 0000000000..fdb12d124c
--- /dev/null
+++ b/solon-plugins/wx-java-store-multi-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/enums/StorageType.java
@@ -0,0 +1,26 @@
+package com.binarywang.solon.wxjava.store.enums;
+
+/**
+ * storage类型
+ *
+ * @author Winnie
+ * @date 2024/9/13
+ */
+public enum StorageType {
+  /**
+   * 内存
+   */
+  MEMORY,
+  /**
+   * redis(JedisClient)
+   */
+  JEDIS,
+  /**
+   * redis(Redisson)
+   */
+  REDISSON,
+  /**
+   * redis(RedisTemplate)
+   */
+  REDIS_TEMPLATE
+}
diff --git a/solon-plugins/wx-java-store-multi-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/integration/WxStoreMultiPluginImpl.java b/solon-plugins/wx-java-store-multi-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/integration/WxStoreMultiPluginImpl.java
new file mode 100644
index 0000000000..e9890396ec
--- /dev/null
+++ b/solon-plugins/wx-java-store-multi-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/integration/WxStoreMultiPluginImpl.java
@@ -0,0 +1,25 @@
+package com.binarywang.solon.wxjava.store.integration;
+
+import com.binarywang.solon.wxjava.store.configuration.services.WxStoreInJedisConfiguration;
+import com.binarywang.solon.wxjava.store.configuration.services.WxStoreInMemoryConfiguration;
+import com.binarywang.solon.wxjava.store.configuration.services.WxStoreInRedissonConfiguration;
+import com.binarywang.solon.wxjava.store.properties.WxStoreMultiProperties;
+import org.noear.solon.core.AppContext;
+import org.noear.solon.core.Plugin;
+
+/**
+ * 微信小店自动注册
+ *
+ * @author Winnie  2024/9/13
+ * @author noear 2024/10/9 created
+ */
+public class WxStoreMultiPluginImpl implements Plugin {
+  @Override
+  public void start(AppContext context) throws Throwable {
+    context.beanMake(WxStoreMultiProperties.class);
+
+    context.beanMake(WxStoreInJedisConfiguration.class);
+    context.beanMake(WxStoreInMemoryConfiguration.class);
+    context.beanMake(WxStoreInRedissonConfiguration.class);
+  }
+}
diff --git a/solon-plugins/wx-java-store-multi-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/properties/WxStoreMultiProperties.java b/solon-plugins/wx-java-store-multi-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/properties/WxStoreMultiProperties.java
new file mode 100644
index 0000000000..794489aef8
--- /dev/null
+++ b/solon-plugins/wx-java-store-multi-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/properties/WxStoreMultiProperties.java
@@ -0,0 +1,96 @@
+package com.binarywang.solon.wxjava.store.properties;
+
+import com.binarywang.solon.wxjava.store.enums.HttpClientType;
+import com.binarywang.solon.wxjava.store.enums.StorageType;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.noear.solon.annotation.Configuration;
+import org.noear.solon.annotation.Inject;
+
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * 微信多视频号接入相关配置属性
+ *
+ * @author Winnie
+ * @date 2024/9/13
+ */
+@Data
+@NoArgsConstructor
+@Configuration
+@Inject("${" + WxStoreMultiProperties.PREFIX +"}")
+public class WxStoreMultiProperties implements Serializable {
+  private static final long serialVersionUID = - 8361973118805546037L;
+  public static final String PREFIX = "wx.store";
+
+  private Map apps = new HashMap<>();
+
+  /**
+   * 存储策略
+   */
+  private final ConfigStorage configStorage = new ConfigStorage();
+
+  @Data
+  @NoArgsConstructor
+  public static class ConfigStorage implements Serializable {
+    private static final long serialVersionUID = - 5152619132544179942L;
+
+    /**
+     * 存储类型.
+     */
+    private StorageType type = StorageType.MEMORY;
+
+    /**
+     * 指定key前缀.
+     */
+    private String keyPrefix = "wx:store:multi";
+
+    /**
+     * redis连接配置.
+     */
+    private final WxStoreMultiRedisProperties redis = new WxStoreMultiRedisProperties();
+
+    /**
+     * http客户端类型.
+     */
+    private HttpClientType httpClientType = HttpClientType.HTTP_CLIENT;
+
+    /**
+     * http代理主机.
+     */
+    private String httpProxyHost;
+
+    /**
+     * http代理端口.
+     */
+    private Integer httpProxyPort;
+
+    /**
+     * http代理用户名.
+     */
+    private String httpProxyUsername;
+
+    /**
+     * http代理密码.
+     */
+    private String httpProxyPassword;
+
+    /**
+     * http 请求最大重试次数
+     *
+     * 

{@link com.binarywang.wxjava.store.api.WxStoreService#setMaxRetryTimes(int)}

+ *

{@link com.binarywang.wxjava.store.api.impl.BaseWxStoreServiceImpl#setMaxRetryTimes(int)}

+ */ + private int maxRetryTimes = 5; + + /** + * http 请求重试间隔 + * + *

{@link com.binarywang.wxjava.store.api.WxStoreService#setRetrySleepMillis(int)}

+ *

{@link com.binarywang.wxjava.store.api.impl.BaseWxStoreServiceImpl#setRetrySleepMillis(int)}

+ */ + private int retrySleepMillis = 1000; + } +} diff --git a/solon-plugins/wx-java-store-multi-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/properties/WxStoreMultiRedisProperties.java b/solon-plugins/wx-java-store-multi-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/properties/WxStoreMultiRedisProperties.java new file mode 100644 index 0000000000..1df12ab720 --- /dev/null +++ b/solon-plugins/wx-java-store-multi-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/properties/WxStoreMultiRedisProperties.java @@ -0,0 +1,63 @@ +package com.binarywang.solon.wxjava.store.properties; + +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * Redis配置 + * + * @author Winnie + * @date 2024/9/13 + */ +@Data +@NoArgsConstructor +public class WxStoreMultiRedisProperties implements Serializable { + private static final long serialVersionUID = 9061055444734277357L; + + /** + * 主机地址. + */ + private String host = "127.0.0.1"; + + /** + * 端口号. + */ + private int port = 6379; + + /** + * 密码. + */ + private String password; + + /** + * 超时. + */ + private int timeout = 2000; + + /** + * 数据库. + */ + private int database = 0; + + /** + * 最大活动连接数 + */ + private Integer maxActive; + + /** + * 最大空闲连接数 + */ + private Integer maxIdle; + + /** + * 最小空闲连接数 + */ + private Integer minIdle; + + /** + * 最大等待时间 + */ + private Integer maxWaitMillis; +} diff --git a/solon-plugins/wx-java-store-multi-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/properties/WxStoreSingleProperties.java b/solon-plugins/wx-java-store-multi-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/properties/WxStoreSingleProperties.java new file mode 100644 index 0000000000..47c31fe886 --- /dev/null +++ b/solon-plugins/wx-java-store-multi-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/properties/WxStoreSingleProperties.java @@ -0,0 +1,43 @@ +package com.binarywang.solon.wxjava.store.properties; + +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * 微信小店相关配置属性 + * + * @author Winnie + * @date 2024/9/13 + */ +@Data +@NoArgsConstructor +public class WxStoreSingleProperties implements Serializable { + private static final long serialVersionUID = 5306630351265124825L; + + /** + * 设置微信小店的 appid. + */ + private String appId; + + /** + * 设置微信小店的 secret. + */ + private String secret; + + /** + * 设置微信小店的 token. + */ + private String token; + + /** + * 设置微信小店的 EncodingAESKey. + */ + private String aesKey; + + /** + * 是否使用稳定版 Access Token + */ + private boolean useStableAccessToken = false; +} diff --git a/solon-plugins/wx-java-store-multi-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/service/WxStoreMultiServices.java b/solon-plugins/wx-java-store-multi-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/service/WxStoreMultiServices.java new file mode 100644 index 0000000000..f059819909 --- /dev/null +++ b/solon-plugins/wx-java-store-multi-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/service/WxStoreMultiServices.java @@ -0,0 +1,26 @@ +package com.binarywang.solon.wxjava.store.service; + +import com.binarywang.wxjava.store.api.WxStoreService; + +/** + * 视频号 {@link WxStoreService} 所有实例存放类. + * + * @author Winnie + * @date 2024/9/13 + */ +public interface WxStoreMultiServices { + /** + * 通过租户 Id 获取 WxStoreService + * + * @param tenantId 租户 Id + * @return WxStoreService + */ + WxStoreService getWxStoreService(String tenantId); + + /** + * 根据租户 Id,从列表中移除一个 WxStoreService 实例 + * + * @param tenantId 租户 Id + */ + void removeWxStoreService(String tenantId); +} diff --git a/solon-plugins/wx-java-store-multi-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/service/WxStoreMultiServicesImpl.java b/solon-plugins/wx-java-store-multi-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/service/WxStoreMultiServicesImpl.java new file mode 100644 index 0000000000..daa6cb1305 --- /dev/null +++ b/solon-plugins/wx-java-store-multi-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/service/WxStoreMultiServicesImpl.java @@ -0,0 +1,36 @@ +package com.binarywang.solon.wxjava.store.service; + +import com.binarywang.wxjava.store.api.WxStoreService; + +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + +/** + * 视频号 {@link WxStoreMultiServices} 实现 + * + * @author Winnie + * @date 2024/9/13 + */ +public class WxStoreMultiServicesImpl implements WxStoreMultiServices { + private final Map services = new ConcurrentHashMap<>(); + + @Override + public WxStoreService getWxStoreService(String tenantId) { + return this.services.get(tenantId); + } + + /** + * 根据租户 Id,添加一个 WxStoreService 到列表 + * + * @param tenantId 租户 Id + * @param wxStoreService WxStoreService 实例 + */ + public void addWxStoreService(String tenantId, WxStoreService wxStoreService) { + this.services.put(tenantId, wxStoreService); + } + + @Override + public void removeWxStoreService(String tenantId) { + this.services.remove(tenantId); + } +} diff --git a/solon-plugins/wx-java-store-multi-solon-plugin/src/main/resources/META-INF/solon/wx-java-multi-store-solon-plugin.properties b/solon-plugins/wx-java-store-multi-solon-plugin/src/main/resources/META-INF/solon/wx-java-multi-store-solon-plugin.properties new file mode 100644 index 0000000000..bee1c44b01 --- /dev/null +++ b/solon-plugins/wx-java-store-multi-solon-plugin/src/main/resources/META-INF/solon/wx-java-multi-store-solon-plugin.properties @@ -0,0 +1,2 @@ +solon.plugin=com.binarywang.solon.wxjava.store.integration.WxStoreMultiPluginImpl +solon.plugin.priority=10 diff --git a/solon-plugins/wx-java-store-multi-solon-plugin/src/test/java/features/test/LoadTest.java b/solon-plugins/wx-java-store-multi-solon-plugin/src/test/java/features/test/LoadTest.java new file mode 100644 index 0000000000..d049f5a51a --- /dev/null +++ b/solon-plugins/wx-java-store-multi-solon-plugin/src/test/java/features/test/LoadTest.java @@ -0,0 +1,15 @@ +package features.test; + +import org.junit.jupiter.api.Test; +import org.noear.solon.test.SolonTest; + +/** + * @author noear 2024/9/4 created + */ +@SolonTest +public class LoadTest { + @Test + public void load(){ + + } +} diff --git a/solon-plugins/wx-java-store-multi-solon-plugin/src/test/resources/app.properties b/solon-plugins/wx-java-store-multi-solon-plugin/src/test/resources/app.properties new file mode 100644 index 0000000000..f55dafd6db --- /dev/null +++ b/solon-plugins/wx-java-store-multi-solon-plugin/src/test/resources/app.properties @@ -0,0 +1,36 @@ +# 视频号配置 +## 应用 1 配置(必填) +wx.store.apps.tenantId1.app-id=appId +wx.store.apps.tenantId1.secret=secret +## 选填 +wx.store.apps.tenantId1.use-stable-access-token=false +wx.store.apps.tenantId1.token= +wx.store.apps.tenantId1.aes-key= +## 应用 2 配置(必填) +wx.store.apps.tenantId2.app-id=@appId +wx.store.apps.tenantId2.secret=@secret +## 选填 +wx.store.apps.tenantId2.use-stable-access-token=false +wx.store.apps.tenantId2.token= +wx.store.apps.tenantId2.aes-key= + +# ConfigStorage 配置(选填) +## 配置类型: memory(默认), jedis, redisson, redis_template +wx.store.config-storage.type=memory +## 相关redis前缀配置: wx:store:multi(默认) +wx.store.config-storage.key-prefix=wx:store:multi +wx.store.config-storage.redis.host=127.0.0.1 +wx.store.config-storage.redis.port=6379 +wx.store.config-storage.redis.password=123456 + +# http 客户端配置(选填) +## # http客户端类型: http_client(默认) +wx.store.config-storage.http-client-type=http_client +wx.store.config-storage.http-proxy-host= +wx.store.config-storage.http-proxy-port= +wx.store.config-storage.http-proxy-username= +wx.store.config-storage.http-proxy-password= +## 最大重试次数,默认:5 次,如果小于 0,则为 0 +wx.store.config-storage.max-retry-times=5 +## 重试时间间隔步进,默认:1000 毫秒,如果小于 0,则为 1000 +wx.store.config-storage.retry-sleep-millis=1000 diff --git a/solon-plugins/wx-java-store-solon-plugin/README.md b/solon-plugins/wx-java-store-solon-plugin/README.md new file mode 100644 index 0000000000..c321c9274b --- /dev/null +++ b/solon-plugins/wx-java-store-solon-plugin/README.md @@ -0,0 +1,91 @@ +# wx-java-store-solon-plugin + +## 快速开始 +1. 引入依赖 + ```xml + + + com.github.binarywang + wx-java-store-solon-plugin + ${version} + + + + + redis.clients + jedis + ${jedis.version} + + + + + org.redisson + redisson + ${redisson.version} + + + ``` +2. 添加配置(app.properties) + ```properties + # 视频号配置(必填) + ## 微信小店的appId和secret + wx.store.app-id=@appId + wx.store.secret=@secret + # 视频号配置 选填 + ## 设置微信小店消息服务器配置的token + wx.store.token=@token + ## 设置微信小店消息服务器配置的EncodingAESKey + wx.store.aes-key= + ## 支持JSON或者XML格式,默认JSON + wx.store.msg-data-format=JSON + ## 是否使用稳定版 Access Token + wx.store.use-stable-access-token=false + + + # ConfigStorage 配置(选填) + ## 配置类型: memory(默认), jedis, redisson, redis_template + wx.store.config-storage.type=memory + ## 相关redis前缀配置: wx:store(默认) + wx.store.config-storage.key-prefix=wx:store + wx.store.config-storage.redis.host=127.0.0.1 + wx.store.config-storage.redis.port=6379 + wx.store.config-storage.redis.password=123456 + + + # http 客户端配置(选填) + ## # http客户端类型: http_client(默认) + wx.store.config-storage.http-client-type=http_client + wx.store.config-storage.http-proxy-host= + wx.store.config-storage.http-proxy-port= + wx.store.config-storage.http-proxy-username= + wx.store.config-storage.http-proxy-password= + ## 最大重试次数,默认:5 次,如果小于 0,则为 0 + wx.store.config-storage.max-retry-times=5 + ## 重试时间间隔步进,默认:1000 毫秒,如果小于 0,则为 1000 + wx.store.config-storage.retry-sleep-millis=1000 + ``` +3. 自动注入的类型 +- `WxStoreService` +- `WxStoreConfig` +4. 使用样例 + +```java +import com.binarywang.wxjava.store.api.WxStoreService; +import com.binarywang.wxjava.store.bean.shop.ShopInfoResponse; +import com.binarywang.wxjava.store.util.JsonUtils; +import me.chanjar.weixin.common.error.WxErrorException; +import org.noear.solon.annotation.Inject; + +@Component +public class DemoService { + @Inject + private WxStoreService wxStoreService; + + public String getShopInfo() throws WxErrorException { + // 获取店铺基本信息 + ShopInfoResponse response = wxStoreService.getBasicService().getShopInfo(); + // 此处为演示,如果要返回response的结果,建议自己封装一个VO,避免直接返回response + return JsonUtils.encode(response); + } +} +``` diff --git a/solon-plugins/wx-java-store-solon-plugin/pom.xml b/solon-plugins/wx-java-store-solon-plugin/pom.xml new file mode 100644 index 0000000000..d516f29789 --- /dev/null +++ b/solon-plugins/wx-java-store-solon-plugin/pom.xml @@ -0,0 +1,31 @@ + + + wx-java-solon-plugins + com.github.binarywang + 4.8.6.B + + 4.0.0 + + wx-java-store-solon-plugin + WxJava - Solon Plugin for Store + 微信小店开发的 Solon Plugin + + + + com.github.binarywang + weixin-java-store + ${project.version} + + + redis.clients + jedis + provided + + + org.redisson + redisson + provided + + + diff --git a/solon-plugins/wx-java-store-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/config/WxStoreServiceAutoConfiguration.java b/solon-plugins/wx-java-store-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/config/WxStoreServiceAutoConfiguration.java new file mode 100644 index 0000000000..69639a8dca --- /dev/null +++ b/solon-plugins/wx-java-store-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/config/WxStoreServiceAutoConfiguration.java @@ -0,0 +1,39 @@ +package com.binarywang.solon.wxjava.store.config; + + +import com.binarywang.solon.wxjava.store.properties.WxStoreProperties; +import com.binarywang.solon.wxjava.store.enums.HttpClientType; +import lombok.AllArgsConstructor; +import com.binarywang.wxjava.store.api.WxStoreService; +import com.binarywang.wxjava.store.api.impl.WxStoreServiceHttpClientImpl; +import com.binarywang.wxjava.store.api.impl.WxStoreServiceHttpComponentsImpl; +import com.binarywang.wxjava.store.config.WxStoreConfig; +import org.noear.solon.annotation.Bean; +import org.noear.solon.annotation.Condition; +import org.noear.solon.annotation.Configuration; + +/** + * 微信小程序平台相关服务自动注册 + * + * @author Zeyes + */ +@Configuration +@AllArgsConstructor +public class WxStoreServiceAutoConfiguration { + private final WxStoreProperties properties; + + /** + * Store Service + * + * @return Store Service + */ + @Bean + @Condition(onMissingBean=WxStoreService.class, onBean = WxStoreConfig.class) + public WxStoreService wxStoreService(WxStoreConfig wxStoreConfig) { + HttpClientType httpClientType = properties.getConfigStorage().getHttpClientType(); + WxStoreService wxStoreService = httpClientType == HttpClientType.HttpClient + ? new WxStoreServiceHttpClientImpl() : new WxStoreServiceHttpComponentsImpl(); + wxStoreService.setConfig(wxStoreConfig); + return wxStoreService; + } +} diff --git a/solon-plugins/wx-java-store-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/config/storage/AbstractWxStoreConfigStorageConfiguration.java b/solon-plugins/wx-java-store-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/config/storage/AbstractWxStoreConfigStorageConfiguration.java new file mode 100644 index 0000000000..aed018d72a --- /dev/null +++ b/solon-plugins/wx-java-store-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/config/storage/AbstractWxStoreConfigStorageConfiguration.java @@ -0,0 +1,40 @@ +package com.binarywang.solon.wxjava.store.config.storage; + +import com.binarywang.solon.wxjava.store.properties.WxStoreProperties; +import com.binarywang.wxjava.store.config.impl.WxStoreDefaultConfigImpl; +import org.apache.commons.lang3.StringUtils; + +/** + * @author Zeyes + */ +public abstract class AbstractWxStoreConfigStorageConfiguration { + + protected WxStoreDefaultConfigImpl config(WxStoreDefaultConfigImpl config, WxStoreProperties properties) { + config.setAppid(StringUtils.trimToNull(properties.getAppid())); + config.setSecret(StringUtils.trimToNull(properties.getSecret())); + config.setToken(StringUtils.trimToNull(properties.getToken())); + config.setAesKey(StringUtils.trimToNull(properties.getAesKey())); + config.setMsgDataFormat(StringUtils.trimToNull(properties.getMsgDataFormat())); + config.setStableAccessToken(properties.isUseStableAccessToken()); + + WxStoreProperties.ConfigStorage configStorageProperties = properties.getConfigStorage(); + config.setHttpProxyHost(configStorageProperties.getHttpProxyHost()); + config.setHttpProxyUsername(configStorageProperties.getHttpProxyUsername()); + config.setHttpProxyPassword(configStorageProperties.getHttpProxyPassword()); + if (configStorageProperties.getHttpProxyPort() != null) { + config.setHttpProxyPort(configStorageProperties.getHttpProxyPort()); + } + + int maxRetryTimes = configStorageProperties.getMaxRetryTimes(); + if (configStorageProperties.getMaxRetryTimes() < 0) { + maxRetryTimes = 0; + } + int retrySleepMillis = configStorageProperties.getRetrySleepMillis(); + if (retrySleepMillis < 0) { + retrySleepMillis = 1000; + } + config.setRetrySleepMillis(retrySleepMillis); + config.setMaxRetryTimes(maxRetryTimes); + return config; + } +} diff --git a/solon-plugins/wx-java-store-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/config/storage/WxStoreInJedisConfigStorageConfiguration.java b/solon-plugins/wx-java-store-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/config/storage/WxStoreInJedisConfigStorageConfiguration.java new file mode 100644 index 0000000000..054dd54bdd --- /dev/null +++ b/solon-plugins/wx-java-store-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/config/storage/WxStoreInJedisConfigStorageConfiguration.java @@ -0,0 +1,74 @@ +package com.binarywang.solon.wxjava.store.config.storage; + + +import com.binarywang.solon.wxjava.store.properties.RedisProperties; +import com.binarywang.solon.wxjava.store.properties.WxStoreProperties; +import lombok.RequiredArgsConstructor; +import com.binarywang.wxjava.store.config.WxStoreConfig; +import com.binarywang.wxjava.store.config.impl.WxStoreRedisConfigImpl; +import me.chanjar.weixin.common.redis.JedisWxRedisOps; +import me.chanjar.weixin.common.redis.WxRedisOps; +import org.apache.commons.lang3.StringUtils; +import org.noear.solon.annotation.Bean; +import org.noear.solon.annotation.Condition; +import org.noear.solon.annotation.Configuration; +import org.noear.solon.core.AppContext; +import redis.clients.jedis.JedisPool; +import redis.clients.jedis.JedisPoolConfig; + +/** + * @author Zeyes + * @author noear + */ +@Configuration +@Condition( + onProperty = "${"+WxStoreProperties.PREFIX + ".configStorage.type} = jedis", + onClass = JedisPool.class +) +@RequiredArgsConstructor +public class WxStoreInJedisConfigStorageConfiguration extends AbstractWxStoreConfigStorageConfiguration { + private final WxStoreProperties properties; + private final AppContext applicationContext; + + @Bean + @Condition(onMissingBean=WxStoreConfig.class) + public WxStoreConfig wxStoreConfig() { + WxStoreRedisConfigImpl config = getWxStoreRedisConfig(); + return this.config(config, properties); + } + + private WxStoreRedisConfigImpl getWxStoreRedisConfig() { + RedisProperties redisProperties = properties.getConfigStorage().getRedis(); + JedisPool jedisPool; + if (redisProperties != null && StringUtils.isNotEmpty(redisProperties.getHost())) { + jedisPool = getJedisPool(); + } else { + jedisPool = applicationContext.getBean(JedisPool.class); + } + WxRedisOps redisOps = new JedisWxRedisOps(jedisPool); + return new WxStoreRedisConfigImpl(redisOps, properties.getConfigStorage().getKeyPrefix()); + } + + private JedisPool getJedisPool() { + WxStoreProperties.ConfigStorage storage = properties.getConfigStorage(); + RedisProperties redis = storage.getRedis(); + + JedisPoolConfig config = new JedisPoolConfig(); + if (redis.getMaxActive() != null) { + config.setMaxTotal(redis.getMaxActive()); + } + if (redis.getMaxIdle() != null) { + config.setMaxIdle(redis.getMaxIdle()); + } + if (redis.getMaxWaitMillis() != null) { + config.setMaxWaitMillis(redis.getMaxWaitMillis()); + } + if (redis.getMinIdle() != null) { + config.setMinIdle(redis.getMinIdle()); + } + config.setTestOnBorrow(true); + config.setTestWhileIdle(true); + + return new JedisPool(config, redis.getHost(), redis.getPort(), redis.getTimeout(), redis.getPassword(), redis.getDatabase()); + } +} diff --git a/solon-plugins/wx-java-store-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/config/storage/WxStoreInMemoryConfigStorageConfiguration.java b/solon-plugins/wx-java-store-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/config/storage/WxStoreInMemoryConfigStorageConfiguration.java new file mode 100644 index 0000000000..eaf95f213f --- /dev/null +++ b/solon-plugins/wx-java-store-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/config/storage/WxStoreInMemoryConfigStorageConfiguration.java @@ -0,0 +1,29 @@ +package com.binarywang.solon.wxjava.store.config.storage; + + +import com.binarywang.solon.wxjava.store.properties.WxStoreProperties; +import lombok.RequiredArgsConstructor; +import com.binarywang.wxjava.store.config.WxStoreConfig; +import com.binarywang.wxjava.store.config.impl.WxStoreDefaultConfigImpl; +import org.noear.solon.annotation.Bean; +import org.noear.solon.annotation.Condition; +import org.noear.solon.annotation.Configuration; + +/** + * @author Zeyes + */ +@Configuration +@Condition( + onProperty = "${"+WxStoreProperties.PREFIX + ".configStorage.type:memory} = memory" +) +@RequiredArgsConstructor +public class WxStoreInMemoryConfigStorageConfiguration extends AbstractWxStoreConfigStorageConfiguration { + private final WxStoreProperties properties; + + @Bean + @Condition(onMissingBean = WxStoreConfig.class) + public WxStoreConfig wxStoreConfig() { + WxStoreDefaultConfigImpl config = new WxStoreDefaultConfigImpl(); + return this.config(config, properties); + } +} diff --git a/solon-plugins/wx-java-store-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/config/storage/WxStoreInRedissonConfigStorageConfiguration.java b/solon-plugins/wx-java-store-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/config/storage/WxStoreInRedissonConfigStorageConfiguration.java new file mode 100644 index 0000000000..2558aafa8a --- /dev/null +++ b/solon-plugins/wx-java-store-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/config/storage/WxStoreInRedissonConfigStorageConfiguration.java @@ -0,0 +1,62 @@ +package com.binarywang.solon.wxjava.store.config.storage; + + +import com.binarywang.solon.wxjava.store.properties.RedisProperties; +import com.binarywang.solon.wxjava.store.properties.WxStoreProperties; +import lombok.RequiredArgsConstructor; +import com.binarywang.wxjava.store.config.WxStoreConfig; +import com.binarywang.wxjava.store.config.impl.WxStoreRedissonConfigImpl; +import org.apache.commons.lang3.StringUtils; +import org.noear.solon.annotation.Bean; +import org.noear.solon.annotation.Condition; +import org.noear.solon.annotation.Configuration; +import org.noear.solon.core.AppContext; +import org.redisson.Redisson; +import org.redisson.api.RedissonClient; +import org.redisson.config.Config; +import org.redisson.config.TransportMode; + +/** + * @author Zeyes + */ +@Configuration +@Condition( + onProperty = "${"+WxStoreProperties.PREFIX + ".configStorage.type} = redisson", + onClass = Redisson.class +) +@RequiredArgsConstructor +public class WxStoreInRedissonConfigStorageConfiguration extends AbstractWxStoreConfigStorageConfiguration { + private final WxStoreProperties properties; + private final AppContext applicationContext; + + @Bean + @Condition(onMissingBean=WxStoreConfig.class) + public WxStoreConfig wxStoreConfig() { + WxStoreRedissonConfigImpl config = getWxStoreRedissonConfig(); + return this.config(config, properties); + } + + private WxStoreRedissonConfigImpl getWxStoreRedissonConfig() { + RedisProperties redisProperties = properties.getConfigStorage().getRedis(); + RedissonClient redissonClient; + if (redisProperties != null && StringUtils.isNotEmpty(redisProperties.getHost())) { + redissonClient = getRedissonClient(); + } else { + redissonClient = applicationContext.getBean(RedissonClient.class); + } + return new WxStoreRedissonConfigImpl(redissonClient, properties.getConfigStorage().getKeyPrefix()); + } + + private RedissonClient getRedissonClient() { + WxStoreProperties.ConfigStorage storage = properties.getConfigStorage(); + RedisProperties redis = storage.getRedis(); + + Config config = new Config(); + config.useSingleServer() + .setAddress("redis://" + redis.getHost() + ":" + redis.getPort()) + .setDatabase(redis.getDatabase()) + .setPassword(redis.getPassword()); + config.setTransportMode(TransportMode.NIO); + return Redisson.create(config); + } +} diff --git a/solon-plugins/wx-java-store-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/enums/HttpClientType.java b/solon-plugins/wx-java-store-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/enums/HttpClientType.java new file mode 100644 index 0000000000..7a5975a37a --- /dev/null +++ b/solon-plugins/wx-java-store-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/enums/HttpClientType.java @@ -0,0 +1,17 @@ +package com.binarywang.solon.wxjava.store.enums; + +/** + * httpclient类型 + * + * @author Zeyes + */ +public enum HttpClientType { + /** + * HttpClient. + */ + HttpClient, + /** + * HttpComponents. + */ + HttpComponents, +} diff --git a/solon-plugins/wx-java-store-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/enums/StorageType.java b/solon-plugins/wx-java-store-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/enums/StorageType.java new file mode 100644 index 0000000000..658f8279d9 --- /dev/null +++ b/solon-plugins/wx-java-store-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/enums/StorageType.java @@ -0,0 +1,25 @@ +package com.binarywang.solon.wxjava.store.enums; + +/** + * storage类型 + * + * @author Zeyes + */ +public enum StorageType { + /** + * 内存 + */ + Memory, + /** + * redis(JedisClient) + */ + Jedis, + /** + * redis(Redisson) + */ + Redisson, + /** + * redis(RedisTemplate) + */ + RedisTemplate +} diff --git a/solon-plugins/wx-java-store-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/integration/WxStorePluginImpl.java b/solon-plugins/wx-java-store-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/integration/WxStorePluginImpl.java new file mode 100644 index 0000000000..f8dbb12c39 --- /dev/null +++ b/solon-plugins/wx-java-store-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/integration/WxStorePluginImpl.java @@ -0,0 +1,25 @@ +package com.binarywang.solon.wxjava.store.integration; + + +import com.binarywang.solon.wxjava.store.config.WxStoreServiceAutoConfiguration; +import com.binarywang.solon.wxjava.store.config.storage.WxStoreInJedisConfigStorageConfiguration; +import com.binarywang.solon.wxjava.store.config.storage.WxStoreInMemoryConfigStorageConfiguration; +import com.binarywang.solon.wxjava.store.config.storage.WxStoreInRedissonConfigStorageConfiguration; +import com.binarywang.solon.wxjava.store.properties.WxStoreProperties; +import org.noear.solon.core.AppContext; +import org.noear.solon.core.Plugin; + +/** + * @author noear 2024/9/2 created + */ +public class WxStorePluginImpl implements Plugin { + @Override + public void start(AppContext context) throws Throwable { + context.beanMake(WxStoreProperties.class); + context.beanMake(WxStoreServiceAutoConfiguration.class); + + context.beanMake(WxStoreInMemoryConfigStorageConfiguration.class); + context.beanMake(WxStoreInJedisConfigStorageConfiguration.class); + context.beanMake(WxStoreInRedissonConfigStorageConfiguration.class); + } +} diff --git a/solon-plugins/wx-java-store-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/properties/RedisProperties.java b/solon-plugins/wx-java-store-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/properties/RedisProperties.java new file mode 100644 index 0000000000..5379b1ec26 --- /dev/null +++ b/solon-plugins/wx-java-store-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/properties/RedisProperties.java @@ -0,0 +1,42 @@ +package com.binarywang.solon.wxjava.store.properties; + +import lombok.Data; + +/** + * redis 配置 + * + * @author Zeyes + */ +@Data +public class RedisProperties { + + /** + * 主机地址,不填则从solon容器内获取JedisPool + */ + private String host; + + /** + * 端口号 + */ + private int port = 6379; + + /** + * 密码 + */ + private String password; + + /** + * 超时 + */ + private int timeout = 2000; + + /** + * 数据库 + */ + private int database = 0; + + private Integer maxActive; + private Integer maxIdle; + private Integer maxWaitMillis; + private Integer minIdle; +} diff --git a/solon-plugins/wx-java-store-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/properties/WxStoreProperties.java b/solon-plugins/wx-java-store-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/properties/WxStoreProperties.java new file mode 100644 index 0000000000..3575b3ac9f --- /dev/null +++ b/solon-plugins/wx-java-store-solon-plugin/src/main/java/com/binarywang/solon/wxjava/store/properties/WxStoreProperties.java @@ -0,0 +1,114 @@ +package com.binarywang.solon.wxjava.store.properties; + +import com.binarywang.solon.wxjava.store.enums.HttpClientType; +import com.binarywang.solon.wxjava.store.enums.StorageType; +import lombok.Data; +import org.noear.solon.annotation.Configuration; +import org.noear.solon.annotation.Inject; + +/** + * 属性配置类 + * + * @author Zeyes + */ +@Data +@Configuration +@Inject("${" + WxStoreProperties.PREFIX +"}") +public class WxStoreProperties { + public static final String PREFIX = "wx.store"; + + /** + * 设置微信小店的appid + */ + private String appid; + + /** + * 设置微信小店的Secret + */ + private String secret; + + /** + * 设置微信小店消息服务器配置的token. + */ + private String token; + + /** + * 设置微信小店消息服务器配置的EncodingAESKey + */ + private String aesKey; + + /** + * 消息格式,XML或者JSON + */ + private String msgDataFormat = "JSON"; + + /** + * 是否使用稳定版 Access Token + */ + private boolean useStableAccessToken = false; + + /** + * 存储策略 + */ + private final ConfigStorage configStorage = new ConfigStorage(); + + @Data + public static class ConfigStorage { + + /** + * 存储类型 + */ + private StorageType type = StorageType.Memory; + + /** + * 指定key前缀 + */ + private String keyPrefix = "wh"; + + /** + * redis连接配置 + */ + private final RedisProperties redis = new RedisProperties(); + + /** + * http客户端类型 + */ + private HttpClientType httpClientType = HttpClientType.HttpComponents; + + /** + * http代理主机 + */ + private String httpProxyHost; + + /** + * http代理端口 + */ + private Integer httpProxyPort; + + /** + * http代理用户名 + */ + private String httpProxyUsername; + + /** + * http代理密码 + */ + private String httpProxyPassword; + + /** + * http 请求重试间隔 + *
+     *   {@link com.binarywang.wxjava.store.api.BaseWxStoreService#setRetrySleepMillis(int)}
+     * 
+ */ + private int retrySleepMillis = 1000; + /** + * http 请求最大重试次数 + *
+     *   {@link com.binarywang.wxjava.store.api.BaseWxStoreService#setMaxRetryTimes(int)}
+     * 
+ */ + private int maxRetryTimes = 5; + } + +} diff --git a/solon-plugins/wx-java-store-solon-plugin/src/main/resources/META-INF/solon/wx-java-store-solon-plugin.properties b/solon-plugins/wx-java-store-solon-plugin/src/main/resources/META-INF/solon/wx-java-store-solon-plugin.properties new file mode 100644 index 0000000000..fd2f516d62 --- /dev/null +++ b/solon-plugins/wx-java-store-solon-plugin/src/main/resources/META-INF/solon/wx-java-store-solon-plugin.properties @@ -0,0 +1,2 @@ +solon.plugin=com.binarywang.solon.wxjava.store.integration.WxStorePluginImpl +solon.plugin.priority=10 diff --git a/solon-plugins/wx-java-store-solon-plugin/src/test/java/features/test/LoadTest.java b/solon-plugins/wx-java-store-solon-plugin/src/test/java/features/test/LoadTest.java new file mode 100644 index 0000000000..d049f5a51a --- /dev/null +++ b/solon-plugins/wx-java-store-solon-plugin/src/test/java/features/test/LoadTest.java @@ -0,0 +1,15 @@ +package features.test; + +import org.junit.jupiter.api.Test; +import org.noear.solon.test.SolonTest; + +/** + * @author noear 2024/9/4 created + */ +@SolonTest +public class LoadTest { + @Test + public void load(){ + + } +} diff --git a/solon-plugins/wx-java-store-solon-plugin/src/test/resources/app.yml b/solon-plugins/wx-java-store-solon-plugin/src/test/resources/app.yml new file mode 100644 index 0000000000..e69de29bb2 diff --git a/spring-boot-starters/pom.xml b/spring-boot-starters/pom.xml index 06e8fe4267..24c45074bb 100644 --- a/spring-boot-starters/pom.xml +++ b/spring-boot-starters/pom.xml @@ -32,6 +32,8 @@ wx-java-cp-spring-boot-starter wx-java-channel-spring-boot-starter wx-java-channel-multi-spring-boot-starter + wx-java-store-spring-boot-starter + wx-java-store-multi-spring-boot-starter diff --git a/spring-boot-starters/wx-java-store-multi-spring-boot-starter/README.md b/spring-boot-starters/wx-java-store-multi-spring-boot-starter/README.md new file mode 100644 index 0000000000..ecbe645a7b --- /dev/null +++ b/spring-boot-starters/wx-java-store-multi-spring-boot-starter/README.md @@ -0,0 +1,123 @@ +# wx-java-store-multi-spring-boot-starter + +## 快速开始 + +1. 引入依赖 + ```xml + + + com.github.binarywang + wx-java-store-multi-spring-boot-starter + ${version} + + + + + redis.clients + jedis + ${jedis.version} + + + + + org.redisson + redisson + ${redisson.version} + + + + + org.springframework.boot + spring-boot-starter-data-redis + + + ``` +2. 添加配置(application.properties) + ```properties + # 视频号配置 + ## 应用 1 配置(必填) + wx.store.apps.tenantId1.app-id=@appId + wx.store.apps.tenantId1.secret=@secret + ## 选填 + wx.store.apps.tenantId1.use-stable-access-token=false + wx.store.apps.tenantId1.token= + wx.store.apps.tenantId1.aes-key= + ## 应用 2 配置(必填) + wx.store.apps.tenantId2.app-id=@appId + wx.store.apps.tenantId2.secret=@secret + ## 选填 + wx.store.apps.tenantId2.use-stable-access-token=false + wx.store.apps.tenantId2.token= + wx.store.apps.tenantId2.aes-key= + + # ConfigStorage 配置(选填) + ## 配置类型: memory(默认), jedis, redisson, redis_template + wx.store.config-storage.type=memory + ## 相关redis前缀配置: wx:store:multi(默认) + wx.store.config-storage.key-prefix=wx:store:multi + wx.store.config-storage.redis.host=127.0.0.1 + wx.store.config-storage.redis.port=6379 + wx.store.config-storage.redis.password=123456 + + # redis_template 方式使用spring data redis配置 + spring.data.redis.database=0 + spring.data.redis.host=127.0.0.1 + spring.data.redis.password=123456 + spring.data.redis.port=6379 + + # http 客户端配置(选填) + ## # http客户端类型: http_client(默认) + wx.store.config-storage.http-client-type=http_client + wx.store.config-storage.http-proxy-host= + wx.store.config-storage.http-proxy-port= + wx.store.config-storage.http-proxy-username= + wx.store.config-storage.http-proxy-password= + ## 最大重试次数,默认:5 次,如果小于 0,则为 0 + wx.store.config-storage.max-retry-times=5 + ## 重试时间间隔步进,默认:1000 毫秒,如果小于 0,则为 1000 + wx.store.config-storage.retry-sleep-millis=1000 + ``` +3. 自动注入的类型:`WxStoreMultiServices` + +4. 使用样例 + + ```java + import com.binarywang.spring.starter.wxjava.store.service.WxStoreMultiServices; + import com.binarywang.wxjava.store.api.WxStoreService; + import com.binarywang.wxjava.store.api.WxFinderLiveService; + import com.binarywang.wxjava.store.bean.lead.component.response.FinderAttrResponse; + import me.chanjar.weixin.common.error.WxErrorException; + import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.stereotype.Service; + + @Service + public class DemoService { + @Autowired + private WxStoreMultiServices wxStoreMultiServices; + + public void test() throws WxErrorException { + // 应用 1 的 WxStoreService + WxStoreService wxStoreService1 = wxStoreMultiServices.getWxStoreService("tenantId1"); + WxFinderLiveService finderLiveService = wxStoreService1.getFinderLiveService(); + FinderAttrResponse response1 = finderLiveService.getFinderAttrByAppid(); + // todo ... + + // 应用 2 的 WxStoreService + WxStoreService wxStoreService2 = wxStoreMultiServices.getWxStoreService("tenantId2"); + WxFinderLiveService finderLiveService2 = wxStoreService2.getFinderLiveService(); + FinderAttrResponse response2 = finderLiveService2.getFinderAttrByAppid(); + // todo ... + + // 应用 3 的 WxStoreService + WxStoreService wxStoreService3 = wxStoreMultiServices.getWxStoreService("tenantId3"); + // 判断是否为空 + if (wxStoreService3 == null) { + // todo wxStoreService3 为空,请先配置 tenantId3 微信小店应用参数 + return; + } + WxFinderLiveService finderLiveService3 = wxStoreService3.getFinderLiveService(); + FinderAttrResponse response3 = finderLiveService3.getFinderAttrByAppid(); + // todo ... + } + } + ``` diff --git a/spring-boot-starters/wx-java-store-multi-spring-boot-starter/pom.xml b/spring-boot-starters/wx-java-store-multi-spring-boot-starter/pom.xml new file mode 100644 index 0000000000..157073c876 --- /dev/null +++ b/spring-boot-starters/wx-java-store-multi-spring-boot-starter/pom.xml @@ -0,0 +1,73 @@ + + + + wx-java-spring-boot-starters + com.github.binarywang + 4.8.6.B + + 4.0.0 + + wx-java-store-multi-spring-boot-starter + WxJava - Spring Boot Starter for Store::支持多账号配置 + 微信小店开发的 Spring Boot Starter::支持多账号配置 + + + + com.github.binarywang + weixin-java-store + ${project.version} + + + redis.clients + jedis + provided + + + org.redisson + redisson + provided + + + org.springframework.data + spring-data-redis + ${spring-data-redis.version} + true + provided + + + org.jodd + jodd-http + provided + + + com.squareup.okhttp3 + okhttp + provided + + + + + + + org.springframework.boot + spring-boot-maven-plugin + ${spring.boot.version} + + + org.apache.maven.plugins + maven-source-plugin + 2.2.1 + + + attach-sources + + jar-no-fork + + + + + + + diff --git a/spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/autoconfigure/WxStoreMultiAutoConfiguration.java b/spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/autoconfigure/WxStoreMultiAutoConfiguration.java new file mode 100644 index 0000000000..72b51c6cef --- /dev/null +++ b/spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/autoconfigure/WxStoreMultiAutoConfiguration.java @@ -0,0 +1,15 @@ +package com.binarywang.spring.starter.wxjava.store.autoconfigure; + +import com.binarywang.spring.starter.wxjava.store.configuration.WxStoreMultiServiceConfiguration; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Import; + +/** + * 微信小店自动注册 + * + * @author Winnie + * @date 2024/9/13 + */ +@Configuration +@Import(WxStoreMultiServiceConfiguration.class) +public class WxStoreMultiAutoConfiguration {} diff --git a/spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/configuration/WxStoreMultiServiceConfiguration.java b/spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/configuration/WxStoreMultiServiceConfiguration.java new file mode 100644 index 0000000000..1a0dfd492a --- /dev/null +++ b/spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/configuration/WxStoreMultiServiceConfiguration.java @@ -0,0 +1,21 @@ +package com.binarywang.spring.starter.wxjava.store.configuration; + +import com.binarywang.spring.starter.wxjava.store.configuration.services.WxStoreInJedisConfiguration; +import com.binarywang.spring.starter.wxjava.store.configuration.services.WxStoreInMemoryConfiguration; +import com.binarywang.spring.starter.wxjava.store.configuration.services.WxStoreInRedisTemplateConfiguration; +import com.binarywang.spring.starter.wxjava.store.configuration.services.WxStoreInRedissonConfiguration; +import com.binarywang.spring.starter.wxjava.store.properties.WxStoreMultiProperties; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Import; + +/** + * 微信小店相关服务自动注册 + * + * @author Winnie + * @date 2024/9/13 + */ +@Configuration +@EnableConfigurationProperties(WxStoreMultiProperties.class) +@Import({WxStoreInJedisConfiguration.class, WxStoreInMemoryConfiguration.class, WxStoreInRedissonConfiguration.class, WxStoreInRedisTemplateConfiguration.class}) +public class WxStoreMultiServiceConfiguration {} diff --git a/spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/configuration/services/AbstractWxStoreConfiguration.java b/spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/configuration/services/AbstractWxStoreConfiguration.java new file mode 100644 index 0000000000..d082348e9f --- /dev/null +++ b/spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/configuration/services/AbstractWxStoreConfiguration.java @@ -0,0 +1,148 @@ +package com.binarywang.spring.starter.wxjava.store.configuration.services; + +import com.binarywang.spring.starter.wxjava.store.enums.HttpClientType; +import com.binarywang.spring.starter.wxjava.store.properties.WxStoreMultiProperties; +import com.binarywang.spring.starter.wxjava.store.properties.WxStoreSingleProperties; +import com.binarywang.spring.starter.wxjava.store.service.WxStoreMultiServices; +import com.binarywang.spring.starter.wxjava.store.service.WxStoreMultiServicesImpl; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import com.binarywang.wxjava.store.api.WxStoreService; +import com.binarywang.wxjava.store.api.impl.WxStoreServiceHttpClientImpl; +import com.binarywang.wxjava.store.api.impl.WxStoreServiceHttpComponentsImpl; +import com.binarywang.wxjava.store.api.impl.WxStoreServiceImpl; +import com.binarywang.wxjava.store.config.WxStoreConfig; +import com.binarywang.wxjava.store.config.impl.WxStoreDefaultConfigImpl; +import org.apache.commons.lang3.StringUtils; + +import java.util.Collection; +import java.util.Map; +import java.util.Set; +import java.util.stream.Collectors; + +/** + * WxStoreConfigStorage 抽象配置类 + * + * @author Winnie + * @date 2024/9/13 + */ +@RequiredArgsConstructor +@Slf4j +public abstract class AbstractWxStoreConfiguration { + protected WxStoreMultiServices wxStoreMultiServices(WxStoreMultiProperties wxStoreMultiProperties) { + Map appsMap = wxStoreMultiProperties.getApps(); + if (appsMap == null || appsMap.isEmpty()) { + log.warn("微信小店应用参数未配置,通过 WxStoreMultiServices#getWxStoreService(\"tenantId\")获取实例将返回空"); + return new WxStoreMultiServicesImpl(); + } + /** + * 校验 appId 是否唯一,避免使用 redis 缓存 token、ticket 时错乱。 + * + * 查看 {@link com.binarywang.wxjava.store.config.impl.WxStoreRedisConfigImpl#setAppid(String)} + */ + Collection apps = appsMap.values(); + if (apps.size() > 1) { + // 校验 appId 是否唯一 + boolean multi = apps.stream() + // 没有 appId,如果不判断是否为空,这里会报 NPE 异常 + .collect(Collectors.groupingBy(c -> c.getAppId() == null ? 0 : c.getAppId(), Collectors.counting())) + .entrySet().stream().anyMatch(e -> e.getValue() > 1); + if (multi) { + throw new RuntimeException("请确保微信小店配置 appId 的唯一性"); + } + } + WxStoreMultiServicesImpl services = new WxStoreMultiServicesImpl(); + + Set> entries = appsMap.entrySet(); + for (Map.Entry entry : entries) { + String tenantId = entry.getKey(); + WxStoreSingleProperties wxStoreSingleProperties = entry.getValue(); + WxStoreDefaultConfigImpl storage = this.wxStoreConfigStorage(wxStoreMultiProperties); + this.configApp(storage, wxStoreSingleProperties); + this.configHttp(storage, wxStoreMultiProperties.getConfigStorage()); + WxStoreService wxStoreService = this.wxStoreService(storage, wxStoreMultiProperties); + services.addWxStoreService(tenantId, wxStoreService); + } + return services; + } + + /** + * 配置 WxStoreDefaultConfigImpl + * + * @param wxStoreMultiProperties 参数 + * @return WxStoreDefaultConfigImpl + */ + protected abstract WxStoreDefaultConfigImpl wxStoreConfigStorage(WxStoreMultiProperties wxStoreMultiProperties); + + public WxStoreService wxStoreService(WxStoreConfig wxStoreConfig, WxStoreMultiProperties wxStoreMultiProperties) { + WxStoreMultiProperties.ConfigStorage storage = wxStoreMultiProperties.getConfigStorage(); + HttpClientType httpClientType = storage.getHttpClientType(); + WxStoreService wxStoreService; + switch (httpClientType) { +// case OK_HTTP: +// wxStoreService = new WxStoreServiceOkHttpImpl(false, false); +// break; + case HTTP_CLIENT: + wxStoreService = new WxStoreServiceHttpClientImpl(); + break; + case HTTP_COMPONENTS: + wxStoreService = new WxStoreServiceHttpComponentsImpl(); + break; + default: + wxStoreService = new WxStoreServiceImpl(); + break; + } + + wxStoreService.setConfig(wxStoreConfig); + int maxRetryTimes = storage.getMaxRetryTimes(); + if (maxRetryTimes < 0) { + maxRetryTimes = 0; + } + int retrySleepMillis = storage.getRetrySleepMillis(); + if (retrySleepMillis < 0) { + retrySleepMillis = 1000; + } + wxStoreService.setRetrySleepMillis(retrySleepMillis); + wxStoreService.setMaxRetryTimes(maxRetryTimes); + return wxStoreService; + } + + private void configApp(WxStoreDefaultConfigImpl config, WxStoreSingleProperties wxStoreSingleProperties) { + String appId = wxStoreSingleProperties.getAppId(); + String appSecret = wxStoreSingleProperties.getSecret(); + String token = wxStoreSingleProperties.getToken(); + String aesKey = wxStoreSingleProperties.getAesKey(); + boolean useStableAccessToken = wxStoreSingleProperties.isUseStableAccessToken(); + + config.setAppid(appId); + config.setSecret(appSecret); + if (StringUtils.isNotBlank(token)) { + config.setToken(token); + } + if (StringUtils.isNotBlank(aesKey)) { + config.setAesKey(aesKey); + } + config.setStableAccessToken(useStableAccessToken); + config.setApiHostUrl(StringUtils.trimToNull(wxStoreSingleProperties.getApiHostUrl())); + config.setAccessTokenUrl(StringUtils.trimToNull(wxStoreSingleProperties.getAccessTokenUrl())); + } + + private void configHttp(WxStoreDefaultConfigImpl config, WxStoreMultiProperties.ConfigStorage storage) { + String httpProxyHost = storage.getHttpProxyHost(); + Integer httpProxyPort = storage.getHttpProxyPort(); + String httpProxyUsername = storage.getHttpProxyUsername(); + String httpProxyPassword = storage.getHttpProxyPassword(); + if (StringUtils.isNotBlank(httpProxyHost)) { + config.setHttpProxyHost(httpProxyHost); + if (httpProxyPort != null) { + config.setHttpProxyPort(httpProxyPort); + } + if (StringUtils.isNotBlank(httpProxyUsername)) { + config.setHttpProxyUsername(httpProxyUsername); + } + if (StringUtils.isNotBlank(httpProxyPassword)) { + config.setHttpProxyPassword(httpProxyPassword); + } + } + } +} diff --git a/spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/configuration/services/WxStoreInJedisConfiguration.java b/spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/configuration/services/WxStoreInJedisConfiguration.java new file mode 100644 index 0000000000..de8d904276 --- /dev/null +++ b/spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/configuration/services/WxStoreInJedisConfiguration.java @@ -0,0 +1,74 @@ +package com.binarywang.spring.starter.wxjava.store.configuration.services; + +import com.binarywang.spring.starter.wxjava.store.properties.WxStoreMultiProperties; +import com.binarywang.spring.starter.wxjava.store.properties.WxStoreMultiRedisProperties; +import com.binarywang.spring.starter.wxjava.store.service.WxStoreMultiServices; +import lombok.RequiredArgsConstructor; +import com.binarywang.wxjava.store.config.impl.WxStoreDefaultConfigImpl; +import com.binarywang.wxjava.store.config.impl.WxStoreRedisConfigImpl; +import me.chanjar.weixin.common.redis.JedisWxRedisOps; +import org.apache.commons.lang3.StringUtils; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; +import org.springframework.context.ApplicationContext; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import redis.clients.jedis.JedisPool; +import redis.clients.jedis.JedisPoolConfig; + +/** + * 自动装配基于 jedis 策略配置 + * + * @author Winnie + * @date 2024/9/13 + */ +@Configuration +@ConditionalOnProperty(prefix = WxStoreMultiProperties.PREFIX + ".config-storage", name = "type", havingValue = "jedis") +@RequiredArgsConstructor +public class WxStoreInJedisConfiguration extends AbstractWxStoreConfiguration { + private final WxStoreMultiProperties wxStoreMultiProperties; + private final ApplicationContext applicationContext; + + @Bean + public WxStoreMultiServices wxStoreMultiServices() { + return this.wxStoreMultiServices(wxStoreMultiProperties); + } + + @Override + protected WxStoreDefaultConfigImpl wxStoreConfigStorage(WxStoreMultiProperties wxStoreMultiProperties) { + return this.configRedis(wxStoreMultiProperties); + } + + private WxStoreDefaultConfigImpl configRedis(WxStoreMultiProperties wxStoreMultiProperties) { + WxStoreMultiRedisProperties wxStoreMultiRedisProperties = wxStoreMultiProperties.getConfigStorage().getRedis(); + JedisPool jedisPool; + if (wxStoreMultiRedisProperties != null && StringUtils.isNotEmpty(wxStoreMultiRedisProperties.getHost())) { + jedisPool = getJedisPool(wxStoreMultiProperties); + } else { + jedisPool = applicationContext.getBean(JedisPool.class); + } + return new WxStoreRedisConfigImpl(new JedisWxRedisOps(jedisPool), wxStoreMultiProperties.getConfigStorage().getKeyPrefix()); + } + + private JedisPool getJedisPool(WxStoreMultiProperties wxStoreMultiProperties) { + WxStoreMultiProperties.ConfigStorage storage = wxStoreMultiProperties.getConfigStorage(); + WxStoreMultiRedisProperties redis = storage.getRedis(); + + JedisPoolConfig config = new JedisPoolConfig(); + if (redis.getMaxActive() != null) { + config.setMaxTotal(redis.getMaxActive()); + } + if (redis.getMaxIdle() != null) { + config.setMaxIdle(redis.getMaxIdle()); + } + if (redis.getMaxWaitMillis() != null) { + config.setMaxWaitMillis(redis.getMaxWaitMillis()); + } + if (redis.getMinIdle() != null) { + config.setMinIdle(redis.getMinIdle()); + } + config.setTestOnBorrow(true); + config.setTestWhileIdle(true); + + return new JedisPool(config, redis.getHost(), redis.getPort(), redis.getTimeout(), redis.getPassword(), redis.getDatabase()); + } +} diff --git a/spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/configuration/services/WxStoreInMemoryConfiguration.java b/spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/configuration/services/WxStoreInMemoryConfiguration.java new file mode 100644 index 0000000000..999b27d861 --- /dev/null +++ b/spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/configuration/services/WxStoreInMemoryConfiguration.java @@ -0,0 +1,36 @@ +package com.binarywang.spring.starter.wxjava.store.configuration.services; + +import com.binarywang.spring.starter.wxjava.store.properties.WxStoreMultiProperties; +import com.binarywang.spring.starter.wxjava.store.service.WxStoreMultiServices; +import lombok.RequiredArgsConstructor; +import com.binarywang.wxjava.store.config.impl.WxStoreDefaultConfigImpl; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * 自动装配基于内存策略配置 + * + * @author Winnie + * @date 2024/9/13 + */ +@Configuration +@ConditionalOnProperty(prefix = WxStoreMultiProperties.PREFIX + ".config-storage", name = "type", havingValue = "memory", matchIfMissing = true) +@RequiredArgsConstructor +public class WxStoreInMemoryConfiguration extends AbstractWxStoreConfiguration { + private final WxStoreMultiProperties wxStoreMultiProperties; + + @Bean + public WxStoreMultiServices wxStoreMultiServices() { + return this.wxStoreMultiServices(wxStoreMultiProperties); + } + + @Override + protected WxStoreDefaultConfigImpl wxStoreConfigStorage(WxStoreMultiProperties wxStoreMultiProperties) { + return this.configInMemory(); + } + + private WxStoreDefaultConfigImpl configInMemory() { + return new WxStoreDefaultConfigImpl(); + } +} diff --git a/spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/configuration/services/WxStoreInRedisTemplateConfiguration.java b/spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/configuration/services/WxStoreInRedisTemplateConfiguration.java new file mode 100644 index 0000000000..03be7e3f75 --- /dev/null +++ b/spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/configuration/services/WxStoreInRedisTemplateConfiguration.java @@ -0,0 +1,42 @@ +package com.binarywang.spring.starter.wxjava.store.configuration.services; + +import com.binarywang.spring.starter.wxjava.store.properties.WxStoreMultiProperties; +import com.binarywang.spring.starter.wxjava.store.service.WxStoreMultiServices; +import lombok.RequiredArgsConstructor; +import com.binarywang.wxjava.store.config.impl.WxStoreDefaultConfigImpl; +import com.binarywang.wxjava.store.config.impl.WxStoreRedisConfigImpl; +import me.chanjar.weixin.common.redis.RedisTemplateWxRedisOps; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; +import org.springframework.context.ApplicationContext; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.data.redis.core.StringRedisTemplate; + +/** + * 自动装配基于 redisTemplate 策略配置 + * + * @author Winnie + * @date 2024/9/13 + */ +@Configuration +@ConditionalOnProperty(prefix = WxStoreMultiProperties.PREFIX + ".config-storage", name = "type", havingValue = "redis_template") +@RequiredArgsConstructor +public class WxStoreInRedisTemplateConfiguration extends AbstractWxStoreConfiguration { + private final WxStoreMultiProperties wxStoreMultiProperties; + private final ApplicationContext applicationContext; + + @Bean + public WxStoreMultiServices wxStoreMultiServices() { + return this.wxStoreMultiServices(wxStoreMultiProperties); + } + + @Override + protected WxStoreDefaultConfigImpl wxStoreConfigStorage(WxStoreMultiProperties wxStoreMultiProperties) { + return this.configRedisTemplate(wxStoreMultiProperties); + } + + private WxStoreDefaultConfigImpl configRedisTemplate(WxStoreMultiProperties wxStoreMultiProperties) { + StringRedisTemplate redisTemplate = applicationContext.getBean(StringRedisTemplate.class); + return new WxStoreRedisConfigImpl(new RedisTemplateWxRedisOps(redisTemplate), wxStoreMultiProperties.getConfigStorage().getKeyPrefix()); + } +} diff --git a/spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/configuration/services/WxStoreInRedissonConfiguration.java b/spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/configuration/services/WxStoreInRedissonConfiguration.java new file mode 100644 index 0000000000..25a3568cf6 --- /dev/null +++ b/spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/configuration/services/WxStoreInRedissonConfiguration.java @@ -0,0 +1,62 @@ +package com.binarywang.spring.starter.wxjava.store.configuration.services; + +import com.binarywang.spring.starter.wxjava.store.properties.WxStoreMultiProperties; +import com.binarywang.spring.starter.wxjava.store.properties.WxStoreMultiRedisProperties; +import com.binarywang.spring.starter.wxjava.store.service.WxStoreMultiServices; +import lombok.RequiredArgsConstructor; +import com.binarywang.wxjava.store.config.impl.WxStoreDefaultConfigImpl; +import com.binarywang.wxjava.store.config.impl.WxStoreRedissonConfigImpl; +import org.apache.commons.lang3.StringUtils; +import org.redisson.Redisson; +import org.redisson.api.RedissonClient; +import org.redisson.config.Config; +import org.redisson.config.TransportMode; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; +import org.springframework.context.ApplicationContext; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * 自动装配基于 redisson 策略配置 + * + * @author Winnie + * @date 2024/9/13 + */ +@Configuration +@ConditionalOnProperty(prefix = WxStoreMultiProperties.PREFIX + ".config-storage", name = "type", havingValue = "redisson") +@RequiredArgsConstructor +public class WxStoreInRedissonConfiguration extends AbstractWxStoreConfiguration { + private final WxStoreMultiProperties wxStoreMultiProperties; + private final ApplicationContext applicationContext; + + @Bean + public WxStoreMultiServices wxStoreMultiServices() { + return this.wxStoreMultiServices(wxStoreMultiProperties); + } + + @Override + protected WxStoreDefaultConfigImpl wxStoreConfigStorage(WxStoreMultiProperties wxStoreMultiProperties) { + return this.configRedisson(wxStoreMultiProperties); + } + + private WxStoreDefaultConfigImpl configRedisson(WxStoreMultiProperties wxStoreMultiProperties) { + WxStoreMultiRedisProperties redisProperties = wxStoreMultiProperties.getConfigStorage().getRedis(); + RedissonClient redissonClient; + if (redisProperties != null && StringUtils.isNotEmpty(redisProperties.getHost())) { + redissonClient = getRedissonClient(wxStoreMultiProperties); + } else { + redissonClient = applicationContext.getBean(RedissonClient.class); + } + return new WxStoreRedissonConfigImpl(redissonClient, wxStoreMultiProperties.getConfigStorage().getKeyPrefix()); + } + + private RedissonClient getRedissonClient(WxStoreMultiProperties wxStoreMultiProperties) { + WxStoreMultiProperties.ConfigStorage storage = wxStoreMultiProperties.getConfigStorage(); + WxStoreMultiRedisProperties redis = storage.getRedis(); + + Config config = new Config(); + config.useSingleServer().setAddress("redis://" + redis.getHost() + ":" + redis.getPort()).setDatabase(redis.getDatabase()).setPassword(redis.getPassword()); + config.setTransportMode(TransportMode.NIO); + return Redisson.create(config); + } +} diff --git a/spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/enums/HttpClientType.java b/spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/enums/HttpClientType.java new file mode 100644 index 0000000000..4e8159c600 --- /dev/null +++ b/spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/enums/HttpClientType.java @@ -0,0 +1,23 @@ +package com.binarywang.spring.starter.wxjava.store.enums; + +/** + * httpclient类型 + * + * @author Winnie + * @date 2024/9/13 + */ +public enum HttpClientType { + /** + * HttpClient. + */ + HTTP_CLIENT, + // WxStoreServiceOkHttpImpl 实现经测试无法正常完成业务固暂不支持OK_HTTP方式 +// /** +// * OkHttp. +// */ +// OK_HTTP, + /** + * HttpComponents. + */ + HTTP_COMPONENTS, +} diff --git a/spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/enums/StorageType.java b/spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/enums/StorageType.java new file mode 100644 index 0000000000..b57d88da75 --- /dev/null +++ b/spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/enums/StorageType.java @@ -0,0 +1,26 @@ +package com.binarywang.spring.starter.wxjava.store.enums; + +/** + * storage类型 + * + * @author Winnie + * @date 2024/9/13 + */ +public enum StorageType { + /** + * 内存 + */ + MEMORY, + /** + * redis(JedisClient) + */ + JEDIS, + /** + * redis(Redisson) + */ + REDISSON, + /** + * redis(RedisTemplate) + */ + REDIS_TEMPLATE +} diff --git a/spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/properties/WxStoreMultiProperties.java b/spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/properties/WxStoreMultiProperties.java new file mode 100644 index 0000000000..a958753a61 --- /dev/null +++ b/spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/properties/WxStoreMultiProperties.java @@ -0,0 +1,96 @@ +package com.binarywang.spring.starter.wxjava.store.properties; + +import com.binarywang.spring.starter.wxjava.store.enums.HttpClientType; +import com.binarywang.spring.starter.wxjava.store.enums.StorageType; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.boot.context.properties.NestedConfigurationProperty; + +import java.io.Serializable; +import java.util.HashMap; +import java.util.Map; + +/** + * 微信多视频号接入相关配置属性 + * + * @author Winnie + * @date 2024/9/13 + */ +@Data +@NoArgsConstructor +@ConfigurationProperties(WxStoreMultiProperties.PREFIX) +public class WxStoreMultiProperties implements Serializable { + private static final long serialVersionUID = - 8361973118805546037L; + public static final String PREFIX = "wx.store"; + + private Map apps = new HashMap<>(); + + /** + * 存储策略 + */ + private final ConfigStorage configStorage = new ConfigStorage(); + + @Data + @NoArgsConstructor + public static class ConfigStorage implements Serializable { + private static final long serialVersionUID = - 5152619132544179942L; + + /** + * 存储类型. + */ + private StorageType type = StorageType.MEMORY; + + /** + * 指定key前缀. + */ + private String keyPrefix = "wx:store:multi"; + + /** + * redis连接配置. + */ + @NestedConfigurationProperty + private final WxStoreMultiRedisProperties redis = new WxStoreMultiRedisProperties(); + + /** + * http客户端类型. + */ + private HttpClientType httpClientType = HttpClientType.HTTP_CLIENT; + + /** + * http代理主机. + */ + private String httpProxyHost; + + /** + * http代理端口. + */ + private Integer httpProxyPort; + + /** + * http代理用户名. + */ + private String httpProxyUsername; + + /** + * http代理密码. + */ + private String httpProxyPassword; + + /** + * http 请求最大重试次数 + * + *

{@link com.binarywang.wxjava.store.api.WxStoreService#setMaxRetryTimes(int)}

+ *

{@link com.binarywang.wxjava.store.api.impl.BaseWxStoreServiceImpl#setMaxRetryTimes(int)}

+ */ + private int maxRetryTimes = 5; + + /** + * http 请求重试间隔 + * + *

{@link com.binarywang.wxjava.store.api.WxStoreService#setRetrySleepMillis(int)}

+ *

{@link com.binarywang.wxjava.store.api.impl.BaseWxStoreServiceImpl#setRetrySleepMillis(int)}

+ */ + private int retrySleepMillis = 1000; + } +} diff --git a/spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/properties/WxStoreMultiRedisProperties.java b/spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/properties/WxStoreMultiRedisProperties.java new file mode 100644 index 0000000000..828325c3bf --- /dev/null +++ b/spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/properties/WxStoreMultiRedisProperties.java @@ -0,0 +1,63 @@ +package com.binarywang.spring.starter.wxjava.store.properties; + +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * Redis配置 + * + * @author Winnie + * @date 2024/9/13 + */ +@Data +@NoArgsConstructor +public class WxStoreMultiRedisProperties implements Serializable { + private static final long serialVersionUID = 9061055444734277357L; + + /** + * 主机地址. + */ + private String host = "127.0.0.1"; + + /** + * 端口号. + */ + private int port = 6379; + + /** + * 密码. + */ + private String password; + + /** + * 超时. + */ + private int timeout = 2000; + + /** + * 数据库. + */ + private int database = 0; + + /** + * 最大活动连接数 + */ + private Integer maxActive; + + /** + * 最大空闲连接数 + */ + private Integer maxIdle; + + /** + * 最小空闲连接数 + */ + private Integer minIdle; + + /** + * 最大等待时间 + */ + private Integer maxWaitMillis; +} diff --git a/spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/properties/WxStoreSingleProperties.java b/spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/properties/WxStoreSingleProperties.java new file mode 100644 index 0000000000..335147c7b7 --- /dev/null +++ b/spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/properties/WxStoreSingleProperties.java @@ -0,0 +1,55 @@ +package com.binarywang.spring.starter.wxjava.store.properties; + +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * 微信小店相关配置属性 + * + * @author Winnie + * @date 2024/9/13 + */ +@Data +@NoArgsConstructor +public class WxStoreSingleProperties implements Serializable { + private static final long serialVersionUID = 5306630351265124825L; + + /** + * 设置微信小店的 appid. + */ + private String appId; + + /** + * 设置微信小店的 secret. + */ + private String secret; + + /** + * 设置微信小店的 token. + */ + private String token; + + /** + * 设置微信小店的 EncodingAESKey. + */ + private String aesKey; + + /** + * 是否使用稳定版 Access Token + */ + private boolean useStableAccessToken = false; + + /** + * 自定义API主机地址,用于替换默认的 https://api.weixin.qq.com + * 例如:http://proxy.company.com:8080 + */ + private String apiHostUrl; + + /** + * 自定义获取AccessToken地址,用于向自定义统一服务获取AccessToken + * 例如:http://proxy.company.com:8080/oauth/token + */ + private String accessTokenUrl; +} diff --git a/spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/service/WxStoreMultiServices.java b/spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/service/WxStoreMultiServices.java new file mode 100644 index 0000000000..ff5192ac48 --- /dev/null +++ b/spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/service/WxStoreMultiServices.java @@ -0,0 +1,26 @@ +package com.binarywang.spring.starter.wxjava.store.service; + +import com.binarywang.wxjava.store.api.WxStoreService; + +/** + * 视频号 {@link WxStoreService} 所有实例存放类. + * + * @author Winnie + * @date 2024/9/13 + */ +public interface WxStoreMultiServices { + /** + * 通过租户 Id 获取 WxStoreService + * + * @param tenantId 租户 Id + * @return WxStoreService + */ + WxStoreService getWxStoreService(String tenantId); + + /** + * 根据租户 Id,从列表中移除一个 WxStoreService 实例 + * + * @param tenantId 租户 Id + */ + void removeWxStoreService(String tenantId); +} diff --git a/spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/service/WxStoreMultiServicesImpl.java b/spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/service/WxStoreMultiServicesImpl.java new file mode 100644 index 0000000000..44fe0f947d --- /dev/null +++ b/spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/service/WxStoreMultiServicesImpl.java @@ -0,0 +1,36 @@ +package com.binarywang.spring.starter.wxjava.store.service; + +import com.binarywang.wxjava.store.api.WxStoreService; + +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + +/** + * 视频号 {@link WxStoreMultiServices} 实现 + * + * @author Winnie + * @date 2024/9/13 + */ +public class WxStoreMultiServicesImpl implements WxStoreMultiServices { + private final Map services = new ConcurrentHashMap<>(); + + @Override + public WxStoreService getWxStoreService(String tenantId) { + return this.services.get(tenantId); + } + + /** + * 根据租户 Id,添加一个 WxStoreService 到列表 + * + * @param tenantId 租户 Id + * @param wxStoreService WxStoreService 实例 + */ + public void addWxStoreService(String tenantId, WxStoreService wxStoreService) { + this.services.put(tenantId, wxStoreService); + } + + @Override + public void removeWxStoreService(String tenantId) { + this.services.remove(tenantId); + } +} diff --git a/spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/resources/META-INF/spring.factories b/spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000000..40c16383ac --- /dev/null +++ b/spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/resources/META-INF/spring.factories @@ -0,0 +1,2 @@ +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ +com.binarywang.spring.starter.wxjava.store.autoconfigure.WxStoreMultiAutoConfiguration diff --git a/spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 0000000000..485736df0a --- /dev/null +++ b/spring-boot-starters/wx-java-store-multi-spring-boot-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +com.binarywang.spring.starter.wxjava.store.autoconfigure.WxStoreMultiAutoConfiguration diff --git a/spring-boot-starters/wx-java-store-spring-boot-starter/README.md b/spring-boot-starters/wx-java-store-spring-boot-starter/README.md new file mode 100644 index 0000000000..f601db67d1 --- /dev/null +++ b/spring-boot-starters/wx-java-store-spring-boot-starter/README.md @@ -0,0 +1,102 @@ +# wx-java-store-spring-boot-starter + +## 快速开始 +1. 引入依赖 + ```xml + + + com.github.binarywang + wx-java-store-spring-boot-starter + ${version} + + + + + redis.clients + jedis + ${jedis.version} + + + + + org.redisson + redisson + ${redisson.version} + + + + + org.springframework.boot + spring-boot-starter-data-redis + + + ``` +2. 添加配置(application.properties) + ```properties + # 视频号配置(必填) + ## 微信小店的appId和secret + wx.store.app-id=@appId + wx.store.secret=@secret + # 视频号配置 选填 + ## 设置微信小店消息服务器配置的token + wx.store.token=@token + ## 设置微信小店消息服务器配置的EncodingAESKey + wx.store.aes-key= + ## 支持JSON或者XML格式,默认JSON + wx.store.msg-data-format=JSON + ## 是否使用稳定版 Access Token + wx.store.use-stable-access-token=false + + + # ConfigStorage 配置(选填) + ## 配置类型: memory(默认), jedis, redisson, redis_template + wx.store.config-storage.type=memory + ## 相关redis前缀配置: wx:store(默认) + wx.store.config-storage.key-prefix=wx:store + wx.store.config-storage.redis.host=127.0.0.1 + wx.store.config-storage.redis.port=6379 + wx.store.config-storage.redis.password=123456 + + # redis_template 方式使用spring data redis配置 + spring.data.redis.database=0 + spring.data.redis.host=127.0.0.1 + spring.data.redis.password=123456 + spring.data.redis.port=6379 + + # http 客户端配置(选填) + ## # http客户端类型: http_client(默认) + wx.store.config-storage.http-client-type=http_client + wx.store.config-storage.http-proxy-host= + wx.store.config-storage.http-proxy-port= + wx.store.config-storage.http-proxy-username= + wx.store.config-storage.http-proxy-password= + ## 最大重试次数,默认:5 次,如果小于 0,则为 0 + wx.store.config-storage.max-retry-times=5 + ## 重试时间间隔步进,默认:1000 毫秒,如果小于 0,则为 1000 + wx.store.config-storage.retry-sleep-millis=1000 + ``` +3. 自动注入的类型 +- `WxStoreService` +- `WxStoreConfig` +4. 使用样例 +```java +import com.binarywang.wxjava.store.api.WxStoreService; +import com.binarywang.wxjava.store.bean.shop.ShopInfoResponse; +import com.binarywang.wxjava.store.util.JsonUtils; +import me.chanjar.weixin.common.error.WxErrorException; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class DemoService { + @Autowired + private WxStoreService wxStoreService; + + public String getShopInfo() throws WxErrorException { + // 获取店铺基本信息 + ShopInfoResponse response = wxStoreService.getBasicService().getShopInfo(); + // 此处为演示,如果要返回response的结果,建议自己封装一个VO,避免直接返回response + return JsonUtils.encode(response); + } +} +``` diff --git a/spring-boot-starters/wx-java-store-spring-boot-starter/pom.xml b/spring-boot-starters/wx-java-store-spring-boot-starter/pom.xml new file mode 100644 index 0000000000..b59dbae37e --- /dev/null +++ b/spring-boot-starters/wx-java-store-spring-boot-starter/pom.xml @@ -0,0 +1,61 @@ + + + wx-java-spring-boot-starters + com.github.binarywang + 4.8.6.B + + 4.0.0 + + wx-java-store-spring-boot-starter + WxJava - Spring Boot Starter for Store + 微信小店开发的 Spring Boot Starter + + + + com.github.binarywang + weixin-java-store + ${project.version} + + + redis.clients + jedis + provided + + + org.redisson + redisson + provided + + + org.springframework.data + spring-data-redis + ${spring-data-redis.version} + true + provided + + + + + + + org.springframework.boot + spring-boot-maven-plugin + ${spring.boot.version} + + + org.apache.maven.plugins + maven-source-plugin + 2.2.1 + + + attach-sources + + jar-no-fork + + + + + + + diff --git a/spring-boot-starters/wx-java-store-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/config/WxStoreAutoConfiguration.java b/spring-boot-starters/wx-java-store-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/config/WxStoreAutoConfiguration.java new file mode 100644 index 0000000000..28f7e0b48f --- /dev/null +++ b/spring-boot-starters/wx-java-store-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/config/WxStoreAutoConfiguration.java @@ -0,0 +1,20 @@ +package com.binarywang.spring.starter.wxjava.store.config; + +import com.binarywang.spring.starter.wxjava.store.properties.WxStoreProperties; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Import; + +/** + * 自动配置 + * + * @author Zeyes + */ +@Configuration +@EnableConfigurationProperties(WxStoreProperties.class) +@Import({ + WxStoreStorageAutoConfiguration.class, + WxStoreServiceAutoConfiguration.class +}) +public class WxStoreAutoConfiguration { +} diff --git a/spring-boot-starters/wx-java-store-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/config/WxStoreServiceAutoConfiguration.java b/spring-boot-starters/wx-java-store-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/config/WxStoreServiceAutoConfiguration.java new file mode 100644 index 0000000000..c93857c04e --- /dev/null +++ b/spring-boot-starters/wx-java-store-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/config/WxStoreServiceAutoConfiguration.java @@ -0,0 +1,41 @@ +package com.binarywang.spring.starter.wxjava.store.config; + + +import com.binarywang.spring.starter.wxjava.store.properties.WxStoreProperties; +import com.binarywang.spring.starter.wxjava.store.enums.HttpClientType; +import lombok.AllArgsConstructor; +import com.binarywang.wxjava.store.api.WxStoreService; +import com.binarywang.wxjava.store.api.impl.WxStoreServiceHttpClientImpl; +import com.binarywang.wxjava.store.api.impl.WxStoreServiceHttpComponentsImpl; +import com.binarywang.wxjava.store.config.WxStoreConfig; +import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * 微信小程序平台相关服务自动注册 + * + * @author Zeyes + */ +@Configuration +@AllArgsConstructor +public class WxStoreServiceAutoConfiguration { + private final WxStoreProperties properties; + + /** + * Store Service + * + * @return Store Service + */ + @Bean + @ConditionalOnMissingBean(WxStoreService.class) + @ConditionalOnBean(WxStoreConfig.class) + public WxStoreService wxStoreService(WxStoreConfig wxStoreConfig) { + HttpClientType httpClientType = properties.getConfigStorage().getHttpClientType(); + WxStoreService wxStoreService = httpClientType == HttpClientType.HttpClient + ? new WxStoreServiceHttpClientImpl() : new WxStoreServiceHttpComponentsImpl(); + wxStoreService.setConfig(wxStoreConfig); + return wxStoreService; + } +} diff --git a/spring-boot-starters/wx-java-store-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/config/WxStoreStorageAutoConfiguration.java b/spring-boot-starters/wx-java-store-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/config/WxStoreStorageAutoConfiguration.java new file mode 100644 index 0000000000..3867ad8bb6 --- /dev/null +++ b/spring-boot-starters/wx-java-store-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/config/WxStoreStorageAutoConfiguration.java @@ -0,0 +1,23 @@ +package com.binarywang.spring.starter.wxjava.store.config; + +import com.binarywang.spring.starter.wxjava.store.config.storage.WxStoreInJedisConfigStorageConfiguration; +import com.binarywang.spring.starter.wxjava.store.config.storage.WxStoreInMemoryConfigStorageConfiguration; +import com.binarywang.spring.starter.wxjava.store.config.storage.WxStoreInRedisTemplateConfigStorageConfiguration; +import com.binarywang.spring.starter.wxjava.store.config.storage.WxStoreInRedissonConfigStorageConfiguration; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Import; + +/** + * 微信小程序存储策略自动配置 + * + * @author Zeyes + */ +@Configuration +@Import({ + WxStoreInMemoryConfigStorageConfiguration.class, + WxStoreInJedisConfigStorageConfiguration.class, + WxStoreInRedisTemplateConfigStorageConfiguration.class, + WxStoreInRedissonConfigStorageConfiguration.class +}) +public class WxStoreStorageAutoConfiguration { +} diff --git a/spring-boot-starters/wx-java-store-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/config/storage/AbstractWxStoreConfigStorageConfiguration.java b/spring-boot-starters/wx-java-store-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/config/storage/AbstractWxStoreConfigStorageConfiguration.java new file mode 100644 index 0000000000..95452d4e47 --- /dev/null +++ b/spring-boot-starters/wx-java-store-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/config/storage/AbstractWxStoreConfigStorageConfiguration.java @@ -0,0 +1,42 @@ +package com.binarywang.spring.starter.wxjava.store.config.storage; + +import com.binarywang.spring.starter.wxjava.store.properties.WxStoreProperties; +import com.binarywang.wxjava.store.config.impl.WxStoreDefaultConfigImpl; +import org.apache.commons.lang3.StringUtils; + +/** + * @author Zeyes + */ +public abstract class AbstractWxStoreConfigStorageConfiguration { + + protected WxStoreDefaultConfigImpl config(WxStoreDefaultConfigImpl config, WxStoreProperties properties) { + config.setAppid(StringUtils.trimToNull(properties.getAppid())); + config.setSecret(StringUtils.trimToNull(properties.getSecret())); + config.setToken(StringUtils.trimToNull(properties.getToken())); + config.setAesKey(StringUtils.trimToNull(properties.getAesKey())); + config.setMsgDataFormat(StringUtils.trimToNull(properties.getMsgDataFormat())); + config.setStableAccessToken(properties.isUseStableAccessToken()); + config.setApiHostUrl(StringUtils.trimToNull(properties.getApiHostUrl())); + config.setAccessTokenUrl(StringUtils.trimToNull(properties.getAccessTokenUrl())); + + WxStoreProperties.ConfigStorage configStorageProperties = properties.getConfigStorage(); + config.setHttpProxyHost(configStorageProperties.getHttpProxyHost()); + config.setHttpProxyUsername(configStorageProperties.getHttpProxyUsername()); + config.setHttpProxyPassword(configStorageProperties.getHttpProxyPassword()); + if (configStorageProperties.getHttpProxyPort() != null) { + config.setHttpProxyPort(configStorageProperties.getHttpProxyPort()); + } + + int maxRetryTimes = configStorageProperties.getMaxRetryTimes(); + if (configStorageProperties.getMaxRetryTimes() < 0) { + maxRetryTimes = 0; + } + int retrySleepMillis = configStorageProperties.getRetrySleepMillis(); + if (retrySleepMillis < 0) { + retrySleepMillis = 1000; + } + config.setRetrySleepMillis(retrySleepMillis); + config.setMaxRetryTimes(maxRetryTimes); + return config; + } +} diff --git a/spring-boot-starters/wx-java-store-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/config/storage/WxStoreInJedisConfigStorageConfiguration.java b/spring-boot-starters/wx-java-store-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/config/storage/WxStoreInJedisConfigStorageConfiguration.java new file mode 100644 index 0000000000..c474c5f6bd --- /dev/null +++ b/spring-boot-starters/wx-java-store-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/config/storage/WxStoreInJedisConfigStorageConfiguration.java @@ -0,0 +1,73 @@ +package com.binarywang.spring.starter.wxjava.store.config.storage; + + +import com.binarywang.spring.starter.wxjava.store.properties.RedisProperties; +import com.binarywang.spring.starter.wxjava.store.properties.WxStoreProperties; +import lombok.RequiredArgsConstructor; +import com.binarywang.wxjava.store.config.WxStoreConfig; +import com.binarywang.wxjava.store.config.impl.WxStoreRedisConfigImpl; +import me.chanjar.weixin.common.redis.JedisWxRedisOps; +import me.chanjar.weixin.common.redis.WxRedisOps; +import org.apache.commons.lang3.StringUtils; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; +import org.springframework.context.ApplicationContext; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import redis.clients.jedis.JedisPool; +import redis.clients.jedis.JedisPoolConfig; + +/** + * @author Zeyes + */ +@Configuration +@ConditionalOnProperty(prefix = WxStoreProperties.PREFIX + ".config-storage", name = "type", havingValue = "jedis") +@ConditionalOnClass({JedisPool.class, JedisPoolConfig.class}) +@RequiredArgsConstructor +public class WxStoreInJedisConfigStorageConfiguration extends AbstractWxStoreConfigStorageConfiguration { + private final WxStoreProperties properties; + private final ApplicationContext applicationContext; + + @Bean + @ConditionalOnMissingBean(WxStoreConfig.class) + public WxStoreConfig wxStoreConfig() { + WxStoreRedisConfigImpl config = getWxStoreRedisConfig(); + return this.config(config, properties); + } + + private WxStoreRedisConfigImpl getWxStoreRedisConfig() { + RedisProperties redisProperties = properties.getConfigStorage().getRedis(); + JedisPool jedisPool; + if (redisProperties != null && StringUtils.isNotEmpty(redisProperties.getHost())) { + jedisPool = getJedisPool(); + } else { + jedisPool = applicationContext.getBean(JedisPool.class); + } + WxRedisOps redisOps = new JedisWxRedisOps(jedisPool); + return new WxStoreRedisConfigImpl(redisOps, properties.getConfigStorage().getKeyPrefix()); + } + + private JedisPool getJedisPool() { + WxStoreProperties.ConfigStorage storage = properties.getConfigStorage(); + RedisProperties redis = storage.getRedis(); + + JedisPoolConfig config = new JedisPoolConfig(); + if (redis.getMaxActive() != null) { + config.setMaxTotal(redis.getMaxActive()); + } + if (redis.getMaxIdle() != null) { + config.setMaxIdle(redis.getMaxIdle()); + } + if (redis.getMaxWaitMillis() != null) { + config.setMaxWaitMillis(redis.getMaxWaitMillis()); + } + if (redis.getMinIdle() != null) { + config.setMinIdle(redis.getMinIdle()); + } + config.setTestOnBorrow(true); + config.setTestWhileIdle(true); + + return new JedisPool(config, redis.getHost(), redis.getPort(), redis.getTimeout(), redis.getPassword(), redis.getDatabase()); + } +} diff --git a/spring-boot-starters/wx-java-store-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/config/storage/WxStoreInMemoryConfigStorageConfiguration.java b/spring-boot-starters/wx-java-store-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/config/storage/WxStoreInMemoryConfigStorageConfiguration.java new file mode 100644 index 0000000000..59802c8774 --- /dev/null +++ b/spring-boot-starters/wx-java-store-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/config/storage/WxStoreInMemoryConfigStorageConfiguration.java @@ -0,0 +1,29 @@ +package com.binarywang.spring.starter.wxjava.store.config.storage; + + +import com.binarywang.spring.starter.wxjava.store.properties.WxStoreProperties; +import lombok.RequiredArgsConstructor; +import com.binarywang.wxjava.store.config.WxStoreConfig; +import com.binarywang.wxjava.store.config.impl.WxStoreDefaultConfigImpl; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * @author Zeyes + */ +@Configuration +@ConditionalOnProperty(prefix = WxStoreProperties.PREFIX + ".config-storage", name = "type", + matchIfMissing = true, havingValue = "memory") +@RequiredArgsConstructor +public class WxStoreInMemoryConfigStorageConfiguration extends AbstractWxStoreConfigStorageConfiguration { + private final WxStoreProperties properties; + + @Bean + @ConditionalOnMissingBean(WxStoreConfig.class) + public WxStoreConfig wxStoreConfig() { + WxStoreDefaultConfigImpl config = new WxStoreDefaultConfigImpl(); + return this.config(config, properties); + } +} diff --git a/spring-boot-starters/wx-java-store-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/config/storage/WxStoreInRedisTemplateConfigStorageConfiguration.java b/spring-boot-starters/wx-java-store-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/config/storage/WxStoreInRedisTemplateConfigStorageConfiguration.java new file mode 100644 index 0000000000..4bbcbb05bc --- /dev/null +++ b/spring-boot-starters/wx-java-store-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/config/storage/WxStoreInRedisTemplateConfigStorageConfiguration.java @@ -0,0 +1,40 @@ +package com.binarywang.spring.starter.wxjava.store.config.storage; + +import com.binarywang.spring.starter.wxjava.store.properties.WxStoreProperties; +import lombok.RequiredArgsConstructor; +import com.binarywang.wxjava.store.config.WxStoreConfig; +import com.binarywang.wxjava.store.config.impl.WxStoreRedisConfigImpl; +import me.chanjar.weixin.common.redis.RedisTemplateWxRedisOps; +import me.chanjar.weixin.common.redis.WxRedisOps; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; +import org.springframework.context.ApplicationContext; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.data.redis.core.StringRedisTemplate; + +/** + * @author Zeyes + */ +@Configuration +@ConditionalOnProperty(prefix = WxStoreProperties.PREFIX + ".config-storage", name = "type", havingValue = "redis_template") +@ConditionalOnClass(StringRedisTemplate.class) +@RequiredArgsConstructor +public class WxStoreInRedisTemplateConfigStorageConfiguration extends AbstractWxStoreConfigStorageConfiguration { + private final WxStoreProperties properties; + private final ApplicationContext applicationContext; + + @Bean + @ConditionalOnMissingBean(WxStoreConfig.class) + public WxStoreConfig wxStoreConfig() { + WxStoreRedisConfigImpl config = getWxStoreInRedisTemplateConfig(); + return this.config(config, properties); + } + + private WxStoreRedisConfigImpl getWxStoreInRedisTemplateConfig() { + StringRedisTemplate redisTemplate = applicationContext.getBean(StringRedisTemplate.class); + WxRedisOps redisOps = new RedisTemplateWxRedisOps(redisTemplate); + return new WxStoreRedisConfigImpl(redisOps, properties.getConfigStorage().getKeyPrefix()); + } +} diff --git a/spring-boot-starters/wx-java-store-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/config/storage/WxStoreInRedissonConfigStorageConfiguration.java b/spring-boot-starters/wx-java-store-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/config/storage/WxStoreInRedissonConfigStorageConfiguration.java new file mode 100644 index 0000000000..5eacb98d91 --- /dev/null +++ b/spring-boot-starters/wx-java-store-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/config/storage/WxStoreInRedissonConfigStorageConfiguration.java @@ -0,0 +1,62 @@ +package com.binarywang.spring.starter.wxjava.store.config.storage; + + +import com.binarywang.spring.starter.wxjava.store.properties.RedisProperties; +import com.binarywang.spring.starter.wxjava.store.properties.WxStoreProperties; +import lombok.RequiredArgsConstructor; +import com.binarywang.wxjava.store.config.WxStoreConfig; +import com.binarywang.wxjava.store.config.impl.WxStoreRedissonConfigImpl; +import org.apache.commons.lang3.StringUtils; +import org.redisson.Redisson; +import org.redisson.api.RedissonClient; +import org.redisson.config.Config; +import org.redisson.config.TransportMode; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; +import org.springframework.context.ApplicationContext; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * @author Zeyes + */ +@Configuration +@ConditionalOnProperty(prefix = WxStoreProperties.PREFIX + ".config-storage", name = "type", havingValue = "redisson") +@ConditionalOnClass({Redisson.class, RedissonClient.class}) +@RequiredArgsConstructor +public class WxStoreInRedissonConfigStorageConfiguration extends AbstractWxStoreConfigStorageConfiguration { + private final WxStoreProperties properties; + private final ApplicationContext applicationContext; + + @Bean + @ConditionalOnMissingBean(WxStoreConfig.class) + public WxStoreConfig wxStoreConfig() { + WxStoreRedissonConfigImpl config = getWxStoreRedissonConfig(); + return this.config(config, properties); + } + + private WxStoreRedissonConfigImpl getWxStoreRedissonConfig() { + RedisProperties redisProperties = properties.getConfigStorage().getRedis(); + RedissonClient redissonClient; + if (redisProperties != null && StringUtils.isNotEmpty(redisProperties.getHost())) { + redissonClient = getRedissonClient(); + } else { + redissonClient = applicationContext.getBean(RedissonClient.class); + } + return new WxStoreRedissonConfigImpl(redissonClient, properties.getConfigStorage().getKeyPrefix()); + } + + private RedissonClient getRedissonClient() { + WxStoreProperties.ConfigStorage storage = properties.getConfigStorage(); + RedisProperties redis = storage.getRedis(); + + Config config = new Config(); + config.useSingleServer() + .setAddress("redis://" + redis.getHost() + ":" + redis.getPort()) + .setDatabase(redis.getDatabase()) + .setPassword(redis.getPassword()); + config.setTransportMode(TransportMode.NIO); + return Redisson.create(config); + } +} diff --git a/spring-boot-starters/wx-java-store-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/enums/HttpClientType.java b/spring-boot-starters/wx-java-store-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/enums/HttpClientType.java new file mode 100644 index 0000000000..5db42200d3 --- /dev/null +++ b/spring-boot-starters/wx-java-store-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/enums/HttpClientType.java @@ -0,0 +1,17 @@ +package com.binarywang.spring.starter.wxjava.store.enums; + +/** + * httpclient类型 + * + * @author Zeyes + */ +public enum HttpClientType { + /** + * HttpClient. + */ + HttpClient, + /** + * HttpComponents. + */ + HttpComponents, +} diff --git a/spring-boot-starters/wx-java-store-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/enums/StorageType.java b/spring-boot-starters/wx-java-store-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/enums/StorageType.java new file mode 100644 index 0000000000..21347d0da0 --- /dev/null +++ b/spring-boot-starters/wx-java-store-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/enums/StorageType.java @@ -0,0 +1,25 @@ +package com.binarywang.spring.starter.wxjava.store.enums; + +/** + * storage类型 + * + * @author Zeyes + */ +public enum StorageType { + /** + * 内存 + */ + Memory, + /** + * redis(JedisClient) + */ + Jedis, + /** + * redis(Redisson) + */ + Redisson, + /** + * redis(RedisTemplate) + */ + RedisTemplate +} diff --git a/spring-boot-starters/wx-java-store-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/properties/RedisProperties.java b/spring-boot-starters/wx-java-store-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/properties/RedisProperties.java new file mode 100644 index 0000000000..00d87c3bd9 --- /dev/null +++ b/spring-boot-starters/wx-java-store-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/properties/RedisProperties.java @@ -0,0 +1,42 @@ +package com.binarywang.spring.starter.wxjava.store.properties; + +import lombok.Data; + +/** + * redis 配置 + * + * @author Zeyes + */ +@Data +public class RedisProperties { + + /** + * 主机地址,不填则从spring容器内获取JedisPool + */ + private String host; + + /** + * 端口号 + */ + private int port = 6379; + + /** + * 密码 + */ + private String password; + + /** + * 超时 + */ + private int timeout = 2000; + + /** + * 数据库 + */ + private int database = 0; + + private Integer maxActive; + private Integer maxIdle; + private Integer maxWaitMillis; + private Integer minIdle; +} diff --git a/spring-boot-starters/wx-java-store-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/properties/WxStoreProperties.java b/spring-boot-starters/wx-java-store-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/properties/WxStoreProperties.java new file mode 100644 index 0000000000..26b1e9d4ff --- /dev/null +++ b/spring-boot-starters/wx-java-store-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/store/properties/WxStoreProperties.java @@ -0,0 +1,126 @@ +package com.binarywang.spring.starter.wxjava.store.properties; + +import com.binarywang.spring.starter.wxjava.store.enums.HttpClientType; +import com.binarywang.spring.starter.wxjava.store.enums.StorageType; +import lombok.Data; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.boot.context.properties.NestedConfigurationProperty; + +/** + * 属性配置类 + * + * @author Zeyes + */ +@Data +@ConfigurationProperties(prefix = WxStoreProperties.PREFIX) +public class WxStoreProperties { + public static final String PREFIX = "wx.store"; + + /** + * 设置微信小店的appid + */ + private String appid; + + /** + * 设置微信小店的Secret + */ + private String secret; + + /** + * 设置微信小店消息服务器配置的token. + */ + private String token; + + /** + * 设置微信小店消息服务器配置的EncodingAESKey + */ + private String aesKey; + + /** + * 消息格式,XML或者JSON + */ + private String msgDataFormat = "JSON"; + + /** + * 是否使用稳定版 Access Token + */ + private boolean useStableAccessToken = false; + + /** + * 自定义API主机地址,用于替换默认的 https://api.weixin.qq.com + * 例如:http://proxy.company.com:8080 + */ + private String apiHostUrl; + + /** + * 自定义获取AccessToken地址,用于向自定义统一服务获取AccessToken + * 例如:http://proxy.company.com:8080/oauth/token + */ + private String accessTokenUrl; + + /** + * 存储策略 + */ + private final ConfigStorage configStorage = new ConfigStorage(); + + @Data + public static class ConfigStorage { + + /** + * 存储类型 + */ + private StorageType type = StorageType.Memory; + + /** + * 指定key前缀 + */ + private String keyPrefix = "wh"; + + /** + * redis连接配置 + */ + @NestedConfigurationProperty + private final RedisProperties redis = new RedisProperties(); + + /** + * http客户端类型 + */ + private HttpClientType httpClientType = HttpClientType.HttpComponents; + + /** + * http代理主机 + */ + private String httpProxyHost; + + /** + * http代理端口 + */ + private Integer httpProxyPort; + + /** + * http代理用户名 + */ + private String httpProxyUsername; + + /** + * http代理密码 + */ + private String httpProxyPassword; + + /** + * http 请求重试间隔 + *
+     *   {@link com.binarywang.wxjava.store.api.BaseWxStoreService#setRetrySleepMillis(int)}
+     * 
+ */ + private int retrySleepMillis = 1000; + /** + * http 请求最大重试次数 + *
+     *   {@link com.binarywang.wxjava.store.api.BaseWxStoreService#setMaxRetryTimes(int)}
+     * 
+ */ + private int maxRetryTimes = 5; + } + +} diff --git a/spring-boot-starters/wx-java-store-spring-boot-starter/src/main/resources/META-INF/spring.factories b/spring-boot-starters/wx-java-store-spring-boot-starter/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000000..cbf38ae2c2 --- /dev/null +++ b/spring-boot-starters/wx-java-store-spring-boot-starter/src/main/resources/META-INF/spring.factories @@ -0,0 +1,2 @@ +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ + com.binarywang.spring.starter.wxjava.store.config.WxStoreAutoConfiguration diff --git a/spring-boot-starters/wx-java-store-spring-boot-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/spring-boot-starters/wx-java-store-spring-boot-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 0000000000..80044c332a --- /dev/null +++ b/spring-boot-starters/wx-java-store-spring-boot-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +com.binarywang.spring.starter.wxjava.store.config.WxStoreAutoConfiguration diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelAddressService.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelAddressService.java index 063dd53948..545d30b737 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelAddressService.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelAddressService.java @@ -12,7 +12,9 @@ * 视频号小店 地址管理服务 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.api.WxStoreAddressService}。 */ +@Deprecated public interface WxChannelAddressService { /** diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelAfterSaleService.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelAfterSaleService.java index 89d3c169be..2ff04faf1d 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelAfterSaleService.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelAfterSaleService.java @@ -12,7 +12,9 @@ * 视频号小店 售后服务接口 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.api.WxStoreAfterSaleService}。 */ +@Deprecated public interface WxChannelAfterSaleService { /** diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelBasicService.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelBasicService.java index 4d2133a56d..2f1a37f024 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelBasicService.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelBasicService.java @@ -15,7 +15,9 @@ * 基础接口 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.api.WxStoreBasicService}。 */ +@Deprecated public interface WxChannelBasicService { /** diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelBrandService.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelBrandService.java index 905d354955..8a5dda562c 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelBrandService.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelBrandService.java @@ -13,7 +13,9 @@ * 视频号小店 品牌服务接口 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.api.WxStoreBrandService}。 */ +@Deprecated public interface WxChannelBrandService { /** diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelCategoryService.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelCategoryService.java index ad86697614..f4129ffc19 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelCategoryService.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelCategoryService.java @@ -14,7 +14,9 @@ * * @author Zeyes * @see 新旧类目树差异 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.api.WxStoreCategoryService}。 */ +@Deprecated public interface WxChannelCategoryService { /** diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelCompassShopService.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelCompassShopService.java index aa3a85fa74..e742281289 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelCompassShopService.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelCompassShopService.java @@ -16,7 +16,9 @@ * 视频号/微信小店 罗盘商家版服务 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.api.WxStoreCompassShopService}。 */ +@Deprecated public interface WxChannelCompassShopService { /** diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelCouponService.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelCouponService.java index df59fdc8b9..309ac713a6 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelCouponService.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelCouponService.java @@ -15,7 +15,9 @@ * 视频号小店 优惠券服务 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.api.WxStoreCouponService}。 */ +@Deprecated public interface WxChannelCouponService { /** diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelEwaybillService.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelEwaybillService.java index 714f75b44b..cb96f5e3e0 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelEwaybillService.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelEwaybillService.java @@ -24,7 +24,9 @@ * 视频号小店电子面单服务接口 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.api.WxStoreEwaybillService}。 */ +@Deprecated public interface WxChannelEwaybillService { /** 获取可用的标准面单模板。 @return 模板配置 @throws WxErrorException 微信接口调用失败 */ diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelFavoriteService.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelFavoriteService.java index c1c03cc615..57998a76d1 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelFavoriteService.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelFavoriteService.java @@ -8,7 +8,9 @@ * * @author GitHub Copilot * @link 收藏管理接口文档 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.api.WxStoreFavoriteService}。 */ +@Deprecated public interface WxChannelFavoriteService { /** diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelFreightTemplateService.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelFreightTemplateService.java index 188b33464b..0bd617f465 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelFreightTemplateService.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelFreightTemplateService.java @@ -11,7 +11,9 @@ * 视频号小店 运费模板服务接口 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.api.WxStoreFreightTemplateService}。 */ +@Deprecated public interface WxChannelFreightTemplateService { /** diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelFundService.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelFundService.java index cb0f5aab79..7dcb1c76eb 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelFundService.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelFundService.java @@ -24,7 +24,9 @@ * 资金相关服务 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.api.WxStoreFundService}。 */ +@Deprecated public interface WxChannelFundService { /** diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelGiftService.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelGiftService.java index 23655e1905..ffea27a3a5 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelGiftService.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelGiftService.java @@ -12,7 +12,9 @@ /** * 微信小店赠品与买赠活动服务。 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.api.WxStoreGiftService}。 */ +@Deprecated public interface WxChannelGiftService { /** diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelKfService.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelKfService.java index 41fb153eb3..e1d28825e8 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelKfService.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelKfService.java @@ -4,7 +4,12 @@ import me.chanjar.weixin.channel.bean.kf.WxChannelKfSendMsgResponse; import me.chanjar.weixin.common.error.WxErrorException; -/** 视频号小店商家客服服务。 */ +/** + * 视频号小店商家客服服务。 + * + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.api.WxStoreKfService}。 + */ +@Deprecated public interface WxChannelKfService { /** diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelLimitedDiscountService.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelLimitedDiscountService.java index 40e6776f60..ef333f92f1 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelLimitedDiscountService.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelLimitedDiscountService.java @@ -10,7 +10,9 @@ /** * 微信小店限时抢购服务。 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.api.WxStoreLimitedDiscountService}。 */ +@Deprecated public interface WxChannelLimitedDiscountService { /** diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelOrderService.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelOrderService.java index e2da5c7a5b..c7f43496f2 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelOrderService.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelOrderService.java @@ -26,7 +26,9 @@ * * @author Zeyes * @link 订单接口文档 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.api.WxStoreOrderService}。 */ +@Deprecated public interface WxChannelOrderService { /** diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelProductAssistantService.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelProductAssistantService.java index 2f39249f0c..0bb0af5620 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelProductAssistantService.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelProductAssistantService.java @@ -15,7 +15,9 @@ /** * 微信小店商品辅助功能服务。 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.api.WxStoreProductAssistantService}。 */ +@Deprecated public interface WxChannelProductAssistantService { /** diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelProductService.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelProductService.java index fb019eefe5..095a7c482e 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelProductService.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelProductService.java @@ -51,7 +51,9 @@ * * @author Zeyes * @see 商品状态流转图 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.api.WxStoreProductService}。 */ +@Deprecated public interface WxChannelProductService { /** diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelProductStockService.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelProductStockService.java index dc2fa4f587..77b012de1f 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelProductStockService.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelProductStockService.java @@ -10,7 +10,9 @@ /** * 微信小店商品库存服务。 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.api.WxStoreProductStockService}。 */ +@Deprecated public interface WxChannelProductStockService { /** diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelQicService.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelQicService.java index df783b68c7..e1e6521614 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelQicService.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelQicService.java @@ -10,7 +10,9 @@ /** * 视频号小店 质检管理接口. + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.api.WxStoreQicService}。 */ +@Deprecated public interface WxChannelQicService { /** diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelService.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelService.java index 5a4c4d3d41..7d18e61c57 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelService.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelService.java @@ -11,7 +11,10 @@ public interface WxChannelService extends BaseWxChannelService { * 商家客服服务。 * * @return 商家客服服务 + + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.api.WxStoreService#getKfService()}。 */ + @Deprecated default WxChannelKfService getKfService() { throw new UnsupportedOperationException("WxChannelService implementation does not support getKfService()"); } @@ -20,35 +23,50 @@ default WxChannelKfService getKfService() { * 基础接口服务 * * @return 基础接口服务 + + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.api.WxStoreService#getBasicService()}。 */ + @Deprecated WxChannelBasicService getBasicService(); /** * 商品类目服务 * * @return 商品类目服务 + + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.api.WxStoreService#getCategoryService()}。 */ + @Deprecated WxChannelCategoryService getCategoryService(); /** * 品牌服务 * * @return 品牌服务 + + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.api.WxStoreService#getBrandService()}。 */ + @Deprecated WxChannelBrandService getBrandService(); /** * 商品服务 * * @return 商品服务 + + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.api.WxStoreService#getProductService()}。 */ + @Deprecated WxChannelProductService getProductService(); /** * 赠品与买赠活动服务 * * @return 赠品与买赠活动服务 + + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.api.WxStoreService#getGiftService()}。 */ + @Deprecated default WxChannelGiftService getGiftService() { throw new UnsupportedOperationException("Gift service is not supported by this implementation"); } @@ -57,7 +75,10 @@ default WxChannelGiftService getGiftService() { * 限时抢购服务 * * @return 限时抢购服务 + + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.api.WxStoreService#getLimitedDiscountService()}。 */ + @Deprecated default WxChannelLimitedDiscountService getLimitedDiscountService() { throw new UnsupportedOperationException("Limited discount service is not supported by this implementation"); } @@ -66,7 +87,10 @@ default WxChannelLimitedDiscountService getLimitedDiscountService() { * 商品库存服务 * * @return 商品库存服务 + + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.api.WxStoreService#getProductStockService()}。 */ + @Deprecated default WxChannelProductStockService getProductStockService() { throw new UnsupportedOperationException("Product stock service is not supported by this implementation"); } @@ -75,7 +99,10 @@ default WxChannelProductStockService getProductStockService() { * 商品辅助功能服务 * * @return 商品辅助功能服务 + + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.api.WxStoreService#getProductAssistantService()}。 */ + @Deprecated default WxChannelProductAssistantService getProductAssistantService() { throw new UnsupportedOperationException("Product assistant service is not supported by this implementation"); } @@ -84,77 +111,110 @@ default WxChannelProductAssistantService getProductAssistantService() { * 仓库服务 * * @return 仓库服务 + + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.api.WxStoreService#getWarehouseService()}。 */ + @Deprecated WxChannelWarehouseService getWarehouseService(); /** * 订单服务 * * @return 订单服务 + + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.api.WxStoreService#getOrderService()}。 */ + @Deprecated WxChannelOrderService getOrderService(); /** * 售后服务 * * @return 售后服务 + + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.api.WxStoreService#getAfterSaleService()}。 */ + @Deprecated WxChannelAfterSaleService getAfterSaleService(); /** * 运费模板服务 * * @return 运费模板服务 + + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.api.WxStoreService#getFreightTemplateService()}。 */ + @Deprecated WxChannelFreightTemplateService getFreightTemplateService(); /** * 地址服务 * * @return 地址服务 + + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.api.WxStoreService#getAddressService()}。 */ + @Deprecated WxChannelAddressService getAddressService(); /** * 优惠券服务 * * @return 优惠券服务 + + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.api.WxStoreService#getCouponService()}。 */ + @Deprecated WxChannelCouponService getCouponService(); /** * 分享员服务 * * @return 分享员服务 + + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.api.WxStoreService#getSharerService()}。 */ + @Deprecated WxChannelSharerService getSharerService(); /** * 资金服务 * * @return 资金服务 + + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.api.WxStoreService#getFundService()}。 */ + @Deprecated WxChannelFundService getFundService(); /** * 主页管理服务 * * @return 主页管理服务 + + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.api.WxStoreService#getHomePageService()}。 */ + @Deprecated WxStoreHomePageService getHomePageService(); /** * 合作账号服务 * * @return 团长合作服务 + + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.api.WxStoreService#getCooperationService()}。 */ + @Deprecated WxStoreCooperationService getCooperationService(); /** * 视频号/微信小店 罗盘商家版服务 * * @return 罗盘商家版服务 + + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.api.WxStoreService#getCompassShopService()}。 */ + @Deprecated WxChannelCompassShopService getCompassShopService(); /** @@ -168,7 +228,10 @@ default WxChannelProductAssistantService getProductAssistantService() { * 代发管理服务 * * @return 代发管理服务 + + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.api.WxStoreService#getSupplierService()}。 */ + @Deprecated WxChannelSupplierService getSupplierService(); /** @@ -217,7 +280,10 @@ default WxChannelProductAssistantService getProductAssistantService() { * 会员功能 * * @return 会员服务 + + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.api.WxStoreService#getVipService()}。 */ + @Deprecated WxChannelVipService getVipService(); /** @@ -238,7 +304,10 @@ default WxChannelProductAssistantService getProductAssistantService() { * 质检管理服务. * * @return 质检管理服务 + + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.api.WxStoreService#getQicService()}。 */ + @Deprecated WxChannelQicService getQicService(); /** @@ -252,14 +321,20 @@ default WxChannelProductAssistantService getProductAssistantService() { * 收藏管理服务 * * @return 收藏管理服务 + + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.api.WxStoreService#getFavoriteService()}。 */ + @Deprecated WxChannelFavoriteService getFavoriteService(); /** * 电子面单服务 * * @return 电子面单服务 + + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.api.WxStoreService#getEwaybillService()}。 */ + @Deprecated default WxChannelEwaybillService getEwaybillService() { throw new UnsupportedOperationException("当前 WxChannelService 实现不支持电子面单服务"); } diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelSharerService.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelSharerService.java index 300493158b..c802a23071 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelSharerService.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelSharerService.java @@ -13,7 +13,9 @@ * 视频号小店 分享员服务接口 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.api.WxStoreSharerService}。 */ +@Deprecated public interface WxChannelSharerService { /** diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelSupplierService.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelSupplierService.java index 35e46b6dca..48aa0a97c0 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelSupplierService.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelSupplierService.java @@ -19,7 +19,9 @@ * * @author GitHub Copilot * @see 代发管理接口文档 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.api.WxStoreSupplierService}。 */ +@Deprecated public interface WxChannelSupplierService { /** 获取供货商列表。 */ diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelVipService.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelVipService.java index 4100659200..1ca08ff69f 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelVipService.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelVipService.java @@ -11,7 +11,9 @@ * * @author aushiye * @link 会员功能接口文档 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.api.WxStoreVipService}。 */ +@Deprecated public interface WxChannelVipService { /** 拉取用户详情 */ // String VIP_USER_INFO_URL = "https://api.weixin.qq.com/channels/ec/vip/user/info/get"; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelWarehouseService.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelWarehouseService.java index 1bb00885f5..4d9a60a7d0 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelWarehouseService.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelWarehouseService.java @@ -18,7 +18,9 @@ * 视频号小店 区域仓库服务 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.api.WxStoreWarehouseService}。 */ +@Deprecated public interface WxChannelWarehouseService { /** diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxStoreCooperationService.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxStoreCooperationService.java index 96d2ff5f8d..477dfec384 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxStoreCooperationService.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxStoreCooperationService.java @@ -11,7 +11,9 @@ * * @author Zeyes * @see 合作账号状态机 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.api.WxStoreCooperationService}。 */ +@Deprecated public interface WxStoreCooperationService { /** diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxStoreHomePageService.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxStoreHomePageService.java index bd11e471b3..5d6d975105 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxStoreHomePageService.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxStoreHomePageService.java @@ -19,7 +19,9 @@ * 微信小店 主页管理相关接口 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.api.WxStoreHomePageService}。 */ +@Deprecated public interface WxStoreHomePageService { /** diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxTalentService.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxTalentService.java index e03cdbf502..c5737443ad 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxTalentService.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxTalentService.java @@ -14,7 +14,9 @@ * 微信小店-带货助手服务接口 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.api.WxTalentService}。 */ +@Deprecated public interface WxTalentService { /** diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/address/AddressAddParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/address/AddressAddParam.java index a831de6655..71f7c5b966 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/address/AddressAddParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/address/AddressAddParam.java @@ -12,11 +12,13 @@ * 地址 请求参数 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.address.AddressAddParam}。 */ @Data @NoArgsConstructor @AllArgsConstructor @JsonInclude(Include.NON_NULL) +@Deprecated public class AddressAddParam implements Serializable { private static final long serialVersionUID = 6778585213498438738L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/address/AddressCode.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/address/AddressCode.java index c7c885f0ab..9f212daa22 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/address/AddressCode.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/address/AddressCode.java @@ -9,9 +9,11 @@ * 地址编码 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.address.AddressCode}。 */ @Data @NoArgsConstructor +@Deprecated public class AddressCode implements Serializable { private static final long serialVersionUID = -6782328785056142627L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/address/AddressCodeResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/address/AddressCodeResponse.java index 09ede50c38..df9559fee6 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/address/AddressCodeResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/address/AddressCodeResponse.java @@ -11,10 +11,12 @@ * 地址编码 响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.address.AddressCodeResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class AddressCodeResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -8994407971295563982L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/address/AddressDetail.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/address/AddressDetail.java index 88f4945e20..f3dde94a28 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/address/AddressDetail.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/address/AddressDetail.java @@ -11,10 +11,12 @@ * 用户地址 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.address.AddressDetail}。 */ @Data @NoArgsConstructor @JsonInclude(JsonInclude.Include.NON_NULL) +@Deprecated public class AddressDetail implements Serializable { private static final long serialVersionUID = -7839578838482198641L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/address/AddressIdParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/address/AddressIdParam.java index d1eb7e0b46..1306fbf8ed 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/address/AddressIdParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/address/AddressIdParam.java @@ -12,11 +12,13 @@ * 地址id 请求参数 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.address.AddressIdParam}。 */ @Data @NoArgsConstructor @AllArgsConstructor @JsonInclude(Include.NON_NULL) +@Deprecated public class AddressIdParam implements Serializable { private static final long serialVersionUID = -7001183932180608746L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/address/AddressIdResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/address/AddressIdResponse.java index f6505efa15..df580bc2e4 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/address/AddressIdResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/address/AddressIdResponse.java @@ -11,11 +11,13 @@ * 地址id 响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.address.AddressIdResponse}。 */ @Data @NoArgsConstructor @AllArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class AddressIdResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -9218327846685744008L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/address/AddressInfoResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/address/AddressInfoResponse.java index 957d0162a8..f77f562e34 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/address/AddressInfoResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/address/AddressInfoResponse.java @@ -10,10 +10,12 @@ * 地址id 响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.address.AddressInfoResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class AddressInfoResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 8203853673226715673L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/address/AddressListParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/address/AddressListParam.java index c62cf39fb8..559d249250 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/address/AddressListParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/address/AddressListParam.java @@ -11,11 +11,13 @@ * 用户地址 列表 请求参数 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.address.AddressListParam}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) @JsonInclude(Include.NON_NULL) +@Deprecated public class AddressListParam extends OffsetParam { private static final long serialVersionUID = -4434287264623932176L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/address/AddressListResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/address/AddressListResponse.java index b8846f9aa3..b18d399710 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/address/AddressListResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/address/AddressListResponse.java @@ -11,10 +11,12 @@ * 地址列表 响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.address.AddressListResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class AddressListResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -3997164605170764105L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/address/OfflineAddressType.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/address/OfflineAddressType.java index 81dd169399..12345f2a52 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/address/OfflineAddressType.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/address/OfflineAddressType.java @@ -10,10 +10,12 @@ * 线下配送地址类型 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.address.OfflineAddressType}。 */ @Data @NoArgsConstructor @AllArgsConstructor +@Deprecated public class OfflineAddressType implements Serializable { private static final long serialVersionUID = 636850757572901377L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleAcceptExchangeReshipParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleAcceptExchangeReshipParam.java index 66be1c715d..1f48cbe348 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleAcceptExchangeReshipParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleAcceptExchangeReshipParam.java @@ -8,9 +8,11 @@ * 售后单换货发货信息 * * @author Chu + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.after.AfterSaleAcceptExchangeReshipParam}。 */ @Data @JsonInclude(JsonInclude.Include.NON_NULL) +@Deprecated public class AfterSaleAcceptExchangeReshipParam extends AfterSaleIdParam { private static final long serialVersionUID = -7946679037747710613L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleAcceptParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleAcceptParam.java index 32ad9154ee..13b0bc2f84 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleAcceptParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleAcceptParam.java @@ -9,9 +9,11 @@ * 售后单同意信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.after.AfterSaleAcceptParam}。 */ @Data @JsonInclude(Include.NON_NULL) +@Deprecated public class AfterSaleAcceptParam extends AfterSaleIdParam { private static final long serialVersionUID = -4352801757159074950L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleCreateResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleCreateResponse.java index 64b3b8f4cf..268bf9814f 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleCreateResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleCreateResponse.java @@ -5,8 +5,12 @@ import lombok.EqualsAndHashCode; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; +/** + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.after.AfterSaleCreateResponse}。 + */ @Data @EqualsAndHashCode(callSuper = true) +@Deprecated public class AfterSaleCreateResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 2680676438284658410L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleDetail.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleDetail.java index aa1e7b400f..9c5780b20c 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleDetail.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleDetail.java @@ -10,9 +10,11 @@ * 售后详情 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.after.AfterSaleDetail}。 */ @Data @NoArgsConstructor +@Deprecated public class AfterSaleDetail implements Serializable { private static final long serialVersionUID = -8130659179770831047L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleExchangeDeliveryInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleExchangeDeliveryInfo.java index 277d9d4d89..2fbd7b482d 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleExchangeDeliveryInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleExchangeDeliveryInfo.java @@ -10,9 +10,11 @@ * 换货类型的发货物流信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.after.AfterSaleExchangeDeliveryInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class AfterSaleExchangeDeliveryInfo implements Serializable { private static final long serialVersionUID = 3039216368034112038L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleExchangeProductInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleExchangeProductInfo.java index a73d6ae310..d279d78f56 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleExchangeProductInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleExchangeProductInfo.java @@ -9,9 +9,11 @@ * 换货商品信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.after.AfterSaleExchangeProductInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class AfterSaleExchangeProductInfo implements Serializable { private static final long serialVersionUID = -1341436607011117854L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleGenAfterSaleOrderParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleGenAfterSaleOrderParam.java index 50928e7cdc..ec2ec1c703 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleGenAfterSaleOrderParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleGenAfterSaleOrderParam.java @@ -5,9 +5,13 @@ import lombok.Data; import lombok.EqualsAndHashCode; +/** + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.after.AfterSaleGenAfterSaleOrderParam}。 + */ @Data @EqualsAndHashCode(callSuper = true) @JsonInclude(JsonInclude.Include.NON_NULL) +@Deprecated public class AfterSaleGenAfterSaleOrderParam extends AfterSaleRefundPriceDiffParam { private static final long serialVersionUID = -6873909673739068936L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleHandleFastExchangeReceiptParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleHandleFastExchangeReceiptParam.java index 13c24f3f5d..05af300f2f 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleHandleFastExchangeReceiptParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleHandleFastExchangeReceiptParam.java @@ -6,9 +6,13 @@ import lombok.Data; import lombok.EqualsAndHashCode; +/** + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.after.AfterSaleHandleFastExchangeReceiptParam}。 + */ @Data @EqualsAndHashCode(callSuper = true) @JsonInclude(JsonInclude.Include.NON_NULL) +@Deprecated public class AfterSaleHandleFastExchangeReceiptParam extends AfterSaleIdParam { private static final long serialVersionUID = 5430106715116197677L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleIdParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleIdParam.java index 1e16a72395..8eec8569ec 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleIdParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleIdParam.java @@ -12,11 +12,13 @@ * 售后单id信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.after.AfterSaleIdParam}。 */ @Data @NoArgsConstructor @AllArgsConstructor @JsonInclude(Include.NON_NULL) +@Deprecated public class AfterSaleIdParam implements Serializable { private static final long serialVersionUID = 4974332291476116540L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleInfo.java index d465766d75..d7309b0be4 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleInfo.java @@ -9,9 +9,11 @@ * 售后单信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.after.AfterSaleInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class AfterSaleInfo implements Serializable { private static final long serialVersionUID = 6595670817781635247L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleInfoResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleInfoResponse.java index adedf72f03..c9f31b77d9 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleInfoResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleInfoResponse.java @@ -10,10 +10,12 @@ * 售后单 响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.after.AfterSaleInfoResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class AfterSaleInfoResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -752661975153491902L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleListParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleListParam.java index a477a2c581..86ae7825f3 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleListParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleListParam.java @@ -12,11 +12,13 @@ * 售后单列表 请求参数 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.after.AfterSaleListParam}。 */ @Data @NoArgsConstructor @AllArgsConstructor @JsonInclude(Include.NON_NULL) +@Deprecated public class AfterSaleListParam implements Serializable { private static final long serialVersionUID = -103549981452112069L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleListResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleListResponse.java index dde39238a7..1fbc115f2c 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleListResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleListResponse.java @@ -11,10 +11,12 @@ * 售后单列表 响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.after.AfterSaleListResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class AfterSaleListResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 5033313416948732123L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleMerchantUpdateParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleMerchantUpdateParam.java index 275577e1df..808091cbe5 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleMerchantUpdateParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleMerchantUpdateParam.java @@ -10,9 +10,11 @@ * 售后单商家协商信息 * * @author Chu + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.after.AfterSaleMerchantUpdateParam}。 */ @Data @JsonInclude(JsonInclude.Include.NON_NULL) +@Deprecated public class AfterSaleMerchantUpdateParam extends AfterSaleIdParam { private static final long serialVersionUID = -3672834150982780L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleProductInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleProductInfo.java index ffcaf320ca..a74283350c 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleProductInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleProductInfo.java @@ -9,9 +9,11 @@ * 售后相关商品信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.after.AfterSaleProductInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class AfterSaleProductInfo implements Serializable { private static final long serialVersionUID = 4205179093262757775L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleReason.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleReason.java index 7c66eff18f..9efb0fc02f 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleReason.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleReason.java @@ -11,9 +11,11 @@ * * @author lizhengwu * @date 2024/7/24 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.after.AfterSaleReason}。 */ @Data @NoArgsConstructor +@Deprecated public class AfterSaleReason implements Serializable { private static final long serialVersionUID = -3674527884494606230L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleReasonResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleReasonResponse.java index 7372dea1f1..79d9a6714f 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleReasonResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleReasonResponse.java @@ -13,10 +13,12 @@ * * * @author lizhengwu + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.after.AfterSaleReasonResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode +@Deprecated public class AfterSaleReasonResponse extends WxChannelBaseResponse { diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleRefundPriceDiffParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleRefundPriceDiffParam.java index e6dfd08449..7949fe98f3 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleRefundPriceDiffParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleRefundPriceDiffParam.java @@ -5,8 +5,12 @@ import java.io.Serializable; import lombok.Data; +/** + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.after.AfterSaleRefundPriceDiffParam}。 + */ @Data @JsonInclude(JsonInclude.Include.NON_NULL) +@Deprecated public class AfterSaleRefundPriceDiffParam implements Serializable { private static final long serialVersionUID = 3875058376021518123L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleRejectExchangeReshipParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleRejectExchangeReshipParam.java index 668ffa11e9..6097ea6fb5 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleRejectExchangeReshipParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleRejectExchangeReshipParam.java @@ -10,9 +10,11 @@ * 售后单换货拒绝发货信息 * * @author Chu + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.after.AfterSaleRejectExchangeReshipParam}。 */ @Data @JsonInclude(JsonInclude.Include.NON_NULL) +@Deprecated public class AfterSaleRejectExchangeReshipParam extends AfterSaleIdParam { private static final long serialVersionUID = -7946679037747710613L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleRejectParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleRejectParam.java index 6b19a8058c..3aefc8b4e8 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleRejectParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleRejectParam.java @@ -11,9 +11,11 @@ * 售后单拒绝信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.after.AfterSaleRejectParam}。 */ @Data @JsonInclude(Include.NON_NULL) +@Deprecated public class AfterSaleRejectParam extends AfterSaleIdParam { private static final long serialVersionUID = -7507483859864253314L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleRejectReason.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleRejectReason.java index 7987153ec0..4f4b70b4e7 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleRejectReason.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleRejectReason.java @@ -11,9 +11,11 @@ * * @author lizhengwu * @date 2024/7/24 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.after.AfterSaleRejectReason}。 */ @Data @NoArgsConstructor +@Deprecated public class AfterSaleRejectReason implements Serializable { private static final long serialVersionUID = -3672834150982780L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleRejectReasonResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleRejectReasonResponse.java index 7b50691d00..06c1256c5f 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleRejectReasonResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleRejectReasonResponse.java @@ -12,10 +12,12 @@ * 售后原因 * * @author lizhengwu + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.after.AfterSaleRejectReasonResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode +@Deprecated public class AfterSaleRejectReasonResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -7946679037747710613L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleReturnParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleReturnParam.java index 47e815c8dd..d2a0502c27 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleReturnParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleReturnParam.java @@ -9,8 +9,10 @@ * 退货信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.after.AfterSaleReturnParam}。 */ @Data +@Deprecated public class AfterSaleReturnParam implements Serializable { private static final long serialVersionUID = -1101993925465293521L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleVirtualNumberInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleVirtualNumberInfo.java index 4366fa5ce9..ab37c18ebc 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleVirtualNumberInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleVirtualNumberInfo.java @@ -9,9 +9,11 @@ * 虚拟号码信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.after.AfterSaleVirtualNumberInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class AfterSaleVirtualNumberInfo implements Serializable { private static final long serialVersionUID = -5756618937333859985L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleVirtualTelNumResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleVirtualTelNumResponse.java index c78d72e7cb..8a40fdec43 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleVirtualTelNumResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/AfterSaleVirtualTelNumResponse.java @@ -5,8 +5,12 @@ import lombok.EqualsAndHashCode; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; +/** + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.after.AfterSaleVirtualTelNumResponse}。 + */ @Data @EqualsAndHashCode(callSuper = true) +@Deprecated public class AfterSaleVirtualTelNumResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -2715343569103426942L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/ExchangeSkuInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/ExchangeSkuInfo.java index 696f912ef2..929e3560b6 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/ExchangeSkuInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/ExchangeSkuInfo.java @@ -5,8 +5,12 @@ import java.io.Serializable; import lombok.Data; +/** + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.after.ExchangeSkuInfo}。 + */ @Data @JsonInclude(JsonInclude.Include.NON_NULL) +@Deprecated public class ExchangeSkuInfo implements Serializable { private static final long serialVersionUID = 1L; @JsonProperty("new_sku_id") diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeMerchantModifyParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeMerchantModifyParam.java index 914cd908e9..41be302aed 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeMerchantModifyParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeMerchantModifyParam.java @@ -5,9 +5,13 @@ import lombok.Data; import lombok.EqualsAndHashCode; +/** + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.after.GuaranteeMerchantModifyParam}。 + */ @Data @EqualsAndHashCode(callSuper = true) @JsonInclude(JsonInclude.Include.NON_NULL) +@Deprecated public class GuaranteeMerchantModifyParam extends GuaranteeOrderIdParam { private static final long serialVersionUID = 9193536167701367687L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeMerchantProofParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeMerchantProofParam.java index e7760deaa7..3501bff266 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeMerchantProofParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeMerchantProofParam.java @@ -5,9 +5,13 @@ import lombok.Data; import lombok.EqualsAndHashCode; +/** + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.after.GuaranteeMerchantProofParam}。 + */ @Data @EqualsAndHashCode(callSuper = true) @JsonInclude(JsonInclude.Include.NON_NULL) +@Deprecated public class GuaranteeMerchantProofParam extends GuaranteeOrderIdParam { private static final long serialVersionUID = -2365495841866160967L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeModifyRequest.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeModifyRequest.java index 0141ac05d5..c6d7786f8c 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeModifyRequest.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeModifyRequest.java @@ -9,11 +9,13 @@ /** * 商家协商保障单请求参数。 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.after.GuaranteeModifyRequest}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) @JsonInclude(Include.NON_NULL) +@Deprecated public class GuaranteeModifyRequest extends GuaranteeOrderIdParam { private static final long serialVersionUID = 4268864541609439068L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderIdParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderIdParam.java index 930e82422a..2fb99a097d 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderIdParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderIdParam.java @@ -10,11 +10,13 @@ /** * 保障单号参数。 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.after.GuaranteeOrderIdParam}。 */ @Data @NoArgsConstructor @AllArgsConstructor @JsonInclude(Include.NON_NULL) +@Deprecated public class GuaranteeOrderIdParam implements Serializable { private static final long serialVersionUID = -6638498743123537413L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderInfoResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderInfoResponse.java index 7b286807a5..c7c2301aec 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderInfoResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderInfoResponse.java @@ -9,10 +9,12 @@ /** * 保障单详情响应。 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.after.GuaranteeOrderInfoResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class GuaranteeOrderInfoResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 7354122991247317485L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderListParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderListParam.java index fbe11f91ef..a5c64c629a 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderListParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderListParam.java @@ -10,10 +10,12 @@ /** * 保障单列表请求参数。 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.after.GuaranteeOrderListParam}。 */ @Data @NoArgsConstructor @JsonInclude(Include.NON_NULL) +@Deprecated public class GuaranteeOrderListParam implements Serializable { private static final long serialVersionUID = 1622570776364341988L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderListResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderListResponse.java index 90daa0cc11..defb95b909 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderListResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderListResponse.java @@ -10,10 +10,12 @@ /** * 保障单列表响应。 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.after.GuaranteeOrderListResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class GuaranteeOrderListResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 9105476087203713187L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderResponse.java index 6f6256a9db..d3909cf10e 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderResponse.java @@ -6,8 +6,12 @@ import lombok.EqualsAndHashCode; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; +/** + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.after.GuaranteeOrderResponse}。 + */ @Data @EqualsAndHashCode(callSuper = true) +@Deprecated public class GuaranteeOrderResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 3977781489692530604L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeProofRequest.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeProofRequest.java index 7bd1a95f38..8a6d29b885 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeProofRequest.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeProofRequest.java @@ -10,11 +10,13 @@ /** * 商家举证保障单请求参数。 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.after.GuaranteeProofRequest}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) @JsonInclude(Include.NON_NULL) +@Deprecated public class GuaranteeProofRequest extends GuaranteeOrderIdParam { private static final long serialVersionUID = 6599721896742974275L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeRefuseRequest.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeRefuseRequest.java index be967ebff7..0e67312cca 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeRefuseRequest.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeRefuseRequest.java @@ -10,11 +10,13 @@ /** * 商家拒绝保障单请求参数。 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.after.GuaranteeRefuseRequest}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) @JsonInclude(Include.NON_NULL) +@Deprecated public class GuaranteeRefuseRequest extends GuaranteeOrderIdParam { private static final long serialVersionUID = -6905594717805091393L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/MerchantUploadInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/MerchantUploadInfo.java index 805c3a3f6e..1ce46042fe 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/MerchantUploadInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/MerchantUploadInfo.java @@ -10,9 +10,11 @@ * 商家上传的信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.after.MerchantUploadInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class MerchantUploadInfo implements Serializable { private static final long serialVersionUID = 373513419356603563L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/RefundEvidenceParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/RefundEvidenceParam.java index c81ae042d4..e3cd1dccc9 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/RefundEvidenceParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/RefundEvidenceParam.java @@ -12,11 +12,13 @@ * 退款凭证信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.after.RefundEvidenceParam}。 */ @Data @NoArgsConstructor @AllArgsConstructor @JsonInclude(JsonInclude.Include.NON_NULL) +@Deprecated public class RefundEvidenceParam implements Serializable { private static final long serialVersionUID = 2117305897849528009L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/RefundInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/RefundInfo.java index 73aedf99cf..d87875d7e9 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/RefundInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/RefundInfo.java @@ -9,9 +9,11 @@ * 退款信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.after.RefundInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class RefundInfo implements Serializable { private static final long serialVersionUID = -6994243947898889309L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/RefundResp.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/RefundResp.java index 83b7039a77..96f639e607 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/RefundResp.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/RefundResp.java @@ -9,9 +9,11 @@ * 退款结果 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.after.RefundResp}。 */ @Data @NoArgsConstructor +@Deprecated public class RefundResp implements Serializable { private static final long serialVersionUID = 6549707043779644156L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/ReturnInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/ReturnInfo.java index 08238d5484..3f3e0a1066 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/ReturnInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/ReturnInfo.java @@ -9,9 +9,11 @@ * 用户退货信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.after.ReturnInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class ReturnInfo implements Serializable { private static final long serialVersionUID = 1643844664701376892L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/SyncWorkOrderParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/SyncWorkOrderParam.java index 9416bf021e..4408ec16c3 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/SyncWorkOrderParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/SyncWorkOrderParam.java @@ -6,8 +6,12 @@ import java.util.List; import lombok.Data; +/** + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.after.SyncWorkOrderParam}。 + */ @Data @JsonInclude(JsonInclude.Include.NON_NULL) +@Deprecated public class SyncWorkOrderParam implements Serializable { private static final long serialVersionUID = -7336088606071452113L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/audit/AuditApplyResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/audit/AuditApplyResponse.java index 547207c82b..7963c8ea7b 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/audit/AuditApplyResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/audit/AuditApplyResponse.java @@ -10,10 +10,12 @@ * 审核提交结果响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.audit.AuditApplyResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class AuditApplyResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -3950614749162384497L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/audit/AuditResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/audit/AuditResponse.java index 3ef07387d1..af2e31497b 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/audit/AuditResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/audit/AuditResponse.java @@ -10,10 +10,12 @@ * 审核结果响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.audit.AuditResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class AuditResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 9218713381520774914L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/audit/AuditResult.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/audit/AuditResult.java index 89aaa8a267..2d0edf0a13 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/audit/AuditResult.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/audit/AuditResult.java @@ -9,9 +9,11 @@ * 审核结果 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.audit.AuditResult}。 */ @Data @NoArgsConstructor +@Deprecated public class AuditResult implements Serializable { private static final long serialVersionUID = 1846416634865665240L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/audit/CategoryAuditInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/audit/CategoryAuditInfo.java index 485092704d..516debd10a 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/audit/CategoryAuditInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/audit/CategoryAuditInfo.java @@ -12,11 +12,13 @@ * 类目审核信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.audit.CategoryAuditInfo}。 */ @Data @NoArgsConstructor @AllArgsConstructor @JsonInclude(JsonInclude.Include.NON_NULL) +@Deprecated public class CategoryAuditInfo implements Serializable { private static final long serialVersionUID = -8792967130645424788L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/audit/CategoryAuditRequest.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/audit/CategoryAuditRequest.java index a311bf0d2f..a3bf73cc09 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/audit/CategoryAuditRequest.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/audit/CategoryAuditRequest.java @@ -10,10 +10,12 @@ * 类目审核信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.audit.CategoryAuditRequest}。 */ @Data @NoArgsConstructor @AllArgsConstructor +@Deprecated public class CategoryAuditRequest implements Serializable { private static final long serialVersionUID = -1151634735247657643L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/audit/CategoryBrand.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/audit/CategoryBrand.java index 632096e4d2..058c224004 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/audit/CategoryBrand.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/audit/CategoryBrand.java @@ -10,10 +10,12 @@ * 分类中的品牌 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.audit.CategoryBrand}。 */ @Data @NoArgsConstructor @AllArgsConstructor +@Deprecated public class CategoryBrand implements Serializable { private static final long serialVersionUID = -5437441266080209907L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/audit/CatsV2.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/audit/CatsV2.java index b7cc6f39bc..c77ad5fcea 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/audit/CatsV2.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/audit/CatsV2.java @@ -9,10 +9,12 @@ /** * 新类目树类目ID * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.audit.CatsV2}。 */ @Data @NoArgsConstructor @AllArgsConstructor +@Deprecated public class CatsV2 implements Serializable { private static final long serialVersionUID = -2484092110142035589L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/audit/ProductAuditInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/audit/ProductAuditInfo.java index 7693f23ed3..814bcf6755 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/audit/ProductAuditInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/audit/ProductAuditInfo.java @@ -9,9 +9,11 @@ * 商品审核信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.audit.ProductAuditInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class ProductAuditInfo implements Serializable { private static final long serialVersionUID = -5264206679057480206L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/base/AddressInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/base/AddressInfo.java index 3c713840a4..df752977b2 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/base/AddressInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/base/AddressInfo.java @@ -10,10 +10,12 @@ * 地址信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.base.AddressInfo}。 */ @Data @NoArgsConstructor @Accessors(chain = true) +@Deprecated public class AddressInfo implements Serializable { private static final long serialVersionUID = 6928300709804576100L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/base/AttrInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/base/AttrInfo.java index ca6ce7a750..c50f528a00 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/base/AttrInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/base/AttrInfo.java @@ -10,10 +10,12 @@ * 属性 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.base.AttrInfo}。 */ @Data @NoArgsConstructor @AllArgsConstructor +@Deprecated public class AttrInfo implements Serializable { private static final long serialVersionUID = -790859309885311785L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/base/OffsetParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/base/OffsetParam.java index ebfad1bf21..10dc30d7b3 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/base/OffsetParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/base/OffsetParam.java @@ -12,11 +12,13 @@ * 偏移参数 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.base.OffsetParam}。 */ @Data @NoArgsConstructor @AllArgsConstructor @JsonInclude(Include.NON_NULL) +@Deprecated public class OffsetParam implements Serializable { private static final long serialVersionUID = -1268796871980541662L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/base/PageParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/base/PageParam.java index d76e48d3b6..dde4e6bc0c 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/base/PageParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/base/PageParam.java @@ -10,10 +10,12 @@ * 分页参数 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.base.PageParam}。 */ @Data @NoArgsConstructor @AllArgsConstructor +@Deprecated public class PageParam implements Serializable { private static final long serialVersionUID = -2606033044242617845L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/base/StreamPageParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/base/StreamPageParam.java index 6f3fb76d71..0a1f02f83a 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/base/StreamPageParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/base/StreamPageParam.java @@ -10,10 +10,12 @@ * 流式分页参数 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.base.StreamPageParam}。 */ @Data @NoArgsConstructor @AllArgsConstructor +@Deprecated public class StreamPageParam implements Serializable { private static final long serialVersionUID = -4098060161712929196L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/base/TimeRange.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/base/TimeRange.java index f681794835..39ae602166 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/base/TimeRange.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/base/TimeRange.java @@ -9,9 +9,11 @@ * 时间范围 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.base.TimeRange}。 */ @Data @NoArgsConstructor +@Deprecated public class TimeRange implements Serializable { private static final long serialVersionUID = -8149679871789511479L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/base/WxChannelBaseResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/base/WxChannelBaseResponse.java index b20d7f4b33..36732574ed 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/base/WxChannelBaseResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/base/WxChannelBaseResponse.java @@ -8,7 +8,9 @@ * 视频号小店 基础响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse}。 */ +@Deprecated public class WxChannelBaseResponse implements Serializable { private static final long serialVersionUID = 3141420881984171781L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/brand/BasicBrand.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/brand/BasicBrand.java index 714740f843..63e366943d 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/brand/BasicBrand.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/brand/BasicBrand.java @@ -9,9 +9,11 @@ * 基础品牌信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.brand.BasicBrand}。 */ @Data @NoArgsConstructor +@Deprecated public class BasicBrand implements Serializable { private static final long serialVersionUID = -1991771439710177859L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/brand/Brand.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/brand/Brand.java index 92f4f41acc..37ad02c4af 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/brand/Brand.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/brand/Brand.java @@ -10,11 +10,13 @@ * 品牌信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.brand.Brand}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) @JsonInclude(JsonInclude.Include.NON_NULL) +@Deprecated public class Brand extends BasicBrand { private static final long serialVersionUID = 4648597514861057019L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/brand/BrandApplicationDetail.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/brand/BrandApplicationDetail.java index 48575f27cd..ebdbb27e9e 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/brand/BrandApplicationDetail.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/brand/BrandApplicationDetail.java @@ -10,9 +10,11 @@ * 商标申请信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.brand.BrandApplicationDetail}。 */ @Data @NoArgsConstructor +@Deprecated public class BrandApplicationDetail implements Serializable { private static final long serialVersionUID = 2145344855482129473L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/brand/BrandApplyListResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/brand/BrandApplyListResponse.java index 16e7f3ae82..7530bd0c78 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/brand/BrandApplyListResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/brand/BrandApplyListResponse.java @@ -11,10 +11,12 @@ * 品牌申请列表响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.brand.BrandApplyListResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class BrandApplyListResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 243021267020609148L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/brand/BrandGrantDetail.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/brand/BrandGrantDetail.java index 6b4826fcd4..4f90819308 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/brand/BrandGrantDetail.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/brand/BrandGrantDetail.java @@ -10,9 +10,11 @@ * 商标授权信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.brand.BrandGrantDetail}。 */ @Data @NoArgsConstructor +@Deprecated public class BrandGrantDetail implements Serializable { private static final long serialVersionUID = 3537812707384823606L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/brand/BrandInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/brand/BrandInfo.java index 799002369d..f7dd7c485d 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/brand/BrandInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/brand/BrandInfo.java @@ -10,10 +10,12 @@ * 品牌信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.brand.BrandInfo}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class BrandInfo extends Brand { private static final long serialVersionUID = 5464505958132626159L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/brand/BrandInfoResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/brand/BrandInfoResponse.java index 20536b5a07..573923e209 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/brand/BrandInfoResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/brand/BrandInfoResponse.java @@ -10,10 +10,12 @@ * 品牌响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.brand.BrandInfoResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class BrandInfoResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 2105745692451683517L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/brand/BrandListResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/brand/BrandListResponse.java index c6cff6f317..4b48368e04 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/brand/BrandListResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/brand/BrandListResponse.java @@ -11,10 +11,12 @@ * 品牌列表响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.brand.BrandListResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class BrandListResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -5335449078706304920L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/brand/BrandParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/brand/BrandParam.java index 05f8d89b42..872dba2409 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/brand/BrandParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/brand/BrandParam.java @@ -11,11 +11,13 @@ * 品牌参数 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.brand.BrandParam}。 */ @Data @NoArgsConstructor @AllArgsConstructor @JsonInclude(JsonInclude.Include.NON_NULL) +@Deprecated public class BrandParam implements Serializable { private static final long serialVersionUID = -4894709391464428613L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/brand/BrandRegisterDetail.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/brand/BrandRegisterDetail.java index 28b417f38c..744b521fd8 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/brand/BrandRegisterDetail.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/brand/BrandRegisterDetail.java @@ -10,9 +10,11 @@ * 品牌注册信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.brand.BrandRegisterDetail}。 */ @Data @NoArgsConstructor +@Deprecated public class BrandRegisterDetail implements Serializable { private static final long serialVersionUID = 1169957179510362405L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/brand/BrandSearchParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/brand/BrandSearchParam.java index e73ed4f54e..e472d03879 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/brand/BrandSearchParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/brand/BrandSearchParam.java @@ -10,10 +10,12 @@ * 品牌搜索参数 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.brand.BrandSearchParam}。 */ @Data @EqualsAndHashCode(callSuper = true) @JsonInclude(JsonInclude.Include.NON_NULL) +@Deprecated public class BrandSearchParam extends StreamPageParam { private static final long serialVersionUID = 5961201403338269712L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/category/AccountCategoryResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/category/AccountCategoryResponse.java index 3db7c74cec..ebcd0b5cf1 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/category/AccountCategoryResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/category/AccountCategoryResponse.java @@ -11,10 +11,12 @@ * 分类响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.category.AccountCategoryResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class AccountCategoryResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 3486089711447908477L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/category/CategoryAndQualificationList.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/category/CategoryAndQualificationList.java index c9e973c8b8..ad163fad7a 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/category/CategoryAndQualificationList.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/category/CategoryAndQualificationList.java @@ -10,9 +10,11 @@ * 分类资质响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.category.CategoryAndQualificationList}。 */ @Data @NoArgsConstructor +@Deprecated public class CategoryAndQualificationList implements Serializable { private static final long serialVersionUID = 4245906598437404655L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/category/CategoryDetailResult.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/category/CategoryDetailResult.java index 3188bd3820..44bc6bbc27 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/category/CategoryDetailResult.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/category/CategoryDetailResult.java @@ -9,9 +9,11 @@ /** * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.category.CategoryDetailResult}。 */ @Data @NoArgsConstructor +@Deprecated public class CategoryDetailResult extends WxChannelBaseResponse { private static final long serialVersionUID = 4657778764371047619L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/category/CategoryQualification.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/category/CategoryQualification.java index 9cac327d6c..75b39381e9 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/category/CategoryQualification.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/category/CategoryQualification.java @@ -10,9 +10,11 @@ * 分类资质信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.category.CategoryQualification}。 */ @Data @NoArgsConstructor +@Deprecated public class CategoryQualification implements Serializable { private static final long serialVersionUID = 6495550078851408381L; @@ -30,7 +32,11 @@ public class CategoryQualification implements Serializable { @Deprecated private QualificationInfo productInfo; - /** 品牌资质信息 */ + /** + * 品牌资质信息。 + * + * @deprecated 微信接口仍返回该字段,暂未提供替代字段。 + */ @JsonProperty("brand_qua") @Deprecated private QualificationInfo brandQua; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/category/CategoryQualificationResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/category/CategoryQualificationResponse.java index cbd588ebf9..1ac37c98a2 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/category/CategoryQualificationResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/category/CategoryQualificationResponse.java @@ -11,10 +11,12 @@ * 分类资质响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.category.CategoryQualificationResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class CategoryQualificationResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -7869091908852685830L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/category/PassCategoryInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/category/PassCategoryInfo.java index 82b16c0188..e51e96d019 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/category/PassCategoryInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/category/PassCategoryInfo.java @@ -9,9 +9,11 @@ * 审核通过的分类和资质信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.category.PassCategoryInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class PassCategoryInfo implements Serializable { private static final long serialVersionUID = 1152077957498898216L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/category/PassCategoryResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/category/PassCategoryResponse.java index 6509321b88..fe8effa7af 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/category/PassCategoryResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/category/PassCategoryResponse.java @@ -11,10 +11,12 @@ * 审核通过的分类和资质信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.category.PassCategoryResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class PassCategoryResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -3674591447273025743L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/category/QualificationInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/category/QualificationInfo.java index efb7249fe3..fee3fddfbe 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/category/QualificationInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/category/QualificationInfo.java @@ -9,9 +9,11 @@ * 资质信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.category.QualificationInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class QualificationInfo implements Serializable { /** 资质ID */ diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/category/RelationCategoryItem.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/category/RelationCategoryItem.java index 8e0bd1b0b5..3579fc11c3 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/category/RelationCategoryItem.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/category/RelationCategoryItem.java @@ -10,9 +10,11 @@ * 店铺类目权限列表项 * * @author chucheng + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.category.RelationCategoryItem}。 */ @Data @NoArgsConstructor +@Deprecated public class RelationCategoryItem implements Serializable { /** 类目id */ diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/category/RelationCategoryRequest.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/category/RelationCategoryRequest.java index c514e7d9ca..ef73e59515 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/category/RelationCategoryRequest.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/category/RelationCategoryRequest.java @@ -10,10 +10,12 @@ * 类目权限列表请求参数 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.category.RelationCategoryRequest}。 */ @Data @NoArgsConstructor @AllArgsConstructor +@Deprecated public class RelationCategoryRequest implements Serializable { private static final long serialVersionUID = -8765432109876543210L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/category/RelationCategoryResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/category/RelationCategoryResponse.java index 4bd1ea96d4..64e4f67186 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/category/RelationCategoryResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/category/RelationCategoryResponse.java @@ -11,10 +11,12 @@ * 店铺的类目权限列表响应 * * @author chucheng + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.category.RelationCategoryResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class RelationCategoryResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -8473920857463918245L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/category/ShopCategory.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/category/ShopCategory.java index 5dd04582f3..5154efec3b 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/category/ShopCategory.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/category/ShopCategory.java @@ -9,9 +9,11 @@ * 商品类目 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.category.ShopCategory}。 */ @Data @NoArgsConstructor +@Deprecated public class ShopCategory implements Serializable { /** 类目ID */ diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/category/ShopCategoryResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/category/ShopCategoryResponse.java index fff7362a7a..ca31e49dfe 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/category/ShopCategoryResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/category/ShopCategoryResponse.java @@ -11,10 +11,12 @@ * 分类响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.category.ShopCategoryResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class ShopCategoryResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 3871098948660947422L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/complaint/ComplaintHistory.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/complaint/ComplaintHistory.java index 84a558b2b1..f34da72f92 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/complaint/ComplaintHistory.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/complaint/ComplaintHistory.java @@ -10,9 +10,11 @@ * 纠纷历史 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.complaint.ComplaintHistory}。 */ @Data @NoArgsConstructor +@Deprecated public class ComplaintHistory implements Serializable { private static final long serialVersionUID = -4706637116597650133L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/complaint/ComplaintOrderResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/complaint/ComplaintOrderResponse.java index a0a8ec1e18..5fc472bb7e 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/complaint/ComplaintOrderResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/complaint/ComplaintOrderResponse.java @@ -10,9 +10,11 @@ * 纠纷单响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.complaint.ComplaintOrderResponse}。 */ @Data @NoArgsConstructor +@Deprecated public class ComplaintOrderResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 1968530826349555367L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/complaint/ComplaintParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/complaint/ComplaintParam.java index 0090348efe..925bbf3db6 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/complaint/ComplaintParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/complaint/ComplaintParam.java @@ -12,11 +12,13 @@ * 纠纷单留言 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.complaint.ComplaintParam}。 */ @Data @NoArgsConstructor @AllArgsConstructor @JsonInclude(JsonInclude.Include.NON_NULL) +@Deprecated public class ComplaintParam implements Serializable { private static final long serialVersionUID = 6146118590005718327L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/cooperation/CooperationData.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/cooperation/CooperationData.java index 41020f4993..8d825003e2 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/cooperation/CooperationData.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/cooperation/CooperationData.java @@ -9,9 +9,11 @@ * 合作账号信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.cooperation.CooperationData}。 */ @Data @NoArgsConstructor +@Deprecated public class CooperationData implements Serializable { private static final long serialVersionUID = 3930010847236599458L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/cooperation/CooperationListResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/cooperation/CooperationListResponse.java index 1b652b64d6..b2f093e779 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/cooperation/CooperationListResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/cooperation/CooperationListResponse.java @@ -11,10 +11,12 @@ * 合作账号列表响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.cooperation.CooperationListResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class CooperationListResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 6998637882644598826L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/cooperation/CooperationQrCode.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/cooperation/CooperationQrCode.java index 272b9802da..6f4d7cc9df 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/cooperation/CooperationQrCode.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/cooperation/CooperationQrCode.java @@ -9,9 +9,11 @@ * 合作账号二维码数据 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.cooperation.CooperationQrCode}。 */ @Data @NoArgsConstructor +@Deprecated public class CooperationQrCode implements Serializable { private static final long serialVersionUID = -7096916911986699150L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/cooperation/CooperationQrCodeResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/cooperation/CooperationQrCodeResponse.java index b18b2b1c85..b1f92059f5 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/cooperation/CooperationQrCodeResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/cooperation/CooperationQrCodeResponse.java @@ -10,10 +10,12 @@ * 合作账号二维码响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.cooperation.CooperationQrCodeResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class CooperationQrCodeResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 6998637882644598826L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/cooperation/CooperationSharerParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/cooperation/CooperationSharerParam.java index 4ca9bd8344..d93b96f90b 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/cooperation/CooperationSharerParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/cooperation/CooperationSharerParam.java @@ -11,11 +11,13 @@ * 合作账号参数 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.cooperation.CooperationSharerParam}。 */ @Data @NoArgsConstructor @AllArgsConstructor @JsonInclude(JsonInclude.Include.NON_NULL) +@Deprecated public class CooperationSharerParam implements Serializable { private static final long serialVersionUID = 5032621997764493109L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/cooperation/CooperationStatus.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/cooperation/CooperationStatus.java index 5267be6153..84585cf45f 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/cooperation/CooperationStatus.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/cooperation/CooperationStatus.java @@ -9,9 +9,11 @@ * 合作账号状态 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.cooperation.CooperationStatus}。 */ @Data @NoArgsConstructor +@Deprecated public class CooperationStatus implements Serializable { private static final long serialVersionUID = -7096916911986699150L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/cooperation/CooperationStatusResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/cooperation/CooperationStatusResponse.java index 6507340c63..3dd6496eb8 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/cooperation/CooperationStatusResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/cooperation/CooperationStatusResponse.java @@ -10,10 +10,12 @@ * 合作账号状态响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.cooperation.CooperationStatusResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class CooperationStatusResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 6998637882644598826L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/AutoValidInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/AutoValidInfo.java index 73c09def1e..10e6861add 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/AutoValidInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/AutoValidInfo.java @@ -9,9 +9,11 @@ * 自动生效信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.coupon.AutoValidInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class AutoValidInfo implements Serializable { private static final long serialVersionUID = 1702505613539861103L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/CouponDetailInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/CouponDetailInfo.java index 34f76716f9..7b1c0b9623 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/CouponDetailInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/CouponDetailInfo.java @@ -9,10 +9,12 @@ * 优惠券信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.coupon.CouponDetailInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class CouponDetailInfo implements Serializable { private static final long serialVersionUID = 5994815232349181577L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/CouponIdInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/CouponIdInfo.java index b787016a09..ef7b0322c4 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/CouponIdInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/CouponIdInfo.java @@ -10,10 +10,12 @@ * 优惠券id * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.coupon.CouponIdInfo}。 */ @Data @NoArgsConstructor @AllArgsConstructor +@Deprecated public class CouponIdInfo implements Serializable { private static final long serialVersionUID = 6284609705855608275L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/CouponIdResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/CouponIdResponse.java index 7556fa6f11..cb3e87b2d1 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/CouponIdResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/CouponIdResponse.java @@ -9,10 +9,12 @@ /** * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.coupon.CouponIdResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class CouponIdResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -3263189706802013651L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/CouponInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/CouponInfo.java index cd247f9d71..760ec78c41 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/CouponInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/CouponInfo.java @@ -6,9 +6,11 @@ /** * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.coupon.CouponInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class CouponInfo extends CouponIdInfo { private static final long serialVersionUID = -5862063828870424262L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/CouponInfoResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/CouponInfoResponse.java index 801843025e..3157df797a 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/CouponInfoResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/CouponInfoResponse.java @@ -8,10 +8,12 @@ /** * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.coupon.CouponInfoResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class CouponInfoResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 5261320058699488529L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/CouponListParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/CouponListParam.java index 6c7fc03a6e..bc7047e472 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/CouponListParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/CouponListParam.java @@ -12,10 +12,12 @@ * 获取优惠券ID列表接口的请求参数 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.coupon.CouponListParam}。 */ @Data @NoArgsConstructor @JsonInclude(Include.NON_NULL) +@Deprecated public class CouponListParam implements Serializable { private static final long serialVersionUID = 7123047113279657365L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/CouponListResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/CouponListResponse.java index 66d6f63eef..18c1f3ea59 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/CouponListResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/CouponListResponse.java @@ -9,10 +9,12 @@ /** * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.coupon.CouponListResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class CouponListResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -5330296358041282751L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/CouponParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/CouponParam.java index fa89b0a1e4..9c47e54530 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/CouponParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/CouponParam.java @@ -9,10 +9,12 @@ * 优惠券参数 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.coupon.CouponParam}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class CouponParam extends CouponIdInfo { private static final long serialVersionUID = -3663331372622943337L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/CouponStatusParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/CouponStatusParam.java index 405ad52400..64d58cbf08 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/CouponStatusParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/CouponStatusParam.java @@ -7,10 +7,12 @@ /** * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.coupon.CouponStatusParam}。 */ @Data @EqualsAndHashCode(callSuper = true) @JsonInclude(JsonInclude.Include.NON_NULL) +@Deprecated public class CouponStatusParam extends CouponIdInfo { private static final long serialVersionUID = -7108348049925634704L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/DiscountCondition.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/DiscountCondition.java index e249455526..4cac13356e 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/DiscountCondition.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/DiscountCondition.java @@ -10,9 +10,11 @@ * 折扣条件 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.coupon.DiscountCondition}。 */ @Data @NoArgsConstructor +@Deprecated public class DiscountCondition implements Serializable { private static final long serialVersionUID = 3250293381093835082L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/DiscountInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/DiscountInfo.java index 7988e47ce6..5c7efc1e1d 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/DiscountInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/DiscountInfo.java @@ -9,9 +9,11 @@ * 优惠信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.coupon.DiscountInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class DiscountInfo implements Serializable { private static final long serialVersionUID = 3660070880545144112L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/ExtInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/ExtInfo.java index 69cf3dc073..1c36bebec2 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/ExtInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/ExtInfo.java @@ -9,9 +9,11 @@ * 额外信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.coupon.ExtInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class ExtInfo implements Serializable { private static final long serialVersionUID = 9053035437087423233L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/PromoteInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/PromoteInfo.java index 75d48e6d3e..7cdb5c1d8a 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/PromoteInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/PromoteInfo.java @@ -9,9 +9,11 @@ * 推广信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.coupon.PromoteInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class PromoteInfo implements Serializable { private static final long serialVersionUID = -3030639750899957382L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/ReceiveInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/ReceiveInfo.java index 9a602ac390..2f4c861843 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/ReceiveInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/ReceiveInfo.java @@ -9,9 +9,11 @@ * 领取信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.coupon.ReceiveInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class ReceiveInfo implements Serializable { private static final long serialVersionUID = 755956808504040633L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/StockInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/StockInfo.java index 07aaf4a1ec..652440b82a 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/StockInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/StockInfo.java @@ -9,9 +9,11 @@ * 库存信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.coupon.StockInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class StockInfo implements Serializable { private static final long serialVersionUID = -6078383881065929862L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/UserCoupon.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/UserCoupon.java index 06436a9e73..804ed8d93e 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/UserCoupon.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/UserCoupon.java @@ -9,10 +9,12 @@ * 用户优惠券 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.coupon.UserCoupon}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class UserCoupon extends UserCouponIdInfo { private static final long serialVersionUID = -4777537717885622888L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/UserCouponIdInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/UserCouponIdInfo.java index d68d881c98..8d9ef4a1d5 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/UserCouponIdInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/UserCouponIdInfo.java @@ -8,9 +8,11 @@ * 用户优惠券id * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.coupon.UserCouponIdInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class UserCouponIdInfo extends CouponIdInfo { private static final long serialVersionUID = -8285585134793264542L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/UserCouponIdParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/UserCouponIdParam.java index aa2eb15421..9340f0fc90 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/UserCouponIdParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/UserCouponIdParam.java @@ -6,8 +6,10 @@ /** * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.coupon.UserCouponIdParam}。 */ @Data +@Deprecated public class UserCouponIdParam implements Serializable { private static final long serialVersionUID = 3967276158727848348L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/UserCouponListParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/UserCouponListParam.java index f14f5d7f6e..67963a72b8 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/UserCouponListParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/UserCouponListParam.java @@ -8,11 +8,13 @@ /** * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.coupon.UserCouponListParam}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) @JsonInclude(JsonInclude.Include.NON_NULL) +@Deprecated public class UserCouponListParam extends CouponListParam { private static final long serialVersionUID = -1056132009327357435L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/UserCouponListResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/UserCouponListResponse.java index 2c3582e678..5019c4f5d2 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/UserCouponListResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/UserCouponListResponse.java @@ -9,10 +9,12 @@ /** * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.coupon.UserCouponListResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class UserCouponListResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 5201633937239352879L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/UserCouponResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/UserCouponResponse.java index aeb9d89afb..ab5fbc7b89 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/UserCouponResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/UserCouponResponse.java @@ -8,10 +8,12 @@ /** * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.coupon.UserCouponResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class UserCouponResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 1434098386857953234L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/UserExtInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/UserExtInfo.java index 18962361ec..8b0ddc09a1 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/UserExtInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/UserExtInfo.java @@ -9,9 +9,11 @@ * 用户优惠券附加信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.coupon.UserExtInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class UserExtInfo implements Serializable { private static final long serialVersionUID = 8304922825230343409L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/ValidInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/ValidInfo.java index 10df794324..b33a90667a 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/ValidInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/coupon/ValidInfo.java @@ -9,9 +9,11 @@ * 优惠券有效信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.coupon.ValidInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class ValidInfo implements Serializable { private static final long serialVersionUID = -4550516248380285635L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/delivery/DeliveryCompanyInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/delivery/DeliveryCompanyInfo.java index 349d70cbb1..c9c3ca1986 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/delivery/DeliveryCompanyInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/delivery/DeliveryCompanyInfo.java @@ -9,9 +9,11 @@ * 快递公司信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.delivery.DeliveryCompanyInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class DeliveryCompanyInfo implements Serializable { private static final long serialVersionUID = 4225666604513570564L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/delivery/DeliveryCompanyResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/delivery/DeliveryCompanyResponse.java index d74a9439ea..55745dd98c 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/delivery/DeliveryCompanyResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/delivery/DeliveryCompanyResponse.java @@ -10,9 +10,11 @@ * 快递公司列表响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.delivery.DeliveryCompanyResponse}。 */ @Data @NoArgsConstructor +@Deprecated public class DeliveryCompanyResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -7695903997951385166L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/delivery/DeliveryInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/delivery/DeliveryInfo.java index 23ab8dad2c..fe7442a07c 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/delivery/DeliveryInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/delivery/DeliveryInfo.java @@ -10,9 +10,11 @@ * 物流信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.delivery.DeliveryInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class DeliveryInfo implements Serializable { private static final long serialVersionUID = -6205626967305385248L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/delivery/DeliverySendParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/delivery/DeliverySendParam.java index f486032bc4..aa0125d9d1 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/delivery/DeliverySendParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/delivery/DeliverySendParam.java @@ -13,11 +13,13 @@ * 订单发货信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.delivery.DeliverySendParam}。 */ @Data @NoArgsConstructor @AllArgsConstructor @JsonInclude(Include.NON_NULL) +@Deprecated public class DeliverySendParam implements Serializable { private static final long serialVersionUID = 4555821308266899135L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/delivery/FreightProductInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/delivery/FreightProductInfo.java index 2a7c7dd3c6..23e4aef3e3 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/delivery/FreightProductInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/delivery/FreightProductInfo.java @@ -10,9 +10,11 @@ * 包裹中商品信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.delivery.FreightProductInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class FreightProductInfo implements Serializable { private static final long serialVersionUID = -3751269707150372172L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/delivery/FreshInspectParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/delivery/FreshInspectParam.java index a6db90f2f9..bc0c4a959b 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/delivery/FreshInspectParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/delivery/FreshInspectParam.java @@ -13,11 +13,13 @@ * 商品打包信息 参数 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.delivery.FreshInspectParam}。 */ @Data @NoArgsConstructor @AllArgsConstructor @JsonInclude(Include.NON_NULL) +@Deprecated public class FreshInspectParam implements Serializable { private static final long serialVersionUID = -1635894867602084789L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/delivery/PackageAuditInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/delivery/PackageAuditInfo.java index bbb4e6c484..9acee665e5 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/delivery/PackageAuditInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/delivery/PackageAuditInfo.java @@ -11,10 +11,12 @@ * 商品打包信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.delivery.PackageAuditInfo}。 */ @Data @NoArgsConstructor @AllArgsConstructor +@Deprecated public class PackageAuditInfo implements Serializable { private static final long serialVersionUID = 1118087167138310282L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/AccountInfoResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/AccountInfoResponse.java index 4a460bcc6d..e7b590d596 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/AccountInfoResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/AccountInfoResponse.java @@ -4,7 +4,9 @@ * 电子面单网点/账号信息响应。 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.ewaybill.AccountInfoResponse}。 */ +@Deprecated public class AccountInfoResponse extends AbstractEwaybillResponse { private static final long serialVersionUID = 5682783958522805959L; } diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/AddSubOrderRequest.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/AddSubOrderRequest.java index 2e0b90e1f8..d8be0cb0b3 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/AddSubOrderRequest.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/AddSubOrderRequest.java @@ -4,7 +4,9 @@ * 电子面单子件追加请求。 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.ewaybill.AddSubOrderRequest}。 */ +@Deprecated public class AddSubOrderRequest extends AbstractEwaybillRequest { private static final long serialVersionUID = 4250200603210217269L; } diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/BatchPrintOrderRequest.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/BatchPrintOrderRequest.java index a06d26b875..2cca5cf1d5 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/BatchPrintOrderRequest.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/BatchPrintOrderRequest.java @@ -5,8 +5,12 @@ import lombok.Data; import lombok.NoArgsConstructor; +/** + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.ewaybill.BatchPrintOrderRequest}。 + */ @Data @NoArgsConstructor +@Deprecated public class BatchPrintOrderRequest { @JsonProperty("req_list") private List reqList; } diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/CreateOrderRequest.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/CreateOrderRequest.java index 87e8bad3cd..9fef758eae 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/CreateOrderRequest.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/CreateOrderRequest.java @@ -4,7 +4,9 @@ * 电子面单取号请求。 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.ewaybill.CreateOrderRequest}。 */ +@Deprecated public class CreateOrderRequest extends AbstractEwaybillRequest { private static final long serialVersionUID = 2521225918646916853L; } diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/CreateOrderResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/CreateOrderResponse.java index 89eafa012d..4260e42696 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/CreateOrderResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/CreateOrderResponse.java @@ -4,7 +4,9 @@ * 电子面单取号响应。 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.ewaybill.CreateOrderResponse}。 */ +@Deprecated public class CreateOrderResponse extends AbstractEwaybillResponse { private static final long serialVersionUID = 9115454170108519187L; } diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/DeliveryListResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/DeliveryListResponse.java index eef815afc1..736ac03943 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/DeliveryListResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/DeliveryListResponse.java @@ -4,7 +4,9 @@ * 开通快递公司列表响应。 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.ewaybill.DeliveryListResponse}。 */ +@Deprecated public class DeliveryListResponse extends AbstractEwaybillResponse { private static final long serialVersionUID = 494164885034906535L; } diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/EwaybillOrderIdParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/EwaybillOrderIdParam.java index 81a099f9ff..b252e9b2b5 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/EwaybillOrderIdParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/EwaybillOrderIdParam.java @@ -5,9 +5,13 @@ import lombok.Data; import lombok.NoArgsConstructor; +/** + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.ewaybill.EwaybillOrderIdParam}。 + */ @Data @NoArgsConstructor @AllArgsConstructor +@Deprecated public class EwaybillOrderIdParam { @JsonProperty("ewaybill_order_id") private String ewaybillOrderId; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/OrderDetailResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/OrderDetailResponse.java index 4717bdcd6a..111fe8bf98 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/OrderDetailResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/OrderDetailResponse.java @@ -4,7 +4,9 @@ * 面单详情响应。 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.ewaybill.OrderDetailResponse}。 */ +@Deprecated public class OrderDetailResponse extends AbstractEwaybillResponse { private static final long serialVersionUID = -2406734055149395916L; } diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/PreCreateRequest.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/PreCreateRequest.java index b76d4f8c38..b129d29be8 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/PreCreateRequest.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/PreCreateRequest.java @@ -4,7 +4,9 @@ * 电子面单预取号请求。 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.ewaybill.PreCreateRequest}。 */ +@Deprecated public class PreCreateRequest extends AbstractEwaybillRequest { private static final long serialVersionUID = 3761501770378571724L; } diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/PreCreateResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/PreCreateResponse.java index ded9e53dab..d51d3d9085 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/PreCreateResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/PreCreateResponse.java @@ -4,7 +4,9 @@ * 电子面单预取号响应。 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.ewaybill.PreCreateResponse}。 */ +@Deprecated public class PreCreateResponse extends AbstractEwaybillResponse { private static final long serialVersionUID = -6302826807350860584L; } diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/PrintContentParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/PrintContentParam.java index 3ef3e240bd..3b94bb1197 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/PrintContentParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/PrintContentParam.java @@ -7,10 +7,13 @@ import lombok.Data; import lombok.NoArgsConstructor; -/** 获取电子面单打印报文请求参数。 */ +/** 获取电子面单打印报文请求参数。 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.ewaybill.PrintContentParam}。 +*/ @Data @NoArgsConstructor @AllArgsConstructor +@Deprecated public class PrintContentParam implements Serializable { private static final long serialVersionUID = 6898522842175667816L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/PrintContentResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/PrintContentResponse.java index 6a66ffca15..12314a1d84 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/PrintContentResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/PrintContentResponse.java @@ -4,7 +4,9 @@ * 打印报文响应。 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.ewaybill.PrintContentResponse}。 */ +@Deprecated public class PrintContentResponse extends AbstractEwaybillResponse { private static final long serialVersionUID = 1097526332493027364L; } diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/PrintOrderRequest.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/PrintOrderRequest.java index 14be4f62ca..e069867cc0 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/PrintOrderRequest.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/PrintOrderRequest.java @@ -4,8 +4,12 @@ import lombok.Data; import lombok.NoArgsConstructor; +/** + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.ewaybill.PrintOrderRequest}。 + */ @Data @NoArgsConstructor +@Deprecated public class PrintOrderRequest extends EwaybillOrderIdParam { @JsonProperty("delivery_id") private String deliveryId; @JsonProperty("waybill_id") private String waybillId; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateCodeParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateCodeParam.java index ae062ea74d..242f483f13 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateCodeParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateCodeParam.java @@ -6,10 +6,13 @@ import lombok.Data; import lombok.NoArgsConstructor; -/** 面单标准模板编码请求参数。 */ +/** 面单标准模板编码请求参数。 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.ewaybill.TemplateCodeParam}。 +*/ @Data @NoArgsConstructor @AllArgsConstructor +@Deprecated public class TemplateCodeParam implements Serializable { private static final long serialVersionUID = 4473438799300843172L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateConfigResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateConfigResponse.java index f97a7ef52f..363f80c790 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateConfigResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateConfigResponse.java @@ -4,7 +4,9 @@ * 面单标准模板响应。 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.ewaybill.TemplateConfigResponse}。 */ +@Deprecated public class TemplateConfigResponse extends AbstractEwaybillResponse { private static final long serialVersionUID = 6779567498624326386L; } diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateCreateRequest.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateCreateRequest.java index 382f355645..49faf9d7f0 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateCreateRequest.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateCreateRequest.java @@ -4,7 +4,9 @@ * 新增面单模板请求。 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.ewaybill.TemplateCreateRequest}。 */ +@Deprecated public class TemplateCreateRequest extends AbstractEwaybillRequest { private static final long serialVersionUID = 2974771986022948202L; } diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateIdParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateIdParam.java index 5289c45231..d45e1490cd 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateIdParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateIdParam.java @@ -10,10 +10,12 @@ * 模板ID请求参数。 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.ewaybill.TemplateIdParam}。 */ @Data @NoArgsConstructor @AllArgsConstructor +@Deprecated public class TemplateIdParam implements Serializable { private static final long serialVersionUID = -2397006631686547550L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateIdResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateIdResponse.java index 878ef5b25c..a4c70f15d9 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateIdResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateIdResponse.java @@ -9,10 +9,12 @@ * 面单模板ID响应。 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.ewaybill.TemplateIdResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class TemplateIdResponse extends AbstractEwaybillResponse { private static final long serialVersionUID = -6756111662032438585L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateInfoResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateInfoResponse.java index 62d50dc148..c7a344fab3 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateInfoResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateInfoResponse.java @@ -4,7 +4,9 @@ * 面单模板信息响应。 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.ewaybill.TemplateInfoResponse}。 */ +@Deprecated public class TemplateInfoResponse extends AbstractEwaybillResponse { private static final long serialVersionUID = 5718279884380636289L; } diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateUpdateRequest.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateUpdateRequest.java index 752aea3043..29836b5df1 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateUpdateRequest.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/TemplateUpdateRequest.java @@ -4,7 +4,9 @@ * 更新面单模板请求。 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.ewaybill.TemplateUpdateRequest}。 */ +@Deprecated public class TemplateUpdateRequest extends AbstractEwaybillRequest { private static final long serialVersionUID = -6201137374059216895L; } diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/WaybillIdParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/WaybillIdParam.java index a62821d32c..47485945b7 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/WaybillIdParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/WaybillIdParam.java @@ -10,10 +10,12 @@ * 运单ID请求参数。 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.ewaybill.WaybillIdParam}。 */ @Data @NoArgsConstructor @AllArgsConstructor +@Deprecated public class WaybillIdParam implements Serializable { private static final long serialVersionUID = -7601452772833268240L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/WaybillIdsParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/WaybillIdsParam.java index 49129280bf..a17e3a17ed 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/WaybillIdsParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/ewaybill/WaybillIdsParam.java @@ -11,10 +11,12 @@ * 批量运单ID请求参数。 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.ewaybill.WaybillIdsParam}。 */ @Data @NoArgsConstructor @AllArgsConstructor +@Deprecated public class WaybillIdsParam implements Serializable { private static final long serialVersionUID = -9030594599179993010L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/favorite/FavoriteCountResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/favorite/FavoriteCountResponse.java index 9acdf93d75..f7fb7920b7 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/favorite/FavoriteCountResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/favorite/FavoriteCountResponse.java @@ -10,10 +10,12 @@ * 店铺收藏人数 响应 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.favorite.FavoriteCountResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class FavoriteCountResponse extends WxChannelBaseResponse { /** 店铺首页收藏用户数 */ diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/freight/AddressInfoList.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/freight/AddressInfoList.java index 4d8c7ec4a5..9a59c4e6ba 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/freight/AddressInfoList.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/freight/AddressInfoList.java @@ -11,9 +11,11 @@ * 地址列表 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.freight.AddressInfoList}。 */ @Data @NoArgsConstructor +@Deprecated public class AddressInfoList implements Serializable { private static final long serialVersionUID = 5923805297331862706L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/freight/AllConditionFreeDetail.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/freight/AllConditionFreeDetail.java index fd9aee451d..ca0d768582 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/freight/AllConditionFreeDetail.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/freight/AllConditionFreeDetail.java @@ -12,9 +12,11 @@ * 计费规则列表 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.freight.AllConditionFreeDetail}。 */ @Data @NoArgsConstructor +@Deprecated public class AllConditionFreeDetail implements Serializable { private static final long serialVersionUID = -1649520737632417036L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/freight/AllFreightCalcMethod.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/freight/AllFreightCalcMethod.java index 2c5523ebe4..acaae8aa45 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/freight/AllFreightCalcMethod.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/freight/AllFreightCalcMethod.java @@ -10,8 +10,10 @@ * 具体计费方法,默认运费,指定地区运费等 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.freight.AllFreightCalcMethod}。 */ @Data +@Deprecated public class AllFreightCalcMethod implements Serializable { private static final long serialVersionUID = 6330919525271991949L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/freight/ConditionFreeDetail.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/freight/ConditionFreeDetail.java index cd0b76990d..60f36f4a51 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/freight/ConditionFreeDetail.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/freight/ConditionFreeDetail.java @@ -9,10 +9,12 @@ * 计费规则 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.freight.ConditionFreeDetail}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class ConditionFreeDetail extends AddressInfoList { private static final long serialVersionUID = 9204578767029379142L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/freight/FreightCalcMethod.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/freight/FreightCalcMethod.java index aab949bc44..bae909f189 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/freight/FreightCalcMethod.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/freight/FreightCalcMethod.java @@ -9,10 +9,12 @@ * 运费计算方法 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.freight.FreightCalcMethod}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class FreightCalcMethod extends AddressInfoList { private static final long serialVersionUID = -8857987538121721376L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/freight/FreightTemplate.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/freight/FreightTemplate.java index e28f90ad41..4431b06da9 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/freight/FreightTemplate.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/freight/FreightTemplate.java @@ -10,9 +10,11 @@ * 运费模板 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.freight.FreightTemplate}。 */ @Data @NoArgsConstructor +@Deprecated public class FreightTemplate implements Serializable { private static final long serialVersionUID = -7876281924385999053L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/freight/NotSendArea.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/freight/NotSendArea.java index 1c480fc227..ef03dadce3 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/freight/NotSendArea.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/freight/NotSendArea.java @@ -8,10 +8,12 @@ * 不发货区域 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.freight.NotSendArea}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class NotSendArea extends AddressInfoList { private static final long serialVersionUID = -1836467830293286560L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/freight/TemplateAddParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/freight/TemplateAddParam.java index 9c400533bf..06729c0c58 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/freight/TemplateAddParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/freight/TemplateAddParam.java @@ -12,11 +12,13 @@ * 运费模板 请求参数 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.freight.TemplateAddParam}。 */ @Data @NoArgsConstructor @AllArgsConstructor @JsonInclude(Include.NON_NULL) +@Deprecated public class TemplateAddParam implements Serializable { private static final long serialVersionUID = 2602919369418149309L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/freight/TemplateIdResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/freight/TemplateIdResponse.java index e895d066cb..dc4afa6a24 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/freight/TemplateIdResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/freight/TemplateIdResponse.java @@ -10,10 +10,12 @@ * 运费模板 列表 响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.freight.TemplateIdResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class TemplateIdResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 5179651364165620640L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/freight/TemplateInfoResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/freight/TemplateInfoResponse.java index f37e3dc2d1..068fc0e1b1 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/freight/TemplateInfoResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/freight/TemplateInfoResponse.java @@ -10,10 +10,12 @@ * 运费模板 响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.freight.TemplateInfoResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class TemplateInfoResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -8381510839783330617L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/freight/TemplateListParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/freight/TemplateListParam.java index 628d907eb1..eb9b38733b 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/freight/TemplateListParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/freight/TemplateListParam.java @@ -10,10 +10,12 @@ * 运费模板 列表 请求参数 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.freight.TemplateListParam}。 */ @Data @JsonInclude(Include.NON_NULL) @EqualsAndHashCode(callSuper = true) +@Deprecated public class TemplateListParam extends OffsetParam { private static final long serialVersionUID = -6716154891499581562L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/freight/TemplateListResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/freight/TemplateListResponse.java index a6fcd7d3e3..6c80c9e29c 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/freight/TemplateListResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/freight/TemplateListResponse.java @@ -11,10 +11,12 @@ * 运费模板 列表 响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.freight.TemplateListResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class TemplateListResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 5375602442595264719L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/AccountInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/AccountInfo.java index f6248f96ba..f18cac098e 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/AccountInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/AccountInfo.java @@ -10,10 +10,12 @@ * 账户信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.fund.AccountInfo}。 */ @Data @NoArgsConstructor @JsonInclude(JsonInclude.Include.NON_NULL) +@Deprecated public class AccountInfo implements Serializable { private static final long serialVersionUID = -2107134853480093451L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/AccountInfoParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/AccountInfoParam.java index ec6010bd07..22588b58c4 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/AccountInfoParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/AccountInfoParam.java @@ -11,11 +11,13 @@ * 账户信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.fund.AccountInfoParam}。 */ @Data @NoArgsConstructor @AllArgsConstructor @JsonInclude(JsonInclude.Include.NON_NULL) +@Deprecated public class AccountInfoParam implements Serializable { private static final long serialVersionUID = 1689204583402779134L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/AccountInfoResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/AccountInfoResponse.java index b54a34a2e7..7d109368d7 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/AccountInfoResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/AccountInfoResponse.java @@ -9,9 +9,11 @@ * 账户信息响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.fund.AccountInfoResponse}。 */ @Data @NoArgsConstructor +@Deprecated public class AccountInfoResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -8316068503468969533L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/BalanceInfoResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/BalanceInfoResponse.java index def7e86675..a0036f42be 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/BalanceInfoResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/BalanceInfoResponse.java @@ -9,9 +9,11 @@ * 账户余额信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.fund.BalanceInfoResponse}。 */ @Data @NoArgsConstructor +@Deprecated public class BalanceInfoResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 4480496860612566921L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/FlowListResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/FlowListResponse.java index 9306b4516a..754f8d6e83 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/FlowListResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/FlowListResponse.java @@ -10,9 +10,11 @@ * 流水列表响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.fund.FlowListResponse}。 */ @Data @NoArgsConstructor +@Deprecated public class FlowListResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 8017827444308973489L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/FlowRelatedInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/FlowRelatedInfo.java index 4edecbb3b1..f63c2f4501 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/FlowRelatedInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/FlowRelatedInfo.java @@ -9,9 +9,11 @@ * 流水关联信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.fund.FlowRelatedInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class FlowRelatedInfo implements Serializable { private static final long serialVersionUID = 3757839018198212504L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/FundsFlow.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/FundsFlow.java index 9b01e820fa..1a86cda290 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/FundsFlow.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/FundsFlow.java @@ -10,9 +10,11 @@ * 资金流水 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.fund.FundsFlow}。 */ @Data @NoArgsConstructor +@Deprecated public class FundsFlow implements Serializable { private static final long serialVersionUID = -2785498655066305510L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/FundsFlowResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/FundsFlowResponse.java index 7db351263f..fc97729287 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/FundsFlowResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/FundsFlowResponse.java @@ -10,10 +10,12 @@ * 资金流水响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.fund.FundsFlowResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class FundsFlowResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -1130785908352355914L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/FundsListParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/FundsListParam.java index b5312e3a2a..3c74b768c5 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/FundsListParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/FundsListParam.java @@ -9,9 +9,11 @@ * 资金流水参数 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.fund.FundsListParam}。 */ @Data @NoArgsConstructor +@Deprecated public class FundsListParam implements Serializable { private static final long serialVersionUID = 2998955690332382229L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/WithdrawDetailResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/WithdrawDetailResponse.java index a1e726fb51..98fb74ad8e 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/WithdrawDetailResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/WithdrawDetailResponse.java @@ -10,10 +10,12 @@ * 提现详情响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.fund.WithdrawDetailResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class WithdrawDetailResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 1473346677401168323L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/WithdrawListParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/WithdrawListParam.java index a44b68567d..3fed419347 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/WithdrawListParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/WithdrawListParam.java @@ -10,10 +10,12 @@ * 提现列表参数 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.fund.WithdrawListParam}。 */ @Data @NoArgsConstructor @AllArgsConstructor +@Deprecated public class WithdrawListParam implements Serializable { private static final long serialVersionUID = -672422656564313999L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/WithdrawListResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/WithdrawListResponse.java index b1dabc2a4b..2013bf7bc4 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/WithdrawListResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/WithdrawListResponse.java @@ -10,9 +10,11 @@ * 提现列表响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.fund.WithdrawListResponse}。 */ @Data @NoArgsConstructor +@Deprecated public class WithdrawListResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -7950467108750325235L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/WithdrawSubmitParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/WithdrawSubmitParam.java index 65b8cdd12c..2245ca67b1 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/WithdrawSubmitParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/WithdrawSubmitParam.java @@ -10,10 +10,12 @@ * 提现提交参数 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.fund.WithdrawSubmitParam}。 */ @Data @NoArgsConstructor @AllArgsConstructor +@Deprecated public class WithdrawSubmitParam implements Serializable { private static final long serialVersionUID = 5801338663530567830L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/WithdrawSubmitResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/WithdrawSubmitResponse.java index 0002b158d2..c4dab15d71 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/WithdrawSubmitResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/WithdrawSubmitResponse.java @@ -10,10 +10,12 @@ * 提现提交响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.fund.WithdrawSubmitResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class WithdrawSubmitResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -8269579250564427758L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/bank/BankCityInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/bank/BankCityInfo.java index 04a69a8e87..d4b443de98 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/bank/BankCityInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/bank/BankCityInfo.java @@ -9,9 +9,11 @@ * 银行城市信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.fund.bank.BankCityInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class BankCityInfo implements Serializable { private static final long serialVersionUID = 374087891799491196L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/bank/BankCityResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/bank/BankCityResponse.java index 5cb148c79b..cc86f566f7 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/bank/BankCityResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/bank/BankCityResponse.java @@ -11,10 +11,12 @@ * 银行城市信息响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.fund.bank.BankCityResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class BankCityResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -6212360101083304631L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/bank/BankInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/bank/BankInfo.java index 1bb58badb4..13aae59d4b 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/bank/BankInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/bank/BankInfo.java @@ -9,9 +9,11 @@ * 银行信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.fund.bank.BankInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class BankInfo implements Serializable { private static final long serialVersionUID = -4837989875996346711L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/bank/BankInfoResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/bank/BankInfoResponse.java index 499d9fcbb5..8b35b1982f 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/bank/BankInfoResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/bank/BankInfoResponse.java @@ -11,10 +11,12 @@ * 银行信息响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.fund.bank.BankInfoResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class BankInfoResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 8583893898929290526L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/bank/BankListResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/bank/BankListResponse.java index 9517859c42..6c9a1c36c4 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/bank/BankListResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/bank/BankListResponse.java @@ -11,10 +11,12 @@ * 银行信息响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.fund.bank.BankListResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class BankListResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 7912035853286944260L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/bank/BankProvinceInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/bank/BankProvinceInfo.java index 955a25e8ad..22969119a1 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/bank/BankProvinceInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/bank/BankProvinceInfo.java @@ -9,9 +9,11 @@ * 银行省份信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.fund.bank.BankProvinceInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class BankProvinceInfo implements Serializable { private static final long serialVersionUID = -3409931656361300144L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/bank/BankProvinceResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/bank/BankProvinceResponse.java index f509d24304..68bbf0f3c6 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/bank/BankProvinceResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/bank/BankProvinceResponse.java @@ -10,9 +10,11 @@ * 银行省份信息响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.fund.bank.BankProvinceResponse}。 */ @Data @NoArgsConstructor +@Deprecated public class BankProvinceResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -6187805847136359892L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/bank/BankSearchParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/bank/BankSearchParam.java index abc9c1ec77..b368241f06 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/bank/BankSearchParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/bank/BankSearchParam.java @@ -11,11 +11,13 @@ * 银行查询参数 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.fund.bank.BankSearchParam}。 */ @Data @NoArgsConstructor @AllArgsConstructor @JsonInclude(JsonInclude.Include.NON_NULL) +@Deprecated public class BankSearchParam implements Serializable { private static final long serialVersionUID = 6070269209439188188L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/bank/BranchInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/bank/BranchInfo.java index c4cec9bc76..c3564f8516 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/bank/BranchInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/bank/BranchInfo.java @@ -9,9 +9,11 @@ * 分店信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.fund.bank.BranchInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class BranchInfo implements Serializable { private static final long serialVersionUID = -2744729367131146892L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/bank/BranchInfoResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/bank/BranchInfoResponse.java index c7cfda4646..6280efdc65 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/bank/BranchInfoResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/bank/BranchInfoResponse.java @@ -11,10 +11,12 @@ * 支行信息响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.fund.bank.BranchInfoResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class BranchInfoResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -1419832502854175767L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/bank/BranchSearchParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/bank/BranchSearchParam.java index 47527efe1e..2103740d3d 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/bank/BranchSearchParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/bank/BranchSearchParam.java @@ -10,10 +10,12 @@ * 银行支行信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.fund.bank.BranchSearchParam}。 */ @Data @NoArgsConstructor @AllArgsConstructor +@Deprecated public class BranchSearchParam implements Serializable { private static final long serialVersionUID = -8800316690160248833L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/qrcode/QrCheckResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/qrcode/QrCheckResponse.java index e1a52ab9a3..d57bc039c0 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/qrcode/QrCheckResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/qrcode/QrCheckResponse.java @@ -10,10 +10,12 @@ * 二维码校验响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.fund.qrcode.QrCheckResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class QrCheckResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -3860756719827268969L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/qrcode/QrCodeResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/qrcode/QrCodeResponse.java index d6c015c0cd..5fb75e7a60 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/qrcode/QrCodeResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/fund/qrcode/QrCodeResponse.java @@ -10,10 +10,12 @@ * 二维码响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.fund.qrcode.QrCodeResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class QrCodeResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 4521008628337929496L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/background/BackgroundApplyResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/background/BackgroundApplyResponse.java index b0d8769874..5ac7ec67db 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/background/BackgroundApplyResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/background/BackgroundApplyResponse.java @@ -10,10 +10,12 @@ * 提交背景图申请 结果 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.home.background.BackgroundApplyResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class BackgroundApplyResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -5627456997199822109L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/background/BackgroundApplyResult.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/background/BackgroundApplyResult.java index 45ca4ac1dd..af964a5c5c 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/background/BackgroundApplyResult.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/background/BackgroundApplyResult.java @@ -9,9 +9,11 @@ * 背景图审核信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.home.background.BackgroundApplyResult}。 */ @Data @NoArgsConstructor +@Deprecated public class BackgroundApplyResult implements Serializable { private static final long serialVersionUID = 3154900058221168732L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/background/BackgroundGetResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/background/BackgroundGetResponse.java index a0fbf33a80..24caf72ad0 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/background/BackgroundGetResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/background/BackgroundGetResponse.java @@ -10,10 +10,12 @@ * 背景图返回结果 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.home.background.BackgroundGetResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class BackgroundGetResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -9158761351220981959L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/banner/BannerApplyDetail.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/banner/BannerApplyDetail.java index e9e58057fd..0dee3613a3 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/banner/BannerApplyDetail.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/banner/BannerApplyDetail.java @@ -11,10 +11,12 @@ * 精选展示位申请详情 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.home.banner.BannerApplyDetail}。 */ @Data @NoArgsConstructor @JsonInclude(Include.NON_NULL) +@Deprecated public class BannerApplyDetail implements Serializable { private static final long serialVersionUID = -4622897527243343862L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/banner/BannerApplyInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/banner/BannerApplyInfo.java index 651c5c76fe..f48a398c32 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/banner/BannerApplyInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/banner/BannerApplyInfo.java @@ -10,9 +10,11 @@ * 精选展示位申请信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.home.banner.BannerApplyInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class BannerApplyInfo implements Serializable { private static final long serialVersionUID = 72190625450999960L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/banner/BannerApplyParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/banner/BannerApplyParam.java index 04c7abc2a7..1914e8e4d5 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/banner/BannerApplyParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/banner/BannerApplyParam.java @@ -12,11 +12,13 @@ * 精选展示位申请参数 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.home.banner.BannerApplyParam}。 */ @Data @NoArgsConstructor @AllArgsConstructor @JsonInclude(Include.NON_NULL) +@Deprecated public class BannerApplyParam implements Serializable { private static final long serialVersionUID = 9083668032979490150L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/banner/BannerApplyResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/banner/BannerApplyResponse.java index f83f119d13..f20d3d102d 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/banner/BannerApplyResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/banner/BannerApplyResponse.java @@ -10,10 +10,12 @@ * 提交精选展位申请 结果 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.home.banner.BannerApplyResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class BannerApplyResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -2194587734444499201L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/banner/BannerGetResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/banner/BannerGetResponse.java index 1c6a920636..b1bebb2c65 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/banner/BannerGetResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/banner/BannerGetResponse.java @@ -10,10 +10,12 @@ * 精选展位返回结果 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.home.banner.BannerGetResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class BannerGetResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -1563254921362215934L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/banner/BannerInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/banner/BannerInfo.java index 24b501a97d..b90ec8e2c6 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/banner/BannerInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/banner/BannerInfo.java @@ -12,10 +12,12 @@ * 精选展示位 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.home.banner.BannerInfo}。 */ @Data @NoArgsConstructor @JsonInclude(Include.NON_NULL) +@Deprecated public class BannerInfo implements Serializable { private static final long serialVersionUID = -2003175482038217418L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/banner/BannerItem.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/banner/BannerItem.java index 9a5cad9649..0aea2cbfba 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/banner/BannerItem.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/banner/BannerItem.java @@ -11,10 +11,12 @@ * 精选展示位明细 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.home.banner.BannerItem}。 */ @Data @NoArgsConstructor @JsonInclude(Include.NON_NULL) +@Deprecated public class BannerItem implements Serializable { private static final long serialVersionUID = 6982412458700854481L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/banner/BannerItemDetail.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/banner/BannerItemDetail.java index b5cfb4a38c..27a6c49763 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/banner/BannerItemDetail.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/banner/BannerItemDetail.java @@ -11,10 +11,12 @@ * 精选展示位明细中的明细 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.home.banner.BannerItemDetail}。 */ @Data @NoArgsConstructor @JsonInclude(Include.NON_NULL) +@Deprecated public class BannerItemDetail implements Serializable { private static final long serialVersionUID = 5975434996207526173L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/banner/BannerItemFinder.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/banner/BannerItemFinder.java index 735a2038da..398f069596 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/banner/BannerItemFinder.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/banner/BannerItemFinder.java @@ -11,10 +11,12 @@ * 精选展示位明细中的视频号数据 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.home.banner.BannerItemFinder}。 */ @Data @NoArgsConstructor @JsonInclude(Include.NON_NULL) +@Deprecated public class BannerItemFinder implements Serializable { private static final long serialVersionUID = -7397790079913284012L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/banner/BannerItemOfficialAccount.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/banner/BannerItemOfficialAccount.java index 0488829642..6bc73483a8 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/banner/BannerItemOfficialAccount.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/banner/BannerItemOfficialAccount.java @@ -11,10 +11,12 @@ * 精选展示位明细中的公众号数据 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.home.banner.BannerItemOfficialAccount}。 */ @Data @NoArgsConstructor @JsonInclude(Include.NON_NULL) +@Deprecated public class BannerItemOfficialAccount implements Serializable { private static final long serialVersionUID = -5596947592282082891L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/banner/BannerItemProduct.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/banner/BannerItemProduct.java index 87a51823f0..6c94eaa4e9 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/banner/BannerItemProduct.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/banner/BannerItemProduct.java @@ -11,10 +11,12 @@ * 精选展示位明细中的商品 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.home.banner.BannerItemProduct}。 */ @Data @NoArgsConstructor @JsonInclude(Include.NON_NULL) +@Deprecated public class BannerItemProduct implements Serializable { private static final long serialVersionUID = 8034487065591522594L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/CatTreeNode.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/CatTreeNode.java index c545b8637f..ede5ae02ba 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/CatTreeNode.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/CatTreeNode.java @@ -10,10 +10,12 @@ * 主页分类信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.home.tree.CatTreeNode}。 */ @Data @NoArgsConstructor @AllArgsConstructor +@Deprecated public class CatTreeNode implements Serializable { private static final long serialVersionUID = 3154219180098003510L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/LevelTreeInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/LevelTreeInfo.java index 104588202e..53e6d89388 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/LevelTreeInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/LevelTreeInfo.java @@ -11,10 +11,12 @@ * 分类信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.home.tree.LevelTreeInfo}。 */ @Data @NoArgsConstructor @AllArgsConstructor +@Deprecated public class LevelTreeInfo implements Serializable { /** 一级分类 */ diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/OneLevelTreeNode.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/OneLevelTreeNode.java index 76499c86e7..cbd2d99724 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/OneLevelTreeNode.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/OneLevelTreeNode.java @@ -11,11 +11,13 @@ * 一级分类 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.home.tree.OneLevelTreeNode}。 */ @Data @NoArgsConstructor @AllArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class OneLevelTreeNode extends CatTreeNode { /** 二级分类 */ diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/TreeAuditResult.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/TreeAuditResult.java index b85dda46dd..f9fb9c6714 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/TreeAuditResult.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/TreeAuditResult.java @@ -10,9 +10,11 @@ * 展示在店铺主页的商品分类 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.home.tree.TreeAuditResult}。 */ @Data @NoArgsConstructor +@Deprecated public class TreeAuditResult implements Serializable { private static final long serialVersionUID = 8142657614529852121L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/TreeAuditResultDetail.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/TreeAuditResultDetail.java index 92df865061..ec757a38c0 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/TreeAuditResultDetail.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/TreeAuditResultDetail.java @@ -9,9 +9,11 @@ * 分类审核结果 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.home.tree.TreeAuditResultDetail}。 */ @Data @NoArgsConstructor +@Deprecated public class TreeAuditResultDetail implements Serializable { private static final long serialVersionUID = -6085892397971684732L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/TreeProductEditInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/TreeProductEditInfo.java index d7dd831c3d..4b81f0e465 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/TreeProductEditInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/TreeProductEditInfo.java @@ -11,10 +11,12 @@ * 添加/删除分类关联的商品 参数 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.home.tree.TreeProductEditInfo}。 */ @Data @NoArgsConstructor @AllArgsConstructor +@Deprecated public class TreeProductEditInfo implements Serializable { private static final long serialVersionUID = -5596947592282082891L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/TreeProductEditParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/TreeProductEditParam.java index fb42162ca6..b9bd244e81 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/TreeProductEditParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/TreeProductEditParam.java @@ -10,10 +10,12 @@ * 添加/删除分类关联的商品 参数 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.home.tree.TreeProductEditParam}。 */ @Data @NoArgsConstructor @AllArgsConstructor +@Deprecated public class TreeProductEditParam implements Serializable { private static final long serialVersionUID = -4906016235749892703L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/TreeProductListInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/TreeProductListInfo.java index a37e784d14..2c71419314 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/TreeProductListInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/TreeProductListInfo.java @@ -10,10 +10,12 @@ * 查询分类关联的商品 参数 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.home.tree.TreeProductListInfo}。 */ @Data @NoArgsConstructor @AllArgsConstructor +@Deprecated public class TreeProductListInfo implements Serializable { private static final long serialVersionUID = 2774682583380930076L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/TreeProductListParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/TreeProductListParam.java index 7bb6a700e2..f7a20389ae 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/TreeProductListParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/TreeProductListParam.java @@ -10,10 +10,12 @@ * 查询分类关联的商品 参数 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.home.tree.TreeProductListParam}。 */ @Data @NoArgsConstructor @AllArgsConstructor +@Deprecated public class TreeProductListParam implements Serializable { private static final long serialVersionUID = -8444106841479328711L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/TreeProductListResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/TreeProductListResponse.java index ed0081d70c..40a24473e1 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/TreeProductListResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/TreeProductListResponse.java @@ -10,10 +10,12 @@ * 资金流水响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.home.tree.TreeProductListResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class TreeProductListResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 4566848209585635054L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/TreeProductListResult.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/TreeProductListResult.java index 6e0fdfea6c..3e9e683d63 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/TreeProductListResult.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/TreeProductListResult.java @@ -10,9 +10,11 @@ * 资金流水响应 结果 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.home.tree.TreeProductListResult}。 */ @Data @NoArgsConstructor +@Deprecated public class TreeProductListResult implements Serializable { private static final long serialVersionUID = 4566848209585635054L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/TreeShowGetResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/TreeShowGetResponse.java index f3784c48fb..25b90706d8 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/TreeShowGetResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/TreeShowGetResponse.java @@ -8,10 +8,12 @@ /** * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.home.tree.TreeShowGetResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class TreeShowGetResponse extends WxChannelBaseResponse { /** resp */ diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/TreeShowInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/TreeShowInfo.java index 09da2c5b0c..e3fb0cedee 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/TreeShowInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/TreeShowInfo.java @@ -11,10 +11,12 @@ * 分类展示信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.home.tree.TreeShowInfo}。 */ @Data @NoArgsConstructor @AllArgsConstructor +@Deprecated public class TreeShowInfo implements Serializable { /** 分类树 */ diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/TreeShowParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/TreeShowParam.java index 7277c528f4..f6b691370d 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/TreeShowParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/TreeShowParam.java @@ -10,10 +10,12 @@ * 设置展示在店铺主页的商品分类 参数 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.home.tree.TreeShowParam}。 */ @Data @NoArgsConstructor @AllArgsConstructor +@Deprecated public class TreeShowParam implements Serializable { private static final long serialVersionUID = -1577647561992899360L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/TreeShowSetResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/TreeShowSetResponse.java index ad65332644..3545cbaa24 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/TreeShowSetResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/tree/TreeShowSetResponse.java @@ -8,10 +8,12 @@ /** * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.home.tree.TreeShowSetResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class TreeShowSetResponse extends WxChannelBaseResponse { /** resp */ diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/window/WindowProductIndexParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/window/WindowProductIndexParam.java index fcc16bd0f6..24be27cd3c 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/window/WindowProductIndexParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/window/WindowProductIndexParam.java @@ -10,10 +10,12 @@ * 主页商品排序参数 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.home.window.WindowProductIndexParam}。 */ @Data @NoArgsConstructor @AllArgsConstructor +@Deprecated public class WindowProductIndexParam implements Serializable { private static final long serialVersionUID = 1370480140179330908L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/window/WindowProductListParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/window/WindowProductListParam.java index 9245df9887..5533aade3b 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/window/WindowProductListParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/window/WindowProductListParam.java @@ -10,10 +10,12 @@ * 获取主页展示商品列表 参数 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.home.window.WindowProductListParam}。 */ @Data @NoArgsConstructor @AllArgsConstructor +@Deprecated public class WindowProductListParam implements Serializable { /** 每页数量(默认10,不超过30) */ diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/window/WindowProductSetting.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/window/WindowProductSetting.java index 725470b912..5eaeef813e 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/window/WindowProductSetting.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/window/WindowProductSetting.java @@ -11,11 +11,13 @@ * 主页商品配置 返回结果 / 设置请求参数 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.home.window.WindowProductSetting}。 */ @Data @NoArgsConstructor @AllArgsConstructor @JsonInclude(JsonInclude.Include.NON_NULL) +@Deprecated public class WindowProductSetting implements Serializable { private static final long serialVersionUID = -5931781905709862287L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/window/WindowProductSettingResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/window/WindowProductSettingResponse.java index 495910e37d..fc17890a44 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/window/WindowProductSettingResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/home/window/WindowProductSettingResponse.java @@ -11,10 +11,12 @@ * 主页商品配置列表 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.home.window.WindowProductSettingResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class WindowProductSettingResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 1L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/image/ChannelImageInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/image/ChannelImageInfo.java index 3e12c7e830..e02febe01c 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/image/ChannelImageInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/image/ChannelImageInfo.java @@ -9,9 +9,11 @@ * 微信图片信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.image.StoreImageInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class ChannelImageInfo implements Serializable { private static final long serialVersionUID = 8883519290965944530L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/image/ChannelImageResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/image/ChannelImageResponse.java index 903af375af..91409d509c 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/image/ChannelImageResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/image/ChannelImageResponse.java @@ -8,9 +8,11 @@ /** * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.image.StoreImageResponse}。 */ @Data @EqualsAndHashCode(callSuper = true) +@Deprecated public class ChannelImageResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -4163511427507976489L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/image/QualificationFileId.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/image/QualificationFileId.java index 905720a8dc..5b834f455d 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/image/QualificationFileId.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/image/QualificationFileId.java @@ -10,10 +10,12 @@ * 资质文件id * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.image.QualificationFileId}。 */ @Data @NoArgsConstructor @AllArgsConstructor +@Deprecated public class QualificationFileId implements Serializable { private static final long serialVersionUID = -546135264746778249L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/image/QualificationFileResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/image/QualificationFileResponse.java index 5a4332885c..296232d2e0 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/image/QualificationFileResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/image/QualificationFileResponse.java @@ -10,10 +10,12 @@ * 资质文件id响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.image.QualificationFileResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class QualificationFileResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 5172377567441096813L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/image/UploadImageResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/image/UploadImageResponse.java index f1625bd3c4..7a64b3323a 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/image/UploadImageResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/image/UploadImageResponse.java @@ -10,10 +10,12 @@ * 微信图片信息响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.image.UploadImageResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class UploadImageResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -609315696774437877L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/kf/WxChannelKfCosUploadResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/kf/WxChannelKfCosUploadResponse.java index e5261dbf66..83e58d4423 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/kf/WxChannelKfCosUploadResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/kf/WxChannelKfCosUploadResponse.java @@ -6,10 +6,13 @@ import lombok.NoArgsConstructor; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; -/** 客服素材上传响应。 */ +/** 客服素材上传响应。 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.kf.WxStoreKfCosUploadResponse}。 +*/ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class WxChannelKfCosUploadResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 1L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/kf/WxChannelKfSendMsgParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/kf/WxChannelKfSendMsgParam.java index 0653c5edca..221f1b3113 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/kf/WxChannelKfSendMsgParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/kf/WxChannelKfSendMsgParam.java @@ -5,9 +5,12 @@ import lombok.Data; import lombok.NoArgsConstructor; -/** 发送客服消息请求参数。 */ +/** 发送客服消息请求参数。 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.kf.WxStoreKfSendMsgParam}。 +*/ @Data @NoArgsConstructor +@Deprecated public class WxChannelKfSendMsgParam implements Serializable { private static final long serialVersionUID = 1L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/kf/WxChannelKfSendMsgResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/kf/WxChannelKfSendMsgResponse.java index 570e309fa3..bd65b3d65f 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/kf/WxChannelKfSendMsgResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/kf/WxChannelKfSendMsgResponse.java @@ -6,10 +6,13 @@ import lombok.NoArgsConstructor; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; -/** 发送客服消息响应。 */ +/** 发送客服消息响应。 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.kf.WxStoreKfSendMsgResponse}。 +*/ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class WxChannelKfSendMsgResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 1L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/limit/LimitSku.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/limit/LimitSku.java index 29ffbf921e..53b6a98c89 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/limit/LimitSku.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/limit/LimitSku.java @@ -8,10 +8,12 @@ /** * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.limit.LimitSku}。 */ @Data @NoArgsConstructor @AllArgsConstructor +@Deprecated public class LimitSku implements Serializable { private static final long serialVersionUID = -1819737633227427482L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/limit/LimitSkuUpdate.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/limit/LimitSkuUpdate.java index 98c14a4024..33d1a23ff6 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/limit/LimitSkuUpdate.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/limit/LimitSkuUpdate.java @@ -7,9 +7,11 @@ /** * 限时抢购任务的 SKU 更新信息。 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.limit.LimitSkuUpdate}。 */ @Data @NoArgsConstructor +@Deprecated public class LimitSkuUpdate implements Serializable { private static final long serialVersionUID = 4209672674401016015L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/limit/LimitTaskAddResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/limit/LimitTaskAddResponse.java index 35ea00d68d..deda13b9d1 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/limit/LimitTaskAddResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/limit/LimitTaskAddResponse.java @@ -8,10 +8,12 @@ /** * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.limit.LimitTaskAddResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class LimitTaskAddResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -4742165348862157618L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/limit/LimitTaskInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/limit/LimitTaskInfo.java index aefc4b8136..0e9cde57bc 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/limit/LimitTaskInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/limit/LimitTaskInfo.java @@ -8,9 +8,11 @@ /** * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.limit.LimitTaskInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class LimitTaskInfo implements Serializable { private static final long serialVersionUID = 3032226931637189351L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/limit/LimitTaskListParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/limit/LimitTaskListParam.java index d608c8231e..71ea390796 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/limit/LimitTaskListParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/limit/LimitTaskListParam.java @@ -6,8 +6,10 @@ /** * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.limit.LimitTaskListParam}。 */ @Data +@Deprecated public class LimitTaskListParam extends StreamPageParam { private static final long serialVersionUID = -7227161890365102302L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/limit/LimitTaskListResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/limit/LimitTaskListResponse.java index 688fd158dc..8cf0837e52 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/limit/LimitTaskListResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/limit/LimitTaskListResponse.java @@ -9,10 +9,12 @@ /** * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.limit.LimitTaskListResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class LimitTaskListResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 3604657299385130217L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/limit/LimitTaskParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/limit/LimitTaskParam.java index b89c072944..77ee8398c3 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/limit/LimitTaskParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/limit/LimitTaskParam.java @@ -10,10 +10,12 @@ /** * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.limit.LimitTaskParam}。 */ @Data @NoArgsConstructor @JsonInclude(JsonInclude.Include.NON_NULL) +@Deprecated public class LimitTaskParam implements Serializable { private static final long serialVersionUID = 3885409806249022528L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/limit/LimitTaskUpdateParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/limit/LimitTaskUpdateParam.java index 40c7650cea..8197ee3bcd 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/limit/LimitTaskUpdateParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/limit/LimitTaskUpdateParam.java @@ -8,9 +8,11 @@ /** * 更新限时抢购任务请求参数。 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.limit.LimitTaskUpdateParam}。 */ @Data @NoArgsConstructor +@Deprecated public class LimitTaskUpdateParam implements Serializable { private static final long serialVersionUID = 7277247203887803045L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/limit/LimitTaskUpdateResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/limit/LimitTaskUpdateResponse.java index 73afc8247e..067c313bb5 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/limit/LimitTaskUpdateResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/limit/LimitTaskUpdateResponse.java @@ -8,10 +8,12 @@ /** * 更新限时抢购任务响应。 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.limit.LimitTaskUpdateResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class LimitTaskUpdateResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 4429517792042527433L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/after/AfterSaleMessage.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/after/AfterSaleMessage.java index 52beec7932..90f4749977 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/after/AfterSaleMessage.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/after/AfterSaleMessage.java @@ -12,11 +12,13 @@ * 售后消息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.message.after.AfterSaleMessage}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) @JacksonXmlRootElement(localName = "xml") +@Deprecated public class AfterSaleMessage extends WxChannelMessage { private static final long serialVersionUID = -7263404451639198126L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/after/AfterSaleStatusInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/after/AfterSaleStatusInfo.java index 06fd349da8..780b069dad 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/after/AfterSaleStatusInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/after/AfterSaleStatusInfo.java @@ -10,9 +10,11 @@ * 售后信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.message.after.AfterSaleStatusInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class AfterSaleStatusInfo implements Serializable { private static final long serialVersionUID = -7309656340583314591L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/after/ComplaintInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/after/ComplaintInfo.java index adb0b7b392..2922af5b6c 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/after/ComplaintInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/after/ComplaintInfo.java @@ -10,9 +10,11 @@ * 纠纷信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.message.after.ComplaintInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class ComplaintInfo implements Serializable { private static final long serialVersionUID = 3988395560953978239L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/after/ComplaintMessage.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/after/ComplaintMessage.java index e10a9b365a..49966a0829 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/after/ComplaintMessage.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/after/ComplaintMessage.java @@ -12,11 +12,13 @@ * 纠纷消息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.message.after.ComplaintMessage}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) @JacksonXmlRootElement(localName = "xml") +@Deprecated public class ComplaintMessage extends WxChannelMessage { private static final long serialVersionUID = 5358093415172409157L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/coupon/CouponActionInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/coupon/CouponActionInfo.java index f7a55ce0fb..de66480bee 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/coupon/CouponActionInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/coupon/CouponActionInfo.java @@ -10,9 +10,11 @@ * 优惠券操作消息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.message.coupon.CouponActionInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class CouponActionInfo implements Serializable { private static final long serialVersionUID = -4456716511656569552L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/coupon/CouponActionMessage.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/coupon/CouponActionMessage.java index 7433b7a6c2..3832d92ff7 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/coupon/CouponActionMessage.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/coupon/CouponActionMessage.java @@ -13,11 +13,13 @@ * 卡券操作 消息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.message.coupon.CouponActionMessage}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) @JacksonXmlRootElement(localName = "xml") +@Deprecated public class CouponActionMessage extends WxChannelMessage { private static final long serialVersionUID = 4910461800721504462L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/coupon/CouponReceiveMessage.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/coupon/CouponReceiveMessage.java index 448d815a58..5c0d81f3f4 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/coupon/CouponReceiveMessage.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/coupon/CouponReceiveMessage.java @@ -14,11 +14,13 @@ * 用户领券 消息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.message.coupon.CouponReceiveMessage}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) @JacksonXmlRootElement(localName = "xml") +@Deprecated public class CouponReceiveMessage extends WxChannelMessage { private static final long serialVersionUID = 5121347165246528730L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/coupon/UserCouponActionInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/coupon/UserCouponActionInfo.java index 1356c47fca..04b1785d77 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/coupon/UserCouponActionInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/coupon/UserCouponActionInfo.java @@ -10,9 +10,11 @@ * 用户优惠券操作消息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.message.coupon.UserCouponActionInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class UserCouponActionInfo implements Serializable { private static final long serialVersionUID = -5948836918972669529L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/coupon/UserCouponExpireMessage.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/coupon/UserCouponExpireMessage.java index 26370e5142..1ec71967eb 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/coupon/UserCouponExpireMessage.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/coupon/UserCouponExpireMessage.java @@ -13,11 +13,13 @@ * 用户卡券过期 消息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.message.coupon.UserCouponExpireMessage}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) @JacksonXmlRootElement(localName = "xml") +@Deprecated public class UserCouponExpireMessage extends WxChannelMessage { private static final long serialVersionUID = -2557475297107588372L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/coupon/UserCouponUseMessage.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/coupon/UserCouponUseMessage.java index 7b436743c3..7cff51fef9 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/coupon/UserCouponUseMessage.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/coupon/UserCouponUseMessage.java @@ -13,11 +13,13 @@ * 用户卡券使用 消息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.message.coupon.UserCouponUseMessage}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) @JacksonXmlRootElement(localName = "xml") +@Deprecated public class UserCouponUseMessage extends WxChannelMessage { private static final long serialVersionUID = -1051142666438578628L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/fund/AccountNotifyMessage.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/fund/AccountNotifyMessage.java index b5a02ac834..4f03523979 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/fund/AccountNotifyMessage.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/fund/AccountNotifyMessage.java @@ -12,11 +12,13 @@ * 账户变更通知 消息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.message.fund.AccountNotifyMessage}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) @JacksonXmlRootElement(localName = "xml") +@Deprecated public class AccountNotifyMessage extends WxChannelMessage { private static final long serialVersionUID = 3846692537729725664L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/fund/BankNotifyInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/fund/BankNotifyInfo.java index 44ef398f8b..39f5afb217 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/fund/BankNotifyInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/fund/BankNotifyInfo.java @@ -10,9 +10,11 @@ * 账户信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.message.fund.BankNotifyInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class BankNotifyInfo implements Serializable { private static final long serialVersionUID = 4192569196686180014L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/fund/QrNotifyInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/fund/QrNotifyInfo.java index 83b466f07e..6a68488d0f 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/fund/QrNotifyInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/fund/QrNotifyInfo.java @@ -10,9 +10,11 @@ * 提现二维码回调 消息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.message.fund.QrNotifyInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class QrNotifyInfo implements Serializable { private static final long serialVersionUID = 2470016408300157273L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/fund/QrNotifyMessage.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/fund/QrNotifyMessage.java index 56e906a641..199223418f 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/fund/QrNotifyMessage.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/fund/QrNotifyMessage.java @@ -12,11 +12,13 @@ * 提现二维码回调 消息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.message.fund.QrNotifyMessage}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) @JacksonXmlRootElement(localName = "xml") +@Deprecated public class QrNotifyMessage extends WxChannelMessage { private static final long serialVersionUID = -4705790895359679423L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/fund/WithdrawNotifyInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/fund/WithdrawNotifyInfo.java index 810f40c95c..ff6ef9bdeb 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/fund/WithdrawNotifyInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/fund/WithdrawNotifyInfo.java @@ -10,9 +10,11 @@ * 提现通知信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.message.fund.WithdrawNotifyInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class WithdrawNotifyInfo implements Serializable { private static final long serialVersionUID = 2987401114254821956L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/fund/WithdrawNotifyMessage.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/fund/WithdrawNotifyMessage.java index ff45e73ec6..86a72d91e6 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/fund/WithdrawNotifyMessage.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/fund/WithdrawNotifyMessage.java @@ -12,11 +12,13 @@ * 账户变更通知 消息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.message.fund.WithdrawNotifyMessage}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) @JacksonXmlRootElement(localName = "xml") +@Deprecated public class WithdrawNotifyMessage extends WxChannelMessage { private static final long serialVersionUID = -2504086242143523430L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderCancelInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderCancelInfo.java index 8ff3ead54e..a8ed7ec36c 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderCancelInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderCancelInfo.java @@ -10,10 +10,12 @@ * 订单取消信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.message.order.OrderCancelInfo}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class OrderCancelInfo extends OrderIdInfo { private static final long serialVersionUID = -8022876997578127873L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderCancelMessage.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderCancelMessage.java index 8e6b33c2ee..148d7406c4 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderCancelMessage.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderCancelMessage.java @@ -12,11 +12,13 @@ * 订单取消消息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.message.order.OrderCancelMessage}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) @JacksonXmlRootElement(localName = "xml") +@Deprecated public class OrderCancelMessage extends WxChannelMessage { private static final long serialVersionUID = 5389546516473919310L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderConfirmInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderConfirmInfo.java index bd212092a5..de5d6b904b 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderConfirmInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderConfirmInfo.java @@ -10,10 +10,12 @@ * 订单确认收货信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.message.order.OrderConfirmInfo}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class OrderConfirmInfo extends OrderIdInfo { private static final long serialVersionUID = -2569494642832261346L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderConfirmMessage.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderConfirmMessage.java index dda35041b2..95c4246fd1 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderConfirmMessage.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderConfirmMessage.java @@ -12,11 +12,13 @@ * 订单确认收货消息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.message.order.OrderConfirmMessage}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) @JacksonXmlRootElement(localName = "xml") +@Deprecated public class OrderConfirmMessage extends WxChannelMessage { private static final long serialVersionUID = 4219477394934480425L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderDeliveryInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderDeliveryInfo.java index ca3d26736a..5f09b43995 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderDeliveryInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderDeliveryInfo.java @@ -10,10 +10,12 @@ * 订单发货信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.message.order.OrderDeliveryInfo}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class OrderDeliveryInfo extends OrderIdInfo { private static final long serialVersionUID = 117962754344887556L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderDeliveryMessage.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderDeliveryMessage.java index 25d79e2c4d..2bc081207a 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderDeliveryMessage.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderDeliveryMessage.java @@ -12,11 +12,13 @@ * 订单发货消息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.message.order.OrderDeliveryMessage}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) @JacksonXmlRootElement(localName = "xml") +@Deprecated public class OrderDeliveryMessage extends WxChannelMessage { private static final long serialVersionUID = -1440834047566984402L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderExtInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderExtInfo.java index b4986f35c4..1458e42014 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderExtInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderExtInfo.java @@ -10,10 +10,12 @@ * 订单其他信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.message.order.OrderExtInfo}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class OrderExtInfo extends OrderIdInfo { private static final long serialVersionUID = 4723533858047219828L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderExtMessage.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderExtMessage.java index c5ede6c6bd..0a3880ff5d 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderExtMessage.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderExtMessage.java @@ -12,11 +12,13 @@ * 订单状态消息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.message.order.OrderExtMessage}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) @JacksonXmlRootElement(localName = "xml") +@Deprecated public class OrderExtMessage extends WxChannelMessage { private static final long serialVersionUID = -3183077256476798756L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderIdInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderIdInfo.java index b9ac33b376..d71346f19b 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderIdInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderIdInfo.java @@ -10,9 +10,11 @@ * 订单id信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.message.order.OrderIdInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class OrderIdInfo implements Serializable { private static final long serialVersionUID = 5547544436235032051L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderIdMessage.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderIdMessage.java index 398c29bde4..4f152d5c78 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderIdMessage.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderIdMessage.java @@ -12,11 +12,13 @@ * 订单id消息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.message.order.OrderIdMessage}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) @JacksonXmlRootElement(localName = "xml") +@Deprecated public class OrderIdMessage extends WxChannelMessage { private static final long serialVersionUID = 3793987364799712798L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderPayInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderPayInfo.java index d916c14a21..3617a3fef5 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderPayInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderPayInfo.java @@ -10,10 +10,12 @@ * 订单支付信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.message.order.OrderPayInfo}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class OrderPayInfo extends OrderIdInfo { private static final long serialVersionUID = -3502786073769735831L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderPayMessage.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderPayMessage.java index ee1f458aba..689e6d1f2a 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderPayMessage.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderPayMessage.java @@ -12,11 +12,13 @@ * 订单支付成功消息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.message.order.OrderPayMessage}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) @JacksonXmlRootElement(localName = "xml") +@Deprecated public class OrderPayMessage extends WxChannelMessage { private static final long serialVersionUID = 1083018549119427808L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderSettleInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderSettleInfo.java index b4f48b6fb8..8876f36167 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderSettleInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderSettleInfo.java @@ -10,10 +10,12 @@ * 订单结算信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.message.order.OrderSettleInfo}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class OrderSettleInfo extends OrderIdInfo { private static final long serialVersionUID = -1817955568383872053L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderSettleMessage.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderSettleMessage.java index 2d3d1d96d6..e0241d2944 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderSettleMessage.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderSettleMessage.java @@ -12,11 +12,13 @@ * 订单结算消息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.message.order.OrderSettleMessage}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) @JacksonXmlRootElement(localName = "xml") +@Deprecated public class OrderSettleMessage extends WxChannelMessage { private static final long serialVersionUID = -4001189226630840548L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderStatusMessage.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderStatusMessage.java index 4a06ccc99c..3d72a02ede 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderStatusMessage.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/order/OrderStatusMessage.java @@ -13,11 +13,13 @@ * 订单状态消息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.message.order.OrderStatusMessage}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) @JacksonXmlRootElement(localName = "xml") +@Deprecated public class OrderStatusMessage extends WxChannelMessage { private static final long serialVersionUID = -356717038344749283L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/product/BrandMessage.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/product/BrandMessage.java index 9a7c021c9d..0524d7c75b 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/product/BrandMessage.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/product/BrandMessage.java @@ -13,11 +13,13 @@ * 品牌消息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.message.product.BrandMessage}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) @JacksonXmlRootElement(localName = "xml") +@Deprecated public class BrandMessage extends WxChannelMessage { private static final long serialVersionUID = -3773902704930003105L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/product/CategoryAuditMessage.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/product/CategoryAuditMessage.java index f6d696d5c1..bf51aedf7d 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/product/CategoryAuditMessage.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/product/CategoryAuditMessage.java @@ -13,11 +13,13 @@ * 类目审核消息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.message.product.CategoryAuditMessage}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) @JacksonXmlRootElement(localName = "xml") +@Deprecated public class CategoryAuditMessage extends WxChannelMessage { private static final long serialVersionUID = 3192582751919917223L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/product/SpuAuditMessage.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/product/SpuAuditMessage.java index 569b53781e..1314aacbfc 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/product/SpuAuditMessage.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/product/SpuAuditMessage.java @@ -13,11 +13,13 @@ * SPU审核消息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.message.product.SpuAuditMessage}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) @JacksonXmlRootElement(localName = "xml") +@Deprecated public class SpuAuditMessage extends WxChannelMessage { private static final long serialVersionUID = 1763291928383078102L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/product/SpuStatusMessage.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/product/SpuStatusMessage.java index 7fb9f272e8..a1d6194818 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/product/SpuStatusMessage.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/product/SpuStatusMessage.java @@ -13,11 +13,13 @@ * SPU状态消息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.message.product.SpuStatusMessage}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) @JacksonXmlRootElement(localName = "xml") +@Deprecated public class SpuStatusMessage extends WxChannelMessage { private static final long serialVersionUID = 6872830451279856492L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/product/SpuStockMessage.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/product/SpuStockMessage.java index 96feac5a4a..fb6e0483c5 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/product/SpuStockMessage.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/product/SpuStockMessage.java @@ -13,11 +13,13 @@ * SPU库存不足消息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.message.product.SpuStockMessage}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) @JacksonXmlRootElement(localName = "xml") +@Deprecated public class SpuStockMessage extends WxChannelMessage { private static final long serialVersionUID = 2250860804161527363L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/sharer/SharerChangeMessage.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/sharer/SharerChangeMessage.java index 8b2036693e..ea75585411 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/sharer/SharerChangeMessage.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/sharer/SharerChangeMessage.java @@ -13,11 +13,13 @@ * https://developers.weixin.qq.com/doc/channels/API/sharer/callback/channels_ec_sharer_change.html * * @author sd-hxf + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.message.sharer.SharerChangeMessage}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) @JacksonXmlRootElement(localName = "xml") +@Deprecated public class SharerChangeMessage extends WxChannelMessage { private static final long serialVersionUID = 4219477394934480421L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/store/CloseStoreMessage.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/store/CloseStoreMessage.java index 2a43483354..ec694318cb 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/store/CloseStoreMessage.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/store/CloseStoreMessage.java @@ -16,11 +16,13 @@ * 小店注销消息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.message.store.CloseStoreMessage}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) @JacksonXmlRootElement(localName = "xml") +@Deprecated public class CloseStoreMessage extends WxChannelMessage { private static final long serialVersionUID = 7619787772418774020L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/store/NicknameUpdateMessage.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/store/NicknameUpdateMessage.java index e6665497e0..59a765ff86 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/store/NicknameUpdateMessage.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/store/NicknameUpdateMessage.java @@ -16,11 +16,13 @@ * 小店修改名称消息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.message.store.NicknameUpdateMessage}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) @JacksonXmlRootElement(localName = "xml") +@Deprecated public class NicknameUpdateMessage extends WxChannelMessage { private static final long serialVersionUID = 7619787772418774020L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/supplier/SupplierItemInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/supplier/SupplierItemInfo.java index 49bbb0548b..07ba22d8ba 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/supplier/SupplierItemInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/supplier/SupplierItemInfo.java @@ -11,9 +11,11 @@ * 团长商品变更信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.message.supplier.SupplierItemInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class SupplierItemInfo implements Serializable { private static final long serialVersionUID = -1971161027976024360L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/supplier/SupplierItemMessage.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/supplier/SupplierItemMessage.java index 2403aa0c60..c083658b5a 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/supplier/SupplierItemMessage.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/supplier/SupplierItemMessage.java @@ -12,11 +12,13 @@ * 团长商品变更 消息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.message.supplier.SupplierItemMessage}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) @JacksonXmlRootElement(localName = "xml") +@Deprecated public class SupplierItemMessage extends WxChannelMessage { private static final long serialVersionUID = -4520611382070764349L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/vip/CouponInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/vip/CouponInfo.java index 4305d4738d..df83d2ae86 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/vip/CouponInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/vip/CouponInfo.java @@ -12,11 +12,13 @@ * 优惠券信息 * * @author asushiye + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.message.vip.CouponInfo}。 */ @Data @JsonInclude(JsonInclude.Include.NON_NULL) @NoArgsConstructor +@Deprecated public class CouponInfo implements Serializable { private static final long serialVersionUID = -3659710836197413932L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/vip/ExchangeInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/vip/ExchangeInfo.java index 4cec52af02..b76ec09125 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/vip/ExchangeInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/vip/ExchangeInfo.java @@ -12,11 +12,13 @@ * 积分兑换 * * @author asushiye + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.message.vip.ExchangeInfo}。 */ @Data @JsonInclude(JsonInclude.Include.NON_NULL) @NoArgsConstructor +@Deprecated public class ExchangeInfo implements Serializable { private static final long serialVersionUID = -5692646625631036694L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/vip/ExchangeInfoMessage.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/vip/ExchangeInfoMessage.java index 6cb98225bd..ae4684b348 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/vip/ExchangeInfoMessage.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/vip/ExchangeInfoMessage.java @@ -12,12 +12,14 @@ * 积分兑换消息 * * @author asushiye + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.message.vip.ExchangeInfoMessage}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) @JacksonXmlRootElement(localName = "xml") +@Deprecated public class ExchangeInfoMessage extends WxChannelMessage { private static final long serialVersionUID = 2926346100146724110L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/vip/ProductInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/vip/ProductInfo.java index 451a1e19b5..2d97d8eed2 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/vip/ProductInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/vip/ProductInfo.java @@ -12,11 +12,13 @@ * 商品信息 * * @author asushiye + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.message.vip.ProductInfo}。 */ @Data @JsonInclude(JsonInclude.Include.NON_NULL) @NoArgsConstructor +@Deprecated public class ProductInfo implements Serializable { private static final long serialVersionUID = -3037180342360944232L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/vip/UserInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/vip/UserInfo.java index f21c83c168..af921de924 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/vip/UserInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/vip/UserInfo.java @@ -12,11 +12,13 @@ * 用户信息 * * @author asushiye + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.message.vip.UserInfo}。 */ @Data @JsonInclude(JsonInclude.Include.NON_NULL) @NoArgsConstructor +@Deprecated public class UserInfo implements Serializable { private static final long serialVersionUID = 1239486732464880985L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/vip/UserInfoMessage.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/vip/UserInfoMessage.java index 439edd0951..5b4f5b725e 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/vip/UserInfoMessage.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/vip/UserInfoMessage.java @@ -12,12 +12,14 @@ * 用户信息消息 * * @author asushiye + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.message.vip.UserInfoMessage}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) @JacksonXmlRootElement(localName = "xml") +@Deprecated public class UserInfoMessage extends WxChannelMessage { private static final long serialVersionUID = 6926608689621530622L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/voucher/VoucherInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/voucher/VoucherInfo.java index 1b5a926205..031073e8a9 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/voucher/VoucherInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/voucher/VoucherInfo.java @@ -8,9 +8,11 @@ /** * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.message.voucher.VoucherInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class VoucherInfo implements Serializable { private static final long serialVersionUID = 6007964849358969438L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/voucher/VoucherMessage.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/voucher/VoucherMessage.java index 941828969d..732d0cbeb5 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/voucher/VoucherMessage.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/message/voucher/VoucherMessage.java @@ -13,11 +13,13 @@ * 发放团购优惠成功消息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.message.voucher.VoucherMessage}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) @JacksonXmlRootElement(localName = "xml") +@Deprecated public class VoucherMessage extends WxChannelMessage { private static final long serialVersionUID = 975858675917036089L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/AfterSaleDetail.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/AfterSaleDetail.java index 5401a588bf..0cbf7598f2 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/AfterSaleDetail.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/AfterSaleDetail.java @@ -10,9 +10,11 @@ * 售后信息详情 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.AfterSaleDetail}。 */ @Data @NoArgsConstructor +@Deprecated public class AfterSaleDetail implements Serializable { private static final long serialVersionUID = -3786573982841041144L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/AfterSaleOrderInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/AfterSaleOrderInfo.java index 118feba35b..7f29f0af07 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/AfterSaleOrderInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/AfterSaleOrderInfo.java @@ -9,9 +9,11 @@ * 售后信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.AfterSaleOrderInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class AfterSaleOrderInfo implements Serializable { private static final long serialVersionUID = 3938545222231426455L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/ChangeOrderInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/ChangeOrderInfo.java index f6485085bb..3b9cd5fafd 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/ChangeOrderInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/ChangeOrderInfo.java @@ -9,9 +9,11 @@ * 订单修改信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.ChangeOrderInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class ChangeOrderInfo implements Serializable { private static final long serialVersionUID = 4932726847720452340L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/ChangeSkuInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/ChangeSkuInfo.java index b40a497755..ea7a0f110c 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/ChangeSkuInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/ChangeSkuInfo.java @@ -8,9 +8,11 @@ /** * 更换sku信息 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.ChangeSkuInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class ChangeSkuInfo implements Serializable { private static final long serialVersionUID = 8783442929429377519L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/DecodeAddressInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/DecodeAddressInfo.java index 3aa6622eeb..8240514c96 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/DecodeAddressInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/DecodeAddressInfo.java @@ -10,10 +10,12 @@ * 解码地址数据 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.DecodeAddressInfo}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class DecodeAddressInfo extends AddressInfo { /** 虚拟发货订单联系方式,在发货方式为无需快递(deliver_method=1)时返回 */ diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/DecodeSensitiveInfoResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/DecodeSensitiveInfoResponse.java index c0431a8fd6..f151864599 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/DecodeSensitiveInfoResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/DecodeSensitiveInfoResponse.java @@ -10,10 +10,12 @@ * 解码订单包含的敏感数据响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.DecodeSensitiveInfoResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class DecodeSensitiveInfoResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 935829924760021624L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/DeliveryProductInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/DeliveryProductInfo.java index 5427a49839..d2f44516a7 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/DeliveryProductInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/DeliveryProductInfo.java @@ -11,9 +11,11 @@ * 发货物流信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.DeliveryProductInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class DeliveryProductInfo implements Serializable { private static final long serialVersionUID = -8110532854439612471L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/DeliveryUpdateParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/DeliveryUpdateParam.java index 6aca6feed4..34595bacf5 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/DeliveryUpdateParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/DeliveryUpdateParam.java @@ -12,10 +12,12 @@ * 修改物流参数 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.DeliveryUpdateParam}。 */ @Data @NoArgsConstructor @JsonInclude(JsonInclude.Include.NON_NULL) +@Deprecated public class DeliveryUpdateParam implements Serializable { /** 订单ID */ diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/DropshipInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/DropshipInfo.java index 9c5340376d..54ee531fd0 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/DropshipInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/DropshipInfo.java @@ -8,9 +8,11 @@ /** * 代发相关信息 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.DropshipInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class DropshipInfo implements Serializable { private static final long serialVersionUID = -4562618835611282016L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/FreeGiftInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/FreeGiftInfo.java index b2612cfccd..7a7642565b 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/FreeGiftInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/FreeGiftInfo.java @@ -9,9 +9,11 @@ /** * 赠品信息 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.FreeGiftInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class FreeGiftInfo implements Serializable { private static final long serialVersionUID = 2024061212345678901L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/MainProductInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/MainProductInfo.java index 6e47393c6b..efd7c97110 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/MainProductInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/MainProductInfo.java @@ -8,9 +8,11 @@ /** * 赠品对应的主品信息 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.MainProductInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class MainProductInfo implements Serializable { private static final long serialVersionUID = 2024061212345678901L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderAddressInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderAddressInfo.java index 1af5aee49e..148e2be5e1 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderAddressInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderAddressInfo.java @@ -10,10 +10,12 @@ * 地址信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.OrderAddressInfo}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class OrderAddressInfo extends AddressInfo { private static final long serialVersionUID = 3062707865189774795L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderAddressParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderAddressParam.java index 55eb6a8655..2fbb11195c 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderAddressParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderAddressParam.java @@ -13,11 +13,13 @@ * 订单地址参数 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.OrderAddressParam}。 */ @Data @NoArgsConstructor @AllArgsConstructor @JsonInclude(Include.NON_NULL) +@Deprecated public class OrderAddressParam implements Serializable { private static final long serialVersionUID = 2277618297276466650L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderAgentInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderAgentInfo.java index 548e36dd49..25f19cfeb7 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderAgentInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderAgentInfo.java @@ -9,9 +9,11 @@ * 授权账号信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.OrderAgentInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class OrderAgentInfo implements Serializable { private static final long serialVersionUID = 6396067079343033841L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderCommissionInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderCommissionInfo.java index f3cab1f4bf..c2b983a853 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderCommissionInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderCommissionInfo.java @@ -9,9 +9,11 @@ * 分佣信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.OrderCommissionInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class OrderCommissionInfo implements Serializable { private static final long serialVersionUID = -3046852309683467272L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderCompensationDeliveryParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderCompensationDeliveryParam.java index 760762adef..4b6c36113a 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderCompensationDeliveryParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderCompensationDeliveryParam.java @@ -14,11 +14,13 @@ * 订单补发货 请求参数 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.OrderCompensationDeliveryParam}。 */ @Data @NoArgsConstructor @AllArgsConstructor @JsonInclude(Include.NON_NULL) +@Deprecated public class OrderCompensationDeliveryParam implements Serializable { private static final long serialVersionUID = 1L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderCouponInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderCouponInfo.java index 34f2d670d0..6ed69983a5 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderCouponInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderCouponInfo.java @@ -9,9 +9,11 @@ * 卡券信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.OrderCouponInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class OrderCouponInfo implements Serializable { private static final long serialVersionUID = -2033350505767196339L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderCustomInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderCustomInfo.java index 88981c6ccc..e67cdb053a 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderCustomInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderCustomInfo.java @@ -9,9 +9,11 @@ * 商品定制信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.OrderCustomInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class OrderCustomInfo implements Serializable { private static final long serialVersionUID = 6681266835402157651L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderDeliveryInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderDeliveryInfo.java index ebe6bb8dc2..ea5a5fb060 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderDeliveryInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderDeliveryInfo.java @@ -10,9 +10,11 @@ * 物流信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.OrderDeliveryInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class OrderDeliveryInfo implements Serializable { private static final long serialVersionUID = -5348922760017557397L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderDetailInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderDetailInfo.java index 4d96023be1..8abe26f4fd 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderDetailInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderDetailInfo.java @@ -10,9 +10,11 @@ * 订单详细数据 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.OrderDetailInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class OrderDetailInfo implements Serializable { private static final long serialVersionUID = 3916307299998005676L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderExtInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderExtInfo.java index a846311c61..eb7f131213 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderExtInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderExtInfo.java @@ -10,9 +10,11 @@ * 订单备注信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.OrderExtInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class OrderExtInfo implements Serializable { private static final long serialVersionUID = 4568097877621455429L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderGreetingCardInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderGreetingCardInfo.java index 6b0c37033f..10087a1af5 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderGreetingCardInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderGreetingCardInfo.java @@ -9,9 +9,11 @@ * 订单商品贺卡信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.OrderGreetingCardInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class OrderGreetingCardInfo implements Serializable { private static final long serialVersionUID = -6391443179945240242L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderIdParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderIdParam.java index f1e92e1339..c3dd768279 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderIdParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderIdParam.java @@ -12,11 +12,13 @@ * 订单id参数 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.OrderIdParam}。 */ @Data @NoArgsConstructor @AllArgsConstructor @JsonInclude(Include.NON_NULL) +@Deprecated public class OrderIdParam implements Serializable { private static final long serialVersionUID = -8616582197963359789L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderInfo.java index 00222d8487..b3754a0acd 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderInfo.java @@ -9,9 +9,11 @@ * 视频号小店订单 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.OrderInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class OrderInfo implements Serializable { private static final long serialVersionUID = -4562618835611282016L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderInfoParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderInfoParam.java index e7a8c9a2b8..c26c888ddf 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderInfoParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderInfoParam.java @@ -10,11 +10,13 @@ /** * 获取订单详情参数 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.OrderInfoParam}。 */ @Data @NoArgsConstructor @AllArgsConstructor @JsonInclude(JsonInclude.Include.NON_NULL) +@Deprecated public class OrderInfoParam implements Serializable { private static final long serialVersionUID = 42L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderInfoResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderInfoResponse.java index 0b6fd53c17..da9514c10a 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderInfoResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderInfoResponse.java @@ -10,10 +10,12 @@ * 订单信息响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.OrderInfoResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class OrderInfoResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 935829924760021624L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderListParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderListParam.java index a84da3d2e8..2a589b3324 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderListParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderListParam.java @@ -13,11 +13,13 @@ * 获取订单列表参数 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.OrderListParam}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) @JsonInclude(Include.NON_NULL) +@Deprecated public class OrderListParam extends StreamPageParam { private static final long serialVersionUID = 3780097459964746890L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderListResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderListResponse.java index 454abc59d9..cfa98a8190 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderListResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderListResponse.java @@ -11,10 +11,12 @@ * 订单列表 响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.OrderListResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class OrderListResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -6198624448684807852L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderPayInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderPayInfo.java index 7a9f367d76..20b09a8f2d 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderPayInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderPayInfo.java @@ -9,9 +9,11 @@ * 支付信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.OrderPayInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class OrderPayInfo implements Serializable { private static final long serialVersionUID = -5085386252699113948L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderPriceInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderPriceInfo.java index 50eac04e50..eb36a7c9f5 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderPriceInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderPriceInfo.java @@ -10,9 +10,11 @@ * 商店订单价格信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.OrderPriceInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class OrderPriceInfo implements Serializable { private static final long serialVersionUID = 5216506688949493432L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderPriceParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderPriceParam.java index 30f74501c4..bc832829b8 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderPriceParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderPriceParam.java @@ -11,9 +11,11 @@ * 订单价格参数 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.OrderPriceParam}。 */ @Data @JsonInclude(Include.NON_NULL) +@Deprecated public class OrderPriceParam implements Serializable { private static final long serialVersionUID = -7925819981481556218L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderProductExtraService.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderProductExtraService.java index ff413a9646..b95732696a 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderProductExtraService.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderProductExtraService.java @@ -10,9 +10,11 @@ * 商品额外服务信息 * * @author 北鹤M + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.OrderProductExtraService}。 */ @Data @NoArgsConstructor +@Deprecated public class OrderProductExtraService implements Serializable { private static final long serialVersionUID = -8752053507170277156L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderProductInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderProductInfo.java index e5c37e3cba..99736b5358 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderProductInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderProductInfo.java @@ -13,9 +13,11 @@ * 订单商品信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.OrderProductInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class OrderProductInfo implements Serializable { private static final long serialVersionUID = -2193536732955185928L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderRefundInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderRefundInfo.java index 9e3ae522f8..40e55b280b 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderRefundInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderRefundInfo.java @@ -9,9 +9,11 @@ * 订单退款信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.OrderRefundInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class OrderRefundInfo implements Serializable { private static final long serialVersionUID = -7257910073388645919L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderRemarkParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderRemarkParam.java index 707ec0d96b..ce06eea211 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderRemarkParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderRemarkParam.java @@ -10,10 +10,12 @@ * 订单备注 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.OrderRemarkParam}。 */ @Data @NoArgsConstructor @AllArgsConstructor +@Deprecated public class OrderRemarkParam implements Serializable { private static final long serialVersionUID = 2285714780419948468L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderSearchCondition.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderSearchCondition.java index a4c8373cec..a325c72e53 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderSearchCondition.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderSearchCondition.java @@ -11,10 +11,12 @@ * 订单 搜索条件 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.OrderSearchCondition}。 */ @Data @NoArgsConstructor @JsonInclude(Include.NON_EMPTY) +@Deprecated public class OrderSearchCondition implements Serializable { private static final long serialVersionUID = 5492584333971883140L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderSearchParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderSearchParam.java index 2f56747d19..7e3332b4b8 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderSearchParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderSearchParam.java @@ -9,10 +9,12 @@ /** * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.OrderSearchParam}。 */ @Data @NoArgsConstructor @JsonInclude(Include.NON_EMPTY) +@Deprecated public class OrderSearchParam extends StreamPageParam { private static final long serialVersionUID = 5737520097455135218L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderSettleInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderSettleInfo.java index bd31931444..0a06d9e57a 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderSettleInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderSettleInfo.java @@ -11,9 +11,11 @@ * 结算信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.OrderSettleInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class OrderSettleInfo implements Serializable { private static final long serialVersionUID = 2140632631448343656L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderSharerInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderSharerInfo.java index 7ed41d2edf..75caf153b2 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderSharerInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderSharerInfo.java @@ -11,9 +11,11 @@ * 分享信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.OrderSharerInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class OrderSharerInfo implements Serializable { private static final long serialVersionUID = 7183259072254660971L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderSkuDeliverInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderSkuDeliverInfo.java index 6dd46c9a39..d1cf4d2713 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderSkuDeliverInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderSkuDeliverInfo.java @@ -10,9 +10,11 @@ * 商品发货信息 * * @author 北鹤M + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.OrderSkuDeliverInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class OrderSkuDeliverInfo implements Serializable { private static final long serialVersionUID = 4075897806362929800L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderSkuShareInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderSkuShareInfo.java index 7912e53348..c4d5a59eef 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderSkuShareInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderSkuShareInfo.java @@ -10,9 +10,11 @@ * Sku层分享信息 * * @author 北鹤M + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.OrderSkuShareInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class OrderSkuShareInfo implements Serializable { private static final long serialVersionUID = 705312408112124476L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderSourceInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderSourceInfo.java index 8d5e5aaef0..d3646307b7 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderSourceInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/OrderSourceInfo.java @@ -9,9 +9,11 @@ * 订单带货来源信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.OrderSourceInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class OrderSourceInfo implements Serializable { private static final long serialVersionUID = 3131907659419977296L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/PreShipmentChangeSkuRejectParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/PreShipmentChangeSkuRejectParam.java index cd26719e62..77bebf1339 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/PreShipmentChangeSkuRejectParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/PreShipmentChangeSkuRejectParam.java @@ -12,11 +12,13 @@ * 拒绝待发货前更换SKU请求 请求参数 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.PreShipmentChangeSkuRejectParam}。 */ @Data @NoArgsConstructor @AllArgsConstructor @JsonInclude(Include.NON_NULL) +@Deprecated public class PreShipmentChangeSkuRejectParam implements Serializable { private static final long serialVersionUID = 1L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/PreShipmentChangeSkuResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/PreShipmentChangeSkuResponse.java index 5aff82bd07..5bb2a14f9f 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/PreShipmentChangeSkuResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/PreShipmentChangeSkuResponse.java @@ -10,10 +10,12 @@ * 获取待发货前更换SKU待处理请求 响应 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.PreShipmentChangeSkuResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class PreShipmentChangeSkuResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 1L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/PresentNoteAddParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/PresentNoteAddParam.java index 1e0ea0e484..78c1541fe0 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/PresentNoteAddParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/PresentNoteAddParam.java @@ -12,11 +12,13 @@ * 礼物订单新增备注信息 请求参数 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.PresentNoteAddParam}。 */ @Data @NoArgsConstructor @AllArgsConstructor @JsonInclude(Include.NON_NULL) +@Deprecated public class PresentNoteAddParam implements Serializable { private static final long serialVersionUID = 1L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/PresentSubOrderResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/PresentSubOrderResponse.java index f550a47a6d..1d77777e0a 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/PresentSubOrderResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/PresentSubOrderResponse.java @@ -11,10 +11,12 @@ * 获取礼物单的子单列表 响应 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.PresentSubOrderResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class PresentSubOrderResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 1L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/PrivateNumberAddPhoneParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/PrivateNumberAddPhoneParam.java index ec0d558e57..971cc57a1f 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/PrivateNumberAddPhoneParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/PrivateNumberAddPhoneParam.java @@ -12,11 +12,13 @@ * 添加待认证手机号 请求参数 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.PrivateNumberAddPhoneParam}。 */ @Data @NoArgsConstructor @AllArgsConstructor @JsonInclude(Include.NON_NULL) +@Deprecated public class PrivateNumberAddPhoneParam implements Serializable { private static final long serialVersionUID = 1L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/PrivateNumberGetPhoneResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/PrivateNumberGetPhoneResponse.java index 4a531a1137..c96bc59b52 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/PrivateNumberGetPhoneResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/PrivateNumberGetPhoneResponse.java @@ -11,10 +11,12 @@ * 获取小店手机号认证状态 响应 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.PrivateNumberGetPhoneResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class PrivateNumberGetPhoneResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 1L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/PrivateNumberPhoneInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/PrivateNumberPhoneInfo.java index e0dda182d5..70bade5c15 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/PrivateNumberPhoneInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/PrivateNumberPhoneInfo.java @@ -9,9 +9,11 @@ * 手机号认证信息 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.PrivateNumberPhoneInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class PrivateNumberPhoneInfo implements Serializable { private static final long serialVersionUID = 1L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/PrivateNumberSendVerifyCodeParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/PrivateNumberSendVerifyCodeParam.java index 0698d29a77..148b609eec 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/PrivateNumberSendVerifyCodeParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/PrivateNumberSendVerifyCodeParam.java @@ -12,11 +12,13 @@ * 获取短信验证码 请求参数 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.PrivateNumberSendVerifyCodeParam}。 */ @Data @NoArgsConstructor @AllArgsConstructor @JsonInclude(Include.NON_NULL) +@Deprecated public class PrivateNumberSendVerifyCodeParam implements Serializable { private static final long serialVersionUID = 1L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/QualityInsepctInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/QualityInsepctInfo.java index 64c1102bb2..496a6f163c 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/QualityInsepctInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/QualityInsepctInfo.java @@ -9,9 +9,11 @@ * 质检信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.QualityInsepctInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class QualityInsepctInfo implements Serializable { private static final long serialVersionUID = 8109819414306253475L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/RealNumberViewAuditResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/RealNumberViewAuditResponse.java index 4ffa77bce1..a741ba9d48 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/RealNumberViewAuditResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/RealNumberViewAuditResponse.java @@ -10,10 +10,12 @@ * 查看订单真实号审核状态 响应 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.RealNumberViewAuditResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class RealNumberViewAuditResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 1L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/RechargeInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/RechargeInfo.java index 452dd0677c..e79a8c2616 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/RechargeInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/RechargeInfo.java @@ -9,9 +9,11 @@ * 虚拟商品充值账户信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.RechargeInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class RechargeInfo implements Serializable { /** 虚拟商品充值账号,当account_type=qq或phone_number或mail的时候返回 */ diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/TelNumberExtInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/TelNumberExtInfo.java index 1d9e8b7914..da33224c99 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/TelNumberExtInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/TelNumberExtInfo.java @@ -7,8 +7,10 @@ * 联系方式信息 * * @author imyzt + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.TelNumberExtInfo}。 */ @Data +@Deprecated public class TelNumberExtInfo { /** diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/VirtualNumberInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/VirtualNumberInfo.java index 217908e27c..504dda40c2 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/VirtualNumberInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/VirtualNumberInfo.java @@ -9,9 +9,11 @@ * 虚拟号信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.VirtualNumberInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class VirtualNumberInfo implements Serializable { private static final long serialVersionUID = -372834823737476644L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/VirtualTelNumberResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/VirtualTelNumberResponse.java index 92f09b59ab..c271315ed8 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/VirtualTelNumberResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/order/VirtualTelNumberResponse.java @@ -10,10 +10,12 @@ * 兑换虚拟号 返回结果 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.order.VirtualTelNumberResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class VirtualTelNumberResponse extends WxChannelBaseResponse { /** 虚拟号码 */ diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/AddProductThirdPartySourceParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/AddProductThirdPartySourceParam.java index 6f258358b6..29cba6d5e1 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/AddProductThirdPartySourceParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/AddProductThirdPartySourceParam.java @@ -5,8 +5,11 @@ import java.io.Serializable; import lombok.Data; -/** 新增第三方货源信息请求参数. */ +/** 新增第三方货源信息请求参数. + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.AddProductThirdPartySourceParam}。 +*/ @Data +@Deprecated public class AddProductThirdPartySourceParam implements Serializable { private static final long serialVersionUID = -5784320217481497742L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/AddProductThirdPartySourceResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/AddProductThirdPartySourceResponse.java index aec4cef996..d9709486da 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/AddProductThirdPartySourceResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/AddProductThirdPartySourceResponse.java @@ -5,9 +5,12 @@ import lombok.EqualsAndHashCode; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; -/** 新增第三方货源信息响应. */ +/** 新增第三方货源信息响应. + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.AddProductThirdPartySourceResponse}。 +*/ @Data @EqualsAndHashCode(callSuper = true) +@Deprecated public class AddProductThirdPartySourceResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -7528226120383065861L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/AfterSaleInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/AfterSaleInfo.java index 693ea68657..064237b6f2 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/AfterSaleInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/AfterSaleInfo.java @@ -8,9 +8,11 @@ /** * 商品售后信息 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.AfterSaleInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class AfterSaleInfo implements Serializable { diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/DescriptionInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/DescriptionInfo.java index b97473e3d3..1e84d3587a 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/DescriptionInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/DescriptionInfo.java @@ -10,9 +10,11 @@ * 商品详情 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.DescriptionInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class DescriptionInfo implements Serializable { private static final long serialVersionUID = 3402153796734747882L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ExpressInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ExpressInfo.java index 0c21d9610e..4b85278cb5 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ExpressInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ExpressInfo.java @@ -10,10 +10,12 @@ * 运费信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.ExpressInfo}。 */ @Data @NoArgsConstructor @AllArgsConstructor +@Deprecated public class ExpressInfo implements Serializable { private static final long serialVersionUID = 3274035362148612426L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ExternalProductMappingNewParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ExternalProductMappingNewParam.java index d78ac8d313..fbfb2511c6 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ExternalProductMappingNewParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ExternalProductMappingNewParam.java @@ -5,8 +5,11 @@ import java.util.List; import lombok.Data; -/** 商品属性映射及推荐请求参数. */ +/** 商品属性映射及推荐请求参数. + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.ExternalProductMappingNewParam}。 +*/ @Data +@Deprecated public class ExternalProductMappingNewParam implements Serializable { private static final long serialVersionUID = -7982070319116550518L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ExternalProductMappingNewResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ExternalProductMappingNewResponse.java index 8342071a4b..21f26e3406 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ExternalProductMappingNewResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ExternalProductMappingNewResponse.java @@ -8,9 +8,12 @@ import lombok.EqualsAndHashCode; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; -/** 商品属性映射及推荐响应. */ +/** 商品属性映射及推荐响应. + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.ExternalProductMappingNewResponse}。 +*/ @Data @EqualsAndHashCode(callSuper = true) +@Deprecated public class ExternalProductMappingNewResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 4536547956225312823L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ExternalProductMappingParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ExternalProductMappingParam.java index 849ec64aed..a4ed9df310 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ExternalProductMappingParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ExternalProductMappingParam.java @@ -4,8 +4,11 @@ import java.io.Serializable; import lombok.Data; -/** 站内外商品属性映射请求参数. */ +/** 站内外商品属性映射请求参数. + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.ExternalProductMappingParam}。 +*/ @Data +@Deprecated public class ExternalProductMappingParam implements Serializable { private static final long serialVersionUID = 3288069294712374035L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ExternalProductMappingResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ExternalProductMappingResponse.java index 8899edcfdf..69426bf806 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ExternalProductMappingResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ExternalProductMappingResponse.java @@ -6,9 +6,12 @@ import lombok.EqualsAndHashCode; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; -/** 站内外商品属性映射响应. */ +/** 站内外商品属性映射响应. + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.ExternalProductMappingResponse}。 +*/ @Data @EqualsAndHashCode(callSuper = true) +@Deprecated public class ExternalProductMappingResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -8356596972896906087L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ExtraServiceInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ExtraServiceInfo.java index 4e9559c565..14ca39b3d2 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ExtraServiceInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ExtraServiceInfo.java @@ -7,9 +7,11 @@ /** * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.ExtraServiceInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class ExtraServiceInfo implements Serializable { private static final long serialVersionUID = -5517806977282063174L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/GiftActivityAddParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/GiftActivityAddParam.java index 89a226efc2..c3ffb6bb3c 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/GiftActivityAddParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/GiftActivityAddParam.java @@ -10,10 +10,12 @@ * 创建买赠活动参数 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.GiftActivityAddParam}。 */ @Data @NoArgsConstructor @AllArgsConstructor +@Deprecated public class GiftActivityAddParam implements Serializable { private static final long serialVersionUID = -3332952823917162308L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/GiftActivityAddResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/GiftActivityAddResponse.java index e8648246b5..0381abed34 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/GiftActivityAddResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/GiftActivityAddResponse.java @@ -10,10 +10,12 @@ * 创建买赠活动响应 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.GiftActivityAddResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class GiftActivityAddResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -4527079816331082871L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/GiftActivityInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/GiftActivityInfo.java index f185fe02bc..00da46652a 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/GiftActivityInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/GiftActivityInfo.java @@ -10,9 +10,11 @@ * 买赠活动信息 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.GiftActivityInfo}。 */ @Data @JsonInclude(JsonInclude.Include.NON_NULL) +@Deprecated public class GiftActivityInfo implements Serializable { private static final long serialVersionUID = 3970308144375119175L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/GiftProductAddResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/GiftProductAddResponse.java index 1548f2293f..2101f4630d 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/GiftProductAddResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/GiftProductAddResponse.java @@ -10,10 +10,12 @@ * 添加赠品响应 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.GiftProductAddResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class GiftProductAddResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -5971026809157610975L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/GiftProductGetResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/GiftProductGetResponse.java index 07bb99004c..6398aa4e6f 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/GiftProductGetResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/GiftProductGetResponse.java @@ -10,10 +10,12 @@ * 赠品详情响应 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.GiftProductGetResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class GiftProductGetResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 5331169221157446692L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/GiftProductInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/GiftProductInfo.java index 732d0b2c2d..f2fe5fb06f 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/GiftProductInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/GiftProductInfo.java @@ -4,7 +4,9 @@ * 赠品商品信息 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.GiftProductInfo}。 */ +@Deprecated public class GiftProductInfo extends SpuUpdateInfo { private static final long serialVersionUID = -4366133550331058445L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/GiftProductListParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/GiftProductListParam.java index 696e6fcc20..2df26e1307 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/GiftProductListParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/GiftProductListParam.java @@ -9,9 +9,11 @@ * 赠品列表查询参数 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.GiftProductListParam}。 */ @Data @JsonInclude(JsonInclude.Include.NON_NULL) +@Deprecated public class GiftProductListParam extends StreamPageParam { private static final long serialVersionUID = 7583500622060651067L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/GiftProductListResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/GiftProductListResponse.java index 21923b9fd3..21d7050589 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/GiftProductListResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/GiftProductListResponse.java @@ -11,10 +11,12 @@ * 赠品列表响应 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.GiftProductListResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class GiftProductListResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -2734111694780970778L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/LimitInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/LimitInfo.java index 389773d5e7..063e3006ac 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/LimitInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/LimitInfo.java @@ -10,10 +10,12 @@ * 限时购信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.LimitInfo}。 */ @Data @NoArgsConstructor @AllArgsConstructor +@Deprecated public class LimitInfo implements Serializable { private static final long serialVersionUID = -4670198322237114719L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductAuditQuotaResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductAuditQuotaResponse.java index 2f17d0e180..3870ea97a9 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductAuditQuotaResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductAuditQuotaResponse.java @@ -6,9 +6,12 @@ import lombok.EqualsAndHashCode; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; -/** 商品提审限额响应. */ +/** 商品提审限额响应. + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.ProductAuditQuotaResponse}。 +*/ @Data @EqualsAndHashCode(callSuper = true) +@Deprecated public class ProductAuditQuotaResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -6242837308752181147L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductAuditStrategyInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductAuditStrategyInfo.java index 5bcdcacb84..047f4e46f6 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductAuditStrategyInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductAuditStrategyInfo.java @@ -4,8 +4,11 @@ import java.io.Serializable; import lombok.Data; -/** 商品上架策略信息. */ +/** 商品上架策略信息. + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.ProductAuditStrategyInfo}。 +*/ @Data +@Deprecated public class ProductAuditStrategyInfo implements Serializable { private static final long serialVersionUID = -2747596416115475981L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductAuditStrategyResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductAuditStrategyResponse.java index 92684bcba0..e89a6f9b7d 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductAuditStrategyResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductAuditStrategyResponse.java @@ -5,9 +5,12 @@ import lombok.EqualsAndHashCode; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; -/** 商品上架策略响应. */ +/** 商品上架策略响应. + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.ProductAuditStrategyResponse}。 +*/ @Data @EqualsAndHashCode(callSuper = true) +@Deprecated public class ProductAuditStrategyResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -1074784511408331849L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductAuditStrategySetParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductAuditStrategySetParam.java index b07ff314e5..708d55bc5d 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductAuditStrategySetParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductAuditStrategySetParam.java @@ -4,8 +4,11 @@ import java.io.Serializable; import lombok.Data; -/** 设置商品上架策略请求参数. */ +/** 设置商品上架策略请求参数. + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.ProductAuditStrategySetParam}。 +*/ @Data +@Deprecated public class ProductAuditStrategySetParam implements Serializable { private static final long serialVersionUID = 7542738744842032508L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductBrandRecommendParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductBrandRecommendParam.java index 1fbdc0bb05..3b9c18e776 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductBrandRecommendParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductBrandRecommendParam.java @@ -5,8 +5,11 @@ import java.util.List; import lombok.Data; -/** 商品品牌推荐请求参数. */ +/** 商品品牌推荐请求参数. + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.ProductBrandRecommendParam}。 +*/ @Data +@Deprecated public class ProductBrandRecommendParam implements Serializable { private static final long serialVersionUID = 6462717198206491138L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductBrandRecommendResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductBrandRecommendResponse.java index 59344058f6..71fa9acfd5 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductBrandRecommendResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductBrandRecommendResponse.java @@ -5,9 +5,12 @@ import lombok.EqualsAndHashCode; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; -/** 商品品牌推荐响应. */ +/** 商品品牌推荐响应. + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.ProductBrandRecommendResponse}。 +*/ @Data @EqualsAndHashCode(callSuper = true) +@Deprecated public class ProductBrandRecommendResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 4350605866373432810L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductCategoryClassifyParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductCategoryClassifyParam.java index 2e0a452434..b6edd454e5 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductCategoryClassifyParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductCategoryClassifyParam.java @@ -5,8 +5,11 @@ import java.util.List; import lombok.Data; -/** 商品类目推荐请求参数. */ +/** 商品类目推荐请求参数. + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.ProductCategoryClassifyParam}。 +*/ @Data +@Deprecated public class ProductCategoryClassifyParam implements Serializable { private static final long serialVersionUID = 4665563979720739777L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductCategoryClassifyResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductCategoryClassifyResponse.java index acf31b7f23..e8eaef31e8 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductCategoryClassifyResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductCategoryClassifyResponse.java @@ -7,9 +7,12 @@ import lombok.EqualsAndHashCode; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; -/** 商品类目推荐响应. */ +/** 商品类目推荐响应. + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.ProductCategoryClassifyResponse}。 +*/ @Data @EqualsAndHashCode(callSuper = true) +@Deprecated public class ProductCategoryClassifyResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 8258747142248203374L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductCategoryPreCheckParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductCategoryPreCheckParam.java index aab6474724..6e6c19ef1a 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductCategoryPreCheckParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductCategoryPreCheckParam.java @@ -4,8 +4,11 @@ import java.io.Serializable; import lombok.Data; -/** 发品前校验请求参数. */ +/** 发品前校验请求参数. + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.ProductCategoryPreCheckParam}。 +*/ @Data +@Deprecated public class ProductCategoryPreCheckParam implements Serializable { private static final long serialVersionUID = 5155253060483296766L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductCategoryPreCheckResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductCategoryPreCheckResponse.java index 42a8221a70..0f8963462f 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductCategoryPreCheckResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductCategoryPreCheckResponse.java @@ -6,9 +6,12 @@ import lombok.EqualsAndHashCode; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; -/** 发品前校验响应. */ +/** 发品前校验响应. + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.ProductCategoryPreCheckResponse}。 +*/ @Data @EqualsAndHashCode(callSuper = true) +@Deprecated public class ProductCategoryPreCheckResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 7136603000806024499L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductQuaInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductQuaInfo.java index b411ebe80f..210104e5a5 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductQuaInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductQuaInfo.java @@ -11,10 +11,12 @@ * 商品资质信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.ProductQuaInfo}。 */ @Data @NoArgsConstructor @AllArgsConstructor +@Deprecated public class ProductQuaInfo implements Serializable { private static final long serialVersionUID = -71766140204505768L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductSaleLimitInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductSaleLimitInfo.java index 9c067cc329..ca03c62c37 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductSaleLimitInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductSaleLimitInfo.java @@ -10,10 +10,12 @@ * 商品销售库存限制 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.ProductSaleLimitInfo}。 */ @Data @NoArgsConstructor @AllArgsConstructor +@Deprecated public class ProductSaleLimitInfo implements Serializable { /** 是否受到管控,商品存在售卖限制时,固定返回1 */ diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductSchemeParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductSchemeParam.java index f63774c329..6f1916c2c1 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductSchemeParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductSchemeParam.java @@ -4,8 +4,11 @@ import java.io.Serializable; import lombok.Data; -/** 获取商品移动应用跳转 scheme 码请求参数. */ +/** 获取商品移动应用跳转 scheme 码请求参数. + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.ProductSchemeParam}。 +*/ @Data +@Deprecated public class ProductSchemeParam implements Serializable { private static final long serialVersionUID = 613832623081127830L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductSchemeResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductSchemeResponse.java index d44c6b4a13..873f743a68 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductSchemeResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductSchemeResponse.java @@ -4,9 +4,12 @@ import lombok.EqualsAndHashCode; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; -/** 获取商品移动应用跳转 scheme 码响应. */ +/** 获取商品移动应用跳转 scheme 码响应. + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.ProductSchemeResponse}。 +*/ @Data @EqualsAndHashCode(callSuper = true) +@Deprecated public class ProductSchemeResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 7310433919100539990L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductStockFlowParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductStockFlowParam.java index 1354705bdb..5456a3084f 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductStockFlowParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductStockFlowParam.java @@ -5,8 +5,11 @@ import java.util.List; import lombok.Data; -/** 获取库存流水请求参数. */ +/** 获取库存流水请求参数. + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.ProductStockFlowParam}。 +*/ @Data +@Deprecated public class ProductStockFlowParam implements Serializable { private static final long serialVersionUID = -407227347279113050L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductStockFlowResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductStockFlowResponse.java index d94df28e8e..36004a614e 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductStockFlowResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductStockFlowResponse.java @@ -8,9 +8,12 @@ import lombok.EqualsAndHashCode; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; -/** 获取库存流水响应. */ +/** 获取库存流水响应. + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.ProductStockFlowResponse}。 +*/ @Data @EqualsAndHashCode(callSuper = true) +@Deprecated public class ProductStockFlowResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 7600529379926896515L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductTimingSaleParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductTimingSaleParam.java index bb0e173965..c068ef2857 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductTimingSaleParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/ProductTimingSaleParam.java @@ -4,8 +4,11 @@ import java.io.Serializable; import lombok.Data; -/** 商品立即开售请求参数. */ +/** 商品立即开售请求参数. + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.ProductTimingSaleParam}。 +*/ @Data +@Deprecated public class ProductTimingSaleParam implements Serializable { private static final long serialVersionUID = -7185451543781817487L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SkuDeliverInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SkuDeliverInfo.java index d1f10dc5f8..b61a15cf4e 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SkuDeliverInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SkuDeliverInfo.java @@ -9,9 +9,11 @@ * sku发货信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.SkuDeliverInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class SkuDeliverInfo implements Serializable { private static final long serialVersionUID = 8046963723772755406L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SkuFastInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SkuFastInfo.java index b37dfe472c..0cdd42f40c 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SkuFastInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SkuFastInfo.java @@ -10,10 +10,12 @@ * 免审商品更新Sku数据 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.SkuFastInfo}。 */ @Data @NoArgsConstructor @JsonInclude(JsonInclude.Include.NON_NULL) +@Deprecated public class SkuFastInfo implements Serializable { /** sku_id */ diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SkuInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SkuInfo.java index 956b188c22..f5a6d5a4bd 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SkuInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SkuInfo.java @@ -10,8 +10,10 @@ * SKU信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.SkuInfo}。 */ @Data +@Deprecated public class SkuInfo implements Serializable { private static final long serialVersionUID = -8734396136299597845L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SkuStockBatchList.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SkuStockBatchList.java index 71f995692f..d7b32dbb0b 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SkuStockBatchList.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SkuStockBatchList.java @@ -10,9 +10,11 @@ * spu库存列表 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.SkuStockBatchList}。 */ @Data @NoArgsConstructor +@Deprecated public class SkuStockBatchList implements Serializable { private static final long serialVersionUID = -8082428962162052815L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SkuStockBatchParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SkuStockBatchParam.java index 93b5cca798..619fb684ef 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SkuStockBatchParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SkuStockBatchParam.java @@ -10,10 +10,12 @@ /** * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.SkuStockBatchParam}。 */ @Data @NoArgsConstructor @AllArgsConstructor +@Deprecated public class SkuStockBatchParam implements Serializable { private static final long serialVersionUID = 3706326762056220559L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SkuStockBatchResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SkuStockBatchResponse.java index eb188bdc79..17758700ad 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SkuStockBatchResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SkuStockBatchResponse.java @@ -10,10 +10,12 @@ * 批量查询sku库存响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.SkuStockBatchResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class SkuStockBatchResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 7745444061881828137L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SkuStockInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SkuStockInfo.java index a480d3249b..188345a669 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SkuStockInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SkuStockInfo.java @@ -10,9 +10,11 @@ * 商品库存 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.SkuStockInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class SkuStockInfo implements Serializable { private static final long serialVersionUID = 4719729125885685958L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SkuStockParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SkuStockParam.java index cf7374e75e..1fec8b0466 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SkuStockParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SkuStockParam.java @@ -8,10 +8,12 @@ /** * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.SkuStockParam}。 */ @Data @NoArgsConstructor @AllArgsConstructor +@Deprecated public class SkuStockParam implements Serializable { private static final long serialVersionUID = -5542939078361208816L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SkuStockResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SkuStockResponse.java index 683aece146..6a18d017e4 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SkuStockResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SkuStockResponse.java @@ -10,10 +10,12 @@ * 库存信息响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.SkuStockResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class SkuStockResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -2156342792354605826L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SpuCategory.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SpuCategory.java index 8adc311f95..0b09b17b36 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SpuCategory.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SpuCategory.java @@ -9,9 +9,11 @@ * 商品类目id * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.SpuCategory}。 */ @Data @NoArgsConstructor +@Deprecated public class SpuCategory implements Serializable { private static final long serialVersionUID = -8500610555473351789L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SpuFastInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SpuFastInfo.java index 23b1135ba5..c477490fad 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SpuFastInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SpuFastInfo.java @@ -11,10 +11,12 @@ * 商品免审更新参数 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.SpuFastInfo}。 */ @Data @NoArgsConstructor @JsonInclude(JsonInclude.Include.NON_NULL) +@Deprecated public class SpuFastInfo implements Serializable { /** 商品ID */ diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SpuGetResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SpuGetResponse.java index ff15cbf0cb..7a417fc537 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SpuGetResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SpuGetResponse.java @@ -10,10 +10,12 @@ * 商品信息 响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.SpuGetResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class SpuGetResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -8955745006296226140L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SpuInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SpuInfo.java index 9b2224db94..e39cf91698 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SpuInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SpuInfo.java @@ -13,10 +13,12 @@ * Spu信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.SpuInfo}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class SpuInfo extends SpuSimpleInfo { private static final long serialVersionUID = -1183209029245287297L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SpuListParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SpuListParam.java index 775bdf990d..52dbb363c9 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SpuListParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SpuListParam.java @@ -10,9 +10,11 @@ * 商品列表查询参数 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.SpuListParam}。 */ @Data @JsonInclude(Include.NON_NULL) +@Deprecated public class SpuListParam extends StreamPageParam { private static final long serialVersionUID = -242932365961748404L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SpuListResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SpuListResponse.java index 421725c04b..7ee387d62c 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SpuListResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SpuListResponse.java @@ -11,10 +11,12 @@ * 商品列表信息 响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.SpuListResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class SpuListResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -7448819335418389308L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SpuSimpleInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SpuSimpleInfo.java index 3e84bb1492..388f68861f 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SpuSimpleInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SpuSimpleInfo.java @@ -8,9 +8,11 @@ /** * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.SpuSimpleInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class SpuSimpleInfo implements Serializable { private static final long serialVersionUID = 5583726432139404883L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SpuSizeChart.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SpuSizeChart.java index 4e34ccfac8..1af8f68341 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SpuSizeChart.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SpuSizeChart.java @@ -10,9 +10,11 @@ * 尺码表信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.SpuSizeChart}。 */ @Data @NoArgsConstructor +@Deprecated public class SpuSizeChart implements Serializable { private static final long serialVersionUID = -5019617420608575610L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SpuSizeChartItem.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SpuSizeChartItem.java index 7ea4d0a66b..230a672e3c 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SpuSizeChartItem.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SpuSizeChartItem.java @@ -10,9 +10,11 @@ * 尺码表 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.SpuSizeChartItem}。 */ @Data @NoArgsConstructor +@Deprecated public class SpuSizeChartItem implements Serializable { private static final long serialVersionUID = -3757716378584654974L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SpuStockInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SpuStockInfo.java index 4564f069b8..7215e236da 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SpuStockInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SpuStockInfo.java @@ -10,9 +10,11 @@ * SPU库存信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.SpuStockInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class SpuStockInfo implements Serializable { /** 商品ID */ diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SpuUpdateInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SpuUpdateInfo.java index f6214c5d78..cd64813030 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SpuUpdateInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SpuUpdateInfo.java @@ -10,11 +10,13 @@ * 商品更新数据 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.SpuUpdateInfo}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) @JsonInclude(JsonInclude.Include.NON_NULL) +@Deprecated public class SpuUpdateInfo extends SpuInfo { /** 添加完成后是否立即上架。1:是;0:否;默认0 */ diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SpuUpdateResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SpuUpdateResponse.java index 815ee4412c..9b65abd91d 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SpuUpdateResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/SpuUpdateResponse.java @@ -10,10 +10,12 @@ * 商品信息 响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.SpuUpdateResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class SpuUpdateResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -7072796795527767292L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/TimingOnSaleInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/TimingOnSaleInfo.java index 29270d426c..042cf028a5 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/TimingOnSaleInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/TimingOnSaleInfo.java @@ -11,10 +11,12 @@ * 商品待开售信息 * * @author chu + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.TimingOnSaleInfo}。 */ @Data @NoArgsConstructor @AllArgsConstructor +@Deprecated public class TimingOnSaleInfo implements Serializable { /** 状态枚举 0-没有待开售;1-待开售 */ diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/WarehouseStockInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/WarehouseStockInfo.java index b0235534bb..5621084fde 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/WarehouseStockInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/WarehouseStockInfo.java @@ -9,9 +9,11 @@ * 区域库存 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.WarehouseStockInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class WarehouseStockInfo implements Serializable { private static final long serialVersionUID = 3184902895765107425L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/BeginTimingSaleParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/BeginTimingSaleParam.java index 2a624ec434..782758c6ce 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/BeginTimingSaleParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/BeginTimingSaleParam.java @@ -7,9 +7,11 @@ /** * 商品立即开售参数。 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.assistant.BeginTimingSaleParam}。 */ @Data @NoArgsConstructor +@Deprecated public class BeginTimingSaleParam implements Serializable { private static final long serialVersionUID = -1525220756273987016L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/CancelTimingSaleParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/CancelTimingSaleParam.java index 25980a1489..3a0570f6d2 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/CancelTimingSaleParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/CancelTimingSaleParam.java @@ -7,9 +7,11 @@ /** * 取消商品开售参数。 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.assistant.CancelTimingSaleParam}。 */ @Data @NoArgsConstructor +@Deprecated public class CancelTimingSaleParam implements Serializable { private static final long serialVersionUID = -3750831026611057323L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/CategoryPreCheckParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/CategoryPreCheckParam.java index ee93066660..40316cf440 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/CategoryPreCheckParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/CategoryPreCheckParam.java @@ -7,9 +7,11 @@ /** * 发品前校验参数。 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.assistant.CategoryPreCheckParam}。 */ @Data @NoArgsConstructor +@Deprecated public class CategoryPreCheckParam implements Serializable { private static final long serialVersionUID = 3616569394767815856L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/CategoryPreCheckResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/CategoryPreCheckResponse.java index 8559f2b0e2..bc50e54add 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/CategoryPreCheckResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/CategoryPreCheckResponse.java @@ -9,10 +9,12 @@ /** * 发品前校验响应。 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.assistant.CategoryPreCheckResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class CategoryPreCheckResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 8912798390684239592L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ExternalAttribute.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ExternalAttribute.java index e173a85d02..b01cf6e1c6 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ExternalAttribute.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ExternalAttribute.java @@ -7,9 +7,11 @@ /** * 商品属性键值对。 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.assistant.ExternalAttribute}。 */ @Data @NoArgsConstructor +@Deprecated public class ExternalAttribute implements Serializable { private static final long serialVersionUID = -8639178782951125101L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ExternalProductMappingNewParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ExternalProductMappingNewParam.java index 89e0be65cd..dc0720187d 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ExternalProductMappingNewParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ExternalProductMappingNewParam.java @@ -8,9 +8,11 @@ /** * 商品属性映射及推荐参数。 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.assistant.ExternalProductMappingNewParam}。 */ @Data @NoArgsConstructor +@Deprecated public class ExternalProductMappingNewParam implements Serializable { private static final long serialVersionUID = -4942505655791636645L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ExternalProductMappingNewResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ExternalProductMappingNewResponse.java index 87b09e03b4..800babe05a 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ExternalProductMappingNewResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ExternalProductMappingNewResponse.java @@ -9,10 +9,12 @@ /** * 商品属性映射及推荐响应。 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.assistant.ExternalProductMappingNewResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class ExternalProductMappingNewResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -6192580254142696913L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ExternalProductMappingParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ExternalProductMappingParam.java index c31e0f0f2d..50ad9e4649 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ExternalProductMappingParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ExternalProductMappingParam.java @@ -7,9 +7,11 @@ /** * 站内外商品属性映射参数。 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.assistant.ExternalProductMappingParam}。 */ @Data @NoArgsConstructor +@Deprecated public class ExternalProductMappingParam implements Serializable { private static final long serialVersionUID = 1944528166283981889L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ExternalProductMappingResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ExternalProductMappingResponse.java index e97d4a94d0..6f36b8ed1d 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ExternalProductMappingResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ExternalProductMappingResponse.java @@ -9,10 +9,12 @@ /** * 站内外商品属性映射响应。 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.assistant.ExternalProductMappingResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class ExternalProductMappingResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -2267639791023044849L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ProductBrandRecommendParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ProductBrandRecommendParam.java index 36a47bfc40..78ed7f7c48 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ProductBrandRecommendParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ProductBrandRecommendParam.java @@ -8,9 +8,11 @@ /** * 商品品牌推荐参数。 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.assistant.ProductBrandRecommendParam}。 */ @Data @NoArgsConstructor +@Deprecated public class ProductBrandRecommendParam implements Serializable { private static final long serialVersionUID = 4516219198778673928L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ProductBrandRecommendResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ProductBrandRecommendResponse.java index b7c0081085..9fe72c3596 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ProductBrandRecommendResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/assistant/ProductBrandRecommendResponse.java @@ -8,10 +8,12 @@ /** * 商品品牌推荐响应。 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.assistant.ProductBrandRecommendResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class ProductBrandRecommendResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -7903894941180639923L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/link/ProductH5UrlResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/link/ProductH5UrlResponse.java index 0dee49f165..b2c1a73993 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/link/ProductH5UrlResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/link/ProductH5UrlResponse.java @@ -10,10 +10,12 @@ * 商品H5短链 结果 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.link.ProductH5UrlResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class ProductH5UrlResponse extends WxChannelBaseResponse { /** 商品H5短链 */ diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/link/ProductQrCodeResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/link/ProductQrCodeResponse.java index a6876b78f1..14964145fb 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/link/ProductQrCodeResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/link/ProductQrCodeResponse.java @@ -10,10 +10,12 @@ * 商品二维码 结果 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.link.ProductQrCodeResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class ProductQrCodeResponse extends WxChannelBaseResponse { /** 商品二维码 */ diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/link/ProductTagLinkResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/link/ProductTagLinkResponse.java index 59712130d8..e315468fdc 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/link/ProductTagLinkResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/link/ProductTagLinkResponse.java @@ -10,10 +10,12 @@ * 商品口令 结果 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.link.ProductTagLinkResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class ProductTagLinkResponse extends WxChannelBaseResponse { /** 商品口令 */ diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/stock/StockFlowExtInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/stock/StockFlowExtInfo.java index c08e35c477..7b556ab785 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/stock/StockFlowExtInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/stock/StockFlowExtInfo.java @@ -7,9 +7,11 @@ /** * 库存流水额外信息。 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.stock.StockFlowExtInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class StockFlowExtInfo implements Serializable { private static final long serialVersionUID = 1170328051641116647L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/stock/StockFlowInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/stock/StockFlowInfo.java index a15b0018ea..bf4ca89a14 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/stock/StockFlowInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/stock/StockFlowInfo.java @@ -7,9 +7,11 @@ /** * 库存流水信息。 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.stock.StockFlowInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class StockFlowInfo implements Serializable { private static final long serialVersionUID = 4094168882102603379L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/stock/StockFlowParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/stock/StockFlowParam.java index cacd2ca3e6..ec61666cdc 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/stock/StockFlowParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/stock/StockFlowParam.java @@ -8,9 +8,11 @@ /** * 获取库存流水请求参数。 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.stock.StockFlowParam}。 */ @Data @NoArgsConstructor +@Deprecated public class StockFlowParam implements Serializable { private static final long serialVersionUID = -7882480822919984178L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/stock/StockFlowResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/stock/StockFlowResponse.java index 4f779b64ab..ba1598eb63 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/stock/StockFlowResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/product/stock/StockFlowResponse.java @@ -10,10 +10,12 @@ /** * 获取库存流水响应。 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.product.stock.StockFlowResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class StockFlowResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -7420844779570799705L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/qic/InspectCodeResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/qic/InspectCodeResponse.java index 63ee4f0e88..f98510d7e4 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/qic/InspectCodeResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/qic/InspectCodeResponse.java @@ -9,9 +9,13 @@ import java.io.Serializable; import java.util.List; +/** + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.qic.InspectCodeResponse}。 + */ @Data @NoArgsConstructor @JsonInclude(JsonInclude.Include.NON_NULL) +@Deprecated public class InspectCodeResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -6242555695898612990L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/qic/InspectConfigResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/qic/InspectConfigResponse.java index b2aa17d6ca..7b5ccb917d 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/qic/InspectConfigResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/qic/InspectConfigResponse.java @@ -8,9 +8,13 @@ import java.io.Serializable; +/** + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.qic.InspectConfigResponse}。 + */ @Data @NoArgsConstructor @JsonInclude(JsonInclude.Include.NON_NULL) +@Deprecated public class InspectConfigResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 6463651966377955876L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/qic/RegisterLogisticsRequest.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/qic/RegisterLogisticsRequest.java index 37932c2153..ade0b05b67 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/qic/RegisterLogisticsRequest.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/qic/RegisterLogisticsRequest.java @@ -8,9 +8,13 @@ import java.io.Serializable; import java.util.List; +/** + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.qic.RegisterLogisticsRequest}。 + */ @Data @NoArgsConstructor @JsonInclude(JsonInclude.Include.NON_NULL) +@Deprecated public class RegisterLogisticsRequest implements Serializable { private static final long serialVersionUID = 4346443649534209624L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/qic/SubmitConfigResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/qic/SubmitConfigResponse.java index 8fdc691d50..5d3706f5d1 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/qic/SubmitConfigResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/qic/SubmitConfigResponse.java @@ -9,9 +9,13 @@ import java.io.Serializable; import java.util.List; +/** + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.qic.SubmitConfigResponse}。 + */ @Data @NoArgsConstructor @JsonInclude(JsonInclude.Include.NON_NULL) +@Deprecated public class SubmitConfigResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 2456553692263326158L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/qic/SubmitInspectRequest.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/qic/SubmitInspectRequest.java index 4382298c00..90daf16e9d 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/qic/SubmitInspectRequest.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/qic/SubmitInspectRequest.java @@ -7,9 +7,13 @@ import java.io.Serializable; +/** + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.qic.SubmitInspectRequest}。 + */ @Data @NoArgsConstructor @JsonInclude(JsonInclude.Include.NON_NULL) +@Deprecated public class SubmitInspectRequest implements Serializable { private static final long serialVersionUID = 6396115469552098613L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/sharer/FinderSceneInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/sharer/FinderSceneInfo.java index 76d54d90c9..f9ad50d455 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/sharer/FinderSceneInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/sharer/FinderSceneInfo.java @@ -9,9 +9,11 @@ * 视频号场景信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.sharer.FinderSceneInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class FinderSceneInfo implements Serializable { private static final long serialVersionUID = 5298261857489231549L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/sharer/SharerBindResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/sharer/SharerBindResponse.java index 4a0f8f2bb4..13b3d99117 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/sharer/SharerBindResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/sharer/SharerBindResponse.java @@ -10,10 +10,12 @@ * 分享员绑定响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.sharer.SharerBindResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class SharerBindResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 7078787380791500161L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/sharer/SharerInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/sharer/SharerInfo.java index 73aaeddbd4..8754282aba 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/sharer/SharerInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/sharer/SharerInfo.java @@ -10,9 +10,11 @@ * 分享员信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.sharer.SharerInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class SharerInfo implements Serializable { private static final long serialVersionUID = -4373597470611742887L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/sharer/SharerInfoResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/sharer/SharerInfoResponse.java index 554109c1a9..576fc68b23 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/sharer/SharerInfoResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/sharer/SharerInfoResponse.java @@ -11,10 +11,12 @@ * 分享员信息响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.sharer.SharerInfoResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class SharerInfoResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 1090517907546557929L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/sharer/SharerListParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/sharer/SharerListParam.java index 97ab2797b8..2175ea377e 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/sharer/SharerListParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/sharer/SharerListParam.java @@ -9,10 +9,12 @@ /** * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.sharer.SharerListParam}。 */ @Data @EqualsAndHashCode(callSuper = true) @JsonInclude(Include.NON_NULL) +@Deprecated public class SharerListParam extends PageParam { private static final long serialVersionUID = -2454284952706596246L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/sharer/SharerOrder.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/sharer/SharerOrder.java index 682753e64f..b0f0dbda15 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/sharer/SharerOrder.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/sharer/SharerOrder.java @@ -9,9 +9,11 @@ * 分享员订单 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.sharer.SharerOrder}。 */ @Data @NoArgsConstructor +@Deprecated public class SharerOrder implements Serializable { private static final long serialVersionUID = 1528673402572025670L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/sharer/SharerOrderParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/sharer/SharerOrderParam.java index 5ada6e3bcf..0bf4b9a59e 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/sharer/SharerOrderParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/sharer/SharerOrderParam.java @@ -10,11 +10,13 @@ /** * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.sharer.SharerOrderParam}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) @JsonInclude(Include.NON_NULL) +@Deprecated public class SharerOrderParam extends PageParam { private static final long serialVersionUID = 5240085870008898601L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/sharer/SharerOrderResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/sharer/SharerOrderResponse.java index c84da4114b..4443f9c3b6 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/sharer/SharerOrderResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/sharer/SharerOrderResponse.java @@ -11,10 +11,12 @@ * 分享员订单响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.sharer.SharerOrderResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class SharerOrderResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 2807417719466178508L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/sharer/SharerSearchParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/sharer/SharerSearchParam.java index a2669775cb..776cfa8416 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/sharer/SharerSearchParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/sharer/SharerSearchParam.java @@ -8,9 +8,11 @@ /** * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.sharer.SharerSearchParam}。 */ @Data @JsonInclude(Include.NON_NULL) +@Deprecated public class SharerSearchParam implements Serializable { private static final long serialVersionUID = -6763899740755735718L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/sharer/SharerSearchResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/sharer/SharerSearchResponse.java index 52631521df..e6ff8f1280 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/sharer/SharerSearchResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/sharer/SharerSearchResponse.java @@ -10,10 +10,12 @@ * 分享员绑定响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.sharer.SharerSearchResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class SharerSearchResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -5346019069466917659L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/sharer/SharerUnbindParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/sharer/SharerUnbindParam.java index cd8f21d409..3461a09e8a 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/sharer/SharerUnbindParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/sharer/SharerUnbindParam.java @@ -11,11 +11,13 @@ /** * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.sharer.SharerUnbindParam}。 */ @Data @NoArgsConstructor @AllArgsConstructor @JsonInclude(Include.NON_NULL) +@Deprecated public class SharerUnbindParam implements Serializable { private static final long serialVersionUID = -4515654492511136037L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/sharer/SharerUnbindResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/sharer/SharerUnbindResponse.java index 9166bc0b58..61b11b2451 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/sharer/SharerUnbindResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/sharer/SharerUnbindResponse.java @@ -11,10 +11,12 @@ * 分享员解绑响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.sharer.SharerUnbindResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class SharerUnbindResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -2395560383862569445L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/shop/ShopH5UrlResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/shop/ShopH5UrlResponse.java index 5700073c05..e134b4d35d 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/shop/ShopH5UrlResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/shop/ShopH5UrlResponse.java @@ -10,10 +10,12 @@ * 店铺H5链接 响应 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.shop.ShopH5UrlResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class ShopH5UrlResponse extends WxChannelBaseResponse { /** 店铺H5链接 */ diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/shop/ShopInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/shop/ShopInfo.java index 12b4c684c6..c615834402 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/shop/ShopInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/shop/ShopInfo.java @@ -9,9 +9,11 @@ * 店铺信息 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.shop.ShopInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class ShopInfo implements Serializable { /** 店铺名称 */ diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/shop/ShopInfoResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/shop/ShopInfoResponse.java index b4317ad3c0..f80c670031 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/shop/ShopInfoResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/shop/ShopInfoResponse.java @@ -9,9 +9,11 @@ * 店铺基本信息响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.shop.ShopInfoResponse}。 */ @Data @NoArgsConstructor +@Deprecated public class ShopInfoResponse extends WxChannelBaseResponse { @JsonProperty("info") diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/shop/ShopQrCodeResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/shop/ShopQrCodeResponse.java index 1859f2e3f4..891ff294f7 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/shop/ShopQrCodeResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/shop/ShopQrCodeResponse.java @@ -10,10 +10,12 @@ * 店铺二维码 响应 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.shop.ShopQrCodeResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class ShopQrCodeResponse extends WxChannelBaseResponse { /** 店铺二维码链接 */ diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/shop/ShopTagLinkResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/shop/ShopTagLinkResponse.java index 8b82d21106..3e97172bb9 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/shop/ShopTagLinkResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/shop/ShopTagLinkResponse.java @@ -10,10 +10,12 @@ * 店铺口令 响应 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.shop.ShopTagLinkResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class ShopTagLinkResponse extends WxChannelBaseResponse { /** 店铺微信口令 */ diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/supplier/DistributeTypeResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/supplier/DistributeTypeResponse.java index 3537892b12..addfffa6ce 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/supplier/DistributeTypeResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/supplier/DistributeTypeResponse.java @@ -10,10 +10,12 @@ * 分配方式响应。 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.supplier.DistributeTypeResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class DistributeTypeResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -750860556286328053L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/supplier/DropshipAssignRequest.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/supplier/DropshipAssignRequest.java index 3fa3904a57..a3446de13b 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/supplier/DropshipAssignRequest.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/supplier/DropshipAssignRequest.java @@ -10,10 +10,12 @@ * 代发单分配请求。 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.supplier.DropshipAssignRequest}。 */ @Data @NoArgsConstructor @JsonInclude(JsonInclude.Include.NON_NULL) +@Deprecated public class DropshipAssignRequest implements Serializable { private static final long serialVersionUID = 6945436332042017565L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/supplier/DropshipDetailResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/supplier/DropshipDetailResponse.java index a2cd0f983e..83f2ea9c7f 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/supplier/DropshipDetailResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/supplier/DropshipDetailResponse.java @@ -10,10 +10,12 @@ * 代发单详情响应。 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.supplier.DropshipDetailResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class DropshipDetailResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 5548774863400272707L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/supplier/DropshipInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/supplier/DropshipInfo.java index b2a0594073..40cff87fa8 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/supplier/DropshipInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/supplier/DropshipInfo.java @@ -10,10 +10,12 @@ * 代发单信息。 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.supplier.DropshipInfo}。 */ @Data @NoArgsConstructor @JsonInclude(JsonInclude.Include.NON_NULL) +@Deprecated public class DropshipInfo implements Serializable { private static final long serialVersionUID = -7880364210849039278L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/supplier/DropshipListRequest.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/supplier/DropshipListRequest.java index ad89ad7cd5..a56c31af63 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/supplier/DropshipListRequest.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/supplier/DropshipListRequest.java @@ -10,10 +10,12 @@ * 代发单列表请求。 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.supplier.DropshipListRequest}。 */ @Data @NoArgsConstructor @JsonInclude(JsonInclude.Include.NON_NULL) +@Deprecated public class DropshipListRequest implements Serializable { private static final long serialVersionUID = 2638071229335192596L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/supplier/DropshipListResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/supplier/DropshipListResponse.java index 2665f8ef15..feb2f3b52f 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/supplier/DropshipListResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/supplier/DropshipListResponse.java @@ -11,10 +11,12 @@ * 代发单列表响应。 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.supplier.DropshipListResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class DropshipListResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -2850183412032417307L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/supplier/DropshipResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/supplier/DropshipResponse.java index 65a529e865..21076e6967 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/supplier/DropshipResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/supplier/DropshipResponse.java @@ -10,10 +10,12 @@ * 代发单分配响应。 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.supplier.DropshipResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class DropshipResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 4376618566823584629L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/supplier/DropshipSearchRequest.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/supplier/DropshipSearchRequest.java index c658a3c16d..e5c8e7b93f 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/supplier/DropshipSearchRequest.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/supplier/DropshipSearchRequest.java @@ -10,11 +10,13 @@ * 代发单搜索请求。 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.supplier.DropshipSearchRequest}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) @JsonInclude(JsonInclude.Include.NON_NULL) +@Deprecated public class DropshipSearchRequest extends DropshipListRequest { private static final long serialVersionUID = 3915264648809784742L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/supplier/ProductDistributeRequest.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/supplier/ProductDistributeRequest.java index c1018d2255..cf45096e22 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/supplier/ProductDistributeRequest.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/supplier/ProductDistributeRequest.java @@ -11,10 +11,12 @@ * 按商品自动分配请求。 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.supplier.ProductDistributeRequest}。 */ @Data @NoArgsConstructor @JsonInclude(JsonInclude.Include.NON_NULL) +@Deprecated public class ProductDistributeRequest implements Serializable { private static final long serialVersionUID = 4201609097231290078L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/supplier/ProductListResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/supplier/ProductListResponse.java index f585ab0969..6fbd16d974 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/supplier/ProductListResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/supplier/ProductListResponse.java @@ -12,10 +12,12 @@ * 按商品自动分配商品列表响应。 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.supplier.ProductListResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class ProductListResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -7096250227033388295L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/supplier/SupplierInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/supplier/SupplierInfo.java index 0944107c19..b05701eace 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/supplier/SupplierInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/supplier/SupplierInfo.java @@ -10,10 +10,12 @@ * 供货商信息。 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.supplier.SupplierInfo}。 */ @Data @NoArgsConstructor @JsonInclude(JsonInclude.Include.NON_NULL) +@Deprecated public class SupplierInfo implements Serializable { private static final long serialVersionUID = -6480813119738259476L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/supplier/SupplierInfoResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/supplier/SupplierInfoResponse.java index 7f138a5929..e84cf9e495 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/supplier/SupplierInfoResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/supplier/SupplierInfoResponse.java @@ -10,10 +10,12 @@ * 供货商信息响应。 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.supplier.SupplierInfoResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class SupplierInfoResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -3071464065836573893L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/supplier/SupplierListResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/supplier/SupplierListResponse.java index 6bab0615a7..a09043ba6f 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/supplier/SupplierListResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/supplier/SupplierListResponse.java @@ -11,10 +11,12 @@ * 供货商列表响应。 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.supplier.SupplierListResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class SupplierListResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -692609589633695295L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/talent/TalentOrderDetailParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/talent/TalentOrderDetailParam.java index 8f37fa0eb2..d75a7eb9d9 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/talent/TalentOrderDetailParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/talent/TalentOrderDetailParam.java @@ -10,10 +10,12 @@ * 带货助手-获取佣金单详情 请求参数 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.talent.TalentOrderDetailParam}。 */ @Data @NoArgsConstructor @JsonInclude(JsonInclude.Include.NON_NULL) +@Deprecated public class TalentOrderDetailParam implements Serializable { private static final long serialVersionUID = 8741285036412736219L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/talent/TalentOrderDetailResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/talent/TalentOrderDetailResponse.java index 1e0f2d2c28..2aac1293a5 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/talent/TalentOrderDetailResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/talent/TalentOrderDetailResponse.java @@ -11,10 +11,12 @@ * 带货助手-获取佣金单详情 响应 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.talent.TalentOrderDetailResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class TalentOrderDetailResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 2174806923145876312L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/talent/TalentOrderListParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/talent/TalentOrderListParam.java index a780d92be5..db14ea041b 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/talent/TalentOrderListParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/talent/TalentOrderListParam.java @@ -10,10 +10,12 @@ * 带货助手-获取佣金单列表 请求参数 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.talent.TalentOrderListParam}。 */ @Data @NoArgsConstructor @JsonInclude(JsonInclude.Include.NON_NULL) +@Deprecated public class TalentOrderListParam implements Serializable { private static final long serialVersionUID = -6218342185316399261L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/talent/TalentOrderListResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/talent/TalentOrderListResponse.java index 8393ba656a..e0ba1880ab 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/talent/TalentOrderListResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/talent/TalentOrderListResponse.java @@ -12,10 +12,12 @@ * 带货助手-获取佣金单列表 响应 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.talent.TalentOrderListResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class TalentOrderListResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 3541802319654186172L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/talent/TalentWindowProductDetailParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/talent/TalentWindowProductDetailParam.java index 5f7bca423e..3ff6575e8f 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/talent/TalentWindowProductDetailParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/talent/TalentWindowProductDetailParam.java @@ -10,10 +10,12 @@ * 带货助手-获取达人橱窗商品详情 请求参数 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.talent.TalentWindowProductDetailParam}。 */ @Data @NoArgsConstructor @JsonInclude(JsonInclude.Include.NON_NULL) +@Deprecated public class TalentWindowProductDetailParam implements Serializable { private static final long serialVersionUID = 3849271605183749261L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/talent/TalentWindowProductDetailResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/talent/TalentWindowProductDetailResponse.java index c41f2f1de5..3f7802ff2c 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/talent/TalentWindowProductDetailResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/talent/TalentWindowProductDetailResponse.java @@ -11,10 +11,12 @@ * 带货助手-获取达人橱窗商品详情 响应 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.talent.TalentWindowProductDetailResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class TalentWindowProductDetailResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 1634829710537264918L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/talent/TalentWindowProductListParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/talent/TalentWindowProductListParam.java index bb6e77bb7f..cfd2c87b30 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/talent/TalentWindowProductListParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/talent/TalentWindowProductListParam.java @@ -10,10 +10,12 @@ * 带货助手-获取达人橱窗商品列表 请求参数 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.talent.TalentWindowProductListParam}。 */ @Data @NoArgsConstructor @JsonInclude(JsonInclude.Include.NON_NULL) +@Deprecated public class TalentWindowProductListParam implements Serializable { private static final long serialVersionUID = 7419836250174638291L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/talent/TalentWindowProductListResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/talent/TalentWindowProductListResponse.java index 5c90977a05..5eb0c48f3b 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/talent/TalentWindowProductListResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/talent/TalentWindowProductListResponse.java @@ -12,10 +12,12 @@ * 带货助手-获取达人橱窗商品列表 响应 * * @author GitHub Copilot + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.talent.TalentWindowProductListResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class TalentWindowProductListResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 8263047195826340712L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/token/StableTokenParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/token/StableTokenParam.java index 8bcacb649b..ef29b9e0d9 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/token/StableTokenParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/token/StableTokenParam.java @@ -12,11 +12,13 @@ * 稳定版access_token,请求参数 * * @author asushiye + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.token.StableTokenParam}。 */ @Data @NoArgsConstructor @AllArgsConstructor @JsonInclude(JsonInclude.Include.NON_NULL) +@Deprecated public class StableTokenParam implements Serializable { private static final long serialVersionUID = 6849364823232834171L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/vip/ScoreInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/vip/ScoreInfo.java index ac2d2f9763..016eee01cd 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/vip/ScoreInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/vip/ScoreInfo.java @@ -11,9 +11,11 @@ * * @author asushiye * + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.vip.ScoreInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class ScoreInfo implements Serializable { private static final long serialVersionUID = -3290653233070826576L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/vip/UserGradeInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/vip/UserGradeInfo.java index b015773480..7054795645 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/vip/UserGradeInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/vip/UserGradeInfo.java @@ -11,9 +11,11 @@ * * @author asushiye * + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.vip.UserGradeInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class UserGradeInfo implements Serializable { private static final long serialVersionUID = -8040963202754069865L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/vip/UserInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/vip/UserInfo.java index 1104d532f1..39a7f56157 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/vip/UserInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/vip/UserInfo.java @@ -11,9 +11,11 @@ * * @author asushiye * + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.vip.UserInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class UserInfo implements Serializable { private static final long serialVersionUID = 8523354700203385190L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/vip/VipGradeParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/vip/VipGradeParam.java index 5f5004f35c..178ad35c20 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/vip/VipGradeParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/vip/VipGradeParam.java @@ -12,12 +12,14 @@ * @author : zhenyun.su * @since : 2023/10/8 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.vip.VipGradeParam}。 */ @Data @NoArgsConstructor @JsonInclude(JsonInclude.Include.NON_NULL) @AllArgsConstructor +@Deprecated public class VipGradeParam implements Serializable { diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/vip/VipInfo.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/vip/VipInfo.java index 64eafbc3a4..05e7156f05 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/vip/VipInfo.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/vip/VipInfo.java @@ -22,9 +22,11 @@ * "experience_value": "100" * } * } + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.vip.VipInfo}。 */ @Data @NoArgsConstructor +@Deprecated public class VipInfo implements Serializable { private static final long serialVersionUID = -215590991862774701L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/vip/VipInfoParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/vip/VipInfoParam.java index 09c28f5510..bc36c52522 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/vip/VipInfoParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/vip/VipInfoParam.java @@ -11,12 +11,14 @@ /** * @author : zhenyun.su * @since : 2023/10/8 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.vip.VipInfoParam}。 */ @Data @NoArgsConstructor @JsonInclude(JsonInclude.Include.NON_NULL) @AllArgsConstructor +@Deprecated public class VipInfoParam implements Serializable { private static final long serialVersionUID = -4196252299609288196L; @JsonProperty("openid") diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/vip/VipInfoResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/vip/VipInfoResponse.java index 3411eef038..921cb0bf77 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/vip/VipInfoResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/vip/VipInfoResponse.java @@ -8,10 +8,12 @@ /** * @author : zhenyun.su * @since : 2023/10/8 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.vip.VipInfoResponse}。 */ @Data @NoArgsConstructor +@Deprecated public class VipInfoResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -2439510304690862381L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/vip/VipListParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/vip/VipListParam.java index d23c41fcd5..246451355b 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/vip/VipListParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/vip/VipListParam.java @@ -11,12 +11,14 @@ /** * @author : zhenyun.su * @since : 2023/10/8 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.vip.VipListParam}。 */ @Data @NoArgsConstructor @JsonInclude(JsonInclude.Include.NON_NULL) @AllArgsConstructor +@Deprecated public class VipListParam implements Serializable { private static final long serialVersionUID = 7503422865410116202L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/vip/VipListResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/vip/VipListResponse.java index 0e213f8d19..a1ef9a0401 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/vip/VipListResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/vip/VipListResponse.java @@ -10,10 +10,12 @@ /** * @author : zhenyun.su * @since : 2023/10/8 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.vip.VipListResponse}。 */ @Data @NoArgsConstructor +@Deprecated public class VipListResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -8127372979925053579L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/vip/VipOpenIdParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/vip/VipOpenIdParam.java index 8f52ded878..b83b6424db 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/vip/VipOpenIdParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/vip/VipOpenIdParam.java @@ -11,12 +11,14 @@ /** * @author : zhenyun.su * @since : 2023/10/8 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.vip.VipOpenIdParam}。 */ @Data @NoArgsConstructor @JsonInclude(JsonInclude.Include.NON_NULL) @AllArgsConstructor +@Deprecated public class VipOpenIdParam implements Serializable { private static final long serialVersionUID = -7924178026258012317L; @JsonProperty("openid") diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/vip/VipScoreParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/vip/VipScoreParam.java index 51b679f393..31ce81d3a6 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/vip/VipScoreParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/vip/VipScoreParam.java @@ -17,12 +17,14 @@ * "remark": "备注", * "request_id": "REQUEST_ID" * } + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.vip.VipScoreParam}。 */ @Data @NoArgsConstructor @JsonInclude(JsonInclude.Include.NON_NULL) @AllArgsConstructor +@Deprecated public class VipScoreParam implements Serializable { private static final long serialVersionUID = -4122983978977407168L; @JsonProperty("openid") diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/vip/VipScoreResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/vip/VipScoreResponse.java index da356db74f..feb1a5e7eb 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/vip/VipScoreResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/vip/VipScoreResponse.java @@ -8,10 +8,12 @@ /** * @author : zhenyun.su * @since : 2023/10/8 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.vip.VipScoreResponse}。 */ @Data @NoArgsConstructor +@Deprecated public class VipScoreResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -7252972818862693546L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/warehouse/LocationPriorityResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/warehouse/LocationPriorityResponse.java index 5959cb746d..c880f95d6e 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/warehouse/LocationPriorityResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/warehouse/LocationPriorityResponse.java @@ -11,10 +11,12 @@ * 仓库优先级响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.warehouse.LocationPriorityResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class LocationPriorityResponse extends WxChannelBaseResponse { private static final long serialVersionUID = -4037484169497319150L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/warehouse/PriorityLocationParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/warehouse/PriorityLocationParam.java index 0b304487a7..8b10224743 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/warehouse/PriorityLocationParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/warehouse/PriorityLocationParam.java @@ -10,10 +10,12 @@ * 带优先级的仓库区域 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.warehouse.PriorityLocationParam}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class PriorityLocationParam extends WarehouseLocation { private static final long serialVersionUID = -3087702364669180903L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/warehouse/StockGetParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/warehouse/StockGetParam.java index 99e00a4801..992f69b1d5 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/warehouse/StockGetParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/warehouse/StockGetParam.java @@ -8,10 +8,12 @@ /** * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.warehouse.StockGetParam}。 */ @Data @NoArgsConstructor @AllArgsConstructor +@Deprecated public class StockGetParam implements Serializable { private static final long serialVersionUID = -4144913434092446664L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/warehouse/UpdateLocationParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/warehouse/UpdateLocationParam.java index 5b71c0a4b4..acb803886f 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/warehouse/UpdateLocationParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/warehouse/UpdateLocationParam.java @@ -11,10 +11,12 @@ * 仓库区域 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.warehouse.UpdateLocationParam}。 */ @Data @NoArgsConstructor @AllArgsConstructor +@Deprecated public class UpdateLocationParam implements Serializable { private static final long serialVersionUID = 6102771485047925091L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/warehouse/Warehouse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/warehouse/Warehouse.java index 7ca07e637f..966c34bbc4 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/warehouse/Warehouse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/warehouse/Warehouse.java @@ -10,9 +10,11 @@ * 仓库 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.warehouse.Warehouse}。 */ @Data @NoArgsConstructor +@Deprecated public class Warehouse implements Serializable { private static final long serialVersionUID = -2322154583471063637L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/warehouse/WarehouseIdsResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/warehouse/WarehouseIdsResponse.java index 57c989a56b..8f0b7c11bc 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/warehouse/WarehouseIdsResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/warehouse/WarehouseIdsResponse.java @@ -11,9 +11,11 @@ * 仓库id列表响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.warehouse.WarehouseIdsResponse}。 */ @Data @EqualsAndHashCode(callSuper = true) +@Deprecated public class WarehouseIdsResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 3974529583232187473L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/warehouse/WarehouseLocation.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/warehouse/WarehouseLocation.java index 33309522bb..e7a3fe4a73 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/warehouse/WarehouseLocation.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/warehouse/WarehouseLocation.java @@ -10,10 +10,12 @@ * 仓库区域 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.warehouse.WarehouseLocation}。 */ @Data @NoArgsConstructor @AllArgsConstructor +@Deprecated public class WarehouseLocation implements Serializable { private static final long serialVersionUID = 1626579682640060352L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/warehouse/WarehouseLocationParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/warehouse/WarehouseLocationParam.java index 2b64e55dea..7041c7117b 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/warehouse/WarehouseLocationParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/warehouse/WarehouseLocationParam.java @@ -6,9 +6,11 @@ /** * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.warehouse.WarehouseLocationParam}。 */ @Data @JsonInclude(Include.NON_NULL) +@Deprecated public class WarehouseLocationParam extends WarehouseLocation { private static final long serialVersionUID = 3347484433136057123L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/warehouse/WarehouseParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/warehouse/WarehouseParam.java index 77ac1a8134..945d0ae22f 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/warehouse/WarehouseParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/warehouse/WarehouseParam.java @@ -9,11 +9,13 @@ * 仓库 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.warehouse.WarehouseParam}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) @JsonInclude(JsonInclude.Include.NON_NULL) +@Deprecated public class WarehouseParam extends Warehouse { private static final long serialVersionUID = -3412047348380785225L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/warehouse/WarehouseResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/warehouse/WarehouseResponse.java index fa96771d67..d1fefff56a 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/warehouse/WarehouseResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/warehouse/WarehouseResponse.java @@ -9,9 +9,11 @@ * 仓库响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.warehouse.WarehouseResponse}。 */ @Data @NoArgsConstructor +@Deprecated public class WarehouseResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 3206095869486573824L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/warehouse/WarehouseStockParam.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/warehouse/WarehouseStockParam.java index 5a4354504d..27ecec523c 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/warehouse/WarehouseStockParam.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/warehouse/WarehouseStockParam.java @@ -9,9 +9,11 @@ * 库存参数 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.warehouse.WarehouseStockParam}。 */ @Data @NoArgsConstructor +@Deprecated public class WarehouseStockParam extends SkuStockParam { private static final long serialVersionUID = -5121207621628542490L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/warehouse/WarehouseStockResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/warehouse/WarehouseStockResponse.java index 64d0d2b5b0..28de28565d 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/warehouse/WarehouseStockResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/warehouse/WarehouseStockResponse.java @@ -9,8 +9,10 @@ * 仓库库存响应 * * @author Zeyes + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.warehouse.WarehouseStockResponse}。 */ @Data +@Deprecated public class WarehouseStockResponse extends WxChannelBaseResponse { private static final long serialVersionUID = 1810645965041317763L; diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/window/request/AddWindowProductRequest.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/window/request/AddWindowProductRequest.java index b069826d17..f877b52aed 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/window/request/AddWindowProductRequest.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/window/request/AddWindowProductRequest.java @@ -11,11 +11,13 @@ * 上架商品到橱窗 * @author imyzt * @date 2024/01/27 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.window.request.AddWindowProductRequest}。 */ @Data @NoArgsConstructor @AllArgsConstructor @JsonInclude(JsonInclude.Include.NON_NULL) +@Deprecated public class AddWindowProductRequest { /** diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/window/request/GetWindowProductListRequest.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/window/request/GetWindowProductListRequest.java index 9558f784f8..8ecd3cbe9b 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/window/request/GetWindowProductListRequest.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/window/request/GetWindowProductListRequest.java @@ -11,11 +11,13 @@ * 获取账号收集的留资数据详情 * @author imyzt * @date 2024/01/27 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.window.request.GetWindowProductListRequest}。 */ @Data @NoArgsConstructor @AllArgsConstructor @JsonInclude(JsonInclude.Include.NON_NULL) +@Deprecated public class GetWindowProductListRequest { /** diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/window/request/WindowProductRequest.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/window/request/WindowProductRequest.java index dc68c12df3..d248d117d3 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/window/request/WindowProductRequest.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/window/request/WindowProductRequest.java @@ -11,11 +11,13 @@ * 橱窗商品 * @author imyzt * @date 2024/01/27 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.window.request.WindowProductRequest}。 */ @Data @NoArgsConstructor @AllArgsConstructor @JsonInclude(JsonInclude.Include.NON_NULL) +@Deprecated public class WindowProductRequest { /** diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/window/response/GetWindowProductListResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/window/response/GetWindowProductListResponse.java index de81e0f3a8..f0609f1d77 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/window/response/GetWindowProductListResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/window/response/GetWindowProductListResponse.java @@ -13,10 +13,12 @@ * 获取账号收集的留资数据详情 * @author imyzt * @date 2024/01/27 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.window.response.GetWindowProductListResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class GetWindowProductListResponse extends WxChannelBaseResponse { /** diff --git a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/window/response/GetWindowProductResponse.java b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/window/response/GetWindowProductResponse.java index 9127ee9856..d33715e3d1 100644 --- a/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/window/response/GetWindowProductResponse.java +++ b/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/window/response/GetWindowProductResponse.java @@ -11,10 +11,12 @@ * 获取橱窗商品详情 * @author imyzt * @date 2024/01/27 + * @deprecated 请迁移至 {@link com.binarywang.wxjava.store.bean.window.response.GetWindowProductResponse}。 */ @Data @NoArgsConstructor @EqualsAndHashCode(callSuper = true) +@Deprecated public class GetWindowProductResponse extends WxChannelBaseResponse { /** diff --git a/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/WxChannelStoreCompatibilityTest.java b/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/WxChannelStoreCompatibilityTest.java new file mode 100644 index 0000000000..22de36f993 --- /dev/null +++ b/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/WxChannelStoreCompatibilityTest.java @@ -0,0 +1,29 @@ +package me.chanjar.weixin.channel.api; + +import java.lang.reflect.Method; +import me.chanjar.weixin.channel.bean.address.AddressAddParam; +import org.testng.Assert; +import org.testng.annotations.Test; + +/** + * Verifies that the store split keeps the legacy channel API available for existing consumers. + */ +public class WxChannelStoreCompatibilityTest { + + @Test + public void shouldKeepLegacyStoreApisAndModelsDeprecated() throws NoSuchMethodException { + Method productService = WxChannelService.class.getMethod("getProductService"); + + Assert.assertEquals(productService.getReturnType(), WxChannelProductService.class); + Assert.assertTrue(productService.isAnnotationPresent(Deprecated.class)); + Assert.assertTrue(AddressAddParam.class.isAnnotationPresent(Deprecated.class)); + } + + @Test + public void shouldKeepChannelOnlyApisAvailableWithoutDeprecation() throws NoSuchMethodException { + Method finderLiveService = WxChannelService.class.getMethod("getFinderLiveService"); + + Assert.assertEquals(finderLiveService.getReturnType(), WxFinderLiveService.class); + Assert.assertFalse(finderLiveService.isAnnotationPresent(Deprecated.class)); + } +} diff --git a/weixin-java-channel/src/test/resources/testng.xml b/weixin-java-channel/src/test/resources/testng.xml index 579acb3252..0552b4dbc5 100644 --- a/weixin-java-channel/src/test/resources/testng.xml +++ b/weixin-java-channel/src/test/resources/testng.xml @@ -4,6 +4,7 @@ + diff --git a/weixin-java-store/pom.xml b/weixin-java-store/pom.xml new file mode 100644 index 0000000000..76df7eb5b8 --- /dev/null +++ b/weixin-java-store/pom.xml @@ -0,0 +1,130 @@ + + + 4.0.0 + + com.github.binarywang + wx-java + 4.8.6.B + + + weixin-java-store + WxJava - Weixin Store Java SDK + 微信小店 Java SDK + + + + com.github.binarywang + weixin-java-common + ${project.version} + + + org.jodd + jodd-http + provided + + + org.apache.httpcomponents + httpclient + + + org.apache.httpcomponents + httpmime + + + org.apache.httpcomponents.client5 + httpclient5 + provided + + + com.fasterxml.jackson.core + jackson-core + 2.18.8 + + + com.fasterxml.jackson.core + jackson-annotations + 2.18.8 + + + com.fasterxml.jackson.dataformat + jackson-dataformat-xml + 2.18.8 + true + + + org.bouncycastle + bcpkix-jdk18on + + + org.projectlombok + lombok + + + org.redisson + redisson + + + com.squareup.okhttp3 + okhttp + provided + + + org.testng + testng + test + + + org.mockito + mockito-core + test + + + ch.qos.logback + logback-classic + test + + + com.google.inject + guice + test + + + org.eclipse.jetty + jetty-server + test + + + org.eclipse.jetty + jetty-servlet + test + + + org.assertj + assertj-guava + test + + + redis.clients + jedis + + + com.github.jedis-lock + jedis-lock + true + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + ${maven.test.skip} + + + + + diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/BaseWxStoreMessageService.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/BaseWxStoreMessageService.java new file mode 100644 index 0000000000..65d2887015 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/BaseWxStoreMessageService.java @@ -0,0 +1,540 @@ +package com.binarywang.wxjava.store.api; + +import java.util.Map; +import com.binarywang.wxjava.store.bean.message.after.AfterSaleMessage; +import com.binarywang.wxjava.store.bean.message.after.ComplaintMessage; +import com.binarywang.wxjava.store.bean.message.coupon.CouponActionMessage; +import com.binarywang.wxjava.store.bean.message.coupon.CouponReceiveMessage; +import com.binarywang.wxjava.store.bean.message.coupon.UserCouponExpireMessage; +import com.binarywang.wxjava.store.bean.message.fund.AccountNotifyMessage; +import com.binarywang.wxjava.store.bean.message.fund.QrNotifyMessage; +import com.binarywang.wxjava.store.bean.message.fund.WithdrawNotifyMessage; +import com.binarywang.wxjava.store.bean.message.order.OrderCancelMessage; +import com.binarywang.wxjava.store.bean.message.order.OrderConfirmMessage; +import com.binarywang.wxjava.store.bean.message.order.OrderDeliveryMessage; +import com.binarywang.wxjava.store.bean.message.order.OrderExtMessage; +import com.binarywang.wxjava.store.bean.message.order.OrderIdMessage; +import com.binarywang.wxjava.store.bean.message.order.OrderPayMessage; +import com.binarywang.wxjava.store.bean.message.order.OrderSettleMessage; +import com.binarywang.wxjava.store.bean.message.order.OrderStatusMessage; +import com.binarywang.wxjava.store.bean.message.product.BrandMessage; +import com.binarywang.wxjava.store.bean.message.product.CategoryAuditMessage; +import com.binarywang.wxjava.store.bean.message.product.SpuAuditMessage; +import com.binarywang.wxjava.store.bean.message.product.SpuStockMessage; +import com.binarywang.wxjava.store.bean.message.store.CloseStoreMessage; +import com.binarywang.wxjava.store.bean.message.store.NicknameUpdateMessage; +import com.binarywang.wxjava.store.bean.message.supplier.SupplierItemMessage; +import com.binarywang.wxjava.store.bean.message.vip.ExchangeInfoMessage; +import com.binarywang.wxjava.store.bean.message.vip.UserInfoMessage; +import com.binarywang.wxjava.store.bean.message.voucher.VoucherMessage; +import com.binarywang.wxjava.store.message.WxStoreMessage; +import com.binarywang.wxjava.store.message.WxStoreMessageRouterRule; +import me.chanjar.weixin.common.session.WxSessionManager; + +/** + * @author Zeyes + */ +public interface BaseWxStoreMessageService { + + /** + * 路由微信消息 + * + * @param message 消息 + * @param content 消息原始内容 + * @param appId appId + * @param service 服务实例 + * @return Object + */ + Object route(final WxStoreMessage message, final String content, final String appId, + final WxStoreService service); + + /** + * 添加一条规则进入路由器 + * + * @param rule 规则 + */ + void addRule(WxStoreMessageRouterRule rule); + + /** + * 订单下单 + * + * @param message 消息 + * @param content 消息原始内容 + * @param appId appId + * @param context 上下文 + * @param sessionManager session管理器 + */ + void orderNew(final OrderIdMessage message, final String content, final String appId, + final Map context, final WxSessionManager sessionManager); + + /** + * 订单取消 + * + * @param message 消息 + * @param content 消息原始内容 + * @param appId appId + * @param context 上下文 + * @param sessionManager session管理器 + */ + void orderCancel(OrderCancelMessage message, final String content, final String appId, + final Map context, final WxSessionManager sessionManager); + + /** + * 订单支付成功 + * + * @param message 消息 + * @param content 消息原始内容 + * @param appId appId + * @param context 上下文 + * @param sessionManager session管理器 + */ + void orderPay(OrderPayMessage message, final String content, final String appId, final Map context, + final WxSessionManager sessionManager); + + /** + * 订单待发货 + * + * @param message 消息 + * @param content 消息原始内容 + * @param appId appId + * @param context 上下文 + * @param sessionManager session管理器 + */ + void orderWaitShipping(OrderIdMessage message, final String content, final String appId, final Map context, + final WxSessionManager sessionManager); + + /** + * 订单发货 + * + * @param message 消息 + * @param content 消息原始内容 + * @param appId appId + * @param context 上下文 + * @param sessionManager session管理器 + */ + void orderDelivery(OrderDeliveryMessage message, final String content, final String appId, + final Map context, final WxSessionManager sessionManager); + + /** + * 订单确认收货 + * + * @param message 消息 + * @param content 消息原始内容 + * @param appId appId + * @param context 上下文 + * @param sessionManager session管理器 + */ + void orderConfirm(OrderConfirmMessage message, final String content, final String appId, + final Map context, final WxSessionManager sessionManager); + + /** + * 订单结算成功 + * + * @param message 消息 + * @param content 消息原始内容 + * @param appId appId + * @param context 上下文 + * @param sessionManager session管理器 + */ + void orderSettle(OrderSettleMessage message, final String content, final String appId, + final Map context, final WxSessionManager sessionManager); + + /** + * 订单其他信息更新 + * + * @param message 消息 + * @param content 消息原始内容 + * @param appId appId + * @param context 上下文 + * @param sessionManager session管理器 + */ + void orderExtInfoUpdate(OrderExtMessage message, final String content, final String appId, + final Map context, final WxSessionManager sessionManager); + + /** + * 订单状态更新 + * + * @param message 消息 + * @param content 消息原始内容 + * @param appId appId + * @param context 上下文 + * @param sessionManager session管理器 + */ + void orderStatusUpdate(OrderStatusMessage message, final String content, final String appId, + final Map context, final WxSessionManager sessionManager); + + /** + * 商品审核结果 + * + * @param message 消息 + * @param content 消息原始内容 + * @param appId appId + * @param context 上下文 + * @param sessionManager session管理器 + */ + void spuAudit(SpuAuditMessage message, final String content, final String appId, final Map context, + final WxSessionManager sessionManager); + + /** + * 商品系统下架通知 + * + * @param message 消息 + * @param content 消息原始内容 + * @param appId appId + * @param context 上下文 + * @param sessionManager session管理器 + */ + void spuStatusUpdate(SpuAuditMessage message, final String content, final String appId, + final Map context, final WxSessionManager sessionManager); + + /** + * 商品更新通知 + * + * @param message 消息 + * @param content 消息原始内容 + * @param appId appId + * @param context 上下文 + * @param sessionManager session管理器 + */ + void spuUpdate(SpuAuditMessage message, final String content, final String appId, final Map context, + final WxSessionManager sessionManager); + + /** + * 商品库存不足通知 + * + * @param message 消息 + * @param content 消息原始内容 + * @param appId appId + * @param context 上下文 + * @param sessionManager session管理器 + */ + void stockNoEnough(SpuStockMessage message, final String content, final String appId, + final Map context, final WxSessionManager sessionManager); + + /** + * 类目审核结果 + * + * @param message 消息 + * @param content 消息原始内容 + * @param appId appId + * @param context 上下文 + * @param sessionManager session管理器 + */ + void categoryAudit(CategoryAuditMessage message, final String content, final String appId, + final Map context, final WxSessionManager sessionManager); + + /** + * 品牌更新 + * + * @param message 消息 + * @param content 消息原始内容 + * @param appId appId + * @param context 上下文 + * @param sessionManager session管理器 + */ + void brandUpdate(BrandMessage message, final String content, final String appId, final Map context, + final WxSessionManager sessionManager); + + /** + * 售后单状态更新 + * + * @param message 消息 + * @param content 消息原始内容 + * @param appId appId + * @param context 上下文 + * @param sessionManager session管理器 + */ + void afterSaleStatusUpdate(AfterSaleMessage message, final String content, final String appId, + final Map context, final WxSessionManager sessionManager); + + /** + * 纠纷回调 + * + * @param message 消息 + * @param content 消息原始内容 + * @param appId appId + * @param context 上下文 + * @param sessionManager session管理器 + */ + void complaintNotify(ComplaintMessage message, final String content, final String appId, + final Map context, final WxSessionManager sessionManager); + + /** + * 用户领券通知 + * + * @param message 消息 + * @param content 消息原始内容 + * @param appId appId + * @param context 上下文 + * @param sessionManager session管理器 + */ + void couponReceive(CouponReceiveMessage message, final String content, final String appId, + final Map context, final WxSessionManager sessionManager); + + /** + * 创建优惠券通知 + * + * @param message 消息 + * @param content 消息原始内容 + * @param appId appId + * @param context 上下文 + * @param sessionManager session管理器 + */ + void couponCreate(CouponActionMessage message, final String content, final String appId, + final Map context, final WxSessionManager sessionManager); + + /** + * 优惠券删除通知 + * + * @param message 消息 + * @param content 消息原始内容 + * @param appId appId + * @param context 上下文 + * @param sessionManager session管理器 + */ + void couponDelete(CouponActionMessage message, final String content, final String appId, + final Map context, final WxSessionManager sessionManager); + + /** + * 优惠券过期通知 + * + * @param message 消息 + * @param content 消息原始内容 + * @param appId appId + * @param context 上下文 + * @param sessionManager session管理器 + */ + void couponExpire(CouponActionMessage message, final String content, final String appId, + final Map context, final WxSessionManager sessionManager); + + /** + * 更新优惠券信息通知 + * + * @param message 消息 + * @param content 消息原始内容 + * @param appId appId + * @param context 上下文 + * @param sessionManager session管理器 + */ + void couponUpdate(CouponActionMessage message, final String content, final String appId, + final Map context, final WxSessionManager sessionManager); + + /** + * 优惠券作废通知 + * + * @param message 消息 + * @param content 消息原始内容 + * @param appId appId + * @param context 上下文 + * @param sessionManager session管理器 + */ + void couponInvalid(CouponActionMessage message, final String content, final String appId, + final Map context, final WxSessionManager sessionManager); + + /** + * 用户优惠券过期通知 + * + * @param message 消息 + * @param content 消息原始内容 + * @param appId appId + * @param context 上下文 + * @param sessionManager session管理器 + */ + void userCouponExpire(UserCouponExpireMessage message, final String content, final String appId, + final Map context, final WxSessionManager sessionManager); + + /** + * 用户优惠券使用通知 + * + * @param message 消息 + * @param content 消息原始内容 + * @param appId appId + * @param context 上下文 + * @param sessionManager session管理器 + */ + void userCouponUse(UserCouponExpireMessage message, final String content, final String appId, + final Map context, final WxSessionManager sessionManager); + + /** + * 用户优惠券返还通知 + * + * @param message 消息 + * @param content 消息原始内容 + * @param appId appId + * @param context 上下文 + * @param sessionManager session管理器 + */ + void userCouponUnuse(UserCouponExpireMessage message, final String content, final String appId, + final Map context, final WxSessionManager sessionManager); + + /** + * 发放团购优惠成功回调 + * + * @param message 消息 + * @param content 消息原始内容 + * @param appId appId + * @param context 上下文 + * @param sessionManager session管理器 + */ + void voucherSendSucc(VoucherMessage message, final String content, final String appId, + final Map context, final WxSessionManager sessionManager); + /** + * 结算账户变更回调 + * + * @param message 消息 + * @param content 消息原始内容 + * @param appId appId + * @param context 上下文 + * @param sessionManager session管理器 + */ + void accountNotify(AccountNotifyMessage message, final String content, final String appId, + final Map context, final WxSessionManager sessionManager); + + /** + * 提现回调 + * + * @param message 消息 + * @param content 消息原始内容 + * @param appId appId + * @param context 上下文 + * @param sessionManager session管理器 + */ + void withdrawNotify(WithdrawNotifyMessage message, final String content, final String appId, + final Map context, final WxSessionManager sessionManager); + + /** + * 提现二维码回调 + * + * @param message 消息 + * @param content 消息原始内容 + * @param appId appId + * @param context 上下文 + * @param sessionManager session管理器 + */ + void qrNotify(QrNotifyMessage message, final String content, final String appId, final Map context, + final WxSessionManager sessionManager); + + /** + * 团长商品变更 + * + * @param message 消息 + * @param content 消息原始内容 + * @param appId appId + * @param context 上下文 + * @param sessionManager session管理器 + */ + void supplierItemUpdate(SupplierItemMessage message, final String content, final String appId, + final Map context, final WxSessionManager sessionManager); + + + /** + * 用户加入会员. + * + * @param message the message + * @param content the content + * @param appId the app id + * @param context the context + * @param sessionManager the session manager + */ + public void vipJoin(UserInfoMessage message, final String content, final String appId, + final Map context, final WxSessionManager sessionManager); + + /** + * 用户注销会员. + * + * @param message the message + * @param content the content + * @param appId the app id + * @param context the context + * @param sessionManager the session manager + */ + void vipClose(UserInfoMessage message, final String content, final String appId, + final Map context, final WxSessionManager sessionManager); + + /** + * 用户等级更新. + * + * @param message the message + * @param content the content + * @param appId the app id + * @param context the context + * @param sessionManager the session manager + */ + void vipGradeUpdate(UserInfoMessage message, final String content, final String appId, + final Map context, final WxSessionManager sessionManager); + + /** + * 用户积分更新. + * + * @param message the message + * @param content the content + * @param appId the app id + * @param context the context + * @param sessionManager the session manager + */ + void vipScoreUpdate(UserInfoMessage message, final String content, final String appId, + final Map context, final WxSessionManager sessionManager); + + /** + * 用户积分兑换 + * + * @param message the message + * @param content the content + * @param appId the app id + * @param context the context + * @param sessionManager the session manager + */ + void vipScoreExchange(ExchangeInfoMessage message, final String content, final String appId, + final Map context, final WxSessionManager sessionManager); + + /** + * 小店注销 + * + * @param message 消息 + * @param content 消息原始内容 + * @param appId appId + * @param context 上下文 + * @param sessionManager session管理器 + */ + void closeStore(CloseStoreMessage message, final String content, final String appId, + final Map context, final WxSessionManager sessionManager); + + + /** + * 小店修改名称 + * + * @param message 消息 + * @param content 消息原始内容 + * @param appId appId + * @param context 上下文 + * @param sessionManager session管理器 + */ + void updateNickname(NicknameUpdateMessage message, final String content, final String appId, + final Map context, final WxSessionManager sessionManager); + + /** + * 默认消息处理 + * + * @param message 消息 + * @param content 消息原始内容 + * @param appId appId + * @param context 上下文 + * @param sessionManager session管理器 + * @return Object + */ + Object defaultMessageHandler(WxStoreMessage message, final String content, final String appId, + final Map context, final WxSessionManager sessionManager); + + + /** + * 分享员变更 + * + * @param message the message + * @param content the content + * @param appId the app id + * @param context the context + * @param sessionManager the session manager + */ + void sharerChange(WxStoreMessage message, final String content, final String appId, + final Map context, final WxSessionManager sessionManager); +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/BaseWxStoreService.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/BaseWxStoreService.java new file mode 100644 index 0000000000..4574e4cf57 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/BaseWxStoreService.java @@ -0,0 +1,135 @@ +package com.binarywang.wxjava.store.api; + +import com.binarywang.wxjava.store.config.WxStoreConfig; +import me.chanjar.weixin.common.error.WxErrorException; +import me.chanjar.weixin.common.service.WxService; +import me.chanjar.weixin.common.util.http.MediaUploadRequestExecutor; +import me.chanjar.weixin.common.util.http.RequestExecutor; +import me.chanjar.weixin.common.util.http.RequestHttp; + +/** + * The interface Wx Store service + * + * @author Zeyes + */ +public interface BaseWxStoreService extends WxService { + + /** + *
+   * 验证消息的确来自微信服务器.
+   * 详情请见: http://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421135319&token=&lang=zh_CN
+   * 
+ * + * @param timestamp the timestamp + * @param nonce the nonce + * @param signature the signature + * @return the boolean + */ + boolean checkSignature(String timestamp, String nonce, String signature); + + /** + * 获取access_token, 不强制刷新access_token. + * + * @return the access token + * + * @throws WxErrorException the wx error exception + * @see #getAccessToken(boolean) #getAccessToken(boolean) + */ + String getAccessToken() throws WxErrorException; + + /** + *
+   * 获取access_token,本方法线程安全.
+   * 且在多线程同时刷新时只刷新一次,避免超出2000次/日的调用次数上限
+   * 使用【稳定版接口】获取access_token时,限制【20次/日】,连续使用该模式时,请保证调用时间隔至少为30s,否则不会刷新
+   *
+   * 程序员在非必要情况下尽量不要主动调用此方法
+   *
+   * 详情请见: http://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421140183&token=&lang=zh_CN
+   * 
+ * + * @param forceRefresh 强制刷新 + * @return the access token + * + * @throws WxErrorException the wx error exception + */ + String getAccessToken(boolean forceRefresh) throws WxErrorException; + + /** + *
+   * Service没有实现某个API的时候,可以用这个,
+   * 比{@link #get}和{@link #post}方法更灵活,可以自己构造RequestExecutor用来处理不同的参数和不同的返回类型。
+   * 可以参考,{@link MediaUploadRequestExecutor}的实现方法
+   * 
+ * + * @param . + * @param . + * @param executor 执行器 + * @param uri 接口请求地址 + * @param data 参数或请求数据 + * @return . t + * + * @throws WxErrorException the wx error exception + */ + T execute(RequestExecutor executor, String uri, E data) throws WxErrorException; + + /** + * 执行器 + * + * @param . + * @param . + * @param executor 执行器 + * @param uri 接口请求地址 + * @param data 参数或请求数据 + * @return T + * + * @throws WxErrorException the wx error exception + */ + T executeWithoutLog(RequestExecutor executor, String uri, E data) throws WxErrorException; + + /** + *
+   * 设置当微信系统响应系统繁忙时,要等待多少 retrySleepMillis(ms) * 2^(重试次数 - 1) 再发起重试.
+   * 默认:1000ms
+   * 
+ * + * @param retrySleepMillis 重试等待毫秒数 + */ + void setRetrySleepMillis(int retrySleepMillis); + + /** + *
+   * 设置当微信系统响应系统繁忙时,最大重试次数.
+   * 默认:5次
+   * 
+ * + * @param maxRetryTimes 最大重试次数 + */ + void setMaxRetryTimes(int maxRetryTimes); + + /** + * WxStoreConfig对象 + * + * @return WxMaConfig WxStoreConfig + */ + WxStoreConfig getConfig(); + + /** + * 注入 {@link WxStoreConfig} 的实现. + * + * @param config config + */ + void setConfig(WxStoreConfig config); + + /** + * 初始化http请求对象. + */ + void initHttp(); + + /** + * 请求http请求相关信息. + * + * @return . request http + */ + RequestHttp getRequestHttp(); +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreAddressService.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreAddressService.java new file mode 100644 index 0000000000..10968c73b5 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreAddressService.java @@ -0,0 +1,68 @@ +package com.binarywang.wxjava.store.api; + + +import com.binarywang.wxjava.store.bean.address.AddressDetail; +import com.binarywang.wxjava.store.bean.address.AddressIdResponse; +import com.binarywang.wxjava.store.bean.address.AddressInfoResponse; +import com.binarywang.wxjava.store.bean.address.AddressListResponse; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; +import me.chanjar.weixin.common.error.WxErrorException; + +/** + * 微信小店 地址管理服务 + * + * @author Zeyes + */ +public interface WxStoreAddressService { + + /** + * 获取地址列表 + * + * @param offset 起始位置 + * @param limit 拉取个数 + * @return 列表 + * + * @throws WxErrorException 异常 + */ + AddressListResponse listAddress(Integer offset, Integer limit) throws WxErrorException; + + /** + * 获取地址详情 + * + * @param addressId 地址id + * @return 地址详情 + * + * @throws WxErrorException 异常 + */ + AddressInfoResponse getAddress(String addressId) throws WxErrorException; + + /** + * 添加地址 + * + * @param addressDetail 地址 + * @return AddressIdResponse + * + * @throws WxErrorException 异常 + */ + AddressIdResponse addAddress(AddressDetail addressDetail) throws WxErrorException; + + /** + * 更新地址 + * + * @param addressDetail 地址 + * @return BaseResponse + * + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse updateAddress(AddressDetail addressDetail) throws WxErrorException; + + /** + * 删除地址 + * + * @param addressId 地址id + * @return BaseResponse + * + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse deleteAddress(String addressId) throws WxErrorException; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreAfterSaleService.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreAfterSaleService.java new file mode 100644 index 0000000000..e6a6b4969f --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreAfterSaleService.java @@ -0,0 +1,274 @@ +package com.binarywang.wxjava.store.api; + + +import java.util.List; + +import com.binarywang.wxjava.store.bean.after.*; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; +import com.binarywang.wxjava.store.bean.complaint.ComplaintOrderResponse; +import me.chanjar.weixin.common.error.WxErrorException; + +/** + * 微信小店 售后服务接口 + * + * @author Zeyes + */ +public interface WxStoreAfterSaleService { + + /** + * 获取售后单列表 + * + * @param beginCreateTime 订单创建启始时间 unix时间戳 + * @param endCreateTime 订单创建结束时间,end_create_time减去begin_create_time不得大于24小时 + * @param nextKey 翻页参数,从第二页开始传,来源于上一页的返回值 + * @return 售后单列表 + * + * @throws WxErrorException 异常 + * @deprecated 使用 {@link WxStoreAfterSaleService#listIds(AfterSaleListParam)} + */ + @Deprecated + AfterSaleListResponse listIds(Long beginCreateTime, Long endCreateTime, String nextKey) + throws WxErrorException; + + /** + * 获取售后单列表 + * + * @param param 参数 + * @return 售后单列表 + * + * @throws WxErrorException 异常 + */ + AfterSaleListResponse listIds(AfterSaleListParam param) throws WxErrorException; + + /** + * 获取售后单详情 + * + * @param afterSaleOrderId 售后单号 + * @return 售后单信息 + * + * @throws WxErrorException 异常 + */ + AfterSaleInfoResponse get(String afterSaleOrderId) throws WxErrorException; + + /** + * 同意售后 + * 文档地址 https://developers.weixin.qq.com/doc/channels/API/aftersale/acceptapply.html + * + * @param afterSaleOrderId 售后单号 + * @param addressId 同意退货时传入地址id + * @param acceptType 1. 同意退货退款,并通知用户退货; 2. 确认收到货并退款给用户。 如果不填则将根据当前的售后单状态自动选择相应操作。对于仅退款的情况,由于只存在一种同意的场景,无需填写此字段。 + * @return BaseResponse + * + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse accept(String afterSaleOrderId, String addressId, Integer acceptType) throws WxErrorException; + + /** + * 拒绝售后 + * 文档地址 https://developers.weixin.qq.com/doc/channels/API/aftersale/rejectapply.html + * + * @param afterSaleOrderId 售后单号 + * @param rejectReason 拒绝原因 + * @param rejectReasonType 拒绝原因枚举值 + * @see #getRejectReason() + * @return BaseResponse + * + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse reject(String afterSaleOrderId, String rejectReason, Integer rejectReasonType) throws WxErrorException; + + /** + * 拒绝售后(支持拒绝凭证) + * 文档地址 https://developers.weixin.qq.com/doc/channels/API/aftersale/rejectapply.html + * + * @param afterSaleOrderId 售后单号 + * @param rejectReason 拒绝原因 + * @param rejectReasonType 拒绝原因枚举值 + * @param rejectCertificates 拒绝凭证图片列表,可使用图片上传接口获取media_id + * @see #getRejectReason() + * @return BaseResponse + * + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse reject(String afterSaleOrderId, String rejectReason, Integer rejectReasonType, + List rejectCertificates) throws WxErrorException; + + /** + * 上传退款凭证 + * + * @param afterSaleOrderId 售后单号 + * @param desc 退款凭证描述 + * @param certificates 退款凭证图片列表 + * @return BaseResponse + * + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse uploadRefundEvidence(String afterSaleOrderId, String desc, List certificates) + throws WxErrorException; + + /** + * 商家补充纠纷单留言 + * + * @param complaintId 纠纷单号 + * @param content 留言内容,最多500字 + * @param mediaIds 图片media_id列表,所有留言总图片数量最多20张 + * @return BaseResponse + * + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse addComplaintMaterial(String complaintId, String content, List mediaIds) + throws WxErrorException; + + /** + * 商家举证 + * + * @param complaintId 纠纷单号 + * @param content 举证内容,最多500字 + * @param mediaIds 图片media_id列表,所有留言总图片数量最多20张 + * @return BaseResponse + * + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse addComplaintEvidence(String complaintId, String content, List mediaIds) + throws WxErrorException; + + /** + * 获取纠纷单 + * + * @param complaintId 纠纷单号 + * @return BaseResponse + * + * @throws WxErrorException 异常 + */ + ComplaintOrderResponse getComplaint(String complaintId) throws WxErrorException; + + + /** + * 获取全量售后原因 + * 文档地址:https://developers.weixin.qq.com/doc/channels/API/aftersale/getaftersalereason.html + * + * @return 售后原因 + * + * @throws WxErrorException 异常 + */ + AfterSaleReasonResponse getAllReason() throws WxErrorException; + + /** + * 获取拒绝售后原因 + * 文档地址:https://developers.weixin.qq.com/doc/channels/API/aftersale/getrejectreason.html + * + * @return 拒绝售后原因 + * + * @throws WxErrorException 异常 + */ + AfterSaleRejectReasonResponse getRejectReason() throws WxErrorException; + + /** + * 换货发货 + * 文档地址:https://developers.weixin.qq.com/doc/store/shop/API/channels-shop-aftersale/api_acceptexchangereship.html + * + * @param afterSaleOrderId 售后单号 + * @param waybillId 快递单号 + * @param deliveryId 快递公司id + * @return BaseResponse + * + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse acceptExchangeReship(String afterSaleOrderId, String waybillId, String deliveryId) throws WxErrorException; + + /** + * 换货拒绝发货 + * 文档地址:https://developers.weixin.qq.com/doc/store/shop/API/channels-shop-aftersale/api_rejectexchangereship.html + * + * @param afterSaleOrderId 售后单号 + * @param rejectReason 拒绝原因具体描述 ,可使用默认描述,也可以自定义描述 + * @param rejectReasonType 拒绝原因枚举值 + * @param rejectCertificates 退款凭证,可使用图片上传接口获取media_id(数据类型填0) + * @return BaseResponse + * + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse rejectExchangeReship(String afterSaleOrderId, String rejectReason, Integer rejectReasonType, List rejectCertificates) throws WxErrorException; + + /** + * 商家协商 + * 文档地址:https://developers.weixin.qq.com/doc/store/shop/API/channels-shop-aftersale/api_merchantupdateaftersale.html + * @param param 参数 + * @return BaseResponse + * + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse merchantUpdateAfterSale(AfterSaleMerchantUpdateParam param) throws WxErrorException; + + /** + * 获取保障单列表。 + * 文档地址:https://developers.weixin.qq.com/doc/channels/API/channels-shop-aftersale/guarantee/api_searchguaranteeorder + * + * @param param 查询参数 + * @return 保障单列表 + * @throws WxErrorException 异常 + */ + default GuaranteeOrderListResponse listGuaranteeOrder(GuaranteeOrderListParam param) throws WxErrorException { + throw new UnsupportedOperationException(); + } + + /** + * 获取保障单详情。 + * 文档地址:https://developers.weixin.qq.com/doc/channels/API/channels-shop-aftersale/guarantee/api_getguaranteeorder + * + * @param guaranteeOrderId 保障单号 + * @return 保障单详情 + * @throws WxErrorException 异常 + */ + default GuaranteeOrderInfoResponse getGuaranteeOrder(String guaranteeOrderId) throws WxErrorException { + throw new UnsupportedOperationException(); + } + + /** + * 同意保障单申请。 + * 文档地址:https://developers.weixin.qq.com/doc/channels/API/channels-shop-aftersale/guarantee/api_merchantacceptguarantee + * + * @param guaranteeOrderId 保障单号 + * @return 响应结果 + * @throws WxErrorException 异常 + */ + default WxStoreBaseResponse acceptGuarantee(String guaranteeOrderId) throws WxErrorException { + throw new UnsupportedOperationException(); + } + + /** + * 商家协商保障单。 + * 文档地址:https://developers.weixin.qq.com/doc/channels/API/channels-shop-aftersale/guarantee/api_merchantmodifyguarantee + * + * @param request 协商参数 + * @return 响应结果 + * @throws WxErrorException 异常 + */ + default WxStoreBaseResponse modifyGuarantee(GuaranteeModifyRequest request) throws WxErrorException { + throw new UnsupportedOperationException(); + } + + /** + * 商家举证保障单。 + * 文档地址:https://developers.weixin.qq.com/doc/channels/API/channels-shop-aftersale/guarantee/api_merchantproofguarantee + * + * @param request 举证参数 + * @return 响应结果 + * @throws WxErrorException 异常 + */ + default WxStoreBaseResponse proofGuarantee(GuaranteeProofRequest request) throws WxErrorException { + throw new UnsupportedOperationException(); + } + + /** + * 拒绝保障单申请。 + * 文档地址:https://developers.weixin.qq.com/doc/channels/API/channels-shop-aftersale/guarantee/api_merchantrefuseguarantee + * + * @param request 拒绝参数 + * @return 响应结果 + * @throws WxErrorException 异常 + */ + default WxStoreBaseResponse refuseGuarantee(GuaranteeRefuseRequest request) throws WxErrorException { + throw new UnsupportedOperationException(); + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreBasicService.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreBasicService.java new file mode 100644 index 0000000000..6210a9acbe --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreBasicService.java @@ -0,0 +1,102 @@ +package com.binarywang.wxjava.store.api; + +import java.io.File; +import com.binarywang.wxjava.store.bean.address.AddressCodeResponse; +import com.binarywang.wxjava.store.bean.image.StoreImageInfo; +import com.binarywang.wxjava.store.bean.image.StoreImageResponse; +import com.binarywang.wxjava.store.bean.image.QualificationFileResponse; +import com.binarywang.wxjava.store.bean.shop.ShopH5UrlResponse; +import com.binarywang.wxjava.store.bean.shop.ShopInfoResponse; +import com.binarywang.wxjava.store.bean.shop.ShopQrCodeResponse; +import com.binarywang.wxjava.store.bean.shop.ShopTagLinkResponse; +import me.chanjar.weixin.common.error.WxErrorException; + +/** + * 基础接口 + * + * @author Zeyes + */ +public interface WxStoreBasicService { + + /** + * 获取店铺基本信息 + * + * @return 店铺基本信息 + */ + ShopInfoResponse getShopInfo() throws WxErrorException; + + /** + * 获取店铺H5链接 + * + * @return 店铺H5链接 + * @throws WxErrorException 异常 + */ + ShopH5UrlResponse getShopH5Url() throws WxErrorException; + + /** + * 获取店铺二维码 + * + * @param qrcodeType 二维码类型,1:二维码;2:标准物料;3:送礼物物料 + * @return 店铺二维码 + * @throws WxErrorException 异常 + */ + ShopQrCodeResponse getShopQrCode(int qrcodeType) throws WxErrorException; + + /** + * 获取店铺口令 + * + * @return 店铺口令 + * @throws WxErrorException 异常 + */ + ShopTagLinkResponse getShopTagLink() throws WxErrorException; + + /** + * 上传图片 + * + * @param respType 0:media_id和pay_media_id;1:图片链接(商品信息相关图片请务必使用此参数得到链接) + * @param imgUrl 图片url + * @return 图片信息 + * + * @throws WxErrorException 异常 + */ + StoreImageInfo uploadImg(int respType, String imgUrl) throws WxErrorException; + + /** + * 上传图片 + * + * @param respType 0:media_id和pay_media_id;1:图片链接(商品信息相关图片请务必使用此参数得到链接) + * @param file 图片文件 + * @param height 图片的高,单位:像素 + * @param width 图片的宽,单位:像素 + * @return 图片信息 + * + * @throws WxErrorException 异常 + */ + StoreImageInfo uploadImg(int respType, File file, int height, int width) throws WxErrorException; + + /** + * 上传资质图片 + * + * @param file 资质图片 + * @return 结果 + * + * @throws WxErrorException 异常 + */ + QualificationFileResponse uploadQualificationFile(File file) throws WxErrorException; + + /** + * 根据media_id获取图片 + * + * @param mediaId media_id + * @return 图片下载结果;调用方使用完 {@link StoreImageResponse#getFile()} 后必须删除该临时文件 + */ + StoreImageResponse getImg(String mediaId) throws WxErrorException; + + /** + * 获取地址编码(最多获取4级) + * + * @param code 地址行政编码,不填或者填0时,拉取全国的省级行政编码 + * @return AddressCodeResponse + */ + AddressCodeResponse getAddressCode(Integer code) throws WxErrorException; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreBrandService.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreBrandService.java new file mode 100644 index 0000000000..e356f84da3 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreBrandService.java @@ -0,0 +1,103 @@ +package com.binarywang.wxjava.store.api; + + +import com.binarywang.wxjava.store.bean.audit.AuditApplyResponse; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; +import com.binarywang.wxjava.store.bean.brand.Brand; +import com.binarywang.wxjava.store.bean.brand.BrandApplyListResponse; +import com.binarywang.wxjava.store.bean.brand.BrandInfoResponse; +import com.binarywang.wxjava.store.bean.brand.BrandListResponse; +import me.chanjar.weixin.common.error.WxErrorException; + +/** + * 微信小店 品牌服务接口 + * + * @author Zeyes + */ +public interface WxStoreBrandService { + + /** + * 获取品牌库列表 + * + * @param pageSize 每页数量(默认10, 不超过50) + * @param nextKey 由上次请求返回, 记录翻页的上下文, 传入时会从上次返回的结果往后翻一页, 不传默认拉取第一页数据 + * @return 品牌库列表 + * + * @throws WxErrorException 异常 + */ + BrandListResponse listAllBrand(Integer pageSize, String nextKey) throws WxErrorException; + + /** + * 新增品牌资质 + * + * @param brand 品牌参数 + * @return 审核id + * + * @throws WxErrorException 异常 + */ + AuditApplyResponse addBrandApply(Brand brand) throws WxErrorException; + + /** + * 修改品牌资质 + * + * @param brand 品牌参数 + * @return 审核id + * + * @throws WxErrorException 异常 + */ + AuditApplyResponse updateBrandApply(Brand brand) throws WxErrorException; + + /** + * 撤回品牌资质审核 + * + * @param brandId 品牌id + * @param auditId 审核id + * @return 审核id + * + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse cancelBrandApply(String brandId, String auditId) throws WxErrorException; + + /** + * 删除品牌资质 + * + * @param brandId 品牌id + * @return 结果 + * + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse deleteBrandApply(String brandId) throws WxErrorException; + + /** + * 获取品牌资质申请详情 + * + * @param brandId 品牌id + * @return 品牌信息 + * + * @throws WxErrorException 异常 + */ + BrandInfoResponse getBrandApply(String brandId) throws WxErrorException; + + /** + * 获取品牌资质申请列表 + * + * @param pageSize 每页数量(默认10, 不超过50) + * @param nextKey 由上次请求返回, 记录翻页的上下文, 传入时会从上次返回的结果往后翻一页, 不传默认拉取第一页数据 + * @param status 审核单状态, 不填默认拉全部商品 + * @return 品牌列表 + * + * @throws WxErrorException 异常 + */ + BrandApplyListResponse listBrandApply(Integer pageSize, String nextKey, Integer status) throws WxErrorException; + + /** + * 获取生效中的品牌资质列表 + * + * @param pageSize 每页数量(默认10, 不超过50) + * @param nextKey 由上次请求返回, 记录翻页的上下文, 传入时会从上次返回的结果往后翻一页, 不传默认拉取第一页数据 + * @return 品牌列表 + * + * @throws WxErrorException 异常 + */ + BrandApplyListResponse listValidBrandApply(Integer pageSize, String nextKey) throws WxErrorException; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreCategoryService.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreCategoryService.java new file mode 100644 index 0000000000..11e71408e5 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreCategoryService.java @@ -0,0 +1,132 @@ +package com.binarywang.wxjava.store.api; + +import java.io.File; +import java.util.List; +import com.binarywang.wxjava.store.bean.audit.AuditApplyResponse; +import com.binarywang.wxjava.store.bean.audit.AuditResponse; +import com.binarywang.wxjava.store.bean.audit.CategoryAuditInfo; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; +import com.binarywang.wxjava.store.bean.category.*; +import me.chanjar.weixin.common.error.WxErrorException; + +/** + * 微信小店 商品类目相关接口 + * + * @author Zeyes + * @see 新旧类目树差异 + */ +public interface WxStoreCategoryService { + + /** + * 获取所有的类目 + * + * @return 所有类目以及资质信息 + * + * @throws WxErrorException 异常 + */ + CategoryQualificationResponse listAllCategory() throws WxErrorException; + + /** + * 获取商品类目列表(全量) 有频率限制 + * + * @param fCatId 类目父id + * @return 类目列表 + * + * @throws WxErrorException 异常 + * @deprecated 接口返回更新,请使用 {@link #listAvailableCategories(String)} + */ + @Deprecated + List listAvailableCategory(String fCatId) throws WxErrorException; + + /** + * 获取可用的子类目详情 + * + * 1.f_cat_id 为旧类目树中的非叶子类目,仅设置 cat_list 字段。 + * 2.f_cat_id 为新类目树中的非叶子类目,仅设置 cat_list_v2 字段。 + * 3.f_cat_id 为0,同时设置 cat_list 和 cat_list_v2 字段 + * + * @param fCatId 父类目ID,可先填0获取根部类目 + * @return 类目列表 + * @throws WxErrorException 异常 + */ + ShopCategoryResponse listAvailableCategories(String fCatId) throws WxErrorException; + + /** + * 获取类目信息 + * + * @param id 三级类目id + * @return 类目信息 + * + * @throws WxErrorException 异常 + */ + CategoryDetailResult getCategoryDetail(String id) throws WxErrorException; + + /** + * 上传类目资质 + * + * @param level1 一级类目ID + * @param level2 二级类目ID + * @param level3 三级类目ID + * @param certificate 资质材料,图片mediaid,图片类型,最多不超过10张 + * @return 审核id + * + * @throws WxErrorException 异常 + * @see WxStoreBasicService#uploadQualificationFile(File) + * @deprecated 请使用 {@link #addCategory(CategoryAuditInfo)} + */ + @Deprecated + AuditApplyResponse addCategory(String level1, String level2, String level3, List certificate) + throws WxErrorException; + + /** + * 上传类目资质 + * + * @param info 类目资质信息 + * @return 审核id + * + * @throws WxErrorException 异常 + * @see WxStoreBasicService#uploadQualificationFile(File) + */ + AuditApplyResponse addCategory(CategoryAuditInfo info) throws WxErrorException; + + /** + * 取消类目提审 + * + * @param auditId 提交审核时返回的id + * @return BaseResponse + * + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse cancelCategoryAudit(String auditId) throws WxErrorException; + + /** + * 查询类目审核结果 + * + * @param auditId 审核id + * @return 审核结果 + * + * @throws WxErrorException 异常 + */ + AuditResponse getAudit(String auditId) throws WxErrorException; + + /** + * 获取账号申请通过的类目和资质信息 + * + * @return 类目和资质信息 + * + * @throws WxErrorException 异常 + */ + PassCategoryResponse listPassCategory() throws WxErrorException; + + /** + * 获取店铺的类目权限列表 + * + * @param isFilterStatus 是否按状态筛选 + * @param status 类目状态(当 isFilterStatus 为 true 时有效) + * @return 类目权限列表 + * + * @throws WxErrorException 异常 + */ + RelationCategoryResponse listRelationCategory(Boolean isFilterStatus, Integer status) throws WxErrorException; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreCompassShopService.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreCompassShopService.java new file mode 100644 index 0000000000..69e1fbdfd0 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreCompassShopService.java @@ -0,0 +1,126 @@ +package com.binarywang.wxjava.store.api; + +import com.binarywang.wxjava.store.bean.compass.shop.FinderAuthListResponse; +import com.binarywang.wxjava.store.bean.compass.shop.FinderListResponse; +import com.binarywang.wxjava.store.bean.compass.shop.FinderOverallResponse; +import com.binarywang.wxjava.store.bean.compass.shop.FinderProductListResponse; +import com.binarywang.wxjava.store.bean.compass.shop.FinderProductOverallResponse; +import com.binarywang.wxjava.store.bean.compass.shop.ShopLiveListResponse; +import com.binarywang.wxjava.store.bean.compass.shop.ShopOverallResponse; +import com.binarywang.wxjava.store.bean.compass.shop.ShopProductDataResponse; +import com.binarywang.wxjava.store.bean.compass.shop.ShopProductListResponse; +import com.binarywang.wxjava.store.bean.compass.shop.ShopSaleProfileDataResponse; +import me.chanjar.weixin.common.error.WxErrorException; + +/** + * 微信小店 罗盘商家版服务 + * + * @author Zeyes + */ +public interface WxStoreCompassShopService { + + /** + * 获取电商概览数据 + * + * @param ds 日期,格式 yyyyMMdd + * @return 电商概览数据 + * + * @throws WxErrorException 异常 + */ + ShopOverallResponse getShopOverall(String ds) throws WxErrorException; + + /** + * 获取授权视频号列表 + * + * @return 获取授权视频号列表 + * + * @throws WxErrorException 异常 + */ + FinderAuthListResponse getFinderAuthorizationList() throws WxErrorException; + + /** + * 获取带货达人列表 + * + * @param ds 日期,格式 yyyyMMdd + * @return 带货达人列表 + * + * @throws WxErrorException 异常 + */ + FinderListResponse getFinderList(String ds) throws WxErrorException; + + /** + * 获取带货数据概览 + * + * @param ds 日期,格式 yyyyMMdd + * @return 带货数据概览 + * + * @throws WxErrorException 异常 + */ + FinderOverallResponse getFinderOverall(String ds) throws WxErrorException; + + /** + * 获取带货达人商品列表 + * + * @param ds 日期,格式YYYYMMDD + * @param finderId 视频号ID + * @return 带货达人商品列表 + * + * @throws WxErrorException 异常 + */ + FinderProductListResponse getFinderProductList(String ds, String finderId) throws WxErrorException; + + /** + * 获取带货达人详情 + * + * @param ds 日期,格式YYYYMMDD + * @param finderId 视频号ID + * @return 带货达人详情 + * + * @throws WxErrorException 异常 + */ + FinderProductOverallResponse getFinderProductOverall(String ds, String finderId) throws WxErrorException; + + /** + * 获取店铺开播列表 + * + * @param ds 日期,格式YYYYMMDD + * @param finderId 视频号ID + * @return 店铺开播列表 + * + * @throws WxErrorException 异常 + */ + ShopLiveListResponse getShopLiveList(String ds, String finderId) throws WxErrorException; + + /** + * 获取商品详细信息 + * + * @param ds 日期,格式YYYYMMDD + * @param productId 商品id + * @return 商品详细信息 + * + * @throws WxErrorException 异常 + */ + ShopProductDataResponse getShopProductData(String ds, String productId) throws WxErrorException; + + /** + * 获取商品列表 + * + * @param ds 日期,格式YYYYMMDD + * @return 商品列表 + * + * @throws WxErrorException 异常 + */ + ShopProductListResponse getShopProductList(String ds) throws WxErrorException; + + /** + * 获取店铺人群数据 + * + * @param ds 日期,格式 yyyyMMdd + * @param type 用户类型,1商品曝光用户 2商品点击用户 3购买用户 4首购用户 5复购用户 + * @return 店铺人群数据 + * + * @throws WxErrorException 异常 + */ + ShopSaleProfileDataResponse getShopSaleProfileData(String ds, Integer type) throws WxErrorException; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreCooperationService.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreCooperationService.java new file mode 100644 index 0000000000..46c168622a --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreCooperationService.java @@ -0,0 +1,70 @@ +package com.binarywang.wxjava.store.api; + +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; +import com.binarywang.wxjava.store.bean.cooperation.CooperationListResponse; +import com.binarywang.wxjava.store.bean.cooperation.CooperationQrCodeResponse; +import com.binarywang.wxjava.store.bean.cooperation.CooperationStatusResponse; +import me.chanjar.weixin.common.error.WxErrorException; + +/** + * 微信小店 合作账号相关接口 + * + * @author Zeyes + * @see 合作账号状态机 + */ +public interface WxStoreCooperationService { + + /** + * 获取合作账号列表 + * + * @param sharerType 合作账号类型 2公众号 3小程序 + * @return 合作账号列表 + * + * @throws WxErrorException 异常 + */ + CooperationListResponse listCooperation(Integer sharerType) throws WxErrorException; + + /** + * 获取合作账号状态 + * + * @param sharerId 合作账号id 公众号: gh_开头id 小程序: appid + * @param sharerType 合作账号类型 2公众号 3小程序 + * @return 合作账号状态 + * + * @throws WxErrorException 异常 + */ + CooperationStatusResponse getCooperationStatus(String sharerId, Integer sharerType) throws WxErrorException; + + /** + * 生成合作账号邀请二维码 + * + * @param sharerId 合作账号id 公众号: gh_开头id 小程序: appid + * @param sharerType 合作账号类型 2公众号 3小程序 + * @return 二维码 + * + * @throws WxErrorException 异常 + */ + CooperationQrCodeResponse generateQrCode(String sharerId, Integer sharerType) throws WxErrorException; + + /** + * 取消合作账号邀请 + * + * @param sharerId 合作账号id 公众号: gh_开头id 小程序: appid + * @param sharerType 合作账号类型 2公众号 3小程序 + * @return WxStoreBaseResponse + * + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse cancelInvitation(String sharerId, Integer sharerType) throws WxErrorException; + + /** + * 解绑合作账号 + * + * @param sharerId 合作账号id 公众号: gh_开头id 小程序: appid + * @param sharerType 合作账号类型 2公众号 3小程序 + * @return WxStoreBaseResponse + * + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse unbind(String sharerId, Integer sharerType) throws WxErrorException; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreCouponService.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreCouponService.java new file mode 100644 index 0000000000..010fab1991 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreCouponService.java @@ -0,0 +1,92 @@ +package com.binarywang.wxjava.store.api; + +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; +import com.binarywang.wxjava.store.bean.coupon.CouponIdResponse; +import com.binarywang.wxjava.store.bean.coupon.CouponInfoResponse; +import com.binarywang.wxjava.store.bean.coupon.CouponListParam; +import com.binarywang.wxjava.store.bean.coupon.CouponListResponse; +import com.binarywang.wxjava.store.bean.coupon.CouponParam; +import com.binarywang.wxjava.store.bean.coupon.UserCouponListParam; +import com.binarywang.wxjava.store.bean.coupon.UserCouponListResponse; +import com.binarywang.wxjava.store.bean.coupon.UserCouponResponse; +import me.chanjar.weixin.common.error.WxErrorException; + +/** + * 微信小店 优惠券服务 + * + * @author Zeyes + */ +public interface WxStoreCouponService { + + /** + * 创建优惠券 + * + * @param coupon 优惠券 + * @return 优惠券ID + * + * @throws WxErrorException 异常 + */ + CouponIdResponse createCoupon(CouponParam coupon) throws WxErrorException; + + /** + * 更新优惠券 + * + * @param coupon 优惠券 + * @return 优惠券ID + * + * @throws WxErrorException 异常 + */ + CouponIdResponse updateCoupon(CouponParam coupon) throws WxErrorException; + + /** + * 更新优惠券状态 + * + * @param couponId 优惠券ID + * @param status 状态 2生效 4已作废 5删除 {@link com.binarywang.wxjava.store.enums.WxCouponStatus} + * @return BaseResponse + * + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse updateCouponStatus(String couponId, Integer status) throws WxErrorException; + + /** + * 获取优惠券详情 + * + * @param couponId 优惠券ID + * @return CouponInfoResponse + * + * @throws WxErrorException 异常 + */ + CouponInfoResponse getCoupon(String couponId) throws WxErrorException; + + /** + * 获取优惠券ID列表 + * + * @param param 条件参数 + * @return 优惠券ID列表 + * + * @throws WxErrorException 异常 + */ + CouponListResponse getCouponList(CouponListParam param) throws WxErrorException; + + /** + * 获取用户优惠券 + * + * @param openId 用户openid + * @param userCouponId 用户优惠券ID + * @return UserCouponResponse + * + * @throws WxErrorException 异常 + */ + UserCouponResponse getUserCoupon(String openId, String userCouponId) throws WxErrorException; + + /** + * 获取用户优惠券ID列表 + * + * @param param 条件参数 + * @return UserCouponListResponse + * + * @throws WxErrorException 异常 + */ + UserCouponListResponse getUserCouponList(UserCouponListParam param) throws WxErrorException; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreEwaybillService.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreEwaybillService.java new file mode 100644 index 0000000000..533de1afbb --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreEwaybillService.java @@ -0,0 +1,78 @@ +package com.binarywang.wxjava.store.api; + +import java.util.List; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; +import com.binarywang.wxjava.store.bean.ewaybill.AccountInfoResponse; +import com.binarywang.wxjava.store.bean.ewaybill.AddSubOrderRequest; +import com.binarywang.wxjava.store.bean.ewaybill.CreateOrderRequest; +import com.binarywang.wxjava.store.bean.ewaybill.CreateOrderResponse; +import com.binarywang.wxjava.store.bean.ewaybill.DeliveryListResponse; +import com.binarywang.wxjava.store.bean.ewaybill.PrintOrderRequest; +import com.binarywang.wxjava.store.bean.ewaybill.BatchPrintOrderRequest; +import com.binarywang.wxjava.store.bean.ewaybill.OrderDetailResponse; +import com.binarywang.wxjava.store.bean.ewaybill.PreCreateRequest; +import com.binarywang.wxjava.store.bean.ewaybill.PreCreateResponse; +import com.binarywang.wxjava.store.bean.ewaybill.PrintContentResponse; +import com.binarywang.wxjava.store.bean.ewaybill.TemplateConfigResponse; +import com.binarywang.wxjava.store.bean.ewaybill.TemplateCreateRequest; +import com.binarywang.wxjava.store.bean.ewaybill.TemplateIdResponse; +import com.binarywang.wxjava.store.bean.ewaybill.TemplateInfoResponse; +import com.binarywang.wxjava.store.bean.ewaybill.TemplateUpdateRequest; +import me.chanjar.weixin.common.error.WxErrorException; + +/** + * 微信小店电子面单服务接口 + * + * @author GitHub Copilot + */ +public interface WxStoreEwaybillService { + + /** 获取可用的标准面单模板。 @return 模板配置 @throws WxErrorException 微信接口调用失败 */ + TemplateConfigResponse getTemplateConfig() throws WxErrorException; + + /** 创建商家面单模板。 @param req 官方模板创建字段 @return 新模板 ID @throws WxErrorException 调用失败 */ + TemplateIdResponse createTemplate(TemplateCreateRequest req) throws WxErrorException; + + /** 删除商家面单模板。 @param templateId 模板 ID @return 操作结果 @throws WxErrorException 调用失败 */ + WxStoreBaseResponse deleteTemplate(String templateId) throws WxErrorException; + + /** 更新商家面单模板。 @param req 官方模板更新字段 @return 操作结果 @throws WxErrorException 调用失败 */ + WxStoreBaseResponse updateTemplate(TemplateUpdateRequest req) throws WxErrorException; + + /** 查询标准模板信息。 @param templateCode 标准模板编码 @return 模板详情 @throws WxErrorException 调用失败 */ + TemplateInfoResponse getTemplate(String templateCode) throws WxErrorException; + + /** 按模板 ID 查询商家模板。 @param templateId 模板 ID @return 模板详情 @throws WxErrorException 调用失败 */ + TemplateInfoResponse getTemplateById(String templateId) throws WxErrorException; + + /** 查询已开通电子面单的网点和账号。 @return 账号信息 @throws WxErrorException 调用失败 */ + AccountInfoResponse getAccount() throws WxErrorException; + + /** 查询已开通电子面单的快递公司。 @return 快递公司列表 @throws WxErrorException 调用失败 */ + DeliveryListResponse getDeliveryList() throws WxErrorException; + + /** 预取电子面单号。 @param req 官方预取号字段 @return 预取号结果 @throws WxErrorException 调用失败 */ + PreCreateResponse preCreateOrder(PreCreateRequest req) throws WxErrorException; + + /** 获取电子面单号。 @param req 官方取号字段,含收寄件信息 @return 面单号结果 @throws WxErrorException 调用失败 */ + CreateOrderResponse createOrder(CreateOrderRequest req) throws WxErrorException; + + /** 追加电子面单子件。 @param req 官方子件字段 @return 操作结果 @throws WxErrorException 调用失败 */ + WxStoreBaseResponse addSubOrder(AddSubOrderRequest req) throws WxErrorException; + + /** 取消电子面单下单。 @param waybillId 运单 ID @return 操作结果 @throws WxErrorException 调用失败 */ + WxStoreBaseResponse cancelOrder(PrintOrderRequest req) throws WxErrorException; + + /** 查询电子面单详情。 @param waybillId 运单 ID @return 面单详情 @throws WxErrorException 调用失败 */ + OrderDetailResponse getOrder(String ewaybillOrderId) throws WxErrorException; + + /** 获取打印报文。 @param waybillIds 运单 ID 列表 @param templateId 可选模板 ID @return 打印内容 @throws WxErrorException 调用失败 */ + PrintContentResponse getPrintContent(String ewaybillOrderId, String templateId) + throws WxErrorException; + + /** 通知单个运单打印成功。 @param waybillId 运单 ID @return 操作结果 @throws WxErrorException 调用失败 */ + WxStoreBaseResponse printOrder(PrintOrderRequest req) throws WxErrorException; + + /** 批量通知运单打印成功。 @param waybillIds 运单 ID 列表 @return 操作结果 @throws WxErrorException 调用失败 */ + WxStoreBaseResponse batchPrintOrder(BatchPrintOrderRequest req) throws WxErrorException; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreFavoriteService.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreFavoriteService.java new file mode 100644 index 0000000000..82779e32f8 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreFavoriteService.java @@ -0,0 +1,21 @@ +package com.binarywang.wxjava.store.api; + +import com.binarywang.wxjava.store.bean.favorite.FavoriteCountResponse; +import me.chanjar.weixin.common.error.WxErrorException; + +/** + * 微信小店 收藏管理接口 + * + * @author GitHub Copilot + * @link 收藏管理接口文档 + */ +public interface WxStoreFavoriteService { + + /** + * 获取店铺收藏的人数 + * + * @return 店铺收藏人数响应 + * @throws WxErrorException 异常 + */ + FavoriteCountResponse getFavoriteCount() throws WxErrorException; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreFreightTemplateService.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreFreightTemplateService.java new file mode 100644 index 0000000000..6fce17f7d4 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreFreightTemplateService.java @@ -0,0 +1,57 @@ +package com.binarywang.wxjava.store.api; + + +import com.binarywang.wxjava.store.bean.freight.FreightTemplate; +import com.binarywang.wxjava.store.bean.freight.TemplateIdResponse; +import com.binarywang.wxjava.store.bean.freight.TemplateInfoResponse; +import com.binarywang.wxjava.store.bean.freight.TemplateListResponse; +import me.chanjar.weixin.common.error.WxErrorException; + +/** + * 微信小店 运费模板服务接口 + * + * @author Zeyes + */ +public interface WxStoreFreightTemplateService { + + /** + * 获取运费模板列表 + * + * @param offset 起始位置 + * @param limit 拉取个数 + * @return 列表 + * + * @throws WxErrorException 异常 + */ + TemplateListResponse listTemplate(Integer offset, Integer limit) throws WxErrorException; + + /** + * 获取运费模板 + * + * @param templateId 模板id + * @return 运费模板 + * + * @throws WxErrorException 异常 + */ + TemplateInfoResponse getTemplate(String templateId) throws WxErrorException; + + /** + * 添加运费模板 + * + * @param template 运费模板 + * @return TemplateIdResponse + * + * @throws WxErrorException 异常 + */ + TemplateIdResponse addTemplate(FreightTemplate template) throws WxErrorException; + + /** + * 更新运费模板 + * + * @param template 运费模板 + * @return TemplateIdResponse + * + * @throws WxErrorException 异常 + */ + TemplateIdResponse updateTemplate(FreightTemplate template) throws WxErrorException; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreFundService.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreFundService.java new file mode 100644 index 0000000000..520b5cc712 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreFundService.java @@ -0,0 +1,189 @@ +package com.binarywang.wxjava.store.api; + + +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; +import com.binarywang.wxjava.store.bean.fund.AccountInfo; +import com.binarywang.wxjava.store.bean.fund.AccountInfoResponse; +import com.binarywang.wxjava.store.bean.fund.BalanceInfoResponse; +import com.binarywang.wxjava.store.bean.fund.FlowListResponse; +import com.binarywang.wxjava.store.bean.fund.FundsFlowResponse; +import com.binarywang.wxjava.store.bean.fund.FundsListParam; +import com.binarywang.wxjava.store.bean.fund.WithdrawDetailResponse; +import com.binarywang.wxjava.store.bean.fund.WithdrawListResponse; +import com.binarywang.wxjava.store.bean.fund.WithdrawSubmitResponse; +import com.binarywang.wxjava.store.bean.fund.bank.BankCityResponse; +import com.binarywang.wxjava.store.bean.fund.bank.BankInfoResponse; +import com.binarywang.wxjava.store.bean.fund.bank.BankListResponse; +import com.binarywang.wxjava.store.bean.fund.bank.BankProvinceResponse; +import com.binarywang.wxjava.store.bean.fund.bank.BranchInfoResponse; +import com.binarywang.wxjava.store.bean.fund.qrcode.QrCheckResponse; +import com.binarywang.wxjava.store.bean.fund.qrcode.QrCodeResponse; +import me.chanjar.weixin.common.error.WxErrorException; + +/** + * 资金相关服务 + * + * @author Zeyes + */ +public interface WxStoreFundService { + + /** + * 获取账户余额 + * + * @return 账户余额 + * + * @throws WxErrorException 异常 + */ + BalanceInfoResponse getBalance() throws WxErrorException; + + /** + * 获取结算账户 + * + * @return 结算账户 + * + * @throws WxErrorException 异常 + */ + AccountInfoResponse getBankAccount() throws WxErrorException; + + /** + * 获取资金流水详情 + * + * @param flowId 资金流水号 + * @return 资金流水详情 + * + * @throws WxErrorException 异常 + */ + FundsFlowResponse getFundsFlowDetail(String flowId) throws WxErrorException; + + /** + * 获取资金流水列表 + * + * @param param 资金流水列表参数 + * @return 资金流水列表 + * + * @throws WxErrorException 异常 + */ + FlowListResponse listFundsFlow(FundsListParam param) throws WxErrorException; + + /** + * 获取提现记录 + * + * @param withdrawId 提现单号 + * @return 提现记录 + * + * @throws WxErrorException 异常 + */ + WithdrawDetailResponse getWithdrawDetail(String withdrawId) throws WxErrorException; + + /** + * 获取提现记录列表 + * + * @param pageNum 页码 + * @param pageSize 每页大小 + * @param startTime 开始时间 + * @param endTime 结束时间 + * @return 提现记录列表 + * + * @throws WxErrorException 异常 + */ + WithdrawListResponse listWithdraw(Integer pageNum, Integer pageSize, Long startTime, Long endTime) + throws WxErrorException; + + /** + * 修改结算账户 + * + * @param accountInfo 结算账户信息 + * @return 修改结果 + * + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse setBankAccount(AccountInfo accountInfo) throws WxErrorException; + + /*** + * 商户提现 + * + * @param amount 提现金额(单位:分) + * @param remark 提现备注 + * @param bankMemo 银行附言 + * @return 提现结果 + * @throws WxErrorException 异常 + */ + WithdrawSubmitResponse submitWithdraw(Integer amount, String remark, String bankMemo) throws WxErrorException; + + /** + * 根据卡号查银行信息 + * + * @param accountNumber 卡号 + * @return 银行信息 + * + * @throws WxErrorException 异常 + */ + BankInfoResponse getBankInfoByCardNo(String accountNumber) throws WxErrorException; + + /** + * 搜索银行列表 + * + * @param offset 偏移量 + * @param limit 每页数据大小 + * @param keywords 银行关键字 + * @param bankType 银行类型(1:对私银行,2:对公银行; 默认对公) + * @return 银行列表 + * + * @throws WxErrorException 异常 + */ + BankListResponse searchBankList(Integer offset, Integer limit, String keywords, Integer bankType) + throws WxErrorException; + + /** + * 查询城市列表 + * + * @param provinceCode 省份编码 + * @return 城市列表 + * + * @throws WxErrorException 异常 + */ + BankCityResponse searchCityList(String provinceCode) throws WxErrorException; + + /** + * 查询大陆银行省份列表 + * + * @return 省份列表 + * + * @throws WxErrorException 异常 + */ + BankProvinceResponse getProvinceList() throws WxErrorException; + + /** + * 查询支行列表 + * + * @param bankCode 银行编码 + * @param cityCode 城市编码 + * @param offset 偏移量 + * @param limit 每页数据大小 + * @return 支行列表 + * + * @throws WxErrorException 异常 + */ + BranchInfoResponse searchBranchList(String bankCode, String cityCode, Integer offset, Integer limit) + throws WxErrorException; + + /** + * 获取二维码 + * + * @param qrcodeTicket 二维码ticket + * @return 二维码响应 + * + * @throws WxErrorException 异常 + */ + QrCodeResponse getQrCode(String qrcodeTicket) throws WxErrorException; + + /** + * 查询扫码状态 + * + * @param qrcodeTicket 二维码ticket + * @return 扫码状态 + * + * @throws WxErrorException 异常 + */ + QrCheckResponse checkQrStatus(String qrcodeTicket) throws WxErrorException; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreGiftService.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreGiftService.java new file mode 100644 index 0000000000..eff2e8fecb --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreGiftService.java @@ -0,0 +1,102 @@ +package com.binarywang.wxjava.store.api; + +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; +import com.binarywang.wxjava.store.bean.product.GiftActivityAddResponse; +import com.binarywang.wxjava.store.bean.product.GiftActivityInfo; +import com.binarywang.wxjava.store.bean.product.GiftProductAddResponse; +import com.binarywang.wxjava.store.bean.product.GiftProductGetResponse; +import com.binarywang.wxjava.store.bean.product.GiftProductInfo; +import com.binarywang.wxjava.store.bean.product.GiftProductListParam; +import com.binarywang.wxjava.store.bean.product.GiftProductListResponse; +import me.chanjar.weixin.common.error.WxErrorException; + +/** + * 微信小店赠品与买赠活动服务。 + */ +public interface WxStoreGiftService { + + /** + * 添加非卖商品。 + * + * @param info 赠品信息 + * @return 添加赠品响应 + * @throws WxErrorException 异常 + */ + GiftProductAddResponse addGiftProduct(GiftProductInfo info) throws WxErrorException; + + /** + * 更新非卖商品。 + * + * @param info 赠品信息 + * @return 操作响应 + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse updateGiftProduct(GiftProductInfo info) throws WxErrorException; + + /** + * 在售商品转赠品。 + * + * @param productId 商品ID + * @return 操作响应 + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse setProductAsGift(String productId) throws WxErrorException; + + /** + * 获取赠品。 + * + * @param productId 赠品商品ID + * @return 赠品详情响应 + * @throws WxErrorException 异常 + */ + GiftProductGetResponse getGiftProduct(String productId) throws WxErrorException; + + /** + * 获取赠品列表。 + * + * @param param 查询参数 + * @return 赠品列表 + * @throws WxErrorException 异常 + */ + GiftProductListResponse listGiftProduct(GiftProductListParam param) throws WxErrorException; + + /** + * 更新赠品库存。 + * + * @param productId 赠品商品ID + * @param skuId 赠品sku_id + * @param diffType 修改类型 1增加 2减少 3设置 + * @param num 增加、减少或者设置的库存值 + * @return 操作响应 + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse updateGiftStock(String productId, String skuId, Integer diffType, Integer num) + throws WxErrorException; + + /** + * 创建赠品活动。 + * + * @param info 活动信息 + * @return 创建赠品活动响应 + * @throws WxErrorException 异常 + */ + GiftActivityAddResponse addGiftActivity(GiftActivityInfo info) throws WxErrorException; + + /** + * 删除赠品活动。 + * + * @param activityId 活动ID + * @return 操作响应 + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse deleteGiftActivity(String activityId) throws WxErrorException; + + /** + * 停止赠品活动。 + * + * @param activityId 活动ID + * @return 操作响应 + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse stopGiftActivity(String activityId) throws WxErrorException; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreHomePageService.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreHomePageService.java new file mode 100644 index 0000000000..794c662431 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreHomePageService.java @@ -0,0 +1,188 @@ +package com.binarywang.wxjava.store.api; + +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; +import com.binarywang.wxjava.store.bean.home.background.BackgroundApplyResponse; +import com.binarywang.wxjava.store.bean.home.background.BackgroundGetResponse; +import com.binarywang.wxjava.store.bean.home.banner.BannerApplyResponse; +import com.binarywang.wxjava.store.bean.home.banner.BannerGetResponse; +import com.binarywang.wxjava.store.bean.home.banner.BannerInfo; +import com.binarywang.wxjava.store.bean.home.tree.TreeProductEditInfo; +import com.binarywang.wxjava.store.bean.home.tree.TreeProductListInfo; +import com.binarywang.wxjava.store.bean.home.tree.TreeProductListResponse; +import com.binarywang.wxjava.store.bean.home.tree.TreeShowGetResponse; +import com.binarywang.wxjava.store.bean.home.tree.TreeShowInfo; +import com.binarywang.wxjava.store.bean.home.tree.TreeShowSetResponse; +import com.binarywang.wxjava.store.bean.home.window.WindowProductSettingResponse; +import me.chanjar.weixin.common.error.WxErrorException; + +/** + * 微信小店 主页管理相关接口 + * + * @author Zeyes + */ +public interface WxStoreHomePageService { + + /** + * 添加分类关联的商品 + * + * @param info 商品分类以及商品id + * @return BaseResponse + * + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse addTreeProduct(TreeProductEditInfo info) throws WxErrorException; + + /** + * 删除分类关联的商品 + * + * @param info 商品分类以及商品id + * @return BaseResponse + * + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse delTreeProduct(TreeProductEditInfo info) throws WxErrorException; + + /** + * 获取分类关联的商品ID列表 + * + * @param info 分类id、分页大小、分页上下文 + * @return 商品id、分页上下文 + * + * @throws WxErrorException 异常 + */ + TreeProductListResponse getTreeProductList(TreeProductListInfo info) throws WxErrorException; + + /** + * 设置展示在店铺主页的商品分类 + * + * @param info 分类id + * @return 商品分类审核结果 + * + * @throws WxErrorException 异常 + */ + TreeShowSetResponse setShowTree(TreeShowInfo info) throws WxErrorException; + + /** + * 获取展示在店铺主页的商品分类 + * + * @return 商品分类信息 + * + * @throws WxErrorException 异常 + */ + TreeShowGetResponse getShowTree() throws WxErrorException; + + /** + * 获取主页展示商品列表 + * + * @param pageSize 分页大小 + * @param nextKey 分页上下文 + * @return WindowProductSettingResponse + * + * @throws WxErrorException 异常 + */ + WindowProductSettingResponse listWindowProduct(Integer pageSize, String nextKey) throws WxErrorException; + + /** + * 删除主页展示商品 + * + * @param productId 商品id + * @param indexNum 商品重新排序后的新序号,最大移动步长为500(即新序号与当前序号的距离小于500) + * @return BaseResponse + * + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse reorderWindowProduct(String productId, Integer indexNum) throws WxErrorException; + + /** + * 隐藏小店主页商品 + * + * @param productId 商品id + * @param setHide 是否隐藏。1-隐藏,0-取消隐藏 + * @return BaseResponse + * + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse hideWindowProduct(String productId, Integer setHide) throws WxErrorException; + + /** + * 置顶小店主页商品 + * + * @param productId 商品id + * @param setTop 是否顶置。1-置顶,0-取消置顶 + * @return BaseResponse + * + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse topWindowProduct(String productId, Integer setTop) throws WxErrorException; + + /** + * 提交背景图申请 + * + * @param imgUrl 图片链接。请务必使用接口上传图片(参数resp_type=1),并将返回的img_url填入此处,不接受其他任何格式的图片url。 + * 若url曾经做过转换(url前缀为mmecimage.cn/p/),则可以直接提交。 + * @return 申请编号 + * + * @throws WxErrorException 异常 + * @see WxStoreBasicService#uploadImg(int, String) + */ + BackgroundApplyResponse applyBackground(String imgUrl) throws WxErrorException; + + /** + * 查询背景图 + * + * @return 背景图信息 + * @throws WxErrorException 异常 + */ + BackgroundGetResponse getBackground() throws WxErrorException; + + /** + * 撤销主页背景图申请 + * + * @param applyId 申请编号 + * @return BaseResponse + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse cancelBackground(Integer applyId) throws WxErrorException; + + /** + * 清空主页背景图并撤销流程中的申请 + * + * @return BaseResponse + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse removeBackground() throws WxErrorException; + + /** + * 提交精选展示位申请 + * + * @param info 展示位信息 + * @return 申请编号 + * @throws WxErrorException 异常 + */ + BannerApplyResponse applyBanner(BannerInfo info) throws WxErrorException; + + /** + * 查询精选展示位 + * + * @return 展示位信息 + * @throws WxErrorException 异常 + */ + BannerGetResponse getBanner() throws WxErrorException; + + /** + * 撤销精选展示位申请 + * + * @param applyId 申请编号 + * @return BaseResponse + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse cancelBanner(Integer applyId) throws WxErrorException; + + /** + * 清空精选展示位并撤销流程中的申请 + * + * @return BaseResponse + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse removeBanner() throws WxErrorException; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreKfService.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreKfService.java new file mode 100644 index 0000000000..5cadd89dc4 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreKfService.java @@ -0,0 +1,41 @@ +package com.binarywang.wxjava.store.api; + +import com.binarywang.wxjava.store.bean.kf.WxStoreKfSendMsgParam; +import com.binarywang.wxjava.store.bean.kf.WxStoreKfSendMsgResponse; +import me.chanjar.weixin.common.error.WxErrorException; + +/** 微信小店商家客服服务。 */ +public interface WxStoreKfService { + + /** + * 上传多媒体资源。 + * + * @param openId 用户 open_id + * @param msgType 文件类型,仅支持 video、file、image + * @param file 文件字节内容 + * @return COS 地址 + * @throws WxErrorException 微信异常 + */ + String uploadMedia(String openId, String msgType, byte[] file) throws WxErrorException; + + /** + * 上传多媒体资源。 + * + * @param openId 用户 open_id + * @param msgType 文件类型,仅支持 video、file、image + * @param fileName 文件名 + * @param file 文件字节内容 + * @return COS 地址 + * @throws WxErrorException 微信异常 + */ + String uploadMedia(String openId, String msgType, String fileName, byte[] file) throws WxErrorException; + + /** + * 发送客服消息。 + * + * @param param 请求参数 + * @return 发送结果 + * @throws WxErrorException 微信异常 + */ + WxStoreKfSendMsgResponse sendMessage(WxStoreKfSendMsgParam param) throws WxErrorException; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreLimitedDiscountService.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreLimitedDiscountService.java new file mode 100644 index 0000000000..f70f590b62 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreLimitedDiscountService.java @@ -0,0 +1,62 @@ +package com.binarywang.wxjava.store.api; + +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; +import com.binarywang.wxjava.store.bean.limit.LimitTaskAddResponse; +import com.binarywang.wxjava.store.bean.limit.LimitTaskListResponse; +import com.binarywang.wxjava.store.bean.limit.LimitTaskParam; +import com.binarywang.wxjava.store.bean.limit.LimitTaskUpdateParam; +import com.binarywang.wxjava.store.bean.limit.LimitTaskUpdateResponse; +import me.chanjar.weixin.common.error.WxErrorException; + +/** + * 微信小店限时抢购服务。 + */ +public interface WxStoreLimitedDiscountService { + + /** + * 添加限时抢购任务。 + * + * @param param 限时抢购任务 + * @return 添加任务响应 + * @throws WxErrorException 异常 + */ + LimitTaskAddResponse addLimitTask(LimitTaskParam param) throws WxErrorException; + + /** + * 拉取限时抢购任务列表。 + * + * @param pageSize 每页数量 + * @param nextKey 翻页上下文 + * @param status 抢购活动状态 + * @return 任务列表响应 + * @throws WxErrorException 异常 + */ + LimitTaskListResponse listLimitTask(Integer pageSize, String nextKey, Integer status) throws WxErrorException; + + /** + * 停止限时抢购任务。 + * + * @param taskId 限时抢购任务ID + * @return 操作响应 + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse stopLimitTask(String taskId) throws WxErrorException; + + /** + * 删除限时抢购任务。 + * + * @param taskId 限时抢购任务ID + * @return 操作响应 + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse deleteLimitTask(String taskId) throws WxErrorException; + + /** + * 更新限时抢购任务。 + * + * @param param 更新任务参数 + * @return 更新任务响应 + * @throws WxErrorException 异常 + */ + LimitTaskUpdateResponse updateLimitTask(LimitTaskUpdateParam param) throws WxErrorException; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreOrderService.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreOrderService.java new file mode 100644 index 0000000000..69c0e9bc52 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreOrderService.java @@ -0,0 +1,326 @@ +package com.binarywang.wxjava.store.api; + +import java.util.List; +import com.binarywang.wxjava.store.bean.base.AddressInfo; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; +import com.binarywang.wxjava.store.bean.delivery.PackageAuditInfo; +import com.binarywang.wxjava.store.bean.delivery.DeliveryCompanyResponse; +import com.binarywang.wxjava.store.bean.delivery.DeliveryInfo; +import com.binarywang.wxjava.store.bean.order.ChangeOrderInfo; +import com.binarywang.wxjava.store.bean.order.DecodeSensitiveInfoResponse; +import com.binarywang.wxjava.store.bean.order.DeliveryUpdateParam; +import com.binarywang.wxjava.store.bean.order.OrderCompensationDeliveryParam; +import com.binarywang.wxjava.store.bean.order.OrderInfoResponse; +import com.binarywang.wxjava.store.bean.order.OrderListParam; +import com.binarywang.wxjava.store.bean.order.OrderListResponse; +import com.binarywang.wxjava.store.bean.order.OrderSearchParam; +import com.binarywang.wxjava.store.bean.order.PreShipmentChangeSkuResponse; +import com.binarywang.wxjava.store.bean.order.PresentSubOrderResponse; +import com.binarywang.wxjava.store.bean.order.PrivateNumberGetPhoneResponse; +import com.binarywang.wxjava.store.bean.order.RealNumberViewAuditResponse; +import com.binarywang.wxjava.store.bean.order.VirtualTelNumberResponse; +import me.chanjar.weixin.common.error.WxErrorException; + +/** + * 微信小店 订单服务接口 + * + * @author Zeyes + * @link 订单接口文档 + */ +public interface WxStoreOrderService { + + /** + * 获取订单 + * + * @param orderId 订单id + * @return 订单详情 + * + * @throws WxErrorException 异常 + */ + OrderInfoResponse getOrder(String orderId) throws WxErrorException; + + /** + * 获取订单详情 + * + * @param orderId 订单id + * @param encodeSensitiveInfo 是否编码敏感信息 + * @return 订单详情 + * + * @throws WxErrorException 异常 + */ + OrderInfoResponse getOrder(String orderId, Boolean encodeSensitiveInfo) throws WxErrorException; + + /** + * 获取订单列表 + * + * @param param 搜索条件 + * @return 订单列表 + * + * @throws WxErrorException 异常 + */ + OrderListResponse getOrders(OrderListParam param) throws WxErrorException; + + /** + * 订单搜索 + * + * @param param 搜索条件 + * @return 订单列表 + * + * @throws WxErrorException 异常 + */ + OrderListResponse searchOrder(OrderSearchParam param) throws WxErrorException; + + /** + * 更改订单价格 + * + * @param orderId 订单id + * @param expressFee 运费价格(以分为单位)(不填不改) + * @param changeOrderInfos 改价列表 + * @return 结果 + * + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse updatePrice(String orderId, Integer expressFee, List changeOrderInfos) + throws WxErrorException; + + /** + * 更改订单备注 + * + * @param orderId 订单id + * @param merchantNotes 备注 + * @return BaseResponse + * + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse updateRemark(String orderId, String merchantNotes) throws WxErrorException; + + /** + * 更新订单地址 + * + * @param orderId 订单id + * @param userAddress 用户地址 + * @return BaseResponse + * + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse updateAddress(String orderId, AddressInfo userAddress) throws WxErrorException; + + /** + * 修改物流信息
发货完成的订单可以修改,最多修改1次 拆包发货的订单暂不允许修改物流 虚拟商品订单暂不允许修改物流 + * + * @param param 物流信息 + * @return BaseResponse + * + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse updateDelivery(DeliveryUpdateParam param) throws WxErrorException; + + /** + * 同意用户修改收货地址请求 + * + * @param orderId 订单id + * @return BaseResponse + * + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse acceptAddressModify(String orderId) throws WxErrorException; + + /** + * 拒接用户修改收货地址请求 + * + * @param orderId 订单id + * @return BaseResponse + * + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse rejectAddressModify(String orderId) throws WxErrorException; + + /** + * 关闭订单 (需要订单状态为未付款状态) + * + * @param orderId 订单id + * @return BaseResponse + */ + WxStoreBaseResponse closeOrder(String orderId); + + /** + * 获取快递公司列表-旧 + * + * @return 快递公司列表 + * + * @throws WxErrorException 异常 + */ + DeliveryCompanyResponse listDeliveryCompany() throws WxErrorException; + + /** + * 获取快递公司列表 + * + * @param ewaybillOnly 是否仅返回支持电子面单功能的快递公司 + * @return 快递公司列表 + * + * @throws WxErrorException 异常 + */ + DeliveryCompanyResponse listDeliveryCompany(Boolean ewaybillOnly) throws WxErrorException; + + /** + * 订单发货 + * + * @param orderId 订单id + * @param deliveryList 物流信息 + * @return BaseResponse + * + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse deliveryOrder(String orderId, List deliveryList) throws WxErrorException; + + /** + * 上传生鲜质检信息
+ * + * 注意事项:
+ * 1. 非生鲜质检的订单不能进行上传
+ * 2. 图片url必须用图片上传接口获取 {@link WxStoreBasicService#uploadImg(int, String)}
+ * + * @param orderId 订单id + * @param items 商品打包信息 + * @return BaseResponse + * + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse uploadFreshInspect(String orderId, List items) throws WxErrorException; + + /** + * 兑换虚拟号 + * + * @param orderId 订单id + * @return 虚拟号信息 + * @throws WxErrorException 异常 + */ + VirtualTelNumberResponse getVirtualTelNumber(String orderId) throws WxErrorException; + + /** + * 解码订单包含的敏感数据 + * + * @param orderId 订单id + * @return 解码结果 + * @throws WxErrorException 异常 + */ + DecodeSensitiveInfoResponse decodeSensitiveInfo(String orderId) throws WxErrorException; + + /** + * 礼物订单新增备注信息 + * + * @param orderId 礼物订单ID + * @param note 备注内容 + * @return BaseResponse + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse addPresentNote(String orderId, String note) throws WxErrorException; + + /** + * 获取礼物单的子单列表 + * + * @param orderId 礼物订单ID + * @return 子单列表 + * @throws WxErrorException 异常 + */ + PresentSubOrderResponse getPresentSubOrders(String orderId) throws WxErrorException; + + /** + * 获取待发货前更换SKU待处理请求 + * + * @param orderId 订单ID + * @return 换SKU信息 + * @throws WxErrorException 异常 + */ + PreShipmentChangeSkuResponse getPreShipmentChangeSku(String orderId) throws WxErrorException; + + /** + * 同意待发货前更换SKU请求 + * + * @param orderId 订单ID + * @return BaseResponse + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse approvePreShipmentChangeSku(String orderId) throws WxErrorException; + + /** + * 拒绝待发货前更换SKU请求 + * + * @param orderId 订单ID + * @param rejectReason 拒绝原因 + * @return BaseResponse + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse rejectPreShipmentChangeSku(String orderId, String rejectReason) throws WxErrorException; + + /** + * 申请查看订单真实号码 + * + * @param orderId 订单ID + * @return BaseResponse + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse applyRealNumber(String orderId) throws WxErrorException; + + /** + * 查看订单真实号审核状态 + * + * @param orderId 订单ID + * @return 审核状态 + * @throws WxErrorException 异常 + */ + RealNumberViewAuditResponse getRealNumberViewAudit(String orderId) throws WxErrorException; + + /** + * 订单再次申请虚拟号 + * + * @param orderId 订单ID + * @return BaseResponse + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse applyVirtualNumberAgain(String orderId) throws WxErrorException; + + /** + * 订单虚拟号延期 + * + * @param orderId 订单ID + * @return BaseResponse + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse delayVirtualNumber(String orderId) throws WxErrorException; + + /** + * 添加待认证的手机号 + * + * @param phone 手机号 + * @return BaseResponse + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse addPrivatePhone(String phone) throws WxErrorException; + + /** + * 获取短信验证码 + * + * @param phone 手机号 + * @return BaseResponse + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse sendPrivatePhoneVerifyCode(String phone) throws WxErrorException; + + /** + * 获取小店手机号认证状态 + * + * @return 手机号认证状态 + * @throws WxErrorException 异常 + */ + PrivateNumberGetPhoneResponse getPrivatePhone() throws WxErrorException; + + /** + * 订单补发货 + * + * @param param 补发货参数 + * @return BaseResponse + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse compensationDelivery(OrderCompensationDeliveryParam param) throws WxErrorException; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreProductAssistantService.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreProductAssistantService.java new file mode 100644 index 0000000000..bdc7a03695 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreProductAssistantService.java @@ -0,0 +1,77 @@ +package com.binarywang.wxjava.store.api; + +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; +import com.binarywang.wxjava.store.bean.product.assistant.BeginTimingSaleParam; +import com.binarywang.wxjava.store.bean.product.assistant.CancelTimingSaleParam; +import com.binarywang.wxjava.store.bean.product.assistant.CategoryPreCheckParam; +import com.binarywang.wxjava.store.bean.product.assistant.CategoryPreCheckResponse; +import com.binarywang.wxjava.store.bean.product.assistant.ExternalProductMappingNewParam; +import com.binarywang.wxjava.store.bean.product.assistant.ExternalProductMappingNewResponse; +import com.binarywang.wxjava.store.bean.product.assistant.ExternalProductMappingParam; +import com.binarywang.wxjava.store.bean.product.assistant.ExternalProductMappingResponse; +import com.binarywang.wxjava.store.bean.product.assistant.ProductBrandRecommendParam; +import com.binarywang.wxjava.store.bean.product.assistant.ProductBrandRecommendResponse; +import me.chanjar.weixin.common.error.WxErrorException; + +/** + * 微信小店商品辅助功能服务。 + */ +public interface WxStoreProductAssistantService { + + /** + * 发品前校验。 + * + * @param param 校验参数 + * @return 校验结果 + * @throws WxErrorException 异常 + */ + CategoryPreCheckResponse categoryPreCheck(CategoryPreCheckParam param) throws WxErrorException; + + /** + * 获取商品品牌推荐。 + * + * @param param 推荐参数 + * @return 推荐结果 + * @throws WxErrorException 异常 + */ + ProductBrandRecommendResponse getProductBrandRecommend(ProductBrandRecommendParam param) + throws WxErrorException; + + /** + * 获取站内外商品属性映射。 + * + * @param param 映射参数 + * @return 映射结果 + * @throws WxErrorException 异常 + */ + ExternalProductMappingResponse externalProductMapping(ExternalProductMappingParam param) + throws WxErrorException; + + /** + * 获取商品属性映射及推荐。 + * + * @param param 映射参数 + * @return 映射结果 + * @throws WxErrorException 异常 + */ + ExternalProductMappingNewResponse externalProductMappingNew(ExternalProductMappingNewParam param) + throws WxErrorException; + + /** + * 将定时开售商品改为立即开售。 + * + * @param param 开售参数 + * @return 操作结果 + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse beginTimingSale(BeginTimingSaleParam param) throws WxErrorException; + + /** + * 取消商品定时开售。 + * + * @param param 取消参数 + * @return 操作结果 + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse cancelTimingSale(CancelTimingSaleParam param) throws WxErrorException; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreProductService.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreProductService.java new file mode 100644 index 0000000000..f7e5422af5 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreProductService.java @@ -0,0 +1,480 @@ +package com.binarywang.wxjava.store.api; + + +import java.util.List; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; +import com.binarywang.wxjava.store.bean.limit.LimitTaskAddResponse; +import com.binarywang.wxjava.store.bean.limit.LimitTaskListResponse; +import com.binarywang.wxjava.store.bean.limit.LimitTaskParam; +import com.binarywang.wxjava.store.bean.product.GiftActivityAddResponse; +import com.binarywang.wxjava.store.bean.product.GiftActivityInfo; +import com.binarywang.wxjava.store.bean.product.GiftProductAddResponse; +import com.binarywang.wxjava.store.bean.product.GiftProductGetResponse; +import com.binarywang.wxjava.store.bean.product.GiftProductInfo; +import com.binarywang.wxjava.store.bean.product.GiftProductListParam; +import com.binarywang.wxjava.store.bean.product.GiftProductListResponse; +import com.binarywang.wxjava.store.bean.product.AddProductThirdPartySourceParam; +import com.binarywang.wxjava.store.bean.product.AddProductThirdPartySourceResponse; +import com.binarywang.wxjava.store.bean.product.ExternalProductMappingNewParam; +import com.binarywang.wxjava.store.bean.product.ExternalProductMappingNewResponse; +import com.binarywang.wxjava.store.bean.product.ExternalProductMappingParam; +import com.binarywang.wxjava.store.bean.product.ExternalProductMappingResponse; +import com.binarywang.wxjava.store.bean.product.ProductAuditQuotaResponse; +import com.binarywang.wxjava.store.bean.product.ProductAuditStrategyResponse; +import com.binarywang.wxjava.store.bean.product.ProductAuditStrategySetParam; +import com.binarywang.wxjava.store.bean.product.ProductBrandRecommendParam; +import com.binarywang.wxjava.store.bean.product.ProductBrandRecommendResponse; +import com.binarywang.wxjava.store.bean.product.ProductCategoryClassifyParam; +import com.binarywang.wxjava.store.bean.product.ProductCategoryClassifyResponse; +import com.binarywang.wxjava.store.bean.product.ProductCategoryPreCheckParam; +import com.binarywang.wxjava.store.bean.product.ProductCategoryPreCheckResponse; +import com.binarywang.wxjava.store.bean.product.ProductSchemeParam; +import com.binarywang.wxjava.store.bean.product.ProductSchemeResponse; +import com.binarywang.wxjava.store.bean.product.ProductStockFlowParam; +import com.binarywang.wxjava.store.bean.product.ProductStockFlowResponse; +import com.binarywang.wxjava.store.bean.product.ProductTimingSaleParam; +import com.binarywang.wxjava.store.bean.product.SkuStockBatchResponse; +import com.binarywang.wxjava.store.bean.product.SkuStockResponse; +import com.binarywang.wxjava.store.bean.product.SpuFastInfo; +import com.binarywang.wxjava.store.bean.product.SpuGetResponse; +import com.binarywang.wxjava.store.bean.product.SpuInfo; +import com.binarywang.wxjava.store.bean.product.SpuListResponse; +import com.binarywang.wxjava.store.bean.product.SpuUpdateInfo; +import com.binarywang.wxjava.store.bean.product.SpuUpdateResponse; +import com.binarywang.wxjava.store.bean.product.link.ProductH5UrlResponse; +import com.binarywang.wxjava.store.bean.product.link.ProductQrCodeResponse; +import com.binarywang.wxjava.store.bean.product.link.ProductTagLinkResponse; +import me.chanjar.weixin.common.error.WxErrorException; + +/** + * 微信小店 商品服务接口 + * + * @author Zeyes + * @see 商品状态流转图 + */ +public interface WxStoreProductService { + + /** + * 添加商品 + * + * @param info 商品信息 + * @return 返回商品的状态和id + * + * @throws WxErrorException 异常 + */ + SpuUpdateResponse addProduct(SpuUpdateInfo info) throws WxErrorException; + + /** + * 更新商品 + * + * @param info 商品信息 + * @return 返回商品的状态和id + * + * @throws WxErrorException 异常 + */ + SpuUpdateResponse updateProduct(SpuUpdateInfo info) throws WxErrorException; + + /** + * 添加商品 + * + * @param info 商品信息 + * @return 返回商品的状态和id + * + * @throws WxErrorException 异常 + * @deprecated 请使用 {@link #addProduct(SpuUpdateInfo)} + */ + @Deprecated + SpuUpdateResponse addProduct(SpuInfo info) throws WxErrorException; + + /** + * 更新商品 + * + * @param info 商品信息 + * @return 返回商品的状态和id + * + * @throws WxErrorException 异常 + * @deprecated 请使用 {@link #updateProduct(SpuUpdateInfo)} + */ + @Deprecated + SpuUpdateResponse updateProduct(SpuInfo info) throws WxErrorException; + + /** + * 免审更新商品 + * + * @param info 商品信息 + * @return 返回商品的状态和id + * + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse updateProductAuditFree(SpuFastInfo info) throws WxErrorException; + + /** + * 更新商品库存 (仅对edit_status != 2 的商品适用,其他状态的商品无法通过该接口修改库存) + * + * @param productId 内部商品ID + * @param skuId 内部sku_id + * @param diffType 修改类型 1增加 2减少 3设置 + * 建议使用1或2,不建议使用3,因为使用3在高并发场景可能会出现预期外表现 + * @param num 增加、减少或者设置的库存值 + * @return WxStoreBaseResponse + * + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse updateStock(String productId, String skuId, Integer diffType, Integer num) + throws WxErrorException; + + /** + * 删除商品 + * + * @param productId 商品ID + * @return 是否成功 + * + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse deleteProduct(String productId) throws WxErrorException; + + /** + * 撤回商品审核 + * + * @param productId 商品ID + * @return 是否成功 + * + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse cancelProductAudit(String productId) throws WxErrorException; + + /** + * 获取商品 + * + * @param productId 商品ID + * @param dataType 默认取1 1:获取线上数据 2:获取草稿数据 3:同时获取线上和草稿数据(注意:需成功上架后才有线上数据) + * @return 商品信息 + * + * @throws WxErrorException 异常 + */ + SpuGetResponse getProduct(String productId, Integer dataType) throws WxErrorException; + + /** + * 获取商品列表 + * + * @param pageSize 每页数量(默认10,不超过30) + * @param nextKey 由上次请求返回,记录翻页的上下文。传入时会从上次返回的结果往后翻一页,不传默认拉取第一页数据。 + * @param status 商品状态,不填默认拉全部商品(不包含回收站) {@link com.binarywang.wxjava.store.enums.SpuStatus} + * @return List + * + * @throws WxErrorException 异常 + */ + SpuListResponse listProduct(Integer pageSize, String nextKey, Integer status) throws WxErrorException; + + /** + * 上架商品 + * + * @param productId 商品ID + * @return 是否成功 + * + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse upProduct(String productId) throws WxErrorException; + + /** + * 下架商品 + * + * @param productId 商品ID + * @return 是否成功 + * + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse downProduct(String productId) throws WxErrorException; + + /** + * 获取商品实时库存 + * + * @param productId 商品ID + * @param skuId skuId + * @return SkuStockResponse + * + * @throws WxErrorException 异常 + */ + SkuStockResponse getSkuStock(String productId, String skuId) throws WxErrorException; + + /** + * 批量获取库存信息 (单次请求不能超过50个商品ID) + * + * @param productIds 商品ID列表 + * @return 库存信息 + * @throws WxErrorException 异常 + */ + SkuStockBatchResponse getSkuStockBatch(List productIds) throws WxErrorException; + + /** + * 获取商品H5链接 + * + * @param productId 商品ID + * @return 商品H5链接 + * @throws WxErrorException 异常 + */ + ProductH5UrlResponse getProductH5Url(String productId) throws WxErrorException; + + /** + * 获取商品二维码 + * + * @param productId 商品ID + * @return 商品二维码 + * @throws WxErrorException 异常 + */ + ProductQrCodeResponse getProductQrCode(String productId) throws WxErrorException; + + /** + * 获取商品口令 + * + * @param productId 商品ID + * @return 商品口令 + * @throws WxErrorException 异常 + */ + ProductTagLinkResponse getProductTagLink(String productId) throws WxErrorException; + + /** + * 获取商品的移动应用跳转 scheme 码. + * + * @param param 商品 ID、来源 appid、过期时间和附加信息 + * @return 商品跳转 scheme 码 + * @throws WxErrorException 调用微信接口失败 + */ + ProductSchemeResponse getProductScheme(ProductSchemeParam param) throws WxErrorException; + + /** + * 商品类目推荐. + * + * @param param 请求类型、商品标题、主图和可选类目 ID;当请求类型为 2 时必须提供类目 ID + * @return 推荐类目及店铺经营权限 + * @throws WxErrorException 调用微信接口失败 + */ + ProductCategoryClassifyResponse classifyProductCategory(ProductCategoryClassifyParam param) throws WxErrorException; + + /** + * 将定时开售商品改为立即开售. + * + * @param param 商品 ID 和定时开售任务 ID + * @return 操作结果 + * @throws WxErrorException 调用微信接口失败 + */ + WxStoreBaseResponse beginTimingSale(ProductTimingSaleParam param) throws WxErrorException; + + /** + * 取消商品开售. + * + * @param productId 商品 ID + * @return 操作结果 + * @throws WxErrorException 调用微信接口失败 + */ + WxStoreBaseResponse cancelTimingSale(String productId) throws WxErrorException; + + /** + * 查询站内外商品属性映射. + * + * @param param 叶子类目 ID、外部类目和外部属性 + * @return 对应的站内属性及可选属性值 + * @throws WxErrorException 调用微信接口失败 + */ + ExternalProductMappingResponse externalProductMapping(ExternalProductMappingParam param) throws WxErrorException; + + /** + * 发品前校验店铺类目资质. + * + * @param param 待发布商品的叶子类目 ID + * @return 校验结果和未通过原因 + * @throws WxErrorException 调用微信接口失败 + */ + ProductCategoryPreCheckResponse categoryPreCheck(ProductCategoryPreCheckParam param) throws WxErrorException; + + /** + * 获取店铺维度的商品上架策略. + * + * @return 当前上架策略 + * @throws WxErrorException 调用微信接口失败 + */ + ProductAuditStrategyResponse getProductAuditStrategy() throws WxErrorException; + + /** + * 设置店铺维度的商品上架策略. + * + * @param param 要设置的上架策略 + * @return 操作结果 + * @throws WxErrorException 调用微信接口失败 + */ + WxStoreBaseResponse setProductAuditStrategy(ProductAuditStrategySetParam param) throws WxErrorException; + + /** + * 获取当前店铺的商品提审限额. + * + * @return 提审总额度和新品剩余额度 + * @throws WxErrorException 调用微信接口失败 + */ + ProductAuditQuotaResponse getProductAuditQuota() throws WxErrorException; + + /** + * 商品属性映射及推荐. + * + * @param param 叶子类目、商品标题、主图及可选的外部属性 + * @return 推荐的站内属性 + * @throws WxErrorException 调用微信接口失败 + */ + ExternalProductMappingNewResponse externalProductMappingNew(ExternalProductMappingNewParam param) + throws WxErrorException; + + /** + * 根据商品信息推荐店铺已有资质的品牌. + * + * @param param 商品叶子类目、标题和图片 + * @return 推荐品牌 + * @throws WxErrorException 调用微信接口失败 + */ + ProductBrandRecommendResponse productBrandRecommend(ProductBrandRecommendParam param) throws WxErrorException; + + /** + * 新增第三方货源信息. + * + * @param param 场景、发布方式、货主及货源商品信息 + * @return 包含第三方货源 ID 的操作结果 + * @throws WxErrorException 调用微信接口失败 + */ + AddProductThirdPartySourceResponse addProductThirdPartySource(AddProductThirdPartySourceParam param) + throws WxErrorException; + + /** + * 获取商品库存流水. + * + * @param param 商品、SKU、库存类型、时间范围和分页参数;pageSize 必填,stockType 为 1 时 finderId 必填,库存类型非 0 和 1 时 stockTypeId 必填 + * @return 库存流水及下一页标识 + * @throws WxErrorException 调用微信接口失败 + */ + ProductStockFlowResponse getStockFlow(ProductStockFlowParam param) throws WxErrorException; + + /** + * 添加非卖商品 + * + * @param info 赠品信息 + * @return 添加赠品响应 + * @throws WxErrorException 异常 + */ + GiftProductAddResponse addGiftProduct(GiftProductInfo info) throws WxErrorException; + + /** + * 更新非卖商品 + * + * @param info 赠品信息 + * @return 操作响应 + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse updateGiftProduct(GiftProductInfo info) throws WxErrorException; + + /** + * 在售商品转赠品 + * + * @param productId 商品ID + * @return 操作响应 + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse setProductAsGift(String productId) throws WxErrorException; + + /** + * 获取赠品 + * + * @param productId 赠品商品ID + * @return 赠品详情响应 + * @throws WxErrorException 异常 + */ + GiftProductGetResponse getGiftProduct(String productId) throws WxErrorException; + + /** + * 获取赠品列表 + * + * @param param 查询参数 + * @return 赠品列表 + * @throws WxErrorException 异常 + */ + GiftProductListResponse listGiftProduct(GiftProductListParam param) throws WxErrorException; + + /** + * 更新赠品库存 + * + * @param productId 赠品商品ID + * @param skuId 赠品sku_id + * @param diffType 修改类型 1增加 2减少 3设置 + * 建议使用1或2,不建议使用3,因为使用3在高并发场景可能会出现预期外表现 + * @param num 增加、减少或者设置的库存值 + * @return 操作响应 + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse updateGiftStock(String productId, String skuId, Integer diffType, Integer num) + throws WxErrorException; + + /** + * 创建赠品活动 + * + * @param info 活动信息 + * @return 创建赠品活动响应 + * @throws WxErrorException 异常 + */ + GiftActivityAddResponse addGiftActivity(GiftActivityInfo info) throws WxErrorException; + + /** + * 删除赠品活动 + * + * @param activityId 活动ID + * @return 操作响应 + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse deleteGiftActivity(String activityId) throws WxErrorException; + + /** + * 停止赠品活动 + * + * @param activityId 活动ID + * @return 操作响应 + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse stopGiftActivity(String activityId) throws WxErrorException; + + /** + * 添加限时抢购任务 + * + * @param param 限时抢购任务 + * @return LimitTaskAddResponse + * + * @throws WxErrorException 异常 + */ + LimitTaskAddResponse addLimitTask(LimitTaskParam param) throws WxErrorException; + + /** + * 拉取限时抢购任务列表 + * + * @param pageSize 每页数量(默认10,不超过50) + * @param nextKey 由上次请求返回,记录翻页的上下文。传入时会从上次返回的结果往后翻一页,不传默认拉取第一页数据 + * @param status 抢购活动状态 + * @return LimitTaskListResponse + * + * @throws WxErrorException 异常 + */ + LimitTaskListResponse listLimitTask(Integer pageSize, String nextKey, Integer status) throws WxErrorException; + + /** + * 停止限时抢购任务 + * + * @param taskId 限时抢购任务ID + * @return BaseResponse + * + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse stopLimitTask(String taskId) throws WxErrorException; + + /** + * 停止限时抢购任务 + * + * @param taskId 限时抢购任务ID + * @return BaseResponse + * + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse deleteLimitTask(String taskId) throws WxErrorException; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreProductStockService.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreProductStockService.java new file mode 100644 index 0000000000..12a3911cad --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreProductStockService.java @@ -0,0 +1,56 @@ +package com.binarywang.wxjava.store.api; + +import java.util.List; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; +import com.binarywang.wxjava.store.bean.product.SkuStockBatchResponse; +import com.binarywang.wxjava.store.bean.product.SkuStockResponse; +import com.binarywang.wxjava.store.bean.product.stock.StockFlowParam; +import com.binarywang.wxjava.store.bean.product.stock.StockFlowResponse; +import me.chanjar.weixin.common.error.WxErrorException; + +/** + * 微信小店商品库存服务。 + */ +public interface WxStoreProductStockService { + + /** + * 更新商品库存。 + * + * @param productId 商品ID + * @param skuId 商品sku_id + * @param diffType 修改类型 1增加 2减少 3设置 + * @param num 增加、减少或者设置的库存值 + * @return 操作响应 + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse updateStock(String productId, String skuId, Integer diffType, Integer num) + throws WxErrorException; + + /** + * 获取商品实时库存。 + * + * @param productId 商品ID + * @param skuId 商品sku_id + * @return 库存响应 + * @throws WxErrorException 异常 + */ + SkuStockResponse getSkuStock(String productId, String skuId) throws WxErrorException; + + /** + * 批量获取库存信息。 + * + * @param productIds 商品ID列表,单次请求不超过50个 + * @return 库存信息 + * @throws WxErrorException 异常 + */ + SkuStockBatchResponse getSkuStockBatch(List productIds) throws WxErrorException; + + /** + * 获取商品库存流水。 + * + * @param param 库存流水查询参数 + * @return 库存流水响应 + * @throws WxErrorException 异常 + */ + StockFlowResponse getStockFlow(StockFlowParam param) throws WxErrorException; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreQicService.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreQicService.java new file mode 100644 index 0000000000..819d0488b8 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreQicService.java @@ -0,0 +1,67 @@ +package com.binarywang.wxjava.store.api; + +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; +import com.binarywang.wxjava.store.bean.qic.InspectCodeResponse; +import com.binarywang.wxjava.store.bean.qic.InspectConfigResponse; +import com.binarywang.wxjava.store.bean.qic.RegisterLogisticsRequest; +import com.binarywang.wxjava.store.bean.qic.SubmitConfigResponse; +import com.binarywang.wxjava.store.bean.qic.SubmitInspectRequest; +import me.chanjar.weixin.common.error.WxErrorException; + +/** + * 微信小店 质检管理接口. + */ +public interface WxStoreQicService { + + /** + * 查询质检仓配置. + * + * @return 质检仓配置 + * @throws WxErrorException 异常 + */ + InspectConfigResponse getInspectConfig() throws WxErrorException; + + /** + * 查询送检配置模板信息. + * + * @param orderId 订单号(可选) + * @return 送检配置模板信息 + * @throws WxErrorException 异常 + */ + SubmitConfigResponse getSubmitConfig(String orderId) throws WxErrorException; + + /** + * 查询送检配置模板信息. + * + * @return 送检配置模板信息 + * @throws WxErrorException 异常 + */ + SubmitConfigResponse getSubmitConfig() throws WxErrorException; + + /** + * 打印质检码. + * + * @param orderId 订单号 + * @return 质检码详情 + * @throws WxErrorException 异常 + */ + InspectCodeResponse printInspectCode(String orderId) throws WxErrorException; + + /** + * 绑定送检信息. + * + * @param request 送检信息请求 + * @return 基础响应 + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse submitInspectInfo(SubmitInspectRequest request) throws WxErrorException; + + /** + * 自寄快递送检. + * + * @param request 自寄快递请求 + * @return 基础响应 + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse registerLogistics(RegisterLogisticsRequest request) throws WxErrorException; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreService.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreService.java new file mode 100644 index 0000000000..7b88a9f6b6 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreService.java @@ -0,0 +1,204 @@ +package com.binarywang.wxjava.store.api; + +/** + * The interface Wx Store service + * + * @author Zeyes + */ +public interface WxStoreService extends BaseWxStoreService { + + /** + * 商家客服服务。 + * + * @return 商家客服服务 + */ + default WxStoreKfService getKfService() { + throw new UnsupportedOperationException("WxStoreService implementation does not support getKfService()"); + } + + /** + * 基础接口服务 + * + * @return 基础接口服务 + */ + WxStoreBasicService getBasicService(); + + /** + * 商品类目服务 + * + * @return 商品类目服务 + */ + WxStoreCategoryService getCategoryService(); + + /** + * 品牌服务 + * + * @return 品牌服务 + */ + WxStoreBrandService getBrandService(); + + /** + * 商品服务 + * + * @return 商品服务 + */ + WxStoreProductService getProductService(); + + /** + * 赠品与买赠活动服务 + * + * @return 赠品与买赠活动服务 + */ + default WxStoreGiftService getGiftService() { + throw new UnsupportedOperationException("Gift service is not supported by this implementation"); + } + + /** + * 限时抢购服务 + * + * @return 限时抢购服务 + */ + default WxStoreLimitedDiscountService getLimitedDiscountService() { + throw new UnsupportedOperationException("Limited discount service is not supported by this implementation"); + } + + /** + * 商品库存服务 + * + * @return 商品库存服务 + */ + default WxStoreProductStockService getProductStockService() { + throw new UnsupportedOperationException("Product stock service is not supported by this implementation"); + } + + /** + * 商品辅助功能服务 + * + * @return 商品辅助功能服务 + */ + default WxStoreProductAssistantService getProductAssistantService() { + throw new UnsupportedOperationException("Product assistant service is not supported by this implementation"); + } + + /** + * 仓库服务 + * + * @return 仓库服务 + */ + WxStoreWarehouseService getWarehouseService(); + + /** + * 订单服务 + * + * @return 订单服务 + */ + WxStoreOrderService getOrderService(); + + /** + * 售后服务 + * + * @return 售后服务 + */ + WxStoreAfterSaleService getAfterSaleService(); + + /** + * 运费模板服务 + * + * @return 运费模板服务 + */ + WxStoreFreightTemplateService getFreightTemplateService(); + + /** + * 地址服务 + * + * @return 地址服务 + */ + WxStoreAddressService getAddressService(); + + /** + * 优惠券服务 + * + * @return 优惠券服务 + */ + WxStoreCouponService getCouponService(); + + /** + * 分享员服务 + * + * @return 分享员服务 + */ + WxStoreSharerService getSharerService(); + + /** + * 资金服务 + * + * @return 资金服务 + */ + WxStoreFundService getFundService(); + + /** + * 主页管理服务 + * + * @return 主页管理服务 + */ + WxStoreHomePageService getHomePageService(); + + /** + * 合作账号服务 + * + * @return 团长合作服务 + */ + WxStoreCooperationService getCooperationService(); + + /** + * 微信小店 罗盘商家版服务 + * + * @return 罗盘商家版服务 + */ + WxStoreCompassShopService getCompassShopService(); + + /** + * 代发管理服务 + * + * @return 代发管理服务 + */ + WxStoreSupplierService getSupplierService(); + + /** + * 会员功能 + * + * @return 会员服务 + */ + WxStoreVipService getVipService(); + + /** + * 质检管理服务. + * + * @return 质检管理服务 + */ + WxStoreQicService getQicService(); + + /** + * 微信小店-带货助手服务 + * + * @return 带货助手服务 + */ + WxTalentService getTalentService(); + + /** + * 收藏管理服务 + * + * @return 收藏管理服务 + */ + WxStoreFavoriteService getFavoriteService(); + + /** + * 电子面单服务 + * + * @return 电子面单服务 + */ + default WxStoreEwaybillService getEwaybillService() { + throw new UnsupportedOperationException("当前 WxStoreService 实现不支持电子面单服务"); + } + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreSharerService.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreSharerService.java new file mode 100644 index 0000000000..a85c19b397 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreSharerService.java @@ -0,0 +1,71 @@ +package com.binarywang.wxjava.store.api; + +import java.util.List; +import com.binarywang.wxjava.store.bean.sharer.SharerBindResponse; +import com.binarywang.wxjava.store.bean.sharer.SharerInfoResponse; +import com.binarywang.wxjava.store.bean.sharer.SharerOrderParam; +import com.binarywang.wxjava.store.bean.sharer.SharerOrderResponse; +import com.binarywang.wxjava.store.bean.sharer.SharerSearchResponse; +import com.binarywang.wxjava.store.bean.sharer.SharerUnbindResponse; +import me.chanjar.weixin.common.error.WxErrorException; + +/** + * 微信小店 分享员服务接口 + * + * @author Zeyes + */ +public interface WxStoreSharerService { + + /** + * 邀请分享员 + * + * @param username 邀请的用户微信号 + * @return SharerBindResponse + * + * @throws WxErrorException 异常 + */ + SharerBindResponse bindSharer(String username) throws WxErrorException; + + /** + * 获取绑定的分享员 + * + * @param openid 分享员openid + * @param username 分享员微信号(二选一) + * @return SharerSearchResponse + * + * @throws WxErrorException 异常 + */ + SharerSearchResponse searchSharer(String openid, String username) throws WxErrorException; + + /** + * 获取绑定的分享员列表 + * + * @param page 分页参数,页数 + * @param pageSize 分页参数,每页分享员数(不超过100 + * @param sharerType 分享员类型 + * @return 分享员列表 + * + * @throws WxErrorException 异常 + */ + SharerInfoResponse listSharer(Integer page, Integer pageSize, Integer sharerType) throws WxErrorException; + + /** + * 获取分享员订单列表 + * + * @param param 参数 + * @return 列表 + * + * @throws WxErrorException 异常 + */ + SharerOrderResponse listSharerOrder(SharerOrderParam param) throws WxErrorException; + + /** + * 解绑分享员 + * + * @param openIds openid列表 + * @return 状态 + * + * @throws WxErrorException 异常 + */ + SharerUnbindResponse unbindSharer(List openIds) throws WxErrorException; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreSupplierService.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreSupplierService.java new file mode 100644 index 0000000000..ba37c6042d --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreSupplierService.java @@ -0,0 +1,70 @@ +package com.binarywang.wxjava.store.api; + +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; +import com.binarywang.wxjava.store.bean.supplier.DistributeTypeResponse; +import com.binarywang.wxjava.store.bean.supplier.DropshipAssignRequest; +import com.binarywang.wxjava.store.bean.supplier.DropshipDetailResponse; +import com.binarywang.wxjava.store.bean.supplier.DropshipListRequest; +import com.binarywang.wxjava.store.bean.supplier.DropshipListResponse; +import com.binarywang.wxjava.store.bean.supplier.DropshipResponse; +import com.binarywang.wxjava.store.bean.supplier.DropshipSearchRequest; +import com.binarywang.wxjava.store.bean.supplier.ProductDistributeRequest; +import com.binarywang.wxjava.store.bean.supplier.ProductListResponse; +import com.binarywang.wxjava.store.bean.supplier.SupplierInfoResponse; +import com.binarywang.wxjava.store.bean.supplier.SupplierListResponse; +import me.chanjar.weixin.common.error.WxErrorException; + +/** + * 微信小店代发管理服务。 + * + * @author GitHub Copilot + * @see 代发管理接口文档 + */ +public interface WxStoreSupplierService { + + /** 获取供货商列表。 */ + SupplierListResponse getSupplierList() throws WxErrorException; + + /** + * 获取供货商列表。 + * + * @param pageSize 每页数量 + * @param nextKey 由上次请求返回,记录翻页的上下文。传入时会从上次返回的结果往后翻一页 + * @return 供货商列表响应 + * @throws WxErrorException 异常 + */ + SupplierListResponse getSupplierList(Integer pageSize, String nextKey) throws WxErrorException; + + /** 获取分配方式。 */ + DistributeTypeResponse getDistribute() throws WxErrorException; + + /** 设置全店订单手动分配。 */ + WxStoreBaseResponse setManuallyDistribute() throws WxErrorException; + + /** 设置全店订单自动分配。 */ + WxStoreBaseResponse setAllDistribute(String supplierId) throws WxErrorException; + + /** 设置按商品自动分配。 */ + WxStoreBaseResponse setProductDistribute(ProductDistributeRequest req) throws WxErrorException; + + /** 获取商品对应的自动分配供货商。 */ + SupplierInfoResponse getProductDefaultDistribute(String productId) throws WxErrorException; + + /** 获取按商品自动分配的商品列表。 */ + ProductListResponse getProductList(String supplierId) throws WxErrorException; + + /** 分配订单代发。 */ + DropshipResponse assignOrder(DropshipAssignRequest req) throws WxErrorException; + + /** 取消分配代发单。 */ + WxStoreBaseResponse cancelDropship(String orderId) throws WxErrorException; + + /** 查询代发单详情。 */ + DropshipDetailResponse getDropship(String orderId) throws WxErrorException; + + /** 拉取代发单列表。 */ + DropshipListResponse listDropship(DropshipListRequest req) throws WxErrorException; + + /** 搜索代发单。 */ + DropshipListResponse searchDropship(DropshipSearchRequest req) throws WxErrorException; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreVipService.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreVipService.java new file mode 100644 index 0000000000..fbd231c401 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreVipService.java @@ -0,0 +1,97 @@ +package com.binarywang.wxjava.store.api; + +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; +import com.binarywang.wxjava.store.bean.vip.VipInfoResponse; +import com.binarywang.wxjava.store.bean.vip.VipListResponse; +import com.binarywang.wxjava.store.bean.vip.VipScoreResponse; +import me.chanjar.weixin.common.error.WxErrorException; + +/** + * 微信小店 会员功能接口 + * + * @author aushiye + * @link 会员功能接口文档 + */ +public interface WxStoreVipService { + /** 拉取用户详情 */ + // String VIP_USER_INFO_URL = "https://api.weixin.qq.com/channels/ec/vip/user/info/get"; + // /** 拉取用户列表 */ + // String VIP_USER_LIST_URL = "https://api.weixin.qq.com/channels/ec/vip/user/list/get"; + // + // /** 获取用户积分 */ + // String VIP_SCORE_URL = "https://api.weixin.qq.com/channels/ec/vip/user/score/get"; + // /** 增加用户积分 */ + // String SCORE_INCREASE_URL = "https://api.weixin.qq.com/channels/ec/vip/user/score/increase"; + // /** 减少用户积分 */ + // String SCORE_DECREASE_URL = "https://api.weixin.qq.com/channels/ec/vip/user/score/decrease"; + // + // /** 更新用户等级 */ + // String GRADE_UPDATE_URL = "https://api.weixin.qq.com/channels/ec/vip/user/grade/update"; + + + /** + * 获取用户详情 + * + * @param openId the open id + * @param needPhoneNumber the need phone number + * @return the vip info + * @throws WxErrorException the wx error exception + */ + VipInfoResponse getVipInfo(String openId, Boolean needPhoneNumber) throws WxErrorException; + + + /** + * 获取用户积分 + * + * @param needPhoneNumber the need phone number + * @param pageNum the page num + * @param pageSize the page size + * @return the vip list + * @throws WxErrorException the wx error exception + */ + VipListResponse getVipList(Boolean needPhoneNumber, Integer pageNum, Integer pageSize) throws WxErrorException; + + /** + * 获取用户积分 + * + * @param openId the open id + * @return the vip score + * @throws WxErrorException the wx error exception + */ + VipScoreResponse getVipScore(String openId) throws WxErrorException; + + /** + * 增加用户积分 + * + * @param openId the open id + * @param score the score + * @param remark the remark + * @param requestId the request id + * @return the wx channel base response + * @throws WxErrorException the wx error exception + */ + WxStoreBaseResponse increaseVipScore(String openId, String score, String remark, String requestId) throws WxErrorException; + + /** + * 减少用户积分 + * + * @param openId the open id + * @param score the score + * @param remark the remark + * @param requestId the request id + * @return the wx channel base response + * @throws WxErrorException the wx error exception + */ + WxStoreBaseResponse decreaseVipScore(String openId, String score, String remark, String requestId) throws WxErrorException; + + /** + * 更新用户等级 + * + * @param openId the open id + * @param score the score + * @return the wx channel base response + * @throws WxErrorException the wx error exception + */ + WxStoreBaseResponse updateVipGrade(String openId, Integer score) throws WxErrorException; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreWarehouseService.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreWarehouseService.java new file mode 100644 index 0000000000..85892b81af --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxStoreWarehouseService.java @@ -0,0 +1,137 @@ +package com.binarywang.wxjava.store.api; + + +import java.util.List; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; +import com.binarywang.wxjava.store.bean.warehouse.LocationPriorityResponse; +import com.binarywang.wxjava.store.bean.warehouse.PriorityLocationParam; +import com.binarywang.wxjava.store.bean.warehouse.WarehouseIdsResponse; +import com.binarywang.wxjava.store.bean.warehouse.WarehouseLocation; +import com.binarywang.wxjava.store.bean.warehouse.WarehouseParam; +import com.binarywang.wxjava.store.bean.warehouse.WarehouseResponse; +import com.binarywang.wxjava.store.bean.warehouse.WarehouseStockParam; +import com.binarywang.wxjava.store.bean.warehouse.WarehouseStockResponse; +import me.chanjar.weixin.common.error.WxErrorException; + + +/** + * 微信小店 区域仓库服务 + * + * @author Zeyes + */ +public interface WxStoreWarehouseService { + + /** + * 创建仓库 + * + * @param param 仓库信息 + * @return 响应 + * + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse createWarehouse(WarehouseParam param) throws WxErrorException; + + /** + * 查询仓库列表 + * + * @param pageSize 每页数量(最大不超过10) + * @param nextKey 由上次请求返回,记录翻页的上下文。传入时会从上次返回的结果往后翻一页,不传默认拉取第一页数据 + * @return 响应 + * + * @throws WxErrorException 异常 + */ + WarehouseIdsResponse listWarehouse(Integer pageSize, String nextKey) throws WxErrorException; + + /** + * 获取仓库详情 + * + * @param outWarehouseId 外部仓库ID + * @return 响应 + * + * @throws WxErrorException 异常 + */ + WarehouseResponse getWarehouse(String outWarehouseId) throws WxErrorException; + + /** + * 修改仓库详情 + * + * @param outWarehouseId 外部仓库ID + * @param name 仓库名称 + * @param intro 仓库介绍 + * @return 响应 + * + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse updateWarehouse(String outWarehouseId, String name, String intro) throws WxErrorException; + + /** + * 批量增加覆盖区域 + * + * @param outWarehouseId 外部仓库ID + * @param coverLocations 覆盖区域 + * @return 响应 + * + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse addWarehouseArea(String outWarehouseId, List coverLocations) + throws WxErrorException; + + /** + * 批量删除覆盖区域 + * + * @param outWarehouseId 外部仓库ID + * @param coverLocations 覆盖区域 + * @return 响应 + * + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse deleteWarehouseArea(String outWarehouseId, List coverLocations) + throws WxErrorException; + + /** + * 设置指定地址下的仓的优先级 + * + * @param param 参数 + * @return 响应 + * + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse setWarehousePriority(PriorityLocationParam param) throws WxErrorException; + + /** + * 获取指定地址下的仓的优先级 + * + * @param addressId1 省份地址编码 + * @param addressId2 市地址编码 + * @param addressId3 区地址编码 + * @param addressId4 街道地址编码 + * @return 仓的优先级 + * + * @throws WxErrorException 异常 + */ + LocationPriorityResponse getWarehousePriority(Integer addressId1, Integer addressId2, Integer addressId3, + Integer addressId4) throws WxErrorException; + + /** + * 更新区域仓库存数量 + * + * @param param 参数 + * @return 响应 + * + * @throws WxErrorException 异常 + */ + WxStoreBaseResponse updateWarehouseStock(WarehouseStockParam param) throws WxErrorException; + + /** + * 获取区域仓库存数量 + * + * @param productId 商品ID + * @param outWarehouseId 外部仓库ID + * @param skuId 商品skuId + * @return 响应 + * + * @throws WxErrorException 异常 + */ + WarehouseStockResponse getWarehouseStock(String productId, String skuId, String outWarehouseId) + throws WxErrorException; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxTalentService.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxTalentService.java new file mode 100644 index 0000000000..b947e0b53e --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/WxTalentService.java @@ -0,0 +1,56 @@ +package com.binarywang.wxjava.store.api; + +import com.binarywang.wxjava.store.bean.talent.TalentOrderDetailParam; +import com.binarywang.wxjava.store.bean.talent.TalentOrderDetailResponse; +import com.binarywang.wxjava.store.bean.talent.TalentOrderListParam; +import com.binarywang.wxjava.store.bean.talent.TalentOrderListResponse; +import com.binarywang.wxjava.store.bean.talent.TalentWindowProductDetailParam; +import com.binarywang.wxjava.store.bean.talent.TalentWindowProductDetailResponse; +import com.binarywang.wxjava.store.bean.talent.TalentWindowProductListParam; +import com.binarywang.wxjava.store.bean.talent.TalentWindowProductListResponse; +import me.chanjar.weixin.common.error.WxErrorException; + +/** + * 微信小店-带货助手服务接口 + * + * @author GitHub Copilot + */ +public interface WxTalentService { + + /** + * 获取佣金单列表 + * + * @param param 查询参数 + * @return 佣金单列表 + * @throws WxErrorException 接口调用异常 + */ + TalentOrderListResponse getOrderList(TalentOrderListParam param) throws WxErrorException; + + /** + * 获取佣金单详情 + * + * @param param 查询参数 + * @return 佣金单详情 + * @throws WxErrorException 接口调用异常 + */ + TalentOrderDetailResponse getOrderDetail(TalentOrderDetailParam param) throws WxErrorException; + + /** + * 获取达人橱窗商品列表 + * + * @param param 查询参数 + * @return 橱窗商品列表 + * @throws WxErrorException 接口调用异常 + */ + TalentWindowProductListResponse getWindowProductList(TalentWindowProductListParam param) throws WxErrorException; + + /** + * 获取达人橱窗商品详情 + * + * @param param 查询参数 + * @return 橱窗商品详情 + * @throws WxErrorException 接口调用异常 + */ + TalentWindowProductDetailResponse getWindowProductDetail(TalentWindowProductDetailParam param) + throws WxErrorException; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/BaseWxStoreMessageServiceImpl.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/BaseWxStoreMessageServiceImpl.java new file mode 100644 index 0000000000..1369a383e9 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/BaseWxStoreMessageServiceImpl.java @@ -0,0 +1,418 @@ +package com.binarywang.wxjava.store.api.impl; + +import java.util.Map; +import lombok.extern.slf4j.Slf4j; +import com.binarywang.wxjava.store.api.BaseWxStoreMessageService; +import com.binarywang.wxjava.store.api.WxStoreService; +import com.binarywang.wxjava.store.bean.message.after.AfterSaleMessage; +import com.binarywang.wxjava.store.bean.message.after.ComplaintMessage; +import com.binarywang.wxjava.store.bean.message.coupon.CouponActionMessage; +import com.binarywang.wxjava.store.bean.message.coupon.CouponReceiveMessage; +import com.binarywang.wxjava.store.bean.message.coupon.UserCouponExpireMessage; +import com.binarywang.wxjava.store.bean.message.fund.AccountNotifyMessage; +import com.binarywang.wxjava.store.bean.message.fund.QrNotifyMessage; +import com.binarywang.wxjava.store.bean.message.fund.WithdrawNotifyMessage; +import com.binarywang.wxjava.store.bean.message.order.OrderCancelMessage; +import com.binarywang.wxjava.store.bean.message.order.OrderConfirmMessage; +import com.binarywang.wxjava.store.bean.message.order.OrderDeliveryMessage; +import com.binarywang.wxjava.store.bean.message.order.OrderExtMessage; +import com.binarywang.wxjava.store.bean.message.order.OrderIdMessage; +import com.binarywang.wxjava.store.bean.message.order.OrderPayMessage; +import com.binarywang.wxjava.store.bean.message.order.OrderSettleMessage; +import com.binarywang.wxjava.store.bean.message.order.OrderStatusMessage; +import com.binarywang.wxjava.store.bean.message.product.BrandMessage; +import com.binarywang.wxjava.store.bean.message.product.CategoryAuditMessage; +import com.binarywang.wxjava.store.bean.message.product.SpuAuditMessage; +import com.binarywang.wxjava.store.bean.message.product.SpuStockMessage; +import com.binarywang.wxjava.store.bean.message.sharer.SharerChangeMessage; +import com.binarywang.wxjava.store.bean.message.store.CloseStoreMessage; +import com.binarywang.wxjava.store.bean.message.store.NicknameUpdateMessage; +import com.binarywang.wxjava.store.bean.message.supplier.SupplierItemMessage; +import com.binarywang.wxjava.store.bean.message.vip.ExchangeInfoMessage; +import com.binarywang.wxjava.store.bean.message.vip.UserInfoMessage; +import com.binarywang.wxjava.store.bean.message.voucher.VoucherMessage; +import com.binarywang.wxjava.store.message.WxStoreMessage; +import com.binarywang.wxjava.store.message.WxStoreMessageRouter; +import com.binarywang.wxjava.store.message.WxStoreMessageRouterRule; +import com.binarywang.wxjava.store.message.rule.HandlerConsumer; +import me.chanjar.weixin.common.session.WxSessionManager; + +import static com.binarywang.wxjava.store.constant.MessageEventConstants.*; + +/** + * @author Zeyes + */ +@Slf4j +public abstract class BaseWxStoreMessageServiceImpl implements BaseWxStoreMessageService { + + /** 消息路由器 */ + protected WxStoreMessageRouter router; + + public BaseWxStoreMessageServiceImpl(WxStoreMessageRouter router) { + this.router = router; + this.addDefaultRule(); + } + + /** + * 添加默认的回调规则 + */ + protected void addDefaultRule() { + /* 品牌资质事件回调 */ + this.addRule(BrandMessage.class, BRAND, this::brandUpdate); + /* 商品审核结果 */ + this.addRule(SpuAuditMessage.class, PRODUCT_SPU_AUDIT, this::spuAudit); + /* 商品上下架 */ + this.addRule(SpuAuditMessage.class, PRODUCT_SPU_STATUS_UPDATE, this::spuStatusUpdate); + /* 商品更新 */ + this.addRule(SpuAuditMessage.class, PRODUCT_SPU_UPDATE, this::spuUpdate); + /* 商品库存不足 */ + this.addRule(SpuStockMessage.class, PRODUCT_STOCK_NO_ENOUGH, this::stockNoEnough); + /* 类目审核结果 */ + this.addRule(CategoryAuditMessage.class, PRODUCT_CATEGORY_AUDIT, this::categoryAudit); + /* 订单下单 */ + this.addRule(OrderIdMessage.class, ORDER_NEW, this::orderNew); + /* 订单取消 */ + this.addRule(OrderCancelMessage.class, ORDER_CANCEL, this::orderCancel); + /* 订单支付成功 */ + this.addRule(OrderPayMessage.class, ORDER_PAY, this::orderPay); + /* 订单待发货 */ + this.addRule(OrderIdMessage.class, ORDER_WAIT_SHIPPING, this::orderWaitShipping); + /* 订单发货 */ + this.addRule(OrderDeliveryMessage.class, ORDER_DELIVER, this::orderDelivery); + /* 订单确认收货 */ + this.addRule(OrderConfirmMessage.class, ORDER_CONFIRM, this::orderConfirm); + /* 订单结算成功 */ + this.addRule(OrderSettleMessage.class, ORDER_SETTLE, this::orderSettle); + /* 订单其他信息更新 */ + this.addRule(OrderExtMessage.class, ORDER_EXT_INFO_UPDATE, this::orderExtInfoUpdate); + /* 订单状态更新 */ + this.addRule(OrderStatusMessage.class, ORDER_STATUS_UPDATE, this::orderStatusUpdate); + /* 售后单更新通知 */ + this.addRule(AfterSaleMessage.class, AFTER_SALE_UPDATE, this::afterSaleStatusUpdate); + /* 纠纷更新通知 */ + this.addRule(ComplaintMessage.class, COMPLAINT_NOTIFY, this::complaintNotify); + /* 优惠券领取通知 */ + this.addRule(CouponReceiveMessage.class, RECEIVE_COUPON, this::couponReceive); + /* 优惠券使用通知 */ + this.addRule(CouponActionMessage.class, CREATE_COUPON, this::couponCreate); + /* 优惠券删除通知 */ + this.addRule(CouponActionMessage.class, DELETE_COUPON, this::couponDelete); + /* 优惠券过期通知 */ + this.addRule(CouponActionMessage.class, EXPIRE_COUPON, this::couponExpire); + /* 更新优惠券信息通知 */ + this.addRule(CouponActionMessage.class, UPDATE_COUPON_INFO, this::couponUpdate); + /* 更新优惠券信息通知 */ + this.addRule(CouponActionMessage.class, INVALID_COUPON, this::couponInvalid); + /* 用户优惠券过期通知 */ + this.addRule(UserCouponExpireMessage.class, USER_COUPON_EXPIRE, this::userCouponExpire); + /* 用户优惠券过期通知 */ + this.addRule(UserCouponExpireMessage.class, USER_COUPON_UNUSE, this::userCouponUnuse); + /* 优惠券返还通知 */ + this.addRule(UserCouponExpireMessage.class, USER_COUPON_USE, this::userCouponUse); + /* 发放团购优惠成功通知 */ + this.addRule(VoucherMessage.class, VOUCHER_SEND_SUCC, this::voucherSendSucc); + /* 结算账户变更回调 */ + this.addRule(AccountNotifyMessage.class, ACCOUNT_NOTIFY, this::accountNotify); + /* 提现回调 */ + this.addRule(WithdrawNotifyMessage.class, WITHDRAW_NOTIFY, this::withdrawNotify); + /* 提现二维码回调 */ + this.addRule(QrNotifyMessage.class, QRCODE_STATUS, this::qrNotify); + /* 团长 */ + this.addRule(SupplierItemMessage.class, SUPPLIER_ITEM_UPDATE, this::supplierItemUpdate); + + /* 用户加入会员 */ + this.addRule(UserInfoMessage.class, USER_VIP_JOIN, false, this::vipJoin); + /* 用户注销会员 */ + this.addRule(UserInfoMessage.class, USER_VIP_CLOSE,false, this::vipClose); + /* 用户等级信息更新 */ + this.addRule(UserInfoMessage.class, USER_VIP_GRADE_INFO_UPDATE, false, this::vipGradeUpdate); + /* 用户积分更新 */ + this.addRule(UserInfoMessage.class, USER_VIP_SCORE_UPDATE, false, this::vipScoreUpdate); + /* 用户积分兑换 */ + this.addRule(ExchangeInfoMessage.class, USER_VIP_SCORE_EXCHANGE, false, this::vipScoreExchange); + + /* 分享员变更 */ + this.addRule(SharerChangeMessage.class,SHARER_CHANGE,false,this::sharerChange); + + /* 小店注销 */ + this.addRule(CloseStoreMessage.class, CLOSE_STORE, this::closeStore); + /* 小店修改名称 */ + this.addRule(NicknameUpdateMessage.class, SET_SHOP_NICKNAME, this::updateNickname); + } + + /** + * 添加一条规则进入路由器 + * + * @param clazz 消息类型 + * @param event 事件类型 + * @param consumer 处理器 + * @param 消息类型 + */ + protected void addRule(Class clazz, String event, Boolean async, + HandlerConsumer, WxSessionManager> consumer) { + WxStoreMessageRouterRule rule = new WxStoreMessageRouterRule<>(); + rule.setMessageClass(clazz).setEvent(event).setAsync(async); + rule.getHandlers().add((message, content, appId, context, sessionManager) -> { + consumer.accept(message, content, appId, context, sessionManager); + return "success"; + }); + rule.setNext(true); + this.addRule(rule); + } + + protected void addRule(Class clazz, String event, + HandlerConsumer, WxSessionManager> consumer) { + this.addRule(clazz, event, true, consumer); + } + + @Override + public void addRule(WxStoreMessageRouterRule rule) { + router.getRules().add(rule); + } + + @Override + public Object route(WxStoreMessage message, String content, String appId, final WxStoreService service) { + return router.route(message, content, appId, service); + } + + + @Override + public void orderNew(OrderIdMessage message, String content, String appId, + Map context, WxSessionManager sessionManager) { + log.info("订单下单, event={}", message.getEvent()); + } + + @Override + public void orderCancel(OrderCancelMessage message, String content, String appId, + Map context, WxSessionManager sessionManager) { + log.info("订单取消, event={}", message.getEvent()); + } + + @Override + public void orderPay(OrderPayMessage message, String content, String appId, + Map context, WxSessionManager sessionManager) { + log.info("订单支付成功, event={}", message.getEvent()); + } + + @Override + public void orderWaitShipping(OrderIdMessage message, String content, String appId, + Map context, WxSessionManager sessionManager) { + log.info("订单待发货, event={}", message.getEvent()); + } + + @Override + public void orderDelivery(OrderDeliveryMessage message, String content, String appId, + Map context, WxSessionManager sessionManager) { + log.info("订单发货, event={}", message.getEvent()); + } + + @Override + public void orderConfirm(OrderConfirmMessage message, String content, String appId, + Map context, WxSessionManager sessionManager) { + log.info("订单确认收货, event={}", message.getEvent()); + } + + @Override + public void orderSettle(OrderSettleMessage message, String content, String appId, + Map context, WxSessionManager sessionManager) { + log.info("订单结算, event={}", message.getEvent()); + } + + @Override + public void orderExtInfoUpdate(OrderExtMessage message, String content, String appId, + Map context, WxSessionManager sessionManager) { + log.info("订单其他信息更新, event={}", message.getEvent()); + } + + @Override + public void orderStatusUpdate(OrderStatusMessage message, String content, String appId, + Map context, WxSessionManager sessionManager) { + log.info("订单状态更新, event={}", message.getEvent()); + } + + @Override + public void spuAudit(SpuAuditMessage message, String content, String appId, + Map context, WxSessionManager sessionManager) { + log.info("商品审核, event={}", message.getEvent()); + } + + @Override + public void spuStatusUpdate(SpuAuditMessage message, String content, String appId, + Map context, WxSessionManager sessionManager) { + log.info("商品状态更新, event={}", message.getEvent()); + } + + @Override + public void spuUpdate(SpuAuditMessage message, String content, String appId, + Map context, WxSessionManager sessionManager) { + log.info("商品更新, event={}", message.getEvent()); + } + + @Override + public void stockNoEnough(SpuStockMessage message, String content, String appId, + Map context, WxSessionManager sessionManager) { + log.info("商品库存不足, event={}", message.getEvent()); + } + + @Override + public void categoryAudit(CategoryAuditMessage message, String content, String appId, + Map context, WxSessionManager sessionManager) { + log.info("分类审核, event={}", message.getEvent()); + } + + @Override + public void brandUpdate(BrandMessage message, String content, String appId, + Map context, WxSessionManager sessionManager) { + log.info("品牌更新, event={}", message.getEvent()); + } + + @Override + public void afterSaleStatusUpdate(AfterSaleMessage message, String content, String appId, + Map context, WxSessionManager sessionManager) { + log.info("售后状态更新, event={}", message.getEvent()); + } + + @Override + public void complaintNotify(ComplaintMessage message, String content, String appId, + Map context, WxSessionManager sessionManager) { + log.info("投诉通知, event={}", message.getEvent()); + } + + @Override + public void couponReceive(CouponReceiveMessage message, String content, String appId, + Map context, WxSessionManager sessionManager) { + log.info("优惠券领取, event={}", message.getEvent()); + } + + @Override + public void couponCreate(CouponActionMessage message, String content, String appId, + Map context, WxSessionManager sessionManager) { + log.info("优惠券创建, event={}", message.getEvent()); + } + + @Override + public void couponDelete(CouponActionMessage message, String content, String appId, + Map context, WxSessionManager sessionManager) { + log.info("优惠券删除, event={}", message.getEvent()); + } + + @Override + public void couponExpire(CouponActionMessage message, String content, String appId, + Map context, WxSessionManager sessionManager) { + log.info("优惠券过期, event={}", message.getEvent()); + } + + @Override + public void couponUpdate(CouponActionMessage message, String content, String appId, + Map context, WxSessionManager sessionManager) { + log.info("优惠券更新, event={}", message.getEvent()); + } + + @Override + public void couponInvalid(CouponActionMessage message, String content, String appId, + Map context, WxSessionManager sessionManager) { + log.info("优惠券失效, event={}", message.getEvent()); + } + + @Override + public void userCouponExpire(UserCouponExpireMessage message, String content, String appId, + Map context, WxSessionManager sessionManager) { + log.info("用户优惠券过期, event={}", message.getEvent()); + } + + @Override + public void userCouponUse(UserCouponExpireMessage message, String content, String appId, + Map context, WxSessionManager sessionManager) { + log.info("用户优惠券使用, event={}", message.getEvent()); + } + + @Override + public void userCouponUnuse(UserCouponExpireMessage message, String content, String appId, + Map context, WxSessionManager sessionManager) { + log.info("用户优惠券取消使用, event={}", message.getEvent()); + } + + @Override + public void voucherSendSucc(VoucherMessage message, String content, String appId, + Map context, WxSessionManager sessionManager) { + log.info("发放团购优惠成功, event={}", message.getEvent()); + } + + @Override + public void accountNotify(AccountNotifyMessage message, String content, String appId, + Map context, WxSessionManager sessionManager) { + log.info("账户通知, event={}", message.getEvent()); + } + + @Override + public void withdrawNotify(WithdrawNotifyMessage message, String content, String appId, + Map context, WxSessionManager sessionManager) { + log.info("提现通知, event={}", message.getEvent()); + } + + @Override + public void qrNotify(QrNotifyMessage message, String content, String appId, + Map context, WxSessionManager sessionManager) { + log.info("二维码通知, event={}", message.getEvent()); + } + + @Override + public void supplierItemUpdate(SupplierItemMessage message, String content, String appId, + Map context, WxSessionManager sessionManager) { + log.info("供应商商品更新, event={}", message.getEvent()); + } + + @Override + public Object defaultMessageHandler(WxStoreMessage message, String content, String appId, + Map context, WxSessionManager sessionManager) { + log.info("默认消息处理, event={}", message.getEvent()); + return null; + } + + @Override + public void sharerChange(WxStoreMessage message, String content, String appId, Map context, WxSessionManager sessionManager) { + log.info("分享员变更, event={}", message.getEvent()); + } + + @Override + public void vipJoin(UserInfoMessage message, String content, String appId, + Map context, WxSessionManager sessionManager) { + log.info("用户加入会员, event={}", message.getEvent()); + } + + @Override + public void vipClose(UserInfoMessage message, String content, String appId, + Map context, WxSessionManager sessionManager) { + log.info("用户注销会员, event={}", message.getEvent()); + } + + @Override + public void vipGradeUpdate(UserInfoMessage message, String content, String appId, + Map context, WxSessionManager sessionManager) { + log.info("用户等级信息更新, event={}", message.getEvent()); + } + + @Override + public void vipScoreUpdate(UserInfoMessage message, String content, String appId, + Map context, WxSessionManager sessionManager) { + log.info("用户积分更新, event={}", message.getEvent()); + } + + @Override + public void vipScoreExchange(ExchangeInfoMessage message, String content, String appId, + Map context, WxSessionManager sessionManager) { + log.info("用户积分兑换, event={}", message.getEvent()); + } + + @Override + public void closeStore(CloseStoreMessage message, String content, String appId, + Map context, WxSessionManager sessionManager) { + log.info("小店注销, event={}", message.getEvent()); + } + + @Override + public void updateNickname(NicknameUpdateMessage message, String content, String appId, + Map context, WxSessionManager sessionManager) { + log.info("小店修改名称, event={}", message.getEvent()); + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/BaseWxStoreServiceImpl.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/BaseWxStoreServiceImpl.java new file mode 100644 index 0000000000..90ada97f60 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/BaseWxStoreServiceImpl.java @@ -0,0 +1,478 @@ +package com.binarywang.wxjava.store.api.impl; + + +import com.google.gson.JsonObject; +import lombok.extern.slf4j.Slf4j; +import com.binarywang.wxjava.store.api.*; +import com.binarywang.wxjava.store.config.WxStoreConfig; +import com.binarywang.wxjava.store.util.JsonUtils; +import me.chanjar.weixin.common.api.WxConsts; +import me.chanjar.weixin.common.bean.CommonUploadParam; +import me.chanjar.weixin.common.bean.ToJson; +import me.chanjar.weixin.common.bean.WxAccessToken; +import me.chanjar.weixin.common.enums.WxType; +import me.chanjar.weixin.common.error.WxError; +import me.chanjar.weixin.common.error.WxErrorException; +import me.chanjar.weixin.common.error.WxRuntimeException; +import me.chanjar.weixin.common.executor.CommonUploadRequestExecutor; +import me.chanjar.weixin.common.util.DataUtils; +import me.chanjar.weixin.common.util.crypto.SHA1; +import me.chanjar.weixin.common.util.http.RequestExecutor; +import me.chanjar.weixin.common.util.http.RequestHttp; +import me.chanjar.weixin.common.util.http.SimpleGetRequestExecutor; +import me.chanjar.weixin.common.util.http.SimplePostRequestExecutor; +import org.apache.commons.lang3.StringUtils; + +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.locks.Lock; + +/** + * @author Zeyes + * @see #doGetAccessTokenRequest + */ +@Slf4j +public abstract class BaseWxStoreServiceImpl implements WxStoreService, RequestHttp { + + private final WxStoreBasicService basicService = new WxStoreBasicServiceImpl(this); + private final WxStoreCategoryService categoryService = new WxStoreCategoryServiceImpl(this); + private final WxStoreBrandService brandService = new WxStoreBrandServiceImpl(this); + private final WxStoreGiftService giftService = new WxStoreGiftServiceImpl(this); + private final WxStoreLimitedDiscountService limitedDiscountService = + new WxStoreLimitedDiscountServiceImpl(this); + private final WxStoreProductStockService productStockService = new WxStoreProductStockServiceImpl(this); + private final WxStoreProductAssistantService productAssistantService = + new WxStoreProductAssistantServiceImpl(this); + private final WxStoreProductService productService = new WxStoreProductServiceImpl( + this, giftService, limitedDiscountService, productStockService); + private final WxStoreWarehouseService warehouseService = new WxStoreWarehouseServiceImpl(this); + private final WxStoreOrderService orderService = new WxStoreOrderServiceImpl(this); + private final WxStoreAfterSaleService afterSaleService = new WxStoreAfterSaleServiceImpl(this); + private final WxStoreFreightTemplateService freightTemplateService = + new WxStoreFreightTemplateServiceImpl(this); + private final WxStoreAddressService addressService = new WxStoreAddressServiceImpl(this); + private final WxStoreCouponService couponService = new WxStoreCouponServiceImpl(this); + private final WxStoreSharerService sharerService = new WxStoreSharerServiceImpl(this); + private final WxStoreFundService fundService = new WxStoreFundServiceImpl(this); + private WxStoreHomePageService homePageService = null; + private WxStoreCooperationService cooperationService = null; + private WxStoreCompassShopService compassShopService = null; + private WxStoreSupplierService supplierService = null; + private WxStoreVipService vipService = null; + private WxStoreQicService qicService = null; + private WxTalentService talentService = null; + private WxStoreFavoriteService favoriteService = null; + private WxStoreEwaybillService ewaybillService = null; + private WxStoreKfService kfService = null; + + protected WxStoreConfig config; + private int retrySleepMillis = 1000; + private int maxRetryTimes = 5; + + @Override + public RequestHttp getRequestHttp() { + return this; + } + + @Override + public boolean checkSignature(String timestamp, String nonce, String signature) { + try { + return SHA1.gen(this.getConfig().getToken(), timestamp, nonce).equals(signature); + } catch (Exception e) { + log.error("Checking signature failed, and the reason is :{}", e.getMessage()); + return false; + } + } + + @Override + public String getAccessToken() throws WxErrorException { + return getAccessToken(false); + } + + @Override + public String getAccessToken(boolean forceRefresh) throws WxErrorException { + if (!forceRefresh && !this.getConfig().isAccessTokenExpired()) { + return this.getConfig().getAccessToken(); + } + + Lock lock = this.getConfig().getAccessTokenLock(); + boolean locked = false; + try { + do { + locked = lock.tryLock(100, TimeUnit.MILLISECONDS); + if (!forceRefresh && !this.getConfig().isAccessTokenExpired()) { + return this.getConfig().getAccessToken(); + } + } while (!locked); + String response; + if (getConfig().isStableAccessToken()) { + response = doGetStableAccessTokenRequest(forceRefresh); + } else { + response = doGetAccessTokenRequest(); + } + return extractAccessToken(response); + } catch (IOException | InterruptedException e) { + throw new WxRuntimeException(e); + } finally { + if (locked) { + lock.unlock(); + } + } + } + + /** + * 通过网络请求获取AccessToken + * + * @return AccessToken + * @throws IOException IOException + */ + protected abstract String doGetAccessTokenRequest() throws IOException; + + /** + * 通过网络请求获取稳定版AccessToken + * + * @return Stable AccessToken + * @throws IOException IOException + */ + protected abstract String doGetStableAccessTokenRequest(boolean forceRefresh) throws IOException; + + @Override + public String get(String url, String queryParam) throws WxErrorException { + return execute(SimpleGetRequestExecutor.create(this), url, queryParam); + } + + @Override + public String post(String url, String postData) throws WxErrorException { + return execute(SimplePostRequestExecutor.create(this), url, postData); + } + + @Override + public String post(String url, Object obj) throws WxErrorException { + // 此处用JsonUtils.encode, 不用Gson + return this.execute(SimplePostRequestExecutor.create(this), url, JsonUtils.encode(obj)); + } + + @Override + public String post(String url, ToJson obj) throws WxErrorException { + return this.post(url, obj.toJson()); + } + + @Override + public String upload(String url, CommonUploadParam param) throws WxErrorException { + RequestExecutor executor = CommonUploadRequestExecutor.create(getRequestHttp()); + return this.execute(executor, url, param); + } + + @Override + public String post(String url, JsonObject jsonObject) throws WxErrorException { + return this.post(url, jsonObject.toString()); + } + + /** + * 向微信端发送请求,在这里执行的策略是当发生access_token过期时才去刷新,然后重新执行请求,而不是全局定时请求 + */ + @Override + public T execute(RequestExecutor executor, String uri, E data) throws WxErrorException { + return execute0(executor, uri, data, true); + } + + @Override + public T executeWithoutLog(RequestExecutor executor, String uri, E data) throws WxErrorException { + return execute0(executor, uri, data, false); + } + + protected T execute0(RequestExecutor executor, String uri, E data, boolean printResult) + throws WxErrorException { + int retryTimes = 0; + do { + try { + return this.executeInternal(executor, uri, data, false, printResult); + } catch (WxErrorException e) { + if (retryTimes + 1 > this.maxRetryTimes) { + log.warn("重试达到最大次数【{}】", maxRetryTimes); + //最后一次重试失败后,直接抛出异常,不再等待 + throw new WxErrorException(WxError.builder() + .errorCode(e.getError().getErrorCode()) + .errorMsg("微信服务端异常,超出重试次数!") + .build()); + } + + WxError error = e.getError(); + // -1 系统繁忙, 1000ms后重试 + if (error.getErrorCode() == -1) { + int sleepMillis = this.retrySleepMillis * (1 << retryTimes); + try { + log.warn("微信系统繁忙,{} ms 后重试(第{}次)", sleepMillis, retryTimes + 1); + Thread.sleep(sleepMillis); + } catch (InterruptedException e1) { + Thread.currentThread().interrupt(); + } + } else { + throw e; + } + } + } while (retryTimes++ < this.maxRetryTimes); + + log.warn("重试达到最大次数【{}】", this.maxRetryTimes); + throw new WxRuntimeException("微信服务端异常,超出重试次数"); + } + + protected T executeInternal(RequestExecutor executor, String uri, E data, boolean doNotAutoRefreshToken, + boolean printResult) throws WxErrorException { + E dataForLog = DataUtils.handleDataWithSecret(data); + + if (uri.contains("access_token=")) { + throw new IllegalArgumentException("uri参数中不允许有access_token: " + uri); + } + String accessToken = getAccessToken(false); + + WxStoreConfig config = this.getConfig(); + if (StringUtils.isNotEmpty(config.getApiHostUrl())) { + uri = uri.replace("https://api.weixin.qq.com", config.getApiHostUrl()); + } + + String uriWithAccessToken = uri + (uri.contains("?") ? "&" : "?") + "access_token=" + accessToken; + + try { + T result = executor.execute(uriWithAccessToken, data, WxType.Channel); + log.debug("\n【请求地址】: {}\n【请求参数】:{}\n【响应数据】:{}", uri, + printResult ? dataForLog : "...", + printResult ? result : "..."); + return result; + } catch (WxErrorException e) { + WxError error = e.getError(); + if (WxConsts.ACCESS_TOKEN_ERROR_CODES.contains(error.getErrorCode())) { + // 强制设置WxMaConfig的access token过期了,这样在下一次请求里就会刷新access token + Lock lock = config.getAccessTokenLock(); + lock.lock(); + try { + if (StringUtils.equals(config.getAccessToken(), accessToken)) { + config.expireAccessToken(); + } + } catch (Exception ex) { + config.expireAccessToken(); + } finally { + lock.unlock(); + } + if (config.autoRefreshToken() && !doNotAutoRefreshToken) { + log.warn("即将重新获取新的access_token,错误代码:{},错误信息:{}", error.getErrorCode(), error.getErrorMsg()); + //下一次不再自动重试 + //当小程序误调用第三方平台专属接口时,第三方无法使用小程序的access token,如果可以继续自动获取token会导致无限循环重试,直到栈溢出 + return this.executeInternal(executor, uri, data, true, printResult); + } + } + + if (error.getErrorCode() != 0) { + log.warn("\n【请求地址】: {}\n【请求参数】:{}\n【错误信息】:{}", uri, + printResult ? dataForLog : "...", error); + throw new WxErrorException(error, e); + } + return null; + } catch (IOException e) { + log.warn("\n【请求地址】: {}\n【请求参数】:{}\n【异常信息】:{}", uri, + printResult ? dataForLog : "...", e.getMessage()); + throw new WxRuntimeException(e); + } + } + + /** + * 设置当前的AccessToken + * + * @param resultContent 响应内容 + * @return access token + * @throws WxErrorException 异常 + */ + protected String extractAccessToken(String resultContent) throws WxErrorException { + log.debug("access-token response received"); + WxStoreConfig config = this.getConfig(); + WxError error = WxError.fromJson(resultContent, WxType.Channel); + if (error.getErrorCode() != 0) { + throw new WxErrorException(error); + } + WxAccessToken accessToken = WxAccessToken.fromJson(resultContent); + config.updateAccessToken(accessToken.getAccessToken(), accessToken.getExpiresIn()); + return accessToken.getAccessToken(); + } + + @Override + public WxStoreConfig getConfig() { + return config; + } + + @Override + public void setConfig(WxStoreConfig config) { + this.config = config; + initHttp(); + } + + @Override + public void setRetrySleepMillis(int retrySleepMillis) { + this.retrySleepMillis = retrySleepMillis; + } + + @Override + public void setMaxRetryTimes(int maxRetryTimes) { + this.maxRetryTimes = maxRetryTimes; + } + + @Override + public WxStoreBasicService getBasicService() { + return basicService; + } + + @Override + public WxStoreCategoryService getCategoryService() { + return categoryService; + } + + @Override + public WxStoreBrandService getBrandService() { + return brandService; + } + + @Override + public WxStoreProductService getProductService() { + return productService; + } + + @Override + public WxStoreGiftService getGiftService() { + return giftService; + } + + @Override + public WxStoreLimitedDiscountService getLimitedDiscountService() { + return limitedDiscountService; + } + + @Override + public WxStoreProductStockService getProductStockService() { + return productStockService; + } + + @Override + public WxStoreProductAssistantService getProductAssistantService() { + return productAssistantService; + } + + @Override + public WxStoreWarehouseService getWarehouseService() { + return warehouseService; + } + + @Override + public WxStoreOrderService getOrderService() { + return orderService; + } + + @Override + public WxStoreAfterSaleService getAfterSaleService() { + return afterSaleService; + } + + @Override + public WxStoreFreightTemplateService getFreightTemplateService() { + return freightTemplateService; + } + + @Override + public WxStoreAddressService getAddressService() { + return addressService; + } + + @Override + public WxStoreCouponService getCouponService() { + return couponService; + } + + @Override + public WxStoreSharerService getSharerService() { + return sharerService; + } + + @Override + public WxStoreFundService getFundService() { + return fundService; + } + + @Override + public synchronized WxStoreHomePageService getHomePageService() { + if (homePageService == null) { + homePageService = new WxStoreHomePageServiceImpl(this); + } + return homePageService; + } + + @Override + public synchronized WxStoreCooperationService getCooperationService() { + if (cooperationService == null) { + cooperationService = new WxStoreCooperationServiceImpl(this); + } + return cooperationService; + } + + @Override + public synchronized WxStoreCompassShopService getCompassShopService() { + if (compassShopService == null) { + compassShopService = new WxStoreCompassShopServiceImpl(this); + } + return compassShopService; + } + + @Override + public synchronized WxStoreSupplierService getSupplierService() { + if (supplierService == null) { + supplierService = new WxStoreSupplierServiceImpl(this); + } + return supplierService; + } + + @Override + public synchronized WxStoreVipService getVipService() { + if (vipService == null) { + vipService = new WxStoreVipServiceImpl(this); + } + return vipService; + } + + @Override + public synchronized WxStoreQicService getQicService() { + if (qicService == null) { + qicService = new WxStoreQicServiceImpl(this); + } + return qicService; + } + + @Override + public synchronized WxTalentService getTalentService() { + if (talentService == null) { + talentService = new WxTalentServiceImpl(this); + } + return talentService; + } + + @Override + public synchronized WxStoreFavoriteService getFavoriteService() { + if (favoriteService == null) { + favoriteService = new WxStoreFavoriteServiceImpl(this); + } + return favoriteService; + } + + @Override + public synchronized WxStoreEwaybillService getEwaybillService() { + if (ewaybillService == null) { + ewaybillService = new WxStoreEwaybillServiceImpl(this); + } + return ewaybillService; + } + + @Override + public synchronized WxStoreKfService getKfService() { + if (kfService == null) { + kfService = new WxStoreKfServiceImpl(this); + } + return kfService; + } + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreAddressServiceImpl.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreAddressServiceImpl.java new file mode 100644 index 0000000000..0676939242 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreAddressServiceImpl.java @@ -0,0 +1,72 @@ +package com.binarywang.wxjava.store.api.impl; + + +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Address.ADD_ADDRESS_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Address.DELETE_ADDRESS_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Address.GET_ADDRESS_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Address.LIST_ADDRESS_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Address.UPDATE_ADDRESS_URL; + +import lombok.extern.slf4j.Slf4j; +import com.binarywang.wxjava.store.api.WxStoreAddressService; +import com.binarywang.wxjava.store.bean.address.AddressAddParam; +import com.binarywang.wxjava.store.bean.address.AddressDetail; +import com.binarywang.wxjava.store.bean.address.AddressIdParam; +import com.binarywang.wxjava.store.bean.address.AddressIdResponse; +import com.binarywang.wxjava.store.bean.address.AddressInfoResponse; +import com.binarywang.wxjava.store.bean.address.AddressListParam; +import com.binarywang.wxjava.store.bean.address.AddressListResponse; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; +import com.binarywang.wxjava.store.util.ResponseUtils; +import me.chanjar.weixin.common.error.WxErrorException; + +/** + * 微信小店 地址管理服务实现 + * + * @author Zeyes + */ +@Slf4j +public class WxStoreAddressServiceImpl implements WxStoreAddressService { + + /** 微信商店服务 */ + private final BaseWxStoreServiceImpl shopService; + + public WxStoreAddressServiceImpl(BaseWxStoreServiceImpl shopService) { + this.shopService = shopService; + } + + @Override + public AddressListResponse listAddress(Integer offset, Integer limit) throws WxErrorException { + AddressListParam param = new AddressListParam(offset, limit); + String resJson = shopService.post(LIST_ADDRESS_URL, param); + return ResponseUtils.decode(resJson, AddressListResponse.class); + } + + @Override + public AddressInfoResponse getAddress(String addressId) throws WxErrorException { + AddressIdParam param = new AddressIdParam(addressId); + String resJson = shopService.post(GET_ADDRESS_URL, param); + return ResponseUtils.decode(resJson, AddressInfoResponse.class); + } + + @Override + public AddressIdResponse addAddress(AddressDetail addressDetail) throws WxErrorException { + AddressAddParam param = new AddressAddParam(addressDetail); + String resJson = shopService.post(ADD_ADDRESS_URL, param); + return ResponseUtils.decode(resJson, AddressIdResponse.class); + } + + @Override + public WxStoreBaseResponse updateAddress(AddressDetail addressDetail) throws WxErrorException { + AddressAddParam param = new AddressAddParam(addressDetail); + String resJson = shopService.post(UPDATE_ADDRESS_URL, param); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public WxStoreBaseResponse deleteAddress(String addressId) throws WxErrorException { + AddressIdParam param = new AddressIdParam(addressId); + String resJson = shopService.post(DELETE_ADDRESS_URL, param); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreAfterSaleServiceImpl.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreAfterSaleServiceImpl.java new file mode 100644 index 0000000000..168f07f26c --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreAfterSaleServiceImpl.java @@ -0,0 +1,177 @@ +package com.binarywang.wxjava.store.api.impl; + +import lombok.extern.slf4j.Slf4j; +import com.binarywang.wxjava.store.api.WxStoreAfterSaleService; +import com.binarywang.wxjava.store.bean.after.*; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; +import com.binarywang.wxjava.store.bean.complaint.ComplaintOrderResponse; +import com.binarywang.wxjava.store.bean.complaint.ComplaintParam; +import com.binarywang.wxjava.store.util.ResponseUtils; +import me.chanjar.weixin.common.error.WxErrorException; + +import java.util.List; + +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.AfterSale.*; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Complaint.*; + +/** + * 微信小店 售后服务实现 + * + * @author Zeyes + */ +@Slf4j +public class WxStoreAfterSaleServiceImpl implements WxStoreAfterSaleService { + + /** + * 微信商店服务 + */ + private final BaseWxStoreServiceImpl shopService; + + public WxStoreAfterSaleServiceImpl(BaseWxStoreServiceImpl shopService) { + this.shopService = shopService; + } + + @Override + public AfterSaleListResponse listIds(Long beginCreateTime, Long endCreateTime, String nextKey) + throws WxErrorException { + AfterSaleListParam param = new AfterSaleListParam(beginCreateTime, endCreateTime, null, null, nextKey); + String resJson = shopService.post(AFTER_SALE_LIST_URL, param); + return ResponseUtils.decode(resJson, AfterSaleListResponse.class); + } + + @Override + public AfterSaleListResponse listIds(AfterSaleListParam param) throws WxErrorException { + String resJson = shopService.post(AFTER_SALE_LIST_URL, param); + return ResponseUtils.decode(resJson, AfterSaleListResponse.class); + } + + @Override + public AfterSaleInfoResponse get(String afterSaleOrderId) throws WxErrorException { + AfterSaleIdParam param = new AfterSaleIdParam(afterSaleOrderId); + String resJson = shopService.post(AFTER_SALE_GET_URL, param); + return ResponseUtils.decode(resJson, AfterSaleInfoResponse.class); + } + + @Override + public WxStoreBaseResponse accept(String afterSaleOrderId, String addressId, Integer acceptType) throws WxErrorException { + AfterSaleAcceptParam param = new AfterSaleAcceptParam(afterSaleOrderId, addressId, acceptType); + String resJson = shopService.post(AFTER_SALE_ACCEPT_URL, param); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public WxStoreBaseResponse reject(String afterSaleOrderId, String rejectReason, Integer rejectReasonType) throws WxErrorException { + return reject(afterSaleOrderId, rejectReason, rejectReasonType, null); + } + + @Override + public WxStoreBaseResponse reject(String afterSaleOrderId, String rejectReason, Integer rejectReasonType, + List rejectCertificates) throws WxErrorException { + AfterSaleRejectParam param = new AfterSaleRejectParam(afterSaleOrderId, rejectReason, rejectReasonType, rejectCertificates); + String resJson = shopService.post(AFTER_SALE_REJECT_URL, param); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public WxStoreBaseResponse uploadRefundEvidence(String afterSaleOrderId, String desc, List certificates) + throws WxErrorException { + RefundEvidenceParam param = new RefundEvidenceParam(afterSaleOrderId, desc, certificates); + String resJson = shopService.post(AFTER_SALE_UPLOAD_URL, param); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public WxStoreBaseResponse addComplaintMaterial(String complaintId, String content, List mediaIds) + throws WxErrorException { + ComplaintParam param = new ComplaintParam(complaintId, content, mediaIds); + String resJson = shopService.post(ADD_COMPLAINT_MATERIAL_URL, param); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + + } + + @Override + public WxStoreBaseResponse addComplaintEvidence(String complaintId, String content, List mediaIds) + throws WxErrorException { + ComplaintParam param = new ComplaintParam(complaintId, content, mediaIds); + String resJson = shopService.post(ADD_COMPLAINT_PROOF_URL, param); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public ComplaintOrderResponse getComplaint(String complaintId) throws WxErrorException { + String reqJson = "{\"complaint_id\":\"" + complaintId + "\"}"; + String resJson = shopService.post(GET_COMPLAINT_ORDER_URL, reqJson); + return ResponseUtils.decode(resJson, ComplaintOrderResponse.class); + } + + @Override + public AfterSaleReasonResponse getAllReason() throws WxErrorException { + String resJson = shopService.post(AFTER_SALE_REASON_GET_URL, "{}"); + return ResponseUtils.decode(resJson, AfterSaleReasonResponse.class); + } + + @Override + public AfterSaleRejectReasonResponse getRejectReason() throws WxErrorException { + String resJson = shopService.post(AFTER_SALE_REJECT_REASON_GET_URL, "{}"); + return ResponseUtils.decode(resJson, AfterSaleRejectReasonResponse.class); + } + + @Override + public WxStoreBaseResponse acceptExchangeReship(String afterSaleOrderId, String waybillId, String deliveryId) throws WxErrorException { + AfterSaleAcceptExchangeReshipParam param = new AfterSaleAcceptExchangeReshipParam(afterSaleOrderId, waybillId, deliveryId); + String resJson = shopService.post(AFTER_SALE_ACCEPT_EXCHANGE_RESHIP_URL, param); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public WxStoreBaseResponse rejectExchangeReship(String afterSaleOrderId, String rejectReason, Integer rejectReasonType, List rejectCertificates) throws WxErrorException { + AfterSaleRejectExchangeReshipParam param = new AfterSaleRejectExchangeReshipParam(afterSaleOrderId, rejectReason, rejectReasonType, rejectCertificates); + String resJson = shopService.post(AFTER_SALE_REJECT_EXCHANGE_RESHIP_URL, param); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public WxStoreBaseResponse merchantUpdateAfterSale(AfterSaleMerchantUpdateParam param) throws WxErrorException { + String resJson = shopService.post(AFTER_SALE_MERCHANT_UPDATE_URL, param); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public GuaranteeOrderListResponse listGuaranteeOrder(GuaranteeOrderListParam param) throws WxErrorException { + String resJson = shopService.post(GUARANTEE_ORDER_LIST_URL, param); + return ResponseUtils.decode(resJson, GuaranteeOrderListResponse.class); + } + + @Override + public GuaranteeOrderInfoResponse getGuaranteeOrder(String guaranteeOrderId) throws WxErrorException { + GuaranteeOrderIdParam param = new GuaranteeOrderIdParam(guaranteeOrderId); + String resJson = shopService.post(GUARANTEE_ORDER_GET_URL, param); + return ResponseUtils.decode(resJson, GuaranteeOrderInfoResponse.class); + } + + @Override + public WxStoreBaseResponse acceptGuarantee(String guaranteeOrderId) throws WxErrorException { + GuaranteeOrderIdParam param = new GuaranteeOrderIdParam(guaranteeOrderId); + String resJson = shopService.post(GUARANTEE_ORDER_ACCEPT_URL, param); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public WxStoreBaseResponse modifyGuarantee(GuaranteeModifyRequest request) throws WxErrorException { + String resJson = shopService.post(GUARANTEE_ORDER_MODIFY_URL, request); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public WxStoreBaseResponse proofGuarantee(GuaranteeProofRequest request) throws WxErrorException { + String resJson = shopService.post(GUARANTEE_ORDER_PROOF_URL, request); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public WxStoreBaseResponse refuseGuarantee(GuaranteeRefuseRequest request) throws WxErrorException { + String resJson = shopService.post(GUARANTEE_ORDER_REFUSE_URL, request); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreBasicServiceImpl.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreBasicServiceImpl.java new file mode 100644 index 0000000000..bfe6d29e0e --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreBasicServiceImpl.java @@ -0,0 +1,124 @@ +package com.binarywang.wxjava.store.api.impl; + +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Basics.GET_ADDRESS_CODE; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Basics.GET_IMG_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Basics.GET_SHOP_H5URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Basics.GET_SHOP_INFO; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Basics.GET_SHOP_QRCODE; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Basics.GET_SHOP_TAGLINK; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Basics.IMG_UPLOAD_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Basics.UPLOAD_QUALIFICATION_FILE; + +import java.io.File; +import java.io.IOException; +import lombok.extern.slf4j.Slf4j; +import com.binarywang.wxjava.store.api.WxStoreBasicService; +import com.binarywang.wxjava.store.bean.address.AddressCodeResponse; +import com.binarywang.wxjava.store.bean.image.StoreImageInfo; +import com.binarywang.wxjava.store.bean.image.StoreImageResponse; +import com.binarywang.wxjava.store.bean.image.QualificationFileResponse; +import com.binarywang.wxjava.store.bean.image.UploadImageResponse; +import com.binarywang.wxjava.store.bean.shop.ShopH5UrlResponse; +import com.binarywang.wxjava.store.bean.shop.ShopInfoResponse; +import com.binarywang.wxjava.store.bean.shop.ShopQrCodeResponse; +import com.binarywang.wxjava.store.bean.shop.ShopTagLinkResponse; +import com.binarywang.wxjava.store.executor.StoreFileUploadRequestExecutor; +import com.binarywang.wxjava.store.executor.StoreMediaDownloadRequestExecutor; +import com.binarywang.wxjava.store.util.ResponseUtils; +import me.chanjar.weixin.common.error.WxError; +import me.chanjar.weixin.common.error.WxErrorException; +import me.chanjar.weixin.common.util.http.RequestExecutor; + +/** + * @author Zeyes + */ +@Slf4j +public class WxStoreBasicServiceImpl implements WxStoreBasicService { + + /** 微信商店服务 */ + private final BaseWxStoreServiceImpl shopService; + + public WxStoreBasicServiceImpl(BaseWxStoreServiceImpl shopService) { + this.shopService = shopService; + } + + @Override + public ShopInfoResponse getShopInfo() throws WxErrorException { + String resJson = shopService.get(GET_SHOP_INFO, null); + return ResponseUtils.decode(resJson, ShopInfoResponse.class); + } + + @Override + public StoreImageInfo uploadImg(int respType, String imgUrl) throws WxErrorException { + String url = IMG_UPLOAD_URL + "?upload_type=1&resp_type=" + respType; + String reqJson = "{\"img_url\":\"" + imgUrl + "\"}"; + String resJson = shopService.post(url, reqJson); + UploadImageResponse response = ResponseUtils.decode(resJson, UploadImageResponse.class); + return response.getImgInfo(); + } + + @Override + public StoreImageInfo uploadImg(int respType, File file, int height, int width) throws WxErrorException { + String url = IMG_UPLOAD_URL + "?upload_type=0&resp_type=" + respType + "&height=" + height + "&width=" + width; + RequestExecutor executor = StoreFileUploadRequestExecutor.create(shopService); + String resJson = shopService.execute(executor, url, file); + UploadImageResponse response = ResponseUtils.decode(resJson, UploadImageResponse.class); + return response.getImgInfo(); + } + + @Override + public QualificationFileResponse uploadQualificationFile(File file) throws WxErrorException { + RequestExecutor executor = StoreFileUploadRequestExecutor.create(shopService); + String resJson = shopService.execute(executor, UPLOAD_QUALIFICATION_FILE, file); + return ResponseUtils.decode(resJson, QualificationFileResponse.class); + } + + @Override + public StoreImageResponse getImg(String mediaId) throws WxErrorException { + String appId = shopService.getConfig().getAppid(); + StoreImageResponse rs; + try { + String url = GET_IMG_URL + "?media_id=" + mediaId; + File tempDirectory = new File(System.getProperty("java.io.tmpdir"), "wxjava-store-" + appId); + if (!tempDirectory.exists() && !tempDirectory.mkdirs()) { + throw new IOException("无法创建临时目录: " + tempDirectory); + } + RequestExecutor executor = StoreMediaDownloadRequestExecutor.create(shopService, + tempDirectory); + rs = shopService.execute(executor, url, null); + } catch (IOException e) { + throw new WxErrorException(WxError.builder().errorMsg(e.getMessage()).build(), e); + } + if (rs == null) { + rs = ResponseUtils.internalError(StoreImageResponse.class); + } + return rs; + } + + @Override + public AddressCodeResponse getAddressCode(Integer code) throws WxErrorException { + String reqJson = "{\"addr_code\": " + code + "}"; + String resJson = shopService.post(GET_ADDRESS_CODE, reqJson); + return ResponseUtils.decode(resJson, AddressCodeResponse.class); + } + + @Override + public ShopH5UrlResponse getShopH5Url() throws WxErrorException { + String resJson = shopService.post(GET_SHOP_H5URL, "{}"); + return ResponseUtils.decode(resJson, ShopH5UrlResponse.class); + } + + @Override + public ShopQrCodeResponse getShopQrCode(int qrcodeType) throws WxErrorException { + String reqJson = "{\"qrcode_type\":" + qrcodeType + "}"; + String resJson = shopService.post(GET_SHOP_QRCODE, reqJson); + return ResponseUtils.decode(resJson, ShopQrCodeResponse.class); + } + + @Override + public ShopTagLinkResponse getShopTagLink() throws WxErrorException { + String resJson = shopService.post(GET_SHOP_TAGLINK, "{}"); + return ResponseUtils.decode(resJson, ShopTagLinkResponse.class); + } + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreBrandServiceImpl.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreBrandServiceImpl.java new file mode 100644 index 0000000000..a38aa49420 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreBrandServiceImpl.java @@ -0,0 +1,98 @@ +package com.binarywang.wxjava.store.api.impl; + + +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Brand.ADD_BRAND_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Brand.ALL_BRAND_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Brand.CANCEL_BRAND_AUDIT_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Brand.DELETE_BRAND_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Brand.GET_BRAND_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Brand.LIST_BRAND_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Brand.LIST_BRAND_VALID_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Brand.UPDATE_BRAND_URL; + +import lombok.extern.slf4j.Slf4j; +import com.binarywang.wxjava.store.api.WxStoreBrandService; +import com.binarywang.wxjava.store.bean.audit.AuditApplyResponse; +import com.binarywang.wxjava.store.bean.base.StreamPageParam; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; +import com.binarywang.wxjava.store.bean.brand.Brand; +import com.binarywang.wxjava.store.bean.brand.BrandApplyListResponse; +import com.binarywang.wxjava.store.bean.brand.BrandInfoResponse; +import com.binarywang.wxjava.store.bean.brand.BrandListResponse; +import com.binarywang.wxjava.store.bean.brand.BrandParam; +import com.binarywang.wxjava.store.bean.brand.BrandSearchParam; +import com.binarywang.wxjava.store.util.ResponseUtils; +import me.chanjar.weixin.common.error.WxErrorException; + +/** + * 微信小店 品牌服务实现 + * + * @author Zeyes + */ +@Slf4j +public class WxStoreBrandServiceImpl implements WxStoreBrandService { + + /** 微信商店服务 */ + private final BaseWxStoreServiceImpl shopService; + + public WxStoreBrandServiceImpl(BaseWxStoreServiceImpl shopService) { + this.shopService = shopService; + } + + @Override + public BrandListResponse listAllBrand(Integer pageSize, String nextKey) throws WxErrorException { + StreamPageParam param = new StreamPageParam(pageSize, nextKey); + String resJson = shopService.post(ALL_BRAND_URL, param); + return ResponseUtils.decode(resJson, BrandListResponse.class); + } + + @Override + public AuditApplyResponse addBrandApply(Brand brand) throws WxErrorException { + BrandParam param = new BrandParam(brand); + String resJson = shopService.post(ADD_BRAND_URL, param); + return ResponseUtils.decode(resJson, AuditApplyResponse.class); + } + + @Override + public AuditApplyResponse updateBrandApply(Brand brand) throws WxErrorException { + BrandParam param = new BrandParam(brand); + String resJson = shopService.post(UPDATE_BRAND_URL, param); + return ResponseUtils.decode(resJson, AuditApplyResponse.class); + } + + @Override + public WxStoreBaseResponse cancelBrandApply(String brandId, String auditId) throws WxErrorException { + String reqJson = "{\"brand_id\":\"" + brandId + "\",\"audit_id\":\"" + auditId + "\"}"; + String resJson = shopService.post(CANCEL_BRAND_AUDIT_URL, reqJson); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public WxStoreBaseResponse deleteBrandApply(String brandId) throws WxErrorException { + String reqJson = "{\"brand_id\":\"" + brandId + "\"}"; + String resJson = shopService.post(DELETE_BRAND_URL, reqJson); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public BrandInfoResponse getBrandApply(String brandId) throws WxErrorException { + String reqJson = "{\"brand_id\":\"" + brandId + "\"}"; + String resJson = shopService.post(GET_BRAND_URL, reqJson); + return ResponseUtils.decode(resJson, BrandInfoResponse.class); + } + + @Override + public BrandApplyListResponse listBrandApply(Integer pageSize, String nextKey, Integer status) + throws WxErrorException { + BrandSearchParam param = new BrandSearchParam(pageSize, nextKey, status); + String resJson = shopService.post(LIST_BRAND_URL, param); + return ResponseUtils.decode(resJson, BrandApplyListResponse.class); + } + + @Override + public BrandApplyListResponse listValidBrandApply(Integer pageSize, String nextKey) throws WxErrorException { + StreamPageParam param = new StreamPageParam(pageSize, nextKey); + String resJson = shopService.post(LIST_BRAND_VALID_URL, param); + return ResponseUtils.decode(resJson, BrandApplyListResponse.class); + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreCategoryServiceImpl.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreCategoryServiceImpl.java new file mode 100644 index 0000000000..5ff6c08dd1 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreCategoryServiceImpl.java @@ -0,0 +1,139 @@ +package com.binarywang.wxjava.store.api.impl; + +import java.util.Collections; +import java.util.List; +import lombok.extern.slf4j.Slf4j; +import com.binarywang.wxjava.store.api.WxStoreCategoryService; +import com.binarywang.wxjava.store.bean.audit.AuditApplyResponse; +import com.binarywang.wxjava.store.bean.audit.AuditResponse; +import com.binarywang.wxjava.store.bean.audit.CategoryAuditInfo; +import com.binarywang.wxjava.store.bean.audit.CategoryAuditRequest; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; +import com.binarywang.wxjava.store.bean.category.*; +import com.binarywang.wxjava.store.util.JsonUtils; +import com.binarywang.wxjava.store.util.ResponseUtils; +import me.chanjar.weixin.common.error.WxErrorException; +import me.chanjar.weixin.common.util.http.SimpleGetRequestExecutor; +import me.chanjar.weixin.common.util.http.SimplePostRequestExecutor; + +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Category.*; + +/** + * 微信小店 商品类目相关接口 + * + * @author Zeyes + */ +@Slf4j +public class WxStoreCategoryServiceImpl implements WxStoreCategoryService { + + /** 微信商店服务 */ + private final BaseWxStoreServiceImpl shopService; + + public WxStoreCategoryServiceImpl(BaseWxStoreServiceImpl shopService) { + this.shopService = shopService; + } + + @Override + public CategoryQualificationResponse listAllCategory() throws WxErrorException { + // 数据量太大了,不记录日志 + String resJson = (String) shopService.executeWithoutLog(SimpleGetRequestExecutor.create(shopService), + LIST_ALL_CATEGORY_URL, null); + return ResponseUtils.decode(resJson, CategoryQualificationResponse.class); + } + + public List listAvailableCategory(String parentId) throws WxErrorException { + Long pid = null; + try { + pid = Long.parseLong(parentId); + } catch (Throwable e) { + log.error("parentId必须为数字, {}", parentId, e); + return Collections.emptyList(); + } + String reqJson = "{\"f_cat_id\": " + pid + "}"; + String resJson = (String) shopService.executeWithoutLog(SimplePostRequestExecutor.create(shopService), + AVAILABLE_CATEGORY_URL, reqJson); + ShopCategoryResponse response = ResponseUtils.decode(resJson, ShopCategoryResponse.class); + return response.getCategories(); + } + + @Override + public ShopCategoryResponse listAvailableCategories(String fCatId) throws WxErrorException { + String reqJson = "{\"f_cat_id\": " + fCatId + "}"; + String resJson = (String) shopService.executeWithoutLog(SimplePostRequestExecutor.create(shopService), + AVAILABLE_CATEGORY_URL, reqJson); + return ResponseUtils.decode(resJson, ShopCategoryResponse.class); + } + + @Override + public CategoryDetailResult getCategoryDetail(String id) throws WxErrorException { + Long catId = null; + try { + catId = Long.parseLong(id); + } catch (Throwable e) { + log.error("id必须为数字, {}", id, e); + return ResponseUtils.internalError(CategoryDetailResult.class); + } + String reqJson = "{\"cat_id\": " + catId + "}"; + String resJson = (String) shopService.executeWithoutLog(SimplePostRequestExecutor.create(shopService), + GET_CATEGORY_DETAIL_URL, reqJson); + return ResponseUtils.decode(resJson, CategoryDetailResult.class); + } + + @Override + public AuditApplyResponse addCategory(String level1, String level2, String level3, List certificate) + throws WxErrorException { + String reqJson = null; + try { + Long l1 = Long.parseLong(level1); + Long l2 = Long.parseLong(level2); + Long l3 = Long.parseLong(level3); + CategoryAuditInfo categoryInfo = new CategoryAuditInfo(); + categoryInfo.setLevel1(l1); + categoryInfo.setLevel2(l2); + categoryInfo.setLevel3(l3); + categoryInfo.setCertificates(certificate); + reqJson = JsonUtils.encode(new CategoryAuditRequest(categoryInfo)); + } catch (Throwable e) { + log.error("微信请求异常", e); + } + String resJson = shopService.post(ADD_CATEGORY_URL, reqJson); + return ResponseUtils.decode(resJson, AuditApplyResponse.class); + } + + @Override + public AuditApplyResponse addCategory(CategoryAuditInfo info) throws WxErrorException { + String reqJson = JsonUtils.encode(new CategoryAuditRequest(info)); + String resJson = shopService.post(ADD_CATEGORY_URL, reqJson); + return ResponseUtils.decode(resJson, AuditApplyResponse.class); + } + + @Override + public WxStoreBaseResponse cancelCategoryAudit(String auditId) throws WxErrorException { + String resJson = shopService.post(CANCEL_CATEGORY_AUDIT_URL, "{\"audit_id\": \"" + auditId + "\"}"); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public AuditResponse getAudit(String auditId) throws WxErrorException { + String resJson = shopService.post(GET_CATEGORY_AUDIT_URL, "{\"audit_id\": \"" + auditId + "\"}"); + return ResponseUtils.decode(resJson, AuditResponse.class); + } + + @Override + public PassCategoryResponse listPassCategory() throws WxErrorException { + String resJson = shopService.get(LIST_PASS_CATEGORY_URL, null); + return ResponseUtils.decode(resJson, PassCategoryResponse.class); + } + + @Override + public RelationCategoryResponse listRelationCategory(Boolean isFilterStatus, Integer status) throws WxErrorException { + RelationCategoryRequest request = new RelationCategoryRequest( + isFilterStatus != null ? isFilterStatus : false, + status != null ? status : 0 + ); + String reqJson = JsonUtils.encode(request); + String resJson = shopService.post(LIST_RELATION_CATEGORY_URL, reqJson); + return ResponseUtils.decode(resJson, RelationCategoryResponse.class); + } + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreCompassShopServiceImpl.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreCompassShopServiceImpl.java new file mode 100644 index 0000000000..140ebe90b7 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreCompassShopServiceImpl.java @@ -0,0 +1,116 @@ +package com.binarywang.wxjava.store.api.impl; + +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.CompassShop.FINDER_AUTH_LIST_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.CompassShop.FINDER_LIST_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.CompassShop.GET_FINDER_OVERALL_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.CompassShop.GET_FINDER_PRODUCT_LIST_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.CompassShop.GET_FINDER_PRODUCT_OVERALL_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.CompassShop.GET_LIVE_LIST_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.CompassShop.GET_SHOP_OVERALL_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.CompassShop.GET_SHOP_PRODUCT_DATA_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.CompassShop.GET_SHOP_PRODUCT_LIST_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.CompassShop.GET_SHOP_SALE_PROFILE_DATA_URL; + +import lombok.extern.slf4j.Slf4j; +import com.binarywang.wxjava.store.api.WxStoreCompassShopService; +import com.binarywang.wxjava.store.bean.compass.CompassFinderBaseParam; +import com.binarywang.wxjava.store.bean.compass.shop.CompassFinderIdParam; +import com.binarywang.wxjava.store.bean.compass.shop.FinderAuthListResponse; +import com.binarywang.wxjava.store.bean.compass.shop.FinderListResponse; +import com.binarywang.wxjava.store.bean.compass.shop.FinderOverallResponse; +import com.binarywang.wxjava.store.bean.compass.shop.FinderProductListResponse; +import com.binarywang.wxjava.store.bean.compass.shop.FinderProductOverallResponse; +import com.binarywang.wxjava.store.bean.compass.shop.ShopLiveListResponse; +import com.binarywang.wxjava.store.bean.compass.shop.ShopOverallResponse; +import com.binarywang.wxjava.store.bean.compass.shop.ShopProductDataParam; +import com.binarywang.wxjava.store.bean.compass.shop.ShopProductDataResponse; +import com.binarywang.wxjava.store.bean.compass.shop.ShopProductListResponse; +import com.binarywang.wxjava.store.bean.compass.shop.ShopSaleProfileDataParam; +import com.binarywang.wxjava.store.bean.compass.shop.ShopSaleProfileDataResponse; +import com.binarywang.wxjava.store.util.ResponseUtils; +import me.chanjar.weixin.common.error.WxErrorException; + +/** + * 微信小店 罗盘商家版 服务实现 + * + * @author Zeyes + */ +@Slf4j +public class WxStoreCompassShopServiceImpl implements WxStoreCompassShopService { + + /** + * 微信商店服务 + */ + private final BaseWxStoreServiceImpl shopService; + + public WxStoreCompassShopServiceImpl(BaseWxStoreServiceImpl shopService) {this.shopService = shopService;} + + @Override + public ShopOverallResponse getShopOverall(String ds) throws WxErrorException { + CompassFinderBaseParam param = new CompassFinderBaseParam(ds); + String resJson = shopService.post(GET_SHOP_OVERALL_URL, param); + return ResponseUtils.decode(resJson, ShopOverallResponse.class); + } + + @Override + public FinderAuthListResponse getFinderAuthorizationList() throws WxErrorException { + String resJson = shopService.post(FINDER_AUTH_LIST_URL, "{}"); + return ResponseUtils.decode(resJson, FinderAuthListResponse.class); + } + + @Override + public FinderListResponse getFinderList(String ds) throws WxErrorException { + CompassFinderBaseParam param = new CompassFinderBaseParam(ds); + String resJson = shopService.post(FINDER_LIST_URL, param); + return ResponseUtils.decode(resJson, FinderListResponse.class); + } + + @Override + public FinderOverallResponse getFinderOverall(String ds) throws WxErrorException { + CompassFinderBaseParam param = new CompassFinderBaseParam(ds); + String resJson = shopService.post(GET_FINDER_OVERALL_URL, param); + return ResponseUtils.decode(resJson, FinderOverallResponse.class); + } + + @Override + public FinderProductListResponse getFinderProductList(String ds, String finderId) throws WxErrorException { + CompassFinderIdParam param = new CompassFinderIdParam(ds, finderId); + String resJson = shopService.post(GET_FINDER_PRODUCT_LIST_URL, param); + return ResponseUtils.decode(resJson, FinderProductListResponse.class); + } + + @Override + public FinderProductOverallResponse getFinderProductOverall(String ds, String finderId) throws WxErrorException { + CompassFinderIdParam param = new CompassFinderIdParam(ds, finderId); + String resJson = shopService.post(GET_FINDER_PRODUCT_OVERALL_URL, param); + return ResponseUtils.decode(resJson, FinderProductOverallResponse.class); + } + + @Override + public ShopLiveListResponse getShopLiveList(String ds, String finderId) throws WxErrorException { + CompassFinderIdParam param = new CompassFinderIdParam(ds, finderId); + String resJson = shopService.post(GET_LIVE_LIST_URL, param); + return ResponseUtils.decode(resJson, ShopLiveListResponse.class); + } + + @Override + public ShopProductDataResponse getShopProductData(String ds, String productId) throws WxErrorException { + ShopProductDataParam param = new ShopProductDataParam(ds, productId); + String resJson = shopService.post(GET_SHOP_PRODUCT_DATA_URL, param); + return ResponseUtils.decode(resJson, ShopProductDataResponse.class); + } + + @Override + public ShopProductListResponse getShopProductList(String ds) throws WxErrorException { + CompassFinderBaseParam param = new CompassFinderBaseParam(ds); + String resJson = shopService.post(GET_SHOP_PRODUCT_LIST_URL, param); + return ResponseUtils.decode(resJson, ShopProductListResponse.class); + } + + @Override + public ShopSaleProfileDataResponse getShopSaleProfileData(String ds, Integer type) throws WxErrorException { + ShopSaleProfileDataParam param = new ShopSaleProfileDataParam(ds, type); + String resJson = shopService.post(GET_SHOP_SALE_PROFILE_DATA_URL, param); + return ResponseUtils.decode(resJson, ShopSaleProfileDataResponse.class); + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreCooperationServiceImpl.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreCooperationServiceImpl.java new file mode 100644 index 0000000000..2e83faba09 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreCooperationServiceImpl.java @@ -0,0 +1,68 @@ +package com.binarywang.wxjava.store.api.impl; + +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Cooperation.CANCEL_COOPERATION_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Cooperation.GENERATE_QRCODE_COOPERATION_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Cooperation.GET_COOPERATION_STATUS_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Cooperation.LIST_COOPERATION_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Cooperation.UNBIND_COOPERATION_URL; + +import lombok.extern.slf4j.Slf4j; +import com.binarywang.wxjava.store.api.WxStoreCooperationService; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; +import com.binarywang.wxjava.store.bean.cooperation.CooperationListResponse; +import com.binarywang.wxjava.store.bean.cooperation.CooperationQrCodeResponse; +import com.binarywang.wxjava.store.bean.cooperation.CooperationSharerParam; +import com.binarywang.wxjava.store.bean.cooperation.CooperationStatusResponse; +import com.binarywang.wxjava.store.util.ResponseUtils; +import me.chanjar.weixin.common.error.WxErrorException; + +/** + * 微信小店 合作账号相关接口 + * + * @author Zeyes + */ +@Slf4j +public class WxStoreCooperationServiceImpl implements WxStoreCooperationService { + + /** 微信小店服务 */ + private final BaseWxStoreServiceImpl storeService; + + public WxStoreCooperationServiceImpl(BaseWxStoreServiceImpl storeService) { + this.storeService = storeService; + } + + @Override + public CooperationListResponse listCooperation(Integer sharerType) throws WxErrorException { + String paramJson = "{\"sharer_type\":" + sharerType + "}"; + String resJson = storeService.post(LIST_COOPERATION_URL, paramJson); + return ResponseUtils.decode(resJson, CooperationListResponse.class); + } + + @Override + public CooperationStatusResponse getCooperationStatus(String sharerId, Integer sharerType) throws WxErrorException { + CooperationSharerParam param = new CooperationSharerParam(sharerId, sharerType); + String resJson = storeService.post(GET_COOPERATION_STATUS_URL, param); + return ResponseUtils.decode(resJson, CooperationStatusResponse.class); + } + + @Override + public CooperationQrCodeResponse generateQrCode(String sharerId, Integer sharerType) throws WxErrorException { + CooperationSharerParam param = new CooperationSharerParam(sharerId, sharerType); + String resJson = storeService.post(GENERATE_QRCODE_COOPERATION_URL, param); + return ResponseUtils.decode(resJson, CooperationQrCodeResponse.class); + } + + @Override + public WxStoreBaseResponse cancelInvitation(String sharerId, Integer sharerType) throws WxErrorException { + CooperationSharerParam param = new CooperationSharerParam(sharerId, sharerType); + String resJson = storeService.post(CANCEL_COOPERATION_URL, param); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public WxStoreBaseResponse unbind(String sharerId, Integer sharerType) throws WxErrorException { + CooperationSharerParam param = new CooperationSharerParam(sharerId, sharerType); + String resJson = storeService.post(UNBIND_COOPERATION_URL, param); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreCouponServiceImpl.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreCouponServiceImpl.java new file mode 100644 index 0000000000..825bcf17b8 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreCouponServiceImpl.java @@ -0,0 +1,88 @@ +package com.binarywang.wxjava.store.api.impl; + + +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Coupon.CREATE_COUPON_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Coupon.GET_COUPON_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Coupon.GET_USER_COUPON_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Coupon.LIST_COUPON_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Coupon.LIST_USER_COUPON_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Coupon.UPDATE_COUPON_STATUS_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Coupon.UPDATE_COUPON_URL; + +import lombok.extern.slf4j.Slf4j; +import com.binarywang.wxjava.store.api.WxStoreCouponService; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; +import com.binarywang.wxjava.store.bean.coupon.CouponIdInfo; +import com.binarywang.wxjava.store.bean.coupon.CouponIdResponse; +import com.binarywang.wxjava.store.bean.coupon.CouponInfoResponse; +import com.binarywang.wxjava.store.bean.coupon.CouponListParam; +import com.binarywang.wxjava.store.bean.coupon.CouponListResponse; +import com.binarywang.wxjava.store.bean.coupon.CouponParam; +import com.binarywang.wxjava.store.bean.coupon.CouponStatusParam; +import com.binarywang.wxjava.store.bean.coupon.UserCouponIdParam; +import com.binarywang.wxjava.store.bean.coupon.UserCouponListParam; +import com.binarywang.wxjava.store.bean.coupon.UserCouponListResponse; +import com.binarywang.wxjava.store.bean.coupon.UserCouponResponse; +import com.binarywang.wxjava.store.util.ResponseUtils; +import me.chanjar.weixin.common.error.WxErrorException; + +/** + * 微信小店 优惠券服务实现 + * + * @author Zeyes + */ +@Slf4j +public class WxStoreCouponServiceImpl implements WxStoreCouponService { + + /** 微信商店服务 */ + private final BaseWxStoreServiceImpl shopService; + + public WxStoreCouponServiceImpl(BaseWxStoreServiceImpl shopService) { + this.shopService = shopService; + } + + @Override + public CouponIdResponse createCoupon(CouponParam coupon) throws WxErrorException { + String resJson = shopService.post(CREATE_COUPON_URL, coupon); + return ResponseUtils.decode(resJson, CouponIdResponse.class); + } + + @Override + public CouponIdResponse updateCoupon(CouponParam coupon) throws WxErrorException { + String resJson = shopService.post(UPDATE_COUPON_URL, coupon); + return ResponseUtils.decode(resJson, CouponIdResponse.class); + } + + @Override + public WxStoreBaseResponse updateCouponStatus(String couponId, Integer status) throws WxErrorException { + CouponStatusParam param = new CouponStatusParam(couponId, status); + String resJson = shopService.post(UPDATE_COUPON_STATUS_URL, param); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public CouponInfoResponse getCoupon(String couponId) throws WxErrorException { + CouponIdInfo param = new CouponIdInfo(couponId); + String resJson = shopService.post(GET_COUPON_URL, param); + return ResponseUtils.decode(resJson, CouponInfoResponse.class); + } + + @Override + public CouponListResponse getCouponList(CouponListParam param) throws WxErrorException { + String resJson = shopService.post(LIST_COUPON_URL, param); + return ResponseUtils.decode(resJson, CouponListResponse.class); + } + + @Override + public UserCouponResponse getUserCoupon(String openId, String userCouponId) throws WxErrorException { + UserCouponIdParam param = new UserCouponIdParam(openId, userCouponId); + String resJson = shopService.post(GET_USER_COUPON_URL, param); + return ResponseUtils.decode(resJson, UserCouponResponse.class); + } + + @Override + public UserCouponListResponse getUserCouponList(UserCouponListParam param) throws WxErrorException { + String resJson = shopService.post(LIST_USER_COUPON_URL, param); + return ResponseUtils.decode(resJson, UserCouponListResponse.class); + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreEwaybillServiceImpl.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreEwaybillServiceImpl.java new file mode 100644 index 0000000000..ebbac97e6c --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreEwaybillServiceImpl.java @@ -0,0 +1,165 @@ +package com.binarywang.wxjava.store.api.impl; + +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Ewaybill.ADD_SUB_ORDER_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Ewaybill.BATCH_PRINT_ORDER_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Ewaybill.CANCEL_ORDER_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Ewaybill.CREATE_ORDER_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Ewaybill.CREATE_TEMPLATE_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Ewaybill.DELETE_TEMPLATE_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Ewaybill.GET_ACCOUNT_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Ewaybill.GET_DELIVERY_LIST_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Ewaybill.GET_ORDER_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Ewaybill.GET_PRINT_CONTENT_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Ewaybill.GET_TEMPLATE_BY_ID_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Ewaybill.GET_TEMPLATE_CONFIG_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Ewaybill.GET_TEMPLATE_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Ewaybill.PRE_CREATE_ORDER_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Ewaybill.PRINT_ORDER_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Ewaybill.UPDATE_TEMPLATE_URL; + +import java.util.List; +import com.binarywang.wxjava.store.api.WxStoreEwaybillService; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; +import com.binarywang.wxjava.store.bean.ewaybill.AccountInfoResponse; +import com.binarywang.wxjava.store.bean.ewaybill.AddSubOrderRequest; +import com.binarywang.wxjava.store.bean.ewaybill.CreateOrderRequest; +import com.binarywang.wxjava.store.bean.ewaybill.CreateOrderResponse; +import com.binarywang.wxjava.store.bean.ewaybill.DeliveryListResponse; +import com.binarywang.wxjava.store.bean.ewaybill.EwaybillOrderIdParam; +import com.binarywang.wxjava.store.bean.ewaybill.PrintOrderRequest; +import com.binarywang.wxjava.store.bean.ewaybill.BatchPrintOrderRequest; +import com.binarywang.wxjava.store.bean.ewaybill.OrderDetailResponse; +import com.binarywang.wxjava.store.bean.ewaybill.PreCreateRequest; +import com.binarywang.wxjava.store.bean.ewaybill.PreCreateResponse; +import com.binarywang.wxjava.store.bean.ewaybill.PrintContentResponse; +import com.binarywang.wxjava.store.bean.ewaybill.PrintContentParam; +import com.binarywang.wxjava.store.bean.ewaybill.TemplateCodeParam; +import com.binarywang.wxjava.store.bean.ewaybill.TemplateConfigResponse; +import com.binarywang.wxjava.store.bean.ewaybill.TemplateCreateRequest; +import com.binarywang.wxjava.store.bean.ewaybill.TemplateIdParam; +import com.binarywang.wxjava.store.bean.ewaybill.TemplateIdResponse; +import com.binarywang.wxjava.store.bean.ewaybill.TemplateInfoResponse; +import com.binarywang.wxjava.store.bean.ewaybill.TemplateUpdateRequest; +import com.binarywang.wxjava.store.bean.ewaybill.WaybillIdParam; +import com.binarywang.wxjava.store.bean.ewaybill.WaybillIdsParam; +import com.binarywang.wxjava.store.util.JsonUtils; +import com.binarywang.wxjava.store.util.ResponseUtils; +import me.chanjar.weixin.common.error.WxErrorException; +import me.chanjar.weixin.common.util.http.SimplePostRequestExecutor; + +/** + * 微信小店电子面单服务实现。 + * + * @author GitHub Copilot + */ +public class WxStoreEwaybillServiceImpl implements WxStoreEwaybillService { + + /** 微信商店服务 */ + private final BaseWxStoreServiceImpl shopService; + + public WxStoreEwaybillServiceImpl(BaseWxStoreServiceImpl shopService) { + this.shopService = shopService; + } + + @Override + public TemplateConfigResponse getTemplateConfig() throws WxErrorException { + String resJson = post(GET_TEMPLATE_CONFIG_URL, "{}"); + return ResponseUtils.decode(resJson, TemplateConfigResponse.class); + } + + @Override + public TemplateIdResponse createTemplate(TemplateCreateRequest req) throws WxErrorException { + String resJson = post(CREATE_TEMPLATE_URL, req); + return ResponseUtils.decode(resJson, TemplateIdResponse.class); + } + + @Override + public WxStoreBaseResponse deleteTemplate(String templateId) throws WxErrorException { + String resJson = post(DELETE_TEMPLATE_URL, new TemplateIdParam(templateId)); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public WxStoreBaseResponse updateTemplate(TemplateUpdateRequest req) throws WxErrorException { + String resJson = post(UPDATE_TEMPLATE_URL, req); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public TemplateInfoResponse getTemplate(String templateCode) throws WxErrorException { + String resJson = post(GET_TEMPLATE_URL, new TemplateCodeParam(templateCode)); + return ResponseUtils.decode(resJson, TemplateInfoResponse.class); + } + + @Override + public TemplateInfoResponse getTemplateById(String templateId) throws WxErrorException { + String resJson = post(GET_TEMPLATE_BY_ID_URL, new TemplateIdParam(templateId)); + return ResponseUtils.decode(resJson, TemplateInfoResponse.class); + } + + @Override + public AccountInfoResponse getAccount() throws WxErrorException { + String resJson = post(GET_ACCOUNT_URL, "{}"); + return ResponseUtils.decode(resJson, AccountInfoResponse.class); + } + + @Override + public DeliveryListResponse getDeliveryList() throws WxErrorException { + String resJson = post(GET_DELIVERY_LIST_URL, "{}"); + return ResponseUtils.decode(resJson, DeliveryListResponse.class); + } + + @Override + public PreCreateResponse preCreateOrder(PreCreateRequest req) throws WxErrorException { + String resJson = post(PRE_CREATE_ORDER_URL, req); + return ResponseUtils.decode(resJson, PreCreateResponse.class); + } + + @Override + public CreateOrderResponse createOrder(CreateOrderRequest req) throws WxErrorException { + String resJson = post(CREATE_ORDER_URL, req); + return ResponseUtils.decode(resJson, CreateOrderResponse.class); + } + + @Override + public WxStoreBaseResponse addSubOrder(AddSubOrderRequest req) throws WxErrorException { + String resJson = post(ADD_SUB_ORDER_URL, req); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public WxStoreBaseResponse cancelOrder(PrintOrderRequest req) throws WxErrorException { + String resJson = post(CANCEL_ORDER_URL, req); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public OrderDetailResponse getOrder(String ewaybillOrderId) throws WxErrorException { + String resJson = post(GET_ORDER_URL, new EwaybillOrderIdParam(ewaybillOrderId)); + return ResponseUtils.decode(resJson, OrderDetailResponse.class); + } + + @Override + public PrintContentResponse getPrintContent(String ewaybillOrderId, String templateId) + throws WxErrorException { + String resJson = post(GET_PRINT_CONTENT_URL, new PrintContentParam(ewaybillOrderId, templateId)); + return ResponseUtils.decode(resJson, PrintContentResponse.class); + } + + @Override + public WxStoreBaseResponse printOrder(PrintOrderRequest req) throws WxErrorException { + String resJson = post(PRINT_ORDER_URL, req); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public WxStoreBaseResponse batchPrintOrder(BatchPrintOrderRequest req) throws WxErrorException { + String resJson = post(BATCH_PRINT_ORDER_URL, req); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + private String post(String url, Object request) throws WxErrorException { + return shopService.executeWithoutLog( + SimplePostRequestExecutor.create(shopService), url, JsonUtils.encode(request)); + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreFavoriteServiceImpl.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreFavoriteServiceImpl.java new file mode 100644 index 0000000000..a9d8420176 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreFavoriteServiceImpl.java @@ -0,0 +1,29 @@ +package com.binarywang.wxjava.store.api.impl; + +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Favorite.GET_FAVORITE_COUNT; + +import com.binarywang.wxjava.store.api.WxStoreFavoriteService; +import com.binarywang.wxjava.store.bean.favorite.FavoriteCountResponse; +import com.binarywang.wxjava.store.util.ResponseUtils; +import me.chanjar.weixin.common.error.WxErrorException; + +/** + * 微信小店 收藏管理接口实现 + * + * @author GitHub Copilot + */ +public class WxStoreFavoriteServiceImpl implements WxStoreFavoriteService { + + /** 微信商店服务 */ + private final BaseWxStoreServiceImpl shopService; + + public WxStoreFavoriteServiceImpl(BaseWxStoreServiceImpl shopService) { + this.shopService = shopService; + } + + @Override + public FavoriteCountResponse getFavoriteCount() throws WxErrorException { + String resJson = shopService.post(GET_FAVORITE_COUNT, "{}"); + return ResponseUtils.decode(resJson, FavoriteCountResponse.class); + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreFreightTemplateServiceImpl.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreFreightTemplateServiceImpl.java new file mode 100644 index 0000000000..241d9697fc --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreFreightTemplateServiceImpl.java @@ -0,0 +1,61 @@ +package com.binarywang.wxjava.store.api.impl; + +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.FreightTemplate.ADD_TEMPLATE_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.FreightTemplate.GET_TEMPLATE_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.FreightTemplate.LIST_TEMPLATE_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.FreightTemplate.UPDATE_TEMPLATE_URL; + +import lombok.extern.slf4j.Slf4j; +import com.binarywang.wxjava.store.api.WxStoreFreightTemplateService; +import com.binarywang.wxjava.store.bean.freight.FreightTemplate; +import com.binarywang.wxjava.store.bean.freight.TemplateAddParam; +import com.binarywang.wxjava.store.bean.freight.TemplateIdResponse; +import com.binarywang.wxjava.store.bean.freight.TemplateInfoResponse; +import com.binarywang.wxjava.store.bean.freight.TemplateListParam; +import com.binarywang.wxjava.store.bean.freight.TemplateListResponse; +import com.binarywang.wxjava.store.util.ResponseUtils; +import me.chanjar.weixin.common.error.WxErrorException; + +/** + * 微信小店 运费模板服务实现 + * + * @author Zeyes + */ +@Slf4j +public class WxStoreFreightTemplateServiceImpl implements WxStoreFreightTemplateService { + /** 微信商店服务 */ + private final BaseWxStoreServiceImpl shopService; + + public WxStoreFreightTemplateServiceImpl(BaseWxStoreServiceImpl shopService) { + this.shopService = shopService; + } + + @Override + public TemplateListResponse listTemplate(Integer offset, Integer limit) throws WxErrorException { + TemplateListParam param = new TemplateListParam(offset, limit); + String resJson = shopService.post(LIST_TEMPLATE_URL, param); + return ResponseUtils.decode(resJson, TemplateListResponse.class); + + } + + @Override + public TemplateInfoResponse getTemplate(String templateId) throws WxErrorException { + String reqJson = "{\"template_id\": \"" + templateId + "\"}"; + String resJson = shopService.post(GET_TEMPLATE_URL, reqJson); + return ResponseUtils.decode(resJson, TemplateInfoResponse.class); + } + + @Override + public TemplateIdResponse addTemplate(FreightTemplate template) throws WxErrorException { + TemplateAddParam param = new TemplateAddParam(template); + String resJson = shopService.post(ADD_TEMPLATE_URL, param); + return ResponseUtils.decode(resJson, TemplateIdResponse.class); + } + + @Override + public TemplateIdResponse updateTemplate(FreightTemplate template) throws WxErrorException { + TemplateAddParam param = new TemplateAddParam(template); + String resJson = shopService.post(UPDATE_TEMPLATE_URL, param); + return ResponseUtils.decode(resJson, TemplateIdResponse.class); + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreFundServiceImpl.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreFundServiceImpl.java new file mode 100644 index 0000000000..567a20e7cf --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreFundServiceImpl.java @@ -0,0 +1,167 @@ +package com.binarywang.wxjava.store.api.impl; + + +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Fund.CHECK_QRCODE_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Fund.GET_BALANCE_FLOW_DETAIL_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Fund.GET_BALANCE_FLOW_LIST_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Fund.GET_BALANCE_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Fund.GET_BANK_ACCOUNT_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Fund.GET_BANK_BY_NUM_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Fund.GET_BANK_LIST_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Fund.GET_CITY_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Fund.GET_PROVINCE_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Fund.GET_QRCODE_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Fund.GET_SUB_BANK_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Fund.GET_WITHDRAW_DETAIL_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Fund.GET_WITHDRAW_LIST_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Fund.SET_BANK_ACCOUNT_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Fund.WITHDRAW_URL; + +import lombok.extern.slf4j.Slf4j; +import com.binarywang.wxjava.store.api.WxStoreFundService; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; +import com.binarywang.wxjava.store.bean.fund.AccountInfo; +import com.binarywang.wxjava.store.bean.fund.AccountInfoParam; +import com.binarywang.wxjava.store.bean.fund.AccountInfoResponse; +import com.binarywang.wxjava.store.bean.fund.BalanceInfoResponse; +import com.binarywang.wxjava.store.bean.fund.FlowListResponse; +import com.binarywang.wxjava.store.bean.fund.FundsFlowResponse; +import com.binarywang.wxjava.store.bean.fund.FundsListParam; +import com.binarywang.wxjava.store.bean.fund.WithdrawDetailResponse; +import com.binarywang.wxjava.store.bean.fund.WithdrawListParam; +import com.binarywang.wxjava.store.bean.fund.WithdrawListResponse; +import com.binarywang.wxjava.store.bean.fund.WithdrawSubmitParam; +import com.binarywang.wxjava.store.bean.fund.WithdrawSubmitResponse; +import com.binarywang.wxjava.store.bean.fund.bank.BankCityResponse; +import com.binarywang.wxjava.store.bean.fund.bank.BankInfoResponse; +import com.binarywang.wxjava.store.bean.fund.bank.BankListResponse; +import com.binarywang.wxjava.store.bean.fund.bank.BankProvinceResponse; +import com.binarywang.wxjava.store.bean.fund.bank.BankSearchParam; +import com.binarywang.wxjava.store.bean.fund.bank.BranchInfoResponse; +import com.binarywang.wxjava.store.bean.fund.bank.BranchSearchParam; +import com.binarywang.wxjava.store.bean.fund.qrcode.QrCheckResponse; +import com.binarywang.wxjava.store.bean.fund.qrcode.QrCodeResponse; +import com.binarywang.wxjava.store.util.ResponseUtils; +import me.chanjar.weixin.common.error.WxErrorException; + +/** + * 微信小店 资金服务实现 + * + * @author Zeyes + */ +@Slf4j +public class WxStoreFundServiceImpl implements WxStoreFundService { + + + /** 微信商店服务 */ + private final BaseWxStoreServiceImpl shopService; + + public WxStoreFundServiceImpl(BaseWxStoreServiceImpl shopService) { + this.shopService = shopService; + } + + @Override + public BalanceInfoResponse getBalance() throws WxErrorException { + String resJson = shopService.post(GET_BALANCE_URL, "{}"); + return ResponseUtils.decode(resJson, BalanceInfoResponse.class); + } + + @Override + public AccountInfoResponse getBankAccount() throws WxErrorException { + String resJson = shopService.post(GET_BANK_ACCOUNT_URL, "{}"); + return ResponseUtils.decode(resJson, AccountInfoResponse.class); + } + + @Override + public FundsFlowResponse getFundsFlowDetail(String flowId) throws WxErrorException { + String reqJson = "{\"flow_id\":\"" + flowId + "\"}"; + String resJson = shopService.post(GET_BALANCE_FLOW_DETAIL_URL, reqJson); + return ResponseUtils.decode(resJson, FundsFlowResponse.class); + } + + @Override + public FlowListResponse listFundsFlow(FundsListParam param) throws WxErrorException { + String resJson = shopService.post(GET_BALANCE_FLOW_LIST_URL, param); + return ResponseUtils.decode(resJson, FlowListResponse.class); + } + + @Override + public WithdrawDetailResponse getWithdrawDetail(String withdrawId) throws WxErrorException { + String reqJson = "{\"withdraw_id\":\"" + withdrawId + "\"}"; + String resJson = shopService.post(GET_WITHDRAW_DETAIL_URL, reqJson); + return ResponseUtils.decode(resJson, WithdrawDetailResponse.class); + } + + @Override + public WithdrawListResponse listWithdraw(Integer pageNum, Integer pageSize, Long startTime, Long endTime) + throws WxErrorException { + WithdrawListParam param = new WithdrawListParam(pageNum, pageSize, startTime, endTime); + String resJson = shopService.post(GET_WITHDRAW_LIST_URL, param); + return ResponseUtils.decode(resJson, WithdrawListResponse.class); + } + + @Override + public WxStoreBaseResponse setBankAccount(AccountInfo accountInfo) throws WxErrorException { + AccountInfoParam param = new AccountInfoParam(accountInfo); + String resJson = shopService.post(SET_BANK_ACCOUNT_URL, param); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public WithdrawSubmitResponse submitWithdraw(Integer amount, String remark, String bankMemo) + throws WxErrorException { + WithdrawSubmitParam param = new WithdrawSubmitParam(amount, remark, bankMemo); + String resJson = shopService.post(WITHDRAW_URL, param); + return ResponseUtils.decode(resJson, WithdrawSubmitResponse.class); + } + + @Override + public BankInfoResponse getBankInfoByCardNo(String accountNumber) throws WxErrorException { + String reqJson = "{\"account_number\":\"" + accountNumber + "\"}"; + String resJson = shopService.post(GET_BANK_BY_NUM_URL, reqJson); + return ResponseUtils.decode(resJson, BankInfoResponse.class); + } + + @Override + public BankListResponse searchBankList(Integer offset, Integer limit, String keywords, Integer bankType) + throws WxErrorException { + BankSearchParam param = new BankSearchParam(offset, limit, keywords, bankType); + String resJson = shopService.post(GET_BANK_LIST_URL, param); + return ResponseUtils.decode(resJson, BankListResponse.class); + } + + @Override + public BankCityResponse searchCityList(String provinceCode) throws WxErrorException { + String reqJson = "{\"province_code\":\"" + provinceCode + "\"}"; + String resJson = shopService.post(GET_CITY_URL, reqJson); + return ResponseUtils.decode(resJson, BankCityResponse.class); + } + + @Override + public BankProvinceResponse getProvinceList() throws WxErrorException { + String resJson = shopService.post(GET_PROVINCE_URL, "{}"); + return ResponseUtils.decode(resJson, BankProvinceResponse.class); + } + + @Override + public BranchInfoResponse searchBranchList(String bankCode, String cityCode, Integer offset, Integer limit) + throws WxErrorException { + BranchSearchParam param = new BranchSearchParam(bankCode, cityCode, offset, limit); + String resJson = shopService.post(GET_SUB_BANK_URL, param); + return ResponseUtils.decode(resJson, BranchInfoResponse.class); + } + + @Override + public QrCodeResponse getQrCode(String qrcodeTicket) throws WxErrorException { + String reqJson = "{\"qrcode_ticket\":\"" + qrcodeTicket + "\"}"; + String resJson = shopService.post(GET_QRCODE_URL, reqJson); + return ResponseUtils.decode(resJson, QrCodeResponse.class); + } + + @Override + public QrCheckResponse checkQrStatus(String qrcodeTicket) throws WxErrorException { + String reqJson = "{\"qrcode_ticket\":\"" + qrcodeTicket + "\"}"; + String resJson = shopService.post(CHECK_QRCODE_URL, reqJson); + return ResponseUtils.decode(resJson, QrCheckResponse.class); + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreGiftServiceImpl.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreGiftServiceImpl.java new file mode 100644 index 0000000000..6d552cac12 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreGiftServiceImpl.java @@ -0,0 +1,104 @@ +package com.binarywang.wxjava.store.api.impl; + +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.GIFT_ACTIVITY_ADD_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.GIFT_ACTIVITY_DELETE_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.GIFT_ACTIVITY_STOP_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.GIFT_PRODUCT_ADD_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.GIFT_PRODUCT_GET_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.GIFT_PRODUCT_LIST_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.GIFT_PRODUCT_ON_SALE_SET_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.GIFT_PRODUCT_STOCK_UPDATE_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.GIFT_PRODUCT_UPDATE_URL; + +import com.binarywang.wxjava.store.api.WxStoreGiftService; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; +import com.binarywang.wxjava.store.bean.product.GiftActivityAddParam; +import com.binarywang.wxjava.store.bean.product.GiftActivityAddResponse; +import com.binarywang.wxjava.store.bean.product.GiftActivityInfo; +import com.binarywang.wxjava.store.bean.product.GiftProductAddResponse; +import com.binarywang.wxjava.store.bean.product.GiftProductGetResponse; +import com.binarywang.wxjava.store.bean.product.GiftProductInfo; +import com.binarywang.wxjava.store.bean.product.GiftProductListParam; +import com.binarywang.wxjava.store.bean.product.GiftProductListResponse; +import com.binarywang.wxjava.store.bean.product.SkuStockParam; +import com.binarywang.wxjava.store.util.JsonUtils; +import com.binarywang.wxjava.store.util.ResponseUtils; +import me.chanjar.weixin.common.error.WxErrorException; + +/** + * 微信小店赠品与买赠活动服务实现。 + */ +public class WxStoreGiftServiceImpl implements WxStoreGiftService { + + private final BaseWxStoreServiceImpl shopService; + + public WxStoreGiftServiceImpl(BaseWxStoreServiceImpl shopService) { + this.shopService = shopService; + } + + @Override + public GiftProductAddResponse addGiftProduct(GiftProductInfo info) throws WxErrorException { + String reqJson = JsonUtils.encode(info); + String resJson = shopService.post(GIFT_PRODUCT_ADD_URL, reqJson); + return ResponseUtils.decode(resJson, GiftProductAddResponse.class); + } + + @Override + public WxStoreBaseResponse updateGiftProduct(GiftProductInfo info) throws WxErrorException { + String reqJson = JsonUtils.encode(info); + String resJson = shopService.post(GIFT_PRODUCT_UPDATE_URL, reqJson); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public WxStoreBaseResponse setProductAsGift(String productId) throws WxErrorException { + String reqJson = "{\"product_id\":\"" + productId + "\"}"; + String resJson = shopService.post(GIFT_PRODUCT_ON_SALE_SET_URL, reqJson); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public GiftProductGetResponse getGiftProduct(String productId) throws WxErrorException { + String reqJson = "{\"product_id\":\"" + productId + "\"}"; + String resJson = shopService.post(GIFT_PRODUCT_GET_URL, reqJson); + return ResponseUtils.decode(resJson, GiftProductGetResponse.class); + } + + @Override + public GiftProductListResponse listGiftProduct(GiftProductListParam param) throws WxErrorException { + String reqJson = JsonUtils.encode(param); + String resJson = shopService.post(GIFT_PRODUCT_LIST_URL, reqJson); + return ResponseUtils.decode(resJson, GiftProductListResponse.class); + } + + @Override + public WxStoreBaseResponse updateGiftStock(String productId, String skuId, Integer diffType, Integer num) + throws WxErrorException { + SkuStockParam param = new SkuStockParam(productId, skuId, diffType, num); + String reqJson = JsonUtils.encode(param); + String resJson = shopService.post(GIFT_PRODUCT_STOCK_UPDATE_URL, reqJson); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public GiftActivityAddResponse addGiftActivity(GiftActivityInfo info) throws WxErrorException { + GiftActivityAddParam param = new GiftActivityAddParam(info); + String reqJson = JsonUtils.encode(param); + String resJson = shopService.post(GIFT_ACTIVITY_ADD_URL, reqJson); + return ResponseUtils.decode(resJson, GiftActivityAddResponse.class); + } + + @Override + public WxStoreBaseResponse deleteGiftActivity(String activityId) throws WxErrorException { + String reqJson = "{\"activity_id\":\"" + activityId + "\"}"; + String resJson = shopService.post(GIFT_ACTIVITY_DELETE_URL, reqJson); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public WxStoreBaseResponse stopGiftActivity(String activityId) throws WxErrorException { + String reqJson = "{\"activity_id\":\"" + activityId + "\"}"; + String resJson = shopService.post(GIFT_ACTIVITY_STOP_URL, reqJson); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreHomePageServiceImpl.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreHomePageServiceImpl.java new file mode 100644 index 0000000000..bb925b9d0d --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreHomePageServiceImpl.java @@ -0,0 +1,164 @@ +package com.binarywang.wxjava.store.api.impl; + +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.HomePage.*; + + +import lombok.extern.slf4j.Slf4j; +import com.binarywang.wxjava.store.api.WxStoreHomePageService; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; +import com.binarywang.wxjava.store.bean.home.background.BackgroundApplyResponse; +import com.binarywang.wxjava.store.bean.home.background.BackgroundGetResponse; +import com.binarywang.wxjava.store.bean.home.banner.BannerApplyParam; +import com.binarywang.wxjava.store.bean.home.banner.BannerApplyResponse; +import com.binarywang.wxjava.store.bean.home.banner.BannerGetResponse; +import com.binarywang.wxjava.store.bean.home.banner.BannerInfo; +import com.binarywang.wxjava.store.bean.home.tree.TreeProductEditInfo; +import com.binarywang.wxjava.store.bean.home.tree.TreeProductEditParam; +import com.binarywang.wxjava.store.bean.home.tree.TreeProductListInfo; +import com.binarywang.wxjava.store.bean.home.tree.TreeProductListParam; +import com.binarywang.wxjava.store.bean.home.tree.TreeProductListResponse; +import com.binarywang.wxjava.store.bean.home.tree.TreeShowGetResponse; +import com.binarywang.wxjava.store.bean.home.tree.TreeShowInfo; +import com.binarywang.wxjava.store.bean.home.tree.TreeShowParam; +import com.binarywang.wxjava.store.bean.home.tree.TreeShowSetResponse; +import com.binarywang.wxjava.store.bean.home.window.WindowProductIndexParam; +import com.binarywang.wxjava.store.bean.home.window.WindowProductListParam; +import com.binarywang.wxjava.store.bean.home.window.WindowProductSetting; +import com.binarywang.wxjava.store.bean.home.window.WindowProductSettingResponse; +import com.binarywang.wxjava.store.util.ResponseUtils; +import me.chanjar.weixin.common.error.WxErrorException; + +/** + * 微信小店 主页管理相关接口 + * + * @author Zeyes + */ +@Slf4j +public class WxStoreHomePageServiceImpl implements WxStoreHomePageService { + + /** 微信小店服务 */ + private final BaseWxStoreServiceImpl storeService; + + public WxStoreHomePageServiceImpl(BaseWxStoreServiceImpl storeService) { + this.storeService = storeService; + } + + + @Override + public WxStoreBaseResponse addTreeProduct(TreeProductEditInfo info) throws WxErrorException { + TreeProductEditParam param = new TreeProductEditParam(info); + String resJson = storeService.post(ADD_TREE_PRODUCT_URL, param); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public WxStoreBaseResponse delTreeProduct(TreeProductEditInfo info) throws WxErrorException { + TreeProductEditParam param = new TreeProductEditParam(info); + String resJson = storeService.post(DEL_TREE_PRODUCT_URL, param); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public TreeProductListResponse getTreeProductList(TreeProductListInfo info) throws WxErrorException { + TreeProductListParam param = new TreeProductListParam(info); + String resJson = storeService.post(LIST_TREE_PRODUCT_URL, param); + return ResponseUtils.decode(resJson, TreeProductListResponse.class); + } + + @Override + public TreeShowSetResponse setShowTree(TreeShowInfo info) throws WxErrorException { + TreeShowParam param = new TreeShowParam(info); + String resJson = storeService.post(SET_SHOW_TREE_URL, param); + return ResponseUtils.decode(resJson, TreeShowSetResponse.class); + } + + @Override + public TreeShowGetResponse getShowTree() throws WxErrorException { + String resJson = storeService.post(GET_SHOW_TREE_URL, ""); + return ResponseUtils.decode(resJson, TreeShowGetResponse.class); + } + + @Override + public WindowProductSettingResponse listWindowProduct(Integer pageSize, String nextKey) throws WxErrorException { + WindowProductListParam param = new WindowProductListParam(pageSize, nextKey); + String resJson = storeService.post(LIST_WINDOW_PRODUCT_URL, param); + return ResponseUtils.decode(resJson, WindowProductSettingResponse.class); + } + + @Override + public WxStoreBaseResponse reorderWindowProduct(String productId, Integer indexNum) throws WxErrorException { + WindowProductIndexParam param = new WindowProductIndexParam(productId, indexNum); + String resJson = storeService.post(REORDER_WINDOW_PRODUCT_URL, param); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public WxStoreBaseResponse hideWindowProduct(String productId, Integer setHide) throws WxErrorException { + WindowProductSetting param = new WindowProductSetting(); + param.setProductId(productId); + param.setSetHide(setHide); + String resJson = storeService.post(HIDE_WINDOW_PRODUCT_URL, param); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public WxStoreBaseResponse topWindowProduct(String productId, Integer setTop) throws WxErrorException { + WindowProductSetting param = new WindowProductSetting(); + param.setProductId(productId); + param.setSetTop(setTop); + String resJson = storeService.post(TOP_WINDOW_PRODUCT_URL, param); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public BackgroundApplyResponse applyBackground(String imgUrl) throws WxErrorException { + String paramJson = "{\"img_url\":\"" + imgUrl + "\"}"; + String resJson = storeService.post(APPLY_BACKGROUND_URL, paramJson); + return ResponseUtils.decode(resJson, BackgroundApplyResponse.class); + } + + @Override + public BackgroundGetResponse getBackground() throws WxErrorException { + String resJson = storeService.post(GET_BACKGROUND_URL, ""); + return ResponseUtils.decode(resJson, BackgroundGetResponse.class); + } + + @Override + public WxStoreBaseResponse cancelBackground(Integer applyId) throws WxErrorException { + String paramJson = "{\"apply_id\":" + applyId + "}"; + String resJson = storeService.post(CANCEL_BACKGROUND_URL, paramJson); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public WxStoreBaseResponse removeBackground() throws WxErrorException { + String resJson = storeService.post(REMOVE_BACKGROUND_URL, ""); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public BannerApplyResponse applyBanner(BannerInfo info) throws WxErrorException { + BannerApplyParam param = new BannerApplyParam(info); + String resJson = storeService.post(APPLY_BANNER_URL, param); + return ResponseUtils.decode(resJson, BannerApplyResponse.class); + } + + @Override + public BannerGetResponse getBanner() throws WxErrorException { + String resJson = storeService.post(GET_BANNER_URL, ""); + return ResponseUtils.decode(resJson, BannerGetResponse.class); + } + + @Override + public WxStoreBaseResponse cancelBanner(Integer applyId) throws WxErrorException { + String paramJson = "{\"apply_id\":" + applyId + "}"; + String resJson = storeService.post(CANCEL_BANNER_URL, paramJson); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public WxStoreBaseResponse removeBanner() throws WxErrorException { + String resJson = storeService.post(REMOVE_BANNER_URL, ""); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreKfServiceImpl.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreKfServiceImpl.java new file mode 100644 index 0000000000..e9c9e2bd12 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreKfServiceImpl.java @@ -0,0 +1,45 @@ +package com.binarywang.wxjava.store.api.impl; + +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Kf.COS_UPLOAD_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Kf.SEND_MSG_URL; + +import com.binarywang.wxjava.store.api.WxStoreKfService; +import com.binarywang.wxjava.store.bean.kf.WxStoreKfCosUploadResponse; +import com.binarywang.wxjava.store.bean.kf.WxStoreKfSendMsgParam; +import com.binarywang.wxjava.store.bean.kf.WxStoreKfSendMsgResponse; +import com.binarywang.wxjava.store.util.JsonUtils; +import com.binarywang.wxjava.store.util.ResponseUtils; +import me.chanjar.weixin.common.bean.CommonUploadParam; +import me.chanjar.weixin.common.error.WxErrorException; +import me.chanjar.weixin.common.util.http.SimplePostRequestExecutor; + +/** 微信小店商家客服服务实现。 */ +public class WxStoreKfServiceImpl implements WxStoreKfService { + + private final BaseWxStoreServiceImpl channelService; + + public WxStoreKfServiceImpl(BaseWxStoreServiceImpl channelService) { + this.channelService = channelService; + } + + @Override + public String uploadMedia(String openId, String msgType, byte[] file) throws WxErrorException { + return uploadMedia(openId, msgType, null, file); + } + + @Override + public String uploadMedia(String openId, String msgType, String fileName, byte[] file) throws WxErrorException { + CommonUploadParam uploadParam = CommonUploadParam.fromBytes("file", fileName, file) + .addFormField("open_id", openId) + .addFormField("msg_type", msgType); + String responseJson = channelService.upload(COS_UPLOAD_URL, uploadParam); + return ResponseUtils.decode(responseJson, WxStoreKfCosUploadResponse.class).getCosUrl(); + } + + @Override + public WxStoreKfSendMsgResponse sendMessage(WxStoreKfSendMsgParam param) throws WxErrorException { + String responseJson = channelService.executeWithoutLog(SimplePostRequestExecutor.create(channelService), SEND_MSG_URL, + JsonUtils.encode(param)); + return ResponseUtils.decode(responseJson, WxStoreKfSendMsgResponse.class); + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreLimitedDiscountServiceImpl.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreLimitedDiscountServiceImpl.java new file mode 100644 index 0000000000..ff7b495c86 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreLimitedDiscountServiceImpl.java @@ -0,0 +1,68 @@ +package com.binarywang.wxjava.store.api.impl; + +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.ADD_LIMIT_TASK_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.DELETE_LIMIT_TASK_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.LIST_LIMIT_TASK_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.STOP_LIMIT_TASK_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.UPDATE_LIMIT_TASK_URL; + +import com.binarywang.wxjava.store.api.WxStoreLimitedDiscountService; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; +import com.binarywang.wxjava.store.bean.limit.LimitTaskAddResponse; +import com.binarywang.wxjava.store.bean.limit.LimitTaskListParam; +import com.binarywang.wxjava.store.bean.limit.LimitTaskListResponse; +import com.binarywang.wxjava.store.bean.limit.LimitTaskParam; +import com.binarywang.wxjava.store.bean.limit.LimitTaskUpdateParam; +import com.binarywang.wxjava.store.bean.limit.LimitTaskUpdateResponse; +import com.binarywang.wxjava.store.util.JsonUtils; +import com.binarywang.wxjava.store.util.ResponseUtils; +import me.chanjar.weixin.common.error.WxErrorException; + +/** + * 微信小店限时抢购服务实现。 + */ +public class WxStoreLimitedDiscountServiceImpl implements WxStoreLimitedDiscountService { + + private final BaseWxStoreServiceImpl shopService; + + public WxStoreLimitedDiscountServiceImpl(BaseWxStoreServiceImpl shopService) { + this.shopService = shopService; + } + + @Override + public LimitTaskAddResponse addLimitTask(LimitTaskParam param) throws WxErrorException { + String reqJson = JsonUtils.encode(param); + String resJson = shopService.post(ADD_LIMIT_TASK_URL, reqJson); + return ResponseUtils.decode(resJson, LimitTaskAddResponse.class); + } + + @Override + public LimitTaskListResponse listLimitTask(Integer pageSize, String nextKey, Integer status) + throws WxErrorException { + LimitTaskListParam param = new LimitTaskListParam(pageSize, nextKey, status); + String reqJson = JsonUtils.encode(param); + String resJson = shopService.post(LIST_LIMIT_TASK_URL, reqJson); + return ResponseUtils.decode(resJson, LimitTaskListResponse.class); + } + + @Override + public WxStoreBaseResponse stopLimitTask(String taskId) throws WxErrorException { + String reqJson = "{\"task_id\": \"" + taskId + "\"}"; + String resJson = shopService.post(STOP_LIMIT_TASK_URL, reqJson); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public WxStoreBaseResponse deleteLimitTask(String taskId) throws WxErrorException { + String reqJson = "{\"task_id\": \"" + taskId + "\"}"; + String resJson = shopService.post(DELETE_LIMIT_TASK_URL, reqJson); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public LimitTaskUpdateResponse updateLimitTask(LimitTaskUpdateParam param) throws WxErrorException { + String reqJson = JsonUtils.encode(param); + String resJson = shopService.post(UPDATE_LIMIT_TASK_URL, reqJson); + return ResponseUtils.decode(resJson, LimitTaskUpdateResponse.class); + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreOrderServiceImpl.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreOrderServiceImpl.java new file mode 100644 index 0000000000..0273fe3151 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreOrderServiceImpl.java @@ -0,0 +1,294 @@ +package com.binarywang.wxjava.store.api.impl; + +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Delivery.DELIVERY_SEND_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Delivery.GET_DELIVERY_COMPANY_NEW_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Delivery.GET_DELIVERY_COMPANY_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Order.ACCEPT_ADDRESS_MODIFY_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Order.DECODE_SENSITIVE_INFO_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Order.DELIVERY_COMPENSATION_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Order.ORDER_GET_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Order.ORDER_LIST_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Order.ORDER_SEARCH_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Order.PRE_SHIPMENT_CHANGE_SKU_APPROVE_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Order.PRE_SHIPMENT_CHANGE_SKU_GET_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Order.PRE_SHIPMENT_CHANGE_SKU_REJECT_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Order.PRESENT_NOTE_ADD_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Order.PRESENT_SUB_ORDER_GET_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Order.REAL_NUMBER_APPLY_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Order.REAL_NUMBER_VIEW_AUDIT_GET_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Order.REJECT_ADDRESS_MODIFY_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Order.UPDATE_ADDRESS_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Order.UPDATE_EXPRESS_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Order.UPDATE_PRICE_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Order.UPDATE_REMARK_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Order.UPLOAD_FRESH_INSPECT_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Order.VIRTUAL_NUMBER_APPLY_AGAIN_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Order.VIRTUAL_NUMBER_DELAY_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Order.VIRTUAL_TEL_NUMBER_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.PrivateNumber.ADD_PHONE_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.PrivateNumber.GET_PHONE_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.PrivateNumber.SEND_VERIFY_CODE_URL; + +import java.util.List; +import lombok.extern.slf4j.Slf4j; +import com.binarywang.wxjava.store.api.WxStoreOrderService; +import com.binarywang.wxjava.store.bean.base.AddressInfo; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; +import com.binarywang.wxjava.store.bean.delivery.DeliveryCompanyResponse; +import com.binarywang.wxjava.store.bean.delivery.DeliveryInfo; +import com.binarywang.wxjava.store.bean.delivery.DeliverySendParam; +import com.binarywang.wxjava.store.bean.delivery.FreshInspectParam; +import com.binarywang.wxjava.store.bean.delivery.PackageAuditInfo; +import com.binarywang.wxjava.store.bean.order.ChangeOrderInfo; +import com.binarywang.wxjava.store.bean.order.DecodeSensitiveInfoResponse; +import com.binarywang.wxjava.store.bean.order.DeliveryUpdateParam; +import com.binarywang.wxjava.store.bean.order.OrderAddressParam; +import com.binarywang.wxjava.store.bean.order.OrderCompensationDeliveryParam; +import com.binarywang.wxjava.store.bean.order.OrderIdParam; +import com.binarywang.wxjava.store.bean.order.OrderInfoParam; +import com.binarywang.wxjava.store.bean.order.OrderInfoResponse; +import com.binarywang.wxjava.store.bean.order.OrderListParam; +import com.binarywang.wxjava.store.bean.order.OrderListResponse; +import com.binarywang.wxjava.store.bean.order.OrderPriceParam; +import com.binarywang.wxjava.store.bean.order.OrderRemarkParam; +import com.binarywang.wxjava.store.bean.order.OrderSearchParam; +import com.binarywang.wxjava.store.bean.order.PreShipmentChangeSkuRejectParam; +import com.binarywang.wxjava.store.bean.order.PreShipmentChangeSkuResponse; +import com.binarywang.wxjava.store.bean.order.PresentNoteAddParam; +import com.binarywang.wxjava.store.bean.order.PresentSubOrderResponse; +import com.binarywang.wxjava.store.bean.order.PrivateNumberAddPhoneParam; +import com.binarywang.wxjava.store.bean.order.PrivateNumberGetPhoneResponse; +import com.binarywang.wxjava.store.bean.order.PrivateNumberSendVerifyCodeParam; +import com.binarywang.wxjava.store.bean.order.RealNumberViewAuditResponse; +import com.binarywang.wxjava.store.bean.order.VirtualTelNumberResponse; +import com.binarywang.wxjava.store.util.ResponseUtils; +import me.chanjar.weixin.common.error.WxErrorException; + + +/** + * 微信小店订单服务 + * + * @author Zeyes + */ +@Slf4j +public class WxStoreOrderServiceImpl implements WxStoreOrderService { + + /** 微信商店服务 */ + private final BaseWxStoreServiceImpl shopService; + + public WxStoreOrderServiceImpl(BaseWxStoreServiceImpl shopService) { + this.shopService = shopService; + } + + @Override + public OrderInfoResponse getOrder(String orderId) throws WxErrorException { + OrderInfoParam param = new OrderInfoParam(orderId, null); + String resJson = shopService.post(ORDER_GET_URL, param); + return ResponseUtils.decode(resJson, OrderInfoResponse.class); + } + + @Override + public OrderInfoResponse getOrder(String orderId, Boolean encodeSensitiveInfo) throws WxErrorException { + OrderInfoParam param = new OrderInfoParam(orderId, encodeSensitiveInfo); + String resJson = shopService.post(ORDER_GET_URL, param); + return ResponseUtils.decode(resJson, OrderInfoResponse.class); + } + + @Override + public OrderListResponse getOrders(OrderListParam param) throws WxErrorException { + String resJson = shopService.post(ORDER_LIST_URL, param); + return ResponseUtils.decode(resJson, OrderListResponse.class); + } + + @Override + public OrderListResponse searchOrder(OrderSearchParam param) throws WxErrorException { + String resJson = shopService.post(ORDER_SEARCH_URL, param); + return ResponseUtils.decode(resJson, OrderListResponse.class); + } + + @Override + public WxStoreBaseResponse updatePrice(String orderId, Integer expressFee, List changeOrderInfos) + throws WxErrorException { + OrderPriceParam param = new OrderPriceParam(orderId, expressFee, changeOrderInfos); + String resJson = shopService.post(UPDATE_PRICE_URL, param); + ; + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public WxStoreBaseResponse updateRemark(String orderId, String merchantNotes) throws WxErrorException { + OrderRemarkParam param = new OrderRemarkParam(orderId, merchantNotes); + String resJson = shopService.post(UPDATE_REMARK_URL, param); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public WxStoreBaseResponse updateAddress(String orderId, AddressInfo userAddress) throws WxErrorException { + OrderAddressParam param = new OrderAddressParam(orderId, userAddress); + String resJson = shopService.post(UPDATE_ADDRESS_URL, param); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public WxStoreBaseResponse updateDelivery(DeliveryUpdateParam param) throws WxErrorException { + String resJson = shopService.post(UPDATE_EXPRESS_URL, param); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public WxStoreBaseResponse acceptAddressModify(String orderId) throws WxErrorException { + OrderIdParam param = new OrderIdParam(orderId); + String resJson = shopService.post(ACCEPT_ADDRESS_MODIFY_URL, param); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public WxStoreBaseResponse rejectAddressModify(String orderId) throws WxErrorException { + OrderIdParam param = new OrderIdParam(orderId); + String resJson = shopService.post(REJECT_ADDRESS_MODIFY_URL, param); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public WxStoreBaseResponse closeOrder(String orderId) { + // 暂不支持 + return ResponseUtils.internalError(WxStoreBaseResponse.class); + } + + @Override + public DeliveryCompanyResponse listDeliveryCompany() throws WxErrorException { + String resJson = shopService.post(GET_DELIVERY_COMPANY_URL, "{}"); + return ResponseUtils.decode(resJson, DeliveryCompanyResponse.class); + } + + @Override + public DeliveryCompanyResponse listDeliveryCompany(Boolean ewaybillOnly) throws WxErrorException { + String reqJson = "{}"; + if (ewaybillOnly != null) { + reqJson = "{\"ewaybill_only\":" + ewaybillOnly + "}"; + } + String resJson = shopService.post(GET_DELIVERY_COMPANY_NEW_URL, reqJson); + return ResponseUtils.decode(resJson, DeliveryCompanyResponse.class); + } + + @Override + public WxStoreBaseResponse deliveryOrder(String orderId, List deliveryList) + throws WxErrorException { + DeliverySendParam param = new DeliverySendParam(orderId, deliveryList); + String resJson = shopService.post(DELIVERY_SEND_URL, param); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public WxStoreBaseResponse uploadFreshInspect(String orderId, List items) + throws WxErrorException { + FreshInspectParam param = new FreshInspectParam(orderId, items); + String resJson = shopService.post(UPLOAD_FRESH_INSPECT_URL, param); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public VirtualTelNumberResponse getVirtualTelNumber(String orderId) throws WxErrorException { + String reqJson = "{\"order_id\":\"" + orderId + "\"}"; + String resJson = shopService.post(VIRTUAL_TEL_NUMBER_URL, reqJson); + return ResponseUtils.decode(resJson, VirtualTelNumberResponse.class); + } + + @Override + public DecodeSensitiveInfoResponse decodeSensitiveInfo(String orderId) throws WxErrorException { + String reqJson = "{\"order_id\":\"" + orderId + "\"}"; + String resJson = shopService.post(DECODE_SENSITIVE_INFO_URL, reqJson); + return ResponseUtils.decode(resJson, DecodeSensitiveInfoResponse.class); + } + + @Override + public WxStoreBaseResponse addPresentNote(String orderId, String note) throws WxErrorException { + PresentNoteAddParam param = new PresentNoteAddParam(orderId, note); + String resJson = shopService.post(PRESENT_NOTE_ADD_URL, param); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public PresentSubOrderResponse getPresentSubOrders(String orderId) throws WxErrorException { + OrderIdParam param = new OrderIdParam(orderId); + String resJson = shopService.post(PRESENT_SUB_ORDER_GET_URL, param); + return ResponseUtils.decode(resJson, PresentSubOrderResponse.class); + } + + @Override + public PreShipmentChangeSkuResponse getPreShipmentChangeSku(String orderId) throws WxErrorException { + OrderIdParam param = new OrderIdParam(orderId); + String resJson = shopService.post(PRE_SHIPMENT_CHANGE_SKU_GET_URL, param); + return ResponseUtils.decode(resJson, PreShipmentChangeSkuResponse.class); + } + + @Override + public WxStoreBaseResponse approvePreShipmentChangeSku(String orderId) throws WxErrorException { + OrderIdParam param = new OrderIdParam(orderId); + String resJson = shopService.post(PRE_SHIPMENT_CHANGE_SKU_APPROVE_URL, param); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public WxStoreBaseResponse rejectPreShipmentChangeSku(String orderId, String rejectReason) + throws WxErrorException { + PreShipmentChangeSkuRejectParam param = new PreShipmentChangeSkuRejectParam(orderId, rejectReason); + String resJson = shopService.post(PRE_SHIPMENT_CHANGE_SKU_REJECT_URL, param); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public WxStoreBaseResponse applyRealNumber(String orderId) throws WxErrorException { + OrderIdParam param = new OrderIdParam(orderId); + String resJson = shopService.post(REAL_NUMBER_APPLY_URL, param); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public RealNumberViewAuditResponse getRealNumberViewAudit(String orderId) throws WxErrorException { + OrderIdParam param = new OrderIdParam(orderId); + String resJson = shopService.post(REAL_NUMBER_VIEW_AUDIT_GET_URL, param); + return ResponseUtils.decode(resJson, RealNumberViewAuditResponse.class); + } + + @Override + public WxStoreBaseResponse applyVirtualNumberAgain(String orderId) throws WxErrorException { + OrderIdParam param = new OrderIdParam(orderId); + String resJson = shopService.post(VIRTUAL_NUMBER_APPLY_AGAIN_URL, param); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public WxStoreBaseResponse delayVirtualNumber(String orderId) throws WxErrorException { + OrderIdParam param = new OrderIdParam(orderId); + String resJson = shopService.post(VIRTUAL_NUMBER_DELAY_URL, param); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public WxStoreBaseResponse addPrivatePhone(String phone) throws WxErrorException { + PrivateNumberAddPhoneParam param = new PrivateNumberAddPhoneParam(phone); + String resJson = shopService.post(ADD_PHONE_URL, param); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public WxStoreBaseResponse sendPrivatePhoneVerifyCode(String phone) throws WxErrorException { + PrivateNumberSendVerifyCodeParam param = new PrivateNumberSendVerifyCodeParam(phone); + String resJson = shopService.post(SEND_VERIFY_CODE_URL, param); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public PrivateNumberGetPhoneResponse getPrivatePhone() throws WxErrorException { + String resJson = shopService.post(GET_PHONE_URL, "{}"); + return ResponseUtils.decode(resJson, PrivateNumberGetPhoneResponse.class); + } + + @Override + public WxStoreBaseResponse compensationDelivery(OrderCompensationDeliveryParam param) + throws WxErrorException { + String resJson = shopService.post(DELIVERY_COMPENSATION_URL, param); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreProductAssistantServiceImpl.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreProductAssistantServiceImpl.java new file mode 100644 index 0000000000..829157fc2c --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreProductAssistantServiceImpl.java @@ -0,0 +1,77 @@ +package com.binarywang.wxjava.store.api.impl; + +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.BEGIN_TIMING_SALE_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.CANCEL_TIMING_SALE_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.CATEGORY_PRE_CHECK_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.EXTERNAL_PRODUCT_MAPPING_NEW_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.EXTERNAL_PRODUCT_MAPPING_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.PRODUCT_BRAND_RECOMMEND_URL; + +import com.binarywang.wxjava.store.api.WxStoreProductAssistantService; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; +import com.binarywang.wxjava.store.bean.product.assistant.BeginTimingSaleParam; +import com.binarywang.wxjava.store.bean.product.assistant.CancelTimingSaleParam; +import com.binarywang.wxjava.store.bean.product.assistant.CategoryPreCheckParam; +import com.binarywang.wxjava.store.bean.product.assistant.CategoryPreCheckResponse; +import com.binarywang.wxjava.store.bean.product.assistant.ExternalProductMappingNewParam; +import com.binarywang.wxjava.store.bean.product.assistant.ExternalProductMappingNewResponse; +import com.binarywang.wxjava.store.bean.product.assistant.ExternalProductMappingParam; +import com.binarywang.wxjava.store.bean.product.assistant.ExternalProductMappingResponse; +import com.binarywang.wxjava.store.bean.product.assistant.ProductBrandRecommendParam; +import com.binarywang.wxjava.store.bean.product.assistant.ProductBrandRecommendResponse; +import com.binarywang.wxjava.store.util.JsonUtils; +import com.binarywang.wxjava.store.util.ResponseUtils; +import me.chanjar.weixin.common.error.WxErrorException; + +/** + * 微信小店商品辅助功能服务实现。 + */ +public class WxStoreProductAssistantServiceImpl implements WxStoreProductAssistantService { + + /** 微信商店服务 */ + private final BaseWxStoreServiceImpl shopService; + + public WxStoreProductAssistantServiceImpl(BaseWxStoreServiceImpl shopService) { + this.shopService = shopService; + } + + @Override + public CategoryPreCheckResponse categoryPreCheck(CategoryPreCheckParam param) throws WxErrorException { + return post(CATEGORY_PRE_CHECK_URL, param, CategoryPreCheckResponse.class); + } + + @Override + public ProductBrandRecommendResponse getProductBrandRecommend(ProductBrandRecommendParam param) + throws WxErrorException { + return post(PRODUCT_BRAND_RECOMMEND_URL, param, ProductBrandRecommendResponse.class); + } + + @Override + public ExternalProductMappingResponse externalProductMapping(ExternalProductMappingParam param) + throws WxErrorException { + return post(EXTERNAL_PRODUCT_MAPPING_URL, param, ExternalProductMappingResponse.class); + } + + @Override + public ExternalProductMappingNewResponse externalProductMappingNew(ExternalProductMappingNewParam param) + throws WxErrorException { + return post(EXTERNAL_PRODUCT_MAPPING_NEW_URL, param, ExternalProductMappingNewResponse.class); + } + + @Override + public WxStoreBaseResponse beginTimingSale(BeginTimingSaleParam param) throws WxErrorException { + return post(BEGIN_TIMING_SALE_URL, param, WxStoreBaseResponse.class); + } + + @Override + public WxStoreBaseResponse cancelTimingSale(CancelTimingSaleParam param) throws WxErrorException { + return post(CANCEL_TIMING_SALE_URL, param, WxStoreBaseResponse.class); + } + + private T post(String url, Object param, Class responseType) + throws WxErrorException { + String reqJson = JsonUtils.encode(param); + String resJson = shopService.post(url, reqJson); + return ResponseUtils.decode(resJson, responseType); + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreProductServiceImpl.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreProductServiceImpl.java new file mode 100644 index 0000000000..1efea21a4e --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreProductServiceImpl.java @@ -0,0 +1,413 @@ +package com.binarywang.wxjava.store.api.impl; + + +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.CANCEL_AUDIT_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.DELETE_LIMIT_TASK_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.GIFT_ACTIVITY_ADD_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.GIFT_ACTIVITY_DELETE_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.GIFT_ACTIVITY_STOP_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.GIFT_PRODUCT_ADD_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.GIFT_PRODUCT_GET_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.GIFT_PRODUCT_LIST_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.GIFT_PRODUCT_ON_SALE_SET_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.GIFT_PRODUCT_STOCK_UPDATE_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.GIFT_PRODUCT_UPDATE_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.LIST_LIMIT_TASK_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.SPU_ADD_PRODUCT_THIRD_PARTY_SOURCE_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.SPU_ADD_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.SPU_AUDIT_FREE_UPDATE_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.SPU_AUDIT_STRATEGY_GET_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.SPU_AUDIT_STRATEGY_SET_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.SPU_BEGIN_TIMING_SALE_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.SPU_CANCEL_TIMING_SALE_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.SPU_CATEGORY_CLASSIFY_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.SPU_CATEGORY_PRE_CHECK_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.SPU_DELISTING_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.SPU_DEL_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.SPU_EXTERNAL_PRODUCT_MAPPING_NEW_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.SPU_EXTERNAL_PRODUCT_MAPPING_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.SPU_GET_AUDIT_QUOTA_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.SPU_GET_STOCK_BATCH_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.SPU_GET_STOCK_FLOW_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.SPU_GET_STOCK_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.SPU_GET_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.SPU_H5URL_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.SPU_LISTING_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.SPU_LIST_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.SPU_PRODUCT_BRAND_RECOMMEND_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.SPU_QRCODE_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.SPU_SCHEME_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.SPU_TAGLINK_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.SPU_UPDATE_URL; + +import java.util.Collections; +import java.util.List; +import lombok.extern.slf4j.Slf4j; +import com.binarywang.wxjava.store.api.WxStoreGiftService; +import com.binarywang.wxjava.store.api.WxStoreLimitedDiscountService; +import com.binarywang.wxjava.store.api.WxStoreProductService; +import com.binarywang.wxjava.store.api.WxStoreProductStockService; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; +import com.binarywang.wxjava.store.bean.limit.LimitTaskAddResponse; +import com.binarywang.wxjava.store.bean.limit.LimitTaskListResponse; +import com.binarywang.wxjava.store.bean.limit.LimitTaskParam; +import com.binarywang.wxjava.store.bean.product.AddProductThirdPartySourceParam; +import com.binarywang.wxjava.store.bean.product.AddProductThirdPartySourceResponse; +import com.binarywang.wxjava.store.bean.product.ExternalProductMappingNewParam; +import com.binarywang.wxjava.store.bean.product.ExternalProductMappingNewResponse; +import com.binarywang.wxjava.store.bean.product.ExternalProductMappingParam; +import com.binarywang.wxjava.store.bean.product.ExternalProductMappingResponse; +import com.binarywang.wxjava.store.bean.product.GiftActivityAddParam; +import com.binarywang.wxjava.store.bean.product.GiftActivityAddResponse; +import com.binarywang.wxjava.store.bean.product.GiftActivityInfo; +import com.binarywang.wxjava.store.bean.product.GiftProductAddResponse; +import com.binarywang.wxjava.store.bean.product.GiftProductGetResponse; +import com.binarywang.wxjava.store.bean.product.GiftProductInfo; +import com.binarywang.wxjava.store.bean.product.GiftProductListParam; +import com.binarywang.wxjava.store.bean.product.GiftProductListResponse; +import com.binarywang.wxjava.store.bean.product.ProductAuditQuotaResponse; +import com.binarywang.wxjava.store.bean.product.ProductAuditStrategyResponse; +import com.binarywang.wxjava.store.bean.product.ProductAuditStrategySetParam; +import com.binarywang.wxjava.store.bean.product.ProductBrandRecommendParam; +import com.binarywang.wxjava.store.bean.product.ProductBrandRecommendResponse; +import com.binarywang.wxjava.store.bean.product.ProductCategoryClassifyParam; +import com.binarywang.wxjava.store.bean.product.ProductCategoryClassifyResponse; +import com.binarywang.wxjava.store.bean.product.ProductCategoryPreCheckParam; +import com.binarywang.wxjava.store.bean.product.ProductCategoryPreCheckResponse; +import com.binarywang.wxjava.store.bean.product.ProductSchemeParam; +import com.binarywang.wxjava.store.bean.product.ProductSchemeResponse; +import com.binarywang.wxjava.store.bean.product.ProductStockFlowParam; +import com.binarywang.wxjava.store.bean.product.ProductStockFlowResponse; +import com.binarywang.wxjava.store.bean.product.ProductTimingSaleParam; +import com.binarywang.wxjava.store.bean.product.SkuStockBatchParam; +import com.binarywang.wxjava.store.bean.product.SkuStockBatchResponse; +import com.binarywang.wxjava.store.bean.product.SkuStockResponse; +import com.binarywang.wxjava.store.bean.product.SpuFastInfo; +import com.binarywang.wxjava.store.bean.product.SpuGetResponse; +import com.binarywang.wxjava.store.bean.product.SpuInfo; +import com.binarywang.wxjava.store.bean.product.SpuListParam; +import com.binarywang.wxjava.store.bean.product.SpuListResponse; +import com.binarywang.wxjava.store.bean.product.SpuUpdateInfo; +import com.binarywang.wxjava.store.bean.product.SpuUpdateResponse; +import com.binarywang.wxjava.store.bean.product.link.ProductH5UrlResponse; +import com.binarywang.wxjava.store.bean.product.link.ProductQrCodeResponse; +import com.binarywang.wxjava.store.bean.product.link.ProductTagLinkResponse; +import com.binarywang.wxjava.store.util.JsonUtils; +import com.binarywang.wxjava.store.util.ResponseUtils; +import me.chanjar.weixin.common.error.WxErrorException; + +/** + * 微信小店商品服务 + * + * @author Zeyes + */ +@Slf4j +public class WxStoreProductServiceImpl implements WxStoreProductService { + + /** 微信商店服务 */ + private final BaseWxStoreServiceImpl shopService; + private final WxStoreGiftService giftService; + private final WxStoreLimitedDiscountService limitedDiscountService; + private final WxStoreProductStockService productStockService; + + public WxStoreProductServiceImpl(BaseWxStoreServiceImpl shopService) { + this(shopService, new WxStoreGiftServiceImpl(shopService), + new WxStoreLimitedDiscountServiceImpl(shopService), new WxStoreProductStockServiceImpl(shopService)); + } + + WxStoreProductServiceImpl(BaseWxStoreServiceImpl shopService, WxStoreGiftService giftService, + WxStoreLimitedDiscountService limitedDiscountService, + WxStoreProductStockService productStockService) { + this.shopService = shopService; + this.giftService = giftService; + this.limitedDiscountService = limitedDiscountService; + this.productStockService = productStockService; + } + + @Override + public SpuUpdateResponse addProduct(SpuUpdateInfo info) throws WxErrorException { + String reqJson = JsonUtils.encode(info); + String resJson = shopService.post(SPU_ADD_URL, reqJson); + return ResponseUtils.decode(resJson, SpuUpdateResponse.class); + } + + @Override + public SpuUpdateResponse updateProduct(SpuUpdateInfo info) throws WxErrorException { + String reqJson = JsonUtils.encode(info); + String resJson = shopService.post(SPU_UPDATE_URL, reqJson); + return ResponseUtils.decode(resJson, SpuUpdateResponse.class); + } + + @Override + public SpuUpdateResponse addProduct(SpuInfo info) throws WxErrorException { + String reqJson = JsonUtils.encode(info); + String resJson = shopService.post(SPU_ADD_URL, reqJson); + return ResponseUtils.decode(resJson, SpuUpdateResponse.class); + } + + @Override + public SpuUpdateResponse updateProduct(SpuInfo info) throws WxErrorException { + String reqJson = JsonUtils.encode(info); + String resJson = shopService.post(SPU_UPDATE_URL, reqJson); + return ResponseUtils.decode(resJson, SpuUpdateResponse.class); + } + + @Override + public WxStoreBaseResponse updateProductAuditFree(SpuFastInfo info) throws WxErrorException { + String reqJson = JsonUtils.encode(info); + String resJson = shopService.post(SPU_AUDIT_FREE_UPDATE_URL, reqJson); + return ResponseUtils.decode(resJson, SpuUpdateResponse.class); + } + + @Override + public WxStoreBaseResponse updateStock(String productId, String skuId, Integer diffType, Integer num) + throws WxErrorException { + return productStockService.updateStock(productId, skuId, diffType, num); + } + + /** + * 生成商品id Json + * + * @param productId 商品ID + * @param dataType 默认取1。1:获取线上数据, 2:获取草稿数据, 3:同时获取线上和草稿数据(注意:需成功上架后才有线上数据) + * @return json + */ + protected String generateProductIdJson(String productId, Integer dataType) { + StringBuilder sb = new StringBuilder(); + sb.append('{'); + if (productId != null) { + sb.append("\"product_id\":").append(productId); + } + + if (dataType != null) { + sb.append(",").append("\"data_type\":").append(dataType); + } + sb.append('}'); + return sb.toString(); + } + + /** + * 简单的商品请求 参数是商品id 只返回基本结果 + * + * @param url 资源路径 + * @param productId 商品ID + * @return 是否成功 + */ + protected WxStoreBaseResponse simpleProductRequest(String url, String productId) throws WxErrorException { + String reqJson = this.generateProductIdJson(productId, null); + String resJson = shopService.post(url, reqJson); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public WxStoreBaseResponse deleteProduct(String productId) throws WxErrorException { + return simpleProductRequest(SPU_DEL_URL, productId); + } + + @Override + public WxStoreBaseResponse cancelProductAudit(String productId) throws WxErrorException { + return simpleProductRequest(CANCEL_AUDIT_URL, productId); + } + + @Override + public SpuGetResponse getProduct(String productId, Integer dataType) throws WxErrorException { + String reqJson = this.generateProductIdJson(productId, dataType); + String resJson = shopService.post(SPU_GET_URL, reqJson); + return ResponseUtils.decode(resJson, SpuGetResponse.class); + } + + @Override + public SpuListResponse listProduct(Integer pageSize, String nextKey, Integer status) throws WxErrorException { + SpuListParam param = new SpuListParam(pageSize, nextKey, status); + String reqJson = JsonUtils.encode(param); + String resJson = shopService.post(SPU_LIST_URL, reqJson); + return ResponseUtils.decode(resJson, SpuListResponse.class); + } + + @Override + public WxStoreBaseResponse upProduct(String productId) throws WxErrorException { + return simpleProductRequest(SPU_LISTING_URL, productId); + } + + @Override + public WxStoreBaseResponse downProduct(String productId) throws WxErrorException { + return simpleProductRequest(SPU_DELISTING_URL, productId); + } + + @Override + public SkuStockResponse getSkuStock(String productId, String skuId) throws WxErrorException { + return productStockService.getSkuStock(productId, skuId); + } + + @Override + public SkuStockBatchResponse getSkuStockBatch(List productIds) throws WxErrorException { + return productStockService.getSkuStockBatch(productIds); + } + + @Override + public ProductH5UrlResponse getProductH5Url(String productId) throws WxErrorException { + String reqJson = "{\"product_id\":\"" + productId + "\"}"; + String resJson = shopService.post(SPU_H5URL_URL, reqJson); + return ResponseUtils.decode(resJson, ProductH5UrlResponse.class); + } + + @Override + public ProductQrCodeResponse getProductQrCode(String productId) throws WxErrorException { + String reqJson = "{\"product_id\":\"" + productId + "\"}"; + String resJson = shopService.post(SPU_QRCODE_URL, reqJson); + return ResponseUtils.decode(resJson, ProductQrCodeResponse.class); + } + + @Override + public ProductTagLinkResponse getProductTagLink(String productId) throws WxErrorException { + String reqJson = "{\"product_id\":\"" + productId + "\"}"; + String resJson = shopService.post(SPU_TAGLINK_URL, reqJson); + return ResponseUtils.decode(resJson, ProductTagLinkResponse.class); + } + + @Override + public ProductSchemeResponse getProductScheme(ProductSchemeParam param) throws WxErrorException { + return postAndDecode(SPU_SCHEME_URL, param, ProductSchemeResponse.class); + } + + @Override + public ProductCategoryClassifyResponse classifyProductCategory(ProductCategoryClassifyParam param) + throws WxErrorException { + return postAndDecode(SPU_CATEGORY_CLASSIFY_URL, param, ProductCategoryClassifyResponse.class); + } + + @Override + public WxStoreBaseResponse beginTimingSale(ProductTimingSaleParam param) throws WxErrorException { + return postAndDecode(SPU_BEGIN_TIMING_SALE_URL, param, WxStoreBaseResponse.class); + } + + @Override + public WxStoreBaseResponse cancelTimingSale(String productId) throws WxErrorException { + return postAndDecode(SPU_CANCEL_TIMING_SALE_URL, Collections.singletonMap("product_id", productId), + WxStoreBaseResponse.class); + } + + @Override + public ExternalProductMappingResponse externalProductMapping(ExternalProductMappingParam param) + throws WxErrorException { + return postAndDecode(SPU_EXTERNAL_PRODUCT_MAPPING_URL, param, ExternalProductMappingResponse.class); + } + + @Override + public ProductCategoryPreCheckResponse categoryPreCheck(ProductCategoryPreCheckParam param) + throws WxErrorException { + return postAndDecode(SPU_CATEGORY_PRE_CHECK_URL, param, ProductCategoryPreCheckResponse.class); + } + + @Override + public ProductAuditStrategyResponse getProductAuditStrategy() throws WxErrorException { + return postAndDecode(SPU_AUDIT_STRATEGY_GET_URL, "{}", ProductAuditStrategyResponse.class); + } + + @Override + public WxStoreBaseResponse setProductAuditStrategy(ProductAuditStrategySetParam param) throws WxErrorException { + return postAndDecode(SPU_AUDIT_STRATEGY_SET_URL, param, WxStoreBaseResponse.class); + } + + @Override + public ProductAuditQuotaResponse getProductAuditQuota() throws WxErrorException { + return postAndDecode(SPU_GET_AUDIT_QUOTA_URL, "{}", ProductAuditQuotaResponse.class); + } + + @Override + public ExternalProductMappingNewResponse externalProductMappingNew(ExternalProductMappingNewParam param) + throws WxErrorException { + return postAndDecode(SPU_EXTERNAL_PRODUCT_MAPPING_NEW_URL, param, ExternalProductMappingNewResponse.class); + } + + @Override + public ProductBrandRecommendResponse productBrandRecommend(ProductBrandRecommendParam param) + throws WxErrorException { + return postAndDecode(SPU_PRODUCT_BRAND_RECOMMEND_URL, param, ProductBrandRecommendResponse.class); + } + + @Override + public AddProductThirdPartySourceResponse addProductThirdPartySource(AddProductThirdPartySourceParam param) + throws WxErrorException { + return postAndDecode(SPU_ADD_PRODUCT_THIRD_PARTY_SOURCE_URL, param, AddProductThirdPartySourceResponse.class); + } + + @Override + public ProductStockFlowResponse getStockFlow(ProductStockFlowParam param) throws WxErrorException { + return postAndDecode(SPU_GET_STOCK_FLOW_URL, param, ProductStockFlowResponse.class); + } + + private T postAndDecode(String url, Object param, Class responseType) + throws WxErrorException { + String reqJson = param instanceof String ? (String) param : JsonUtils.encode(param); + String resJson = shopService.post(url, reqJson); + return ResponseUtils.decode(resJson, responseType); + } + + @Override + public GiftProductAddResponse addGiftProduct(GiftProductInfo info) throws WxErrorException { + return giftService.addGiftProduct(info); + } + + @Override + public WxStoreBaseResponse updateGiftProduct(GiftProductInfo info) throws WxErrorException { + return giftService.updateGiftProduct(info); + } + + @Override + public WxStoreBaseResponse setProductAsGift(String productId) throws WxErrorException { + return giftService.setProductAsGift(productId); + } + + @Override + public GiftProductGetResponse getGiftProduct(String productId) throws WxErrorException { + return giftService.getGiftProduct(productId); + } + + @Override + public GiftProductListResponse listGiftProduct(GiftProductListParam param) throws WxErrorException { + return giftService.listGiftProduct(param); + } + + @Override + public WxStoreBaseResponse updateGiftStock(String productId, String skuId, Integer diffType, Integer num) + throws WxErrorException { + return giftService.updateGiftStock(productId, skuId, diffType, num); + } + + @Override + public GiftActivityAddResponse addGiftActivity(GiftActivityInfo info) throws WxErrorException { + return giftService.addGiftActivity(info); + } + + @Override + public WxStoreBaseResponse deleteGiftActivity(String activityId) throws WxErrorException { + return giftService.deleteGiftActivity(activityId); + } + + @Override + public WxStoreBaseResponse stopGiftActivity(String activityId) throws WxErrorException { + return giftService.stopGiftActivity(activityId); + } + + @Override + public LimitTaskAddResponse addLimitTask(LimitTaskParam param) throws WxErrorException { + return limitedDiscountService.addLimitTask(param); + } + + @Override + public LimitTaskListResponse listLimitTask(Integer pageSize, String nextKey, Integer status) + throws WxErrorException { + return limitedDiscountService.listLimitTask(pageSize, nextKey, status); + } + + @Override + public WxStoreBaseResponse stopLimitTask(String taskId) throws WxErrorException { + return limitedDiscountService.stopLimitTask(taskId); + } + + @Override + public WxStoreBaseResponse deleteLimitTask(String taskId) throws WxErrorException { + return limitedDiscountService.deleteLimitTask(taskId); + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreProductStockServiceImpl.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreProductStockServiceImpl.java new file mode 100644 index 0000000000..f1787f6397 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreProductStockServiceImpl.java @@ -0,0 +1,62 @@ +package com.binarywang.wxjava.store.api.impl; + +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.SPU_GET_STOCK_BATCH_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.SPU_GET_STOCK_FLOW_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.SPU_GET_STOCK_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Spu.SPU_UPDATE_STOCK_URL; + +import java.util.List; +import com.binarywang.wxjava.store.api.WxStoreProductStockService; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; +import com.binarywang.wxjava.store.bean.product.SkuStockBatchParam; +import com.binarywang.wxjava.store.bean.product.SkuStockBatchResponse; +import com.binarywang.wxjava.store.bean.product.SkuStockParam; +import com.binarywang.wxjava.store.bean.product.SkuStockResponse; +import com.binarywang.wxjava.store.bean.product.stock.StockFlowParam; +import com.binarywang.wxjava.store.bean.product.stock.StockFlowResponse; +import com.binarywang.wxjava.store.util.JsonUtils; +import com.binarywang.wxjava.store.util.ResponseUtils; +import me.chanjar.weixin.common.error.WxErrorException; + +/** + * 微信小店商品库存服务实现。 + */ +public class WxStoreProductStockServiceImpl implements WxStoreProductStockService { + + private final BaseWxStoreServiceImpl shopService; + + public WxStoreProductStockServiceImpl(BaseWxStoreServiceImpl shopService) { + this.shopService = shopService; + } + + @Override + public WxStoreBaseResponse updateStock(String productId, String skuId, Integer diffType, Integer num) + throws WxErrorException { + SkuStockParam param = new SkuStockParam(productId, skuId, diffType, num); + String reqJson = JsonUtils.encode(param); + String resJson = shopService.post(SPU_UPDATE_STOCK_URL, reqJson); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public SkuStockResponse getSkuStock(String productId, String skuId) throws WxErrorException { + String reqJson = "{\"product_id\":\"" + productId + "\",\"sku_id\":\"" + skuId + "\"}"; + String resJson = shopService.post(SPU_GET_STOCK_URL, reqJson); + return ResponseUtils.decode(resJson, SkuStockResponse.class); + } + + @Override + public SkuStockBatchResponse getSkuStockBatch(List productIds) throws WxErrorException { + SkuStockBatchParam param = new SkuStockBatchParam(productIds); + String reqJson = JsonUtils.encode(param); + String resJson = shopService.post(SPU_GET_STOCK_BATCH_URL, reqJson); + return ResponseUtils.decode(resJson, SkuStockBatchResponse.class); + } + + @Override + public StockFlowResponse getStockFlow(StockFlowParam param) throws WxErrorException { + String reqJson = JsonUtils.encode(param); + String resJson = shopService.post(SPU_GET_STOCK_FLOW_URL, reqJson); + return ResponseUtils.decode(resJson, StockFlowResponse.class); + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreQicServiceImpl.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreQicServiceImpl.java new file mode 100644 index 0000000000..a7e1a789c9 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreQicServiceImpl.java @@ -0,0 +1,75 @@ +package com.binarywang.wxjava.store.api.impl; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import com.binarywang.wxjava.store.api.WxStoreQicService; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; +import com.binarywang.wxjava.store.bean.qic.InspectCodeResponse; +import com.binarywang.wxjava.store.bean.qic.InspectConfigResponse; +import com.binarywang.wxjava.store.bean.qic.RegisterLogisticsRequest; +import com.binarywang.wxjava.store.bean.qic.SubmitConfigResponse; +import com.binarywang.wxjava.store.bean.qic.SubmitInspectRequest; +import com.binarywang.wxjava.store.util.ResponseUtils; +import me.chanjar.weixin.common.error.WxErrorException; +import org.apache.commons.lang3.StringUtils; + +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Qic.GET_INSPECT_CONFIG_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Qic.GET_SUBMIT_CONFIG_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Qic.PRINT_INSPECT_CODE_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Qic.REGISTER_LOGISTICS_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Qic.SUBMIT_INSPECT_INFO_URL; + +/** + * 微信小店 质检管理服务实现. + */ +public class WxStoreQicServiceImpl implements WxStoreQicService { + private final BaseWxStoreServiceImpl shopService; + + public WxStoreQicServiceImpl(BaseWxStoreServiceImpl shopService) { + this.shopService = shopService; + } + + @Override + public InspectConfigResponse getInspectConfig() throws WxErrorException { + String respJson = shopService.get(GET_INSPECT_CONFIG_URL, null); + return ResponseUtils.decode(respJson, InspectConfigResponse.class); + } + + @Override + public SubmitConfigResponse getSubmitConfig(String orderId) throws WxErrorException { + String queryParam = StringUtils.isBlank(orderId) ? null : "order_id=" + orderId; + String respJson = shopService.get(GET_SUBMIT_CONFIG_URL, queryParam); + return ResponseUtils.decode(respJson, SubmitConfigResponse.class); + } + + @Override + public SubmitConfigResponse getSubmitConfig() throws WxErrorException { + return getSubmitConfig(null); + } + + @Override + public InspectCodeResponse printInspectCode(String orderId) throws WxErrorException { + String respJson = shopService.post(PRINT_INSPECT_CODE_URL, new PrintInspectCodeRequest(orderId)); + return ResponseUtils.decode(respJson, InspectCodeResponse.class); + } + + @Override + public WxStoreBaseResponse submitInspectInfo(SubmitInspectRequest request) throws WxErrorException { + String respJson = shopService.post(SUBMIT_INSPECT_INFO_URL, request); + return ResponseUtils.decode(respJson, WxStoreBaseResponse.class); + } + + @Override + public WxStoreBaseResponse registerLogistics(RegisterLogisticsRequest request) throws WxErrorException { + String respJson = shopService.post(REGISTER_LOGISTICS_URL, request); + return ResponseUtils.decode(respJson, WxStoreBaseResponse.class); + } + + @Data + @AllArgsConstructor + private static class PrintInspectCodeRequest { + @JsonProperty("order_id") + private String orderId; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreServiceHttpClientImpl.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreServiceHttpClientImpl.java new file mode 100644 index 0000000000..da7b190b65 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreServiceHttpClientImpl.java @@ -0,0 +1,118 @@ +package com.binarywang.wxjava.store.api.impl; + +import lombok.extern.slf4j.Slf4j; +import com.binarywang.wxjava.store.bean.token.StableTokenParam; +import com.binarywang.wxjava.store.config.WxStoreConfig; +import com.binarywang.wxjava.store.util.JsonUtils; +import me.chanjar.weixin.common.util.http.HttpClientType; +import me.chanjar.weixin.common.util.http.apache.ApacheBasicResponseHandler; +import me.chanjar.weixin.common.util.http.apache.ApacheHttpClientBuilder; +import me.chanjar.weixin.common.util.http.apache.DefaultApacheHttpClientBuilder; +import org.apache.commons.lang3.StringUtils; +import org.apache.http.HttpHost; +import org.apache.http.client.HttpClient; +import org.apache.http.client.config.RequestConfig; +import org.apache.http.client.methods.HttpGet; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.entity.ContentType; +import org.apache.http.entity.StringEntity; +import org.apache.http.impl.client.CloseableHttpClient; + +import java.io.IOException; + +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.GET_ACCESS_TOKEN_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.GET_STABLE_ACCESS_TOKEN_URL; + +/** + * @author Zeyes + */ +@Slf4j +public class WxStoreServiceHttpClientImpl extends BaseWxStoreServiceImpl { + + private CloseableHttpClient httpClient; + private HttpHost httpProxy; + + @Override + public void initHttp() { + WxStoreConfig config = this.getConfig(); + ApacheHttpClientBuilder apacheHttpClientBuilder = config.getApacheHttpClientBuilder(); + if (null == apacheHttpClientBuilder) { + apacheHttpClientBuilder = DefaultApacheHttpClientBuilder.get(); + } + + apacheHttpClientBuilder.httpProxyHost(config.getHttpProxyHost()) + .httpProxyPort(config.getHttpProxyPort()) + .httpProxyUsername(config.getHttpProxyUsername()) + .httpProxyPassword(config.getHttpProxyPassword()); + + if (config.getHttpProxyHost() != null && config.getHttpProxyPort() > 0) { + this.httpProxy = new HttpHost(config.getHttpProxyHost(), config.getHttpProxyPort()); + } + + this.httpClient = apacheHttpClientBuilder.build(); + } + + @Override + public CloseableHttpClient getRequestHttpClient() { + return httpClient; + } + + @Override + public HttpHost getRequestHttpProxy() { + return httpProxy; + } + + @Override + public HttpClientType getRequestType() { + return HttpClientType.APACHE_HTTP; + } + + @Override + protected String doGetAccessTokenRequest() throws IOException { + WxStoreConfig config = this.getConfig(); + String url = StringUtils.isNotEmpty(config.getAccessTokenUrl()) ? config.getAccessTokenUrl() : + StringUtils.isNotEmpty(config.getApiHostUrl()) ? + GET_ACCESS_TOKEN_URL.replace("https://api.weixin.qq.com", config.getApiHostUrl()) : GET_ACCESS_TOKEN_URL; + + url = String.format(url, config.getAppid(), config.getSecret()); + + HttpGet httpGet = new HttpGet(url); + if (this.getRequestHttpProxy() != null) { + RequestConfig requestConfig = RequestConfig.custom().setProxy(this.getRequestHttpProxy()).build(); + httpGet.setConfig(requestConfig); + } + return getRequestHttpClient().execute(httpGet, ApacheBasicResponseHandler.INSTANCE); + } + + /** + * 获取稳定版接口调用凭据 + * + * @param forceRefresh false 为普通模式, true为强制刷新模式 + * @return 返回json的字符串 + * @throws IOException the io exception + */ + @Override + protected String doGetStableAccessTokenRequest(boolean forceRefresh) throws IOException { + WxStoreConfig config = this.getConfig(); + String url = StringUtils.isNotEmpty(config.getAccessTokenUrl()) ? + config.getAccessTokenUrl() : StringUtils.isNotEmpty(config.getApiHostUrl()) ? + GET_STABLE_ACCESS_TOKEN_URL.replace("https://api.weixin.qq.com", config.getApiHostUrl()) : + GET_STABLE_ACCESS_TOKEN_URL; + + HttpPost httpPost = new HttpPost(url); + if (this.getRequestHttpProxy() != null) { + RequestConfig requestConfig = RequestConfig.custom().setProxy(this.getRequestHttpProxy()).build(); + httpPost.setConfig(requestConfig); + } + StableTokenParam requestParam = new StableTokenParam(); + requestParam.setAppId(config.getAppid()); + requestParam.setSecret(config.getSecret()); + requestParam.setGrantType("client_credential"); + requestParam.setForceRefresh(forceRefresh); + String requestJson = JsonUtils.encode(requestParam); + assert requestJson != null; + + httpPost.setEntity(new StringEntity(requestJson, ContentType.APPLICATION_JSON)); + return getRequestHttpClient().execute(httpPost, ApacheBasicResponseHandler.INSTANCE); + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreServiceHttpComponentsImpl.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreServiceHttpComponentsImpl.java new file mode 100644 index 0000000000..c5d80b348a --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreServiceHttpComponentsImpl.java @@ -0,0 +1,115 @@ +package com.binarywang.wxjava.store.api.impl; + +import lombok.extern.slf4j.Slf4j; +import com.binarywang.wxjava.store.bean.token.StableTokenParam; +import com.binarywang.wxjava.store.config.WxStoreConfig; +import com.binarywang.wxjava.store.util.JsonUtils; +import me.chanjar.weixin.common.util.http.HttpClientType; +import me.chanjar.weixin.common.util.http.hc.BasicResponseHandler; +import me.chanjar.weixin.common.util.http.hc.DefaultHttpComponentsClientBuilder; +import me.chanjar.weixin.common.util.http.hc.HttpComponentsClientBuilder; +import org.apache.commons.lang3.StringUtils; +import org.apache.hc.client5.http.classic.HttpClient; +import org.apache.hc.client5.http.classic.methods.HttpGet; +import org.apache.hc.client5.http.classic.methods.HttpPost; +import org.apache.hc.client5.http.config.RequestConfig; +import org.apache.hc.client5.http.impl.classic.CloseableHttpClient; +import org.apache.hc.core5.http.ContentType; +import org.apache.hc.core5.http.HttpHost; +import org.apache.hc.core5.http.io.entity.StringEntity; + +import java.io.IOException; + +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.GET_ACCESS_TOKEN_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.GET_STABLE_ACCESS_TOKEN_URL; + +/** + * @author altusea + */ +@Slf4j +public class WxStoreServiceHttpComponentsImpl extends BaseWxStoreServiceImpl { + + private CloseableHttpClient httpClient; + private HttpHost httpProxy; + + @Override + public void initHttp() { + WxStoreConfig config = this.getConfig(); + HttpComponentsClientBuilder apacheHttpClientBuilder = DefaultHttpComponentsClientBuilder.get(); + + apacheHttpClientBuilder.httpProxyHost(config.getHttpProxyHost()) + .httpProxyPort(config.getHttpProxyPort()) + .httpProxyUsername(config.getHttpProxyUsername()) + .httpProxyPassword(config.getHttpProxyPassword() == null ? null : config.getHttpProxyPassword().toCharArray()); + + if (config.getHttpProxyHost() != null && config.getHttpProxyPort() > 0) { + this.httpProxy = new HttpHost(config.getHttpProxyHost(), config.getHttpProxyPort()); + } + + this.httpClient = apacheHttpClientBuilder.build(); + } + + @Override + public CloseableHttpClient getRequestHttpClient() { + return httpClient; + } + + @Override + public HttpHost getRequestHttpProxy() { + return httpProxy; + } + + @Override + public HttpClientType getRequestType() { + return HttpClientType.HTTP_COMPONENTS; + } + + @Override + protected String doGetAccessTokenRequest() throws IOException { + WxStoreConfig config = this.getConfig(); + String url = StringUtils.isNotEmpty(config.getAccessTokenUrl()) ? config.getAccessTokenUrl() : + StringUtils.isNotEmpty(config.getApiHostUrl()) ? + GET_ACCESS_TOKEN_URL.replace("https://api.weixin.qq.com", config.getApiHostUrl()) : GET_ACCESS_TOKEN_URL; + + url = String.format(url, config.getAppid(), config.getSecret()); + + HttpGet httpGet = new HttpGet(url); + if (this.getRequestHttpProxy() != null) { + RequestConfig requestConfig = RequestConfig.custom().setProxy(this.getRequestHttpProxy()).build(); + httpGet.setConfig(requestConfig); + } + return getRequestHttpClient().execute(httpGet, BasicResponseHandler.INSTANCE); + } + + /** + * 获取稳定版接口调用凭据 + * + * @param forceRefresh false 为普通模式, true为强制刷新模式 + * @return 返回json的字符串 + * @throws IOException the io exception + */ + @Override + protected String doGetStableAccessTokenRequest(boolean forceRefresh) throws IOException { + WxStoreConfig config = this.getConfig(); + String url = StringUtils.isNotEmpty(config.getAccessTokenUrl()) ? + config.getAccessTokenUrl() : StringUtils.isNotEmpty(config.getApiHostUrl()) ? + GET_STABLE_ACCESS_TOKEN_URL.replace("https://api.weixin.qq.com", config.getApiHostUrl()) : + GET_STABLE_ACCESS_TOKEN_URL; + + HttpPost httpPost = new HttpPost(url); + if (this.getRequestHttpProxy() != null) { + RequestConfig requestConfig = RequestConfig.custom().setProxy(this.getRequestHttpProxy()).build(); + httpPost.setConfig(requestConfig); + } + StableTokenParam requestParam = new StableTokenParam(); + requestParam.setAppId(config.getAppid()); + requestParam.setSecret(config.getSecret()); + requestParam.setGrantType("client_credential"); + requestParam.setForceRefresh(forceRefresh); + String requestJson = JsonUtils.encode(requestParam); + assert requestJson != null; + + httpPost.setEntity(new StringEntity(requestJson, ContentType.APPLICATION_JSON)); + return getRequestHttpClient().execute(httpPost, BasicResponseHandler.INSTANCE); + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreServiceImpl.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreServiceImpl.java new file mode 100644 index 0000000000..e299ae0096 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreServiceImpl.java @@ -0,0 +1,26 @@ +package com.binarywang.wxjava.store.api.impl; + +import lombok.extern.slf4j.Slf4j; + +/** + * 微信小店服务实现 + * + * @author Zeyes + */ +@Slf4j +public class WxStoreServiceImpl extends WxStoreServiceHttpClientImpl { + + public WxStoreServiceImpl() { + } + +// /** +// * 设置获取access_token接口参数. +// * +// * @param stabled false 表示调用普通模式AccessToken接口, true调用稳定模式接口 +// * @param forceRefresh stabled=true使用, true表示强制刷新模式 +// * @deprecated 请使用 {@link BaseWxStoreServiceImpl#setConfig(WxStoreConfig) } 替代 +// */ +// @Deprecated +// public WxStoreServiceImpl(Boolean stabled, Boolean forceRefresh) { +// } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreServiceOkHttpImpl.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreServiceOkHttpImpl.java new file mode 100644 index 0000000000..4d85f5034d --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreServiceOkHttpImpl.java @@ -0,0 +1,109 @@ +package com.binarywang.wxjava.store.api.impl; + +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.GET_ACCESS_TOKEN_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.GET_STABLE_ACCESS_TOKEN_URL; + +import java.io.IOException; +import java.util.Objects; +import lombok.extern.slf4j.Slf4j; +import com.binarywang.wxjava.store.bean.token.StableTokenParam; +import com.binarywang.wxjava.store.config.WxStoreConfig; +import com.binarywang.wxjava.store.util.JsonUtils; +import me.chanjar.weixin.common.util.http.HttpClientType; +import me.chanjar.weixin.common.util.http.okhttp.DefaultOkHttpClientBuilder; +import me.chanjar.weixin.common.util.http.okhttp.OkHttpProxyInfo; +import okhttp3.Authenticator; +import okhttp3.Credentials; +import okhttp3.MediaType; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.RequestBody; +import okhttp3.Response; +import okhttp3.Route; +import org.apache.commons.lang3.StringUtils; + +/** + * @author : zhenyun.su + * @since : 2024/2/27 + */ +@Slf4j +public class WxStoreServiceOkHttpImpl extends BaseWxStoreServiceImpl { + private OkHttpClient httpClient; + private OkHttpProxyInfo httpProxy; + + public WxStoreServiceOkHttpImpl() { + } + + @Override + public void initHttp() { + log.debug("WxStoreServiceOkHttpImpl initHttp"); + if (this.config.getHttpProxyHost() != null && this.config.getHttpProxyPort() > 0) { + this.httpProxy = OkHttpProxyInfo.httpProxy(this.config.getHttpProxyHost(), this.config.getHttpProxyPort(), this.config.getHttpProxyUsername(), this.config.getHttpProxyPassword()); + okhttp3.OkHttpClient.Builder clientBuilder = new okhttp3.OkHttpClient.Builder(); + clientBuilder.proxy(this.getRequestHttpProxy().getProxy()); + clientBuilder.proxyAuthenticator(new Authenticator() { + @Override + public Request authenticate(Route route, Response response) throws IOException { + String credential = Credentials.basic(WxStoreServiceOkHttpImpl.this.httpProxy.getProxyUsername(), WxStoreServiceOkHttpImpl.this.httpProxy.getProxyPassword()); + return response.request().newBuilder().header("Proxy-Authorization", credential).build(); + } + }); + this.httpClient = clientBuilder.build(); + } else { + this.httpClient = DefaultOkHttpClientBuilder.get().build(); + } + } + + @Override + public OkHttpClient getRequestHttpClient() { + return this.httpClient; + } + + @Override + public OkHttpProxyInfo getRequestHttpProxy() { + return this.httpProxy; + } + + @Override + public HttpClientType getRequestType() { + return HttpClientType.OK_HTTP; + } + + @Override + protected String doGetAccessTokenRequest() throws IOException { + WxStoreConfig config = this.getConfig(); + String url = StringUtils.isNotEmpty(config.getAccessTokenUrl()) ? config.getAccessTokenUrl() : + StringUtils.isNotEmpty(config.getApiHostUrl()) ? + GET_ACCESS_TOKEN_URL.replace("https://api.weixin.qq.com", config.getApiHostUrl()) : GET_ACCESS_TOKEN_URL; + + url = String.format(url, config.getAppid(), config.getSecret()); + + Request request = new Request.Builder().url(url).get().build(); + try (Response response = getRequestHttpClient().newCall(request).execute()) { + return Objects.requireNonNull(response.body()).string(); + } + } + + @Override + protected String doGetStableAccessTokenRequest(boolean forceRefresh) throws IOException { + WxStoreConfig config = this.getConfig(); + String url = StringUtils.isNotEmpty(config.getAccessTokenUrl()) ? + config.getAccessTokenUrl() : StringUtils.isNotEmpty(config.getApiHostUrl()) ? + GET_STABLE_ACCESS_TOKEN_URL.replace("https://api.weixin.qq.com", config.getApiHostUrl()) : + GET_STABLE_ACCESS_TOKEN_URL; + + StableTokenParam requestParam = new StableTokenParam(); + requestParam.setAppId(config.getAppid()); + requestParam.setSecret(config.getSecret()); + requestParam.setGrantType("client_credential"); + requestParam.setForceRefresh(forceRefresh); + String requestJson = JsonUtils.encode(requestParam); + assert requestJson != null; + + RequestBody body = RequestBody.Companion.create(requestJson, MediaType.parse("application/json; charset=utf-8")); + Request request = new Request.Builder().url(url).post(body).build(); + try (Response response = getRequestHttpClient().newCall(request).execute()) { + return Objects.requireNonNull(response.body()).string(); + } + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreSharerServiceImpl.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreSharerServiceImpl.java new file mode 100644 index 0000000000..c1931ad35b --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreSharerServiceImpl.java @@ -0,0 +1,76 @@ +package com.binarywang.wxjava.store.api.impl; + + +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Share.BIND_SHARER_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Share.LIST_SHARER_ORDER_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Share.LIST_SHARER_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Share.SEARCH_SHARER_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Share.UNBIND_SHARER_URL; + +import com.google.gson.JsonObject; +import java.util.List; +import lombok.extern.slf4j.Slf4j; +import com.binarywang.wxjava.store.api.WxStoreSharerService; +import com.binarywang.wxjava.store.bean.sharer.SharerBindResponse; +import com.binarywang.wxjava.store.bean.sharer.SharerInfoResponse; +import com.binarywang.wxjava.store.bean.sharer.SharerListParam; +import com.binarywang.wxjava.store.bean.sharer.SharerOrderParam; +import com.binarywang.wxjava.store.bean.sharer.SharerOrderResponse; +import com.binarywang.wxjava.store.bean.sharer.SharerSearchParam; +import com.binarywang.wxjava.store.bean.sharer.SharerSearchResponse; +import com.binarywang.wxjava.store.bean.sharer.SharerUnbindParam; +import com.binarywang.wxjava.store.bean.sharer.SharerUnbindResponse; +import com.binarywang.wxjava.store.util.ResponseUtils; +import me.chanjar.weixin.common.error.WxErrorException; +import me.chanjar.weixin.common.util.json.GsonHelper; + +/** + * 微信小店 分享员服务实现 + * + * @author Zeyes + */ +@Slf4j +public class WxStoreSharerServiceImpl implements WxStoreSharerService { + + /** 微信商店服务 */ + private final BaseWxStoreServiceImpl shopService; + + public WxStoreSharerServiceImpl(BaseWxStoreServiceImpl shopService) { + this.shopService = shopService; + } + + @Override + public SharerBindResponse bindSharer(String username) throws WxErrorException { + JsonObject jsonObject = GsonHelper.buildJsonObject("username", username); + + String resJson = shopService.post(BIND_SHARER_URL, jsonObject); + return ResponseUtils.decode(resJson, SharerBindResponse.class); + } + + @Override + public SharerSearchResponse searchSharer(String openid, String username) throws WxErrorException { + SharerSearchParam param = new SharerSearchParam(openid, username); + String resJson = shopService.post(SEARCH_SHARER_URL, param); + return ResponseUtils.decode(resJson, SharerSearchResponse.class); + } + + @Override + public SharerInfoResponse listSharer(Integer page, Integer pageSize, Integer sharerType) throws WxErrorException { + SharerListParam param = new SharerListParam(page, pageSize, sharerType); + String resJson = shopService.post(LIST_SHARER_URL, param); + return ResponseUtils.decode(resJson, SharerInfoResponse.class); + } + + @Override + public SharerOrderResponse listSharerOrder(SharerOrderParam param) throws WxErrorException { + String resJson = shopService.post(LIST_SHARER_ORDER_URL, param); + return ResponseUtils.decode(resJson, SharerOrderResponse.class); + } + + @Override + public SharerUnbindResponse unbindSharer(List openIds) throws WxErrorException { + SharerUnbindParam param = new SharerUnbindParam(openIds); + String resJson = shopService.post(UNBIND_SHARER_URL, param); + return ResponseUtils.decode(resJson, SharerUnbindResponse.class); + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreSupplierServiceImpl.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreSupplierServiceImpl.java new file mode 100644 index 0000000000..b2ee971fd6 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreSupplierServiceImpl.java @@ -0,0 +1,132 @@ +package com.binarywang.wxjava.store.api.impl; + +import com.google.gson.JsonObject; +import lombok.extern.slf4j.Slf4j; +import com.binarywang.wxjava.store.api.WxStoreSupplierService; +import com.binarywang.wxjava.store.bean.base.StreamPageParam; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; +import com.binarywang.wxjava.store.bean.supplier.DistributeTypeResponse; +import com.binarywang.wxjava.store.bean.supplier.DropshipAssignRequest; +import com.binarywang.wxjava.store.bean.supplier.DropshipDetailResponse; +import com.binarywang.wxjava.store.bean.supplier.DropshipListRequest; +import com.binarywang.wxjava.store.bean.supplier.DropshipListResponse; +import com.binarywang.wxjava.store.bean.supplier.DropshipResponse; +import com.binarywang.wxjava.store.bean.supplier.DropshipSearchRequest; +import com.binarywang.wxjava.store.bean.supplier.ProductDistributeRequest; +import com.binarywang.wxjava.store.bean.supplier.ProductListResponse; +import com.binarywang.wxjava.store.bean.supplier.SupplierInfoResponse; +import com.binarywang.wxjava.store.bean.supplier.SupplierListResponse; +import com.binarywang.wxjava.store.util.ResponseUtils; +import me.chanjar.weixin.common.error.WxErrorException; +import me.chanjar.weixin.common.util.json.GsonHelper; + +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Supplier.ASSIGN_DROPSHIP_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Supplier.CANCEL_DROPSHIP_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Supplier.GET_DISTRIBUTE_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Supplier.GET_DROPSHIP_LIST_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Supplier.GET_DROPSHIP_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Supplier.GET_PRODUCT_DEFAULT_DISTRIBUTE_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Supplier.GET_PRODUCT_LIST_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Supplier.GET_SUPPLIER_LIST_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Supplier.SEARCH_DROPSHIP_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Supplier.SET_ALL_DISTRIBUTION_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Supplier.SET_MANUALLY_DISTRIBUTE_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Supplier.SET_PRODUCT_DISTRIBUTE_URL; + +/** + * 微信小店代发管理服务。 + * + * @author GitHub Copilot + */ +@Slf4j +public class WxStoreSupplierServiceImpl implements WxStoreSupplierService { + + private final BaseWxStoreServiceImpl shopService; + + public WxStoreSupplierServiceImpl(BaseWxStoreServiceImpl shopService) { + this.shopService = shopService; + } + + @Override + public SupplierListResponse getSupplierList() throws WxErrorException { + return getSupplierList(null, null); + } + + @Override + public SupplierListResponse getSupplierList(Integer pageSize, String nextKey) throws WxErrorException { + StreamPageParam param = new StreamPageParam(pageSize, nextKey); + String respJson = shopService.post(GET_SUPPLIER_LIST_URL, param); + return ResponseUtils.decode(respJson, SupplierListResponse.class); + } + + @Override + public DistributeTypeResponse getDistribute() throws WxErrorException { + String respJson = shopService.post(GET_DISTRIBUTE_URL, "{}"); + return ResponseUtils.decode(respJson, DistributeTypeResponse.class); + } + + @Override + public WxStoreBaseResponse setManuallyDistribute() throws WxErrorException { + String respJson = shopService.post(SET_MANUALLY_DISTRIBUTE_URL, "{}"); + return ResponseUtils.decode(respJson, WxStoreBaseResponse.class); + } + + @Override + public WxStoreBaseResponse setAllDistribute(String supplierId) throws WxErrorException { + JsonObject req = GsonHelper.buildJsonObject("supplier_id", supplierId); + String respJson = shopService.post(SET_ALL_DISTRIBUTION_URL, req); + return ResponseUtils.decode(respJson, WxStoreBaseResponse.class); + } + + @Override + public WxStoreBaseResponse setProductDistribute(ProductDistributeRequest req) throws WxErrorException { + String respJson = shopService.post(SET_PRODUCT_DISTRIBUTE_URL, req); + return ResponseUtils.decode(respJson, WxStoreBaseResponse.class); + } + + @Override + public SupplierInfoResponse getProductDefaultDistribute(String productId) throws WxErrorException { + JsonObject req = GsonHelper.buildJsonObject("product_id", productId); + String respJson = shopService.post(GET_PRODUCT_DEFAULT_DISTRIBUTE_URL, req); + return ResponseUtils.decode(respJson, SupplierInfoResponse.class); + } + + @Override + public ProductListResponse getProductList(String supplierId) throws WxErrorException { + JsonObject req = GsonHelper.buildJsonObject("supplier_id", supplierId); + String respJson = shopService.post(GET_PRODUCT_LIST_URL, req); + return ResponseUtils.decode(respJson, ProductListResponse.class); + } + + @Override + public DropshipResponse assignOrder(DropshipAssignRequest req) throws WxErrorException { + String respJson = shopService.post(ASSIGN_DROPSHIP_URL, req); + return ResponseUtils.decode(respJson, DropshipResponse.class); + } + + @Override + public WxStoreBaseResponse cancelDropship(String orderId) throws WxErrorException { + JsonObject req = GsonHelper.buildJsonObject("order_id", orderId); + String respJson = shopService.post(CANCEL_DROPSHIP_URL, req); + return ResponseUtils.decode(respJson, WxStoreBaseResponse.class); + } + + @Override + public DropshipDetailResponse getDropship(String orderId) throws WxErrorException { + JsonObject req = GsonHelper.buildJsonObject("order_id", orderId); + String respJson = shopService.post(GET_DROPSHIP_URL, req); + return ResponseUtils.decode(respJson, DropshipDetailResponse.class); + } + + @Override + public DropshipListResponse listDropship(DropshipListRequest req) throws WxErrorException { + String respJson = shopService.post(GET_DROPSHIP_LIST_URL, req); + return ResponseUtils.decode(respJson, DropshipListResponse.class); + } + + @Override + public DropshipListResponse searchDropship(DropshipSearchRequest req) throws WxErrorException { + String respJson = shopService.post(SEARCH_DROPSHIP_URL, req); + return ResponseUtils.decode(respJson, DropshipListResponse.class); + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreVipServiceImpl.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreVipServiceImpl.java new file mode 100644 index 0000000000..b9ac9a8bf1 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreVipServiceImpl.java @@ -0,0 +1,68 @@ +package com.binarywang.wxjava.store.api.impl; + +import lombok.extern.slf4j.Slf4j; +import com.binarywang.wxjava.store.api.WxStoreVipService; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; +import com.binarywang.wxjava.store.bean.vip.*; +import com.binarywang.wxjava.store.util.ResponseUtils; +import me.chanjar.weixin.common.error.WxErrorException; + +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Vip.*; + +/** + * 微信小店 会员功能接口 + * + * @author aushiye + * @link 会员功能接口文档 + */ + +@Slf4j +public class WxStoreVipServiceImpl implements WxStoreVipService { + private final BaseWxStoreServiceImpl shopService; + + public WxStoreVipServiceImpl(BaseWxStoreServiceImpl shopService) { + this.shopService = shopService; + } + + @Override + public VipInfoResponse getVipInfo(String openId, Boolean needPhoneNumber) throws WxErrorException { + VipInfoParam param = new VipInfoParam(openId, needPhoneNumber); + String respJson = shopService.post(VIP_USER_INFO_URL, param); + return ResponseUtils.decode(respJson, VipInfoResponse.class); + } + + @Override + public VipListResponse getVipList(Boolean needPhoneNumber, Integer pageNum, Integer pageSize) throws WxErrorException { + VipListParam param = new VipListParam(needPhoneNumber, pageNum, pageSize); + String respJson = shopService.post(VIP_USER_LIST_URL, param); + return ResponseUtils.decode(respJson, VipListResponse.class); + } + + @Override + public VipScoreResponse getVipScore(String openId) throws WxErrorException { + VipOpenIdParam param = new VipOpenIdParam(openId); + String respJson = shopService.post(VIP_SCORE_URL, param); + return ResponseUtils.decode(respJson, VipScoreResponse.class); + } + + @Override + public WxStoreBaseResponse increaseVipScore(String openId, String score, String remark, String requestId) throws WxErrorException { + VipScoreParam param = new VipScoreParam(openId, score, remark, requestId); + String respJson = shopService.post(SCORE_INCREASE_URL, param); + return ResponseUtils.decode(respJson, WxStoreBaseResponse.class); + } + + @Override + public WxStoreBaseResponse decreaseVipScore(String openId, String score, String remark, String requestId) throws WxErrorException { + VipScoreParam param = new VipScoreParam(openId, score, remark, requestId); + String respJson = shopService.post(SCORE_DECREASE_URL, param); + return ResponseUtils.decode(respJson, WxStoreBaseResponse.class); + } + + @Override + public WxStoreBaseResponse updateVipGrade(String openId, Integer score) throws WxErrorException { + VipGradeParam param = new VipGradeParam(openId, score); + String respJson = shopService.post(GRADE_UPDATE_URL, param); + return ResponseUtils.decode(respJson, WxStoreBaseResponse.class); + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreWarehouseServiceImpl.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreWarehouseServiceImpl.java new file mode 100644 index 0000000000..c6cb3e0849 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxStoreWarehouseServiceImpl.java @@ -0,0 +1,123 @@ +package com.binarywang.wxjava.store.api.impl; + + +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Warehouse.ADD_COVER_AREA_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Warehouse.ADD_WAREHOUSE_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Warehouse.DELETE_COVER_AREA_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Warehouse.GET_WAREHOUSE_PRIORITY_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Warehouse.GET_WAREHOUSE_STOCK_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Warehouse.GET_WAREHOUSE_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Warehouse.LIST_WAREHOUSE_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Warehouse.SET_WAREHOUSE_PRIORITY_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Warehouse.UPDATE_WAREHOUSE_STOCK_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Warehouse.UPDATE_WAREHOUSE_URL; + +import java.util.List; +import lombok.extern.slf4j.Slf4j; +import com.binarywang.wxjava.store.api.WxStoreWarehouseService; +import com.binarywang.wxjava.store.bean.base.StreamPageParam; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; +import com.binarywang.wxjava.store.bean.warehouse.LocationPriorityResponse; +import com.binarywang.wxjava.store.bean.warehouse.PriorityLocationParam; +import com.binarywang.wxjava.store.bean.warehouse.StockGetParam; +import com.binarywang.wxjava.store.bean.warehouse.UpdateLocationParam; +import com.binarywang.wxjava.store.bean.warehouse.WarehouseIdsResponse; +import com.binarywang.wxjava.store.bean.warehouse.WarehouseLocation; +import com.binarywang.wxjava.store.bean.warehouse.WarehouseLocationParam; +import com.binarywang.wxjava.store.bean.warehouse.WarehouseParam; +import com.binarywang.wxjava.store.bean.warehouse.WarehouseResponse; +import com.binarywang.wxjava.store.bean.warehouse.WarehouseStockParam; +import com.binarywang.wxjava.store.bean.warehouse.WarehouseStockResponse; +import com.binarywang.wxjava.store.util.ResponseUtils; +import me.chanjar.weixin.common.error.WxErrorException; + +/** + * 微信小店 区域仓库服务实现 + * + * @author Zeyes + */ +@Slf4j +public class WxStoreWarehouseServiceImpl implements WxStoreWarehouseService { + + /** 微信商店服务 */ + private final BaseWxStoreServiceImpl shopService; + + public WxStoreWarehouseServiceImpl(BaseWxStoreServiceImpl shopService) { + this.shopService = shopService; + } + + @Override + public WxStoreBaseResponse createWarehouse(WarehouseParam param) throws WxErrorException { + String resJson = shopService.post(ADD_WAREHOUSE_URL, param); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public WarehouseIdsResponse listWarehouse(Integer pageSize, String nextKey) throws WxErrorException { + StreamPageParam param = new StreamPageParam(pageSize, nextKey); + String resJson = shopService.post(LIST_WAREHOUSE_URL, param); + return ResponseUtils.decode(resJson, WarehouseIdsResponse.class); + } + + @Override + public WarehouseResponse getWarehouse(String outWarehouseId) throws WxErrorException { + String reqJson = "{\"out_warehouse_id\":\"" + outWarehouseId + "\"}"; + String resJson = shopService.post(GET_WAREHOUSE_URL, reqJson); + return ResponseUtils.decode(resJson, WarehouseResponse.class); + } + + @Override + public WxStoreBaseResponse updateWarehouse(String outWarehouseId, String name, String intro) + throws WxErrorException { + String reqJson = "{\"out_warehouse_id\":\"" + outWarehouseId + + "\",\"name\":\"" + name + "\",\"intro\":\"" + intro + "\"}"; + String resJson = shopService.post(UPDATE_WAREHOUSE_URL, reqJson); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public WxStoreBaseResponse addWarehouseArea(String outWarehouseId, List coverLocations) + throws WxErrorException { + UpdateLocationParam param = new UpdateLocationParam(outWarehouseId, coverLocations); + String resJson = shopService.post(ADD_COVER_AREA_URL, param); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public WxStoreBaseResponse deleteWarehouseArea(String outWarehouseId, List coverLocations) + throws WxErrorException { + UpdateLocationParam param = new UpdateLocationParam(outWarehouseId, coverLocations); + String resJson = shopService.post(DELETE_COVER_AREA_URL, param); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + + } + + @Override + public WxStoreBaseResponse setWarehousePriority(PriorityLocationParam param) throws WxErrorException { + String resJson = shopService.post(SET_WAREHOUSE_PRIORITY_URL, param); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + + } + + @Override + public LocationPriorityResponse getWarehousePriority(Integer addressId1, Integer addressId2, Integer addressId3, + Integer addressId4) throws WxErrorException { + WarehouseLocationParam param = new WarehouseLocationParam(addressId1, addressId2, addressId3, addressId4); + String resJson = shopService.post(GET_WAREHOUSE_PRIORITY_URL, param); + return ResponseUtils.decode(resJson, LocationPriorityResponse.class); + } + + @Override + public WxStoreBaseResponse updateWarehouseStock(WarehouseStockParam param) throws WxErrorException { + String resJson = shopService.post(UPDATE_WAREHOUSE_STOCK_URL, param); + return ResponseUtils.decode(resJson, WxStoreBaseResponse.class); + } + + @Override + public WarehouseStockResponse getWarehouseStock(String productId, String skuId, String outWarehouseId) + throws WxErrorException { + StockGetParam param = new StockGetParam(productId, skuId, outWarehouseId); + String resJson = shopService.post(GET_WAREHOUSE_STOCK_URL, param); + return ResponseUtils.decode(resJson, WarehouseStockResponse.class); + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxTalentServiceImpl.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxTalentServiceImpl.java new file mode 100644 index 0000000000..1b9f6fe34d --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/api/impl/WxTalentServiceImpl.java @@ -0,0 +1,59 @@ +package com.binarywang.wxjava.store.api.impl; + +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import com.binarywang.wxjava.store.api.WxTalentService; +import com.binarywang.wxjava.store.bean.talent.TalentOrderDetailParam; +import com.binarywang.wxjava.store.bean.talent.TalentOrderDetailResponse; +import com.binarywang.wxjava.store.bean.talent.TalentOrderListParam; +import com.binarywang.wxjava.store.bean.talent.TalentOrderListResponse; +import com.binarywang.wxjava.store.bean.talent.TalentWindowProductDetailParam; +import com.binarywang.wxjava.store.bean.talent.TalentWindowProductDetailResponse; +import com.binarywang.wxjava.store.bean.talent.TalentWindowProductListParam; +import com.binarywang.wxjava.store.bean.talent.TalentWindowProductListResponse; +import com.binarywang.wxjava.store.util.ResponseUtils; +import me.chanjar.weixin.common.error.WxErrorException; + +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Talent.GET_ORDER_DETAIL_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Talent.GET_ORDER_LIST_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Talent.GET_WINDOW_PRODUCT_DETAIL_URL; +import static com.binarywang.wxjava.store.constant.WxStoreApiUrlConstants.Talent.GET_WINDOW_PRODUCT_LIST_URL; + +/** + * 微信小店-带货助手服务实现 + * + * @author GitHub Copilot + */ +@RequiredArgsConstructor +@Slf4j +public class WxTalentServiceImpl implements WxTalentService { + + /** 微信商店服务 */ + private final BaseWxStoreServiceImpl shopService; + + @Override + public TalentOrderListResponse getOrderList(TalentOrderListParam param) throws WxErrorException { + String resJson = shopService.post(GET_ORDER_LIST_URL, param); + return ResponseUtils.decode(resJson, TalentOrderListResponse.class); + } + + @Override + public TalentOrderDetailResponse getOrderDetail(TalentOrderDetailParam param) throws WxErrorException { + String resJson = shopService.post(GET_ORDER_DETAIL_URL, param); + return ResponseUtils.decode(resJson, TalentOrderDetailResponse.class); + } + + @Override + public TalentWindowProductListResponse getWindowProductList(TalentWindowProductListParam param) + throws WxErrorException { + String resJson = shopService.post(GET_WINDOW_PRODUCT_LIST_URL, param); + return ResponseUtils.decode(resJson, TalentWindowProductListResponse.class); + } + + @Override + public TalentWindowProductDetailResponse getWindowProductDetail(TalentWindowProductDetailParam param) + throws WxErrorException { + String resJson = shopService.post(GET_WINDOW_PRODUCT_DETAIL_URL, param); + return ResponseUtils.decode(resJson, TalentWindowProductDetailResponse.class); + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/address/AddressAddParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/address/AddressAddParam.java new file mode 100644 index 0000000000..3a42f516fe --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/address/AddressAddParam.java @@ -0,0 +1,27 @@ +package com.binarywang.wxjava.store.bean.address; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 地址 请求参数 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@JsonInclude(Include.NON_NULL) +public class AddressAddParam implements Serializable { + + private static final long serialVersionUID = 6778585213498438738L; + + /** 地址id */ + @JsonProperty("address_detail") + private AddressDetail addressDetail; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/address/AddressCode.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/address/AddressCode.java new file mode 100644 index 0000000000..c55e191027 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/address/AddressCode.java @@ -0,0 +1,30 @@ +package com.binarywang.wxjava.store.bean.address; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 地址编码 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class AddressCode implements Serializable { + + private static final long serialVersionUID = -6782328785056142627L; + + /** 地址名称 */ + @JsonProperty("name") + private String name; + + /** 地址行政编码 */ + @JsonProperty("code") + private Integer code; + + /** 地址级别 1-省级 2-市级 3-区县级 4-街道 */ + @JsonProperty("level") + private Integer level; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/address/AddressCodeResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/address/AddressCodeResponse.java new file mode 100644 index 0000000000..8c9ae786e8 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/address/AddressCodeResponse.java @@ -0,0 +1,29 @@ +package com.binarywang.wxjava.store.bean.address; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 地址编码 响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class AddressCodeResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = -8994407971295563982L; + + /** 本行政编码地址信息 */ + @JsonProperty("addrs_msg") + private AddressCode current; + + /** 下一级所有地址信息 */ + @JsonProperty("next_level_addrs") + private List list; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/address/AddressDetail.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/address/AddressDetail.java new file mode 100644 index 0000000000..8ef5a3ff52 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/address/AddressDetail.java @@ -0,0 +1,66 @@ +package com.binarywang.wxjava.store.bean.address; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.AddressInfo; + +/** + * 用户地址 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@JsonInclude(JsonInclude.Include.NON_NULL) +public class AddressDetail implements Serializable { + + private static final long serialVersionUID = -7839578838482198641L; + + /** 地址id */ + @JsonProperty("address_id") + private String addressId; + + /** 联系人姓名 */ + @JsonProperty("name") + private String name; + + /** 地区信息 */ + @JsonProperty("address_info") + private AddressInfo addressInfo; + + /** 座机 */ + @JsonProperty("landline") + private String landline; + + /** 是否为发货地址 */ + @JsonProperty("send_addr") + private Boolean sendAddr; + + /** 是否为收货地址 */ + @JsonProperty("recv_addr") + private Boolean recvAddr; + + /** 是否为默认发货地址 */ + @JsonProperty("default_send") + private Boolean defaultSend; + + /** 是否为默认收货地址 */ + @JsonProperty("default_recv") + private Boolean defaultRecv; + + /** 创建时间戳(秒) */ + @JsonProperty("create_time") + private Long createTime; + + /** 更新时间戳(秒) */ + @JsonProperty("update_time") + private Long updateTime; + + /** 线下配送地址类型 */ + @JsonProperty("address_type") + private OfflineAddressType addressType; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/address/AddressIdParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/address/AddressIdParam.java new file mode 100644 index 0000000000..a20e60ed79 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/address/AddressIdParam.java @@ -0,0 +1,27 @@ +package com.binarywang.wxjava.store.bean.address; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 地址id 请求参数 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@JsonInclude(Include.NON_NULL) +public class AddressIdParam implements Serializable { + + private static final long serialVersionUID = -7001183932180608746L; + + /** 地址id */ + @JsonProperty("address_id") + private String addressId; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/address/AddressIdResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/address/AddressIdResponse.java new file mode 100644 index 0000000000..2536447627 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/address/AddressIdResponse.java @@ -0,0 +1,26 @@ +package com.binarywang.wxjava.store.bean.address; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 地址id 响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class AddressIdResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = -9218327846685744008L; + + /** 地址id */ + @JsonProperty("address_id") + private String addressId; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/address/AddressInfoResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/address/AddressInfoResponse.java new file mode 100644 index 0000000000..3022da0230 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/address/AddressInfoResponse.java @@ -0,0 +1,24 @@ +package com.binarywang.wxjava.store.bean.address; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 地址id 响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class AddressInfoResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 8203853673226715673L; + + /** 地址详情 */ + @JsonProperty("address_detail") + private AddressDetail addressDetail; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/address/AddressListParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/address/AddressListParam.java new file mode 100644 index 0000000000..d65ea34460 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/address/AddressListParam.java @@ -0,0 +1,26 @@ +package com.binarywang.wxjava.store.bean.address; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.OffsetParam; + +/** + * 用户地址 列表 请求参数 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@JsonInclude(Include.NON_NULL) +public class AddressListParam extends OffsetParam { + + private static final long serialVersionUID = -4434287264623932176L; + + public AddressListParam(Integer offset, Integer limit) { + super(offset, limit); + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/address/AddressListResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/address/AddressListResponse.java new file mode 100644 index 0000000000..2dce813b20 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/address/AddressListResponse.java @@ -0,0 +1,26 @@ +package com.binarywang.wxjava.store.bean.address; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 地址列表 响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class AddressListResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = -3997164605170764105L; + + /** 地址详情 */ + @JsonProperty("address_id_list") + private List ids; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/address/OfflineAddressType.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/address/OfflineAddressType.java new file mode 100644 index 0000000000..8902c27627 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/address/OfflineAddressType.java @@ -0,0 +1,28 @@ +package com.binarywang.wxjava.store.bean.address; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 线下配送地址类型 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class OfflineAddressType implements Serializable { + + private static final long serialVersionUID = 636850757572901377L; + + /** 1表示同城配送 */ + @JsonProperty("same_city") + private Integer sameCity; + + /** 1表示用户自提 */ + @JsonProperty("pickup") + private Integer pickup; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleAcceptExchangeReshipParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleAcceptExchangeReshipParam.java new file mode 100644 index 0000000000..7360c3ebb0 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleAcceptExchangeReshipParam.java @@ -0,0 +1,35 @@ +package com.binarywang.wxjava.store.bean.after; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +/** + * 售后单换货发货信息 + * + * @author Chu + */ +@Data +@JsonInclude(JsonInclude.Include.NON_NULL) +public class AfterSaleAcceptExchangeReshipParam extends AfterSaleIdParam { + private static final long serialVersionUID = -7946679037747710613L; + + /** 快递单号*/ + @JsonProperty("waybill_id") + private String waybillId; + + /** 快递公司id,通过获取快递公司列表接口获得,非主流快递公司可以填OTHER*/ + @JsonProperty("delivery_id") + private String deliveryId; + + public AfterSaleAcceptExchangeReshipParam() { + + } + + public AfterSaleAcceptExchangeReshipParam(String afterSaleOrderId, String waybillId, String deliveryId) { + super(afterSaleOrderId); + this.waybillId = waybillId; + this.deliveryId = deliveryId; + } + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleAcceptParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleAcceptParam.java new file mode 100644 index 0000000000..727761cda5 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleAcceptParam.java @@ -0,0 +1,39 @@ +package com.binarywang.wxjava.store.bean.after; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +/** + * 售后单同意信息 + * + * @author Zeyes + */ +@Data +@JsonInclude(Include.NON_NULL) +public class AfterSaleAcceptParam extends AfterSaleIdParam { + + private static final long serialVersionUID = -4352801757159074950L; + /** 同意退货时传入地址id */ + @JsonProperty("address_id") + private String addressId; + + /** 针对退货退款同意售后的阶段: 1. 同意退货退款,并通知用户退货; 2. 确认收到货并退款给用户。 如果不填则将根据当前的售后单状态自动选择相应操作。对于仅退款的情况,由于只存在一种同意的场景,无需填写此字段。*/ + @JsonProperty("accept_type") + private Integer acceptType; + + public AfterSaleAcceptParam() { + } + + public AfterSaleAcceptParam(String afterSaleOrderId, String addressId) { + super(afterSaleOrderId); + this.addressId = addressId; + } + + public AfterSaleAcceptParam(String afterSaleOrderId, String addressId, Integer acceptType) { + super(afterSaleOrderId); + this.addressId = addressId; + this.acceptType = acceptType; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleCreateResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleCreateResponse.java new file mode 100644 index 0000000000..cd40f982e8 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleCreateResponse.java @@ -0,0 +1,15 @@ +package com.binarywang.wxjava.store.bean.after; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +@Data +@EqualsAndHashCode(callSuper = true) +public class AfterSaleCreateResponse extends WxStoreBaseResponse { + private static final long serialVersionUID = 2680676438284658410L; + + @JsonProperty("after_sale_order_id") + private String afterSaleOrderId; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleDetail.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleDetail.java new file mode 100644 index 0000000000..50b1f55dbd --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleDetail.java @@ -0,0 +1,42 @@ +package com.binarywang.wxjava.store.bean.after; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 售后详情 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class AfterSaleDetail implements Serializable { + + private static final long serialVersionUID = -8130659179770831047L; + /** 售后描述 */ + @JsonProperty("desc") + private String desc; + + /** 是否已经收到货 */ + @JsonProperty("receive_product") + private Boolean receiveProduct; + + /** 是否已经收到货 */ + @JsonProperty("cancel_time") + private Long cancelTime; + + /** 举证图片media_id列表,根据mediaid获取文件内容接口 */ + @JsonProperty("prove_imgs") + private List proveImgs; + + /** 联系电话 */ + @JsonProperty("tel_number") + private String telNumber; + + /** 举证图片media_id列表,根据mediaid获取文件内容接口 */ + @JsonProperty("media_id_list") + private List mediaIdList; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleExchangeDeliveryInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleExchangeDeliveryInfo.java new file mode 100644 index 0000000000..12c114dadb --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleExchangeDeliveryInfo.java @@ -0,0 +1,35 @@ +package com.binarywang.wxjava.store.bean.after; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.AddressInfo; + +/** + * 换货类型的发货物流信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class AfterSaleExchangeDeliveryInfo implements Serializable { + + private static final long serialVersionUID = 3039216368034112038L; + + /** 快递单号 */ + @JsonProperty("waybill_id") + private String waybillId; + + /** 物流公司id */ + @JsonProperty("delivery_id") + private String deliveryId; + + /** 物流公司名称 */ + @JsonProperty("delivery_name") + private String deliveryName; + + /** 地址信息 */ + @JsonProperty("address_info") + private AddressInfo addressInfo; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleExchangeProductInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleExchangeProductInfo.java new file mode 100644 index 0000000000..b6dc6cd5c0 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleExchangeProductInfo.java @@ -0,0 +1,42 @@ +package com.binarywang.wxjava.store.bean.after; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 换货商品信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class AfterSaleExchangeProductInfo implements Serializable { + + private static final long serialVersionUID = -1341436607011117854L; + + /** 商品spuid */ + @JsonProperty("product_id") + private String productId; + + /** 旧商品skuid */ + @JsonProperty("old_sku_id") + private String oldSkuId; + + /** 新商品skuid */ + @JsonProperty("new_sku_id") + private String newSkuId; + + /** 数量 */ + @JsonProperty("product_cnt") + private String productCnt; + + /** 旧商品价格 */ + @JsonProperty("old_sku_price") + private Integer oldSkuPrice; + + /** 新商品价格 */ + @JsonProperty("new_sku_price") + private Integer newSkuPrice; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleGenAfterSaleOrderParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleGenAfterSaleOrderParam.java new file mode 100644 index 0000000000..83a5c31973 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleGenAfterSaleOrderParam.java @@ -0,0 +1,25 @@ +package com.binarywang.wxjava.store.bean.after; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +public class AfterSaleGenAfterSaleOrderParam extends AfterSaleRefundPriceDiffParam { + private static final long serialVersionUID = -6873909673739068936L; + + @JsonProperty("count") + private Integer count; + + @JsonProperty("type") + private String type; + + @JsonProperty("address_id") + private String addressId; + + @JsonProperty("exchange_sku_info") + private ExchangeSkuInfo exchangeSkuInfo; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleHandleFastExchangeReceiptParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleHandleFastExchangeReceiptParam.java new file mode 100644 index 0000000000..50161e8093 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleHandleFastExchangeReceiptParam.java @@ -0,0 +1,29 @@ +package com.binarywang.wxjava.store.bean.after; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +public class AfterSaleHandleFastExchangeReceiptParam extends AfterSaleIdParam { + private static final long serialVersionUID = 5430106715116197677L; + + @JsonProperty("act") + private Integer act; + + @JsonProperty("reject_reason") + private String rejectReason; + + @JsonProperty("reject_reason_type") + private Integer rejectReasonType; + + @JsonProperty("merchant_text") + private String merchantText; + + @JsonProperty("reject_confirm_exchange") + private List rejectConfirmExchange; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleIdParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleIdParam.java new file mode 100644 index 0000000000..d2d337b43d --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleIdParam.java @@ -0,0 +1,26 @@ +package com.binarywang.wxjava.store.bean.after; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 售后单id信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@JsonInclude(Include.NON_NULL) +public class AfterSaleIdParam implements Serializable { + + private static final long serialVersionUID = 4974332291476116540L; + /** 售后单号 */ + @JsonProperty("after_sale_order_id") + private String afterSaleOrderId; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleInfo.java new file mode 100644 index 0000000000..036082a3c6 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleInfo.java @@ -0,0 +1,101 @@ +package com.binarywang.wxjava.store.bean.after; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 售后单信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class AfterSaleInfo implements Serializable { + + private static final long serialVersionUID = 6595670817781635247L; + /** 售后单号 */ + @JsonProperty("after_sale_order_id") + private String afterSaleOrderId; + + /** 售后状态 {@link com.binarywang.wxjava.store.enums.AfterSaleStatus} */ + @JsonProperty("status") + private String status; + + /** 订单id */ + @JsonProperty("order_id") + private String orderId; + + /** 买家身份标识 */ + @JsonProperty("openid") + private String openid; + + /** 买家在开放平台的唯一标识符,若当前微信小店已绑定到微信开放平台帐号下会返回 */ + @JsonProperty("unionid") + private String unionid; + + /** 售后相关商品信息 */ + @JsonProperty("product_info") + private AfterSaleProductInfo productInfo; + + /** 售后详情 */ + @JsonProperty("details") + private AfterSaleDetail details; + + /** 退款详情 */ + @JsonProperty("refund_info") + private RefundInfo refundInfo; + + /** 用户退货信息 */ + @JsonProperty("return_info") + private ReturnInfo returnInfo; + + /** 商家上传的信息 */ + @JsonProperty("merchant_upload_info") + private MerchantUploadInfo merchantUploadInfo; + + /** 创建时间 时间戳 秒 */ + @JsonProperty("create_time") + private Long createTime; + + /** 更新时间 时间戳 秒 */ + @JsonProperty("update_time") + private Long updateTime; + + /** 退款原因(后续新增的原因将不再有字面含义,请参考reason_text) */ + @JsonProperty("reason") + private String reason; + + /** 退款原因解释 */ + @JsonProperty("reason_text") + private String reasonText; + + /** 退款结果 */ + @JsonProperty("refund_resp") + private RefundResp refundResp; + + /** 售后类型。REFUND:退款;RETURN:退货退款 */ + @JsonProperty("type") + private String type; + + /** 纠纷id,该字段可用于获取纠纷信息 */ + @JsonProperty("complaint_id") + private String complaintId; + + /** 仅在待商家审核退款退货申请或收货期间返回,表示操作剩余时间(秒数)*/ + @JsonProperty("deadline") + private Long deadline; + + /** 售后换货商品信息 */ + @JsonProperty("exchange_product_info") + private AfterSaleExchangeProductInfo exchangeProductInfo; + + /** 售后换货物流信息 */ + @JsonProperty("exchange_delivery_info") + private AfterSaleExchangeDeliveryInfo exchangeDeliveryInfo; + + /** 售后换货虚拟号码信息 */ + @JsonProperty("virtual_tel_num_info") + private AfterSaleVirtualNumberInfo virtualTelNumInfo; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleInfoResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleInfoResponse.java new file mode 100644 index 0000000000..f6325ecc05 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleInfoResponse.java @@ -0,0 +1,23 @@ +package com.binarywang.wxjava.store.bean.after; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 售后单 响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class AfterSaleInfoResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = -752661975153491902L; + /** 售后单 */ + @JsonProperty("after_sale_order") + private AfterSaleInfo info; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleListParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleListParam.java new file mode 100644 index 0000000000..816f93fd32 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleListParam.java @@ -0,0 +1,42 @@ +package com.binarywang.wxjava.store.bean.after; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 售后单列表 请求参数 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@JsonInclude(Include.NON_NULL) +public class AfterSaleListParam implements Serializable { + + private static final long serialVersionUID = -103549981452112069L; + /** 订单创建启始时间 unix时间戳 */ + @JsonProperty("begin_create_time") + private Long beginCreateTime; + + /** 订单创建结束时间,end_create_time减去begin_create_time不得大于24小时 unix时间戳 */ + @JsonProperty("end_create_time") + private Long endCreateTime; + + /** 售后单更新起始时间 */ + @JsonProperty("begin_update_time") + private Long beginUpdateTime; + + /** 售后单更新结束时间,end_update_time减去begin_update_time不得大于24小时 */ + @JsonProperty("end_update_time") + private Long endUpdateTime; + + /** 翻页参数,从第二页开始传,来源于上一页的返回值 */ + @JsonProperty("next_key") + private String nextKey; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleListResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleListResponse.java new file mode 100644 index 0000000000..0f9aa9861c --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleListResponse.java @@ -0,0 +1,32 @@ +package com.binarywang.wxjava.store.bean.after; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 售后单列表 响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class AfterSaleListResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 5033313416948732123L; + /** 售后单号列表 */ + @JsonProperty("after_sale_order_id_list") + private List ids; + + /** 翻页参数 */ + @JsonProperty("next_key") + private String nextKey; + + /** 是否还有数据 */ + @JsonProperty("has_more") + private Boolean hasMore; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleMerchantUpdateParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleMerchantUpdateParam.java new file mode 100644 index 0000000000..262fa1c6d4 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleMerchantUpdateParam.java @@ -0,0 +1,57 @@ +package com.binarywang.wxjava.store.bean.after; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +import java.util.List; + +/** + * 售后单商家协商信息 + * + * @author Chu + */ +@Data +@JsonInclude(JsonInclude.Include.NON_NULL) +public class AfterSaleMerchantUpdateParam extends AfterSaleIdParam { + private static final long serialVersionUID = -3672834150982780L; + + /** 协商修改把售后单修改成该售后类型。1:退款;2:退货退款*/ + @JsonProperty("type") + private Integer type; + + /** 金额(单位:分)*/ + @JsonProperty("amount") + private Integer amount; + + /** 协商描述*/ + @JsonProperty("merchant_update_desc") + private String merchantUpdateDesc; + + /** 协商原因*/ + @JsonProperty("update_reason_type") + private Integer updateReasonType; + + /** 1:已协商一致,邀请买家取消售后; 2:邀请买家核实与补充凭证; 3:修改买家售后申请*/ + @JsonProperty("merchant_update_type") + private Integer merchantUpdateType; + + /** 协商凭证id列表,可使用图片上传接口获取media_id(数据类型填0),当update_reason_type对应的need_image为1时必填*/ + @JsonProperty("media_ids") + private List mediaIds; + + public AfterSaleMerchantUpdateParam() { + } + + public AfterSaleMerchantUpdateParam(String afterSaleOrderId, Integer type, Integer updateReasonType, Integer merchantUpdateType + , Integer amount, String merchantUpdateDesc, List mediaIds) { + super(afterSaleOrderId); + this.type = type; + this.updateReasonType = updateReasonType; + this.merchantUpdateType = merchantUpdateType; + this.amount = amount; + this.merchantUpdateDesc = merchantUpdateDesc; + this.mediaIds = mediaIds; + } + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleProductInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleProductInfo.java new file mode 100644 index 0000000000..1d1335e7c4 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleProductInfo.java @@ -0,0 +1,29 @@ +package com.binarywang.wxjava.store.bean.after; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 售后相关商品信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class AfterSaleProductInfo implements Serializable { + + private static final long serialVersionUID = 4205179093262757775L; + /** 商品spu id */ + @JsonProperty("product_id") + private String productId; + + /** 商品sku id */ + @JsonProperty("sku_id") + private String skuId; + + /** 售后数量 */ + @JsonProperty("count") + private Integer count; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleReason.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleReason.java new file mode 100644 index 0000000000..af8a58b081 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleReason.java @@ -0,0 +1,33 @@ +package com.binarywang.wxjava.store.bean.after; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * 全量售后原因 + * + * @author lizhengwu + * @date 2024/7/24 + */ +@Data +@NoArgsConstructor +public class AfterSaleReason implements Serializable { + + private static final long serialVersionUID = -3674527884494606230L; + + /** + * 售后原因枚举 + */ + @JsonProperty("reason") + private Integer reason; + + /** + * 售后原因说明 + */ + @JsonProperty("reason_text") + private String reasonText; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleReasonResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleReasonResponse.java new file mode 100644 index 0000000000..735f3b9e2d --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleReasonResponse.java @@ -0,0 +1,28 @@ +package com.binarywang.wxjava.store.bean.after; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +import java.util.List; + +/** + * 售后原因 + * + * + * @author lizhengwu + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode +public class AfterSaleReasonResponse extends WxStoreBaseResponse { + + + private static final long serialVersionUID = -580378623915041396L; + + @JsonProperty("reason_list") + private List reasonList; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleRefundPriceDiffParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleRefundPriceDiffParam.java new file mode 100644 index 0000000000..f34de2c058 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleRefundPriceDiffParam.java @@ -0,0 +1,33 @@ +package com.binarywang.wxjava.store.bean.after; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; + +@Data +@JsonInclude(JsonInclude.Include.NON_NULL) +public class AfterSaleRefundPriceDiffParam implements Serializable { + private static final long serialVersionUID = 3875058376021518123L; + + @JsonProperty("request_id") + private String requestId; + + @JsonProperty("order_id") + private String orderId; + + @JsonProperty("product_id") + private String productId; + + @JsonProperty("sku_id") + private String skuId; + + @JsonProperty("amount") + private Integer amount; + + @JsonProperty("reason") + private String reason; + + @JsonProperty("desc") + private String desc; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleRejectExchangeReshipParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleRejectExchangeReshipParam.java new file mode 100644 index 0000000000..4645870d20 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleRejectExchangeReshipParam.java @@ -0,0 +1,41 @@ +package com.binarywang.wxjava.store.bean.after; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +import java.util.List; + +/** + * 售后单换货拒绝发货信息 + * + * @author Chu + */ +@Data +@JsonInclude(JsonInclude.Include.NON_NULL) +public class AfterSaleRejectExchangeReshipParam extends AfterSaleIdParam { + private static final long serialVersionUID = -7946679037747710613L; + + /** 拒绝原因具体描述 ,可使用默认描述,也可以自定义描述*/ + @JsonProperty("reject_reason") + private String rejectReason; + + /** 拒绝原因枚举 */ + @JsonProperty("reject_reason_type") + private Integer rejectReasonType; + + /** 退款凭证,可使用图片上传接口获取media_id(数据类型填0)*/ + @JsonProperty("reject_certificates") + private List rejectCertificates; + + public AfterSaleRejectExchangeReshipParam() { + } + + public AfterSaleRejectExchangeReshipParam(String afterSaleOrderId, String rejectReason, Integer rejectReasonType, List rejectCertificates) { + super(afterSaleOrderId); + this.rejectReason = rejectReason; + this.rejectReasonType = rejectReasonType; + this.rejectCertificates = rejectCertificates; + } + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleRejectParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleRejectParam.java new file mode 100644 index 0000000000..39f014eb5e --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleRejectParam.java @@ -0,0 +1,59 @@ +package com.binarywang.wxjava.store.bean.after; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +import java.util.List; + +/** + * 售后单拒绝信息 + * + * @author Zeyes + */ +@Data +@JsonInclude(Include.NON_NULL) +public class AfterSaleRejectParam extends AfterSaleIdParam { + + private static final long serialVersionUID = -7507483859864253314L; + /** + * 拒绝原因 + */ + @JsonProperty("reject_reason") + private String rejectReason; + + /** + * 拒绝原因枚举值 + */ + @JsonProperty("reject_reason_type") + private Integer rejectReasonType; + + /** + * 拒绝凭证图片列表,可使用图片上传接口获取media_id + */ + @JsonProperty("reject_certificates") + private List rejectCertificates; + + public AfterSaleRejectParam() { + } + + public AfterSaleRejectParam(String afterSaleOrderId, String rejectReason) { + super(afterSaleOrderId); + this.rejectReason = rejectReason; + } + + public AfterSaleRejectParam(String afterSaleOrderId, String rejectReason, Integer rejectReasonType) { + super(afterSaleOrderId); + this.rejectReason = rejectReason; + this.rejectReasonType = rejectReasonType; + } + + public AfterSaleRejectParam(String afterSaleOrderId, String rejectReason, Integer rejectReasonType, + List rejectCertificates) { + super(afterSaleOrderId); + this.rejectReason = rejectReason; + this.rejectReasonType = rejectReasonType; + this.rejectCertificates = rejectCertificates; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleRejectReason.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleRejectReason.java new file mode 100644 index 0000000000..17d265f3b3 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleRejectReason.java @@ -0,0 +1,44 @@ +package com.binarywang.wxjava.store.bean.after; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * 拒绝售后原因 + * + * @author lizhengwu + * @date 2024/7/24 + */ +@Data +@NoArgsConstructor +public class AfterSaleRejectReason implements Serializable { + + private static final long serialVersionUID = -3672834150982780L; + + /** + * 售后拒绝原因枚举 + */ + @JsonProperty("reject_reason_type") + private Integer rejectReasonType; + + /** + * 售后拒绝原因说明 + */ + @JsonProperty("reject_reason_type_text") + private String rejectReasonTypeText; + + /** + * 售后拒绝原因默认描述 + */ + @JsonProperty("reject_reason") + private String rejectReason; + + /** + * 售后拒绝原因适用场景 + */ + @JsonProperty("reject_scene") + private Integer rejectScene; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleRejectReasonResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleRejectReasonResponse.java new file mode 100644 index 0000000000..3b9bf3ac04 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleRejectReasonResponse.java @@ -0,0 +1,29 @@ +package com.binarywang.wxjava.store.bean.after; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +import java.util.List; + +/** + * 售后原因 + * + * @author lizhengwu + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode +public class AfterSaleRejectReasonResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = -7946679037747710613L; + + /** + * 售后原因列表 + */ + @JsonProperty("reject_reason_list") + private List rejectReasonList; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleReturnParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleReturnParam.java new file mode 100644 index 0000000000..6c56e36824 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleReturnParam.java @@ -0,0 +1,36 @@ +package com.binarywang.wxjava.store.bean.after; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import com.binarywang.wxjava.store.bean.base.AddressInfo; + +/** + * 退货信息 + * + * @author Zeyes + */ +@Data +public class AfterSaleReturnParam implements Serializable { + + private static final long serialVersionUID = -1101993925465293521L; + /** 微信侧售后单号 */ + @JsonProperty("aftersale_id") + private Long afterSaleId; + + /** 外部售后单号,和aftersale_id二选一 */ + @JsonProperty("out_aftersale_id") + private String outAfterSaleId; + + /** 商家收货地址 */ + @JsonProperty("address_info") + private AddressInfo addressInfo; + + public AfterSaleReturnParam() { + } + + public AfterSaleReturnParam(Long afterSaleId, String outAfterSaleId) { + this.outAfterSaleId = outAfterSaleId; + this.afterSaleId = afterSaleId; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleVirtualNumberInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleVirtualNumberInfo.java new file mode 100644 index 0000000000..1811b8e87d --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleVirtualNumberInfo.java @@ -0,0 +1,26 @@ +package com.binarywang.wxjava.store.bean.after; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 虚拟号码信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class AfterSaleVirtualNumberInfo implements Serializable { + private static final long serialVersionUID = -5756618937333859985L; + + /** 虚拟号码 */ + @JsonProperty("virtual_tel_number") + private String virtualTelNumber; + + /** 虚拟号码过期时间 */ + @JsonProperty("virtual_tel_expire_time") + private Long virtualTelExpireTime; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleVirtualTelNumResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleVirtualTelNumResponse.java new file mode 100644 index 0000000000..e659abf45c --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/AfterSaleVirtualTelNumResponse.java @@ -0,0 +1,18 @@ +package com.binarywang.wxjava.store.bean.after; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +@Data +@EqualsAndHashCode(callSuper = true) +public class AfterSaleVirtualTelNumResponse extends WxStoreBaseResponse { + private static final long serialVersionUID = -2715343569103426942L; + + @JsonProperty("virtual_tel_number") + private String virtualTelNumber; + + @JsonProperty("virtual_tel_expire_time") + private Long virtualTelExpireTime; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/ExchangeSkuInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/ExchangeSkuInfo.java new file mode 100644 index 0000000000..9998aead47 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/ExchangeSkuInfo.java @@ -0,0 +1,14 @@ +package com.binarywang.wxjava.store.bean.after; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; + +@Data +@JsonInclude(JsonInclude.Include.NON_NULL) +public class ExchangeSkuInfo implements Serializable { + private static final long serialVersionUID = 1L; + @JsonProperty("new_sku_id") + private String newSkuId; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/GuaranteeMerchantModifyParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/GuaranteeMerchantModifyParam.java new file mode 100644 index 0000000000..1c6cea4938 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/GuaranteeMerchantModifyParam.java @@ -0,0 +1,19 @@ +package com.binarywang.wxjava.store.bean.after; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +public class GuaranteeMerchantModifyParam extends GuaranteeOrderIdParam { + private static final long serialVersionUID = 9193536167701367687L; + + @JsonProperty("bad_level") + private Integer badLevel; + + @JsonProperty("merchant_remark") + private String merchantRemark; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/GuaranteeMerchantProofParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/GuaranteeMerchantProofParam.java new file mode 100644 index 0000000000..972dacd2c7 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/GuaranteeMerchantProofParam.java @@ -0,0 +1,19 @@ +package com.binarywang.wxjava.store.bean.after; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +public class GuaranteeMerchantProofParam extends GuaranteeOrderIdParam { + private static final long serialVersionUID = -2365495841866160967L; + + @JsonProperty("content") + private String content; + + @JsonProperty("pic_list") + private java.util.List picList; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/GuaranteeModifyRequest.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/GuaranteeModifyRequest.java new file mode 100644 index 0000000000..7226ccb266 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/GuaranteeModifyRequest.java @@ -0,0 +1,34 @@ +package com.binarywang.wxjava.store.bean.after; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * 商家协商保障单请求参数。 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@JsonInclude(Include.NON_NULL) +public class GuaranteeModifyRequest extends GuaranteeOrderIdParam { + + private static final long serialVersionUID = 4268864541609439068L; + + /** 商品破损程度。 */ + @JsonProperty("bad_level") + private Integer badLevel; + + /** 商家协商备注。 */ + @JsonProperty("merchant_remark") + private String merchantRemark; + + public GuaranteeModifyRequest(String guaranteeOrderId, Integer badLevel, String merchantRemark) { + super(guaranteeOrderId); + this.badLevel = badLevel; + this.merchantRemark = merchantRemark; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/GuaranteeOrderIdParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/GuaranteeOrderIdParam.java new file mode 100644 index 0000000000..f06d76ab4f --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/GuaranteeOrderIdParam.java @@ -0,0 +1,25 @@ +package com.binarywang.wxjava.store.bean.after; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 保障单号参数。 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@JsonInclude(Include.NON_NULL) +public class GuaranteeOrderIdParam implements Serializable { + + private static final long serialVersionUID = -6638498743123537413L; + + /** 保障单号。 */ + @JsonProperty("guarantee_order_id") + private String guaranteeOrderId; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/GuaranteeOrderInfoResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/GuaranteeOrderInfoResponse.java new file mode 100644 index 0000000000..4b3b2e4b01 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/GuaranteeOrderInfoResponse.java @@ -0,0 +1,59 @@ +package com.binarywang.wxjava.store.bean.after; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 保障单详情响应。 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class GuaranteeOrderInfoResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 7354122991247317485L; + + /** 保障单详情。 */ + @JsonProperty("guarantee_order") + private GuaranteeOrder guaranteeOrder; + + /** + * 保障单详情。 + */ + @Data + @NoArgsConstructor + public static class GuaranteeOrder implements Serializable { + + private static final long serialVersionUID = -2398976447575813507L; + + /** 保障单号。 */ + @JsonProperty("guarantee_order_id") + private String guaranteeOrderId; + + /** 保障单状态。 */ + @JsonProperty("status") + private String status; + + /** 商品信息。 */ + @JsonProperty("product_info") + private ProductInfo productInfo; + } + + /** + * 详情商品信息。 + */ + @Data + @NoArgsConstructor + public static class ProductInfo implements Serializable { + + private static final long serialVersionUID = -2455740986246085934L; + + /** 商品 SPU ID。 */ + @JsonProperty("product_id") + private String productId; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/GuaranteeOrderListParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/GuaranteeOrderListParam.java new file mode 100644 index 0000000000..a53a3af203 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/GuaranteeOrderListParam.java @@ -0,0 +1,44 @@ +package com.binarywang.wxjava.store.bean.after; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 保障单列表请求参数。 + */ +@Data +@NoArgsConstructor +@JsonInclude(Include.NON_NULL) +public class GuaranteeOrderListParam implements Serializable { + + private static final long serialVersionUID = 1622570776364341988L; + + @JsonProperty("guarantee_order_id_list") + private List guaranteeOrderIdList; + + @JsonProperty("order_id_list") + private List orderIdList; + + @JsonProperty("type") + private Integer type; + + @JsonProperty("begin_time") + private Long beginTime; + + @JsonProperty("end_time") + private Long endTime; + + @JsonProperty("status_list") + private String statusList; + + @JsonProperty("offset") + private Integer offset; + + @JsonProperty("limit") + private Integer limit; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/GuaranteeOrderListResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/GuaranteeOrderListResponse.java new file mode 100644 index 0000000000..718ced98a2 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/GuaranteeOrderListResponse.java @@ -0,0 +1,64 @@ +package com.binarywang.wxjava.store.bean.after; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 保障单列表响应。 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class GuaranteeOrderListResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 9105476087203713187L; + + /** 保障单总数。 */ + @JsonProperty("total_num") + private Integer totalNum; + + /** 保障单列表。 */ + @JsonProperty("guarantee_order_list") + private List guaranteeOrderList; + + /** + * 保障单列表项。 + */ + @Data + @NoArgsConstructor + public static class GuaranteeOrder implements Serializable { + + private static final long serialVersionUID = 7151952524213202281L; + + /** 保障单号。 */ + @JsonProperty("guarantee_order_id") + private String guaranteeOrderId; + + /** 保障单状态。 */ + @JsonProperty("status") + private String status; + + /** 商品信息列表。 */ + @JsonProperty("product_info") + private List productInfo; + } + + /** + * 列表商品信息。 + */ + @Data + @NoArgsConstructor + public static class ProductInfo implements Serializable { + + private static final long serialVersionUID = -2565763879505631638L; + + /** 商品 SPU ID。 */ + @JsonProperty("product_id") + private String productId; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/GuaranteeOrderResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/GuaranteeOrderResponse.java new file mode 100644 index 0000000000..78c5666bba --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/GuaranteeOrderResponse.java @@ -0,0 +1,16 @@ +package com.binarywang.wxjava.store.bean.after; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.JsonNode; +import lombok.Data; +import lombok.EqualsAndHashCode; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +@Data +@EqualsAndHashCode(callSuper = true) +public class GuaranteeOrderResponse extends WxStoreBaseResponse { + private static final long serialVersionUID = 3977781489692530604L; + + @JsonProperty("guarantee_order") + private JsonNode guaranteeOrder; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/GuaranteeProofRequest.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/GuaranteeProofRequest.java new file mode 100644 index 0000000000..3615bd5a57 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/GuaranteeProofRequest.java @@ -0,0 +1,35 @@ +package com.binarywang.wxjava.store.bean.after; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * 商家举证保障单请求参数。 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@JsonInclude(Include.NON_NULL) +public class GuaranteeProofRequest extends GuaranteeOrderIdParam { + + private static final long serialVersionUID = 6599721896742974275L; + + /** 举证内容。 */ + @JsonProperty("content") + private String content; + + /** 举证图片 media_id 列表。 */ + @JsonProperty("pic_list") + private List picList; + + public GuaranteeProofRequest(String guaranteeOrderId, String content, List picList) { + super(guaranteeOrderId); + this.content = content; + this.picList = picList; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/GuaranteeRefuseRequest.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/GuaranteeRefuseRequest.java new file mode 100644 index 0000000000..8f12013daf --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/GuaranteeRefuseRequest.java @@ -0,0 +1,35 @@ +package com.binarywang.wxjava.store.bean.after; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * 商家拒绝保障单请求参数。 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@JsonInclude(Include.NON_NULL) +public class GuaranteeRefuseRequest extends GuaranteeOrderIdParam { + + private static final long serialVersionUID = -6905594717805091393L; + + /** 拒绝原因。 */ + @JsonProperty("reason") + private String reason; + + /** 拒绝凭证图片 media_id 列表。 */ + @JsonProperty("pic_list") + private List picList; + + public GuaranteeRefuseRequest(String guaranteeOrderId, String reason, List picList) { + super(guaranteeOrderId); + this.reason = reason; + this.picList = picList; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/MerchantUploadInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/MerchantUploadInfo.java new file mode 100644 index 0000000000..71a8993e68 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/MerchantUploadInfo.java @@ -0,0 +1,27 @@ +package com.binarywang.wxjava.store.bean.after; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 商家上传的信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class MerchantUploadInfo implements Serializable { + + private static final long serialVersionUID = 373513419356603563L; + /** 拒绝原因 */ + @JsonProperty("reject_reason") + private String rejectReason; + + /** 退款凭证 */ + @JsonProperty("refund_certificates") + private List refundCertificates; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/RefundEvidenceParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/RefundEvidenceParam.java new file mode 100644 index 0000000000..c031444e92 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/RefundEvidenceParam.java @@ -0,0 +1,35 @@ +package com.binarywang.wxjava.store.bean.after; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 退款凭证信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@JsonInclude(JsonInclude.Include.NON_NULL) +public class RefundEvidenceParam implements Serializable { + + private static final long serialVersionUID = 2117305897849528009L; + /** 售后单号 */ + @JsonProperty("after_sale_order_id") + private String afterSaleOrderId; + + /** 描述 */ + @JsonProperty("desc") + private String desc; + + /** 凭证图片列表 */ + @JsonProperty("refund_certificates") + private List certificates; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/RefundInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/RefundInfo.java new file mode 100644 index 0000000000..7f91b0bf1f --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/RefundInfo.java @@ -0,0 +1,25 @@ +package com.binarywang.wxjava.store.bean.after; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 退款信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class RefundInfo implements Serializable { + + private static final long serialVersionUID = -6994243947898889309L; + /** 退款金额(分) */ + @JsonProperty("amount") + private Integer amount; + + /** 标明售后单退款直接原因, 枚举值详情请参考 {@link com.binarywang.wxjava.store.enums.RefundReason} */ + @JsonProperty("refund_reason") + private Integer refundReason; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/RefundResp.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/RefundResp.java new file mode 100644 index 0000000000..b3ffb10d2a --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/RefundResp.java @@ -0,0 +1,30 @@ +package com.binarywang.wxjava.store.bean.after; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 退款结果 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class RefundResp implements Serializable { + + private static final long serialVersionUID = 6549707043779644156L; + /** code */ + @JsonProperty("code") + private String code; + + /** ret */ + @JsonProperty("ret") + private Integer ret; + + /** message */ + @JsonProperty("message") + private String message; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/ReturnInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/ReturnInfo.java new file mode 100644 index 0000000000..b5077f0e21 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/ReturnInfo.java @@ -0,0 +1,29 @@ +package com.binarywang.wxjava.store.bean.after; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 用户退货信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class ReturnInfo implements Serializable { + + private static final long serialVersionUID = 1643844664701376892L; + /** 快递单号 */ + @JsonProperty("waybill_id") + private String waybillId; + + /** 物流公司id */ + @JsonProperty("delivery_id") + private String deliveryId; + + /** 物流公司名称 */ + @JsonProperty("delivery_name") + private String deliveryName; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/SyncWorkOrderParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/SyncWorkOrderParam.java new file mode 100644 index 0000000000..15ddd0dea1 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/after/SyncWorkOrderParam.java @@ -0,0 +1,79 @@ +package com.binarywang.wxjava.store.bean.after; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; + +@Data +@JsonInclude(JsonInclude.Include.NON_NULL) +public class SyncWorkOrderParam implements Serializable { + private static final long serialVersionUID = -7336088606071452113L; + + @JsonProperty("complaint_id") + private String complaintId; + + @JsonProperty("work_order_info") + private WorkOrderInfo workOrderInfo; + + @Data + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class WorkOrderInfo implements Serializable { + private static final long serialVersionUID = 8573016851280130766L; + + @JsonProperty("version") + private Integer version; + + @JsonProperty("items") + private List items; + + @JsonProperty("work_order_id") + private String workOrderId; + } + + @Data + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class WorkOrderItem implements Serializable { + private static final long serialVersionUID = 6925580701152256736L; + + @JsonProperty("status") + private Integer status; + + @JsonProperty("desc") + private String desc; + + @JsonProperty("update_time") + private Long updateTime; + + @JsonProperty("result_type") + private Integer resultType; + + @JsonProperty("refund_amount") + private Integer refundAmount; + + @JsonProperty("media_list") + private List mediaList; + } + + @Data + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class WorkOrderMedia implements Serializable { + private static final long serialVersionUID = 2258990333977395631L; + + @JsonProperty("type") + private Integer type; + + @JsonProperty("picture") + private WorkOrderPicture picture; + } + + @Data + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class WorkOrderPicture implements Serializable { + private static final long serialVersionUID = -3339842364541603289L; + + @JsonProperty("tmp_media_id") + private String tmpMediaId; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/audit/AuditApplyResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/audit/AuditApplyResponse.java new file mode 100644 index 0000000000..6ebb6adc78 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/audit/AuditApplyResponse.java @@ -0,0 +1,24 @@ +package com.binarywang.wxjava.store.bean.audit; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 审核提交结果响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class AuditApplyResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = -3950614749162384497L; + + /** 类目列表 */ + @JsonProperty("audit_id") + private String auditId; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/audit/AuditResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/audit/AuditResponse.java new file mode 100644 index 0000000000..c9ef3eb3ff --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/audit/AuditResponse.java @@ -0,0 +1,24 @@ +package com.binarywang.wxjava.store.bean.audit; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 审核结果响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class AuditResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 9218713381520774914L; + + /** 审核结果 1:审核中,3:审核成功,2:审核拒绝,12:主动取消申请单 */ + @JsonProperty("data") + private AuditResult data; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/audit/AuditResult.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/audit/AuditResult.java new file mode 100644 index 0000000000..1293577289 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/audit/AuditResult.java @@ -0,0 +1,26 @@ +package com.binarywang.wxjava.store.bean.audit; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 审核结果 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class AuditResult implements Serializable { + + private static final long serialVersionUID = 1846416634865665240L; + + /** 审核状态, 0:审核中,1:审核成功,9:审核拒绝, 12:主动取消 */ + @JsonProperty("status") + private Integer status; + + /** 如果审核拒绝,返回拒绝原因 */ + @JsonProperty("reject_reason") + private String rejectReason; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/audit/CategoryAuditInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/audit/CategoryAuditInfo.java new file mode 100644 index 0000000000..43e1217918 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/audit/CategoryAuditInfo.java @@ -0,0 +1,79 @@ +package com.binarywang.wxjava.store.bean.audit; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 类目审核信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@JsonInclude(JsonInclude.Include.NON_NULL) +public class CategoryAuditInfo implements Serializable { + + private static final long serialVersionUID = -8792967130645424788L; + + /** 一级类目,字符类型,最长不超过10 */ + @JsonProperty("level1") + private Long level1; + + /** 二级类目,字符类型,最长不超过10 */ + @JsonProperty("level2") + private Long level2; + + /** 三级类目,字符类型,最长不超过10 */ + @JsonProperty("level3") + private Long level3; + + /** 新类目树类目ID */ + @JsonProperty("cats_v2") + private List catsV2; + + /** 资质材料,图片fileid,图片类型,最多不超过10张 */ + @JsonProperty("certificate") + private List certificates; + + /** 报备函,图片fileid,图片类型,最多不超过10张 */ + @JsonProperty("baobeihan") + private List baobeihan; + + /** 经营证明,图片fileid,图片类型,最多不超过10张 */ + @JsonProperty("jingyingzhengming") + private List jingyingzhengming; + + /** 带货口碑,图片fileid,图片类型,最多不超过10张 */ + @JsonProperty("daihuokoubei") + private List daihuokoubei; + + /** 入住资质,图片fileid,图片类型,最多不超过10张 */ + @JsonProperty("ruzhuzhizhi") + private List ruzhuzhizhi; + + /** 经营流水,图片fileid,图片类型,最多不超过10张 */ + @JsonProperty("jingyingliushui") + private List jingyingliushui; + + /** 补充材料,图片fileid,图片类型,最多不超过10张 */ + @JsonProperty("buchongcailiao") + private List buchongcailiao; + + /** 经营平台,仅支持taobao,jd,douyin,kuaishou,pdd,other这些取值 */ + @JsonProperty("jingyingpingtai") + private String jingyingpingtai; + + /** 账号名称 */ + @JsonProperty("zhanghaomingcheng") + private String zhanghaomingcheng; + + /** 品牌列表,获取类目信息中的attr.is_limit_brand为true时必传 */ + @JsonProperty("brand_list") + private List brandList; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/audit/CategoryAuditRequest.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/audit/CategoryAuditRequest.java new file mode 100644 index 0000000000..597f4fd3ae --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/audit/CategoryAuditRequest.java @@ -0,0 +1,23 @@ +package com.binarywang.wxjava.store.bean.audit; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 类目审核信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class CategoryAuditRequest implements Serializable { + + private static final long serialVersionUID = -1151634735247657643L; + + @JsonProperty("category_info") + private CategoryAuditInfo categoryInfo; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/audit/CategoryBrand.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/audit/CategoryBrand.java new file mode 100644 index 0000000000..5f4e6fdc3e --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/audit/CategoryBrand.java @@ -0,0 +1,23 @@ +package com.binarywang.wxjava.store.bean.audit; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 分类中的品牌 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class CategoryBrand implements Serializable { + private static final long serialVersionUID = -5437441266080209907L; + + /** 品牌ID,是店铺申请且已审核通过的品牌ID */ + @JsonProperty("brand_id") + private String brand_id; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/audit/CatsV2.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/audit/CatsV2.java new file mode 100644 index 0000000000..341b4fa1ec --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/audit/CatsV2.java @@ -0,0 +1,22 @@ +package com.binarywang.wxjava.store.bean.audit; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 新类目树类目ID + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class CatsV2 implements Serializable { + private static final long serialVersionUID = -2484092110142035589L; + + /** 新类目树类目ID */ + @JsonProperty("cat_id") + private String catId; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/audit/ProductAuditInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/audit/ProductAuditInfo.java new file mode 100644 index 0000000000..782445ef86 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/audit/ProductAuditInfo.java @@ -0,0 +1,37 @@ +package com.binarywang.wxjava.store.bean.audit; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 商品审核信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class ProductAuditInfo implements Serializable { + + private static final long serialVersionUID = -5264206679057480206L; + + /** 审核单id */ + @JsonProperty("audit_id") + private String auditId; + + /** 上一次提交时间, yyyy-MM-dd HH:mm:ss */ + @JsonProperty("submit_time") + private String submitTime; + + /** 上一次审核时间, yyyy-MM-dd HH:mm:ss */ + @JsonProperty("audit_time") + private String auditTime; + + /** 拒绝理由,只有edit_status为3时出现 */ + @JsonProperty("reject_reason") + private String rejectReason; + + @JsonProperty("func_type") + private Integer funcType; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/base/AddressInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/base/AddressInfo.java new file mode 100644 index 0000000000..d2f0aa4023 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/base/AddressInfo.java @@ -0,0 +1,70 @@ +package com.binarywang.wxjava.store.bean.base; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.Accessors; + +/** + * 地址信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@Accessors(chain = true) +public class AddressInfo implements Serializable { + + private static final long serialVersionUID = 6928300709804576100L; + + /** 收件人姓名 */ + @JsonProperty("user_name") + private String userName; + + /** 收件人手机号码 */ + @JsonProperty("tel_number") + private String telNumber; + + /** 邮编 */ + @JsonProperty("postal_code") + private String postalCode; + + /** 省份 */ + @JsonProperty("province_name") + private String provinceName; + + /** 城市 */ + @JsonProperty("city_name") + private String cityName; + + /** 区 */ + @JsonProperty("county_name") + private String countyName; + + /** 详细地址 */ + @JsonProperty("detail_info") + private String detailInfo; + + /** 国家码 */ + @JsonProperty("national_code") + private String nationalCode; + + /** 门牌号码 */ + @JsonProperty("house_number") + private String houseNumber; + + /** 纬度 */ + @JsonProperty("lat") + private Double lat; + + /** 经度 */ + @JsonProperty("lng") + private Double lng; + + public AddressInfo(String provinceName, String cityName, String countyName) { + this.provinceName = provinceName; + this.cityName = cityName; + this.countyName = countyName; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/base/AttrInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/base/AttrInfo.java new file mode 100644 index 0000000000..cae90873a5 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/base/AttrInfo.java @@ -0,0 +1,28 @@ +package com.binarywang.wxjava.store.bean.base; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 属性 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class AttrInfo implements Serializable { + + private static final long serialVersionUID = -790859309885311785L; + + /** 销售属性key(自定义),字符类型,最长不超过40 */ + @JsonProperty("attr_key") + private String key; + + /** 销售属性value(自定义),字符类型,最长不超过40,相同key下不能超过100个不同value */ + @JsonProperty("attr_value") + private String value; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/base/OffsetParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/base/OffsetParam.java new file mode 100644 index 0000000000..3f5f141fc5 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/base/OffsetParam.java @@ -0,0 +1,30 @@ +package com.binarywang.wxjava.store.bean.base; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 偏移参数 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@JsonInclude(Include.NON_NULL) +public class OffsetParam implements Serializable { + + private static final long serialVersionUID = -1268796871980541662L; + + /** 起始位置 */ + @JsonProperty("offset") + private Integer offset; + /** 拉取个数 */ + @JsonProperty("limit") + private Integer limit; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/base/PageParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/base/PageParam.java new file mode 100644 index 0000000000..98a22d4158 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/base/PageParam.java @@ -0,0 +1,28 @@ +package com.binarywang.wxjava.store.bean.base; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 分页参数 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class PageParam implements Serializable { + + private static final long serialVersionUID = -2606033044242617845L; + + /** 页码 */ + @JsonProperty("page") + protected Integer page; + + /** 每页订单数,上限100 */ + @JsonProperty("page_size") + protected Integer pageSize; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/base/StreamPageParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/base/StreamPageParam.java new file mode 100644 index 0000000000..caf71db7f0 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/base/StreamPageParam.java @@ -0,0 +1,28 @@ +package com.binarywang.wxjava.store.bean.base; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 流式分页参数 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class StreamPageParam implements Serializable { + + private static final long serialVersionUID = -4098060161712929196L; + + /** 每页订单数,上限100 */ + @JsonProperty("page_size") + protected Integer pageSize; + + /** 分页参数,上一页请求返回 */ + @JsonProperty("next_key") + protected String nextKey; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/base/TimeRange.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/base/TimeRange.java new file mode 100644 index 0000000000..2f18b31928 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/base/TimeRange.java @@ -0,0 +1,26 @@ +package com.binarywang.wxjava.store.bean.base; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 时间范围 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class TimeRange implements Serializable { + + private static final long serialVersionUID = -8149679871789511479L; + + /** 开始时间 秒级时间戳 */ + @JsonProperty("start_time") + private Long startTime; + + /** 结束时间 秒级时间戳 */ + @JsonProperty("end_time") + private Long endTime; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/base/WxStoreBaseResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/base/WxStoreBaseResponse.java new file mode 100644 index 0000000000..f566b0b22b --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/base/WxStoreBaseResponse.java @@ -0,0 +1,68 @@ +package com.binarywang.wxjava.store.bean.base; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.StringJoiner; + +/** + * 微信小店 基础响应 + * + * @author Zeyes + */ +public class WxStoreBaseResponse implements Serializable { + + private static final long serialVersionUID = 3141420881984171781L; + + /** 请求成功状态码 */ + public static final int SUCCESS_CODE = 0; + public static final int INTERNAL_ERROR_CODE = -99; + + /** + * 错误码 + */ + @JsonProperty("errcode") + protected int errCode; + + /** + * 错误消息 + */ + @JsonProperty("errmsg") + protected String errMsg; + + /** + * 错误代码 + 错误消息 + * + * @return String + */ + public String errorMessage() { + return "errcode: " + errCode + ", errmsg: " + errMsg; + } + + public boolean isSuccess() { + return errCode == SUCCESS_CODE; + } + + public int getErrCode() { + return errCode; + } + + public void setErrCode(int errCode) { + this.errCode = errCode; + } + + public String getErrMsg() { + return errMsg; + } + + public void setErrMsg(String errMsg) { + this.errMsg = errMsg; + } + + @Override + public String toString() { + return new StringJoiner(", ", WxStoreBaseResponse.class.getSimpleName() + "[", "]") + .add("errCode=" + errCode) + .add("errMsg='" + errMsg + "'") + .toString(); + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/brand/BasicBrand.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/brand/BasicBrand.java new file mode 100644 index 0000000000..589505b89d --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/brand/BasicBrand.java @@ -0,0 +1,30 @@ +package com.binarywang.wxjava.store.bean.brand; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 基础品牌信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class BasicBrand implements Serializable { + + private static final long serialVersionUID = -1991771439710177859L; + + /** 品牌库中的品牌编号(Long) */ + @JsonProperty("brand_id") + private String brandId; + + /** 品牌商标中文名 */ + @JsonProperty("ch_name") + private String chName; + + /** 品牌商标英文名 */ + @JsonProperty("en_name") + private String enName; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/brand/Brand.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/brand/Brand.java new file mode 100644 index 0000000000..aa83ae1aaf --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/brand/Brand.java @@ -0,0 +1,45 @@ +package com.binarywang.wxjava.store.bean.brand; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * 品牌信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +public class Brand extends BasicBrand { + + private static final long serialVersionUID = 4648597514861057019L; + + /** 商标分类号, 取值范围1-45 */ + @JsonProperty("classification_no") + private String classificationNo; + + /** 商标类型, 取值1:R标; 2: TM标 */ + @JsonProperty("trade_mark_symbol") + private Integer tradeMarkSymbol; + + /** 商标注册信息 */ + @JsonProperty("register_details") + private BrandRegisterDetail registerDetail; + + /** 商标申请信息 */ + @JsonProperty("application_details") + private BrandApplicationDetail applicationDetail; + + /** 商标授权信息, 取值1:自有品牌; 2: 授权品牌 */ + @JsonProperty("grant_type") + private Integer grantType; + + /** 授权品牌信息 */ + @JsonProperty("grant_details") + private BrandGrantDetail grantDetail; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/brand/BrandApplicationDetail.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/brand/BrandApplicationDetail.java new file mode 100644 index 0000000000..b2bbd77794 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/brand/BrandApplicationDetail.java @@ -0,0 +1,31 @@ +package com.binarywang.wxjava.store.bean.brand; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 商标申请信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class BrandApplicationDetail implements Serializable { + + private static final long serialVersionUID = 2145344855482129473L; + + /** 商标申请受理时间, TM标时必填 */ + @JsonProperty("acceptance_time") + private Long acceptanceTime; + + /** 商标注册申请受理书file_id, TM标时必填, 限制最多传1张, 需要先调用“资质上传”接口上传资质图片 */ + @JsonProperty("acceptance_certification") + private List acceptanceCertification; + + /** 商标申请号, TM标时必填 */ + @JsonProperty("acceptance_no") + private String acceptanceNo; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/brand/BrandApplyListResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/brand/BrandApplyListResponse.java new file mode 100644 index 0000000000..70e28b3d40 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/brand/BrandApplyListResponse.java @@ -0,0 +1,33 @@ +package com.binarywang.wxjava.store.bean.brand; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 品牌申请列表响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class BrandApplyListResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 243021267020609148L; + + /** 品牌资质申请信息 */ + @JsonProperty("brands") + private List brands; + + /** 本次翻页的上下文,用于请求下一页 */ + @JsonProperty("next_key") + private String nextKey; + + /** 品牌资质总数 */ + @JsonProperty("total_num") + private Integer totalNum; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/brand/BrandGrantDetail.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/brand/BrandGrantDetail.java new file mode 100644 index 0000000000..a97596b5bb --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/brand/BrandGrantDetail.java @@ -0,0 +1,44 @@ +package com.binarywang.wxjava.store.bean.brand; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 商标授权信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class BrandGrantDetail implements Serializable { + + private static final long serialVersionUID = 3537812707384823606L; + + /** 品牌销售授权书的file_id, 授权品牌必填, 限制最多传9张, 需要先调用“资质上传”接口上传资质图片 */ + @JsonProperty("grant_certifications") + private List grantCertifications; + + /** 授权级数, 授权品牌必填, 取值1-3 */ + @JsonProperty("grant_level") + private Integer grantLevel; + + /** 授权有效期, 开始时间, 长期有效可不填 */ + @JsonProperty("start_time") + private Long startTime; + + /** 授权有效期, 结束时间, 长期有效可不填 */ + @JsonProperty("end_time") + private Long endTime; + + /** 是否长期有效 */ + @JsonProperty("is_permanent") + private boolean permanent; + + /** 品牌权利人证件照的file_id, 限制最多传2张, 需要先调用“资质上传”接口上传资质图片 */ + @JsonProperty("brand_owner_id_photos") + private List brandOwnerIdPhotos; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/brand/BrandInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/brand/BrandInfo.java new file mode 100644 index 0000000000..5f59a23b7c --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/brand/BrandInfo.java @@ -0,0 +1,52 @@ +package com.binarywang.wxjava.store.bean.brand; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * 品牌信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class BrandInfo extends Brand { + + private static final long serialVersionUID = 5464505958132626159L; + + /** 申请单状态 1审核中 2审核失败 3已生效 4已撤回 5即将过期(不影响商品售卖) 6已过期 */ + @JsonProperty("status") + private Integer status; + + /** 创建时间 */ + @JsonProperty("create_time") + private Long createTime; + + /** 更新时间 */ + @JsonProperty("update_time") + private Long updateTime; + + /** 审核结果 */ + @JsonProperty("audit_result") + private AuditResult auditResult; + + /** 审核结果 */ + @Data + @NoArgsConstructor + public static class AuditResult implements Serializable { + + private static final long serialVersionUID = 3936802571381636820L; + /** 提审的审核单ID */ + @JsonProperty("audit_id") + private String auditId; + + /** 审核不通过的原因, 审核成功不返回 */ + @JsonProperty("reject_reason") + private String rejectReason; + } + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/brand/BrandInfoResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/brand/BrandInfoResponse.java new file mode 100644 index 0000000000..dc4dd980d7 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/brand/BrandInfoResponse.java @@ -0,0 +1,24 @@ +package com.binarywang.wxjava.store.bean.brand; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 品牌响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class BrandInfoResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 2105745692451683517L; + + /** 品牌信息 */ + @JsonProperty("brand") + private BrandInfo brand; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/brand/BrandListResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/brand/BrandListResponse.java new file mode 100644 index 0000000000..a7e771b884 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/brand/BrandListResponse.java @@ -0,0 +1,33 @@ +package com.binarywang.wxjava.store.bean.brand; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 品牌列表响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class BrandListResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = -5335449078706304920L; + + /** 品牌库中的品牌信息 */ + @JsonProperty("brands") + private List brands; + + /** 本次翻页的上下文,用于请求下一页 */ + @JsonProperty("next_key") + private String nextKey; + + /** 是否还有下一页内容 */ + @JsonProperty("continue_flag") + private boolean continueFlag; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/brand/BrandParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/brand/BrandParam.java new file mode 100644 index 0000000000..4092d87c6a --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/brand/BrandParam.java @@ -0,0 +1,26 @@ +package com.binarywang.wxjava.store.bean.brand; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 品牌参数 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@JsonInclude(JsonInclude.Include.NON_NULL) +public class BrandParam implements Serializable { + + private static final long serialVersionUID = -4894709391464428613L; + + /** 品牌信息 */ + @JsonProperty("brand") + private Brand brand; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/brand/BrandRegisterDetail.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/brand/BrandRegisterDetail.java new file mode 100644 index 0000000000..6775be55e6 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/brand/BrandRegisterDetail.java @@ -0,0 +1,48 @@ +package com.binarywang.wxjava.store.bean.brand; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 品牌注册信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class BrandRegisterDetail implements Serializable { + + private static final long serialVersionUID = 1169957179510362405L; + + /** 商标注册人, R标时必填 */ + @JsonProperty("registrant") + private String registrant; + + /** 商标注册号, R标时必填 */ + @JsonProperty("register_no") + private String registerNo; + + /** 商标注册有效期(时间戳秒), 开始时间, 长期有效可不填 */ + @JsonProperty("start_time") + private Long startTime; + + /** 商标注册有效期(时间戳秒), 结束时间, 长期有效可不填 */ + @JsonProperty("end_time") + private Long endTime; + + /** 是否长期有效 */ + @JsonProperty("is_permanent") + private boolean permanent; + + /** 商标注册证的file_id, R标时必填, 限制最多传1张, 需要先调用“资质上传”接口上传资质图片 */ + @JsonProperty("register_certifications") + private List registerCertifications; + + /** 变更/续展证明的file_id, 限制最多传5张, 需要先调用“资质上传”接口上传资质图片 */ + @JsonProperty("renew_certifications") + private List renewCertifications; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/brand/BrandSearchParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/brand/BrandSearchParam.java new file mode 100644 index 0000000000..646fb1f19f --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/brand/BrandSearchParam.java @@ -0,0 +1,31 @@ +package com.binarywang.wxjava.store.bean.brand; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import com.binarywang.wxjava.store.bean.base.StreamPageParam; + +/** + * 品牌搜索参数 + * + * @author Zeyes + */ +@Data +@EqualsAndHashCode(callSuper = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +public class BrandSearchParam extends StreamPageParam { + + private static final long serialVersionUID = 5961201403338269712L; + /** 审核单状态, 不填默认拉全部商品 */ + @JsonProperty("status") + private Integer status; + + public BrandSearchParam() { + } + + public BrandSearchParam(Integer pageSize, String nextKey, Integer status) { + super(pageSize, nextKey); + this.status = status; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/category/AccountCategoryResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/category/AccountCategoryResponse.java new file mode 100644 index 0000000000..14d4bf4cb1 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/category/AccountCategoryResponse.java @@ -0,0 +1,25 @@ +package com.binarywang.wxjava.store.bean.category; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 分类响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class AccountCategoryResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 3486089711447908477L; + + /** 类目列表 */ + @JsonProperty("data") + private List categories; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/category/CategoryAndQualificationList.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/category/CategoryAndQualificationList.java new file mode 100644 index 0000000000..055e8a1b82 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/category/CategoryAndQualificationList.java @@ -0,0 +1,23 @@ +package com.binarywang.wxjava.store.bean.category; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 分类资质响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class CategoryAndQualificationList implements Serializable { + + private static final long serialVersionUID = 4245906598437404655L; + + /** 分类列表 */ + @JsonProperty("cat_and_qua") + private List list; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/category/CategoryDetailResult.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/category/CategoryDetailResult.java new file mode 100644 index 0000000000..7a982aecb7 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/category/CategoryDetailResult.java @@ -0,0 +1,255 @@ +package com.binarywang.wxjava.store.bean.category; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class CategoryDetailResult extends WxStoreBaseResponse { + + private static final long serialVersionUID = 4657778764371047619L; + + @JsonProperty("info") + private Info info; + + @JsonProperty("attr") + private Attr attr; + + @JsonProperty("product_qua_list") + private List productQuaList; + + + @Data + @NoArgsConstructor + public static class Info implements Serializable { + + /** 类目ID */ + @JsonProperty("cat_id") + private String id; + /** 类目名称 */ + @JsonProperty("name") + private String name; + } + + @Data + @NoArgsConstructor + public static class Attr implements Serializable { + + /** 是否支持虚拟发货 */ + @JsonProperty("shop_no_shipment") + private Boolean shopNoShipment; + + /** 是否定向准入 */ + @JsonProperty("access_permit_required") + private Boolean accessPermitRequired; + + /** 是否支持预售 */ + @JsonProperty("pre_sale") + private Boolean preSale; + + /** 是否必须支持7天无理由退货 */ + @JsonProperty("seven_day_return") + private Boolean sevenDayReturn; + + /** 定准类目的品牌ID */ + @JsonProperty("brand_list") + private List brands; + + /** 类目关联的保证金,单位分 */ + @JsonProperty("deposit") + private Long deposit; + + /** 产品属性 */ + @JsonProperty("product_attr_list") + private List productAttrs; + + /** 销售属性 */ + @JsonProperty("sale_attr_list") + private List saleAttrs; + + /** 佣金信息 */ + @JsonProperty("transactionfee_info") + private FeeInfo feeInfo; + + /** 折扣规则 */ + @JsonProperty("coupon_rule") + private CouponRule couponRule; + + /** 价格下限,单位分,商品售价不可低于此价格 */ + @JsonProperty("floor_price") + private Long floorPrice; + + /** 收货时间选项 */ + @JsonProperty("confirm_receipt_days") + private List confirmReceiptDays; + + /** 是否品牌定向准入,即该类目一定要有品牌 */ + @JsonProperty("is_limit_brand") + private Boolean limitBrand; + + /** 商品编辑要求 */ + @JsonProperty("product_requirement") + private ProductRequirement productRequirement; + + /** 尺码表 */ + @JsonProperty("size_chart") + private SizeChart sizeChart; + + /** 放心买必须打开坏损包赔 */ + @JsonProperty("is_confidence_require_bad_must_pay") + private Boolean confidenceRequireBadMustPay; + + /** 资质信息 */ + @JsonProperty("product_qua_list") + private List productQuaList; + } + + @Data + @NoArgsConstructor + public static class BrandInfo implements Serializable { + + /** 定准类目的品牌ID */ + @JsonProperty("brand_id") + private String id; + } + + @Data + @NoArgsConstructor + public static class ProductAttr implements Serializable { + + /** 类目必填项名称 */ + @JsonProperty("name") + private String name; + + /** 属性类型,string为自定义,select_one为多选一,该参数短期保留,用于兼容。将来废弃,使用type_v2替代 */ + @JsonProperty("type") + private String type; + + /** + * 属性类型v2,共7种类型 + * string:文本 + * select_one:单选,选项列表在value中 + * select_many:多选,选项列表在value中 + * integer:整数,数字必须为整数 + * decimal4:小数(4 位精度),小数部分最多 4 位 + * integer_unit:整数 + 单位,单位的选项列表在value中 + * decimal4_unit:小数(4 位精度) + 单位,单位的选项列表在value中 + */ + @JsonProperty("type_v2") + private String typeV2; + + /** + * 可选项列表,当type为:select_one/select_many时,为选项列表 + * 当type为:integer_unit/decimal4_unit时,为单位的列表 + */ + @JsonProperty("value") + private String value; + + /** 是否类目必填项 */ + @JsonProperty("is_required") + private Boolean required; + + /** 输入提示,请填写提示语 */ + @JsonProperty("hint") + private String hint; + + /** 允许添加选项,当type为select_one/select_many时,标识是否允许添加新选项(value中不存在的选项) */ + @JsonProperty("append_allowed") + private Boolean appendAllowed; + } + + @Data + @NoArgsConstructor + public static class FeeInfo implements Serializable { + + /** 类目实收的交易佣金比例,单位万分比 */ + @JsonProperty("basis_point") + private Integer basisPoint; + + /** 类目原始佣金比例,单位万分比 */ + @JsonProperty("original_basis_point") + private Integer originalBasisPoint; + + /** 佣金激励类型,0:无激励措施,1:新店佣金减免 */ + @JsonProperty("incentive_type") + private Integer incentiveType; + } + + @Data + @NoArgsConstructor + public static class CouponRule implements Serializable { + + /** 最高的折扣比例,百分比, 0表示无限制 */ + @JsonProperty("discount_ratio_limit") + private Integer supportCoupon; + + /** 最高的折扣金额,单位分,0表示无限制 */ + @JsonProperty("discount_limit") + private Integer couponType; + } + + @Data + @NoArgsConstructor + public static class ProductRequirement implements Serializable { + /** 商品标题的编辑要求 */ + @JsonProperty("product_title_requirement") + private String productTitleRequirement; + + /** 商品主图的编辑要求 */ + @JsonProperty("product_img_requirement") + private String productImgRequirement; + + /** 商品描述的编辑要求 */ + @JsonProperty("product_desc_requirement") + private String productDescRequirement; + } + + @Data + @NoArgsConstructor + public static class SizeChart implements Serializable { + + /** 是否支持尺码表 */ + @JsonProperty("is_support") + private Boolean support; + + /** 尺码配置要求列表 */ + @JsonProperty("item_list") + private List itemList; + } + + @Data + @NoArgsConstructor + public static class SizeChartItem implements Serializable { + /** 尺码属性名称 */ + @JsonProperty("name") + private String name; + + /** 尺码属性值的单位 */ + @JsonProperty("unit") + private String unit; + + /** 尺码属性值的类型,1:字符型,2:整数型,3:小数型 */ + @JsonProperty("type") + private String type; + + /** 尺码属性值的填写格式,1:单值填写,2:区间值填写,3:支持单值或区间值 */ + @JsonProperty("format") + private String format; + + /** 尺码属性值的限制 */ + @JsonProperty("limit") + private String limit; + + /** 是否必填 */ + @JsonProperty("is_required") + private Boolean required; + } + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/category/CategoryQualification.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/category/CategoryQualification.java new file mode 100644 index 0000000000..858e0c3f40 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/category/CategoryQualification.java @@ -0,0 +1,50 @@ +package com.binarywang.wxjava.store.bean.category; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 分类资质信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class CategoryQualification implements Serializable { + + private static final long serialVersionUID = 6495550078851408381L; + + /** 类目 */ + @JsonProperty("cat") + private ShopCategory category; + + /** 资质信息 */ + @JsonProperty("qua") + private QualificationInfo info; + + /** 商品资质信息,将废弃,使用product_qua_list代替 */ + @JsonProperty("product_qua") + @Deprecated + private QualificationInfo productInfo; + + /** + * 品牌资质信息。 + * + * @deprecated 微信接口仍返回该字段,暂未提供替代字段。 + */ + @JsonProperty("brand_qua") + @Deprecated + private QualificationInfo brandQua; + + /** 商品资质列表,替代product_qua */ + @JsonProperty("product_qua_list") + private List productQuaList; + + /** 放心买必须打开坏损包赔 */ + @JsonProperty("is_confidence_require_bad_must_pay") + private Boolean confidenceRequireBadMustPay; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/category/CategoryQualificationResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/category/CategoryQualificationResponse.java new file mode 100644 index 0000000000..8c823e0576 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/category/CategoryQualificationResponse.java @@ -0,0 +1,28 @@ +package com.binarywang.wxjava.store.bean.category; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 分类资质响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class CategoryQualificationResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = -7869091908852685830L; + + @JsonProperty("cats") + private List list; + + @JsonProperty("cats_v2") + private List catsV2; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/category/PassCategoryInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/category/PassCategoryInfo.java new file mode 100644 index 0000000000..dd3e21b780 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/category/PassCategoryInfo.java @@ -0,0 +1,26 @@ +package com.binarywang.wxjava.store.bean.category; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 审核通过的分类和资质信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class PassCategoryInfo implements Serializable { + + private static final long serialVersionUID = 1152077957498898216L; + + /** 类目ID */ + @JsonProperty("cat_id") + private String catId; + + /** 资质ID */ + @JsonProperty("qua_id") + private String quaId; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/category/PassCategoryResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/category/PassCategoryResponse.java new file mode 100644 index 0000000000..2c8ea9cfa6 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/category/PassCategoryResponse.java @@ -0,0 +1,25 @@ +package com.binarywang.wxjava.store.bean.category; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 审核通过的分类和资质信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class PassCategoryResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = -3674591447273025743L; + + /** 类目和资质信息列表 */ + @JsonProperty("list") + private List list; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/category/QualificationInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/category/QualificationInfo.java new file mode 100644 index 0000000000..d2ba648381 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/category/QualificationInfo.java @@ -0,0 +1,36 @@ +package com.binarywang.wxjava.store.bean.category; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 资质信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class QualificationInfo implements Serializable { + + /** 资质ID */ + @JsonProperty("qua_id") + private String id; + + /** 是否需要申请 */ + @JsonProperty("need_to_apply") + private Boolean needToApply; + + /** 资质信息 */ + @JsonProperty("tips") + private String tips; + + /** 该类目申请的时候是否一定要提交资质 */ + @JsonProperty("mandatory") + private Boolean mandatory; + + /** 资质名称 */ + @JsonProperty("name") + private String name; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/category/RelationCategoryItem.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/category/RelationCategoryItem.java new file mode 100644 index 0000000000..f7cf13edb8 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/category/RelationCategoryItem.java @@ -0,0 +1,41 @@ +package com.binarywang.wxjava.store.bean.category; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * 店铺类目权限列表项 + * + * @author chucheng + */ +@Data +@NoArgsConstructor +public class RelationCategoryItem implements Serializable { + + /** 类目id */ + @JsonProperty("id") + private Long id; + + /** 类目状态, 1生效中,2已失效 */ + @JsonProperty("status") + private Integer status; + + /** 失效原因 */ + @JsonProperty("uneffective_reason") + private String uneffectiveReason; + + /** 生效时间 */ + @JsonProperty("effective_time") + private Long effectiveTime; + + /** 失效时间 */ + @JsonProperty("uneffective_time") + private Long uneffectiveTime; + + /** 类目资质id */ + @JsonProperty("qua_id") + private Long quaId; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/category/RelationCategoryRequest.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/category/RelationCategoryRequest.java new file mode 100644 index 0000000000..bea6f43dea --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/category/RelationCategoryRequest.java @@ -0,0 +1,28 @@ +package com.binarywang.wxjava.store.bean.category; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 类目权限列表请求参数 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class RelationCategoryRequest implements Serializable { + + private static final long serialVersionUID = -8765432109876543210L; + + /** 是否按状态筛选 */ + @JsonProperty("is_filter_status") + private Boolean isFilterStatus; + + /** 类目状态(当 isFilterStatus 为 true 时有效) */ + @JsonProperty("status") + private Integer status; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/category/RelationCategoryResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/category/RelationCategoryResponse.java new file mode 100644 index 0000000000..51f018abe3 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/category/RelationCategoryResponse.java @@ -0,0 +1,25 @@ +package com.binarywang.wxjava.store.bean.category; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 店铺的类目权限列表响应 + * + * @author chucheng + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class RelationCategoryResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = -8473920857463918245L; + + @JsonProperty("list") + private List list; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/category/ShopCategory.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/category/ShopCategory.java new file mode 100644 index 0000000000..e05f772728 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/category/ShopCategory.java @@ -0,0 +1,36 @@ +package com.binarywang.wxjava.store.bean.category; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 商品类目 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class ShopCategory implements Serializable { + + /** 类目ID */ + @JsonProperty("cat_id") + private String id; + + /** 类目父ID */ + @JsonProperty("f_cat_id") + private String parentId; + + /** 类目名称 */ + @JsonProperty("name") + private String name; + + /** 层级 */ + @JsonProperty("level") + private Integer level; + + /** 是否为叶子类目(品类) */ + @JsonProperty("leaf") + private Boolean leaf; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/category/ShopCategoryResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/category/ShopCategoryResponse.java new file mode 100644 index 0000000000..5df88b76f3 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/category/ShopCategoryResponse.java @@ -0,0 +1,29 @@ +package com.binarywang.wxjava.store.bean.category; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 分类响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class ShopCategoryResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 3871098948660947422L; + + /** 类目列表 */ + @JsonProperty("cat_list") + private List categories; + + /** 类目列表 */ + @JsonProperty("cat_list_v2") + private List catListV2; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/CompassFinderBaseParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/CompassFinderBaseParam.java new file mode 100644 index 0000000000..a78ad54eb8 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/CompassFinderBaseParam.java @@ -0,0 +1,30 @@ +package com.binarywang.wxjava.store.bean.compass; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * 获取达人罗盘数据通用请求参数 + * + * @author Winnie + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +@JsonInclude(JsonInclude.Include.NON_NULL) +public class CompassFinderBaseParam implements Serializable { + + private static final long serialVersionUID = - 4900361041041434435L; + + /** + * 日期,格式 yyyyMMdd + */ + @JsonProperty("ds") + private String ds; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/CompassFinderIdParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/CompassFinderIdParam.java new file mode 100644 index 0000000000..c55938a5e6 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/CompassFinderIdParam.java @@ -0,0 +1,32 @@ +package com.binarywang.wxjava.store.bean.compass.shop; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.compass.CompassFinderBaseParam; + +/** + * 带货达人 请求参数 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +public class CompassFinderIdParam extends CompassFinderBaseParam { + + private static final long serialVersionUID = 9214560943091074780L; + + /** 视频号ID */ + @JsonProperty("finder_id") + private String finderId; + + public CompassFinderIdParam(String ds, String finderId) { + super(ds); + this.finderId = finderId; + } + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/FinderAuthListResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/FinderAuthListResponse.java new file mode 100644 index 0000000000..3147f0930a --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/FinderAuthListResponse.java @@ -0,0 +1,30 @@ +package com.binarywang.wxjava.store.bean.compass.shop; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 获取授权视频号列表 响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class FinderAuthListResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = -3215073536002857589L; + + /** 主营视频号id */ + @JsonProperty("main_finder_id") + private String mainFinderId; + + /** 授权视频号id列表 */ + @JsonProperty("authorized_finder_id_list") + private List authorizedFinderIdList; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/FinderGmvData.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/FinderGmvData.java new file mode 100644 index 0000000000..206eee7e66 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/FinderGmvData.java @@ -0,0 +1,39 @@ +package com.binarywang.wxjava.store.bean.compass.shop; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 带货达人数据 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class FinderGmvData implements Serializable { + + private static final long serialVersionUID = -7463331971169286175L; + + /** 成交金额,单位分 */ + @JsonProperty("pay_gmv") + private String payGmv; + + /** 动销商品数 */ + @JsonProperty("pay_product_id_cnt") + private String payProductIdCnt; + + /** 成交人数 */ + @JsonProperty("pay_uv") + private String payUv; + + /** 退款金额,单位分 */ + @JsonProperty("refund_gmv") + private String refundGmv; + + /** 成交退款金额,单位分 */ + @JsonProperty("pay_refund_gmv") + private String payRefundGmv; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/FinderGmvItem.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/FinderGmvItem.java new file mode 100644 index 0000000000..a621395701 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/FinderGmvItem.java @@ -0,0 +1,30 @@ +package com.binarywang.wxjava.store.bean.compass.shop; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 带货达人列表数据 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class FinderGmvItem implements Serializable { + + private static final long serialVersionUID = -3740996985044711599L; + + /** 视频号id */ + @JsonProperty("finder_id") + private String finderId; + + /** 视频号昵称 */ + @JsonProperty("finder_nickname") + private String finderNickname; + + /** 带货达人数据 */ + @JsonProperty("data") + private FinderGmvData data; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/FinderListResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/FinderListResponse.java new file mode 100644 index 0000000000..cf25ecea81 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/FinderListResponse.java @@ -0,0 +1,26 @@ +package com.binarywang.wxjava.store.bean.compass.shop; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 带货达人列表 响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class FinderListResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 6358992001065379269L; + + /** 授权视频号id列表 */ + @JsonProperty("finder_list") + private List finderList; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/FinderOverallData.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/FinderOverallData.java new file mode 100644 index 0000000000..56c0e25e2a --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/FinderOverallData.java @@ -0,0 +1,35 @@ +package com.binarywang.wxjava.store.bean.compass.shop; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 带货数据概览 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class FinderOverallData implements Serializable { + + private static final long serialVersionUID = -994852668593815907L; + + /** 成交金额,单位分 */ + @JsonProperty("pay_gmv") + private String payGmv; + + /** 动销达人数 */ + @JsonProperty("pay_sales_finder_cnt") + private String paySalesFinderCnt; + + /** 动销商品数 */ + @JsonProperty("pay_product_id_cnt") + private String payProductIdCnt; + + /** 点击-成交转化率 */ + @JsonProperty("click_to_pay_uv_ratio") + private Double clickToPayUvRatio; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/FinderOverallResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/FinderOverallResponse.java new file mode 100644 index 0000000000..cf86f94a04 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/FinderOverallResponse.java @@ -0,0 +1,26 @@ +package com.binarywang.wxjava.store.bean.compass.shop; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 带货数据概览 响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class FinderOverallResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = -4935555091396799318L; + + /** + * 电商概览数据 + */ + @JsonProperty("data") + private FinderOverallData data; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/FinderProductListItem.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/FinderProductListItem.java new file mode 100644 index 0000000000..68dd50260e --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/FinderProductListItem.java @@ -0,0 +1,66 @@ +package com.binarywang.wxjava.store.bean.compass.shop; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 带货达人商品列表 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class FinderProductListItem implements Serializable { + + private static final long serialVersionUID = 1646092488200992026L; + + /** 商品id */ + @JsonProperty("product_id") + private String productId; + + /** 商品头图 */ + @JsonProperty("head_img_url") + private String headImgUrl; + + /** 商品标题 */ + @JsonProperty("title") + private String title; + + /** 商品价格 */ + @JsonProperty("price") + private String price; + + /** 商品1级类目 */ + @JsonProperty("first_category_id") + private String firstCategoryId; + + /** 商品2级类目 */ + @JsonProperty("second_category_id") + private String secondCategoryId; + + /** 商品3级类目 */ + @JsonProperty("third_category_id") + private String thirdCategoryId; + + /** gmv */ + @JsonProperty("data") + private GmvData data; + + + @Data + @NoArgsConstructor + public static class GmvData implements Serializable { + private static final long serialVersionUID = 1840494188469233735L; + + /** 佣金率 */ + @JsonProperty("commission_ratio") + private Double commissionRatio; + + /** 成交金额,单位分 */ + @JsonProperty("pay_gmv") + private String payGmv; + } + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/FinderProductListResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/FinderProductListResponse.java new file mode 100644 index 0000000000..3d967091e7 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/FinderProductListResponse.java @@ -0,0 +1,28 @@ +package com.binarywang.wxjava.store.bean.compass.shop; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 带货达人商品列表 响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class FinderProductListResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 5883861777181983173L; + + /** + * 带货达人商品列表 + */ + @JsonProperty("product_list") + private List productList; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/FinderProductOverallResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/FinderProductOverallResponse.java new file mode 100644 index 0000000000..6f24ce41f5 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/FinderProductOverallResponse.java @@ -0,0 +1,25 @@ +package com.binarywang.wxjava.store.bean.compass.shop; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 带货达人详情 响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class FinderProductOverallResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 6358992001065379269L; + + /** 带货达人详情 */ + @JsonProperty("data") + private FinderGmvData data; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/FinderProductSimpleGmvData.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/FinderProductSimpleGmvData.java new file mode 100644 index 0000000000..ab7df04ed0 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/FinderProductSimpleGmvData.java @@ -0,0 +1,26 @@ +package com.binarywang.wxjava.store.bean.compass.shop; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 带货达人商品GMV数据 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class FinderProductSimpleGmvData implements Serializable { + private static final long serialVersionUID = -3740996985044711599L; + + /** 佣金率 */ + @JsonProperty("commission_ratio") + private Double commissionRatio; + + /** 成交金额,单位分 */ + @JsonProperty("pay_gmv") + private String payGmv; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/ShopField.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/ShopField.java new file mode 100644 index 0000000000..d33652e0ca --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/ShopField.java @@ -0,0 +1,44 @@ +package com.binarywang.wxjava.store.bean.compass.shop; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 维度数据 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class ShopField implements Serializable { + + private static final long serialVersionUID = -8669197081350262569L; + + /** 维度类别名 */ + @JsonProperty("field_name") + private String fieldName; + + /** 维度指标数据列表 */ + @JsonProperty("data_list") + private List dataList; + + + @Data + @NoArgsConstructor + public static class FieldDetail implements Serializable { + + private static final long serialVersionUID = 2900633035074950462L; + + /** 维度指标名 */ + @JsonProperty("dim_key") + private String dimKey; + + /** 维度指标值 */ + @JsonProperty("dim_value") + private String dimValue; + + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/ShopLiveData.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/ShopLiveData.java new file mode 100644 index 0000000000..25e617577c --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/ShopLiveData.java @@ -0,0 +1,36 @@ +package com.binarywang.wxjava.store.bean.compass.shop; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 店铺开播数据 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class ShopLiveData implements Serializable { + + /** 直播id */ + @JsonProperty("live_id") + private String liveId; + + /** 直播标题 */ + @JsonProperty("live_title") + private String liveTitle; + + /** 开播时间,unix时间戳 */ + @JsonProperty("live_time") + private String liveTime; + + /** 直播时长,单位秒 */ + @JsonProperty("live_duration") + private String liveDuration; + + /** 直播封面 */ + @JsonProperty("live_cover_img_url") + private String liveCoverImgUrl; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/ShopLiveListResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/ShopLiveListResponse.java new file mode 100644 index 0000000000..3311beb1fa --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/ShopLiveListResponse.java @@ -0,0 +1,26 @@ +package com.binarywang.wxjava.store.bean.compass.shop; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 店铺开播列表 响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class ShopLiveListResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = -7110751559923117330L; + + /** 店铺开播列表 */ + @JsonProperty("live_list") + private List liveList; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/ShopOverall.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/ShopOverall.java new file mode 100644 index 0000000000..57e6499c0c --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/ShopOverall.java @@ -0,0 +1,42 @@ +package com.binarywang.wxjava.store.bean.compass.shop; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 电商概览数据 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class ShopOverall implements Serializable { + + private static final long serialVersionUID = 3304918097895132226L; + + /** 成交金额,单位分 */ + @JsonProperty("pay_gmv") + private String payGmv; + + /** 成交人数 */ + @JsonProperty("pay_uv") + private String payUv; + + /** 成交退款金额,单位分 */ + @JsonProperty("pay_refund_gmv") + private String payRefundGmv; + + /** 成交订单数 */ + @JsonProperty("pay_order_cnt") + private String payOrderCnt; + + /** 直播成交金额,单位分 */ + @JsonProperty("live_pay_gmv") + private String livePayGmv; + + /** 短视频成交金额,单位分 */ + @JsonProperty("feed_pay_gmv") + private String feedPayGmv; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/ShopOverallResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/ShopOverallResponse.java new file mode 100644 index 0000000000..fc32f8a8f6 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/ShopOverallResponse.java @@ -0,0 +1,27 @@ +package com.binarywang.wxjava.store.bean.compass.shop; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 获取电商概览数据响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class ShopOverallResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 1632800741359642057L; + + /** + * 电商概览数据 + */ + @JsonProperty("data") + private ShopOverall data; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/ShopProductCompassData.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/ShopProductCompassData.java new file mode 100644 index 0000000000..d5f9242075 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/ShopProductCompassData.java @@ -0,0 +1,143 @@ +package com.binarywang.wxjava.store.bean.compass.shop; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 店铺商品罗盘数据 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class ShopProductCompassData implements Serializable { + + private static final long serialVersionUID = 5387546181020447627L; + + /** 成交金额 */ + @JsonProperty("pay_gmv") + private String payGmv; + + /**下单金额,单位分 */ + @JsonProperty("create_gmv") + private String createGmv; + + /** 下单订单数 */ + @JsonProperty("create_cnt") + private String createCnt; + + /** 下单人数 */ + @JsonProperty("create_uv") + private String createUv; + + /** 下单件数 */ + @JsonProperty("create_product_cnt") + private String createProductCnt; + + /** 成交订单数 */ + @JsonProperty("pay_cnt") + private String payCnt; + + /** 成交人数 */ + @JsonProperty("pay_uv") + private String payUv; + + /** 成交件数 */ + @JsonProperty("pay_product_cnt") + private String payProductCnt; + + /** 成交金额(剔除退款) */ + @JsonProperty("pure_pay_gmv") + private String purePayGmv; + + /** 成交客单价(剔除退款) */ + @JsonProperty("pay_gmv_per_uv") + private String payGmvPerUv; + + /** 实际结算金额,单位分 */ + @JsonProperty("seller_actual_settle_amount") + private String sellerActualSettleAmount; + + /** 实际服务费金额,单位分 */ + @JsonProperty("platform_actual_commission") + private String platformActualCommission; + + /** 实际达人佣金支出,单位分 */ + @JsonProperty("finderuin_actual_commission") + private String finderuinActualCommission; + + /** 实际团长佣金支出,单位分 */ + @JsonProperty("captain_actual_commission") + private String captainActualCommission; + + /** 预估结算金额,单位分 */ + @JsonProperty("seller_predict_settle_amount") + private String sellerPredictSettleAmount; + + /** 预估服务费金额,单位分 */ + @JsonProperty("platform_predict_commission") + private String platformPredictCommission; + + /** 预估达人佣金支出,单位分 */ + @JsonProperty("finderuin_predict_commission") + private String finderuinPredictCommission; + + /** 预估团长佣金支出,单位分 */ + @JsonProperty("captain_predict_commission") + private String captainPredictCommission; + + /** 商品点击人数 */ + @JsonProperty("product_click_uv") + private String productClickUv; + + /** 商品点击次数 */ + @JsonProperty("product_click_cnt") + private String productClickCnt; + + /** 成交退款金额,单位分 */ + @JsonProperty("pay_refund_gmv") + private String payRefundGmv; + + /** 成交退款人数,单位分 */ + @JsonProperty("pay_refund_uv") + private String payRefundUv; + + /** 成交退款率 */ + @JsonProperty("pay_refund_ratio") + private Double payRefundRatio; + + /** 发货后成交退款率 */ + @JsonProperty("pay_refund_after_send_ratio") + private Double payRefundAfterSendRatio; + + /** 成交退款订单数 */ + @JsonProperty("pay_refund_cnt") + private String payRefundCnt; + + /** 成交退款件数 */ + @JsonProperty("pay_refund_product_cnt") + private String payRefundProductCnt; + + /** 发货前成交退款率 */ + @JsonProperty("pay_refund_before_send_ratio") + private Double payRefundBeforeSendRatio; + + /** 退款金额,单位分 */ + @JsonProperty("refund_gmv") + private String refundGmv; + + /** 退款件数 */ + @JsonProperty("refund_product_cnt") + private String refundProductCnt; + + /** 退款订单数 */ + @JsonProperty("refund_cnt") + private String refundCnt; + + /** 退款人数 */ + @JsonProperty("refund_uv") + private String refundUv; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/ShopProductDataParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/ShopProductDataParam.java new file mode 100644 index 0000000000..fdb72308ce --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/ShopProductDataParam.java @@ -0,0 +1,32 @@ +package com.binarywang.wxjava.store.bean.compass.shop; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.compass.CompassFinderBaseParam; + +/** + * 商品数据 请求参数 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +public class ShopProductDataParam extends CompassFinderBaseParam { + + private static final long serialVersionUID = - 5016298274452168329L; + + /** 商品id */ + @JsonProperty("product_id") + private String productId; + + public ShopProductDataParam(String ds, String productId) { + super(ds); + this.productId = productId; + } + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/ShopProductDataResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/ShopProductDataResponse.java new file mode 100644 index 0000000000..5df831bb57 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/ShopProductDataResponse.java @@ -0,0 +1,26 @@ +package com.binarywang.wxjava.store.bean.compass.shop; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 商品详细信息 响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class ShopProductDataResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 6903392663954301579L; + + /** 商品详细信息 */ + @JsonProperty("product_info") + private ShopProductInfo productInfo; + + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/ShopProductInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/ShopProductInfo.java new file mode 100644 index 0000000000..f8334a6375 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/ShopProductInfo.java @@ -0,0 +1,51 @@ +package com.binarywang.wxjava.store.bean.compass.shop; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 店铺带货商品数据 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class ShopProductInfo implements Serializable { + + private static final long serialVersionUID = 3376047696301017643L; + + /** 商品id */ + @JsonProperty("product_id") + private String productId; + + /** 商品图 */ + @JsonProperty("head_img_url") + private String headImgUrl; + + /** 商品标题 */ + @JsonProperty("title") + private String title; + + /** 商品价格,单位分 */ + @JsonProperty("price") + private String price; + + /** 商品一级类目 */ + @JsonProperty("first_category_id") + private String firstCategoryId; + + /** 商品二级类目 */ + @JsonProperty("second_category_id") + private String secondCategoryId; + + /** 商品三级类目 */ + @JsonProperty("third_category_id") + private String thirdCategoryId; + + /** 商品罗盘数据 */ + @JsonProperty("data") + private ShopProductCompassData data; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/ShopProductListResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/ShopProductListResponse.java new file mode 100644 index 0000000000..a6d5bb4b0f --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/ShopProductListResponse.java @@ -0,0 +1,26 @@ +package com.binarywang.wxjava.store.bean.compass.shop; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 商品列表 响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class ShopProductListResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = -6328224902770141045L; + + /** 商品列表 */ + @JsonProperty("product_list") + private List productList; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/ShopSaleProfileData.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/ShopSaleProfileData.java new file mode 100644 index 0000000000..b19ba707a1 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/ShopSaleProfileData.java @@ -0,0 +1,24 @@ +package com.binarywang.wxjava.store.bean.compass.shop; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 店铺人群数据 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class ShopSaleProfileData implements Serializable { + + private static final long serialVersionUID = -6825849811081728787L; + + /** 维度数据列表 */ + @JsonProperty("field_list") + private List fieldList; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/ShopSaleProfileDataParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/ShopSaleProfileDataParam.java new file mode 100644 index 0000000000..040cc68a25 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/ShopSaleProfileDataParam.java @@ -0,0 +1,32 @@ +package com.binarywang.wxjava.store.bean.compass.shop; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.compass.CompassFinderBaseParam; + +/** + * 获取带货人群数据请求参数 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +public class ShopSaleProfileDataParam extends CompassFinderBaseParam { + + private static final long serialVersionUID = 240010632808576923L; + + /** 用户类型 */ + @JsonProperty("type") + private Integer type; + + public ShopSaleProfileDataParam(String ds, Integer type) { + super(ds); + this.type = type; + } + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/ShopSaleProfileDataResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/ShopSaleProfileDataResponse.java new file mode 100644 index 0000000000..91761c779e --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/compass/shop/ShopSaleProfileDataResponse.java @@ -0,0 +1,25 @@ +package com.binarywang.wxjava.store.bean.compass.shop; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 店铺人群数据 响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class ShopSaleProfileDataResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 8520148855114842741L; + + /** 店铺人群数据 */ + @JsonProperty("data") + private ShopSaleProfileData data; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/complaint/ComplaintHistory.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/complaint/ComplaintHistory.java new file mode 100644 index 0000000000..764bb3d526 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/complaint/ComplaintHistory.java @@ -0,0 +1,46 @@ +package com.binarywang.wxjava.store.bean.complaint; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 纠纷历史 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class ComplaintHistory implements Serializable { + + private static final long serialVersionUID = -4706637116597650133L; + /** 历史操作类型,见 {@link com.binarywang.wxjava.store.enums.ComplaintItemType } */ + @JsonProperty("item_type") + private Integer itemType; + + /** 操作时间,Unix时间戳 */ + @JsonProperty("time") + private Long time; + + /** 用户联系电话 */ + @JsonProperty("phone_number") + private String phoneNumber; + + /** 相关文本内容 */ + @JsonProperty("content") + private String content; + + /** 相关图片media_id列表 */ + @JsonProperty("media_id_list") + private List mediaIds; + + /** 售后类型, 1-仅退款 2-退货退款 */ + @JsonProperty("after_sale_type") + private Integer afterSaleType; + + /** 售后原因,见 {@link com.binarywang.wxjava.store.enums.AfterSalesReason} */ + @JsonProperty("after_sale_reason") + private Integer afterSaleReason; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/complaint/ComplaintOrderResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/complaint/ComplaintOrderResponse.java new file mode 100644 index 0000000000..6d8e65a6c1 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/complaint/ComplaintOrderResponse.java @@ -0,0 +1,35 @@ +package com.binarywang.wxjava.store.bean.complaint; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 纠纷单响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class ComplaintOrderResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 1968530826349555367L; + /** 售后单号 */ + @JsonProperty("after_sale_order_id") + private String afterSaleOrderId; + + /** 订单号 */ + @JsonProperty("order_id") + private String orderId; + + /** 纠纷历史 */ + @JsonProperty("history") + private List history; + + /** 纠纷单状态, 见 {@link com.binarywang.wxjava.store.enums.ComplaintStatus} */ + @JsonProperty("status") + private Integer status; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/complaint/ComplaintParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/complaint/ComplaintParam.java new file mode 100644 index 0000000000..a93966e659 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/complaint/ComplaintParam.java @@ -0,0 +1,34 @@ +package com.binarywang.wxjava.store.bean.complaint; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 纠纷单留言 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@JsonInclude(JsonInclude.Include.NON_NULL) +public class ComplaintParam implements Serializable { + + private static final long serialVersionUID = 6146118590005718327L; + /** 纠纷单号 */ + @JsonProperty("complaint_id") + private String complaintId; + + /** 留言内容,最多500字 */ + @JsonProperty("content") + private String content; + + /** 图片media_id列表,所有留言总图片数量最多20张 */ + @JsonProperty("media_id_list") + private List mediaIds; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/cooperation/CooperationData.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/cooperation/CooperationData.java new file mode 100644 index 0000000000..ce62effc2f --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/cooperation/CooperationData.java @@ -0,0 +1,47 @@ +package com.binarywang.wxjava.store.bean.cooperation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 合作账号信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class CooperationData implements Serializable { + + private static final long serialVersionUID = 3930010847236599458L; + + /** 合作账号id 公众号: gh_开头id 小程序: appid */ + @JsonProperty("sharer_id") + private String sharerId; + + /** 邀请/合作账号状态 1已绑定 2已解绑 3邀请已拒绝 4邀请接受中 5邀请接受超时 6邀请接受失败 7邀请店铺取消 */ + @JsonProperty("status") + private Integer status; + + /** 合作账号名称 */ + @JsonProperty("sharer_name") + private String sharerName; + + /** 合作账号类型 2公众号 3小程序 */ + @JsonProperty("sharer_type") + private Integer sharerType; + + /** 接受绑定时间戳,ms */ + @JsonProperty("bind_time") + private Long bindTime; + + /** 用户拒绝时间戳,ms */ + @JsonProperty("reject_time") + private Long rejectTime; + + /** 商家取消时间戳,ms */ + @JsonProperty("cancel_time") + private Long cancelTime; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/cooperation/CooperationListResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/cooperation/CooperationListResponse.java new file mode 100644 index 0000000000..b469a12768 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/cooperation/CooperationListResponse.java @@ -0,0 +1,25 @@ +package com.binarywang.wxjava.store.bean.cooperation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 合作账号列表响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class CooperationListResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 6998637882644598826L; + + /** 合作账号列表 */ + @JsonProperty("data_list") + private List dataList; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/cooperation/CooperationQrCode.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/cooperation/CooperationQrCode.java new file mode 100644 index 0000000000..0f169b02f3 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/cooperation/CooperationQrCode.java @@ -0,0 +1,23 @@ +package com.binarywang.wxjava.store.bean.cooperation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 合作账号二维码数据 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class CooperationQrCode implements Serializable { + + private static final long serialVersionUID = -7096916911986699150L; + + /** base64编码后的图片数据 */ + @JsonProperty("qrcode_base64") + private Integer qrCodeBase64; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/cooperation/CooperationQrCodeResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/cooperation/CooperationQrCodeResponse.java new file mode 100644 index 0000000000..0ab844f88e --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/cooperation/CooperationQrCodeResponse.java @@ -0,0 +1,24 @@ +package com.binarywang.wxjava.store.bean.cooperation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 合作账号二维码响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class CooperationQrCodeResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 6998637882644598826L; + + /** 合作账号二维码 */ + @JsonProperty("data") + private CooperationQrCode data; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/cooperation/CooperationSharerParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/cooperation/CooperationSharerParam.java new file mode 100644 index 0000000000..22d8ae2926 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/cooperation/CooperationSharerParam.java @@ -0,0 +1,30 @@ +package com.binarywang.wxjava.store.bean.cooperation; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 合作账号参数 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@JsonInclude(JsonInclude.Include.NON_NULL) +public class CooperationSharerParam implements Serializable { + + private static final long serialVersionUID = 5032621997764493109L; + + /** 合作账号id */ + @JsonProperty("sharer_id") + private String sharerId; + + /** 合作账号类型 */ + @JsonProperty("sharer_type") + private Integer sharerType; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/cooperation/CooperationStatus.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/cooperation/CooperationStatus.java new file mode 100644 index 0000000000..688ad51390 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/cooperation/CooperationStatus.java @@ -0,0 +1,23 @@ +package com.binarywang.wxjava.store.bean.cooperation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 合作账号状态 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class CooperationStatus implements Serializable { + + private static final long serialVersionUID = -7096916911986699150L; + + /** 邀请/合作账号状态 1已绑定 2已解绑 3邀请已拒绝 4邀请接受中 5邀请接受超时 6邀请接受失败 7邀请店铺取消 */ + @JsonProperty("status") + private Integer status; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/cooperation/CooperationStatusResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/cooperation/CooperationStatusResponse.java new file mode 100644 index 0000000000..3702662c8e --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/cooperation/CooperationStatusResponse.java @@ -0,0 +1,24 @@ +package com.binarywang.wxjava.store.bean.cooperation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 合作账号状态响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class CooperationStatusResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 6998637882644598826L; + + /** 合作账号状态 */ + @JsonProperty("data") + private CooperationStatus data; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/AutoValidInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/AutoValidInfo.java new file mode 100644 index 0000000000..ff11c38af6 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/AutoValidInfo.java @@ -0,0 +1,21 @@ +package com.binarywang.wxjava.store.bean.coupon; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 自动生效信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class AutoValidInfo implements Serializable { + + private static final long serialVersionUID = 1702505613539861103L; + /** 优惠券开启自动生效类型 0不启用自动生效 1启用自动生效,按领券开始时间(自动生效时间为 receive_info.start_time) */ + @JsonProperty("auto_valid_type") + private Integer autoValidType; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/CouponDetailInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/CouponDetailInfo.java new file mode 100644 index 0000000000..5c804ede89 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/CouponDetailInfo.java @@ -0,0 +1,43 @@ +package com.binarywang.wxjava.store.bean.coupon; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 优惠券信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor + +public class CouponDetailInfo implements Serializable { + + private static final long serialVersionUID = 5994815232349181577L; + /** 优惠券名称 **/ + @JsonProperty("name") + private String name; + + /** 优惠券有效信息 **/ + @JsonProperty("valid_info") + private ValidInfo validInfo; + + /** 推广信息 **/ + @JsonProperty("promote_info") + private PromoteInfo promoteInfo; + + /** 优惠信息 **/ + @JsonProperty("discount_info") + private DiscountInfo discountInfo; + + /** 额外信息 **/ + @JsonProperty("ext_info") + private ExtInfo extInfo; + + /** 领取信息 **/ + @JsonProperty("receive_info") + private ReceiveInfo receiveInfo; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/CouponIdInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/CouponIdInfo.java new file mode 100644 index 0000000000..9a3ea87d6f --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/CouponIdInfo.java @@ -0,0 +1,24 @@ +package com.binarywang.wxjava.store.bean.coupon; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 优惠券id + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class CouponIdInfo implements Serializable { + + private static final long serialVersionUID = 6284609705855608275L; + /** 优惠券ID */ + @JsonProperty("coupon_id") + private String couponId; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/CouponIdResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/CouponIdResponse.java new file mode 100644 index 0000000000..6f13fbfec5 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/CouponIdResponse.java @@ -0,0 +1,21 @@ +package com.binarywang.wxjava.store.bean.coupon; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + + +/** + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class CouponIdResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = -3263189706802013651L; + @JsonProperty("data") + private CouponIdInfo data; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/CouponInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/CouponInfo.java new file mode 100644 index 0000000000..e84d932bc5 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/CouponInfo.java @@ -0,0 +1,38 @@ +package com.binarywang.wxjava.store.bean.coupon; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class CouponInfo extends CouponIdInfo { + + private static final long serialVersionUID = -5862063828870424262L; + /** 优惠券类型 **/ + @JsonProperty("type") + private Integer type; + + /** 优惠券状态 **/ + @JsonProperty("status") + private Integer status; + + /** 优惠券创建时间 */ + @JsonProperty("create_time") + private Long createTime; + + /** 优惠券更新时间 */ + @JsonProperty("update_time") + private Long updateTime; + + /** 优惠券信息 */ + @JsonProperty("coupon_info") + private CouponDetailInfo detail; + + /** 库存信息 */ + @JsonProperty("stock_info") + private StockInfo stockInfo; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/CouponInfoResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/CouponInfoResponse.java new file mode 100644 index 0000000000..0a0e4a21b4 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/CouponInfoResponse.java @@ -0,0 +1,20 @@ +package com.binarywang.wxjava.store.bean.coupon; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class CouponInfoResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 5261320058699488529L; + @JsonProperty("coupon") + private CouponInfo coupon; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/CouponListParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/CouponListParam.java new file mode 100644 index 0000000000..8e681127b0 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/CouponListParam.java @@ -0,0 +1,45 @@ +package com.binarywang.wxjava.store.bean.coupon; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * 获取优惠券ID列表接口的请求参数 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@JsonInclude(Include.NON_NULL) +public class CouponListParam implements Serializable { + private static final long serialVersionUID = 7123047113279657365L; + + /** + * 优惠券状态 {@link com.binarywang.wxjava.store.enums.WxCouponStatus} + */ + @JsonProperty("status") + private Integer status; + + /** + * 第几页(最小填1) + */ + @JsonProperty("page") + private Integer page; + + /** + * 每页数量(不超过200) + */ + @JsonProperty("page_size") + private Integer pageSize; + + /** + * 分页上下文 + */ + @JsonProperty("page_ctx") + private String pageCtx; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/CouponListResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/CouponListResponse.java new file mode 100644 index 0000000000..ac53c861a2 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/CouponListResponse.java @@ -0,0 +1,31 @@ +package com.binarywang.wxjava.store.bean.coupon; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class CouponListResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = -5330296358041282751L; + /** 优惠券id列表 */ + @JsonProperty("coupons") + private List coupons; + + /** 优惠券总数 */ + @JsonProperty("total_num") + private Integer totalNum; + + /** 优惠券上下文 */ + @JsonProperty("page_ctx") + private String pageCtx; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/CouponParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/CouponParam.java new file mode 100644 index 0000000000..725a1bed3f --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/CouponParam.java @@ -0,0 +1,50 @@ +package com.binarywang.wxjava.store.bean.coupon; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * 优惠券参数 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class CouponParam extends CouponIdInfo { + + private static final long serialVersionUID = -3663331372622943337L; + /** 优惠券类型 **/ + @JsonProperty("type") + private Integer type; + + /** 优惠券名称,最长10个中文字符 */ + @JsonProperty("name") + private String name; + + /** 优惠信息 **/ + @JsonProperty("discount_info") + private DiscountInfo discountInfo; + + /** 额外信息 **/ + @JsonProperty("ext_info") + private ExtInfo extInfo; + + /** 推广信息 **/ + @JsonProperty("promote_info") + private PromoteInfo promoteInfo; + + /** 领取信息 **/ + @JsonProperty("receive_info") + private ReceiveInfo receiveInfo; + + /** 优惠券有效信息 **/ + @JsonProperty("valid_info") + private ValidInfo validInfo; + + /** 优惠券自动生效信息 **/ + @JsonProperty("auto_valid_info") + private AutoValidInfo autoValidInfo; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/CouponStatusParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/CouponStatusParam.java new file mode 100644 index 0000000000..1c2f4129ca --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/CouponStatusParam.java @@ -0,0 +1,28 @@ +package com.binarywang.wxjava.store.bean.coupon; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * @author Zeyes + */ +@Data +@EqualsAndHashCode(callSuper = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +public class CouponStatusParam extends CouponIdInfo { + + private static final long serialVersionUID = -7108348049925634704L; + /** 状态 */ + @JsonProperty("status") + private Integer status; + + public CouponStatusParam() { + } + + public CouponStatusParam(String couponId, Integer status) { + super(couponId); + this.status = status; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/DiscountCondition.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/DiscountCondition.java new file mode 100644 index 0000000000..c148a4c90b --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/DiscountCondition.java @@ -0,0 +1,30 @@ +package com.binarywang.wxjava.store.bean.coupon; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 折扣条件 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class DiscountCondition implements Serializable { + + private static final long serialVersionUID = 3250293381093835082L; + /** 优惠券使用条件, 满 x 件商品可用 */ + @JsonProperty("product_cnt") + private Integer productCnt; + + /** 优惠券使用条件, 价格满 x 可用,单位分 */ + @JsonProperty("product_price") + private Integer productPrice; + + /** 优惠券使用条件, 指定商品 id 可用 */ + @JsonProperty("product_ids") + private List productIds; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/DiscountInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/DiscountInfo.java new file mode 100644 index 0000000000..0337b6ed39 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/DiscountInfo.java @@ -0,0 +1,29 @@ +package com.binarywang.wxjava.store.bean.coupon; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 优惠信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class DiscountInfo implements Serializable { + + private static final long serialVersionUID = 3660070880545144112L; + /** 优惠券折扣数 * 1000, 例如 5.1折-> 5100 */ + @JsonProperty("discount_num") + private Integer discountNum; + + /** 优惠券减少金额, 单位分, 例如0.5元-> 50 */ + @JsonProperty("discount_fee") + private Integer discountFee; + + /** 优惠条件 */ + @JsonProperty("discount_condition") + private DiscountCondition discountCondition; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/ExtInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/ExtInfo.java new file mode 100644 index 0000000000..af4ef6e5ca --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/ExtInfo.java @@ -0,0 +1,33 @@ +package com.binarywang.wxjava.store.bean.coupon; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 额外信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class ExtInfo implements Serializable { + + private static final long serialVersionUID = 9053035437087423233L; + /** 商品折扣券领取后跳转的商品id **/ + @JsonProperty("jump_product_id") + private String jumpProductId; + + /** 备注信息 **/ + @JsonProperty("notes") + private String notes; + + /** 优惠券有效时间 **/ + @JsonProperty("valid_time") + private Long validTime; + + /** 优惠券失效时间戳 **/ + @JsonProperty("invalid_time") + private Long invalidTime; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/PromoteInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/PromoteInfo.java new file mode 100644 index 0000000000..bd2a1292bf --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/PromoteInfo.java @@ -0,0 +1,21 @@ +package com.binarywang.wxjava.store.bean.coupon; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 推广信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class PromoteInfo implements Serializable { + + private static final long serialVersionUID = -3030639750899957382L; + /** 推广类型 {@link com.binarywang.wxjava.store.enums.PromoteType} */ + @JsonProperty("promote_type") + private Integer promoteType; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/ReceiveInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/ReceiveInfo.java new file mode 100644 index 0000000000..5980f20ed6 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/ReceiveInfo.java @@ -0,0 +1,33 @@ +package com.binarywang.wxjava.store.bean.coupon; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 领取信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class ReceiveInfo implements Serializable { + + private static final long serialVersionUID = 755956808504040633L; + /** 优惠券领用结束时间 **/ + @JsonProperty("end_time") + private Long endTime; + + /** 单人限领张数 **/ + @JsonProperty("limit_num_one_person") + private Integer limitNumOnePerson; + + /** 优惠券领用开始时间 **/ + @JsonProperty("start_time") + private Long startTime; + + /** 优惠券领用总数 **/ + @JsonProperty("total_num") + private Integer totalNum; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/StockInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/StockInfo.java new file mode 100644 index 0000000000..a896998bb3 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/StockInfo.java @@ -0,0 +1,29 @@ +package com.binarywang.wxjava.store.bean.coupon; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 库存信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class StockInfo implements Serializable { + + private static final long serialVersionUID = -6078383881065929862L; + /** 优惠券剩余量 */ + @JsonProperty("issued_num") + private Integer issuedNum; + + /** 优惠券领用量 */ + @JsonProperty("receive_num") + private Integer receiveNum; + + /** 优惠券已用量 */ + @JsonProperty("used_num") + private Integer usedNum; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/UserCoupon.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/UserCoupon.java new file mode 100644 index 0000000000..fb0be659eb --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/UserCoupon.java @@ -0,0 +1,50 @@ +package com.binarywang.wxjava.store.bean.coupon; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * 用户优惠券 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class UserCoupon extends UserCouponIdInfo { + + private static final long serialVersionUID = -4777537717885622888L; + /** 优惠券状态 {@link com.binarywang.wxjava.store.enums.UserCouponStatus} */ + @JsonProperty("status") + private Integer status; + + /** 优惠券派发时间 */ + @JsonProperty("create_time") + private Long createTime; + + /** 优惠券更新时间 */ + @JsonProperty("update_time") + private Long updateTime; + + /** 优惠券生效时间 */ + @JsonProperty("start_time") + private Long startTime; + + /** 优惠券失效时间 */ + @JsonProperty("end_time") + private Long endTime; + + /** 附加信息 */ + @JsonProperty("ext_info") + private UserExtInfo extInfo; + + /** 优惠券使用的订单id */ + @JsonProperty("order_id") + private String orderId; + + /** 优惠券金额 */ + @JsonProperty("discount_fee") + private Integer discountFee; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/UserCouponIdInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/UserCouponIdInfo.java new file mode 100644 index 0000000000..91348849c2 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/UserCouponIdInfo.java @@ -0,0 +1,20 @@ +package com.binarywang.wxjava.store.bean.coupon; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 用户优惠券id + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class UserCouponIdInfo extends CouponIdInfo { + + private static final long serialVersionUID = -8285585134793264542L; + /** 用户优惠券ID */ + @JsonProperty("user_coupon_id") + private String userCouponId; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/UserCouponIdParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/UserCouponIdParam.java new file mode 100644 index 0000000000..3d5e516bf8 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/UserCouponIdParam.java @@ -0,0 +1,29 @@ +package com.binarywang.wxjava.store.bean.coupon; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; + +/** + * @author Zeyes + */ +@Data +public class UserCouponIdParam implements Serializable { + + private static final long serialVersionUID = 3967276158727848348L; + /** 用户openid */ + @JsonProperty("openid") + private String openid; + + /** 用户优惠券ID */ + @JsonProperty("user_coupon_id") + private String userCouponId; + + public UserCouponIdParam() { + } + + public UserCouponIdParam(String openid, String userCouponId) { + this.openid = openid; + this.userCouponId = userCouponId; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/UserCouponListParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/UserCouponListParam.java new file mode 100644 index 0000000000..e2946b1acd --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/UserCouponListParam.java @@ -0,0 +1,24 @@ +package com.binarywang.wxjava.store.bean.coupon; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +public class UserCouponListParam extends CouponListParam { + private static final long serialVersionUID = -1056132009327357435L; + + /** + * openId + */ + @JsonProperty("openid") + private String openId; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/UserCouponListResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/UserCouponListResponse.java new file mode 100644 index 0000000000..7c66e21fd2 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/UserCouponListResponse.java @@ -0,0 +1,30 @@ +package com.binarywang.wxjava.store.bean.coupon; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class UserCouponListResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 5201633937239352879L; + /** 优惠券id列表 */ + @JsonProperty("user_coupon_list") + private List coupons; + + /** 优惠券总数 */ + @JsonProperty("total_num") + private Integer totalNum; + + /** 优惠券上下文 */ + @JsonProperty("page_ctx") + private String pageCtx; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/UserCouponResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/UserCouponResponse.java new file mode 100644 index 0000000000..925b6d421f --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/UserCouponResponse.java @@ -0,0 +1,27 @@ +package com.binarywang.wxjava.store.bean.coupon; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class UserCouponResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 1434098386857953234L; + @JsonProperty("user_coupon") + private UserCoupon coupon; + + @JsonProperty("openid") + private String openid; + + @JsonProperty("unionid") + private String unionid; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/UserExtInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/UserExtInfo.java new file mode 100644 index 0000000000..08344f781e --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/UserExtInfo.java @@ -0,0 +1,21 @@ +package com.binarywang.wxjava.store.bean.coupon; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 用户优惠券附加信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class UserExtInfo implements Serializable { + + private static final long serialVersionUID = 8304922825230343409L; + /** 优惠券核销时间 */ + @JsonProperty("use_time") + private Long useTime; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/ValidInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/ValidInfo.java new file mode 100644 index 0000000000..f6dab1ef8f --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/coupon/ValidInfo.java @@ -0,0 +1,33 @@ +package com.binarywang.wxjava.store.bean.coupon; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 优惠券有效信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class ValidInfo implements Serializable { + + private static final long serialVersionUID = -4550516248380285635L; + /** 优惠券有效期类型 {@link com.binarywang.wxjava.store.enums.CouponValidType} */ + @JsonProperty("valid_type") + private Integer validType; + + /** 优惠券有效天数,valid_type=2时才有意义 */ + @JsonProperty("valid_day_num") + private Integer validDayNum; + + /** 优惠券有效期开始时间,valid_type=1时才有意义 */ + @JsonProperty("start_time") + private Long startTime; + + /** 优惠券有效期结束时间,valid_type=1时才有意义 */ + @JsonProperty("end_time") + private Long endTime; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/delivery/DeliveryCompanyInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/delivery/DeliveryCompanyInfo.java new file mode 100644 index 0000000000..ebd0aca1ff --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/delivery/DeliveryCompanyInfo.java @@ -0,0 +1,25 @@ +package com.binarywang.wxjava.store.bean.delivery; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 快递公司信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class DeliveryCompanyInfo implements Serializable { + + private static final long serialVersionUID = 4225666604513570564L; + /** 快递公司id */ + @JsonProperty("delivery_id") + private String id; + + /** 快递公司名称 */ + @JsonProperty("delivery_name") + private String name; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/delivery/DeliveryCompanyResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/delivery/DeliveryCompanyResponse.java new file mode 100644 index 0000000000..b77987baf9 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/delivery/DeliveryCompanyResponse.java @@ -0,0 +1,22 @@ +package com.binarywang.wxjava.store.bean.delivery; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 快递公司列表响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class DeliveryCompanyResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = -7695903997951385166L; + /** 快递公司 */ + @JsonProperty("company_list") + private List companyList; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/delivery/DeliveryInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/delivery/DeliveryInfo.java new file mode 100644 index 0000000000..7eaf104c0a --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/delivery/DeliveryInfo.java @@ -0,0 +1,34 @@ +package com.binarywang.wxjava.store.bean.delivery; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 物流信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class DeliveryInfo implements Serializable { + + private static final long serialVersionUID = -6205626967305385248L; + /** 快递单号 */ + @JsonProperty("waybill_id") + private String waybillId; + + /** 快递公司id,通过【获取快递公司列表】接口获得,非主流快递公司可以填OTHER */ + @JsonProperty("delivery_id") + private String deliveryId; + + /** 发货方式,1:自寄快递发货,3:虚拟商品无需物流发货(只有deliver_method=1的订单可以使用虚拟发货) */ + @JsonProperty("deliver_type") + private Integer deliverType; + + /** 包裹中商品信息 */ + @JsonProperty("product_infos") + private List productInfos; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/delivery/DeliverySendParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/delivery/DeliverySendParam.java new file mode 100644 index 0000000000..deb8b41231 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/delivery/DeliverySendParam.java @@ -0,0 +1,31 @@ +package com.binarywang.wxjava.store.bean.delivery; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 订单发货信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@JsonInclude(Include.NON_NULL) +public class DeliverySendParam implements Serializable { + + private static final long serialVersionUID = 4555821308266899135L; + /** 订单ID */ + @JsonProperty("order_id") + private String orderId; + + /** 物流信息 */ + @JsonProperty("delivery_list") + private List deliveryList; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/delivery/FreightProductInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/delivery/FreightProductInfo.java new file mode 100644 index 0000000000..77cad3985f --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/delivery/FreightProductInfo.java @@ -0,0 +1,36 @@ +package com.binarywang.wxjava.store.bean.delivery; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * 包裹中商品信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class FreightProductInfo implements Serializable { + private static final long serialVersionUID = -3751269707150372172L; + + /** + * 商品id + */ + @JsonProperty("product_id") + private String productId; + + /** + * sku_id + */ + @JsonProperty("sku_id") + private String skuId; + + /** + * 商品数量 + */ + @JsonProperty("product_cnt") + private Integer productCnt; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/delivery/FreshInspectParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/delivery/FreshInspectParam.java new file mode 100644 index 0000000000..b615a26f8a --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/delivery/FreshInspectParam.java @@ -0,0 +1,31 @@ +package com.binarywang.wxjava.store.bean.delivery; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 商品打包信息 参数 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@JsonInclude(Include.NON_NULL) +public class FreshInspectParam implements Serializable { + private static final long serialVersionUID = -1635894867602084789L; + + /** 订单ID */ + @JsonProperty("order_id") + private String orderId; + + /** 商品打包信息 */ + @JsonProperty("audit_items") + private List auditItems; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/delivery/PackageAuditInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/delivery/PackageAuditInfo.java new file mode 100644 index 0000000000..3ff399648d --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/delivery/PackageAuditInfo.java @@ -0,0 +1,32 @@ +package com.binarywang.wxjava.store.bean.delivery; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.enums.PackageAuditItemType; + +/** + * 商品打包信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class PackageAuditInfo implements Serializable { + private static final long serialVersionUID = 1118087167138310282L; + + /** + * 审核项名称,枚举类型参考 {@link PackageAuditItemType} + * 使用方法:DeliveryAuditItemType.EXPRESS_PIC.getKey() + */ + @JsonProperty("item_name") + private String itemName; + + /** 图片/视频url */ + @JsonProperty("item_value") + private String itemValue; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/AbstractEwaybillRequest.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/AbstractEwaybillRequest.java new file mode 100644 index 0000000000..7a40ab2936 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/AbstractEwaybillRequest.java @@ -0,0 +1,37 @@ +package com.binarywang.wxjava.store.bean.ewaybill; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.io.Serializable; +import java.util.LinkedHashMap; +import java.util.Map; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 电子面单通用请求参数容器。 + * + *

字段按官方文档动态透传,避免非官方字段定义。

+ * + * @author GitHub Copilot + */ +@Data +@NoArgsConstructor +public abstract class AbstractEwaybillRequest implements Serializable { + + private static final long serialVersionUID = 4213577159985597237L; + + @JsonIgnore + private Map params = new LinkedHashMap<>(); + + @JsonAnySetter + public void addParam(String key, Object value) { + params.put(key, value); + } + + @JsonAnyGetter + public Map anyParams() { + return params; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/AbstractEwaybillResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/AbstractEwaybillResponse.java new file mode 100644 index 0000000000..18d125cbd9 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/AbstractEwaybillResponse.java @@ -0,0 +1,33 @@ +package com.binarywang.wxjava.store.bean.ewaybill; + +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.util.LinkedHashMap; +import java.util.Map; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 电子面单通用响应参数容器。 + * + *

未显式声明字段将保存到 extra 字段,便于兼容官方接口变更。

+ * + * @author GitHub Copilot + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public abstract class AbstractEwaybillResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = -2460196179063989718L; + + @JsonIgnore + private Map extra = new LinkedHashMap<>(); + + @JsonAnySetter + public void addExtra(String key, Object value) { + extra.put(key, value); + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/AccountInfoResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/AccountInfoResponse.java new file mode 100644 index 0000000000..24cd2ebb68 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/AccountInfoResponse.java @@ -0,0 +1,10 @@ +package com.binarywang.wxjava.store.bean.ewaybill; + +/** + * 电子面单网点/账号信息响应。 + * + * @author GitHub Copilot + */ +public class AccountInfoResponse extends AbstractEwaybillResponse { + private static final long serialVersionUID = 5682783958522805959L; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/AddSubOrderRequest.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/AddSubOrderRequest.java new file mode 100644 index 0000000000..b38dc825d0 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/AddSubOrderRequest.java @@ -0,0 +1,10 @@ +package com.binarywang.wxjava.store.bean.ewaybill; + +/** + * 电子面单子件追加请求。 + * + * @author GitHub Copilot + */ +public class AddSubOrderRequest extends AbstractEwaybillRequest { + private static final long serialVersionUID = 4250200603210217269L; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/BatchPrintOrderRequest.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/BatchPrintOrderRequest.java new file mode 100644 index 0000000000..964552d982 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/BatchPrintOrderRequest.java @@ -0,0 +1,12 @@ +package com.binarywang.wxjava.store.bean.ewaybill; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@NoArgsConstructor +public class BatchPrintOrderRequest { + @JsonProperty("req_list") private List reqList; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/CreateOrderRequest.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/CreateOrderRequest.java new file mode 100644 index 0000000000..dff09d2e15 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/CreateOrderRequest.java @@ -0,0 +1,10 @@ +package com.binarywang.wxjava.store.bean.ewaybill; + +/** + * 电子面单取号请求。 + * + * @author GitHub Copilot + */ +public class CreateOrderRequest extends AbstractEwaybillRequest { + private static final long serialVersionUID = 2521225918646916853L; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/CreateOrderResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/CreateOrderResponse.java new file mode 100644 index 0000000000..25af553a29 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/CreateOrderResponse.java @@ -0,0 +1,10 @@ +package com.binarywang.wxjava.store.bean.ewaybill; + +/** + * 电子面单取号响应。 + * + * @author GitHub Copilot + */ +public class CreateOrderResponse extends AbstractEwaybillResponse { + private static final long serialVersionUID = 9115454170108519187L; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/DeliveryListResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/DeliveryListResponse.java new file mode 100644 index 0000000000..47aa0ea27d --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/DeliveryListResponse.java @@ -0,0 +1,10 @@ +package com.binarywang.wxjava.store.bean.ewaybill; + +/** + * 开通快递公司列表响应。 + * + * @author GitHub Copilot + */ +public class DeliveryListResponse extends AbstractEwaybillResponse { + private static final long serialVersionUID = 494164885034906535L; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/EwaybillOrderIdParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/EwaybillOrderIdParam.java new file mode 100644 index 0000000000..633a25658f --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/EwaybillOrderIdParam.java @@ -0,0 +1,14 @@ +package com.binarywang.wxjava.store.bean.ewaybill; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@NoArgsConstructor +@AllArgsConstructor +public class EwaybillOrderIdParam { + @JsonProperty("ewaybill_order_id") + private String ewaybillOrderId; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/OrderDetailResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/OrderDetailResponse.java new file mode 100644 index 0000000000..4350094b09 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/OrderDetailResponse.java @@ -0,0 +1,10 @@ +package com.binarywang.wxjava.store.bean.ewaybill; + +/** + * 面单详情响应。 + * + * @author GitHub Copilot + */ +public class OrderDetailResponse extends AbstractEwaybillResponse { + private static final long serialVersionUID = -2406734055149395916L; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/PreCreateRequest.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/PreCreateRequest.java new file mode 100644 index 0000000000..b43dd5de0b --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/PreCreateRequest.java @@ -0,0 +1,10 @@ +package com.binarywang.wxjava.store.bean.ewaybill; + +/** + * 电子面单预取号请求。 + * + * @author GitHub Copilot + */ +public class PreCreateRequest extends AbstractEwaybillRequest { + private static final long serialVersionUID = 3761501770378571724L; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/PreCreateResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/PreCreateResponse.java new file mode 100644 index 0000000000..714a0d9408 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/PreCreateResponse.java @@ -0,0 +1,10 @@ +package com.binarywang.wxjava.store.bean.ewaybill; + +/** + * 电子面单预取号响应。 + * + * @author GitHub Copilot + */ +public class PreCreateResponse extends AbstractEwaybillResponse { + private static final long serialVersionUID = -6302826807350860584L; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/PrintContentParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/PrintContentParam.java new file mode 100644 index 0000000000..3f0c587365 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/PrintContentParam.java @@ -0,0 +1,22 @@ +package com.binarywang.wxjava.store.bean.ewaybill; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** 获取电子面单打印报文请求参数。 */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class PrintContentParam implements Serializable { + private static final long serialVersionUID = 6898522842175667816L; + + @JsonProperty("ewaybill_order_id") + private String ewaybillOrderId; + + @JsonProperty("template_id") + private String templateId; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/PrintContentResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/PrintContentResponse.java new file mode 100644 index 0000000000..f29a2c5467 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/PrintContentResponse.java @@ -0,0 +1,10 @@ +package com.binarywang.wxjava.store.bean.ewaybill; + +/** + * 打印报文响应。 + * + * @author GitHub Copilot + */ +public class PrintContentResponse extends AbstractEwaybillResponse { + private static final long serialVersionUID = 1097526332493027364L; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/PrintOrderRequest.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/PrintOrderRequest.java new file mode 100644 index 0000000000..eb5281340f --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/PrintOrderRequest.java @@ -0,0 +1,13 @@ +package com.binarywang.wxjava.store.bean.ewaybill; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@NoArgsConstructor +public class PrintOrderRequest extends EwaybillOrderIdParam { + @JsonProperty("delivery_id") private String deliveryId; + @JsonProperty("waybill_id") private String waybillId; + @JsonProperty("re_print") private Boolean rePrint; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/TemplateCodeParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/TemplateCodeParam.java new file mode 100644 index 0000000000..b6ec868532 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/TemplateCodeParam.java @@ -0,0 +1,18 @@ +package com.binarywang.wxjava.store.bean.ewaybill; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** 面单标准模板编码请求参数。 */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class TemplateCodeParam implements Serializable { + private static final long serialVersionUID = 4473438799300843172L; + + @JsonProperty("template_code") + private String templateCode; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/TemplateConfigResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/TemplateConfigResponse.java new file mode 100644 index 0000000000..2c8101245a --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/TemplateConfigResponse.java @@ -0,0 +1,10 @@ +package com.binarywang.wxjava.store.bean.ewaybill; + +/** + * 面单标准模板响应。 + * + * @author GitHub Copilot + */ +public class TemplateConfigResponse extends AbstractEwaybillResponse { + private static final long serialVersionUID = 6779567498624326386L; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/TemplateCreateRequest.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/TemplateCreateRequest.java new file mode 100644 index 0000000000..e77ef91614 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/TemplateCreateRequest.java @@ -0,0 +1,10 @@ +package com.binarywang.wxjava.store.bean.ewaybill; + +/** + * 新增面单模板请求。 + * + * @author GitHub Copilot + */ +public class TemplateCreateRequest extends AbstractEwaybillRequest { + private static final long serialVersionUID = 2974771986022948202L; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/TemplateIdParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/TemplateIdParam.java new file mode 100644 index 0000000000..bf089f359d --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/TemplateIdParam.java @@ -0,0 +1,22 @@ +package com.binarywang.wxjava.store.bean.ewaybill; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 模板ID请求参数。 + * + * @author GitHub Copilot + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class TemplateIdParam implements Serializable { + private static final long serialVersionUID = -2397006631686547550L; + + @JsonProperty("template_id") + private String templateId; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/TemplateIdResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/TemplateIdResponse.java new file mode 100644 index 0000000000..d28ddecdd8 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/TemplateIdResponse.java @@ -0,0 +1,21 @@ +package com.binarywang.wxjava.store.bean.ewaybill; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * 面单模板ID响应。 + * + * @author GitHub Copilot + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class TemplateIdResponse extends AbstractEwaybillResponse { + private static final long serialVersionUID = -6756111662032438585L; + + @JsonProperty("template_id") + private String templateId; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/TemplateInfoResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/TemplateInfoResponse.java new file mode 100644 index 0000000000..4565cf0178 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/TemplateInfoResponse.java @@ -0,0 +1,10 @@ +package com.binarywang.wxjava.store.bean.ewaybill; + +/** + * 面单模板信息响应。 + * + * @author GitHub Copilot + */ +public class TemplateInfoResponse extends AbstractEwaybillResponse { + private static final long serialVersionUID = 5718279884380636289L; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/TemplateUpdateRequest.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/TemplateUpdateRequest.java new file mode 100644 index 0000000000..93433ed731 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/TemplateUpdateRequest.java @@ -0,0 +1,10 @@ +package com.binarywang.wxjava.store.bean.ewaybill; + +/** + * 更新面单模板请求。 + * + * @author GitHub Copilot + */ +public class TemplateUpdateRequest extends AbstractEwaybillRequest { + private static final long serialVersionUID = -6201137374059216895L; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/WaybillIdParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/WaybillIdParam.java new file mode 100644 index 0000000000..e7248771b8 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/WaybillIdParam.java @@ -0,0 +1,22 @@ +package com.binarywang.wxjava.store.bean.ewaybill; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 运单ID请求参数。 + * + * @author GitHub Copilot + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class WaybillIdParam implements Serializable { + private static final long serialVersionUID = -7601452772833268240L; + + @JsonProperty("waybill_id") + private String waybillId; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/WaybillIdsParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/WaybillIdsParam.java new file mode 100644 index 0000000000..9b631cd796 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/ewaybill/WaybillIdsParam.java @@ -0,0 +1,23 @@ +package com.binarywang.wxjava.store.bean.ewaybill; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 批量运单ID请求参数。 + * + * @author GitHub Copilot + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class WaybillIdsParam implements Serializable { + private static final long serialVersionUID = -9030594599179993010L; + + @JsonProperty("waybill_ids") + private List waybillIds; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/favorite/FavoriteCountResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/favorite/FavoriteCountResponse.java new file mode 100644 index 0000000000..3ebdffc963 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/favorite/FavoriteCountResponse.java @@ -0,0 +1,38 @@ +package com.binarywang.wxjava.store.bean.favorite; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 店铺收藏人数 响应 + * + * @author GitHub Copilot + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class FavoriteCountResponse extends WxStoreBaseResponse { + + /** 店铺首页收藏用户数 */ + @JsonProperty("favor_uv_acc_shop_homepage") + private Long favorUvAccShopHomepage; + + /** 订单详情页收藏用户数 */ + @JsonProperty("favor_uv_acc_order_detail") + private Long favorUvAccOrderDetail; + + /** 商品详情页收藏用户数 */ + @JsonProperty("favor_uv_acc_product_detail") + private Long favorUvAccProductDetail; + + /** 其他场景收藏用户数 */ + @JsonProperty("favor_uv_acc_other_scene") + private Long favorUvAccOtherScene; + + /** 所有收藏用户数 */ + @JsonProperty("favor_uv_acc_all") + private Long favorUvAccAll; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/freight/AddressInfoList.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/freight/AddressInfoList.java new file mode 100644 index 0000000000..adbb6d2ad1 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/freight/AddressInfoList.java @@ -0,0 +1,23 @@ +package com.binarywang.wxjava.store.bean.freight; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.AddressInfo; + +/** + * 地址列表 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class AddressInfoList implements Serializable { + + private static final long serialVersionUID = 5923805297331862706L; + /** 地址列表 */ + @JsonProperty("address_infos") + private List addressInfos; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/freight/AllConditionFreeDetail.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/freight/AllConditionFreeDetail.java new file mode 100644 index 0000000000..f8d269c994 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/freight/AllConditionFreeDetail.java @@ -0,0 +1,32 @@ +package com.binarywang.wxjava.store.bean.freight; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 计费规则列表 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class AllConditionFreeDetail implements Serializable { + + private static final long serialVersionUID = -1649520737632417036L; + /** 计费规则列表 */ + @JsonProperty("condition_free_detail_list") + private List list; + + @JsonIgnore + public void addDetail(ConditionFreeDetail detail) { + if (list == null) { + list = new ArrayList<>(16); + } + list.add(detail); + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/freight/AllFreightCalcMethod.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/freight/AllFreightCalcMethod.java new file mode 100644 index 0000000000..04cc095614 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/freight/AllFreightCalcMethod.java @@ -0,0 +1,31 @@ +package com.binarywang.wxjava.store.bean.freight; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import lombok.Data; + +/** + * 具体计费方法,默认运费,指定地区运费等 + * + * @author Zeyes + */ +@Data +public class AllFreightCalcMethod implements Serializable { + + private static final long serialVersionUID = 6330919525271991949L; + /** 计算方法列表 */ + @JsonProperty("freight_calc_method_list") + private List list; + + public AllFreightCalcMethod() { + } + + public void addDetail(FreightCalcMethod detail) { + if (list == null) { + list = new ArrayList<>(16); + } + list.add(detail); + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/freight/ConditionFreeDetail.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/freight/ConditionFreeDetail.java new file mode 100644 index 0000000000..30bed0e768 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/freight/ConditionFreeDetail.java @@ -0,0 +1,38 @@ +package com.binarywang.wxjava.store.bean.freight; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * 计费规则 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class ConditionFreeDetail extends AddressInfoList { + + private static final long serialVersionUID = 9204578767029379142L; + /** 最低件数 */ + @JsonProperty("min_piece") + private Integer minPiece; + + /** 最低重量,单位千克,订单商品总质量小于一千克,算作一千克 */ + @JsonProperty("min_weight") + private Double minWeight; + + /** 最低金额,单位(分) */ + @JsonProperty("min_amount") + private Integer minAmount; + + /** 计费方式对应的选项是否已设置 */ + @JsonProperty("valuation_flag") + private Integer valuationFlag; + + /** 金额是否设置 */ + @JsonProperty("amount_flag") + private Integer amountFlag; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/freight/FreightCalcMethod.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/freight/FreightCalcMethod.java new file mode 100644 index 0000000000..934cbfd9c6 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/freight/FreightCalcMethod.java @@ -0,0 +1,43 @@ +package com.binarywang.wxjava.store.bean.freight; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * 运费计算方法 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class FreightCalcMethod extends AddressInfoList { + + private static final long serialVersionUID = -8857987538121721376L; + /** 是否默认运费 */ + @JsonProperty("is_default") + private Boolean isDefault; + + /** 快递公司 */ + @JsonProperty("delivery_id") + private String deliveryId; + + /** 首段运费需要满足的数量 */ + @JsonProperty("first_val_amount") + private Integer firstValAmount; + + /** 首段运费的金额 */ + @JsonProperty("first_price") + private Integer firstPrice; + + /** 续费的数量 */ + @JsonProperty("second_val_amount") + private Integer secondValAmount; + + /** 续费的金额 */ + @JsonProperty("second_price") + private Integer secondPrice; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/freight/FreightTemplate.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/freight/FreightTemplate.java new file mode 100644 index 0000000000..c33aad36fa --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/freight/FreightTemplate.java @@ -0,0 +1,71 @@ +package com.binarywang.wxjava.store.bean.freight; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.AddressInfo; + +/** + * 运费模板 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class FreightTemplate implements Serializable { + + private static final long serialVersionUID = -7876281924385999053L; + /** 模板id */ + @JsonProperty("template_id") + private String templateId; + + /** 模板名称 */ + @JsonProperty("name") + private String name; + + /** 计费类型,PIECE:按件数,WEIGHT:按重量 */ + @JsonProperty("valuation_type") + private String valuationType; + + /** 发货时间期限 {@link com.binarywang.wxjava.store.enums.SendTime} */ + @JsonProperty("send_time") + private String sendTime; + + /** 发货地址 */ + @JsonProperty("address_info") + private AddressInfo addressInfo; + + /** 运输方式,EXPRESS:快递 */ + @JsonProperty("delivery_type") + private String deliveryType; + + /** 计费方式:FREE包邮 CONDITION_FREE条件包邮 NO_FREE不包邮 */ + @JsonProperty("shipping_method") + private String shippingMethod; + + /** 条件包邮详情 */ + @JsonProperty("all_condition_free_detail") + private AllConditionFreeDetail allConditionFreeDetail; + + /** 具体计费方法,默认运费,指定地区运费等 */ + @JsonProperty("all_freight_calc_method") + private AllFreightCalcMethod allFreightCalcMethod; + + /** 创建时间戳 */ + @JsonProperty("create_time") + private Long createTime; + + /** 更新时间戳 */ + @JsonProperty("update_time") + private Long updateTime; + + /** 是否默认模板 */ + @JsonProperty("is_default") + private Boolean isDefault; + + /** 不发货区域 */ + @JsonProperty("not_send_area") + private NotSendArea notSendArea; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/freight/NotSendArea.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/freight/NotSendArea.java new file mode 100644 index 0000000000..c89dd7b7fd --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/freight/NotSendArea.java @@ -0,0 +1,18 @@ +package com.binarywang.wxjava.store.bean.freight; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * 不发货区域 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class NotSendArea extends AddressInfoList { + + private static final long serialVersionUID = -1836467830293286560L; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/freight/TemplateAddParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/freight/TemplateAddParam.java new file mode 100644 index 0000000000..7d93e2b5b9 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/freight/TemplateAddParam.java @@ -0,0 +1,26 @@ +package com.binarywang.wxjava.store.bean.freight; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 运费模板 请求参数 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@JsonInclude(Include.NON_NULL) +public class TemplateAddParam implements Serializable { + + private static final long serialVersionUID = 2602919369418149309L; + /** 起始位置 */ + @JsonProperty("freight_template") + private FreightTemplate template; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/freight/TemplateIdResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/freight/TemplateIdResponse.java new file mode 100644 index 0000000000..ef0e498af2 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/freight/TemplateIdResponse.java @@ -0,0 +1,24 @@ +package com.binarywang.wxjava.store.bean.freight; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 运费模板 列表 响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class TemplateIdResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 5179651364165620640L; + /** 运费模板id */ + @JsonProperty("template_id") + private String templateId; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/freight/TemplateInfoResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/freight/TemplateInfoResponse.java new file mode 100644 index 0000000000..4883e56e7d --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/freight/TemplateInfoResponse.java @@ -0,0 +1,24 @@ +package com.binarywang.wxjava.store.bean.freight; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 运费模板 响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class TemplateInfoResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = -8381510839783330617L; + /** 运费模板id */ + @JsonProperty("freight_template") + private FreightTemplate template; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/freight/TemplateListParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/freight/TemplateListParam.java new file mode 100644 index 0000000000..410c644f6a --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/freight/TemplateListParam.java @@ -0,0 +1,27 @@ +package com.binarywang.wxjava.store.bean.freight; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import lombok.Data; +import lombok.EqualsAndHashCode; +import com.binarywang.wxjava.store.bean.base.OffsetParam; + +/** + * 运费模板 列表 请求参数 + * + * @author Zeyes + */ +@Data +@JsonInclude(Include.NON_NULL) +@EqualsAndHashCode(callSuper = true) +public class TemplateListParam extends OffsetParam { + + private static final long serialVersionUID = -6716154891499581562L; + + public TemplateListParam() { + } + + public TemplateListParam(Integer offset, Integer limit) { + super(offset, limit); + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/freight/TemplateListResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/freight/TemplateListResponse.java new file mode 100644 index 0000000000..caf50b5400 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/freight/TemplateListResponse.java @@ -0,0 +1,24 @@ +package com.binarywang.wxjava.store.bean.freight; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 运费模板 列表 响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class TemplateListResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 5375602442595264719L; + /** 运费模板 id 列表 */ + @JsonProperty("template_id_list") + private List ids; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/AccountInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/AccountInfo.java new file mode 100644 index 0000000000..684b2656ab --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/AccountInfo.java @@ -0,0 +1,53 @@ +package com.binarywang.wxjava.store.bean.fund; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 账户信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@JsonInclude(JsonInclude.Include.NON_NULL) +public class AccountInfo implements Serializable { + + private static final long serialVersionUID = -2107134853480093451L; + /** 账户类型 {@link com.binarywang.wxjava.store.enums.AccountType} */ + @JsonProperty("bank_account_type") + private String bankAccountType; + + /** 开户银行 */ + @JsonProperty("account_bank") + private String accountBank; + + /** 开户银行省市编码 */ + @JsonProperty("bank_address_code") + private String bankAddressCode; + + /** 开户银行联行号 */ + @JsonProperty("bank_branch_id") + private String bankBranchId; + + /** 开户银行全称 */ + @JsonProperty("bank_name") + private String bankName; + + /** 银行账号 */ + @JsonProperty("account_number") + private String accountNumber; + + /** 开户银行名称前端展示值 */ + @JsonProperty("account_bank4show") + private String accountBank4show; + + /** 账户名称 */ + @JsonProperty("account_name") + private String accountName; + + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/AccountInfoParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/AccountInfoParam.java new file mode 100644 index 0000000000..533d5268e0 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/AccountInfoParam.java @@ -0,0 +1,25 @@ +package com.binarywang.wxjava.store.bean.fund; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 账户信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@JsonInclude(JsonInclude.Include.NON_NULL) +public class AccountInfoParam implements Serializable { + + private static final long serialVersionUID = 1689204583402779134L; + @JsonProperty("account_info") + private AccountInfo accountInfo; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/AccountInfoResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/AccountInfoResponse.java new file mode 100644 index 0000000000..e3073b2f17 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/AccountInfoResponse.java @@ -0,0 +1,23 @@ +package com.binarywang.wxjava.store.bean.fund; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 账户信息响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class AccountInfoResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = -8316068503468969533L; + /** 账户信息 */ + @JsonProperty("account_info") + private AccountInfo accountInfo; + + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/BalanceInfoResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/BalanceInfoResponse.java new file mode 100644 index 0000000000..a00d01b876 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/BalanceInfoResponse.java @@ -0,0 +1,30 @@ +package com.binarywang.wxjava.store.bean.fund; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 账户余额信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class BalanceInfoResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 4480496860612566921L; + /** 可提现余额 */ + @JsonProperty("available_amount") + private Integer availableAmount; + + /** 待结算余额 */ + @JsonProperty("pending_amount") + private Integer pendingAmount; + + /** 二级商户号 */ + @JsonProperty("sub_mchid") + private String subMchid; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/FlowListResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/FlowListResponse.java new file mode 100644 index 0000000000..e84a272252 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/FlowListResponse.java @@ -0,0 +1,30 @@ +package com.binarywang.wxjava.store.bean.fund; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 流水列表响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class FlowListResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 8017827444308973489L; + /** 流水单号列表 */ + @JsonProperty("flow_ids") + private List flowIds; + + /** 是否还有下一页 */ + @JsonProperty("has_more") + private boolean hasMore; + + /** 分页参数,深翻页时使用 */ + @JsonProperty("next_key") + private String nextKey; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/FlowRelatedInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/FlowRelatedInfo.java new file mode 100644 index 0000000000..c0e55692f2 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/FlowRelatedInfo.java @@ -0,0 +1,45 @@ +package com.binarywang.wxjava.store.bean.fund; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 流水关联信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class FlowRelatedInfo implements Serializable { + + private static final long serialVersionUID = 3757839018198212504L; + /** 关联类型, 1 订单, 2售后,3 提现,4 运费险 */ + @JsonProperty("related_type") + private Integer relatedType; + + /** 关联订单号 */ + @JsonProperty("order_id") + private String orderId; + + /** 关联售后单号 */ + @JsonProperty("aftersale_id") + private String afterSaleId; + + /** 关联提现单号 */ + @JsonProperty("withdraw_id") + private String withdrawId; + + /** 记账时间 */ + @JsonProperty("bookkeeping_time") + private String bookkeepingTime; + + /** 关联运费险单号 */ + @JsonProperty("insurance_id") + private String insuranceId; + + /** 关联支付单号 */ + @JsonProperty("transaction_id") + private String transactionId; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/FundsFlow.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/FundsFlow.java new file mode 100644 index 0000000000..0701f3e046 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/FundsFlow.java @@ -0,0 +1,51 @@ +package com.binarywang.wxjava.store.bean.fund; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 资金流水 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class FundsFlow implements Serializable { + + private static final long serialVersionUID = -2785498655066305510L; + /** 流水id */ + @JsonProperty("flow_id") + private String flowId; + + /** 资金类型,见 {@link com.binarywang.wxjava.store.enums.FundsType} */ + @JsonProperty("funds_type") + private Integer fundsType; + + /** 流水类型, 1 收入,2 支出 */ + @JsonProperty("flow_type") + private Integer flowType; + + /** 流水金额 */ + @JsonProperty("amount") + private Integer amount; + + /** 余额 */ + @JsonProperty("balance") + private Integer balance; + + /** 流水关联信息 */ + @JsonProperty("related_info_list") + private List relatedInfos; + + /** 记账时间 */ + @JsonProperty("bookkeeping_time") + private String bookkeepingTime; + + /** 备注 */ + @JsonProperty("remark") + private String remark; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/FundsFlowResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/FundsFlowResponse.java new file mode 100644 index 0000000000..f279c704fc --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/FundsFlowResponse.java @@ -0,0 +1,23 @@ +package com.binarywang.wxjava.store.bean.fund; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 资金流水响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class FundsFlowResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = -1130785908352355914L; + /** 流水信息 */ + @JsonProperty("funds_flow") + private FundsFlow fundsFlow; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/FundsListParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/FundsListParam.java new file mode 100644 index 0000000000..5de8bcfbe4 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/FundsListParam.java @@ -0,0 +1,49 @@ +package com.binarywang.wxjava.store.bean.fund; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 资金流水参数 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class FundsListParam implements Serializable { + + private static final long serialVersionUID = 2998955690332382229L; + /** 页码,从1开始 */ + @JsonProperty("page") + private Integer page; + + /** 页数,不填默认为10 */ + @JsonProperty("page_size") + protected Integer pageSize; + + /** 流水产生的开始时间,uinx时间戳 */ + @JsonProperty("start_time") + private Long startTime; + + /** 流水产生的结束时间,unix时间戳 */ + @JsonProperty("end_time") + private Long endTime; + + /** 流水类型, 1 收入,2 支出 */ + @JsonProperty("flow_type") + private Integer flowType; + + /** 关联支付单号 */ + @JsonProperty("transaction_id") + private String transactionId; + + /** + * 分页参数,翻页时写入上一页返回的next_key(page为上一页加一, 并且page_size与上一页相同的时候才生效),page * page_size >= 10000时必填 + */ + @JsonProperty("next_key") + private String nextKey; + + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/WithdrawDetailResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/WithdrawDetailResponse.java new file mode 100644 index 0000000000..5294bd7e2c --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/WithdrawDetailResponse.java @@ -0,0 +1,55 @@ +package com.binarywang.wxjava.store.bean.fund; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 提现详情响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class WithdrawDetailResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 1473346677401168323L; + /** 金额 */ + @JsonProperty("amount") + private Integer amount; + + /** 创建时间 */ + @JsonProperty("create_time") + private Long createTime; + + /** 更新时间 */ + @JsonProperty("update_time") + private Long updateTime; + + /** 失败原因 */ + @JsonProperty("reason") + private String reason; + + /** 备注 */ + @JsonProperty("remark") + private String remark; + + /** 银行附言 */ + @JsonProperty("bank_memo") + private String bankMemo; + + /** 银行名称 */ + @JsonProperty("bank_name") + private String bankName; + + /** 银行账户 */ + @JsonProperty("bank_num") + private String bankNum; + + /** 提现状态 {@link com.binarywang.wxjava.store.enums.WithdrawStatus} */ + @JsonProperty("status") + private String status; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/WithdrawListParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/WithdrawListParam.java new file mode 100644 index 0000000000..daae0ec846 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/WithdrawListParam.java @@ -0,0 +1,36 @@ +package com.binarywang.wxjava.store.bean.fund; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 提现列表参数 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class WithdrawListParam implements Serializable { + + private static final long serialVersionUID = -672422656564313999L; + /** 页码,从1开始 */ + @JsonProperty("page_num") + private Integer pageNum; + + /** 页数 */ + @JsonProperty("page_size") + private Integer pageSize; + + /** 开始时间 */ + @JsonProperty("start_time") + private Long startTime; + + /** 结束时间 */ + @JsonProperty("end_time") + private Long endTime; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/WithdrawListResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/WithdrawListResponse.java new file mode 100644 index 0000000000..2d0693e037 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/WithdrawListResponse.java @@ -0,0 +1,23 @@ +package com.binarywang.wxjava.store.bean.fund; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 提现列表响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class WithdrawListResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = -7950467108750325235L; + /** 提现单号列表 */ + @JsonProperty("withdraw_ids") + private List withdrawIds; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/WithdrawSubmitParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/WithdrawSubmitParam.java new file mode 100644 index 0000000000..4fb55add9c --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/WithdrawSubmitParam.java @@ -0,0 +1,32 @@ +package com.binarywang.wxjava.store.bean.fund; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 提现提交参数 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class WithdrawSubmitParam implements Serializable { + + private static final long serialVersionUID = 5801338663530567830L; + /** 提现金额(单位:分) */ + @JsonProperty("amount") + private Integer amount; + + /** 提现备注 */ + @JsonProperty("remark") + private String remark; + + /** 银行附言 */ + @JsonProperty("bank_memo") + private String bankMemo; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/WithdrawSubmitResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/WithdrawSubmitResponse.java new file mode 100644 index 0000000000..a6930e8b50 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/WithdrawSubmitResponse.java @@ -0,0 +1,23 @@ +package com.binarywang.wxjava.store.bean.fund; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 提现提交响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class WithdrawSubmitResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = -8269579250564427758L; + /** 二维码ticket,可用于获取二维码和查询二维码状态 */ + @JsonProperty("qrcode_ticket") + private String qrcodeTicket; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/bank/BankCityInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/bank/BankCityInfo.java new file mode 100644 index 0000000000..32e5c8da19 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/bank/BankCityInfo.java @@ -0,0 +1,29 @@ +package com.binarywang.wxjava.store.bean.fund.bank; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 银行城市信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class BankCityInfo implements Serializable { + + private static final long serialVersionUID = 374087891799491196L; + /** 城市名称 */ + @JsonProperty("city_name") + private String cityName; + + /** 城市编号 */ + @JsonProperty("city_code") + private Integer cityCode; + + /** 开户银行省市编码 */ + @JsonProperty("bank_address_code") + private String bankAddressCode; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/bank/BankCityResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/bank/BankCityResponse.java new file mode 100644 index 0000000000..6f5f5639d5 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/bank/BankCityResponse.java @@ -0,0 +1,28 @@ +package com.binarywang.wxjava.store.bean.fund.bank; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 银行城市信息响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class BankCityResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = -6212360101083304631L; + /** 银行城市信息列表 */ + @JsonProperty("data") + private List data; + + /** 总数 */ + @JsonProperty("total_count") + private Integer totalCount; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/bank/BankInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/bank/BankInfo.java new file mode 100644 index 0000000000..3bc25ca2ea --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/bank/BankInfo.java @@ -0,0 +1,46 @@ +package com.binarywang.wxjava.store.bean.fund.bank; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 银行信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class BankInfo implements Serializable { + + private static final long serialVersionUID = -4837989875996346711L; + /** 开户银行 */ + @JsonProperty("account_bank") + private String accountBank; + + /** 银行编码 */ + @JsonProperty("bank_code") + private String bankCode; + + /** 银行联号 */ + @JsonProperty("bank_id") + private String bankId; + + /** 银行名称(不包括支行) */ + @JsonProperty("bank_name") + private String bankName; + + /** 银行类型(1.对公,2.对私) */ + @JsonProperty("bank_type") + private Integer bankType; + + /** 是否需要填写支行信息 */ + @JsonProperty("need_branch") + private Boolean needBranch; + + /** 支行联号 */ + @JsonProperty("branch_id") + private String branchId; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/bank/BankInfoResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/bank/BankInfoResponse.java new file mode 100644 index 0000000000..62959b84a6 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/bank/BankInfoResponse.java @@ -0,0 +1,28 @@ +package com.binarywang.wxjava.store.bean.fund.bank; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 银行信息响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class BankInfoResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 8583893898929290526L; + /** 银行信息列表 */ + @JsonProperty("data") + private List data; + + /** 总数 */ + @JsonProperty("total_count") + private Integer totalCount; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/bank/BankListResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/bank/BankListResponse.java new file mode 100644 index 0000000000..b8f4901a41 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/bank/BankListResponse.java @@ -0,0 +1,24 @@ +package com.binarywang.wxjava.store.bean.fund.bank; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 银行信息响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class BankListResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 7912035853286944260L; + /** 银行信息列表 */ + @JsonProperty("data") + private List data; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/bank/BankProvinceInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/bank/BankProvinceInfo.java new file mode 100644 index 0000000000..20e2ee1375 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/bank/BankProvinceInfo.java @@ -0,0 +1,25 @@ +package com.binarywang.wxjava.store.bean.fund.bank; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 银行省份信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class BankProvinceInfo implements Serializable { + + private static final long serialVersionUID = -3409931656361300144L; + /** 省份名称 */ + @JsonProperty("province_name") + private String provinceName; + + /** 省份编码 */ + @JsonProperty("province_code") + private Integer provinceCode; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/bank/BankProvinceResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/bank/BankProvinceResponse.java new file mode 100644 index 0000000000..ea411ff00a --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/bank/BankProvinceResponse.java @@ -0,0 +1,26 @@ +package com.binarywang.wxjava.store.bean.fund.bank; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 银行省份信息响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class BankProvinceResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = -6187805847136359892L; + /** 银行省份信息列表 */ + @JsonProperty("data") + private List data; + + /** 总数 */ + @JsonProperty("total_count") + private Integer totalCount; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/bank/BankSearchParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/bank/BankSearchParam.java new file mode 100644 index 0000000000..ce4321e844 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/bank/BankSearchParam.java @@ -0,0 +1,37 @@ +package com.binarywang.wxjava.store.bean.fund.bank; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 银行查询参数 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@JsonInclude(JsonInclude.Include.NON_NULL) +public class BankSearchParam implements Serializable { + + private static final long serialVersionUID = 6070269209439188188L; + /** 偏移量 */ + @JsonProperty("offset") + private Integer offset; + + /** 每页数据大小 */ + @JsonProperty("limit") + private Integer limit; + + /** 银行关键字 */ + @JsonProperty("key_words") + private String keyWords; + + /** 银行类型(1:对私银行,2:对公银行; 默认对公) */ + @JsonProperty("bank_type") + private Integer bankType; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/bank/BranchInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/bank/BranchInfo.java new file mode 100644 index 0000000000..e4711e2ee1 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/bank/BranchInfo.java @@ -0,0 +1,25 @@ +package com.binarywang.wxjava.store.bean.fund.bank; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 分店信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class BranchInfo implements Serializable { + + private static final long serialVersionUID = -2744729367131146892L; + /** 支行联号 */ + @JsonProperty("branch_id") + private Integer branchId; + + /** 银行全称(含支行) */ + @JsonProperty("branch_name") + private String branchName; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/bank/BranchInfoResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/bank/BranchInfoResponse.java new file mode 100644 index 0000000000..faf914c451 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/bank/BranchInfoResponse.java @@ -0,0 +1,49 @@ +package com.binarywang.wxjava.store.bean.fund.bank; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 支行信息响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class BranchInfoResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = -1419832502854175767L; + /** 总数 */ + @JsonProperty("total_count") + private Integer totalCount; + + /** 当前分页数量 */ + @JsonProperty("count") + private Integer count; + + /** 银行名称 */ + @JsonProperty("account_bank") + private String accountBank; + + /** 银行编码 */ + @JsonProperty("account_bank_code") + private String accountBankCode; + + /** 银行别名 */ + @JsonProperty("bank_alias") + private String bankAlias; + + /** 银行别名编码 */ + @JsonProperty("bank_alias_code") + private String bankAliasCode; + + /** 支行信息列表 */ + @JsonProperty("data") + private List data; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/bank/BranchSearchParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/bank/BranchSearchParam.java new file mode 100644 index 0000000000..a2e8ee4785 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/bank/BranchSearchParam.java @@ -0,0 +1,35 @@ +package com.binarywang.wxjava.store.bean.fund.bank; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 银行支行信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class BranchSearchParam implements Serializable { + + private static final long serialVersionUID = -8800316690160248833L; + /** 银行编码,通过查询银行信息或者搜索银行信息获取 */ + @JsonProperty("bank_code") + private String bankCode; + + /** 城市编号,通过查询城市列表获取 */ + @JsonProperty("city_code") + private String cityCode; + + /** 偏移量 */ + @JsonProperty("offset") + private Integer offset; + + /** 限制个数 */ + @JsonProperty("limit") + private Integer limit; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/qrcode/QrCheckResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/qrcode/QrCheckResponse.java new file mode 100644 index 0000000000..3b0f7cb2cb --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/qrcode/QrCheckResponse.java @@ -0,0 +1,36 @@ +package com.binarywang.wxjava.store.bean.fund.qrcode; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 二维码校验响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class QrCheckResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = -3860756719827268969L; + /** 扫码状态 {@link com.binarywang.wxjava.store.enums.QrCheckStatus} */ + @JsonProperty("status") + private Integer status; + + /** 业务返回错误码 */ + @JsonProperty("self_check_err_code") + private Integer selfCheckErrCode; + + /** 业务返回错误信息 */ + @JsonProperty("self_check_err_msg") + private String selfCheckErrMsg; + + /** 扫码者身份 0非管理员 1管理员 2次管理员 */ + @JsonProperty("scan_user_type") + private Integer scanUserType; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/qrcode/QrCodeResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/qrcode/QrCodeResponse.java new file mode 100644 index 0000000000..e5d4603921 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/fund/qrcode/QrCodeResponse.java @@ -0,0 +1,24 @@ +package com.binarywang.wxjava.store.bean.fund.qrcode; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 二维码响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class QrCodeResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 4521008628337929496L; + /** 二维码(base64编码二进制,需要base64解码) */ + @JsonProperty("qrcode_buf") + private String qrcodeBuf; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/background/BackgroundApplyResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/background/BackgroundApplyResponse.java new file mode 100644 index 0000000000..9b07bf41f5 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/background/BackgroundApplyResponse.java @@ -0,0 +1,25 @@ +package com.binarywang.wxjava.store.bean.home.background; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 提交背景图申请 结果 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class BackgroundApplyResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = -5627456997199822109L; + + /** 申请编号 */ + @JsonProperty("apply_id") + private Integer applyId; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/background/BackgroundApplyResult.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/background/BackgroundApplyResult.java new file mode 100644 index 0000000000..1492c47d3f --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/background/BackgroundApplyResult.java @@ -0,0 +1,35 @@ +package com.binarywang.wxjava.store.bean.home.background; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 背景图审核信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class BackgroundApplyResult implements Serializable { + + private static final long serialVersionUID = 3154900058221168732L; + + /** 申请编号 */ + @JsonProperty("apply_id") + private Integer applyId; + + /** 申请状态。1审核中 2审核驳回 */ + @JsonProperty("state") + private Integer state; + + /** 审核结果描述。state为审核驳回时有值。 */ + @JsonProperty("audit_desc") + private String auditDesc; + + /** 图片url */ + @JsonProperty("img_url") + private String imgUrl; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/background/BackgroundGetResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/background/BackgroundGetResponse.java new file mode 100644 index 0000000000..a363adea6a --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/background/BackgroundGetResponse.java @@ -0,0 +1,28 @@ +package com.binarywang.wxjava.store.bean.home.background; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 背景图返回结果 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class BackgroundGetResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = -9158761351220981959L; + + /** 当前生效的背景图片url */ + @JsonProperty("img_url") + private String imgUrl; + + /** 背景图审核信息 */ + @JsonProperty("apply") + private BackgroundApplyResult apply; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/banner/BannerApplyDetail.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/banner/BannerApplyDetail.java new file mode 100644 index 0000000000..179128e832 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/banner/BannerApplyDetail.java @@ -0,0 +1,33 @@ +package com.binarywang.wxjava.store.bean.home.banner; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 精选展示位申请详情 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@JsonInclude(Include.NON_NULL) +public class BannerApplyDetail implements Serializable { + + private static final long serialVersionUID = -4622897527243343862L; + + /** 审核状态。 1-审核中;2-审核驳回 */ + @JsonProperty("audit_state") + private Integer auditState; + + /** 审核结果描述。audit_state为驳回时有值。 */ + @JsonProperty("audit_desc") + private String auditDesc; + + /** 精选展示位申请明细 */ + @JsonProperty("banner") + private BannerItem banner; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/banner/BannerApplyInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/banner/BannerApplyInfo.java new file mode 100644 index 0000000000..a38c357adb --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/banner/BannerApplyInfo.java @@ -0,0 +1,35 @@ +package com.binarywang.wxjava.store.bean.home.banner; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 精选展示位申请信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class BannerApplyInfo implements Serializable { + + private static final long serialVersionUID = 72190625450999960L; + + /** 申请编号 */ + @JsonProperty("apply_id") + private Integer applyId; + + /** 申请状态 1-审核中;2-审核驳回 */ + @JsonProperty("state") + private Integer state; + + /** 展示位的展示样式 1-小图模式;2-大图模式 */ + @JsonProperty("scale") + private Integer scale; + + /** 精选展示位申请明细 */ + @JsonProperty("banner") + private List banner; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/banner/BannerApplyParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/banner/BannerApplyParam.java new file mode 100644 index 0000000000..d5d47a11f4 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/banner/BannerApplyParam.java @@ -0,0 +1,28 @@ +package com.binarywang.wxjava.store.bean.home.banner; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 精选展示位申请参数 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@JsonInclude(Include.NON_NULL) +public class BannerApplyParam implements Serializable { + + private static final long serialVersionUID = 9083668032979490150L; + + /** banner */ + @JsonProperty("banner") + private BannerInfo banner; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/banner/BannerApplyResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/banner/BannerApplyResponse.java new file mode 100644 index 0000000000..7458a1b4f1 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/banner/BannerApplyResponse.java @@ -0,0 +1,25 @@ +package com.binarywang.wxjava.store.bean.home.banner; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 提交精选展位申请 结果 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class BannerApplyResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = -2194587734444499201L; + + /** 申请编号 */ + @JsonProperty("apply_id") + private Integer applyId; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/banner/BannerGetResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/banner/BannerGetResponse.java new file mode 100644 index 0000000000..4576f9446a --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/banner/BannerGetResponse.java @@ -0,0 +1,28 @@ +package com.binarywang.wxjava.store.bean.home.banner; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 精选展位返回结果 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class BannerGetResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = -1563254921362215934L; + + /** 当前生效的展示位 */ + @JsonProperty("banner") + private BannerInfo banner; + + /** 最近一次流程中的申请。不返回已生效或已撤销的申请 */ + @JsonProperty("apply") + private BannerApplyInfo apply; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/banner/BannerInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/banner/BannerInfo.java new file mode 100644 index 0000000000..f22b2b6f6d --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/banner/BannerInfo.java @@ -0,0 +1,31 @@ +package com.binarywang.wxjava.store.bean.home.banner; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 精选展示位 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@JsonInclude(Include.NON_NULL) +public class BannerInfo implements Serializable { + + private static final long serialVersionUID = -2003175482038217418L; + + /** 展示位的展示样式 1-小图模式;2-大图模式 */ + @JsonProperty("scale") + private Integer scale; + + /** 精选展示位明细 */ + @JsonProperty("banner") + private List banner; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/banner/BannerItem.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/banner/BannerItem.java new file mode 100644 index 0000000000..0f7818d892 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/banner/BannerItem.java @@ -0,0 +1,41 @@ +package com.binarywang.wxjava.store.bean.home.banner; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 精选展示位明细 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@JsonInclude(Include.NON_NULL) +public class BannerItem implements Serializable { + + private static final long serialVersionUID = 6982412458700854481L; + + /** 展示位类型 1-商品 3-视频号 4-公众号 {@link com.binarywang.wxjava.store.enums.BannerType} */ + @JsonProperty("type") + private Integer type; + + /** 展示位信息 */ + @JsonProperty("banner") + private BannerItemDetail banner; + + /** 商品 */ + @JsonProperty("product") + private BannerItemProduct product; + + /** 视频号 */ + @JsonProperty("finder") + private BannerItemFinder finder; + + /** 公众号 */ + @JsonProperty("official_account") + private BannerItemOfficialAccount officialAccount; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/banner/BannerItemDetail.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/banner/BannerItemDetail.java new file mode 100644 index 0000000000..fe88156a3e --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/banner/BannerItemDetail.java @@ -0,0 +1,33 @@ +package com.binarywang.wxjava.store.bean.home.banner; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 精选展示位明细中的明细 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@JsonInclude(Include.NON_NULL) +public class BannerItemDetail implements Serializable { + + private static final long serialVersionUID = 5975434996207526173L; + + /** 图片url */ + @JsonProperty("img_url") + private String imgUrl; + + /** 标题 */ + @JsonProperty("title") + private String title; + + /** 描述 */ + @JsonProperty("description") + private String description; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/banner/BannerItemFinder.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/banner/BannerItemFinder.java new file mode 100644 index 0000000000..0c5024b915 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/banner/BannerItemFinder.java @@ -0,0 +1,29 @@ +package com.binarywang.wxjava.store.bean.home.banner; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 精选展示位明细中的视频号数据 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@JsonInclude(Include.NON_NULL) +public class BannerItemFinder implements Serializable { + + private static final long serialVersionUID = -7397790079913284012L; + + /** 视频号ID */ + @JsonProperty("finder_user_name") + private String finderUserName; + + /** 视频号视频的唯一标识 */ + @JsonProperty("feed_id") + private String feedId; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/banner/BannerItemOfficialAccount.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/banner/BannerItemOfficialAccount.java new file mode 100644 index 0000000000..8d457465a4 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/banner/BannerItemOfficialAccount.java @@ -0,0 +1,25 @@ +package com.binarywang.wxjava.store.bean.home.banner; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 精选展示位明细中的公众号数据 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@JsonInclude(Include.NON_NULL) +public class BannerItemOfficialAccount implements Serializable { + + private static final long serialVersionUID = -5596947592282082891L; + + /** 公众号文章url */ + @JsonProperty("url") + private String url; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/banner/BannerItemProduct.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/banner/BannerItemProduct.java new file mode 100644 index 0000000000..454bfa396d --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/banner/BannerItemProduct.java @@ -0,0 +1,25 @@ +package com.binarywang.wxjava.store.bean.home.banner; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 精选展示位明细中的商品 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@JsonInclude(Include.NON_NULL) +public class BannerItemProduct implements Serializable { + + private static final long serialVersionUID = 8034487065591522594L; + + /** 商品id */ + @JsonProperty("product_id") + private Long productId; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/CatTreeNode.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/CatTreeNode.java new file mode 100644 index 0000000000..e3af0abfc6 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/CatTreeNode.java @@ -0,0 +1,32 @@ +package com.binarywang.wxjava.store.bean.home.tree; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 主页分类信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class CatTreeNode implements Serializable { + + private static final long serialVersionUID = 3154219180098003510L; + + /** 分类id */ + @JsonProperty("id") + private Integer id; + + /** 分类名字 */ + @JsonProperty("name") + private String name; + + /** 是否在用户端展示该分类。1为是,0为否 */ + @JsonProperty("is_displayed") + private Boolean displayed; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/LevelTreeInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/LevelTreeInfo.java new file mode 100644 index 0000000000..ac4626a030 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/LevelTreeInfo.java @@ -0,0 +1,24 @@ +package com.binarywang.wxjava.store.bean.home.tree; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 分类信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class LevelTreeInfo implements Serializable { + + /** 一级分类 */ + @JsonProperty("level_1") + private List level1; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/OneLevelTreeNode.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/OneLevelTreeNode.java new file mode 100644 index 0000000000..1a0c81cd25 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/OneLevelTreeNode.java @@ -0,0 +1,25 @@ +package com.binarywang.wxjava.store.bean.home.tree; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * 一级分类 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class OneLevelTreeNode extends CatTreeNode { + + /** 二级分类 */ + @JsonProperty("level_2") + private List level2; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/TreeAuditResult.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/TreeAuditResult.java new file mode 100644 index 0000000000..f025992d63 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/TreeAuditResult.java @@ -0,0 +1,27 @@ +package com.binarywang.wxjava.store.bean.home.tree; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 展示在店铺主页的商品分类 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class TreeAuditResult implements Serializable { + + private static final long serialVersionUID = 8142657614529852121L; + + /** 版本号。设置分类树的接口会用到 */ + @JsonProperty("version") + private Integer version; + + /** 展示在店铺主页的商品分类 */ + @JsonProperty("audit_results") + private List auditResults; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/TreeAuditResultDetail.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/TreeAuditResultDetail.java new file mode 100644 index 0000000000..fe90adb87a --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/TreeAuditResultDetail.java @@ -0,0 +1,27 @@ +package com.binarywang.wxjava.store.bean.home.tree; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 分类审核结果 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class TreeAuditResultDetail implements Serializable { + + private static final long serialVersionUID = -6085892397971684732L; + + /** 该分类ID的审核结果 */ + @JsonProperty("level_id") + private Integer level_id; + + /** 审核结果枚举。1:不通过;2:通过 */ + @JsonProperty("result_code") + private Integer result_code; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/TreeProductEditInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/TreeProductEditInfo.java new file mode 100644 index 0000000000..104f053efb --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/TreeProductEditInfo.java @@ -0,0 +1,33 @@ +package com.binarywang.wxjava.store.bean.home.tree; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 添加/删除分类关联的商品 参数 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class TreeProductEditInfo implements Serializable { + + private static final long serialVersionUID = -5596947592282082891L; + + /** 一级分类id */ + @JsonProperty("level_1_id") + private Integer level1Id; + + /** 二级分类id */ + @JsonProperty("level_2_id") + private Integer level2Id; + + /** 商品id列表 */ + @JsonProperty("product_ids") + private List productIds; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/TreeProductEditParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/TreeProductEditParam.java new file mode 100644 index 0000000000..2d5b56b65d --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/TreeProductEditParam.java @@ -0,0 +1,25 @@ +package com.binarywang.wxjava.store.bean.home.tree; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 添加/删除分类关联的商品 参数 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class TreeProductEditParam implements Serializable { + + private static final long serialVersionUID = -4906016235749892703L; + + /** 参数 */ + @JsonProperty("req") + private TreeProductEditInfo req; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/TreeProductListInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/TreeProductListInfo.java new file mode 100644 index 0000000000..3a519f68ff --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/TreeProductListInfo.java @@ -0,0 +1,36 @@ +package com.binarywang.wxjava.store.bean.home.tree; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 查询分类关联的商品 参数 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class TreeProductListInfo implements Serializable { + + private static final long serialVersionUID = 2774682583380930076L; + + /** 一级分类id */ + @JsonProperty("level_1_id") + private Integer level1Id; + + /** 二级分类id */ + @JsonProperty("level_2_id") + private Integer level2Id; + + /** 分页大小 */ + @JsonProperty("page_size") + private Integer pageSize; + + /** 从头拉取填空。翻页拉取的话填resp返回的值 */ + @JsonProperty("page_context") + private String pageContext; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/TreeProductListParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/TreeProductListParam.java new file mode 100644 index 0000000000..5fa8c52156 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/TreeProductListParam.java @@ -0,0 +1,24 @@ +package com.binarywang.wxjava.store.bean.home.tree; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 查询分类关联的商品 参数 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class TreeProductListParam implements Serializable { + + private static final long serialVersionUID = -8444106841479328711L; + + /** 参数 */ + @JsonProperty("req") + private TreeProductListInfo req; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/TreeProductListResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/TreeProductListResponse.java new file mode 100644 index 0000000000..e46bbc9a7e --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/TreeProductListResponse.java @@ -0,0 +1,24 @@ +package com.binarywang.wxjava.store.bean.home.tree; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 资金流水响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class TreeProductListResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 4566848209585635054L; + + /** 结果 */ + @JsonProperty("resp") + private TreeProductListResult resp; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/TreeProductListResult.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/TreeProductListResult.java new file mode 100644 index 0000000000..07330a1530 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/TreeProductListResult.java @@ -0,0 +1,31 @@ +package com.binarywang.wxjava.store.bean.home.tree; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 资金流水响应 结果 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class TreeProductListResult implements Serializable { + + private static final long serialVersionUID = 4566848209585635054L; + + /** 关联的商品ID。如果返回为空,返回翻页到底了 */ + @JsonProperty("product_ids") + private List productIds; + + /** 总条数 */ + @JsonProperty("total_count") + private Integer totalCount; + + /** 拉取下一页的话,需要把这个值填到req的page_context里面 */ + @JsonProperty("page_context") + private String pageContext; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/TreeShowGetResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/TreeShowGetResponse.java new file mode 100644 index 0000000000..0ecb976a23 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/TreeShowGetResponse.java @@ -0,0 +1,20 @@ +package com.binarywang.wxjava.store.bean.home.tree; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class TreeShowGetResponse extends WxStoreBaseResponse { + + /** resp */ + @JsonProperty("resp") + private TreeShowInfo resp; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/TreeShowInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/TreeShowInfo.java new file mode 100644 index 0000000000..8fef061c7e --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/TreeShowInfo.java @@ -0,0 +1,45 @@ +package com.binarywang.wxjava.store.bean.home.tree; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 分类展示信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class TreeShowInfo implements Serializable { + + /** 分类树 */ + @JsonProperty("tree") + private LevelTreeInfo tree; + + /** 版本号。通过获取商品分类树或者本接口得到 */ + @JsonProperty("version") + private Integer version; + + /** 表示有哪一些分类ID清空关联得商品,如果不清空,那么分类ID和商品得关联关系会一直存在。如果是一级分类,就填"1"。如果是二级分类,就填"1.2"。 */ + @JsonProperty("classification_id_deleted") + private List classificationIdDeleted; + + // 一些自定义的方法 + + /** + * 创建Tree节点 + * + * @return Tree节点 + */ + protected LevelTreeInfo createTree() { + if (tree == null) { + tree = new LevelTreeInfo(); + } + return tree; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/TreeShowParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/TreeShowParam.java new file mode 100644 index 0000000000..899deaf503 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/TreeShowParam.java @@ -0,0 +1,24 @@ +package com.binarywang.wxjava.store.bean.home.tree; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 设置展示在店铺主页的商品分类 参数 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class TreeShowParam implements Serializable { + + private static final long serialVersionUID = -1577647561992899360L; + + /** 分类信息 */ + @JsonProperty("req") + private TreeShowInfo req; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/TreeShowSetResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/TreeShowSetResponse.java new file mode 100644 index 0000000000..76c1aa98de --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/tree/TreeShowSetResponse.java @@ -0,0 +1,20 @@ +package com.binarywang.wxjava.store.bean.home.tree; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class TreeShowSetResponse extends WxStoreBaseResponse { + + /** resp */ + @JsonProperty("resp") + private TreeAuditResult resp; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/window/WindowProductIndexParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/window/WindowProductIndexParam.java new file mode 100644 index 0000000000..849e6249fa --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/window/WindowProductIndexParam.java @@ -0,0 +1,28 @@ +package com.binarywang.wxjava.store.bean.home.window; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 主页商品排序参数 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class WindowProductIndexParam implements Serializable { + + private static final long serialVersionUID = 1370480140179330908L; + + /** 商品id */ + @JsonProperty("product_id") + private String productId; + + /** 商品重新排序后的新序号,最大移动步长为500(即新序号与当前序号的距离小于500) */ + @JsonProperty("index_num") + private Integer indexNum; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/window/WindowProductListParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/window/WindowProductListParam.java new file mode 100644 index 0000000000..80ed70185c --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/window/WindowProductListParam.java @@ -0,0 +1,26 @@ +package com.binarywang.wxjava.store.bean.home.window; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 获取主页展示商品列表 参数 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class WindowProductListParam implements Serializable { + + /** 每页数量(默认10,不超过30) */ + @JsonProperty("page_size") + private Integer pageSize; + + /** 由上次请求返回,记录翻页的上下文。传入时会从上次返回的结果往后翻一页,不传默认获取第一页数据。 */ + @JsonProperty("next_key") + private String nextKey; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/window/WindowProductSetting.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/window/WindowProductSetting.java new file mode 100644 index 0000000000..17c5b0e427 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/window/WindowProductSetting.java @@ -0,0 +1,34 @@ +package com.binarywang.wxjava.store.bean.home.window; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 主页商品配置 返回结果 / 设置请求参数 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@JsonInclude(JsonInclude.Include.NON_NULL) +public class WindowProductSetting implements Serializable { + + private static final long serialVersionUID = -5931781905709862287L; + + /** 商品id */ + @JsonProperty("product_id") + private String productId; + + /** 是否隐藏,设置为隐藏的商品只在首页不可见,并不代表下架。 */ + @JsonProperty("is_set_hide") + private Integer setHide; + + /** 是否置顶 */ + @JsonProperty("is_set_top") + private Integer setTop; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/window/WindowProductSettingResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/window/WindowProductSettingResponse.java new file mode 100644 index 0000000000..dbe187b41a --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/home/window/WindowProductSettingResponse.java @@ -0,0 +1,33 @@ +package com.binarywang.wxjava.store.bean.home.window; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 主页商品配置列表 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class WindowProductSettingResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 1L; + + /** 商品信息 */ + @JsonProperty("products") + private List products; + + /** 本次翻页的上下文,用于请求下一页 */ + @JsonProperty("next_key") + private String nextKey; + + /** 商品总数 */ + @JsonProperty("total_num") + private Integer totalNum; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/image/QualificationFileId.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/image/QualificationFileId.java new file mode 100644 index 0000000000..21cba23883 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/image/QualificationFileId.java @@ -0,0 +1,24 @@ +package com.binarywang.wxjava.store.bean.image; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 资质文件id + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class QualificationFileId implements Serializable { + + private static final long serialVersionUID = -546135264746778249L; + + /** 文件id */ + @JsonProperty("file_id") + private String id; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/image/QualificationFileResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/image/QualificationFileResponse.java new file mode 100644 index 0000000000..caad194fc5 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/image/QualificationFileResponse.java @@ -0,0 +1,24 @@ +package com.binarywang.wxjava.store.bean.image; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 资质文件id响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class QualificationFileResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 5172377567441096813L; + + /** 文件数据 */ + @JsonProperty("data") + private QualificationFileId data; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/image/StoreImageInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/image/StoreImageInfo.java new file mode 100644 index 0000000000..6a7678d171 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/image/StoreImageInfo.java @@ -0,0 +1,30 @@ +package com.binarywang.wxjava.store.bean.image; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 微信图片信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class StoreImageInfo implements Serializable { + + private static final long serialVersionUID = 8883519290965944530L; + + /** 开放平台media_id */ + @JsonProperty("media_id") + private String mediaId; + + /** 图片链接,有访问频率限制 */ + @JsonProperty("img_url") + private String url; + + /** 微信支付media_id */ + @JsonProperty("pay_media_id") + private String payMediaId; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/image/StoreImageResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/image/StoreImageResponse.java new file mode 100644 index 0000000000..ca21d41435 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/image/StoreImageResponse.java @@ -0,0 +1,32 @@ +package com.binarywang.wxjava.store.bean.image; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.io.File; +import lombok.Data; +import lombok.EqualsAndHashCode; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * @author Zeyes + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class StoreImageResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = -4163511427507976489L; + + @JsonIgnore + private File file; + + private String contentType; + + public StoreImageResponse() { + } + + public StoreImageResponse(File file, String contentType) { + this.errCode = SUCCESS_CODE; + this.errMsg = "ok"; + this.file = file; + this.contentType = contentType; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/image/UploadImageResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/image/UploadImageResponse.java new file mode 100644 index 0000000000..09945c54f6 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/image/UploadImageResponse.java @@ -0,0 +1,24 @@ +package com.binarywang.wxjava.store.bean.image; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 微信图片信息响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class UploadImageResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = -609315696774437877L; + + /** 图片信息 */ + @JsonProperty("pic_file") + private StoreImageInfo imgInfo; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/kf/WxStoreKfCosUploadResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/kf/WxStoreKfCosUploadResponse.java new file mode 100644 index 0000000000..fe1b2ad525 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/kf/WxStoreKfCosUploadResponse.java @@ -0,0 +1,20 @@ +package com.binarywang.wxjava.store.bean.kf; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** 客服素材上传响应。 */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class WxStoreKfCosUploadResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 1L; + + /** 素材在 COS 上的地址。 */ + @JsonProperty("cos_url") + private String cosUrl; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/kf/WxStoreKfSendMsgParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/kf/WxStoreKfSendMsgParam.java new file mode 100644 index 0000000000..c192e691d7 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/kf/WxStoreKfSendMsgParam.java @@ -0,0 +1,90 @@ +package com.binarywang.wxjava.store.bean.kf; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** 发送客服消息请求参数。 */ +@Data +@NoArgsConstructor +public class WxStoreKfSendMsgParam implements Serializable { + + private static final long serialVersionUID = 1L; + + /** 请求幂等标识。 */ + @JsonProperty("request_id") + private String requestId; + + /** 接收消息的用户 openid。 */ + @JsonProperty("open_id") + private String openId; + + /** 消息类型。 */ + @JsonProperty("msg_type") + private String msgType; + + /** 文本消息内容。 */ + @JsonProperty("text") + private Text text; + + /** 图片消息内容。 */ + @JsonProperty("image") + private CosUrlMessage image; + + /** 视频消息内容。 */ + @JsonProperty("video") + private CosUrlMessage video; + + /** 文件消息内容。 */ + @JsonProperty("file") + private CosUrlMessage file; + + /** 商品卡片消息内容。 */ + @JsonProperty("product_share") + private ProductShareMessage productShare; + + /** 订单卡片消息内容。 */ + @JsonProperty("order_share") + private OrderShareMessage orderShare; + + @Data + @NoArgsConstructor + public static class Text implements Serializable { + + private static final long serialVersionUID = 1L; + + @JsonProperty("content") + private String content; + } + + @Data + @NoArgsConstructor + public static class CosUrlMessage implements Serializable { + + private static final long serialVersionUID = 1L; + + @JsonProperty("cos_url") + private String cosUrl; + } + + @Data + @NoArgsConstructor + public static class ProductShareMessage implements Serializable { + + private static final long serialVersionUID = 1L; + + @JsonProperty("product_id") + private String productId; + } + + @Data + @NoArgsConstructor + public static class OrderShareMessage implements Serializable { + + private static final long serialVersionUID = 1L; + + @JsonProperty("order_id") + private String orderId; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/kf/WxStoreKfSendMsgResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/kf/WxStoreKfSendMsgResponse.java new file mode 100644 index 0000000000..dbcfc82977 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/kf/WxStoreKfSendMsgResponse.java @@ -0,0 +1,20 @@ +package com.binarywang.wxjava.store.bean.kf; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** 发送客服消息响应。 */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class WxStoreKfSendMsgResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 1L; + + /** 消息 id。 */ + @JsonProperty("msg_id") + private String msgId; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/limit/LimitSku.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/limit/LimitSku.java new file mode 100644 index 0000000000..f000b33f19 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/limit/LimitSku.java @@ -0,0 +1,30 @@ +package com.binarywang.wxjava.store.bean.limit; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class LimitSku implements Serializable { + + private static final long serialVersionUID = -1819737633227427482L; + + /** 参与抢购的商品 ID 下,不同规格(SKU)的商品信息 */ + @JsonProperty("sku_id") + private String skuId; + + /** SKU的抢购价格,必须小于原价(原价为1分钱的商品无法创建抢购任务) */ + @JsonProperty("sale_price") + private Integer salePrice; + + /** 参与抢购的商品库存,必须小于等于现有库存 */ + @JsonProperty("sale_stock") + private Integer saleStock; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/limit/LimitSkuUpdate.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/limit/LimitSkuUpdate.java new file mode 100644 index 0000000000..89e929a0e3 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/limit/LimitSkuUpdate.java @@ -0,0 +1,32 @@ +package com.binarywang.wxjava.store.bean.limit; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 限时抢购任务的 SKU 更新信息。 + */ +@Data +@NoArgsConstructor +public class LimitSkuUpdate implements Serializable { + + private static final long serialVersionUID = 4209672674401016015L; + + /** SKU 所属商品 ID。 */ + @JsonProperty("product_id") + private String productId; + + /** SKU ID。 */ + @JsonProperty("sku_id") + private String skuId; + + /** SKU 抢购价格,单位为分。 */ + @JsonProperty("sale_price") + private Integer salePrice; + + /** 参与抢购的商品库存。 */ + @JsonProperty("sale_stock") + private Integer saleStock; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/limit/LimitTaskAddResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/limit/LimitTaskAddResponse.java new file mode 100644 index 0000000000..fc84361e99 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/limit/LimitTaskAddResponse.java @@ -0,0 +1,23 @@ +package com.binarywang.wxjava.store.bean.limit; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class LimitTaskAddResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = -4742165348862157618L; + + /** 限时抢购任务ID 创建成功后返回 */ + @JsonProperty("task_id") + private String taskId; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/limit/LimitTaskInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/limit/LimitTaskInfo.java new file mode 100644 index 0000000000..59ddca0dd6 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/limit/LimitTaskInfo.java @@ -0,0 +1,45 @@ +package com.binarywang.wxjava.store.bean.limit; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class LimitTaskInfo implements Serializable { + + private static final long serialVersionUID = 3032226931637189351L; + + /** 限时抢购任务ID */ + @JsonProperty("task_id") + private String taskId; + + /** 抢购商品ID */ + @JsonProperty("product_id") + private String productId; + + /** 限时抢购任务状态 */ + @JsonProperty("status") + private Integer status; + + /** 限时抢购任务创建时间(秒级时间戳) */ + @JsonProperty("create_time") + private Long createTime; + + /** 限时抢购任务开始时间(秒级时间戳) */ + @JsonProperty("start_time") + private Long startTime; + + /** 限时抢购任务结束时间(秒级时间戳) */ + @JsonProperty("end_time") + private Long endTime; + + /** sku列表 */ + @JsonProperty("limited_discount_skus") + private List skus; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/limit/LimitTaskListParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/limit/LimitTaskListParam.java new file mode 100644 index 0000000000..697d6586ad --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/limit/LimitTaskListParam.java @@ -0,0 +1,28 @@ +package com.binarywang.wxjava.store.bean.limit; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import com.binarywang.wxjava.store.bean.base.StreamPageParam; + +/** + * @author Zeyes + */ +@Data +public class LimitTaskListParam extends StreamPageParam { + + private static final long serialVersionUID = -7227161890365102302L; + + + /** 抢购活动状态 */ + @JsonProperty("status") + private Integer status; + + public LimitTaskListParam() { + } + + public LimitTaskListParam(Integer pageSize, String nextKey, Integer status) { + this.pageSize = pageSize; + this.nextKey = nextKey; + this.status = status; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/limit/LimitTaskListResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/limit/LimitTaskListResponse.java new file mode 100644 index 0000000000..d774233947 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/limit/LimitTaskListResponse.java @@ -0,0 +1,32 @@ +package com.binarywang.wxjava.store.bean.limit; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class LimitTaskListResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 3604657299385130217L; + + + /** 限时抢购任务 */ + @JsonProperty("limited_discount_tasks") + private List tasks; + + /** 本次翻页的上下文,用于请求下一页 */ + @JsonProperty("next_key") + private String nextKey; + + /** 商品总数 */ + @JsonProperty("total_num") + private Integer totalNum; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/limit/LimitTaskParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/limit/LimitTaskParam.java new file mode 100644 index 0000000000..bd52daa74c --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/limit/LimitTaskParam.java @@ -0,0 +1,36 @@ +package com.binarywang.wxjava.store.bean.limit; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.Date; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @author Zeyes + */ +@Data +@NoArgsConstructor +@JsonInclude(JsonInclude.Include.NON_NULL) +public class LimitTaskParam implements Serializable { + + private static final long serialVersionUID = 3885409806249022528L; + + /** 抢购商品ID */ + @JsonProperty("product_id") + private String productId; + + /** 限时抢购任务开始时间(秒级时间戳) */ + @JsonProperty("start_time") + private Date startTime; + + /** 限时抢购任务结束时间(秒级时间戳) */ + @JsonProperty("end_time") + private Date endTime; + + /** sku列表 */ + @JsonProperty("limited_discount_skus") + private List skus; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/limit/LimitTaskUpdateParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/limit/LimitTaskUpdateParam.java new file mode 100644 index 0000000000..9ac4c5b090 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/limit/LimitTaskUpdateParam.java @@ -0,0 +1,41 @@ +package com.binarywang.wxjava.store.bean.limit; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 更新限时抢购任务请求参数。 + */ +@Data +@NoArgsConstructor +public class LimitTaskUpdateParam implements Serializable { + + private static final long serialVersionUID = 7277247203887803045L; + + /** 限时抢购任务 ID。 */ + @JsonProperty("task_id") + private String taskId; + + /** 当前活动状态:0 待开始,1 进行中。 */ + @JsonProperty("status") + private Integer status; + + /** 活动开始时间,秒级时间戳。 */ + @JsonProperty("start_time") + private Long startTime; + + /** 活动结束时间,秒级时间戳。 */ + @JsonProperty("end_time") + private Long endTime; + + /** 活动名称。 */ + @JsonProperty("title") + private String title; + + /** SKU 抢购信息列表。 */ + @JsonProperty("limited_discount_skus") + private List skus; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/limit/LimitTaskUpdateResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/limit/LimitTaskUpdateResponse.java new file mode 100644 index 0000000000..5adb7ead24 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/limit/LimitTaskUpdateResponse.java @@ -0,0 +1,26 @@ +package com.binarywang.wxjava.store.bean.limit; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 更新限时抢购任务响应。 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class LimitTaskUpdateResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 4429517792042527433L; + + /** 限时抢购任务 ID。 */ + @JsonProperty("task_id") + private String taskId; + + /** 活动名称。 */ + @JsonProperty("title") + private String title; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/SessionMessage.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/SessionMessage.java new file mode 100644 index 0000000000..200fb94c30 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/SessionMessage.java @@ -0,0 +1,27 @@ +package com.binarywang.wxjava.store.bean.message; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.message.WxStoreMessage; + +/** + * 会话消息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@JacksonXmlRootElement(localName = "xml") +public class SessionMessage extends WxStoreMessage { + + private static final long serialVersionUID = -429381568555605309L; + + @JsonProperty("SessionFrom") + @JacksonXmlProperty(localName = "SessionFrom") + private String from; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/after/AfterSaleMessage.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/after/AfterSaleMessage.java new file mode 100644 index 0000000000..cf1e328ec2 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/after/AfterSaleMessage.java @@ -0,0 +1,27 @@ +package com.binarywang.wxjava.store.bean.message.after; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.message.WxStoreMessage; + +/** + * 售后消息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@JacksonXmlRootElement(localName = "xml") +public class AfterSaleMessage extends WxStoreMessage { + + private static final long serialVersionUID = -7263404451639198126L; + /** 状态信息 */ + @JsonProperty("finder_shop_aftersale_status_update") + @JacksonXmlProperty(localName = "finder_shop_aftersale_status_update") + private AfterSaleStatusInfo info; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/after/AfterSaleStatusInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/after/AfterSaleStatusInfo.java new file mode 100644 index 0000000000..4aa47b1499 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/after/AfterSaleStatusInfo.java @@ -0,0 +1,33 @@ +package com.binarywang.wxjava.store.bean.message.after; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 售后信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class AfterSaleStatusInfo implements Serializable { + + private static final long serialVersionUID = -7309656340583314591L; + /** 售后单号 */ + @JsonProperty("after_sale_order_id") + @JacksonXmlProperty(localName = "after_sale_order_id") + private String afterSaleOrderId; + + /** 售后单状态 */ + @JsonProperty("status") + @JacksonXmlProperty(localName = "status") + private String status; + + /** 订单id */ + @JsonProperty("order_id") + @JacksonXmlProperty(localName = "order_id") + private String orderId; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/after/ComplaintInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/after/ComplaintInfo.java new file mode 100644 index 0000000000..cfc0058b2d --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/after/ComplaintInfo.java @@ -0,0 +1,33 @@ +package com.binarywang.wxjava.store.bean.message.after; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 纠纷信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class ComplaintInfo implements Serializable { + + private static final long serialVersionUID = 3988395560953978239L; + /** 纠纷单号 */ + @JsonProperty("complaint_id") + @JacksonXmlProperty(localName = "complaint_id") + private String complaintId; + + /** 小店售后单号 */ + @JsonProperty("after_sale_order_id") + @JacksonXmlProperty(localName = "after_sale_order_id") + private String afterSaleOrderId; + + /** 纠纷单状态 */ + @JsonProperty("status") + @JacksonXmlProperty(localName = "status") + private Integer status; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/after/ComplaintMessage.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/after/ComplaintMessage.java new file mode 100644 index 0000000000..00ecc31ac4 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/after/ComplaintMessage.java @@ -0,0 +1,28 @@ +package com.binarywang.wxjava.store.bean.message.after; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.message.WxStoreMessage; + +/** + * 纠纷消息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@JacksonXmlRootElement(localName = "xml") +public class ComplaintMessage extends WxStoreMessage { + + private static final long serialVersionUID = 5358093415172409157L; + /** 状态信息 */ + @JsonProperty("finder_shop_complaint") + @JacksonXmlProperty(localName = "finder_shop_complaint") + private ComplaintInfo info; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/coupon/CouponActionInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/coupon/CouponActionInfo.java new file mode 100644 index 0000000000..352d0a3521 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/coupon/CouponActionInfo.java @@ -0,0 +1,48 @@ +package com.binarywang.wxjava.store.bean.message.coupon; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 优惠券操作消息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class CouponActionInfo implements Serializable { + + private static final long serialVersionUID = -4456716511656569552L; + /** 优惠券ID */ + @JsonProperty("coupon_id") + @JacksonXmlProperty(localName = "coupon_id") + private String couponId; + + /** 领券时间 */ + @JsonProperty("create_time") + @JacksonXmlProperty(localName = "create_time") + private String createTime; + + /** 删除时间 */ + @JsonProperty("delete_time") + @JacksonXmlProperty(localName = "delete_time") + private String deleteTime; + + /** 过期时间 */ + @JsonProperty("expire_time") + @JacksonXmlProperty(localName = "expire_time") + private String expireTime; + + /** 更新时间 */ + @JsonProperty("change_time") + @JacksonXmlProperty(localName = "change_time") + private String changeTime; + + /** 作废时间 */ + @JsonProperty("invalid_time") + @JacksonXmlProperty(localName = "invalid_time") + private String invalidTime; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/coupon/CouponActionMessage.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/coupon/CouponActionMessage.java new file mode 100644 index 0000000000..f899e0d67a --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/coupon/CouponActionMessage.java @@ -0,0 +1,29 @@ +package com.binarywang.wxjava.store.bean.message.coupon; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.message.WxStoreMessage; + + +/** + * 卡券操作 消息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@JacksonXmlRootElement(localName = "xml") +public class CouponActionMessage extends WxStoreMessage { + + private static final long serialVersionUID = 4910461800721504462L; + /** 优惠券信息 */ + @JsonProperty("coupon_info") + @JacksonXmlProperty(localName = "coupon_info") + private CouponActionInfo couponInfo; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/coupon/CouponReceiveMessage.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/coupon/CouponReceiveMessage.java new file mode 100644 index 0000000000..a4918a1d6a --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/coupon/CouponReceiveMessage.java @@ -0,0 +1,60 @@ +package com.binarywang.wxjava.store.bean.message.coupon; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import java.util.Map; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.message.WxStoreMessage; + + +/** + * 用户领券 消息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@JacksonXmlRootElement(localName = "xml") +public class CouponReceiveMessage extends WxStoreMessage { + + private static final long serialVersionUID = 5121347165246528730L; + /** 领取的优惠券ID */ + @JsonProperty("coupon_id") + @JacksonXmlProperty(localName = "coupon_id") + private String couponId; + + /** 生成的用户券ID */ + @JsonProperty("user_coupon_id") + @JacksonXmlProperty(localName = "user_coupon_id") + private String userCouponId; + + /** 领券时间 */ + @JsonProperty("receive_time") + @JacksonXmlProperty(localName = "receive_time") + private String receiveTime; + + @JsonProperty("receive_info") + @JacksonXmlProperty(localName = "receive_info") + private void unpackNameFromNestedObject(Map map) { + if (map == null) { + return; + } + Object obj = null; + obj = map.get("coupon_id"); + if (obj != null) { + this.couponId = (obj instanceof String ? (String) obj : String.valueOf(obj)); + } + obj = map.get("user_coupon_id"); + if (obj != null) { + this.userCouponId = (obj instanceof String ? (String) obj : String.valueOf(obj)); + } + obj = map.get("receive_time"); + if (obj != null) { + this.receiveTime = (obj instanceof String ? (String) obj : String.valueOf(obj)); + } + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/coupon/UserCouponActionInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/coupon/UserCouponActionInfo.java new file mode 100644 index 0000000000..7fb98b3ca1 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/coupon/UserCouponActionInfo.java @@ -0,0 +1,45 @@ +package com.binarywang.wxjava.store.bean.message.coupon; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 用户优惠券操作消息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class UserCouponActionInfo implements Serializable { + + private static final long serialVersionUID = -5948836918972669529L; + /** 优惠券ID */ + @JsonProperty("coupon_id") + @JacksonXmlProperty(localName = "coupon_id") + private String couponId; + + /** 用户券ID */ + @JsonProperty("user_coupon_id") + @JacksonXmlProperty(localName = "user_coupon_id") + private String userCouponId; + + /** 过期时间 */ + @JsonProperty("expire_time") + @JacksonXmlProperty(localName = "expire_time") + private String expireTime; + + /** 使用时间 */ + @JsonProperty("use_time") + @JacksonXmlProperty(localName = "use_time") + private String useTime; + + /** 返还时间 */ + @JsonProperty("unuse_time") + @JacksonXmlProperty(localName = "unuse_time") + private String unuseTime; + + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/coupon/UserCouponExpireMessage.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/coupon/UserCouponExpireMessage.java new file mode 100644 index 0000000000..8c74774d33 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/coupon/UserCouponExpireMessage.java @@ -0,0 +1,29 @@ +package com.binarywang.wxjava.store.bean.message.coupon; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.message.WxStoreMessage; + + +/** + * 用户卡券过期 消息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@JacksonXmlRootElement(localName = "xml") +public class UserCouponExpireMessage extends WxStoreMessage { + + private static final long serialVersionUID = -2557475297107588372L; + /** 用户优惠券信息 */ + @JsonProperty("user_coupon_info") + @JacksonXmlProperty(localName = "user_coupon_info") + private UserCouponActionInfo userCouponInfo; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/coupon/UserCouponUseMessage.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/coupon/UserCouponUseMessage.java new file mode 100644 index 0000000000..818c5c2dd4 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/coupon/UserCouponUseMessage.java @@ -0,0 +1,28 @@ +package com.binarywang.wxjava.store.bean.message.coupon; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.message.WxStoreMessage; + + +/** + * 用户卡券使用 消息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@JacksonXmlRootElement(localName = "xml") +public class UserCouponUseMessage extends WxStoreMessage { + + private static final long serialVersionUID = -1051142666438578628L; + /** 用户优惠券信息 */ + @JsonProperty("user_info") + @JacksonXmlProperty(localName = "user_info") + private UserCouponActionInfo userCouponInfo; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/fund/AccountNotifyMessage.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/fund/AccountNotifyMessage.java new file mode 100644 index 0000000000..fc421f8bcd --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/fund/AccountNotifyMessage.java @@ -0,0 +1,27 @@ +package com.binarywang.wxjava.store.bean.message.fund; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.message.WxStoreMessage; + +/** + * 账户变更通知 消息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@JacksonXmlRootElement(localName = "xml") +public class AccountNotifyMessage extends WxStoreMessage { + + private static final long serialVersionUID = 3846692537729725664L; + /** 账户信息 */ + @JsonProperty("account_info") + @JacksonXmlProperty(localName = "account_info") + private BankNotifyInfo accountInfo; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/fund/BankNotifyInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/fund/BankNotifyInfo.java new file mode 100644 index 0000000000..9789e52430 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/fund/BankNotifyInfo.java @@ -0,0 +1,24 @@ +package com.binarywang.wxjava.store.bean.message.fund; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 账户信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class BankNotifyInfo implements Serializable { + + private static final long serialVersionUID = 4192569196686180014L; + /** 结算账户变更事件, 1.修改结算账户 */ + @JsonProperty("event") + @JacksonXmlProperty(localName = "event") + private Integer event; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/fund/QrNotifyInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/fund/QrNotifyInfo.java new file mode 100644 index 0000000000..d75b44082e --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/fund/QrNotifyInfo.java @@ -0,0 +1,34 @@ +package com.binarywang.wxjava.store.bean.message.fund; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 提现二维码回调 消息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class QrNotifyInfo implements Serializable { + + private static final long serialVersionUID = 2470016408300157273L; + /** 二维码ticket */ + @JsonProperty("ticket") + @JacksonXmlProperty(localName = "ticket") + private String ticket; + + /** 二维码状态,1.已确认 2.已取消 3.已失效 4.已扫码 */ + @JsonProperty("status") + @JacksonXmlProperty(localName = "status") + private Integer status; + + /** 扫码者身份, 0.非管理员 1.管理员 */ + @JsonProperty("scan_user_type") + @JacksonXmlProperty(localName = "scan_user_type") + private Integer scanUserType; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/fund/QrNotifyMessage.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/fund/QrNotifyMessage.java new file mode 100644 index 0000000000..d5da08f1a1 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/fund/QrNotifyMessage.java @@ -0,0 +1,27 @@ +package com.binarywang.wxjava.store.bean.message.fund; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.message.WxStoreMessage; + +/** + * 提现二维码回调 消息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@JacksonXmlRootElement(localName = "xml") +public class QrNotifyMessage extends WxStoreMessage { + + private static final long serialVersionUID = -4705790895359679423L; + /** 账户信息 */ + @JsonProperty("qrcode_info") + @JacksonXmlProperty(localName = "qrcode_info") + private QrNotifyInfo qrcodeInfo; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/fund/WithdrawNotifyInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/fund/WithdrawNotifyInfo.java new file mode 100644 index 0000000000..7a68820734 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/fund/WithdrawNotifyInfo.java @@ -0,0 +1,29 @@ +package com.binarywang.wxjava.store.bean.message.fund; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 提现通知信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class WithdrawNotifyInfo implements Serializable { + + private static final long serialVersionUID = 2987401114254821956L; + /** 1.发起提现,生成二维码 2.扫码验证成功,申请提现 3.提现成功 4.提现失败 */ + @JsonProperty("event") + @JacksonXmlProperty(localName = "event") + private Integer event; + + /** 提现单号 */ + @JsonProperty("withdraw_id") + @JacksonXmlProperty(localName = "withdraw_id") + private String withdrawId; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/fund/WithdrawNotifyMessage.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/fund/WithdrawNotifyMessage.java new file mode 100644 index 0000000000..88c736ac43 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/fund/WithdrawNotifyMessage.java @@ -0,0 +1,27 @@ +package com.binarywang.wxjava.store.bean.message.fund; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.message.WxStoreMessage; + +/** + * 账户变更通知 消息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@JacksonXmlRootElement(localName = "xml") +public class WithdrawNotifyMessage extends WxStoreMessage { + + private static final long serialVersionUID = -2504086242143523430L; + /** 账户信息 */ + @JsonProperty("withdraw_info") + @JacksonXmlProperty(localName = "withdraw_info") + private WithdrawNotifyInfo withdrawInfo; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderCancelInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderCancelInfo.java new file mode 100644 index 0000000000..4caf438fff --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderCancelInfo.java @@ -0,0 +1,24 @@ +package com.binarywang.wxjava.store.bean.message.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * 订单取消信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class OrderCancelInfo extends OrderIdInfo { + + private static final long serialVersionUID = -8022876997578127873L; + /** 1:用户取消;2:超时取消;3:全部商品售后完成,订单取消;4:超卖商家取消订单 */ + @JsonProperty("cancel_type") + @JacksonXmlProperty(localName = "cancel_type") + private Integer cancelType; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderCancelMessage.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderCancelMessage.java new file mode 100644 index 0000000000..4c9edebdcb --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderCancelMessage.java @@ -0,0 +1,27 @@ +package com.binarywang.wxjava.store.bean.message.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.message.WxStoreMessage; + +/** + * 订单取消消息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@JacksonXmlRootElement(localName = "xml") +public class OrderCancelMessage extends WxStoreMessage { + + private static final long serialVersionUID = 5389546516473919310L; + /** 订单信息 */ + @JsonProperty("order_info") + @JacksonXmlProperty(localName = "order_info") + private OrderCancelInfo orderInfo; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderConfirmInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderConfirmInfo.java new file mode 100644 index 0000000000..107073e724 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderConfirmInfo.java @@ -0,0 +1,24 @@ +package com.binarywang.wxjava.store.bean.message.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * 订单确认收货信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class OrderConfirmInfo extends OrderIdInfo { + + private static final long serialVersionUID = -2569494642832261346L; + /** 1:用户确认收货;2:超时自动确认收货 */ + @JsonProperty("confirm_type") + @JacksonXmlProperty(localName = "confirm_type") + private Integer confirmType; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderConfirmMessage.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderConfirmMessage.java new file mode 100644 index 0000000000..b965d21134 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderConfirmMessage.java @@ -0,0 +1,27 @@ +package com.binarywang.wxjava.store.bean.message.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.message.WxStoreMessage; + +/** + * 订单确认收货消息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@JacksonXmlRootElement(localName = "xml") +public class OrderConfirmMessage extends WxStoreMessage { + + private static final long serialVersionUID = 4219477394934480425L; + /** 订单信息 */ + @JsonProperty("order_info") + @JacksonXmlProperty(localName = "order_info") + private OrderConfirmInfo orderInfo; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderDeliveryInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderDeliveryInfo.java new file mode 100644 index 0000000000..84dea7ed4e --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderDeliveryInfo.java @@ -0,0 +1,25 @@ +package com.binarywang.wxjava.store.bean.message.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * 订单发货信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class OrderDeliveryInfo extends OrderIdInfo { + + private static final long serialVersionUID = 117962754344887556L; + /** 0:尚未全部发货;1:全部商品发货完成 */ + @JsonProperty("finish_delivery") + @JacksonXmlProperty(localName = "finish_delivery") + private Integer finishDelivery; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderDeliveryMessage.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderDeliveryMessage.java new file mode 100644 index 0000000000..507c53ef84 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderDeliveryMessage.java @@ -0,0 +1,27 @@ +package com.binarywang.wxjava.store.bean.message.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.message.WxStoreMessage; + +/** + * 订单发货消息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@JacksonXmlRootElement(localName = "xml") +public class OrderDeliveryMessage extends WxStoreMessage { + + private static final long serialVersionUID = -1440834047566984402L; + /** 订单信息 */ + @JsonProperty("order_info") + @JacksonXmlProperty(localName = "order_info") + private OrderDeliveryInfo orderInfo; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderExtInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderExtInfo.java new file mode 100644 index 0000000000..5d3de6e88b --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderExtInfo.java @@ -0,0 +1,24 @@ +package com.binarywang.wxjava.store.bean.message.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * 订单其他信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class OrderExtInfo extends OrderIdInfo { + + private static final long serialVersionUID = 4723533858047219828L; + /** 类型 1:联盟佣金信息 */ + @JsonProperty("type") + @JacksonXmlProperty(localName = "type") + private Integer type; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderExtMessage.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderExtMessage.java new file mode 100644 index 0000000000..b1818cafa9 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderExtMessage.java @@ -0,0 +1,27 @@ +package com.binarywang.wxjava.store.bean.message.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.message.WxStoreMessage; + +/** + * 订单状态消息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@JacksonXmlRootElement(localName = "xml") +public class OrderExtMessage extends WxStoreMessage { + + private static final long serialVersionUID = -3183077256476798756L; + /** 订单信息 */ + @JsonProperty("order_info") + @JacksonXmlProperty(localName = "order_info") + private OrderExtInfo orderInfo; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderIdInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderIdInfo.java new file mode 100644 index 0000000000..77facdf9b8 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderIdInfo.java @@ -0,0 +1,23 @@ +package com.binarywang.wxjava.store.bean.message.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 订单id信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class OrderIdInfo implements Serializable { + + private static final long serialVersionUID = 5547544436235032051L; + /** 订单ID */ + @JsonProperty("order_id") + @JacksonXmlProperty(localName = "order_id") + private String orderId; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderIdMessage.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderIdMessage.java new file mode 100644 index 0000000000..31416c797b --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderIdMessage.java @@ -0,0 +1,27 @@ +package com.binarywang.wxjava.store.bean.message.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.message.WxStoreMessage; + +/** + * 订单id消息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@JacksonXmlRootElement(localName = "xml") +public class OrderIdMessage extends WxStoreMessage { + + private static final long serialVersionUID = 3793987364799712798L; + /** 订单信息 */ + @JsonProperty("order_info") + @JacksonXmlProperty(localName = "order_info") + private OrderIdInfo orderInfo; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderPayInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderPayInfo.java new file mode 100644 index 0000000000..a3ababc431 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderPayInfo.java @@ -0,0 +1,24 @@ +package com.binarywang.wxjava.store.bean.message.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * 订单支付信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class OrderPayInfo extends OrderIdInfo { + + private static final long serialVersionUID = -3502786073769735831L; + /** 支付时间,秒级时间戳 */ + @JsonProperty("pay_time") + @JacksonXmlProperty(localName = "pay_time") + private Long payTime; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderPayMessage.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderPayMessage.java new file mode 100644 index 0000000000..a9025590e9 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderPayMessage.java @@ -0,0 +1,27 @@ +package com.binarywang.wxjava.store.bean.message.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.message.WxStoreMessage; + +/** + * 订单支付成功消息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@JacksonXmlRootElement(localName = "xml") +public class OrderPayMessage extends WxStoreMessage { + + private static final long serialVersionUID = 1083018549119427808L; + /** 订单信息 */ + @JsonProperty("order_info") + @JacksonXmlProperty(localName = "order_info") + private OrderPayInfo orderInfo; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderSettleInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderSettleInfo.java new file mode 100644 index 0000000000..17b73c78d2 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderSettleInfo.java @@ -0,0 +1,24 @@ +package com.binarywang.wxjava.store.bean.message.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * 订单结算信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class OrderSettleInfo extends OrderIdInfo { + + private static final long serialVersionUID = -1817955568383872053L; + /** 结算时间 */ + @JsonProperty("settle_time") + @JacksonXmlProperty(localName = "settle_time") + private Long settleTime; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderSettleMessage.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderSettleMessage.java new file mode 100644 index 0000000000..e71f4f223c --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderSettleMessage.java @@ -0,0 +1,27 @@ +package com.binarywang.wxjava.store.bean.message.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.message.WxStoreMessage; + +/** + * 订单结算消息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@JacksonXmlRootElement(localName = "xml") +public class OrderSettleMessage extends WxStoreMessage { + + private static final long serialVersionUID = -4001189226630840548L; + /** 订单信息 */ + @JsonProperty("order_info") + @JacksonXmlProperty(localName = "order_info") + private OrderSettleInfo orderInfo; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderStatusMessage.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderStatusMessage.java new file mode 100644 index 0000000000..e107575214 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/order/OrderStatusMessage.java @@ -0,0 +1,54 @@ +package com.binarywang.wxjava.store.bean.message.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import java.util.Map; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.message.WxStoreMessage; + +/** + * 订单状态消息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@JacksonXmlRootElement(localName = "xml") +public class OrderStatusMessage extends WxStoreMessage { + + private static final long serialVersionUID = -356717038344749283L; + /** 订单ID */ + @JsonProperty("order_id") + @JacksonXmlProperty(localName = "order_id") + private String orderId; + + /** 订单状态 {@link com.binarywang.wxjava.store.enums.WxOrderStatus} */ + @JsonProperty("status") + @JacksonXmlProperty(localName = "status") + private Integer status; + + @JsonProperty("ProductOrderStatusUpdate") + @JacksonXmlProperty(localName = "ProductOrderStatusUpdate") + private void unpackNameFromNestedObject(Map map) { + if (map == null) { + return; + } + Object obj = null; + obj = map.get("order_id"); + if (obj != null) { + this.orderId = obj.toString(); + } + obj = map.get("status"); + if (obj != null) { + if (obj instanceof Integer) { + this.status = (Integer) obj; + } else if (obj instanceof String) { + this.status = Integer.parseInt((String) obj); + } + } + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/product/BrandMessage.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/product/BrandMessage.java new file mode 100644 index 0000000000..de73eecca4 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/product/BrandMessage.java @@ -0,0 +1,72 @@ +package com.binarywang.wxjava.store.bean.message.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import java.util.Map; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.message.WxStoreMessage; + +/** + * 品牌消息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@JacksonXmlRootElement(localName = "xml") +public class BrandMessage extends WxStoreMessage { + + private static final long serialVersionUID = -3773902704930003105L; + /** 品牌库中的品牌编号 */ + @JsonProperty("brand_id") + @JacksonXmlProperty(localName = "brand_id") + private String brandId; + + /** 审核id */ + @JsonProperty("audit_id") + @JacksonXmlProperty(localName = "audit_id") + private String auditId; + + /** 审核状态, 1新增品牌 2更新品牌 3撤回品牌审核 4审核成功 5审核失败 6删除品牌 7品牌资质被系统撤销 */ + @JsonProperty("status") + @JacksonXmlProperty(localName = "status") + private Integer status; + + /** 相关信息 */ + @JsonProperty("reason") + @JacksonXmlProperty(localName = "reason") + private String reason; + + @JsonProperty("BrandEvent") + @JacksonXmlProperty(localName = "BrandEvent") + private void unpackNameFromNestedObject(Map map) { + if (map == null) { + return; + } + Object obj = null; + obj = map.get("brand_id"); + if (obj != null) { + this.brandId = (obj instanceof String ? (String) obj : String.valueOf(obj)); + } + obj = map.get("audit_id"); + if (obj != null) { + this.auditId = (obj instanceof String ? (String) obj : String.valueOf(obj)); + } + obj = map.get("status"); + if (obj != null) { + if (obj instanceof Integer) { + this.status = (Integer) obj; + } else if (obj instanceof String) { + this.status = Integer.parseInt((String) obj); + } + } + obj = map.get("reason"); + if (obj != null) { + this.reason = (obj instanceof String ? (String) obj : String.valueOf(obj)); + } + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/product/CategoryAuditMessage.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/product/CategoryAuditMessage.java new file mode 100644 index 0000000000..1bac92a289 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/product/CategoryAuditMessage.java @@ -0,0 +1,63 @@ +package com.binarywang.wxjava.store.bean.message.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import java.util.Map; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.message.WxStoreMessage; + +/** + * 类目审核消息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@JacksonXmlRootElement(localName = "xml") +public class CategoryAuditMessage extends WxStoreMessage { + + private static final long serialVersionUID = 3192582751919917223L; + /** 审核id */ + @JsonProperty("audit_id") + @JacksonXmlProperty(localName = "audit_id") + private String auditId; + + /** 审核状态, 1:审核中, 2:审核拒绝, 3:审核通过, 12:主动取消申请单 */ + @JsonProperty("status") + @JacksonXmlProperty(localName = "status") + private Integer status; + + /** 相关信息 */ + @JsonProperty("reason") + @JacksonXmlProperty(localName = "reason") + private String reason; + + @JsonProperty("ProductCategoryAudit") + @JacksonXmlProperty(localName = "ProductCategoryAudit") + private void unpackNameFromNestedObject(Map map) { + if (map == null) { + return; + } + Object obj = null; + obj = map.get("audit_id"); + if (obj != null) { + this.auditId = (obj instanceof String ? (String) obj : String.valueOf(obj)); + } + obj = map.get("status"); + if (obj != null) { + if (obj instanceof Integer) { + this.status = (Integer) obj; + } else if (obj instanceof String) { + this.status = Integer.parseInt((String) obj); + } + } + obj = map.get("reason"); + if (obj != null) { + this.reason = (obj instanceof String ? (String) obj : String.valueOf(obj)); + } + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/product/SpuAuditMessage.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/product/SpuAuditMessage.java new file mode 100644 index 0000000000..19b003b7a1 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/product/SpuAuditMessage.java @@ -0,0 +1,83 @@ +package com.binarywang.wxjava.store.bean.message.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import java.util.Map; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.message.WxStoreMessage; + +/** + * SPU审核消息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@JacksonXmlRootElement(localName = "xml") +public class SpuAuditMessage extends WxStoreMessage { + + private static final long serialVersionUID = 1763291928383078102L; + /** 商品id */ + @JsonProperty("product_id") + @JacksonXmlProperty(localName = "product_id") + private String productId; + + /** + * 审核状态, 2:审核不通过;3:审核通过 商品状态, 5:上架;11:自主下架;13:系统下架 + */ + @JsonProperty("status") + @JacksonXmlProperty(localName = "status") + private Integer status; + + /** 审核/下架原因,非必填字段 */ + @JsonProperty("reason") + @JacksonXmlProperty(localName = "reason") + private String reason; + + + + @JsonProperty("ProductSpuAudit") + @JacksonXmlProperty(localName = "ProductSpuAudit") + public void ProductSpuAudit(Map map) { + this.unpackNameFromNestedObject(map); + } + + @JsonProperty("ProductSpuUpdate") + @JacksonXmlProperty(localName = "ProductSpuUpdate") + public void ProductSpuUpdate(Map map) { + this.unpackNameFromNestedObject(map); + } + + @JsonProperty("ProductSpuListing") + @JacksonXmlProperty(localName = "ProductSpuListing") + public void ProductSpuListing(Map map) { + this.unpackNameFromNestedObject(map); + } + + private void unpackNameFromNestedObject(Map map) { + if (map == null) { + return; + } + Object obj = null; + obj = map.get("product_id"); + if (obj != null) { + this.productId = (obj instanceof String ? (String) obj : String.valueOf(obj)); + } + obj = map.get("status"); + if (obj != null) { + if (obj instanceof Integer) { + this.status = (Integer) obj; + } else if (obj instanceof String) { + this.status = Integer.parseInt((String) obj); + } + } + obj = map.get("reason"); + if (obj != null) { + this.reason = (obj instanceof String ? (String) obj : String.valueOf(obj)); + } + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/product/SpuStatusMessage.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/product/SpuStatusMessage.java new file mode 100644 index 0000000000..dc30273d08 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/product/SpuStatusMessage.java @@ -0,0 +1,72 @@ +package com.binarywang.wxjava.store.bean.message.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import java.util.Map; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.message.WxStoreMessage; + +/** + * SPU状态消息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@JacksonXmlRootElement(localName = "xml") +public class SpuStatusMessage extends WxStoreMessage { + + private static final long serialVersionUID = 6872830451279856492L; + /** 商家自定义商品id */ + @JsonProperty("out_product_id") + @JacksonXmlProperty(localName = "out_product_id") + private String outProductId; + + /** 平台商品id */ + @JsonProperty("product_id") + @JacksonXmlProperty(localName = "product_id") + private String productId; + + /** 当前商品上下架状态 参考 {@link com.binarywang.wxjava.store.enums.SpuStatus } */ + @JsonProperty("status") + @JacksonXmlProperty(localName = "status") + private Integer status; + + /** 相关信息 */ + @JsonProperty("reason") + @JacksonXmlProperty(localName = "reason") + private String reason; + + @JsonProperty("OpenProductSpuStatusUpdate") + @JacksonXmlProperty(localName = "OpenProductSpuStatusUpdate") + private void unpackNameFromNestedObject(Map map) { + if (map == null) { + return; + } + Object obj = null; + obj = map.get("out_product_id"); + if (obj != null) { + this.outProductId = (obj instanceof String ? (String) obj : String.valueOf(obj)); + } + obj = map.get("product_id"); + if (obj != null) { + this.productId = (obj instanceof String ? (String) obj : String.valueOf(obj)); + } + obj = map.get("status"); + if (obj != null) { + if (obj instanceof Integer) { + this.status = (Integer) obj; + } else if (obj instanceof String) { + this.status = Integer.parseInt((String) obj); + } + } + obj = map.get("reason"); + if (obj != null) { + this.reason = (obj instanceof String ? (String) obj : String.valueOf(obj)); + } + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/product/SpuStockMessage.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/product/SpuStockMessage.java new file mode 100644 index 0000000000..e110eb0d7e --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/product/SpuStockMessage.java @@ -0,0 +1,88 @@ +package com.binarywang.wxjava.store.bean.message.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import java.util.Map; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.message.WxStoreMessage; + +/** + * SPU库存不足消息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@JacksonXmlRootElement(localName = "xml") +public class SpuStockMessage extends WxStoreMessage { + + private static final long serialVersionUID = 2250860804161527363L; + + /** 商品id */ + @JsonProperty("product_id") + @JacksonXmlProperty(localName = "product_id") + private String productId; + + /** 平台商品id */ + @JsonProperty("sku_id") + @JacksonXmlProperty(localName = "sku_id") + private String skuId; + + /** 剩余库存:当前实时库存数量 */ + @JsonProperty("remaining_stock_amount") + @JacksonXmlProperty(localName = "remaining_stock_amount") + private Long remainingStockAmount; + + /** 未发放的预存code数【该字段对code_source_type=2的团购优惠生效,其他类型该字段值为0】 */ + @JsonProperty("remaining_code_amount") + @JacksonXmlProperty(localName = "remaining_code_amount") + private Long remainingCodeAmount; + + /** StoresEcStockNoEnough */ + @JsonProperty("channels_ec_stock_no_enough") + @JacksonXmlProperty(localName = "channels_ec_stock_no_enough") + private void stockNoEnough(Map map) { + this.unpackNameFromNestedObject(map); + } + + /** + * 从嵌套对象中解析字段 + * + * @param map 嵌套对象 + */ + protected void unpackNameFromNestedObject(Map map) { + if (map == null) { + return; + } + Object obj = null; + obj = map.get("product_id"); + if (obj != null) { + this.productId = (obj instanceof String ? (String) obj : String.valueOf(obj)); + } + obj = map.get("sku_id"); + if (obj != null) { + this.skuId = (obj instanceof String ? (String) obj : String.valueOf(obj)); + } + + obj = map.get("remaining_stock_amount"); + if (obj != null) { + if (obj instanceof Number) { + this.remainingStockAmount = ((Number) obj).longValue(); + } else if (obj instanceof String) { + this.remainingStockAmount = Long.parseLong((String) obj); + } + } + obj = map.get("remaining_code_amount"); + if (obj != null) { + if (obj instanceof Number) { + this.remainingCodeAmount = ((Number) obj).longValue(); + } else if (obj instanceof String) { + this.remainingCodeAmount = Long.parseLong((String) obj); + } + } + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/sharer/SharerChangeMessage.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/sharer/SharerChangeMessage.java new file mode 100644 index 0000000000..85480d5784 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/sharer/SharerChangeMessage.java @@ -0,0 +1,48 @@ +package com.binarywang.wxjava.store.bean.message.sharer; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.message.WxStoreMessage; + +/** + * 分享员变更消息 + * https://developers.weixin.qq.com/doc/channels/API/sharer/callback/channels_ec_sharer_change.html + * + * @author sd-hxf + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@JacksonXmlRootElement(localName = "xml") +public class SharerChangeMessage extends WxStoreMessage { + + private static final long serialVersionUID = 4219477394934480421L; + + /** + * 分享员OpenID + */ + @JsonProperty("openid") + @JacksonXmlProperty(localName = "openid") + private String openid; + + /** + * 分享员类型:0-普通分享员,1-店铺分享员 + */ + @JsonProperty("sharer_type") + @JacksonXmlProperty(localName = "sharer_type") + private Integer sharerType; + + /** + * 分享员绑定状态:1-绑定,2-解绑 + */ + @JsonProperty("bind_status") + @JacksonXmlProperty(localName = "bind_status") + private Integer bindStatus; + + + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/store/CloseStoreMessage.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/store/CloseStoreMessage.java new file mode 100644 index 0000000000..c2995fe0d7 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/store/CloseStoreMessage.java @@ -0,0 +1,38 @@ +package com.binarywang.wxjava.store.bean.message.store; + +/** + * @author Zeyes + */ + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.message.WxStoreMessage; + +/** + * 小店注销消息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@JacksonXmlRootElement(localName = "xml") +public class CloseStoreMessage extends WxStoreMessage { + + private static final long serialVersionUID = 7619787772418774020L; + + /** appid */ + @JsonProperty("appid") + @JacksonXmlProperty(localName = "appid") + private String appid; + + /** Unix时间戳,即格林威治时间1970年01月01日00时00分00秒(北京时间1970年01月01日08时00分00秒)起至现在的总秒数 */ + @JsonProperty("close_timestamp") + @JacksonXmlProperty(localName = "close_timestamp") + private Long closeTimestamp; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/store/NicknameUpdateMessage.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/store/NicknameUpdateMessage.java new file mode 100644 index 0000000000..c613a50ab9 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/store/NicknameUpdateMessage.java @@ -0,0 +1,43 @@ +package com.binarywang.wxjava.store.bean.message.store; + +/** + * @author Zeyes + */ + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.message.WxStoreMessage; + +/** + * 小店修改名称消息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@JacksonXmlRootElement(localName = "xml") +public class NicknameUpdateMessage extends WxStoreMessage { + + private static final long serialVersionUID = 7619787772418774020L; + + /** appid */ + @JsonProperty("appid") + @JacksonXmlProperty(localName = "appid") + private String appid; + + /** 小店旧昵称 */ + @JsonProperty("old_nickname") + @JacksonXmlProperty(localName = "old_nickname") + private String oldNickname; + + /** 小店新昵称 */ + @JsonProperty("new_nickname") + @JacksonXmlProperty(localName = "new_nickname") + private String newNickname; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/supplier/SupplierItemInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/supplier/SupplierItemInfo.java new file mode 100644 index 0000000000..8cbc779044 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/supplier/SupplierItemInfo.java @@ -0,0 +1,44 @@ +package com.binarywang.wxjava.store.bean.message.supplier; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 团长商品变更信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class SupplierItemInfo implements Serializable { + + private static final long serialVersionUID = -1971161027976024360L; + /** 商品变更类型,1:新增商品;2:更新商品 */ + @JsonProperty("event_type") + @JacksonXmlProperty(localName = "event_type") + private Integer eventType; + + /** 团长商品所属小店appid */ + @JsonProperty("appid") + @JacksonXmlProperty(localName = "appid") + private String appid; + + /** 商品id */ + @JsonProperty("product_id") + @JacksonXmlProperty(localName = "product_id") + private String productId; + + /** 商品版本号 */ + @JsonProperty("version") + @JacksonXmlProperty(localName = "version") + private String version; + + /** 商品更新字段,当event_type = 2时有值。commission_ratio、service_ratio、status、active_time分别表示佣金、服务费、商品状态和合作生效时间有变更 */ + @JsonProperty("update_fields") + @JacksonXmlProperty(localName = "update_fields") + private List updateFields; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/supplier/SupplierItemMessage.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/supplier/SupplierItemMessage.java new file mode 100644 index 0000000000..72e088504c --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/supplier/SupplierItemMessage.java @@ -0,0 +1,27 @@ +package com.binarywang.wxjava.store.bean.message.supplier; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.message.WxStoreMessage; + +/** + * 团长商品变更 消息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@JacksonXmlRootElement(localName = "xml") +public class SupplierItemMessage extends WxStoreMessage { + + private static final long serialVersionUID = -4520611382070764349L; + /** 账户信息 */ + @JsonProperty("item_info") + @JacksonXmlProperty(localName = "item_info") + private SupplierItemInfo itemInfo; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/vip/CouponInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/vip/CouponInfo.java new file mode 100644 index 0000000000..2841352c68 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/vip/CouponInfo.java @@ -0,0 +1,27 @@ +package com.binarywang.wxjava.store.bean.message.vip; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * 优惠券信息 + * + * @author asushiye + */ + +@Data +@JsonInclude(JsonInclude.Include.NON_NULL) +@NoArgsConstructor +public class CouponInfo implements Serializable { + + private static final long serialVersionUID = -3659710836197413932L; + /** 兑换的优惠券ID**/ + @JsonProperty("related_coupon_id") + @JacksonXmlProperty(localName = "related_coupon_id") + private Long relatedCouponId; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/vip/ExchangeInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/vip/ExchangeInfo.java new file mode 100644 index 0000000000..91543d2787 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/vip/ExchangeInfo.java @@ -0,0 +1,42 @@ +package com.binarywang.wxjava.store.bean.message.vip; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * 积分兑换 + * + * @author asushiye + */ + +@Data +@JsonInclude(JsonInclude.Include.NON_NULL) +@NoArgsConstructor +public class ExchangeInfo implements Serializable { + + private static final long serialVersionUID = -5692646625631036694L; + /** 入会时间 **/ + @JsonProperty("pay_score") + @JacksonXmlProperty(localName = "pay_score") + private Long pay_score; + + /** 兑换类型 1.优惠券 2商品 **/ + @JsonProperty("score_item_type") + @JacksonXmlProperty(localName = "score_item_type") + private Long score_item_type; + + /** 优惠券信息 **/ + @JsonProperty("coupon_info") + @JacksonXmlProperty(localName = "coupon_info") + private CouponInfo couponInfo; + + /** 商品信息 **/ + @JsonProperty("product_info") + @JacksonXmlProperty(localName = "product_info") + private ProductInfo productInfo; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/vip/ExchangeInfoMessage.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/vip/ExchangeInfoMessage.java new file mode 100644 index 0000000000..08d07b2c71 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/vip/ExchangeInfoMessage.java @@ -0,0 +1,28 @@ +package com.binarywang.wxjava.store.bean.message.vip; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.message.WxStoreMessage; + +/** + * 积分兑换消息 + * + * @author asushiye + */ + +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@JacksonXmlRootElement(localName = "xml") +public class ExchangeInfoMessage extends WxStoreMessage { + + private static final long serialVersionUID = 2926346100146724110L; + /** 积分兑换信息 */ + @JsonProperty("exchange_info") + @JacksonXmlProperty(localName = "exchange_info") + private ExchangeInfo exchangeInfo; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/vip/ProductInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/vip/ProductInfo.java new file mode 100644 index 0000000000..4bf5ead969 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/vip/ProductInfo.java @@ -0,0 +1,27 @@ +package com.binarywang.wxjava.store.bean.message.vip; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * 商品信息 + * + * @author asushiye + */ + +@Data +@JsonInclude(JsonInclude.Include.NON_NULL) +@NoArgsConstructor +public class ProductInfo implements Serializable { + + private static final long serialVersionUID = -3037180342360944232L; + /** 兑换的商品ID**/ + @JsonProperty("related_product_id") + @JacksonXmlProperty(localName = "related_product_id") + private Long relatedProductId; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/vip/UserInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/vip/UserInfo.java new file mode 100644 index 0000000000..714cabf639 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/vip/UserInfo.java @@ -0,0 +1,59 @@ +package com.binarywang.wxjava.store.bean.message.vip; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * 用户信息 + * + * @author asushiye + */ + +@Data +@JsonInclude(JsonInclude.Include.NON_NULL) +@NoArgsConstructor +public class UserInfo implements Serializable { + + private static final long serialVersionUID = 1239486732464880985L; + /** 入会时间 **/ + @JsonProperty("join_time") + @JacksonXmlProperty(localName = "join_time") + private Long joinTime; + + /** 注销时间 **/ + @JsonProperty("close_time") + @JacksonXmlProperty(localName = "close_time") + private Long closeTime; + + /** 手机号 **/ + @JsonProperty("phone_number") + @JacksonXmlProperty(localName = "phone_number") + private String phoneNumber; + + /** 等级 **/ + @JsonProperty("grade") + @JacksonXmlProperty(localName = "grade") + private Integer grade; + + /** 当前等级经验值 **/ + @JsonProperty("experience_value") + @JacksonXmlProperty(localName = "experience_value") + private Long experienceValue; + + /** 当前积分 **/ + @JsonProperty("score") + @JacksonXmlProperty(localName = "score") + private Long score; + + /** 本次改动积分,负数减少,正数新增 **/ + @JsonProperty("delta_score") + @JacksonXmlProperty(localName = "delta_score") + private Long deltaScore; + + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/vip/UserInfoMessage.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/vip/UserInfoMessage.java new file mode 100644 index 0000000000..de699e90e3 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/vip/UserInfoMessage.java @@ -0,0 +1,28 @@ +package com.binarywang.wxjava.store.bean.message.vip; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.message.WxStoreMessage; + +/** + * 用户信息消息 + * + * @author asushiye + */ + +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@JacksonXmlRootElement(localName = "xml") +public class UserInfoMessage extends WxStoreMessage { + + private static final long serialVersionUID = 6926608689621530622L; + /** 用户信息 */ + @JsonProperty("user_info") + @JacksonXmlProperty(localName = "user_info") + private UserInfo userInfo; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/voucher/VoucherInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/voucher/VoucherInfo.java new file mode 100644 index 0000000000..ec239d07db --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/voucher/VoucherInfo.java @@ -0,0 +1,106 @@ +package com.binarywang.wxjava.store.bean.message.voucher; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class VoucherInfo implements Serializable { + private static final long serialVersionUID = 6007964849358969438L; + + /** 券code */ + @JsonProperty("code") + @JacksonXmlProperty(localName = "code") + private String code; + + /** 劵码类型,1商户实时code 2户预存 3平台生成 */ + @JsonProperty("code_type") + @JacksonXmlProperty(localName = "code_type") + private Integer codeType; + + /** 券状态 */ + @JsonProperty("status") + @JacksonXmlProperty(localName = "status") + private Integer status; + + /** 发放时间,时间戳 */ + @JsonProperty("send_time") + @JacksonXmlProperty(localName = "send_time") + private Long sendTime; + + /** 最近更新时间,时间戳 */ + @JsonProperty("update_time") + @JacksonXmlProperty(localName = "update_time") + private Long updateTime; + + /** 核销生效时间,时间戳 */ + @JsonProperty("start_time") + @JacksonXmlProperty(localName = "start_time") + private Long startTime; + + /** 核销结束时间,时间戳 */ + @JsonProperty("end_time") + @JacksonXmlProperty(localName = "end_time") + private Long endTime; + + /** 核销时间,时间戳。次卡时不返回此字段 */ + @JsonProperty("consume_time") + @JacksonXmlProperty(localName = "consume_time") + private Long consumeTime; + + /** 退券时间,时间戳。次卡时不返回此字段 */ + @JsonProperty("refund_time") + @JacksonXmlProperty(localName = "refund_time") + private Long refundTime; + + /** 核销门店名称 */ + @JsonProperty("consume_store_name") + @JacksonXmlProperty(localName = "consume_store_name") + private String consumeStoreName; + + /** */ + @JsonProperty("voucher_type") + @JacksonXmlProperty(localName = "voucher_type") + private Integer voucherType; + + /** 券的售卖价格(分) */ + @JsonProperty("voucher_buy_amount") + @JacksonXmlProperty(localName = "voucher_buy_amount") + private Integer voucherBuyAmount; + + /** 券市场金额(分) */ + @JsonProperty("voucher_actual_amount") + @JacksonXmlProperty(localName = "voucher_actual_amount") + private Integer voucherActualAmount; + + /** 用户手机号 */ + @JsonProperty("telphone_no") + @JacksonXmlProperty(localName = "telphone_no") + private String telPhoneNo; + + /** 商品id */ + @JsonProperty("product_id") + @JacksonXmlProperty(localName = "product_id") + private String productId; + + /** 商品下的skuId */ + @JsonProperty("sku_id") + @JacksonXmlProperty(localName = "sku_id") + private String skuId; + + /** 购买券的订单id */ + @JsonProperty("order_id") + @JacksonXmlProperty(localName = "order_id") + private String orderId; + + /** 用户在商家品牌appid下的openid */ + @JsonProperty("openid") + @JacksonXmlProperty(localName = "openid") + private String openId; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/voucher/VoucherMessage.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/voucher/VoucherMessage.java new file mode 100644 index 0000000000..ab3ec97767 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/message/voucher/VoucherMessage.java @@ -0,0 +1,29 @@ +package com.binarywang.wxjava.store.bean.message.voucher; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.message.WxStoreMessage; + +/** + * 发放团购优惠成功消息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@JacksonXmlRootElement(localName = "xml") +public class VoucherMessage extends WxStoreMessage { + + private static final long serialVersionUID = 975858675917036089L; + + /** 发放团购优惠成功消息 */ + @JsonProperty("voucher_list") + @JacksonXmlProperty(localName = "voucher_list") + private List voucherInfo; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/AfterSaleDetail.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/AfterSaleDetail.java new file mode 100644 index 0000000000..c18fd921dd --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/AfterSaleDetail.java @@ -0,0 +1,27 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 售后信息详情 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class AfterSaleDetail implements Serializable { + + private static final long serialVersionUID = -3786573982841041144L; + + /** 正在售后流程的售后单数 */ + @JsonProperty("on_aftersale_order_cnt") + private Integer onAfterSaleOrderCnt; + + /** 售后单列表 */ + @JsonProperty("aftersale_order_list") + private List afterSaleOrderList; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/AfterSaleOrderInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/AfterSaleOrderInfo.java new file mode 100644 index 0000000000..f350eb62d3 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/AfterSaleOrderInfo.java @@ -0,0 +1,30 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 售后信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class AfterSaleOrderInfo implements Serializable { + + private static final long serialVersionUID = 3938545222231426455L; + + /** 售后单ID */ + @JsonProperty("aftersale_order_id") + private String afterSaleOrderId; + + public String getAfterSaleOrderId() { + return afterSaleOrderId; + } + + public void setAfterSaleOrderId(String afterSaleOrderId) { + this.afterSaleOrderId = afterSaleOrderId; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/ChangeOrderInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/ChangeOrderInfo.java new file mode 100644 index 0000000000..75a58c59e3 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/ChangeOrderInfo.java @@ -0,0 +1,31 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 订单修改信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class ChangeOrderInfo implements Serializable { + + private static final long serialVersionUID = 4932726847720452340L; + + /** 商品id */ + @JsonProperty("product_id") + private String productId; + + /** 商品sku */ + @JsonProperty("sku_id") + private String skuId; + + /** 订单中该商品修改后的总价,以分为单位 */ + @JsonProperty("change_price") + private String changePrice; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/ChangeSkuInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/ChangeSkuInfo.java new file mode 100644 index 0000000000..75cfee4369 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/ChangeSkuInfo.java @@ -0,0 +1,42 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * 更换sku信息 + */ +@Data +@NoArgsConstructor +public class ChangeSkuInfo implements Serializable { + + private static final long serialVersionUID = 8783442929429377519L; + + /** + * 发货前更换sku状态。3:等待商家处理,4:商家审核通过,5:商家拒绝,6:用户主动取消,7:超时默认拒绝 + */ + @JsonProperty("preshipment_change_sku_state") + private Integer preshipmentChangeSkuState; + + /** + * 原sku_id + */ + @JsonProperty("old_sku_id") + private String oldSkuId; + + /** + * 用户申请更换的sku_id + */ + @JsonProperty("new_sku_id") + private String newSkuId; + + /** + * 商家处理请求的最后时间,只有当前换款请求处于"等待商家处理"才有值 + */ + @JsonProperty("ddl_time_stamp") + private Integer deadlineTimeStamp; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/DecodeAddressInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/DecodeAddressInfo.java new file mode 100644 index 0000000000..0222933a16 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/DecodeAddressInfo.java @@ -0,0 +1,22 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.AddressInfo; + +/** + * 解码地址数据 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class DecodeAddressInfo extends AddressInfo { + + /** 虚拟发货订单联系方式,在发货方式为无需快递(deliver_method=1)时返回 */ + @JsonProperty("virtual_order_tel_number") + private String virtualOrderTelNumber; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/DecodeSensitiveInfoResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/DecodeSensitiveInfoResponse.java new file mode 100644 index 0000000000..0e02a31583 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/DecodeSensitiveInfoResponse.java @@ -0,0 +1,28 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 解码订单包含的敏感数据响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class DecodeSensitiveInfoResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 935829924760021624L; + + /** 收货信息 */ + @JsonProperty("address_info") + private DecodeAddressInfo addressInfo; + + /** 虚拟号信息 */ + @JsonProperty("virtual_number_info") + private VirtualNumberInfo virtualNumberInfo; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/DeliveryProductInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/DeliveryProductInfo.java new file mode 100644 index 0000000000..5a0d36b4f8 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/DeliveryProductInfo.java @@ -0,0 +1,48 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.delivery.FreightProductInfo; + +/** + * 发货物流信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class DeliveryProductInfo implements Serializable { + + private static final long serialVersionUID = -8110532854439612471L; + /** 快递单号 */ + @JsonProperty("waybill_id") + private String waybillId; + + /** 快递公司编码 */ + @JsonProperty("delivery_id") + private String deliveryId; + + /** 包裹中商品信息 */ + @JsonProperty("product_infos") + private List productInfos; + + /** 快递公司名称 */ + @JsonProperty("delivery_name") + private String deliveryName; + + /** 发货时间,秒级时间戳 */ + @JsonProperty("delivery_time") + private Long deliveryTime; + + /** 配送方式,枚举值见DeliveryType {@link com.binarywang.wxjava.store.enums.DeliveryType} */ + @JsonProperty("deliver_type") + private Integer deliverType; + + /** 发货地址 */ + @JsonProperty("delivery_address") + private OrderAddressInfo deliveryAddress; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/DeliveryUpdateParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/DeliveryUpdateParam.java new file mode 100644 index 0000000000..d826ad05a2 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/DeliveryUpdateParam.java @@ -0,0 +1,51 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.delivery.FreightProductInfo; + +/** + * 修改物流参数 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@JsonInclude(JsonInclude.Include.NON_NULL) +public class DeliveryUpdateParam implements Serializable { + + /** 订单ID */ + @JsonProperty("order_id") + private String orderId; + + /** 物流公司ID */ + @JsonProperty("delivery_list") + private List deliveryList; + + @Data + @NoArgsConstructor + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class DeliveryInfo implements Serializable { + + private static final long serialVersionUID = 1348000697768633889L; + /** 快递单号 */ + @JsonProperty("waybill_id") + private String waybillId; + + /** 快递公司编码 */ + @JsonProperty("delivery_id") + private String deliveryId; + + /** 配送方式,枚举值见DeliveryType {@link com.binarywang.wxjava.store.enums.DeliveryType} */ + @JsonProperty("deliver_type") + private Integer deliverType; + + /** 包裹中商品信息 */ + @JsonProperty("product_infos") + private List productInfos; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/DropshipInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/DropshipInfo.java new file mode 100644 index 0000000000..36bb6a7808 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/DropshipInfo.java @@ -0,0 +1,24 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * 代发相关信息 + */ +@Data +@NoArgsConstructor +public class DropshipInfo implements Serializable { + + private static final long serialVersionUID = -4562618835611282016L; + + /** + * 代发单号 + */ + @JsonProperty("ds_order_id") + private Long dsOrderId; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/FreeGiftInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/FreeGiftInfo.java new file mode 100644 index 0000000000..97ec190e40 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/FreeGiftInfo.java @@ -0,0 +1,25 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; +import java.util.List; + +/** + * 赠品信息 + */ +@Data +@NoArgsConstructor +public class FreeGiftInfo implements Serializable { + + private static final long serialVersionUID = 2024061212345678901L; + + /** + * 赠品对应的主品信息 + */ + @JsonProperty("main_product_list") + private List mainProductList; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/MainProductInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/MainProductInfo.java new file mode 100644 index 0000000000..7fcfa9540b --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/MainProductInfo.java @@ -0,0 +1,42 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * 赠品对应的主品信息 + */ +@Data +@NoArgsConstructor +public class MainProductInfo implements Serializable { + + private static final long serialVersionUID = 2024061212345678901L; + + /** + * 赠品数量 + */ + @JsonProperty("gift_cnt") + private Integer giftCnt; + + /** + * 活动id + */ + @JsonProperty("task_id") + private Integer taskId; + + /** + * 商品id + */ + @JsonProperty("product_id") + private String productId; + + /** + * 主品sku_id + */ + @JsonProperty("sku_id") + private Integer skuId; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderAddressInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderAddressInfo.java new file mode 100644 index 0000000000..88aefc4d99 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderAddressInfo.java @@ -0,0 +1,41 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.AddressInfo; + +/** + * 地址信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class OrderAddressInfo extends AddressInfo { + + private static final long serialVersionUID = 3062707865189774795L; + /** 虚拟发货订单联系方式(deliver_method=1时返回) */ + @JsonProperty("virtual_order_tel_number") + private String virtualOrderTelNumber; + + /** + * 额外的联系方式信息(虚拟号码相关),具体结构请参考TelNumberExtInfo结构体 + */ + @JsonProperty("tel_number_ext_info") + private TelNumberExtInfo telNumberExtInfo; + + /** + * 0:不使用虚拟号码,1:使用虚拟号码 + */ + @JsonProperty("use_tel_number") + private Integer useTelNumber; + + /** + * 标识当前店铺下一个唯一的用户收货地址 + */ + @JsonProperty("hash_code") + private String hashCode; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderAddressParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderAddressParam.java new file mode 100644 index 0000000000..95ba6d2fd4 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderAddressParam.java @@ -0,0 +1,32 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.AddressInfo; + +/** + * 订单地址参数 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@JsonInclude(Include.NON_NULL) +public class OrderAddressParam implements Serializable { + + private static final long serialVersionUID = 2277618297276466650L; + + /** 订单id */ + @JsonProperty("order_id") + private String orderId; + + /** 地址信息 */ + @JsonProperty("user_address") + private AddressInfo userAddress; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderAgentInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderAgentInfo.java new file mode 100644 index 0000000000..22e6c33c13 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderAgentInfo.java @@ -0,0 +1,30 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 授权账号信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class OrderAgentInfo implements Serializable { + + private static final long serialVersionUID = 6396067079343033841L; + + /** + * 授权视频号id + */ + @JsonProperty("agent_finder_id") + private String agentFinderId; + + /** + * 授权视频号昵称 + */ + @JsonProperty("agent_finder_nickname") + private String agentFinderNickname; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderCommissionInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderCommissionInfo.java new file mode 100644 index 0000000000..f0d676f079 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderCommissionInfo.java @@ -0,0 +1,49 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 分佣信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class OrderCommissionInfo implements Serializable { + + private static final long serialVersionUID = -3046852309683467272L; + /** 商品skuid */ + @JsonProperty("sku_id") + private String skuId; + + /** 分账方昵称 */ + @JsonProperty("nickname") + private String nickname; + + /** 分账方类型,0:达人,1:团长 */ + @JsonProperty("type") + private Integer type; + + /** 分账状态, 1:未结算,2:已结算 */ + @JsonProperty("status") + private Integer status; + + /** 分账金额 */ + @JsonProperty("amount") + private Integer amount; + + /** 达人视频号id */ + @JsonProperty("finder_id") + private String finderId; + + /** 达人openfinderid */ + @JsonProperty("openfinderid") + private String openFinderId; + + /** 新带货平台 id */ + @JsonProperty("talent_id") + private String talentId; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderCompensationDeliveryParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderCompensationDeliveryParam.java new file mode 100644 index 0000000000..56711fd1f0 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderCompensationDeliveryParam.java @@ -0,0 +1,34 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.delivery.DeliveryInfo; + +/** + * 订单补发货 请求参数 + * + * @author GitHub Copilot + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@JsonInclude(Include.NON_NULL) +public class OrderCompensationDeliveryParam implements Serializable { + + private static final long serialVersionUID = 1L; + + /** 订单ID */ + @JsonProperty("order_id") + private String orderId; + + /** 物流信息列表 */ + @JsonProperty("delivery_list") + private List deliveryList; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderCouponInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderCouponInfo.java new file mode 100644 index 0000000000..424903fdc2 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderCouponInfo.java @@ -0,0 +1,41 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 卡券信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class OrderCouponInfo implements Serializable { + + private static final long serialVersionUID = -2033350505767196339L; + /** 用户优惠券id */ + @JsonProperty("user_coupon_id") + private String userCouponId; + + /** + * 优惠券类型 + * 1 商家优惠 + * 2 达人优惠 + * 3 平台优惠 + * 4 国家补贴 + * 5 地方补贴 + */ + @JsonProperty("coupon_type") + private Integer couponType; + + /** 优惠金额,单位为分,该张优惠券、抵扣该商品的金额 */ + @JsonProperty("discounted_price") + private Integer discountedPrice; + + /** 优惠券id */ + @JsonProperty("coupon_id") + private String couponId; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderCustomInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderCustomInfo.java new file mode 100644 index 0000000000..de884315e8 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderCustomInfo.java @@ -0,0 +1,33 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 商品定制信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class OrderCustomInfo implements Serializable { + private static final long serialVersionUID = 6681266835402157651L; + + /** 定制图片,custom_type=2时返回 */ + @JsonProperty("custom_img_url") + private String customImgUrl; + + /** 定制文字,custom_type=1时返回 */ + @JsonProperty("custom_word") + private String customWord; + + /** 定制类型,枚举值请参考CustomType枚举 */ + @JsonProperty("custom_type") + private Integer customType; + + /** 定制预览图片,开启了定制预览时返回 */ + @JsonProperty("custom_preview_img_url") + private String customPreviewImgUrl; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderDeliveryInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderDeliveryInfo.java new file mode 100644 index 0000000000..347c4f1b9a --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderDeliveryInfo.java @@ -0,0 +1,59 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 物流信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class OrderDeliveryInfo implements Serializable { + + private static final long serialVersionUID = -5348922760017557397L; + /** 地址信息 */ + @JsonProperty("address_info") + private OrderAddressInfo addressInfo; + + /** 发货物流信息 */ + @JsonProperty("delivery_product_info") + private List deliveryProductInfos; + + /** 发货完成时间,秒级时间戳 */ + @JsonProperty("ship_done_time") + private Long shipDoneTime; + + /** 订单发货方式,0普通物流 1虚拟发货,由商品的同名字段决定 */ + @JsonProperty("deliver_method") + private Integer deliverMethod; + + /** 用户下单后申请修改收货地址,商家同意后该字段会覆盖订单地址信息 */ + @JsonProperty("address_under_review") + private OrderAddressInfo addressUnderReview; + + /** 修改地址申请时间,秒级时间戳 */ + @JsonProperty("address_apply_time") + private Long addressApplyTime; + + /** 电子面单代发时的订单密文 */ + @JsonProperty("ewaybill_order_code") + private String ewaybillOrderCode; + + /** 订单质检类型 2生鲜类质检 1珠宝玉石类质检 0不需要;不传递本字段表示不需要 */ + @JsonProperty("quality_inspect_type") + private String qualityInspectType; + + /** 质检信息 */ + @JsonProperty("quality_inspect_info") + private QualityInsepctInfo qualityInspectInfo; + + /** 虚拟商品充值账户信息 */ + @JsonProperty("recharge_info") + private RechargeInfo rechargeInfo; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderDetailInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderDetailInfo.java new file mode 100644 index 0000000000..a9ccc8540b --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderDetailInfo.java @@ -0,0 +1,78 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 订单详细数据 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class OrderDetailInfo implements Serializable { + + private static final long serialVersionUID = 3916307299998005676L; + /** 商品列表 */ + @JsonProperty("product_infos") + private List productInfos; + + /** 支付信息 */ + @JsonProperty("pay_info") + private OrderPayInfo payInfo; + + /** 价格信息 */ + @JsonProperty("price_info") + private OrderPriceInfo priceInfo; + + /** 配送信息 */ + @JsonProperty("delivery_info") + private OrderDeliveryInfo deliveryInfo; + + /** 优惠券信息 */ + @JsonProperty("coupon_info") + private OrderCouponInfo couponInfo; + + /** 额外信息 */ + @JsonProperty("ext_info") + private OrderExtInfo extInfo; + + /** 分佣信息 */ + @JsonProperty("commission_infos") + private List commissionInfos; + + /** 分享信息 */ + @JsonProperty("sharer_info") + private OrderSharerInfo sharerInfo; + + /** 结算信息 */ + @JsonProperty("settle_info") + private OrderSettleInfo settleInfo; + + /** 分享员信息 */ + @JsonProperty("sku_sharer_infos") + private List skuSharerInfos; + + /** 授权账号信息 */ + @JsonProperty("agent_info") + private OrderAgentInfo agentInfo; + + /** 订单来源信息 */ + @JsonProperty("source_infos") + private List sourceInfos; + + /** 订单退款信息 */ + @JsonProperty("refund_info") + private OrderSourceInfo refundInfo; + + /** 订单代写商品信息 */ + @JsonProperty("greeting_card_info") + private OrderGreetingCardInfo greetingCardInfo; + + /** 商品定制信息 */ + @JsonProperty("custom_info") + private OrderCustomInfo customInfo; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderExtInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderExtInfo.java new file mode 100644 index 0000000000..2f84ba2af6 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderExtInfo.java @@ -0,0 +1,54 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * 订单备注信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class OrderExtInfo implements Serializable { + + private static final long serialVersionUID = 4568097877621455429L; + /** + * 用户备注 + */ + @JsonProperty("customer_notes") + private String customerNotes; + + /** + * 商家备注 + */ + @JsonProperty("merchant_notes") + private String merchantNotes; + + /** + * 确认收货时间,包括用户主动确认收货和超时自动确认收货 + */ + @JsonProperty("confirm_receipt_time") + private Long confirmReceiptTime; + + /** + * 视频号id + */ + @JsonProperty("finder_id") + private String finderId; + + /** + * 直播id + */ + @JsonProperty("live_id") + private String liveId; + + /** + * 下单场景,枚举值见 {@link com.binarywang.wxjava.store.enums.OrderScene} + */ + @JsonProperty("order_scene") + private Integer orderScene; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderGreetingCardInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderGreetingCardInfo.java new file mode 100644 index 0000000000..c7798834da --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderGreetingCardInfo.java @@ -0,0 +1,29 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 订单商品贺卡信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class OrderGreetingCardInfo implements Serializable { + private static final long serialVersionUID = -6391443179945240242L; + + /** 贺卡落款,用户选填 */ + @JsonProperty("giver_name") + private String giverName; + + /** 贺卡称谓,用户选填 */ + @JsonProperty("receiver_name") + private String receiverName; + + /** 贺卡内容,用户必填 */ + @JsonProperty("greeting_message") + private String greetingMessage; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderIdParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderIdParam.java new file mode 100644 index 0000000000..bd435df4d2 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderIdParam.java @@ -0,0 +1,27 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 订单id参数 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@JsonInclude(Include.NON_NULL) +public class OrderIdParam implements Serializable { + + private static final long serialVersionUID = -8616582197963359789L; + /** 订单ID */ + @JsonProperty("order_id") + private String orderId; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderInfo.java new file mode 100644 index 0000000000..bcc147b665 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderInfo.java @@ -0,0 +1,69 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 微信小店订单 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class OrderInfo implements Serializable { + + private static final long serialVersionUID = -4562618835611282016L; + /** 订单号 */ + @JsonProperty("order_id") + protected String orderId; + + /** 订单状态,枚举值见 {@link com.binarywang.wxjava.store.enums.WxOrderStatus} */ + @JsonProperty("status") + protected Integer status; + + /** 买家身份标识 */ + @JsonProperty("openid") + protected String openid; + + /** union id */ + @JsonProperty("unionid") + protected String unionid; + + /** 订单详细数据信息 */ + @JsonProperty("order_detail") + protected OrderDetailInfo orderDetail; + + /** 售后信息 */ + @JsonProperty("aftersale_detail") + protected AfterSaleDetail afterSaleDetail; + + /** 是否为礼物订单 */ + @JsonProperty("is_present") + private Boolean present; + + /** 礼物订单ID */ + @JsonProperty("present_order_id_str") + private String presentOrderId; + + /** 礼物订单留言 */ + @JsonProperty("present_note") + private String presentNote; + + /** 礼物订单赠送者openid */ + @JsonProperty("present_giver_openid") + private String presentGiverOpenid; + + /** 礼物订单赠送者unionid */ + @JsonProperty("present_giver_unionid") + private String presentGiverUnionid; + + /** 创建时间 秒级时间戳 */ + @JsonProperty("create_time") + protected Integer createTime; + + /** 更新时间 秒级时间戳 */ + @JsonProperty("update_time") + protected Integer updateTime; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderInfoParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderInfoParam.java new file mode 100644 index 0000000000..7f1d7d5cc0 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderInfoParam.java @@ -0,0 +1,31 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * 获取订单详情参数 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@JsonInclude(JsonInclude.Include.NON_NULL) +public class OrderInfoParam implements Serializable { + + private static final long serialVersionUID = 42L; + + /** 订单ID */ + @JsonProperty("order_id") + private String orderId; + + /** + * 用于商家提前测试订单脱敏效果,如果传true,即对订单进行脱敏,后期会默认对所有订单脱敏 + */ + @JsonProperty("encode_sensitive_info") + private Boolean encodeSensitiveInfo; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderInfoResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderInfoResponse.java new file mode 100644 index 0000000000..cc2527e28c --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderInfoResponse.java @@ -0,0 +1,23 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 订单信息响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class OrderInfoResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 935829924760021624L; + /** 订单信息 */ + @JsonProperty("order") + private OrderInfo order; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderListParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderListParam.java new file mode 100644 index 0000000000..03c3b903f5 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderListParam.java @@ -0,0 +1,39 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.StreamPageParam; +import com.binarywang.wxjava.store.bean.base.TimeRange; + +/** + * 获取订单列表参数 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@JsonInclude(Include.NON_NULL) +public class OrderListParam extends StreamPageParam { + + private static final long serialVersionUID = 3780097459964746890L; + /** 订单创建时间范围 */ + @JsonProperty("create_time_range") + private TimeRange createTimeRange; + + /** 订单更新时间范围 */ + @JsonProperty("update_time_range") + private TimeRange updateTimeRange; + + /** 订单状态,枚举值见 {@link com.binarywang.wxjava.store.enums.WxOrderStatus} */ + @JsonProperty("status") + private Integer status; + + /** 买家身份标识 */ + @JsonProperty("openid") + private Integer openid; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderListResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderListResponse.java new file mode 100644 index 0000000000..c8204ed579 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderListResponse.java @@ -0,0 +1,32 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 订单列表 响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class OrderListResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = -6198624448684807852L; + /** 订单id列表 */ + @JsonProperty("order_id_list") + private List ids; + + /** 分页参数,下一页请求回传 */ + @JsonProperty("next_key") + private String nextKey; + + /** 是否还有下一页,true:有下一页;false:已经结束,没有下一页。 */ + @JsonProperty("has_more") + private Boolean hasMore; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderPayInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderPayInfo.java new file mode 100644 index 0000000000..4a3efd4bf2 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderPayInfo.java @@ -0,0 +1,30 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 支付信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class OrderPayInfo implements Serializable { + + private static final long serialVersionUID = -5085386252699113948L; + /** 预支付id */ + @JsonProperty("payment_method") + private Integer paymentMethod; + + /** 支付时间,秒级时间戳 */ + @JsonProperty("pay_time") + private Long payTime; + + /** 支付单号 */ + @JsonProperty("transaction_id") + private String transactionId; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderPriceInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderPriceInfo.java new file mode 100644 index 0000000000..58e05b1a32 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderPriceInfo.java @@ -0,0 +1,140 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * 商店订单价格信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class OrderPriceInfo implements Serializable { + private static final long serialVersionUID = 5216506688949493432L; + + /** + * 商品总价,单位为分 + */ + @JsonProperty("product_price") + private Integer productPrice; + + /** + * 订单金额,单位为分 + */ + @JsonProperty("order_price") + private Integer orderPrice; + + /** + * 运费,单位为分 + */ + @JsonProperty("freight") + private Integer freight; + + /** + * 优惠金额,单位为分 + */ + @JsonProperty("discounted_price") + private Integer discountedPrice; + + /** + * 是否有优惠 + */ + @JsonProperty("is_discounted") + private Boolean isDiscounted; + + /** + * 订单原始价格,单位为分 + */ + @JsonProperty("original_order_price") + private Integer originalOrderPrice; + + /** + * 商品预估价格,单位为分 + */ + @JsonProperty("estimate_product_price") + private Integer estimateProductPrice; + + /** + * 改价后降低金额,单位为分 + */ + @JsonProperty("change_down_price") + private Integer changeDownPrice; + + /** + * 改价后运费,单位为分 + */ + @JsonProperty("change_freight") + private Integer changeFreight; + + /** + * 是否修改运费 + */ + @JsonProperty("is_change_freight") + private Boolean changeFreighted; + + /** + * 是否使用了会员积分抵扣 + */ + @JsonProperty("use_deduction") + private Boolean useDeduction; + + /** + * 会员积分抵扣金额,单位为分 + */ + @JsonProperty("deduction_price") + private Integer deductionPrice; + + /** + * 商家实收金额,单位为分 + * merchant_receieve_price=original_order_price-discounted_price-deduction_price-change_down_price + */ + @JsonProperty("merchant_receieve_price") + private Integer merchantReceivePrice; + + /** + * 商家优惠金额,单位为分,含义同discounted_price,必填 + */ + @JsonProperty("merchant_discounted_price") + private Integer merchantDiscountedPrice; + + /** + * 达人优惠金额,单位为分 + */ + @JsonProperty("finder_discounted_price") + private Integer finderDiscountedPrice; + + /** + * 订单维度会员权益优惠金额 + */ + @JsonProperty("vip_discounted_price") + private Integer vipDiscountedPrice; + + /** + * 订单维度一起买优惠金额,单位为分 + */ + @JsonProperty("bulkbuy_discounted_price") + private Integer bulkbuyDiscountedPrice; + + /** + * 订单维度国补优惠金额 + */ + @JsonProperty("national_subsidy_discounted_price") + private Integer nationalSubsidyDiscountedPrice; + + /** + * 订单维度平台券优惠金额,单位为分 + */ + @JsonProperty("cash_coupon_discounted_price") + private Integer cashCouponDiscountedPrice; + + /** + * 订单维度地方补贴优惠金额(商家出资),单位为分 + */ + @JsonProperty("national_subsidy_merchant_discounted_price") + private Integer nationalSubsidyMerchantDiscountedPrice; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderPriceParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderPriceParam.java new file mode 100644 index 0000000000..fc6574fe4e --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderPriceParam.java @@ -0,0 +1,46 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; + +/** + * 订单价格参数 + * + * @author Zeyes + */ +@Data +@JsonInclude(Include.NON_NULL) +public class OrderPriceParam implements Serializable { + + private static final long serialVersionUID = -7925819981481556218L; + /** 订单id */ + @JsonProperty("order_id") + private String orderId; + + /** 是否修改运费 */ + @JsonProperty("change_express") + private Boolean changeExpress; + + /** 修改后的运费价格(change_express=true时必填),以分为单位 */ + @JsonProperty("express_fee") + private Integer expressFee; + + /** 改价列表 */ + @JsonProperty("change_order_infos") + private List changeOrderInfos; + + public OrderPriceParam() { + } + + public OrderPriceParam(String orderId, Integer expressFee, List changeOrderInfos) { + this.orderId = orderId; + // expressFee不为空时,表示修改运费 + this.changeExpress = (expressFee != null); + this.expressFee = expressFee; + this.changeOrderInfos = changeOrderInfos; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderProductExtraService.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderProductExtraService.java new file mode 100644 index 0000000000..e588eff9fb --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderProductExtraService.java @@ -0,0 +1,28 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * 商品额外服务信息 + * + * @author 北鹤M + */ +@Data +@NoArgsConstructor +public class OrderProductExtraService implements Serializable { + + private static final long serialVersionUID = -8752053507170277156L; + + /** 7天无理由:0:不支持,1:支持 */ + @JsonProperty("seven_day_return") + private Integer sevenDayReturn; + + /** 商家运费险:0:不支持,1:支持 */ + @JsonProperty("freight_insurance") + private Integer freightInsurance; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderProductInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderProductInfo.java new file mode 100644 index 0000000000..3ebab0c921 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderProductInfo.java @@ -0,0 +1,256 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import java.io.Serializable; +import java.util.List; + +import lombok.Data; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.AttrInfo; + +/** + * 订单商品信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class OrderProductInfo implements Serializable { + + private static final long serialVersionUID = -2193536732955185928L; + /** + * 商品spu id + */ + @JsonProperty("product_id") + private String productId; + + /** + * sku_id + */ + @JsonProperty("sku_id") + private String skuId; + + /** + * sku小图 + */ + @JsonProperty("thumb_img") + private String thumbImg; + + /** + * sku数量 + */ + @JsonProperty("sku_cnt") + private Integer skuCnt; + + /** + * 售卖价格(单位:分) + */ + @JsonProperty("sale_price") + private Integer salePrice; + + /** + * 商品标题 + */ + @JsonProperty("title") + private String title; + + /** + * 正在售后/退款流程中的 sku 数量 + */ + @JsonProperty("on_aftersale_sku_cnt") + private Integer onAfterSaleSkuCnt; + + /** + * 完成售后/退款的 sku 数量 + */ + @JsonProperty("finish_aftersale_sku_cnt") + private Integer finishAfterSaleSkuCnt; + + /** + * 商品编码 + */ + @JsonProperty("sku_code") + private String skuCode; + + /** + * 市场价格(单位:分) + */ + @JsonProperty("market_price") + private Integer marketPrice; + + /** + * sku属性 + */ + @JsonProperty("sku_attrs") + private List skuAttrs; + + /** + * sku实付价格 + */ + @JsonProperty("real_price") + private Integer realPrice; + + /** + * 商品外部spu id + */ + @JsonProperty("out_product_id") + private String outProductId; + + /** + * 商品外部sku id + */ + @JsonProperty("out_sku_id") + private String outSkuId; + + /** + * 是否有优惠金额,非必填,默认为false + */ + @JsonProperty("is_discounted") + private Boolean isDiscounted; + + /** + * 优惠后 sku 价格,非必填,is_discounted为 true 时有值 + */ + @JsonProperty("estimate_price") + private Integer estimatePrice; + + /** + * 是否修改过价格,非必填,默认为false + */ + @JsonProperty("is_change_price") + private Boolean changePriced; + + /** + * 改价后 sku 价格,非必填,is_change_price为 true 时有值 + */ + @JsonProperty("change_price") + private Integer changePrice; + + /** + * 区域库存id + */ + @JsonProperty("out_warehouse_id") + private String outWarehouseId; + + /** + * 商品发货信息 + */ + @JsonProperty("sku_deliver_info") + private OrderSkuDeliverInfo skuDeliverInfo; + + /** + * 商品额外服务信息 + */ + @JsonProperty("extra_service") + private OrderProductExtraService extraService; + + /** + * 是否使用了会员积分抵扣 + */ + @JsonProperty("use_deduction") + private Boolean useDeduction; + + /** + * 会员积分抵扣金额,单位为分 + */ + @JsonProperty("deduction_price") + private Integer deductionPrice; + + /** + * 商品优惠券信息,具体结构请参考OrderProductCouponInfo结构体,逐步替换 order.order_detail.coupon_info + */ + @JsonProperty("order_product_coupon_info_list") + private List orderProductCouponInfoList; + + /** + * 商品发货时效,超时此时间未发货即为发货超时 + */ + @JsonProperty("delivery_deadline") + private Long deliveryDeadline; + + /** + * 商家优惠金额,单位为分 + */ + @JsonProperty("merchant_discounted_price") + private Integer merchantDiscountedPrice; + + /** + * 达人优惠金额,单位为分 + */ + @JsonProperty("finder_discounted_price") + private Integer finderDiscountedPrice; + + /** + * 是否赠品,非必填,赠品商品返回,1:是赠品 + */ + @JsonProperty("is_free_gift") + private Boolean freeGift; + + /** + * 订单内商品维度会员权益优惠金额,单位为分 + */ + @JsonProperty("vip_discounted_price") + private Integer vipDiscountedPrice; + + /** + * 商品常量编号,订单内商品唯一标识,下单后不会发生变化 + */ + @JsonProperty("product_unique_id") + private String productUniqueId; + + /** + * 更换sku信息 + */ + @JsonProperty("change_sku_info") + private ChangeSkuInfo changeSkuInfo; + + /** + * 赠品信息 + */ + @JsonProperty("free_gift_info") + private FreeGiftInfo freeGiftInfo; + + /** + * 订单内商品维度一起买优惠金额,单位为分 + */ + @JsonProperty("bulkbuy_discounted_price") + private Integer bulkbuyDiscountedPrice; + + /** + * 订单内商品维度国补优惠金额,单位为分 + */ + @JsonProperty("national_subsidy_discounted_price") + private Integer nationalSubsidyDiscountedPrice; + + /** + * 代发相关信息 + */ + @JsonProperty("dropship_info") + private DropshipInfo dropshipInfo; + + /** + * 是否闪购商品 + */ + @JsonProperty("is_flash_sale") + private Boolean flashSale; + + /** + * 订单内商品维度地方补贴优惠金额(商家出资),单位为分 + */ + @JsonProperty("national_subsidy_merchant_discounted_price") + private Integer nationalSubsidyMerchantDiscountedPrice; + + /** + * 订单内商品维度活动商家补贴,即参与平台补贴活动时商家通过活动报名价优惠的部分,单位为分 + */ + @JsonProperty("platform_activity_merchant_discounted_price") + private Integer platformActivityMerchantDiscountedPrice; + + /** + * 订单内商品维度平台券优惠金额,单位为分 + */ + @JsonProperty("cash_coupon_discounted_price") + private Integer cashCouponDiscountedPrice; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderRefundInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderRefundInfo.java new file mode 100644 index 0000000000..eda4419ad8 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderRefundInfo.java @@ -0,0 +1,21 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 订单退款信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class OrderRefundInfo implements Serializable { + private static final long serialVersionUID = -7257910073388645919L; + + /** 退还运费金额,礼物订单(is_present=true)可能存在 */ + @JsonProperty("refund_freight") + private Integer refundFreight; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderRemarkParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderRemarkParam.java new file mode 100644 index 0000000000..43a7796ae8 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderRemarkParam.java @@ -0,0 +1,28 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 订单备注 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class OrderRemarkParam implements Serializable { + + private static final long serialVersionUID = 2285714780419948468L; + /** 订单id */ + @JsonProperty("order_id") + private String orderId; + + /** 备注内容 */ + @JsonProperty("merchant_notes") + private String merchantNotes; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderSearchCondition.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderSearchCondition.java new file mode 100644 index 0000000000..5d42ba3883 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderSearchCondition.java @@ -0,0 +1,62 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 订单 搜索条件 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@JsonInclude(Include.NON_EMPTY) +public class OrderSearchCondition implements Serializable { + + private static final long serialVersionUID = 5492584333971883140L; + /** 商品标题关键词 */ + @JsonProperty("title") + private String title; + + /** 商品编码 */ + @JsonProperty("sku_code") + private String skuCode; + + /** 收件人 */ + @JsonProperty("user_name") + private String userName; + + /** + * 收件人电话 + * @deprecated 当前字段已经废弃,请勿使用,如果原本填手机后四位,可正常使用,否则接口报错 + */ + @JsonProperty("tel_number") + @Deprecated + private String telNumber; + + /** + * 收件人电话后四位 + */ + @JsonProperty("tel_number_last4") + private String telNumberLast4; + + /** 选填,只搜一个订单时使用 */ + @JsonProperty("order_id") + private String orderId; + + /** 商家备注 */ + @JsonProperty("merchant_notes") + private String merchantNotes; + + /** 买家备注 */ + @JsonProperty("customer_notes") + private String customerNotes; + + /** 申请修改地址审核中 */ + @JsonProperty("address_under_review") + private Boolean addressUnderReview; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderSearchParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderSearchParam.java new file mode 100644 index 0000000000..6f392ed8ca --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderSearchParam.java @@ -0,0 +1,30 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.StreamPageParam; + +/** + * @author Zeyes + */ +@Data +@NoArgsConstructor +@JsonInclude(Include.NON_EMPTY) +public class OrderSearchParam extends StreamPageParam { + + private static final long serialVersionUID = 5737520097455135218L; + /** 商品标题关键词 */ + @JsonProperty("search_condition") + private OrderSearchCondition searchCondition; + + /** 不填该参数:全部订单 0:没有正在售后的订单, 1:正在售后单数量大于等于1的订单 */ + @JsonProperty("on_aftersale_order_exist") + private Integer onAfterSaleOrderExist; + + /** 订单状态 {@link com.binarywang.wxjava.store.enums.WxOrderStatus} */ + @JsonProperty("status") + private Integer status; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderSettleInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderSettleInfo.java new file mode 100644 index 0000000000..4d09630284 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderSettleInfo.java @@ -0,0 +1,49 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import java.io.Serializable; + +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 结算信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class OrderSettleInfo implements Serializable { + + private static final long serialVersionUID = 2140632631448343656L; + /** + * 预计技术服务费(单位为分) + */ + @JsonProperty("predict_commission_fee") + private Integer predictCommissionFee; + + /** + * 实际技术服务费(单位为分)(未结算时本字段为空) + */ + @JsonProperty("commission_fee") + private Integer commissionFee; + + /** + * 预计人气卡返佣金额,单位为分(未发起结算时本字段为空) + */ + @JsonProperty("predict_wecoin_commission") + private Integer predictWecoinCommission; + + /** + * 实际人气卡返佣金额,单位为分(未结算时本字段为空) + */ + @JsonProperty("wecoin_commission") + private Integer wecoinCommission; + + /** + * 商家结算时间 + */ + @JsonProperty("settle_time") + private Long settleTime; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderSharerInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderSharerInfo.java new file mode 100644 index 0000000000..3295b771ca --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderSharerInfo.java @@ -0,0 +1,49 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import java.io.Serializable; + +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 分享信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class OrderSharerInfo implements Serializable { + + private static final long serialVersionUID = 7183259072254660971L; + /** + * 分享员openid + */ + @JsonProperty("sharer_openid") + private String sharerOpenid; + + /** + * 分享员unionid + */ + @JsonProperty("sharer_unionid") + private String sharerUnionid; + + /** + * 分享员类型,0:普通分享员,1:店铺分享员 + */ + @JsonProperty("sharer_type") + private Integer sharerType; + + /** + * 分享场景 {@link com.binarywang.wxjava.store.enums.ShareScene} + */ + @JsonProperty("share_scene") + private Integer shareScene; + + /** + * 分享员数据是否已经解析完成【1:解析完成 0:解析中】 + */ + @JsonProperty("handling_progress") + private Integer handlingProgress; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderSkuDeliverInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderSkuDeliverInfo.java new file mode 100644 index 0000000000..68df7c8874 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderSkuDeliverInfo.java @@ -0,0 +1,28 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * 商品发货信息 + * + * @author 北鹤M + */ +@Data +@NoArgsConstructor +public class OrderSkuDeliverInfo implements Serializable { + + private static final long serialVersionUID = 4075897806362929800L; + + /** 商品发货类型:0:现货,1:全款预售 */ + @JsonProperty("stock_type") + private Integer stockType; + + /** 预计发货时间(stock_type=1时返回该字段) */ + @JsonProperty("predict_delivery_time") + private String predictDeliveryTime; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderSkuShareInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderSkuShareInfo.java new file mode 100644 index 0000000000..8310906a54 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderSkuShareInfo.java @@ -0,0 +1,44 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * Sku层分享信息 + * + * @author 北鹤M + */ +@Data +@NoArgsConstructor +public class OrderSkuShareInfo implements Serializable { + + private static final long serialVersionUID = 705312408112124476L; + + /** 分享员openid */ + @JsonProperty("sharer_openid") + private String sharerOpenid; + + /** 分享员unionid */ + @JsonProperty("sharer_unionid") + private String sharerUnionid; + + /** 分享员类型,0:普通分享员,1:店铺分享员 */ + @JsonProperty("sharer_type") + private Integer sharerType; + + /** 分享场景 {@link com.binarywang.wxjava.store.enums.ShareScene} */ + @JsonProperty("share_scene") + private Integer shareScene; + + /** 商品skuid */ + @JsonProperty("sku_id") + private String skuId; + + /** 是否来自企微分享 */ + @JsonProperty("from_wecom") + private Boolean fromWecom; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderSourceInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderSourceInfo.java new file mode 100644 index 0000000000..49f57b86b7 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/OrderSourceInfo.java @@ -0,0 +1,66 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 订单带货来源信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class OrderSourceInfo implements Serializable { + + private static final long serialVersionUID = 3131907659419977296L; + + /** + * sku_id + */ + @JsonProperty("sku_id") + private String skuId; + + /** + * 带货账号类型,1:视频号,2:公众号,3:小程序,4:企业微信,5:带货达人,6:服务号,1000:带货机构 + */ + @JsonProperty("account_type") + private Integer accountType; + + /** + * 带货账号id,取决于带货账号类型(分别为视频号id、公众号appid、小程序appid、企业微信id、带货达人appid、服务号appid、带货机构id) + */ + @JsonProperty("account_id") + private String accountId; + + /** + * 账号关联类型,0:关联账号,1:合作账号,2:授权号,100:达人带货,101:带货机构推广 + */ + @JsonProperty("sale_channel") + private Integer saleStore; + + /** + * 带货账号昵称 + */ + @JsonProperty("account_nickname") + private String accountNickname; + + /** + * 带货内容类型,1:企微成员转发 + */ + @JsonProperty("content_type") + private String contentType; + + /** + * 带货内容id,取决于带货内容类型(企微成员user_id) + */ + @JsonProperty("content_id") + private String contentId; + + /** + * 自营推客推广的带货机构id + */ + @JsonProperty("promoter_head_supplier_id") + private String promoterHeadSupplierId; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/PreShipmentChangeSkuRejectParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/PreShipmentChangeSkuRejectParam.java new file mode 100644 index 0000000000..c2749ec151 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/PreShipmentChangeSkuRejectParam.java @@ -0,0 +1,32 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 拒绝待发货前更换SKU请求 请求参数 + * + * @author GitHub Copilot + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@JsonInclude(Include.NON_NULL) +public class PreShipmentChangeSkuRejectParam implements Serializable { + + private static final long serialVersionUID = 1L; + + /** 订单ID */ + @JsonProperty("order_id") + private String orderId; + + /** 拒绝原因 */ + @JsonProperty("reject_reason") + private String rejectReason; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/PreShipmentChangeSkuResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/PreShipmentChangeSkuResponse.java new file mode 100644 index 0000000000..8612560c0d --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/PreShipmentChangeSkuResponse.java @@ -0,0 +1,25 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 获取待发货前更换SKU待处理请求 响应 + * + * @author GitHub Copilot + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class PreShipmentChangeSkuResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 1L; + + /** 更换SKU信息 */ + @JsonProperty("change_sku_info") + private ChangeSkuInfo changeSkuInfo; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/PresentNoteAddParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/PresentNoteAddParam.java new file mode 100644 index 0000000000..757c6386b9 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/PresentNoteAddParam.java @@ -0,0 +1,32 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 礼物订单新增备注信息 请求参数 + * + * @author GitHub Copilot + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@JsonInclude(Include.NON_NULL) +public class PresentNoteAddParam implements Serializable { + + private static final long serialVersionUID = 1L; + + /** 礼物订单ID */ + @JsonProperty("order_id") + private String orderId; + + /** 备注内容 */ + @JsonProperty("note") + private String note; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/PresentSubOrderResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/PresentSubOrderResponse.java new file mode 100644 index 0000000000..51b8d07c34 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/PresentSubOrderResponse.java @@ -0,0 +1,26 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 获取礼物单的子单列表 响应 + * + * @author GitHub Copilot + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class PresentSubOrderResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 1L; + + /** 子单列表 */ + @JsonProperty("sub_order_ids") + private List subOrderIds; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/PrivateNumberAddPhoneParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/PrivateNumberAddPhoneParam.java new file mode 100644 index 0000000000..7eb5173e41 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/PrivateNumberAddPhoneParam.java @@ -0,0 +1,28 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 添加待认证手机号 请求参数 + * + * @author GitHub Copilot + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@JsonInclude(Include.NON_NULL) +public class PrivateNumberAddPhoneParam implements Serializable { + + private static final long serialVersionUID = 1L; + + /** 手机号 */ + @JsonProperty("phone") + private String phone; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/PrivateNumberGetPhoneResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/PrivateNumberGetPhoneResponse.java new file mode 100644 index 0000000000..0912623a8f --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/PrivateNumberGetPhoneResponse.java @@ -0,0 +1,26 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 获取小店手机号认证状态 响应 + * + * @author GitHub Copilot + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class PrivateNumberGetPhoneResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 1L; + + /** 手机号认证信息列表 */ + @JsonProperty("phone_list") + private List phoneList; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/PrivateNumberPhoneInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/PrivateNumberPhoneInfo.java new file mode 100644 index 0000000000..a01d14b690 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/PrivateNumberPhoneInfo.java @@ -0,0 +1,29 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 手机号认证信息 + * + * @author GitHub Copilot + */ +@Data +@NoArgsConstructor +public class PrivateNumberPhoneInfo implements Serializable { + + private static final long serialVersionUID = 1L; + + /** 手机号 */ + @JsonProperty("phone") + private String phone; + + /** + * 认证状态:1-待认证,2-认证成功,3-认证失败 + */ + @JsonProperty("auth_status") + private Integer authStatus; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/PrivateNumberSendVerifyCodeParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/PrivateNumberSendVerifyCodeParam.java new file mode 100644 index 0000000000..2188420c55 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/PrivateNumberSendVerifyCodeParam.java @@ -0,0 +1,28 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 获取短信验证码 请求参数 + * + * @author GitHub Copilot + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@JsonInclude(Include.NON_NULL) +public class PrivateNumberSendVerifyCodeParam implements Serializable { + + private static final long serialVersionUID = 1L; + + /** 手机号 */ + @JsonProperty("phone") + private String phone; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/QualityInsepctInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/QualityInsepctInfo.java new file mode 100644 index 0000000000..537f224fc2 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/QualityInsepctInfo.java @@ -0,0 +1,22 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 质检信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class QualityInsepctInfo implements Serializable { + + private static final long serialVersionUID = 8109819414306253475L; + + /** 质检状态 */ + @JsonProperty("inspect_status") + private Integer inspectStatus; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/RealNumberViewAuditResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/RealNumberViewAuditResponse.java new file mode 100644 index 0000000000..137cf68375 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/RealNumberViewAuditResponse.java @@ -0,0 +1,31 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 查看订单真实号审核状态 响应 + * + * @author GitHub Copilot + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class RealNumberViewAuditResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 1L; + + /** + * 审核状态:1-审核中,2-审核通过,3-审核拒绝 + */ + @JsonProperty("audit_status") + private Integer auditStatus; + + /** 真实号码(审核通过后返回)*/ + @JsonProperty("real_number") + private String realNumber; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/RechargeInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/RechargeInfo.java new file mode 100644 index 0000000000..a4b9d4181a --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/RechargeInfo.java @@ -0,0 +1,28 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 虚拟商品充值账户信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class RechargeInfo implements Serializable { + + /** 虚拟商品充值账号,当account_type=qq或phone_number或mail的时候返回 */ + @JsonProperty("account_no") + private String accountNo; + + /** 账号充值类型,可选项: weixin(微信号),qq(qq),phone_number(电话号码),mail(邮箱) */ + @JsonProperty("account_type") + private String accountType; + + /** 当account_type="weixin"的时候返回 */ + @JsonProperty("wx_openid") + private String wxOpenId; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/TelNumberExtInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/TelNumberExtInfo.java new file mode 100644 index 0000000000..8d20907f77 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/TelNumberExtInfo.java @@ -0,0 +1,37 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +/** + * 联系方式信息 + * + * @author imyzt + */ +@Data +public class TelNumberExtInfo { + + /** + * 脱敏手机号 + */ + @JsonProperty("real_tel_number") + private String realTelNumber; + + /** + * 完整的虚拟号码 + */ + @JsonProperty("virtual_tel_number") + private String virtualTelNumber; + + /** + * 主动兑换的虚拟号码过期时间 + */ + @JsonProperty("virtual_tel_expire_time") + private Long virtualTelExpireTime; + + /** + * 主动兑换虚拟号码次数 + */ + @JsonProperty("get_virtual_tel_cnt") + private Long getVirtualTelCnt; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/VirtualNumberInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/VirtualNumberInfo.java new file mode 100644 index 0000000000..a85685d176 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/VirtualNumberInfo.java @@ -0,0 +1,30 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 虚拟号信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class VirtualNumberInfo implements Serializable { + + private static final long serialVersionUID = -372834823737476644L; + + /** 虚拟号 */ + @JsonProperty("virtual_number") + private String virtualNumber; + + /** 分机号 */ + @JsonProperty("extension") + private String extension; + + /** 过期时间戳 */ + @JsonProperty("expiration") + private Long expiration; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/VirtualTelNumberResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/VirtualTelNumberResponse.java new file mode 100644 index 0000000000..f9cfb39175 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/order/VirtualTelNumberResponse.java @@ -0,0 +1,30 @@ +package com.binarywang.wxjava.store.bean.order; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 兑换虚拟号 返回结果 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class VirtualTelNumberResponse extends WxStoreBaseResponse { + + /** 虚拟号码 */ + @JsonProperty("virtual_tel_number") + private String virtualTelNumber; + + /** 虚拟号码过期时间 */ + @JsonProperty("virtual_tel_expire_time") + private Long virtualTelExpireTime; + + /** 兑换虚拟号码次数 */ + @JsonProperty("get_virtual_tel_cnt") + private Integer getVirtualTelCnt; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/AddProductThirdPartySourceParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/AddProductThirdPartySourceParam.java new file mode 100644 index 0000000000..3346ff3637 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/AddProductThirdPartySourceParam.java @@ -0,0 +1,22 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.JsonNode; +import java.io.Serializable; +import lombok.Data; + +/** 新增第三方货源信息请求参数. */ +@Data +public class AddProductThirdPartySourceParam implements Serializable { + private static final long serialVersionUID = -5784320217481497742L; + + @JsonProperty("scene_value") + private Integer sceneValue; + @JsonProperty("publish_method") + private Integer publishMethod; + private JsonNode supplier; + @JsonProperty("supplier_shop_performance") + private JsonNode supplierShopPerformance; + @JsonProperty("product_source_info") + private JsonNode productSourceInfo; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/AddProductThirdPartySourceResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/AddProductThirdPartySourceResponse.java new file mode 100644 index 0000000000..0803c7bbf6 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/AddProductThirdPartySourceResponse.java @@ -0,0 +1,16 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** 新增第三方货源信息响应. */ +@Data +@EqualsAndHashCode(callSuper = true) +public class AddProductThirdPartySourceResponse extends WxStoreBaseResponse { + private static final long serialVersionUID = -7528226120383065861L; + + @JsonProperty("third_party_source_id") + private Long thirdPartySourceId; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/AfterSaleInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/AfterSaleInfo.java new file mode 100644 index 0000000000..b8d6849b36 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/AfterSaleInfo.java @@ -0,0 +1,22 @@ +package com.binarywang.wxjava.store.bean.product; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 商品售后信息 + */ +@Data +@NoArgsConstructor +public class AfterSaleInfo implements Serializable { + + + /** + * 商品的售后地址id,可使用获取地址详情 + */ + @JsonProperty("after_sale_address_id") + private Long afterSaleAddressId; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/DescriptionInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/DescriptionInfo.java new file mode 100644 index 0000000000..c330a406d5 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/DescriptionInfo.java @@ -0,0 +1,27 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 商品详情 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class DescriptionInfo implements Serializable { + + private static final long serialVersionUID = 3402153796734747882L; + + /** 商品详情图文,字符类型,最长不超过2000 */ + @JsonProperty("desc") + private String desc; + + /** 商品详情图片,图片类型,最多不超过50张 */ + @JsonProperty("imgs") + private List imgs; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ExpressInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ExpressInfo.java new file mode 100644 index 0000000000..9feb1417ac --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ExpressInfo.java @@ -0,0 +1,28 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 运费信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class ExpressInfo implements Serializable { + + private static final long serialVersionUID = 3274035362148612426L; + + /** 运费模板ID(先通过获取运费模板接口merchant/getfreighttemplatelist拿到),若deliver_method=1,则不用填写 */ + @JsonProperty("template_id") + private String templateId; + + /** 商品重量,单位克,若当前运费模版计价方式为[按重量],则必填 */ + @JsonProperty("weight") + private Integer weight; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ExternalProductMappingNewParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ExternalProductMappingNewParam.java new file mode 100644 index 0000000000..3f01116922 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ExternalProductMappingNewParam.java @@ -0,0 +1,31 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; + +/** 商品属性映射及推荐请求参数. */ +@Data +public class ExternalProductMappingNewParam implements Serializable { + private static final long serialVersionUID = -7982070319116550518L; + + @JsonProperty("cat_id") + private Long catId; + @JsonProperty("external_category_name") + private String externalCategoryName; + @JsonProperty("head_imgs") + private List headImgs; + @JsonProperty("detail_imgs") + private List detailImgs; + private String title; + @JsonProperty("external_attributes") + private List externalAttributes; + + @Data + public static class ExternalAttribute implements Serializable { + private static final long serialVersionUID = 300805187240781417L; + private String key; + private String value; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ExternalProductMappingNewResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ExternalProductMappingNewResponse.java new file mode 100644 index 0000000000..fd2286082a --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ExternalProductMappingNewResponse.java @@ -0,0 +1,29 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** 商品属性映射及推荐响应. */ +@Data +@EqualsAndHashCode(callSuper = true) +public class ExternalProductMappingNewResponse extends WxStoreBaseResponse { + private static final long serialVersionUID = 4536547956225312823L; + + @JsonProperty("attributes") + private List attributes; + + /** 推荐属性. */ + @Data + @NoArgsConstructor + public static class Attribute implements Serializable { + private static final long serialVersionUID = -4072024462101489333L; + + private String key; + private String value; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ExternalProductMappingParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ExternalProductMappingParam.java new file mode 100644 index 0000000000..fdb1c36c5f --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ExternalProductMappingParam.java @@ -0,0 +1,20 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; + +/** 站内外商品属性映射请求参数. */ +@Data +public class ExternalProductMappingParam implements Serializable { + private static final long serialVersionUID = 3288069294712374035L; + + @JsonProperty("cat_id") + private Long catId; + @JsonProperty("external_attribute_name") + private String externalAttributeName; + @JsonProperty("external_attribute_value") + private String externalAttributeValue; + @JsonProperty("external_category_name") + private String externalCategoryName; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ExternalProductMappingResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ExternalProductMappingResponse.java new file mode 100644 index 0000000000..02c2fd49aa --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ExternalProductMappingResponse.java @@ -0,0 +1,23 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** 站内外商品属性映射响应. */ +@Data +@EqualsAndHashCode(callSuper = true) +public class ExternalProductMappingResponse extends WxStoreBaseResponse { + private static final long serialVersionUID = -8356596972896906087L; + + @JsonProperty("external_attribute_name") + private String externalAttributeName; + @JsonProperty("external_attribute_value") + private String externalAttributeValue; + @JsonProperty("internal_attribute_name") + private String internalAttributeName; + @JsonProperty("internal_attribute_value") + private List internalAttributeValue; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ExtraServiceInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ExtraServiceInfo.java new file mode 100644 index 0000000000..2c3ef82c3f --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ExtraServiceInfo.java @@ -0,0 +1,39 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class ExtraServiceInfo implements Serializable { + + private static final long serialVersionUID = -5517806977282063174L; + + /** + * 是否支持七天无理由退货,0-不支持七天无理由, 1-支持七天无理由, 2-支持七天无理由(定制商品除外)。 管理规则请参见七天无理由退货管理规则。类目是否必须支持七天无理由退货, + * 可参考文档获取类目信息中的字段attr.seven_day_return + */ + @JsonProperty("seven_day_return") + private Integer sevenDayReturn; + + /** 先用后付,0-不支持先用后付,1-支持先用后付。若店铺已开通先用后付,支持先用后付的类目商品将在上架后自动打开先用后付。 */ + @JsonProperty("pay_after_use") + private Integer payAfterUse; + + /** 是否支持运费险,0-不支持运费险,1-支持运费险。需要商户开通运费险服务,且当前类目支持运费险才会生效。 */ + @JsonProperty("freight_insurance") + private Integer freightInsurance; + + /** 是否支持假一赔三,0-不支持假一赔三,1-支持假一赔三。 */ + @JsonProperty("fake_one_pay_three") + private Integer fakeOnePayThree; + + /** 是否支持坏损包退,0-不支持坏损包退,1-支持坏损包退。 */ + @JsonProperty("damage_guarantee") + private Integer damageGuarantee; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/GiftActivityAddParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/GiftActivityAddParam.java new file mode 100644 index 0000000000..267594d86b --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/GiftActivityAddParam.java @@ -0,0 +1,23 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 创建买赠活动参数 + * + * @author GitHub Copilot + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class GiftActivityAddParam implements Serializable { + + private static final long serialVersionUID = -3332952823917162308L; + + @JsonProperty("gift_activity") + private GiftActivityInfo giftActivity; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/GiftActivityAddResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/GiftActivityAddResponse.java new file mode 100644 index 0000000000..0596d2a0e9 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/GiftActivityAddResponse.java @@ -0,0 +1,23 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 创建买赠活动响应 + * + * @author GitHub Copilot + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class GiftActivityAddResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = -4527079816331082871L; + + @JsonProperty("activity_id") + private String activityId; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/GiftActivityInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/GiftActivityInfo.java new file mode 100644 index 0000000000..1d1c96fc2f --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/GiftActivityInfo.java @@ -0,0 +1,92 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; + +/** + * 买赠活动信息 + * + * @author GitHub Copilot + */ +@Data +@JsonInclude(JsonInclude.Include.NON_NULL) +public class GiftActivityInfo implements Serializable { + + private static final long serialVersionUID = 3970308144375119175L; + + @JsonProperty("activity_id") + private String activityId; + + @JsonProperty("title") + private String title; + + @JsonProperty("start_time") + private Long startTime; + + @JsonProperty("end_time") + private Long endTime; + + @JsonProperty("detail") + private Detail detail; + + @Data + public static class Detail implements Serializable { + private static final long serialVersionUID = 1019081831733485084L; + + @JsonProperty("show_scene") + private Integer showScene; + + @JsonProperty("receive_limit") + private ReceiveLimit receiveLimit; + + @JsonProperty("main_products") + private List mainProducts; + + @JsonProperty("gift_set") + private GiftSet giftSet; + } + + @Data + public static class ReceiveLimit implements Serializable { + private static final long serialVersionUID = 3332293571373311829L; + + @JsonProperty("is_limited") + private Boolean limited; + + @JsonProperty("limit_num") + private Integer limitNum; + } + + @Data + public static class MainProduct implements Serializable { + private static final long serialVersionUID = 6368866030784193437L; + + @JsonProperty("product_id") + private String productId; + } + + @Data + public static class GiftSet implements Serializable { + private static final long serialVersionUID = 8473755235926932739L; + + @JsonProperty("gift_items") + private List giftItems; + + @JsonProperty("gift_set_num") + private Integer giftSetNum; + } + + @Data + public static class GiftItem implements Serializable { + private static final long serialVersionUID = -4130391476834450014L; + + @JsonProperty("gift_id") + private String giftId; + + @JsonProperty("give_num") + private Integer giveNum; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/GiftProductAddResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/GiftProductAddResponse.java new file mode 100644 index 0000000000..61cbadb09b --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/GiftProductAddResponse.java @@ -0,0 +1,24 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 添加赠品响应 + * + * @author GitHub Copilot + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class GiftProductAddResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = -5971026809157610975L; + + /** 赠品商品ID */ + @JsonProperty("product_id") + private String productId; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/GiftProductGetResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/GiftProductGetResponse.java new file mode 100644 index 0000000000..6e123e0624 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/GiftProductGetResponse.java @@ -0,0 +1,28 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 赠品详情响应 + * + * @author GitHub Copilot + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class GiftProductGetResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 5331169221157446692L; + + /** 赠品线上数据 */ + @JsonProperty("product") + private GiftProductInfo product; + + /** 赠品草稿数据 */ + @JsonProperty("edit_product") + private GiftProductInfo editProduct; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/GiftProductInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/GiftProductInfo.java new file mode 100644 index 0000000000..d73d7921b6 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/GiftProductInfo.java @@ -0,0 +1,11 @@ +package com.binarywang.wxjava.store.bean.product; + +/** + * 赠品商品信息 + * + * @author GitHub Copilot + */ +public class GiftProductInfo extends SpuUpdateInfo { + + private static final long serialVersionUID = -4366133550331058445L; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/GiftProductListParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/GiftProductListParam.java new file mode 100644 index 0000000000..1be0391a06 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/GiftProductListParam.java @@ -0,0 +1,31 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import com.binarywang.wxjava.store.bean.base.StreamPageParam; + +/** + * 赠品列表查询参数 + * + * @author GitHub Copilot + */ +@Data +@JsonInclude(JsonInclude.Include.NON_NULL) +public class GiftProductListParam extends StreamPageParam { + + private static final long serialVersionUID = 7583500622060651067L; + + /** 赠品状态 */ + @JsonProperty("status") + private Integer status; + + public GiftProductListParam() { + } + + public GiftProductListParam(Integer pageSize, String nextKey, Integer status) { + this.pageSize = pageSize; + this.nextKey = nextKey; + this.status = status; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/GiftProductListResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/GiftProductListResponse.java new file mode 100644 index 0000000000..e8b5fdf850 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/GiftProductListResponse.java @@ -0,0 +1,33 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 赠品列表响应 + * + * @author GitHub Copilot + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class GiftProductListResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = -2734111694780970778L; + + /** 总数 */ + @JsonProperty("total_num") + private Integer totalNum; + + /** 本次翻页的上下文,用于请求下一页 */ + @JsonProperty("next_key") + private String nextKey; + + /** 赠品商品 id 列表 */ + @JsonProperty("product_ids") + private List ids; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/LimitInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/LimitInfo.java new file mode 100644 index 0000000000..9c36319df3 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/LimitInfo.java @@ -0,0 +1,28 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 限时购信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class LimitInfo implements Serializable { + + private static final long serialVersionUID = -4670198322237114719L; + + /** 限购周期类型,0无限购(默认),1按自然日限购,2按自然周限购,3按自然月限购 */ + @JsonProperty("period_type") + private Integer periodType; + + /** 限购周期类型,0无限购(默认),1按自然日限购,2按自然周限购,3按自然月限购 */ + @JsonProperty("limited_buy_num") + private Integer num; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductAuditQuotaResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductAuditQuotaResponse.java new file mode 100644 index 0000000000..9a49b76417 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductAuditQuotaResponse.java @@ -0,0 +1,39 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.EqualsAndHashCode; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** 商品提审限额响应. */ +@Data +@EqualsAndHashCode(callSuper = true) +public class ProductAuditQuotaResponse extends WxStoreBaseResponse { + private static final long serialVersionUID = -6242837308752181147L; + + @JsonProperty("audit_quota") + private AuditQuota auditQuota; + + @Data + public static class AuditQuota implements Serializable { + private static final long serialVersionUID = 6066821247844334714L; + + @JsonProperty("block_status") + private Integer blockStatus; + @JsonProperty("avail_quota") + private Integer availQuota; + @JsonProperty("total_quota") + private Integer totalQuota; + @JsonProperty("unlimited_type") + private Integer unlimitedType; + @JsonProperty("audit_total_quota") + private Integer auditTotalQuota; + @JsonProperty("audit_total_remaining") + private Integer auditTotalRemaining; + @JsonProperty("new_product_total_quota") + private Integer newProductTotalQuota; + @JsonProperty("new_product_remaining") + private Integer newProductRemaining; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductAuditStrategyInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductAuditStrategyInfo.java new file mode 100644 index 0000000000..f1687e0021 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductAuditStrategyInfo.java @@ -0,0 +1,18 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; + +/** 商品上架策略信息. */ +@Data +public class ProductAuditStrategyInfo implements Serializable { + private static final long serialVersionUID = -2747596416115475981L; + + @JsonProperty("hide_err_field_flag") + private Integer hideErrFieldFlag; + @JsonProperty("hit_duplicated_flag") + private Integer hitDuplicatedFlag; + @JsonProperty("hit_low_risk_rule_flag") + private Integer hitLowRiskRuleFlag; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductAuditStrategyResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductAuditStrategyResponse.java new file mode 100644 index 0000000000..eb392a61bc --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductAuditStrategyResponse.java @@ -0,0 +1,16 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** 商品上架策略响应. */ +@Data +@EqualsAndHashCode(callSuper = true) +public class ProductAuditStrategyResponse extends WxStoreBaseResponse { + private static final long serialVersionUID = -1074784511408331849L; + + @JsonProperty("audit_strategy") + private ProductAuditStrategyInfo auditStrategy; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductAuditStrategySetParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductAuditStrategySetParam.java new file mode 100644 index 0000000000..f97da29bc3 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductAuditStrategySetParam.java @@ -0,0 +1,14 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; + +/** 设置商品上架策略请求参数. */ +@Data +public class ProductAuditStrategySetParam implements Serializable { + private static final long serialVersionUID = 7542738744842032508L; + + @JsonProperty("audit_strategy") + private ProductAuditStrategyInfo auditStrategy; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductBrandRecommendParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductBrandRecommendParam.java new file mode 100644 index 0000000000..cc04d2f76a --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductBrandRecommendParam.java @@ -0,0 +1,20 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; + +/** 商品品牌推荐请求参数. */ +@Data +public class ProductBrandRecommendParam implements Serializable { + private static final long serialVersionUID = 6462717198206491138L; + + @JsonProperty("cat_id") + private Long catId; + @JsonProperty("head_imgs") + private List headImgs; + @JsonProperty("detail_imgs") + private List detailImgs; + private String title; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductBrandRecommendResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductBrandRecommendResponse.java new file mode 100644 index 0000000000..02cec81f91 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductBrandRecommendResponse.java @@ -0,0 +1,20 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** 商品品牌推荐响应. */ +@Data +@EqualsAndHashCode(callSuper = true) +public class ProductBrandRecommendResponse extends WxStoreBaseResponse { + private static final long serialVersionUID = 4350605866373432810L; + + @JsonProperty("brand_id") + private Long brandId; + @JsonProperty("brand_name_chinese") + private String brandNameChinese; + @JsonProperty("brand_name_english") + private String brandNameEnglish; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductCategoryClassifyParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductCategoryClassifyParam.java new file mode 100644 index 0000000000..9d48b5f16b --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductCategoryClassifyParam.java @@ -0,0 +1,20 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; + +/** 商品类目推荐请求参数. */ +@Data +public class ProductCategoryClassifyParam implements Serializable { + private static final long serialVersionUID = 4665563979720739777L; + + @JsonProperty("req_type") + private Integer reqType; + private String title; + @JsonProperty("head_imgs") + private List headImgs; + @JsonProperty("cat_id") + private String catId; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductCategoryClassifyResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductCategoryClassifyResponse.java new file mode 100644 index 0000000000..322429f0fc --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductCategoryClassifyResponse.java @@ -0,0 +1,48 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** 商品类目推荐响应. */ +@Data +@EqualsAndHashCode(callSuper = true) +public class ProductCategoryClassifyResponse extends WxStoreBaseResponse { + private static final long serialVersionUID = 8258747142248203374L; + + private List categories; + @JsonProperty("wrong_cat") + private Boolean wrongCat; + + @Data + public static class CategoryInfo implements Serializable { + private static final long serialVersionUID = -4800760946330901306L; + + private List cats; + } + + @Data + public static class CategoryLevel implements Serializable { + private static final long serialVersionUID = 8010801623725584755L; + + @JsonProperty("cat_info") + private Category catInfo; + @JsonProperty("has_permission") + private Boolean hasPermission; + } + + @Data + public static class Category implements Serializable { + private static final long serialVersionUID = -9013991576741902059L; + + @JsonProperty("cat_id") + private String catId; + @JsonProperty("cat_name") + private String catName; + @JsonProperty("is_shop_no_audit") + private Boolean shopNoAudit; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductCategoryPreCheckParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductCategoryPreCheckParam.java new file mode 100644 index 0000000000..e5f8666eb7 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductCategoryPreCheckParam.java @@ -0,0 +1,14 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; + +/** 发品前校验请求参数. */ +@Data +public class ProductCategoryPreCheckParam implements Serializable { + private static final long serialVersionUID = 5155253060483296766L; + + @JsonProperty("cat_id") + private Long catId; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductCategoryPreCheckResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductCategoryPreCheckResponse.java new file mode 100644 index 0000000000..62d8378aea --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductCategoryPreCheckResponse.java @@ -0,0 +1,19 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** 发品前校验响应. */ +@Data +@EqualsAndHashCode(callSuper = true) +public class ProductCategoryPreCheckResponse extends WxStoreBaseResponse { + private static final long serialVersionUID = 7136603000806024499L; + + @JsonProperty("all_pass") + private Boolean allPass; + @JsonProperty("fail_reasons") + private List failReasons; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductQuaInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductQuaInfo.java new file mode 100644 index 0000000000..e326e2274e --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductQuaInfo.java @@ -0,0 +1,29 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 商品资质信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class ProductQuaInfo implements Serializable { + + private static final long serialVersionUID = -71766140204505768L; + + /** 商品资质id,对应获取类目信息中的字段product_qua_list[].qua_id */ + @JsonProperty("qua_id") + private String quaId; + + /** 商品资质图片列表 */ + @JsonProperty("qua_url") + private List quaUrl; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductSaleLimitInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductSaleLimitInfo.java new file mode 100644 index 0000000000..2b8bf18c2c --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductSaleLimitInfo.java @@ -0,0 +1,30 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 商品销售库存限制 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class ProductSaleLimitInfo implements Serializable { + + /** 是否受到管控,商品存在售卖限制时,固定返回1 */ + @JsonProperty("is_limited") + private Integer limited; + + /** 售卖限制标题 */ + @JsonProperty("title") + private String title; + + /** 售卖限制描述 */ + @JsonProperty("sub_title") + private String subTitle; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductSchemeParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductSchemeParam.java new file mode 100644 index 0000000000..265110729e --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductSchemeParam.java @@ -0,0 +1,19 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; + +/** 获取商品移动应用跳转 scheme 码请求参数. */ +@Data +public class ProductSchemeParam implements Serializable { + private static final long serialVersionUID = 613832623081127830L; + + @JsonProperty("product_id") + private String productId; + @JsonProperty("from_appid") + private String fromAppid; + private Integer expire; + @JsonProperty("ext_info") + private String extInfo; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductSchemeResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductSchemeResponse.java new file mode 100644 index 0000000000..6824386712 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductSchemeResponse.java @@ -0,0 +1,14 @@ +package com.binarywang.wxjava.store.bean.product; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** 获取商品移动应用跳转 scheme 码响应. */ +@Data +@EqualsAndHashCode(callSuper = true) +public class ProductSchemeResponse extends WxStoreBaseResponse { + private static final long serialVersionUID = 7310433919100539990L; + + private String openlink; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductStockFlowParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductStockFlowParam.java new file mode 100644 index 0000000000..042cdd062c --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductStockFlowParam.java @@ -0,0 +1,33 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; + +/** 获取库存流水请求参数. */ +@Data +public class ProductStockFlowParam implements Serializable { + private static final long serialVersionUID = -407227347279113050L; + + @JsonProperty("product_id") + private String productId; + @JsonProperty("sku_id") + private String skuId; + @JsonProperty("stock_type") + private Integer stockType; + @JsonProperty("finder_id") + private String finderId; + @JsonProperty("begin_time") + private Long beginTime; + @JsonProperty("end_time") + private Long endTime; + @JsonProperty("op_type_list") + private List opTypeList; + @JsonProperty("page_size") + private Integer pageSize; + @JsonProperty("next_key") + private String nextKey; + @JsonProperty("stock_type_id") + private String stockTypeId; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductStockFlowResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductStockFlowResponse.java new file mode 100644 index 0000000000..eefb0f81a8 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductStockFlowResponse.java @@ -0,0 +1,28 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.JsonNode; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** 获取库存流水响应. */ +@Data +@EqualsAndHashCode(callSuper = true) +public class ProductStockFlowResponse extends WxStoreBaseResponse { + private static final long serialVersionUID = 7600529379926896515L; + + private StockFlowData data; + + @Data + public static class StockFlowData implements Serializable { + private static final long serialVersionUID = -4963813730951045381L; + + @JsonProperty("stock_flow_info_list") + private List stockFlowInfoList; + @JsonProperty("next_key") + private String nextKey; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductTimingSaleParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductTimingSaleParam.java new file mode 100644 index 0000000000..fa443fcb6f --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/ProductTimingSaleParam.java @@ -0,0 +1,16 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; + +/** 商品立即开售请求参数. */ +@Data +public class ProductTimingSaleParam implements Serializable { + private static final long serialVersionUID = -7185451543781817487L; + + @JsonProperty("product_id") + private String productId; + @JsonProperty("task_id") + private Long taskId; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SkuDeliverInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SkuDeliverInfo.java new file mode 100644 index 0000000000..e65ba94cfb --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SkuDeliverInfo.java @@ -0,0 +1,43 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * sku发货信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class SkuDeliverInfo implements Serializable { + + private static final long serialVersionUID = 8046963723772755406L; + + /** sku库存情况。0:现货(默认),1:全款预售。部分类目支持全款预售,具体参考文档获取类目信息中的字段attr.pre_sale */ + @JsonProperty("stock_type") + private Integer stockType; + + /** sku发货节点,该字段仅对stock_type=1有效。0:付款后n天发货,1:预售结束后n天发货 */ + @JsonProperty("full_payment_presale_delivery_type") + private Integer fullPaymentPresaleDeliveryType; + + /** sku预售周期开始时间,秒级时间戳,该字段仅对delivery_type=1有效。 */ + @JsonProperty("presale_begin_time") + private Long presaleBeginTime; + + /** + * sku预售周期结束时间,秒级时间戳,该字段仅对delivery_type=1有效。限制:预售结束时间距离现在<=30天, 即presale_end_time - now <= 2592000。预售时间区间<=15天, + * 即presale_end_time - presale_begin_time <= 1296000 + */ + @JsonProperty("presale_end_time") + private Long presaleEndTime; + + /** + * sku发货时效,即付款后/预售结束后{full_payment_presale_delivery_time}天内发货, 该字段仅对stock_type=1时有效。范围是[4, 15]的整数。 + */ + @JsonProperty("full_payment_presale_delivery_time") + private Integer fullPaymentPresaleDeliveryTime; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SkuFastInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SkuFastInfo.java new file mode 100644 index 0000000000..042b397eeb --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SkuFastInfo.java @@ -0,0 +1,60 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 免审商品更新Sku数据 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@JsonInclude(JsonInclude.Include.NON_NULL) +public class SkuFastInfo implements Serializable { + + /** sku_id */ + @JsonProperty("sku_id") + private String skuId; + + /** 售卖价格,以分为单位,数字类型,最大不超过10000000(1000万元) */ + @JsonProperty("sale_price") + private Integer salePrice; + + @JsonProperty("stock_info") + private StockInfo stockInfo; + + /** sku发货信息 */ + @JsonProperty("sku_deliver_info") + private SkuDeliverInfo skuDeliverInfo; + + /** 是否要删除当前sku */ + @JsonProperty("is_delete") + private Boolean delete; + + /** 商品sku编码 */ + @JsonProperty("sku_code") + private String skuCode; + + /** 更新sku状态 0-默认值;5-上架;11-下架 */ + @JsonProperty("status") + private Integer status; + + + @Data + @NoArgsConstructor + public static class StockInfo implements Serializable { + + /** 修改类型。1: 增加;2:减少;3:设置 */ + @JsonProperty("diff_type") + protected Integer diffType; + + /** 增加、减少或者设置的库存值 */ + @JsonProperty("num") + protected Integer num; + } + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SkuInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SkuInfo.java new file mode 100644 index 0000000000..de50cfe9cf --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SkuInfo.java @@ -0,0 +1,70 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import com.binarywang.wxjava.store.bean.base.AttrInfo; + +/** + * SKU信息 + * + * @author Zeyes + */ +@Data +public class SkuInfo implements Serializable { + + private static final long serialVersionUID = -8734396136299597845L; + + /** 商家自定义商品ID */ + @JsonProperty("out_product_id") + private String outProductId; + + /** 商家自定义skuID */ + @JsonProperty("out_sku_id") + private String outSkuId; + + /** sku小图 */ + @JsonProperty("thumb_img") + private String thumbImg; + + /** 售卖价格,以分为单位,数字类型,最大不超过10000000(1000万元) */ + @JsonProperty("sale_price") + private Integer salePrice; + + /** 市场价格,以分为单位,数字类型,最大不超过10000000(1000万元),且必须比sale_price大 */ + @JsonProperty("market_price") + private Integer marketPrice; + + /** 库存,数字类型,最大不超过10000000(1000万) */ + @JsonProperty("stock_num") + private Integer stockNum; + + /** 商品编码,字符类型,最长不超过20 */ + @JsonProperty("sku_code") + private String skuCode; + + /** SKU属性 */ + @JsonProperty("sku_attrs") + private List attrs; + + /** sku发货信息 */ + @JsonProperty("sku_deliver_info") + private SkuDeliverInfo skuDeliverInfo; + + /** skuID */ + @JsonProperty("sku_id") + private String skuId; + + /** sku条形码 */ + @JsonProperty("bar_code") + private String barCode; + + public SkuInfo() { + } + + public SkuInfo(String outProductId, String outSkuId) { + this.outProductId = outProductId; + this.outSkuId = outSkuId; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SkuStockBatchList.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SkuStockBatchList.java new file mode 100644 index 0000000000..e6df6f8445 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SkuStockBatchList.java @@ -0,0 +1,23 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * spu库存列表 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class SkuStockBatchList implements Serializable { + private static final long serialVersionUID = -8082428962162052815L; + + /** 库存信息 */ + @JsonProperty("spu_stock_list") + private List spuStockList; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SkuStockBatchParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SkuStockBatchParam.java new file mode 100644 index 0000000000..91bfc5bcd1 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SkuStockBatchParam.java @@ -0,0 +1,24 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class SkuStockBatchParam implements Serializable { + + private static final long serialVersionUID = 3706326762056220559L; + + /** 商品ID列表 注意这里是 productId ,序列化参数没有写错 */ + @JsonProperty("product_id") + private List productIds; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SkuStockBatchResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SkuStockBatchResponse.java new file mode 100644 index 0000000000..6691609471 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SkuStockBatchResponse.java @@ -0,0 +1,24 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 批量查询sku库存响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class SkuStockBatchResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 7745444061881828137L; + + /** 库存信息 */ + @JsonProperty("data") + private SkuStockBatchList data; + } diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SkuStockInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SkuStockInfo.java new file mode 100644 index 0000000000..7f4cb45b44 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SkuStockInfo.java @@ -0,0 +1,42 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 商品库存 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class SkuStockInfo implements Serializable { + + private static final long serialVersionUID = 4719729125885685958L; + + /** 通用库存数量 */ + @JsonProperty("normal_stock_num") + private Integer normalStockNum; + + /** 限时抢购库存数量 */ + @JsonProperty("limited_discount_stock_num") + private Integer limitedDiscountStockNum; + + /** 区域库存 */ + @JsonProperty("warehouse_stocks") + private List warehouseStocks; + + /** + * 普通查询:库存总量:通用库存数量 + 限时抢购库存数量 + 区域库存总量 + * 批量查询:库存总量:通用库存数量 + 限时抢购库存数量 + 区域库存数量 + 达人专属计划营销库存数量 + */ + @JsonProperty("total_stock_num") + private Integer totalStockNum; + + /** 达人专属计划营销库存数量 */ + @JsonProperty("finder_stock_num") + private Integer finderTotalNum; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SkuStockParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SkuStockParam.java new file mode 100644 index 0000000000..26a051bdd1 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SkuStockParam.java @@ -0,0 +1,34 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class SkuStockParam implements Serializable { + + private static final long serialVersionUID = -5542939078361208816L; + + /** 内部商品ID */ + @JsonProperty("product_id") + protected String productId; + + /** 内部sku_id */ + @JsonProperty("sku_id") + protected String skuId; + + /** 修改类型。1: 增加;2:减少;3:设置 */ + @JsonProperty("diff_type") + protected Integer diffType; + + /** 增加、减少或者设置的库存值 */ + @JsonProperty("num") + protected Integer num; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SkuStockResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SkuStockResponse.java new file mode 100644 index 0000000000..8db500a6e3 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SkuStockResponse.java @@ -0,0 +1,24 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 库存信息响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class SkuStockResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = -2156342792354605826L; + + /** 库存信息 */ + @JsonProperty("data") + private SkuStockInfo data; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SpuCategory.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SpuCategory.java new file mode 100644 index 0000000000..6867bd6d14 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SpuCategory.java @@ -0,0 +1,22 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 商品类目id + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class SpuCategory implements Serializable { + + private static final long serialVersionUID = -8500610555473351789L; + + /** 类目id */ + @JsonProperty("cat_id") + private String id; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SpuFastInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SpuFastInfo.java new file mode 100644 index 0000000000..de807fea33 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SpuFastInfo.java @@ -0,0 +1,52 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 商品免审更新参数 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@JsonInclude(JsonInclude.Include.NON_NULL) +public class SpuFastInfo implements Serializable { + + /** 商品ID */ + @JsonProperty("product_id") + protected String productId; + + /** SKU列表 */ + @JsonProperty("skus") + protected List skus; + + /** 商品编码 */ + @JsonProperty("spu_code") + protected String spuCode; + + /** 限购信息 */ + @JsonProperty("limit_info") + protected LimitInfo limitInfo; + + /** 运费信息 */ + @JsonProperty("express_info") + protected ExpressInfo expressInfo; + + /** 额外服务 */ + @JsonProperty("extra_service") + protected ExtraServiceInfo extraService; + + /** 发货方式:0-快递发货;1-无需快递,手机号发货;3-无需快递,可选发货账号类型,默认为0,若为无需快递,则无需填写运费模版id */ + @JsonProperty("deliver_method") + private Integer deliverMethod; + + /** 商品待开售信息 */ + @JsonProperty("timing_onsale_info") + private TimingOnSaleInfo timingOnSaleInfo; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SpuGetResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SpuGetResponse.java new file mode 100644 index 0000000000..77bc167226 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SpuGetResponse.java @@ -0,0 +1,32 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 商品信息 响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class SpuGetResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = -8955745006296226140L; + + /** 商品线上数据,入参data_type==2时不返回该字段;入参data_type==3且商品未处于上架状态,不返回该字段 */ + @JsonProperty("product") + private SpuInfo product; + + /** 商品草稿数据,入参data_type==1时不返回该字段 */ + @JsonProperty("edit_product") + private SpuInfo editProduct; + + /** 当日售卖上限提醒,当店铺受到售卖管控时返回,没有返回本字段表示没有无额外限制 */ + @JsonProperty("sale_limit_info") + private ProductSaleLimitInfo saleLimitInfo; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SpuInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SpuInfo.java new file mode 100644 index 0000000000..e7d06697bc --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SpuInfo.java @@ -0,0 +1,158 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.AttrInfo; + +/** + * Spu信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class SpuInfo extends SpuSimpleInfo { + + private static final long serialVersionUID = -1183209029245287297L; + + /** 标题,字符类型,最少不低于3,最长不超过60。商品标题不得仅为数字、字母、字符或上述三种的组合 */ + @JsonProperty("title") + private String title; + + /** 副标题,最多18字符 */ + @JsonProperty("sub_title") + private String subTitle; + + /** 主图,多张,列表,图片类型,最多不超过9张 */ + @JsonProperty("head_imgs") + private List headImgs; + + /** 发货方式:0-快递发货;1-无需快递,手机号发货;3-无需快递,可选发货账号类型,默认为0,若为无需快递,则无需填写运费模版id */ + @JsonProperty("deliver_method") + private Integer deliverMethod; + + /** + * 发货账号:1-微信openid;2-QQ号;3-手机号;4-邮箱。 + * 可多选,只有deliver_method=3时,本参数有意义。 + * 且当发货账号为微信、QQ和邮箱时,需要更新订单接口读取详情字段,详情参考订单接口的说明 + */ + @JsonProperty("deliver_acct_type") + private List deliverAcctType; + + /** 商品详情 */ + @JsonProperty("desc_info") + private DescriptionInfo descInfo; + + /** 商品类目,大小恒等于3(一二三级类目) */ + @JsonProperty("cats") + private List cats; + + /** 新类目树,商家需要先申请可使用类目 */ + @JsonProperty("cats_v2") + private List catsV2; + + /** 商品参数 */ + @JsonProperty("attrs") + private List attrs; + + /** 商品编码 */ + @JsonProperty("spu_code") + private String spuCode; + + /** 品牌id,无品牌为2100000000 */ + @JsonProperty("brand_id") + private String brandId; + + /** 商品资质图片(最多5张) */ + @JsonProperty("qualifications") + private List qualifications; + + /** 运费信息 */ + @JsonProperty("express_info") + private ExpressInfo expressInfo; + + /** 售后说明 */ + @JsonProperty("aftersale_desc") + private String afterSaleDesc; + + /** 限购信息 */ + @JsonProperty("limited_info") + @JsonInclude(Include.NON_EMPTY) + private LimitInfo limitInfo; + + /** 附加服务 */ + @JsonProperty("extra_service") + private ExtraServiceInfo extraService; + + /** 商品线上状态 {@link com.binarywang.wxjava.store.enums.SpuStatus } */ + @JsonProperty("status") + private Integer status; + + /** 商品草稿状态 */ + @JsonProperty("edit_status") + private Integer editStatus; + + /** 最低价格 */ + @JsonProperty("min_price") + private Integer minPrice; + + /** 创建时间 yyyy-MM-dd HH:mm:ss */ + @JsonProperty("create_time") + private String createTime; + + /** + * 商品草稿最近一次修改时间 + */ + @JsonProperty("edit_time") + private Long editTime; + + /** + * 商品类型。1: 小店普通自营商品;2: 福袋抽奖商品;3: 直播间闪电购商品。 + * 注意: 福袋抽奖、直播间闪电购类型的商品为只读数据,不支持编辑、上架操作,不支持用data_type=2的参数获取。 + */ + @JsonProperty("product_type") + private Integer productType; + + /** + * 商品的售后信息 + */ + @JsonProperty("after_sale_info") + private AfterSaleInfo afterSaleInfo; + + /** + * 当商品类型位福袋抽奖商品(即product_type==2)且该抽奖商品由橱窗的自营商品导入生成时有值, + * 表示导入的来源商品id,其他场景下该字段无值或者值为0 + */ + @JsonProperty("src_product_id") + private String srcProductId; + + /** 商品资质列表 */ + @JsonProperty("product_qua_infos") + private List productQuaInfos; + + /** 尺码表信息 */ + @JsonProperty("size_chart") + private SpuSizeChart sizeChart; + + /** 短标题 */ + @JsonProperty("short_title") + private String shortTitle; + + /** 销量 */ + @JsonProperty("total_sold_num") + private Integer totalSoldNum; + + /** 发布模式,0: 普通模式;1: 极简模式 */ + @JsonProperty("release_mode") + private Integer releaseMode; + + /** 商品待开售信息 */ + @JsonProperty("timing_onsale_info") + private TimingOnSaleInfo timingOnSaleInfo; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SpuListParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SpuListParam.java new file mode 100644 index 0000000000..fcbc40cbe2 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SpuListParam.java @@ -0,0 +1,32 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import com.binarywang.wxjava.store.bean.base.StreamPageParam; + +/** + * 商品列表查询参数 + * + * @author Zeyes + */ +@Data +@JsonInclude(Include.NON_NULL) +public class SpuListParam extends StreamPageParam { + + private static final long serialVersionUID = -242932365961748404L; + + /** 商品状态 */ + @JsonProperty("status") + private Integer status; + + public SpuListParam() { + } + + public SpuListParam(Integer pageSize, String nextKey, Integer status) { + this.pageSize = pageSize; + this.nextKey = nextKey; + this.status = status; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SpuListResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SpuListResponse.java new file mode 100644 index 0000000000..84e665cd37 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SpuListResponse.java @@ -0,0 +1,33 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 商品列表信息 响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class SpuListResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = -7448819335418389308L; + + /** 总数 */ + @JsonProperty("total_num") + private Integer totalNum; + + /** 本次翻页的上下文,用于请求下一页 */ + @JsonProperty("next_key") + private String nextKey; + + /** 商品 id 列表 */ + @JsonProperty("product_ids") + private List ids; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SpuSimpleInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SpuSimpleInfo.java new file mode 100644 index 0000000000..28f4cd863b --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SpuSimpleInfo.java @@ -0,0 +1,29 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class SpuSimpleInfo implements Serializable { + + private static final long serialVersionUID = 5583726432139404883L; + + /** 商品ID */ + @JsonProperty("product_id") + protected String productId; + + /** 商家自定义商品ID */ + @JsonProperty("out_product_id") + protected String outProductId; + + /** sku数组 */ + @JsonProperty("skus") + protected List skus; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SpuSizeChart.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SpuSizeChart.java new file mode 100644 index 0000000000..b72c3304fe --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SpuSizeChart.java @@ -0,0 +1,27 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 尺码表信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class SpuSizeChart implements Serializable { + + private static final long serialVersionUID = -5019617420608575610L; + + /** 是否支持尺码表 */ + @JsonProperty("enable") + private Boolean enable; + + /** 尺码表 */ + @JsonProperty("specification_list") + private List specificationList; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SpuSizeChartItem.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SpuSizeChartItem.java new file mode 100644 index 0000000000..608a70ac41 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SpuSizeChartItem.java @@ -0,0 +1,55 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 尺码表 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class SpuSizeChartItem implements Serializable { + + private static final long serialVersionUID = -3757716378584654974L; + + /** 尺码属性名称 */ + @JsonProperty("name") + private String name; + + /** 尺码属性值的单位 */ + @JsonProperty("unit") + private String unit; + + /** 尺码属性值是否为区间 */ + @JsonProperty("is_range") + private Boolean range; + + /** 尺码值与尺码属性值的映射列表 */ + @JsonProperty("value_list") + private List valueList; + + @Data + @NoArgsConstructor + public static class ValueRange implements Serializable { + /** 尺码值 */ + @JsonProperty("key") + private String key; + + /** 尺码属性值;尺码属性值为非区间时返回 */ + @JsonProperty("value") + private String value; + + /** 尺码属性值的左边界;尺码属性值为区间时返回 */ + @JsonProperty("left") + private String left; + + /** 尺码属性值的右边界;尺码属性值为区间时返回 */ + @JsonProperty("right") + private String right; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SpuStockInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SpuStockInfo.java new file mode 100644 index 0000000000..0805913584 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SpuStockInfo.java @@ -0,0 +1,25 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * SPU库存信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class SpuStockInfo implements Serializable { + + /** 商品ID */ + @JsonProperty("product_id") + protected String productId; + + /** sku库存 */ + @JsonProperty("sku_stock") + private List skuStock; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SpuUpdateInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SpuUpdateInfo.java new file mode 100644 index 0000000000..48ed2fa648 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SpuUpdateInfo.java @@ -0,0 +1,24 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * 商品更新数据 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +public class SpuUpdateInfo extends SpuInfo { + + /** 添加完成后是否立即上架。1:是;0:否;默认0 */ + @JsonProperty("listing") + private Integer listing; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SpuUpdateResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SpuUpdateResponse.java new file mode 100644 index 0000000000..86d043aeac --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/SpuUpdateResponse.java @@ -0,0 +1,25 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 商品信息 响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class SpuUpdateResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = -7072796795527767292L; + + /** 商品信息 */ + @JsonProperty("data") + private SpuInfo data; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/TimingOnSaleInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/TimingOnSaleInfo.java new file mode 100644 index 0000000000..27cabb4304 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/TimingOnSaleInfo.java @@ -0,0 +1,36 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * 商品待开售信息 + * + * @author chu + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class TimingOnSaleInfo implements Serializable { + + /** 状态枚举 0-没有待开售;1-待开售 */ + @JsonProperty("status") + private Integer status; + + /** 开售时间,秒级时间戳,0为未配置时间 */ + @JsonProperty("onsale_time") + private Long onSaleTime; + + /** 是否隐藏价格 0-不隐藏;1-隐藏 */ + @JsonProperty("is_hide_price") + private Integer isHidePrice; + + /** 待开售任务ID,可用于请求立即开售 */ + @JsonProperty("task_id") + private Integer taskId; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/WarehouseStockInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/WarehouseStockInfo.java new file mode 100644 index 0000000000..6116bd6fde --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/WarehouseStockInfo.java @@ -0,0 +1,30 @@ +package com.binarywang.wxjava.store.bean.product; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 区域库存 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class WarehouseStockInfo implements Serializable { + + private static final long serialVersionUID = 3184902895765107425L; + + /** 区域库存外部id */ + @JsonProperty("out_warehouse_id") + private String outWarehouseId; + + /** 区域库存数量 */ + @JsonProperty("num") + private Integer num; + + /** 区域库存的锁定库存(已下单未支付的库存)数量 */ + @JsonProperty("lock_stock") + private Integer lockStock; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/assistant/BeginTimingSaleParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/assistant/BeginTimingSaleParam.java new file mode 100644 index 0000000000..5ea5e83116 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/assistant/BeginTimingSaleParam.java @@ -0,0 +1,24 @@ +package com.binarywang.wxjava.store.bean.product.assistant; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 商品立即开售参数。 + */ +@Data +@NoArgsConstructor +public class BeginTimingSaleParam implements Serializable { + + private static final long serialVersionUID = -1525220756273987016L; + + /** 商品 ID。 */ + @JsonProperty("product_id") + private String productId; + + /** 定时开售任务 ID。 */ + @JsonProperty("task_id") + private String taskId; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/assistant/CancelTimingSaleParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/assistant/CancelTimingSaleParam.java new file mode 100644 index 0000000000..247f7e8b39 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/assistant/CancelTimingSaleParam.java @@ -0,0 +1,20 @@ +package com.binarywang.wxjava.store.bean.product.assistant; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 取消商品开售参数。 + */ +@Data +@NoArgsConstructor +public class CancelTimingSaleParam implements Serializable { + + private static final long serialVersionUID = -3750831026611057323L; + + /** 商品 ID。 */ + @JsonProperty("product_id") + private String productId; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/assistant/CategoryPreCheckParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/assistant/CategoryPreCheckParam.java new file mode 100644 index 0000000000..49de32285f --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/assistant/CategoryPreCheckParam.java @@ -0,0 +1,20 @@ +package com.binarywang.wxjava.store.bean.product.assistant; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 发品前校验参数。 + */ +@Data +@NoArgsConstructor +public class CategoryPreCheckParam implements Serializable { + + private static final long serialVersionUID = 3616569394767815856L; + + /** 叶子类目 ID,不传时只校验店铺相关条件。 */ + @JsonProperty("cat_id") + private Long catId; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/assistant/CategoryPreCheckResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/assistant/CategoryPreCheckResponse.java new file mode 100644 index 0000000000..929535a6a9 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/assistant/CategoryPreCheckResponse.java @@ -0,0 +1,27 @@ +package com.binarywang.wxjava.store.bean.product.assistant; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 发品前校验响应。 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class CategoryPreCheckResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 8912798390684239592L; + + /** 是否全部校验通过。 */ + @JsonProperty("all_pass") + private Boolean allPass; + + /** 校验不通过的原因。 */ + @JsonProperty("fail_reasons") + private List failReasons; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/assistant/ExternalAttribute.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/assistant/ExternalAttribute.java new file mode 100644 index 0000000000..e57c6ea874 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/assistant/ExternalAttribute.java @@ -0,0 +1,24 @@ +package com.binarywang.wxjava.store.bean.product.assistant; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 商品属性键值对。 + */ +@Data +@NoArgsConstructor +public class ExternalAttribute implements Serializable { + + private static final long serialVersionUID = -8639178782951125101L; + + /** 属性名。 */ + @JsonProperty("key") + private String key; + + /** 属性值。 */ + @JsonProperty("value") + private String value; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/assistant/ExternalProductMappingNewParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/assistant/ExternalProductMappingNewParam.java new file mode 100644 index 0000000000..bddd6112a2 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/assistant/ExternalProductMappingNewParam.java @@ -0,0 +1,41 @@ +package com.binarywang.wxjava.store.bean.product.assistant; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 商品属性映射及推荐参数。 + */ +@Data +@NoArgsConstructor +public class ExternalProductMappingNewParam implements Serializable { + + private static final long serialVersionUID = -4942505655791636645L; + + /** 叶子类目 ID。 */ + @JsonProperty("cat_id") + private Long catId; + + /** 外部商品类目名称。 */ + @JsonProperty("external_category_name") + private String externalCategoryName; + + /** 商品主图,至少一张。 */ + @JsonProperty("head_imgs") + private List headImgs; + + /** 商品详情图。 */ + @JsonProperty("detail_imgs") + private List detailImgs; + + /** 商品标题。 */ + @JsonProperty("title") + private String title; + + /** 外部商品属性列表。 */ + @JsonProperty("external_attributes") + private List externalAttributes; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/assistant/ExternalProductMappingNewResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/assistant/ExternalProductMappingNewResponse.java new file mode 100644 index 0000000000..6ff05ba9d8 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/assistant/ExternalProductMappingNewResponse.java @@ -0,0 +1,23 @@ +package com.binarywang.wxjava.store.bean.product.assistant; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 商品属性映射及推荐响应。 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class ExternalProductMappingNewResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = -6192580254142696913L; + + /** 映射属性结果。 */ + @JsonProperty("attributes") + private List attributes; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/assistant/ExternalProductMappingParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/assistant/ExternalProductMappingParam.java new file mode 100644 index 0000000000..e783a96396 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/assistant/ExternalProductMappingParam.java @@ -0,0 +1,32 @@ +package com.binarywang.wxjava.store.bean.product.assistant; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 站内外商品属性映射参数。 + */ +@Data +@NoArgsConstructor +public class ExternalProductMappingParam implements Serializable { + + private static final long serialVersionUID = 1944528166283981889L; + + /** 叶子类目 ID。 */ + @JsonProperty("cat_id") + private Long catId; + + /** 外部商品属性名。 */ + @JsonProperty("external_attribute_name") + private String externalAttributeName; + + /** 外部商品属性值。 */ + @JsonProperty("external_attribute_value") + private String externalAttributeValue; + + /** 外部商品类目名称。 */ + @JsonProperty("external_category_name") + private String externalCategoryName; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/assistant/ExternalProductMappingResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/assistant/ExternalProductMappingResponse.java new file mode 100644 index 0000000000..c402a30c59 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/assistant/ExternalProductMappingResponse.java @@ -0,0 +1,35 @@ +package com.binarywang.wxjava.store.bean.product.assistant; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 站内外商品属性映射响应。 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class ExternalProductMappingResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = -2267639791023044849L; + + /** 外部商品属性名。 */ + @JsonProperty("external_attribute_name") + private String externalAttributeName; + + /** 外部商品属性值。 */ + @JsonProperty("external_attribute_value") + private String externalAttributeValue; + + /** 内部商品属性名。 */ + @JsonProperty("internal_attribute_name") + private String internalAttributeName; + + /** 内部商品属性值。 */ + @JsonProperty("internal_attribute_value") + private List internalAttributeValue; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/assistant/ProductBrandRecommendParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/assistant/ProductBrandRecommendParam.java new file mode 100644 index 0000000000..a192f14a2f --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/assistant/ProductBrandRecommendParam.java @@ -0,0 +1,33 @@ +package com.binarywang.wxjava.store.bean.product.assistant; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 商品品牌推荐参数。 + */ +@Data +@NoArgsConstructor +public class ProductBrandRecommendParam implements Serializable { + + private static final long serialVersionUID = 4516219198778673928L; + + /** 叶子类目 ID。 */ + @JsonProperty("cat_id") + private Long catId; + + /** 商品主图,至少一张。 */ + @JsonProperty("head_imgs") + private List headImgs; + + /** 商品详情图。 */ + @JsonProperty("detail_imgs") + private List detailImgs; + + /** 商品标题。 */ + @JsonProperty("title") + private String title; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/assistant/ProductBrandRecommendResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/assistant/ProductBrandRecommendResponse.java new file mode 100644 index 0000000000..2144e619ed --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/assistant/ProductBrandRecommendResponse.java @@ -0,0 +1,30 @@ +package com.binarywang.wxjava.store.bean.product.assistant; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 商品品牌推荐响应。 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class ProductBrandRecommendResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = -7903894941180639923L; + + /** 品牌 ID。 */ + @JsonProperty("brand_id") + private Long brandId; + + /** 品牌中文名称。 */ + @JsonProperty("brand_name_chinese") + private String brandNameChinese; + + /** 品牌英文名称。 */ + @JsonProperty("brand_name_english") + private String brandNameEnglish; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/link/ProductH5UrlResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/link/ProductH5UrlResponse.java new file mode 100644 index 0000000000..e6626c6d2b --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/link/ProductH5UrlResponse.java @@ -0,0 +1,22 @@ +package com.binarywang.wxjava.store.bean.product.link; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 商品H5短链 结果 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class ProductH5UrlResponse extends WxStoreBaseResponse { + + /** 商品H5短链 */ + @JsonProperty("product_h5url") + private String productH5url; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/link/ProductQrCodeResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/link/ProductQrCodeResponse.java new file mode 100644 index 0000000000..ef81a1ea8c --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/link/ProductQrCodeResponse.java @@ -0,0 +1,22 @@ +package com.binarywang.wxjava.store.bean.product.link; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 商品二维码 结果 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class ProductQrCodeResponse extends WxStoreBaseResponse { + + /** 商品二维码 */ + @JsonProperty("product_qrcode") + private String productQrcode; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/link/ProductTagLinkResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/link/ProductTagLinkResponse.java new file mode 100644 index 0000000000..09e0e20785 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/link/ProductTagLinkResponse.java @@ -0,0 +1,22 @@ +package com.binarywang.wxjava.store.bean.product.link; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 商品口令 结果 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class ProductTagLinkResponse extends WxStoreBaseResponse { + + /** 商品口令 */ + @JsonProperty("product_taglink") + private String productTaglink; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/stock/StockFlowExtInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/stock/StockFlowExtInfo.java new file mode 100644 index 0000000000..0e770be173 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/stock/StockFlowExtInfo.java @@ -0,0 +1,44 @@ +package com.binarywang.wxjava.store.bean.product.stock; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 库存流水额外信息。 + */ +@Data +@NoArgsConstructor +public class StockFlowExtInfo implements Serializable { + + private static final long serialVersionUID = 1170328051641116647L; + + /** 归还的源库存子类型。 */ + @JsonProperty("unmove_from_stock_sub_type") + private Integer unmoveFromStockSubType; + + /** 分配的目标库存子类型。 */ + @JsonProperty("move_to_stock_sub_type") + private Integer moveToStockSubType; + + /** 操作来源。 */ + @JsonProperty("upload_source") + private Integer uploadSource; + + /** 订单 ID。 */ + @JsonProperty("order_id") + private String orderId; + + /** 区域仓库 ID。 */ + @JsonProperty("out_warehouse_id") + private String outWarehouseId; + + /** 限时抢购任务 ID。 */ + @JsonProperty("limited_discount_id") + private String limitedDiscountId; + + /** 达人的视频号 finder_id。 */ + @JsonProperty("finder_id") + private String finderId; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/stock/StockFlowInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/stock/StockFlowInfo.java new file mode 100644 index 0000000000..699ba4ba63 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/stock/StockFlowInfo.java @@ -0,0 +1,44 @@ +package com.binarywang.wxjava.store.bean.product.stock; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 库存流水信息。 + */ +@Data +@NoArgsConstructor +public class StockFlowInfo implements Serializable { + + private static final long serialVersionUID = 4094168882102603379L; + + /** 操作数量。 */ + @JsonProperty("amount") + private Integer amount; + + /** 操作前数量。 */ + @JsonProperty("beginning_amount") + private Integer beginningAmount; + + /** 操作后数量。 */ + @JsonProperty("ending_amount") + private Integer endingAmount; + + /** 库存子类型。 */ + @JsonProperty("stock_sub_type") + private Integer stockSubType; + + /** 库存事件类型。 */ + @JsonProperty("op_type") + private Integer opType; + + /** 流水发生时间,秒级时间戳。 */ + @JsonProperty("update_time") + private Long updateTime; + + /** 额外信息。 */ + @JsonProperty("ext_info") + private StockFlowExtInfo extInfo; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/stock/StockFlowParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/stock/StockFlowParam.java new file mode 100644 index 0000000000..96256e3a32 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/stock/StockFlowParam.java @@ -0,0 +1,57 @@ +package com.binarywang.wxjava.store.bean.product.stock; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 获取库存流水请求参数。 + */ +@Data +@NoArgsConstructor +public class StockFlowParam implements Serializable { + + private static final long serialVersionUID = -7882480822919984178L; + + /** 内部商品 ID。 */ + @JsonProperty("product_id") + private String productId; + + /** 内部 SKU ID。 */ + @JsonProperty("sku_id") + private String skuId; + + /** 库存类型。 */ + @JsonProperty("stock_type") + private Integer stockType; + + /** 达人的视频号 finder_id。 */ + @JsonProperty("finder_id") + private String finderId; + + /** 查询开始时间,秒级时间戳。 */ + @JsonProperty("begin_time") + private Long beginTime; + + /** 查询结束时间,秒级时间戳。 */ + @JsonProperty("end_time") + private Long endTime; + + /** 库存事件类型列表。 */ + @JsonProperty("op_type_list") + private List opTypeList; + + /** 每页数量。 */ + @JsonProperty("page_size") + private Integer pageSize; + + /** 上次请求返回的翻页上下文。 */ + @JsonProperty("next_key") + private String nextKey; + + /** 库存类型 ID。 */ + @JsonProperty("stock_type_id") + private String stockTypeId; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/stock/StockFlowResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/stock/StockFlowResponse.java new file mode 100644 index 0000000000..47ff793244 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/product/stock/StockFlowResponse.java @@ -0,0 +1,48 @@ +package com.binarywang.wxjava.store.bean.product.stock; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 获取库存流水响应。 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class StockFlowResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = -7420844779570799705L; + + /** 本次翻页的上下文。 */ + private String nextKey; + + /** 库存流水。 */ + private List stockFlowInfoList; + + @JsonProperty("data") + private void unpackData(StockFlowData data) { + if (data == null) { + return; + } + this.nextKey = data.getNextKey(); + this.stockFlowInfoList = data.getStockFlowInfoList(); + } + + @Data + @NoArgsConstructor + private static class StockFlowData implements Serializable { + + private static final long serialVersionUID = -5455751387420196045L; + + @JsonProperty("next_key") + private String nextKey; + + @JsonProperty("stock_flow_info_list") + private List stockFlowInfoList; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/qic/InspectCodeResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/qic/InspectCodeResponse.java new file mode 100644 index 0000000000..f21c38c20f --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/qic/InspectCodeResponse.java @@ -0,0 +1,114 @@ +package com.binarywang.wxjava.store.bean.qic; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +import java.io.Serializable; +import java.util.List; + +@Data +@NoArgsConstructor +@JsonInclude(JsonInclude.Include.NON_NULL) +public class InspectCodeResponse extends WxStoreBaseResponse { + private static final long serialVersionUID = -6242555695898612990L; + + private DataPayload data; + + @Data + @NoArgsConstructor + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class DataPayload implements Serializable { + private static final long serialVersionUID = 684071509005627272L; + + @JsonProperty("backupDeliveryId") + private String backupDeliveryId; + + @JsonProperty("backupDeliveryName") + private String backupDeliveryName; + + @JsonProperty("boxDTOList") + private List boxInfoList; + + @JsonProperty("channelAppId") + private String channelAppId; + + @JsonProperty("deliveryId") + private String deliveryId; + + @JsonProperty("deliveryName") + private String deliveryName; + + @JsonProperty("embedGoodsMaterial") + private String embedGoodsMaterial; + + @JsonProperty("goodsDesc") + private String goodsDesc; + + @JsonProperty("expressMerge") + private Boolean expressMerge; + + @JsonProperty("goodsMainMaterial") + private String goodsMainMaterial; + + @JsonProperty("goodsName") + private String goodsName; + + @JsonProperty("goodsNum") + private Integer goodsNum; + + @JsonProperty("goodsPartsMaterial") + private String goodsPartsMaterial; + + @JsonProperty("inspectBaseId") + private String inspectBaseId; + + @JsonProperty("inspectBaseName") + private String inspectBaseName; + + @JsonProperty("inspectCode") + private String inspectCode; + + @JsonProperty("inspectOrgId") + private String inspectOrgId; + + @JsonProperty("inspectOrgName") + private String inspectOrgName; + + @JsonProperty("inspectOrgShortName") + private String inspectOrgShortName; + + @JsonProperty("merchantName") + private String merchantName; + + @JsonProperty("orderId") + private String orderId; + + @JsonProperty("urgentOrder") + private Boolean urgentOrder; + + @JsonProperty("printInfo") + private String printInfo; + + @JsonProperty("needLabel") + private Boolean needLabel; + } + + @Data + @NoArgsConstructor + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class BoxInfo implements Serializable { + private static final long serialVersionUID = 4074623844069371776L; + + @JsonProperty("boxId") + private Long boxId; + + @JsonProperty("boxName") + private String boxName; + + @JsonProperty("boxNum") + private Integer boxNum; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/qic/InspectConfigResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/qic/InspectConfigResponse.java new file mode 100644 index 0000000000..986bd21950 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/qic/InspectConfigResponse.java @@ -0,0 +1,62 @@ +package com.binarywang.wxjava.store.bean.qic; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +import java.io.Serializable; + +@Data +@NoArgsConstructor +@JsonInclude(JsonInclude.Include.NON_NULL) +public class InspectConfigResponse extends WxStoreBaseResponse { + private static final long serialVersionUID = 6463651966377955876L; + + @JsonProperty("inspect_config") + private InspectConfig inspectConfig; + + @Data + @NoArgsConstructor + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class InspectConfig implements Serializable { + private static final long serialVersionUID = 5829846300579243328L; + + @JsonProperty("warehouse_id") + private String warehouseId; + + @JsonProperty("delivery_address") + private Address deliveryAddress; + + @JsonProperty("return_address") + private Address returnAddress; + + @JsonProperty("warehouse_name") + private String warehouseName; + + @JsonProperty("warehouse_addr") + private String warehouseAddr; + } + + @Data + @NoArgsConstructor + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class Address implements Serializable { + private static final long serialVersionUID = -664266740472865991L; + + @JsonProperty("contact_name") + private String contactName; + + @JsonProperty("contact_phone") + private String contactPhone; + + private String province; + + private String city; + + private String county; + + private String detail; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/qic/RegisterLogisticsRequest.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/qic/RegisterLogisticsRequest.java new file mode 100644 index 0000000000..5eba77a3d0 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/qic/RegisterLogisticsRequest.java @@ -0,0 +1,41 @@ +package com.binarywang.wxjava.store.bean.qic; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; +import java.util.List; + +@Data +@NoArgsConstructor +@JsonInclude(JsonInclude.Include.NON_NULL) +public class RegisterLogisticsRequest implements Serializable { + private static final long serialVersionUID = 4346443649534209624L; + + @JsonProperty("order_id_list") + private List orderIdList; + + @JsonProperty("logistics_info") + private LogisticsInfo logisticsInfo; + + @Data + @NoArgsConstructor + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class LogisticsInfo implements Serializable { + private static final long serialVersionUID = 8677143207727485993L; + + @JsonProperty("waybill_id") + private String waybillId; + + @JsonProperty("delivery_id") + private String deliveryId; + + @JsonProperty("delivery_name") + private String deliveryName; + + @JsonProperty("delivery_type") + private Integer deliveryType; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/qic/SubmitConfigResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/qic/SubmitConfigResponse.java new file mode 100644 index 0000000000..f97be87ab8 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/qic/SubmitConfigResponse.java @@ -0,0 +1,98 @@ +package com.binarywang.wxjava.store.bean.qic; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +import java.io.Serializable; +import java.util.List; + +@Data +@NoArgsConstructor +@JsonInclude(JsonInclude.Include.NON_NULL) +public class SubmitConfigResponse extends WxStoreBaseResponse { + private static final long serialVersionUID = 2456553692263326158L; + + @JsonProperty("submit_config") + private SubmitConfig submitConfig; + + @Data + @NoArgsConstructor + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class SubmitConfig implements Serializable { + private static final long serialVersionUID = 3286213539172123945L; + + @JsonProperty("delivery_list") + private List deliveryList; + + @JsonProperty("inspect_org_list") + private List inspectOrgList; + + @JsonProperty("charge_url") + private String chargeUrl; + } + + @Data + @NoArgsConstructor + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class Delivery implements Serializable { + private static final long serialVersionUID = -9209694824619490683L; + + private String id; + + private String name; + + @JsonProperty("delivery_products") + private List deliveryProducts; + } + + @Data + @NoArgsConstructor + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class DeliveryProduct implements Serializable { + private static final long serialVersionUID = 6527277159948670769L; + + private Long id; + + private String name; + + @JsonProperty("enable_insure") + private Integer enableInsure; + + @JsonProperty("insure_type_list") + private List insureTypeList; + } + + @Data + @NoArgsConstructor + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class InsureType implements Serializable { + private static final long serialVersionUID = -7788541278375899098L; + + private String id; + + private String name; + + @JsonProperty("upper_limit_type") + private Integer upperLimitType; + + @JsonProperty("upper_limit_amount") + private Long upperLimitAmount; + } + + @Data + @NoArgsConstructor + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class InspectOrg implements Serializable { + private static final long serialVersionUID = 1723422231048685194L; + + private String id; + + private String name; + + @JsonProperty("org_category") + private Integer orgCategory; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/qic/SubmitInspectRequest.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/qic/SubmitInspectRequest.java new file mode 100644 index 0000000000..821bbb5396 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/qic/SubmitInspectRequest.java @@ -0,0 +1,85 @@ +package com.binarywang.wxjava.store.bean.qic; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +@Data +@NoArgsConstructor +@JsonInclude(JsonInclude.Include.NON_NULL) +public class SubmitInspectRequest implements Serializable { + private static final long serialVersionUID = 6396115469552098613L; + + @JsonProperty("order_id") + private String orderId; + + @JsonProperty("inspect_info") + private InspectInfo inspectInfo; + + @Data + @NoArgsConstructor + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class InspectInfo implements Serializable { + private static final long serialVersionUID = -3502982646296821525L; + + @JsonProperty("delivery_id") + private String deliveryId; + + @JsonProperty("backup_delivery_id") + private String backupDeliveryId; + + @JsonProperty("express_insure") + private Boolean expressInsure; + + @JsonProperty("express_insure_amount") + private Long expressInsureAmount; + + @JsonProperty("express_merge") + private Boolean expressMerge; + + @JsonProperty("inspect_org_id") + private String inspectOrgId; + + @JsonProperty("refund_intercept") + private Integer refundIntercept; + + @JsonProperty("inspect_org_name") + private String inspectOrgName; + + @JsonProperty("warehouse_name") + private String warehouseName; + + @JsonProperty("warehouse_addr") + private String warehouseAddr; + + @JsonProperty("delivery_product_id") + private Long deliveryProductId; + + @JsonProperty("delivery_insure_id") + private String deliveryInsureId; + + @JsonProperty("backup_delivery_product_id") + private Long backupDeliveryProductId; + + @JsonProperty("backup_delivery_insure_id") + private String backupDeliveryInsureId; + + @JsonProperty("backup_express_insure") + private Boolean backupExpressInsure; + + @JsonProperty("backup_express_insure_amount") + private Long backupExpressInsureAmount; + + @JsonProperty("remark") + private String remark; + + @JsonProperty("agarwood_inspect_org_id") + private String agarwoodInspectOrgId; + + @JsonProperty("agarwood_inspect_org_name") + private String agarwoodInspectOrgName; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/sharer/FinderSceneInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/sharer/FinderSceneInfo.java new file mode 100644 index 0000000000..9031711410 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/sharer/FinderSceneInfo.java @@ -0,0 +1,38 @@ +package com.binarywang.wxjava.store.bean.sharer; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 视频号场景信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class FinderSceneInfo implements Serializable { + + private static final long serialVersionUID = 5298261857489231549L; + /** 视频号唯一标识 */ + @JsonProperty("promoter_id") + private String promoterId; + + /** 视频号昵称 */ + @JsonProperty("finder_nickname") + private String finderNickname; + + /** 直播间唯一标识 */ + @JsonProperty("live_export_id") + private String liveExportId; + + /** 短视频唯一标识 */ + @JsonProperty("video_export_id") + private String videoExportId; + + /** 短视频标题 */ + @JsonProperty("video_title") + private String videoTitle; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/sharer/SharerBindResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/sharer/SharerBindResponse.java new file mode 100644 index 0000000000..1a5645dde6 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/sharer/SharerBindResponse.java @@ -0,0 +1,31 @@ +package com.binarywang.wxjava.store.bean.sharer; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 分享员绑定响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class SharerBindResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 7078787380791500161L; + /** 邀请二维码的图片二进制base64编码,3天有效 */ + @JsonProperty("qrcode_img_base64") + private String qrcodeImgBase64; + + public String getQrcodeImgBase64() { + return qrcodeImgBase64; + } + + public void setQrcodeImgBase64(String qrcodeImgBase64) { + this.qrcodeImgBase64 = qrcodeImgBase64; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/sharer/SharerInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/sharer/SharerInfo.java new file mode 100644 index 0000000000..c1d56164f7 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/sharer/SharerInfo.java @@ -0,0 +1,39 @@ +package com.binarywang.wxjava.store.bean.sharer; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + + +/** + * 分享员信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class SharerInfo implements Serializable { + + private static final long serialVersionUID = -4373597470611742887L; + /** 分享员openid */ + @JsonProperty("openid") + private String openid; + + /** 分享员unionid */ + @JsonProperty("unionid") + private String unionid; + + /** 分享员openid */ + @JsonProperty("nickname") + private String nickname; + + /** 绑定时间 */ + @JsonProperty("bind_time") + private Long bindTime; + + /** 分享员类型 {@link com.binarywang.wxjava.store.enums.SharerType} */ + @JsonProperty("sharer_type") + private Integer sharerType; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/sharer/SharerInfoResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/sharer/SharerInfoResponse.java new file mode 100644 index 0000000000..e14ed04219 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/sharer/SharerInfoResponse.java @@ -0,0 +1,25 @@ +package com.binarywang.wxjava.store.bean.sharer; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 分享员信息响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class SharerInfoResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 1090517907546557929L; + /** 分享员信息 */ + @JsonProperty("sharer_info_list") + private List list; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/sharer/SharerListParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/sharer/SharerListParam.java new file mode 100644 index 0000000000..08f8e8924e --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/sharer/SharerListParam.java @@ -0,0 +1,30 @@ +package com.binarywang.wxjava.store.bean.sharer; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import com.binarywang.wxjava.store.bean.base.PageParam; + +/** + * @author Zeyes + */ +@Data +@EqualsAndHashCode(callSuper = true) +@JsonInclude(Include.NON_NULL) +public class SharerListParam extends PageParam { + + private static final long serialVersionUID = -2454284952706596246L; + /** 分享员类型 {@link com.binarywang.wxjava.store.enums.SharerType} */ + @JsonProperty("sharer_type") + private Integer sharerType; + + public SharerListParam() { + } + + public SharerListParam(Integer page, Integer pageSize, Integer sharerType) { + super(page, pageSize); + this.sharerType = sharerType; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/sharer/SharerOrder.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/sharer/SharerOrder.java new file mode 100644 index 0000000000..2051c4c9f5 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/sharer/SharerOrder.java @@ -0,0 +1,70 @@ +package com.binarywang.wxjava.store.bean.sharer; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 分享员订单 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class SharerOrder implements Serializable { + + private static final long serialVersionUID = 1528673402572025670L; + /** + * 订单号 + */ + @JsonProperty("order_id") + private String orderId; + + /** + * 分享场景 {@link com.binarywang.wxjava.store.enums.ShareScene} + */ + @JsonProperty("share_scene") + private Integer sharerScene; + + /** + * 分享员openid + */ + @JsonProperty("sharer_openid") + private String sharerOpenid; + + /** + * 分享员类型 {@link com.binarywang.wxjava.store.enums.SharerType} + */ + @JsonProperty("sharer_type") + private Integer sharerType; + + /** + * 商品sku_id + */ + @JsonProperty("sku_id") + private String skuId; + + + /** + * 商品唯一id + */ + @JsonProperty("product_id") + private String productId; + + + /** + * 是否从企微分享 + */ + @JsonProperty("from_wecom") + private Boolean fromWxWork; + + + /** + * 视频号场景信息 + */ + @JsonProperty("finder_scene_info") + private FinderSceneInfo sceneInfo; + + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/sharer/SharerOrderParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/sharer/SharerOrderParam.java new file mode 100644 index 0000000000..0aa2ac1a02 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/sharer/SharerOrderParam.java @@ -0,0 +1,36 @@ +package com.binarywang.wxjava.store.bean.sharer; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.PageParam; + +/** + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@JsonInclude(Include.NON_NULL) +public class SharerOrderParam extends PageParam { + + private static final long serialVersionUID = 5240085870008898601L; + /** 分享员openid */ + @JsonProperty("openid") + private String openid; + + /** 分享场景 */ + @JsonProperty("share_scene") + private Integer shareScene; + + /** 订单创建开始时间 */ + @JsonProperty("start_time") + private Long startTime; + + /** 订单创建结束时间 */ + @JsonProperty("end_time") + private Long endTime; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/sharer/SharerOrderResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/sharer/SharerOrderResponse.java new file mode 100644 index 0000000000..9cf6128844 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/sharer/SharerOrderResponse.java @@ -0,0 +1,24 @@ +package com.binarywang.wxjava.store.bean.sharer; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 分享员订单响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class SharerOrderResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 2807417719466178508L; + /** 分享员订单 */ + @JsonProperty("order_list") + private List list; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/sharer/SharerSearchParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/sharer/SharerSearchParam.java new file mode 100644 index 0000000000..1aaad02e6d --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/sharer/SharerSearchParam.java @@ -0,0 +1,32 @@ +package com.binarywang.wxjava.store.bean.sharer; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; + +/** + * @author Zeyes + */ +@Data +@JsonInclude(Include.NON_NULL) +public class SharerSearchParam implements Serializable { + + private static final long serialVersionUID = -6763899740755735718L; + /** 分享员openid */ + @JsonProperty("openid") + private String openid; + + /** 微信号 */ + @JsonProperty("username") + private String username; + + public SharerSearchParam() { + } + + public SharerSearchParam(String openid, String username) { + this.openid = openid; + this.username = username; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/sharer/SharerSearchResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/sharer/SharerSearchResponse.java new file mode 100644 index 0000000000..0d2fab5943 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/sharer/SharerSearchResponse.java @@ -0,0 +1,40 @@ +package com.binarywang.wxjava.store.bean.sharer; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 分享员绑定响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class SharerSearchResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = -5346019069466917659L; + /** 分享员openid */ + @JsonProperty("openid") + private String openid; + + /** 分享员unionid */ + @JsonProperty("unionid") + private String unionid; + + /** 分享员openid */ + @JsonProperty("nickname") + private String nickname; + + /** 绑定时间 */ + @JsonProperty("bind_time") + private Long bindTime; + + /** 分享员类型 {@link com.binarywang.wxjava.store.enums.SharerType} */ + @JsonProperty("sharer_type") + private Integer sharerType; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/sharer/SharerUnbindParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/sharer/SharerUnbindParam.java new file mode 100644 index 0000000000..5f2e3cebbb --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/sharer/SharerUnbindParam.java @@ -0,0 +1,25 @@ +package com.binarywang.wxjava.store.bean.sharer; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@JsonInclude(Include.NON_NULL) +public class SharerUnbindParam implements Serializable { + + private static final long serialVersionUID = -4515654492511136037L; + /** openid列表 */ + @JsonProperty("openid_list") + private List openIds; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/sharer/SharerUnbindResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/sharer/SharerUnbindResponse.java new file mode 100644 index 0000000000..a1f4648fbf --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/sharer/SharerUnbindResponse.java @@ -0,0 +1,32 @@ +package com.binarywang.wxjava.store.bean.sharer; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 分享员解绑响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class SharerUnbindResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = -2395560383862569445L; + /** 成功列表 */ + @JsonProperty("success_openid") + private List successList; + + /** 失败列表,可重试 */ + @JsonProperty("fail_openid") + private List failList; + + /** 拒绝列表,不可重试(openid错误,未到解绑时间等) */ + @JsonProperty("refuse_openid") + private List refuseList; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/shop/ShopH5UrlResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/shop/ShopH5UrlResponse.java new file mode 100644 index 0000000000..2d2c1bcc16 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/shop/ShopH5UrlResponse.java @@ -0,0 +1,22 @@ +package com.binarywang.wxjava.store.bean.shop; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 店铺H5链接 响应 + * + * @author GitHub Copilot + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class ShopH5UrlResponse extends WxStoreBaseResponse { + + /** 店铺H5链接 */ + @JsonProperty("shop_h5url") + private String shopH5url; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/shop/ShopInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/shop/ShopInfo.java new file mode 100644 index 0000000000..dc9da3d4ae --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/shop/ShopInfo.java @@ -0,0 +1,36 @@ +package com.binarywang.wxjava.store.bean.shop; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 店铺信息 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class ShopInfo implements Serializable { + + /** 店铺名称 */ + @JsonProperty("nickname") + private String nickname; + + /** 店铺头像URL */ + @JsonProperty("headimg_url") + private String headImgUrl; + + /** 店铺类型,目前为"企业"或"个体工商户" */ + @JsonProperty("subject_type") + private String subjectType; + + /** 店铺状态,目前为 opening 或 open_finished 或 closing 或 close_finished */ + @JsonProperty("status") + private String status; + + /** 店铺原始ID */ + @JsonProperty("username") + private String username; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/shop/ShopInfoResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/shop/ShopInfoResponse.java new file mode 100644 index 0000000000..8e6e28d5f3 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/shop/ShopInfoResponse.java @@ -0,0 +1,19 @@ +package com.binarywang.wxjava.store.bean.shop; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 店铺基本信息响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class ShopInfoResponse extends WxStoreBaseResponse { + + @JsonProperty("info") + private ShopInfo info; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/shop/ShopQrCodeResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/shop/ShopQrCodeResponse.java new file mode 100644 index 0000000000..32edf22fc0 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/shop/ShopQrCodeResponse.java @@ -0,0 +1,22 @@ +package com.binarywang.wxjava.store.bean.shop; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 店铺二维码 响应 + * + * @author GitHub Copilot + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class ShopQrCodeResponse extends WxStoreBaseResponse { + + /** 店铺二维码链接 */ + @JsonProperty("shop_qrcode") + private String shopQrcode; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/shop/ShopTagLinkResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/shop/ShopTagLinkResponse.java new file mode 100644 index 0000000000..5fb610dbcd --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/shop/ShopTagLinkResponse.java @@ -0,0 +1,22 @@ +package com.binarywang.wxjava.store.bean.shop; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 店铺口令 响应 + * + * @author GitHub Copilot + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class ShopTagLinkResponse extends WxStoreBaseResponse { + + /** 店铺微信口令 */ + @JsonProperty("shop_taglink") + private String shopTaglink; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/supplier/DistributeTypeResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/supplier/DistributeTypeResponse.java new file mode 100644 index 0000000000..12e05eb06c --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/supplier/DistributeTypeResponse.java @@ -0,0 +1,25 @@ +package com.binarywang.wxjava.store.bean.supplier; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 分配方式响应。 + * + * @author GitHub Copilot + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class DistributeTypeResponse extends WxStoreBaseResponse { + private static final long serialVersionUID = -750860556286328053L; + + @JsonProperty("distribute_type") + private Integer distributeType; + + @JsonProperty("supplier_info") + private SupplierInfo supplierInfo; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/supplier/DropshipAssignRequest.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/supplier/DropshipAssignRequest.java new file mode 100644 index 0000000000..1464d26baf --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/supplier/DropshipAssignRequest.java @@ -0,0 +1,25 @@ +package com.binarywang.wxjava.store.bean.supplier; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 代发单分配请求。 + * + * @author GitHub Copilot + */ +@Data +@NoArgsConstructor +@JsonInclude(JsonInclude.Include.NON_NULL) +public class DropshipAssignRequest implements Serializable { + private static final long serialVersionUID = 6945436332042017565L; + + @JsonProperty("order_id") + private String orderId; + + @JsonProperty("supplier_id") + private String supplierId; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/supplier/DropshipDetailResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/supplier/DropshipDetailResponse.java new file mode 100644 index 0000000000..2fbeaaba9f --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/supplier/DropshipDetailResponse.java @@ -0,0 +1,22 @@ +package com.binarywang.wxjava.store.bean.supplier; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 代发单详情响应。 + * + * @author GitHub Copilot + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class DropshipDetailResponse extends WxStoreBaseResponse { + private static final long serialVersionUID = 5548774863400272707L; + + @JsonProperty("dropship_info") + private DropshipInfo dropshipInfo; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/supplier/DropshipInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/supplier/DropshipInfo.java new file mode 100644 index 0000000000..23eb974217 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/supplier/DropshipInfo.java @@ -0,0 +1,37 @@ +package com.binarywang.wxjava.store.bean.supplier; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 代发单信息。 + * + * @author GitHub Copilot + */ +@Data +@NoArgsConstructor +@JsonInclude(JsonInclude.Include.NON_NULL) +public class DropshipInfo implements Serializable { + private static final long serialVersionUID = -7880364210849039278L; + + @JsonProperty("order_id") + private String orderId; + + @JsonProperty("supplier_id") + private String supplierId; + + @JsonProperty("ds_order_id") + private String dropshipId; + + @JsonProperty("status") + private Integer status; + + @JsonProperty("create_time") + private Long createTime; + + @JsonProperty("update_time") + private Long updateTime; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/supplier/DropshipListRequest.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/supplier/DropshipListRequest.java new file mode 100644 index 0000000000..cbf00ddbb2 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/supplier/DropshipListRequest.java @@ -0,0 +1,37 @@ +package com.binarywang.wxjava.store.bean.supplier; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 代发单列表请求。 + * + * @author GitHub Copilot + */ +@Data +@NoArgsConstructor +@JsonInclude(JsonInclude.Include.NON_NULL) +public class DropshipListRequest implements Serializable { + private static final long serialVersionUID = 2638071229335192596L; + + @JsonProperty("supplier_id") + private String supplierId; + + @JsonProperty("status") + private Integer status; + + @JsonProperty("create_time_start") + private Long createTimeStart; + + @JsonProperty("create_time_end") + private Long createTimeEnd; + + @JsonProperty("page_size") + private Integer pageSize; + + @JsonProperty("next_key") + private String nextKey; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/supplier/DropshipListResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/supplier/DropshipListResponse.java new file mode 100644 index 0000000000..ae6970896c --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/supplier/DropshipListResponse.java @@ -0,0 +1,29 @@ +package com.binarywang.wxjava.store.bean.supplier; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 代发单列表响应。 + * + * @author GitHub Copilot + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class DropshipListResponse extends WxStoreBaseResponse { + private static final long serialVersionUID = -2850183412032417307L; + + @JsonProperty("dropship_list") + private List dropshipList; + + @JsonProperty("next_key") + private String nextKey; + + @JsonProperty("has_more") + private Boolean hasMore; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/supplier/DropshipResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/supplier/DropshipResponse.java new file mode 100644 index 0000000000..ccb9a2a294 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/supplier/DropshipResponse.java @@ -0,0 +1,28 @@ +package com.binarywang.wxjava.store.bean.supplier; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 代发单分配响应。 + * + * @author GitHub Copilot + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class DropshipResponse extends WxStoreBaseResponse { + private static final long serialVersionUID = 4376618566823584629L; + + @JsonProperty("order_id") + private String orderId; + + @JsonProperty("supplier_id") + private String supplierId; + + @JsonProperty("dropship_id") + private String dropshipId; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/supplier/DropshipSearchRequest.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/supplier/DropshipSearchRequest.java new file mode 100644 index 0000000000..bff9140194 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/supplier/DropshipSearchRequest.java @@ -0,0 +1,26 @@ +package com.binarywang.wxjava.store.bean.supplier; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * 代发单搜索请求。 + * + * @author GitHub Copilot + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +public class DropshipSearchRequest extends DropshipListRequest { + private static final long serialVersionUID = 3915264648809784742L; + + @JsonProperty("order_id") + private String orderId; + + @JsonProperty("dropship_id") + private String dropshipId; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/supplier/ProductDistributeRequest.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/supplier/ProductDistributeRequest.java new file mode 100644 index 0000000000..5739819040 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/supplier/ProductDistributeRequest.java @@ -0,0 +1,26 @@ +package com.binarywang.wxjava.store.bean.supplier; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 按商品自动分配请求。 + * + * @author GitHub Copilot + */ +@Data +@NoArgsConstructor +@JsonInclude(JsonInclude.Include.NON_NULL) +public class ProductDistributeRequest implements Serializable { + private static final long serialVersionUID = 4201609097231290078L; + + @JsonProperty("supplier_id") + private String supplierId; + + @JsonProperty("product_id_list") + private List productIdList; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/supplier/ProductListResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/supplier/ProductListResponse.java new file mode 100644 index 0000000000..0ea41f7ec1 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/supplier/ProductListResponse.java @@ -0,0 +1,42 @@ +package com.binarywang.wxjava.store.bean.supplier; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 按商品自动分配商品列表响应。 + * + * @author GitHub Copilot + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class ProductListResponse extends WxStoreBaseResponse { + private static final long serialVersionUID = -7096250227033388295L; + + @JsonProperty("product_list") + private List productList; + + @JsonProperty("next_key") + private String nextKey; + + @JsonProperty("has_more") + private Boolean hasMore; + + @Data + @NoArgsConstructor + public static class ProductInfo implements Serializable { + private static final long serialVersionUID = -4482299212575966325L; + + @JsonProperty("product_id") + private String productId; + + @JsonProperty("supplier_id") + private String supplierId; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/supplier/SupplierInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/supplier/SupplierInfo.java new file mode 100644 index 0000000000..f13541dc2f --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/supplier/SupplierInfo.java @@ -0,0 +1,28 @@ +package com.binarywang.wxjava.store.bean.supplier; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 供货商信息。 + * + * @author GitHub Copilot + */ +@Data +@NoArgsConstructor +@JsonInclude(JsonInclude.Include.NON_NULL) +public class SupplierInfo implements Serializable { + private static final long serialVersionUID = -6480813119738259476L; + + @JsonProperty("supplier_id") + private String supplierId; + + @JsonProperty("supplier_name") + private String supplierName; + + @JsonProperty("status") + private Integer status; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/supplier/SupplierInfoResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/supplier/SupplierInfoResponse.java new file mode 100644 index 0000000000..db890c9e8c --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/supplier/SupplierInfoResponse.java @@ -0,0 +1,22 @@ +package com.binarywang.wxjava.store.bean.supplier; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 供货商信息响应。 + * + * @author GitHub Copilot + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class SupplierInfoResponse extends WxStoreBaseResponse { + private static final long serialVersionUID = -3071464065836573893L; + + @JsonProperty("supplier_info") + private SupplierInfo supplierInfo; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/supplier/SupplierListResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/supplier/SupplierListResponse.java new file mode 100644 index 0000000000..8c72261773 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/supplier/SupplierListResponse.java @@ -0,0 +1,29 @@ +package com.binarywang.wxjava.store.bean.supplier; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 供货商列表响应。 + * + * @author GitHub Copilot + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class SupplierListResponse extends WxStoreBaseResponse { + private static final long serialVersionUID = -692609589633695295L; + + @JsonProperty("supplier_list") + private List supplierList; + + @JsonProperty("next_key") + private String nextKey; + + @JsonProperty("has_more") + private Boolean hasMore; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/talent/TalentOrderDetailParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/talent/TalentOrderDetailParam.java new file mode 100644 index 0000000000..9410af5c2c --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/talent/TalentOrderDetailParam.java @@ -0,0 +1,32 @@ +package com.binarywang.wxjava.store.bean.talent; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 带货助手-获取佣金单详情 请求参数 + * + * @author GitHub Copilot + */ +@Data +@NoArgsConstructor +@JsonInclude(JsonInclude.Include.NON_NULL) +public class TalentOrderDetailParam implements Serializable { + + private static final long serialVersionUID = 8741285036412736219L; + + /** 订单号,可从获取佣金单列表接口获得 */ + @JsonProperty("order_id") + private String orderId; + + /** 商品skuid,可从获取佣金单列表接口获得 */ + @JsonProperty("sku_id") + private String skuId; + + /** 订单额外参数【在订单列表里面返回的参数回传】 */ + @JsonProperty("special_id") + private String specialId; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/talent/TalentOrderDetailResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/talent/TalentOrderDetailResponse.java new file mode 100644 index 0000000000..ca8e972a61 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/talent/TalentOrderDetailResponse.java @@ -0,0 +1,203 @@ +package com.binarywang.wxjava.store.bean.talent; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 带货助手-获取佣金单详情 响应 + * + * @author GitHub Copilot + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class TalentOrderDetailResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 2174806923145876312L; + + /** 订单基础信息 */ + @JsonProperty("base_info") + private BaseInfo baseInfo; + + /** 订单佣金信息 */ + @JsonProperty("commission_info") + private CommissionInfo commissionInfo; + + /** 下单通道信息 */ + @JsonProperty("channel_info") + private StoreInfo channelInfo; + + /** 内容推广推客机构信息 */ + @JsonProperty("promotion_head_supplier_info") + private PromotionHeadSupplierInfo promotionHeadSupplierInfo; + + /** 商品信息 */ + @JsonProperty("product_info") + private ProductInfo productInfo; + + /** 订单基础信息 */ + @Data + @NoArgsConstructor + public static class BaseInfo implements Serializable { + + private static final long serialVersionUID = 6382947162830498251L; + + /** 订单id */ + @JsonProperty("order_id") + private String orderId; + + /** 商品spuid */ + @JsonProperty("spu_id") + private String spuId; + + /** 商品skuid */ + @JsonProperty("sku_id") + private String skuId; + + /** 特殊id【针对本地生活】 */ + @JsonProperty("special_id") + private String specialId; + + /** + * 订单状态:1=待支付, 2=待发货, 3=已发货, 4=已收货, 5=售后中, 6=已完成, 7=已取消, 8=已退款, 9=部分退款, 10=待使用 + */ + @JsonProperty("order_status") + private Integer orderStatus; + + /** 实际支付金额【单位:分】 */ + @JsonProperty("actual_payment") + private String actualPayment; + + /** 订单创建时间 */ + @JsonProperty("order_create_time") + private Long orderCreateTime; + + /** 订单更新时间 */ + @JsonProperty("order_update_time") + private Long orderUpdateTime; + + /** 下单用户 */ + @JsonProperty("buyer_info") + private BuyerInfo buyerInfo; + + /** 订单支付时间 */ + @JsonProperty("order_pay_time") + private Long orderPayTime; + + /** 订单的分佣基数【单位:分】 */ + @JsonProperty("settle_payment") + private String settlePayment; + } + + /** 下单用户信息 */ + @Data + @NoArgsConstructor + public static class BuyerInfo implements Serializable { + + private static final long serialVersionUID = 4729638451027364819L; + + /** 下单用户的openid */ + @JsonProperty("open_id") + private String openId; + + /** 下单用户的unionid */ + @JsonProperty("union_id") + private String unionId; + } + + /** 订单佣金信息 */ + @Data + @NoArgsConstructor + public static class CommissionInfo implements Serializable { + + private static final long serialVersionUID = -3819264037182640581L; + + /** 佣金单状态:1=待结算, 2=已结算, 3=取消结算, 4=结算异常 */ + @JsonProperty("state") + private Integer state; + + /** 佣金比例 */ + @JsonProperty("ratio") + private String ratio; + + /** 预期结算时间 */ + @JsonProperty("expect_settle_time") + private Long expectSettleTime; + + /** 预期结算金额 */ + @JsonProperty("expect_settlement") + private String expectSettlement; + + /** 实际结算时间 */ + @JsonProperty("actual_settle_time") + private Long actualSettleTime; + + /** 实际结算金额 */ + @JsonProperty("actual_settlement") + private String actualSettlement; + } + + /** 下单通道信息 */ + @Data + @NoArgsConstructor + public static class StoreInfo implements Serializable { + + private static final long serialVersionUID = 7364918204736159023L; + + /** 渠道类型:1=视频号, 2=公众号 */ + @JsonProperty("channel_type") + private Integer channelType; + + /** 渠道id */ + @JsonProperty("channel_id") + private String channelId; + + /** 渠道名称 */ + @JsonProperty("channel_name") + private String channelName; + } + + /** 内容推广推客机构信息 */ + @Data + @NoArgsConstructor + public static class PromotionHeadSupplierInfo implements Serializable { + + private static final long serialVersionUID = 1826374950183647291L; + + /** 机构id */ + @JsonProperty("id") + private String id; + + /** 机构名称 */ + @JsonProperty("name") + private String name; + + /** 佣金单比例 */ + @JsonProperty("ratio") + private String ratio; + + /** 佣金 */ + @JsonProperty("fee") + private String fee; + } + + /** 商品信息 */ + @Data + @NoArgsConstructor + public static class ProductInfo implements Serializable { + + private static final long serialVersionUID = -4920183645872916370L; + + /** 商品的标题 */ + @JsonProperty("title") + private String title; + + /** 商品的头图 */ + @JsonProperty("thumb_img") + private String thumbImg; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/talent/TalentOrderListParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/talent/TalentOrderListParam.java new file mode 100644 index 0000000000..2d95d99a68 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/talent/TalentOrderListParam.java @@ -0,0 +1,52 @@ +package com.binarywang.wxjava.store.bean.talent; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 带货助手-获取佣金单列表 请求参数 + * + * @author GitHub Copilot + */ +@Data +@NoArgsConstructor +@JsonInclude(JsonInclude.Include.NON_NULL) +public class TalentOrderListParam implements Serializable { + + private static final long serialVersionUID = -6218342185316399261L; + + /** 佣金单创建时间范围之开始时间【和更新时间范围二选一】 */ + @JsonProperty("create_time_gt") + private Long createTimeGt; + + /** 佣金单创建时间范围之结束时间【和更新时间范围二选一】 */ + @JsonProperty("create_time_lt") + private Long createTimeLt; + + /** 订单 ID 过滤 */ + @JsonProperty("order_id") + private String orderId; + + /** 商品 id 过滤 */ + @JsonProperty("spu_id") + private String spuId; + + /** 佣金单更新时间范围之开始时间【和创建时间范围二选一】 */ + @JsonProperty("update_time_gt") + private Long updateTimeGt; + + /** 佣金单更新时间范围之结束时间【和创建时间范围二选一】 */ + @JsonProperty("update_time_lt") + private Long updateTimeLt; + + /** 单页佣金单数(不超过10) */ + @JsonProperty("page_size") + private Integer pageSize; + + /** 由上次请求返回,顺序翻页时需要传入, 会从上次返回的结果往后翻一页 */ + @JsonProperty("next_key") + private String nextKey; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/talent/TalentOrderListResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/talent/TalentOrderListResponse.java new file mode 100644 index 0000000000..a6cb5a1701 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/talent/TalentOrderListResponse.java @@ -0,0 +1,54 @@ +package com.binarywang.wxjava.store.bean.talent; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 带货助手-获取佣金单列表 响应 + * + * @author GitHub Copilot + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class TalentOrderListResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 3541802319654186172L; + + /** 佣金单信息列表 */ + @JsonProperty("order_list") + private List orderList; + + /** 是否还有剩余订单 */ + @JsonProperty("has_more") + private Boolean hasMore; + + /** 本次翻页的上下文,用于顺序翻页请求 */ + @JsonProperty("next_key") + private String nextKey; + + /** 佣金单基础信息 */ + @Data + @NoArgsConstructor + public static class OrderInfo implements Serializable { + + private static final long serialVersionUID = 5261736494628827543L; + + /** 订单id */ + @JsonProperty("order_id") + private String orderId; + + /** skuid */ + @JsonProperty("sku_id") + private String skuId; + + /** 佣金单特殊标识【目前主要用于本地生活】 */ + @JsonProperty("special_id") + private String specialId; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/talent/TalentWindowProductDetailParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/talent/TalentWindowProductDetailParam.java new file mode 100644 index 0000000000..35050e1ca8 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/talent/TalentWindowProductDetailParam.java @@ -0,0 +1,24 @@ +package com.binarywang.wxjava.store.bean.talent; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 带货助手-获取达人橱窗商品详情 请求参数 + * + * @author GitHub Copilot + */ +@Data +@NoArgsConstructor +@JsonInclude(JsonInclude.Include.NON_NULL) +public class TalentWindowProductDetailParam implements Serializable { + + private static final long serialVersionUID = 3849271605183749261L; + + /** 橱窗商品ID(可以从"获取达人橱窗商品列表"接口获取) */ + @JsonProperty("product_id") + private String productId; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/talent/TalentWindowProductDetailResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/talent/TalentWindowProductDetailResponse.java new file mode 100644 index 0000000000..c08937732c --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/talent/TalentWindowProductDetailResponse.java @@ -0,0 +1,81 @@ +package com.binarywang.wxjava.store.bean.talent; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 带货助手-获取达人橱窗商品详情 响应 + * + * @author GitHub Copilot + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class TalentWindowProductDetailResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 1634829710537264918L; + + /** 橱窗商品详情 */ + @JsonProperty("product") + private ProductDetail product; + + /** 橱窗商品详情 */ + @Data + @NoArgsConstructor + public static class ProductDetail implements Serializable { + + private static final long serialVersionUID = 7283640192847516039L; + + /** 橱窗商品ID */ + @JsonProperty("product_id") + private String productId; + + /** 商品来源店铺的appid */ + @JsonProperty("appid") + private String appid; + + /** 商品在货源店铺的商品ID,对于带货商品会返回 */ + @JsonProperty("out_product_id") + private String outProductId; + + /** 商品标题 */ + @JsonProperty("title") + private String title; + + /** 商品头图url */ + @JsonProperty("img_url") + private String imgUrl; + + /** 商品所属叶子类目(品类)ID */ + @JsonProperty("leaf_category_id") + private Long leafCategoryId; + + /** 商品状态:1=生效中,2=被禁止售卖 */ + @JsonProperty("status") + private Integer status; + + /** 价格区间最小值(单位分,销售价) */ + @JsonProperty("selling_price") + private Long sellingPrice; + + /** 剩余库存 */ + @JsonProperty("stock") + private Long stock; + + /** 销量 */ + @JsonProperty("sales") + private Long sales; + + /** 是否在橱窗设置对外隐藏 */ + @JsonProperty("is_hide") + private Boolean isHide; + + /** 用于在小程序跳转小店场景添加商品时传递跟佣信息 */ + @JsonProperty("product_promotion_link") + private String productPromotionLink; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/talent/TalentWindowProductListParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/talent/TalentWindowProductListParam.java new file mode 100644 index 0000000000..61e763d36e --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/talent/TalentWindowProductListParam.java @@ -0,0 +1,32 @@ +package com.binarywang.wxjava.store.bean.talent; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 带货助手-获取达人橱窗商品列表 请求参数 + * + * @author GitHub Copilot + */ +@Data +@NoArgsConstructor +@JsonInclude(JsonInclude.Include.NON_NULL) +public class TalentWindowProductListParam implements Serializable { + + private static final long serialVersionUID = 7419836250174638291L; + + /** 单页商品数(不超过500) */ + @JsonProperty("page_size") + private Integer pageSize; + + /** 页面下标,下标从1开始(不可以与 lastBuffer 一起填写) */ + @JsonProperty("page_index") + private Integer pageIndex; + + /** 由上次请求返回,顺序翻页时需要传入(不可以与 pageIndex 一起填写) */ + @JsonProperty("last_buffer") + private String lastBuffer; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/talent/TalentWindowProductListResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/talent/TalentWindowProductListResponse.java new file mode 100644 index 0000000000..1a610d5af8 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/talent/TalentWindowProductListResponse.java @@ -0,0 +1,58 @@ +package com.binarywang.wxjava.store.bean.talent; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 带货助手-获取达人橱窗商品列表 响应 + * + * @author GitHub Copilot + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class TalentWindowProductListResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 8263047195826340712L; + + /** 橱窗商品列表 */ + @JsonProperty("products") + private List products; + + /** 本次翻页的上下文,用于顺序翻页请求 */ + @JsonProperty("last_buffer") + private String lastBuffer; + + /** 橱窗商品基础信息 */ + @Data + @NoArgsConstructor + public static class ProductInfo implements Serializable { + + private static final long serialVersionUID = 6142837490516284039L; + + /** 橱窗商品id */ + @JsonProperty("product_id") + private String productId; + + /** 对于自营商品会返回,代表商品来源店铺的appid */ + @JsonProperty("appid") + private String appid; + + /** + * 商品来源:1=来源店铺的自营商品,2=来源选品中心的带货商品 + */ + @JsonProperty("product_source") + private Integer productSource; + + /** + * 对于带货商品会返回,代表商品在货源小店中的商品id + */ + @JsonProperty("out_product_id") + private String outProductId; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/token/StableTokenParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/token/StableTokenParam.java new file mode 100644 index 0000000000..06467a37be --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/token/StableTokenParam.java @@ -0,0 +1,34 @@ +package com.binarywang.wxjava.store.bean.token; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * 稳定版access_token,请求参数 + * + * @author asushiye + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@JsonInclude(JsonInclude.Include.NON_NULL) +public class StableTokenParam implements Serializable { + private static final long serialVersionUID = 6849364823232834171L; + + @JsonProperty("grant_type") + private String grantType; + + @JsonProperty("appid") + private String appId; + + @JsonProperty("secret") + private String secret; + + @JsonProperty("force_refresh") + private Boolean forceRefresh; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/vip/ScoreInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/vip/ScoreInfo.java new file mode 100644 index 0000000000..5a4c48b4d9 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/vip/ScoreInfo.java @@ -0,0 +1,23 @@ +package com.binarywang.wxjava.store.bean.vip; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * 微信小店-会员功能 - 订单详情 + * + * @author asushiye + * + */ +@Data +@NoArgsConstructor +public class ScoreInfo implements Serializable { + + private static final long serialVersionUID = -3290653233070826576L; + /** 积分 */ + @JsonProperty("score") + protected String score; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/vip/UserGradeInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/vip/UserGradeInfo.java new file mode 100644 index 0000000000..c4dbf7ebf9 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/vip/UserGradeInfo.java @@ -0,0 +1,27 @@ +package com.binarywang.wxjava.store.bean.vip; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * 微信小店-会员功能 - 用户等级信息 + * + * @author asushiye + * + */ +@Data +@NoArgsConstructor +public class UserGradeInfo implements Serializable { + + private static final long serialVersionUID = -8040963202754069865L; + /** 等级编号 */ + @JsonProperty("grade") + protected Integer grade; + + /** 用户经验值 */ + @JsonProperty("experience_value") + protected String experienceValue; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/vip/UserInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/vip/UserInfo.java new file mode 100644 index 0000000000..61d7ea50d5 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/vip/UserInfo.java @@ -0,0 +1,23 @@ +package com.binarywang.wxjava.store.bean.vip; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * 微信小店-会员功能 - 订单详情 + * + * @author asushiye + * + */ +@Data +@NoArgsConstructor +public class UserInfo implements Serializable { + + private static final long serialVersionUID = 8523354700203385190L; + /** 手机号 */ + @JsonProperty("phone_number") + protected String phoneNumber; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/vip/VipGradeParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/vip/VipGradeParam.java new file mode 100644 index 0000000000..df5403c59a --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/vip/VipGradeParam.java @@ -0,0 +1,31 @@ +package com.binarywang.wxjava.store.bean.vip; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * @author : zhenyun.su + * @since : 2023/10/8 + + */ + +@Data +@NoArgsConstructor +@JsonInclude(JsonInclude.Include.NON_NULL) +@AllArgsConstructor +public class VipGradeParam implements Serializable { + + + private static final long serialVersionUID = 8672089025435220864L; + @JsonProperty("openid") + private String openId; + + @JsonProperty("grade") + private Integer grade; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/vip/VipInfo.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/vip/VipInfo.java new file mode 100644 index 0000000000..684907f488 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/vip/VipInfo.java @@ -0,0 +1,47 @@ +package com.binarywang.wxjava.store.bean.vip; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * 微信小店-会员功能 - 订单详情 + * + * @author asushiye + * + * "info": { + * "openid": "OPENID", + * "unionid": "UNIONID", + * "user_info": { + * "phone_number": "123456789" + * }, + * "user_grade_info": { + * "grade": 1, + * "experience_value": "100" + * } + * } + */ +@Data +@NoArgsConstructor +public class VipInfo implements Serializable { + private static final long serialVersionUID = -215590991862774701L; + + /** 视频号openid */ + @JsonProperty("openid") + protected String openId; + + /** 视频号union_id */ + @JsonProperty("union_id") + protected String unionId; + + /** 用户信息 */ + @JsonProperty("user_info") + protected UserInfo userInfo; + + /** 用户等级信息 */ + @JsonProperty("user_grade_info") + protected UserGradeInfo userGradeInfo; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/vip/VipInfoParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/vip/VipInfoParam.java new file mode 100644 index 0000000000..4beb76639d --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/vip/VipInfoParam.java @@ -0,0 +1,27 @@ +package com.binarywang.wxjava.store.bean.vip; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * @author : zhenyun.su + * @since : 2023/10/8 + */ + +@Data +@NoArgsConstructor +@JsonInclude(JsonInclude.Include.NON_NULL) +@AllArgsConstructor +public class VipInfoParam implements Serializable { + private static final long serialVersionUID = -4196252299609288196L; + @JsonProperty("openid") + private String openId; + + @JsonProperty("need_phone_number") + private Boolean needPhoneNumber; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/vip/VipInfoResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/vip/VipInfoResponse.java new file mode 100644 index 0000000000..b03468de2e --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/vip/VipInfoResponse.java @@ -0,0 +1,20 @@ +package com.binarywang.wxjava.store.bean.vip; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * @author : zhenyun.su + * @since : 2023/10/8 + */ + +@Data +@NoArgsConstructor +public class VipInfoResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = -2439510304690862381L; + @JsonProperty("info") + private VipInfo vipInfo; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/vip/VipListParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/vip/VipListParam.java new file mode 100644 index 0000000000..ca0545a29e --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/vip/VipListParam.java @@ -0,0 +1,32 @@ +package com.binarywang.wxjava.store.bean.vip; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * @author : zhenyun.su + * @since : 2023/10/8 + */ + +@Data +@NoArgsConstructor +@JsonInclude(JsonInclude.Include.NON_NULL) +@AllArgsConstructor +public class VipListParam implements Serializable { + + private static final long serialVersionUID = 7503422865410116202L; + @JsonProperty("need_phone_number") + private Boolean needPhoneNumber; + + @JsonProperty("page_num") + private Integer pageNum; + + @JsonProperty("page_size") + private Integer pageSize; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/vip/VipListResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/vip/VipListResponse.java new file mode 100644 index 0000000000..8382c67291 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/vip/VipListResponse.java @@ -0,0 +1,25 @@ +package com.binarywang.wxjava.store.bean.vip; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +import java.util.List; + +/** + * @author : zhenyun.su + * @since : 2023/10/8 + */ + +@Data +@NoArgsConstructor +public class VipListResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = -8127372979925053579L; + @JsonProperty("list") + private List vipInfos; + + @JsonProperty("total_num") + private Long totalNum; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/vip/VipOpenIdParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/vip/VipOpenIdParam.java new file mode 100644 index 0000000000..fe844ad555 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/vip/VipOpenIdParam.java @@ -0,0 +1,24 @@ +package com.binarywang.wxjava.store.bean.vip; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * @author : zhenyun.su + * @since : 2023/10/8 + */ + +@Data +@NoArgsConstructor +@JsonInclude(JsonInclude.Include.NON_NULL) +@AllArgsConstructor +public class VipOpenIdParam implements Serializable { + private static final long serialVersionUID = -7924178026258012317L; + @JsonProperty("openid") + private String openId; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/vip/VipScoreParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/vip/VipScoreParam.java new file mode 100644 index 0000000000..6e2050d0d8 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/vip/VipScoreParam.java @@ -0,0 +1,39 @@ +package com.binarywang.wxjava.store.bean.vip; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * @author : zhenyun.su + * @since : 2023/10/8 + * { + * "openid": "OPENID", + * "score": "100", + * "remark": "备注", + * "request_id": "REQUEST_ID" + * } + */ + +@Data +@NoArgsConstructor +@JsonInclude(JsonInclude.Include.NON_NULL) +@AllArgsConstructor +public class VipScoreParam implements Serializable { + private static final long serialVersionUID = -4122983978977407168L; + @JsonProperty("openid") + private String openId; + + @JsonProperty("score") + private String score; + + @JsonProperty("remark") + private String remark; + + @JsonProperty("request_id") + private String requestId; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/vip/VipScoreResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/vip/VipScoreResponse.java new file mode 100644 index 0000000000..42196385a6 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/vip/VipScoreResponse.java @@ -0,0 +1,20 @@ +package com.binarywang.wxjava.store.bean.vip; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * @author : zhenyun.su + * @since : 2023/10/8 + */ + +@Data +@NoArgsConstructor +public class VipScoreResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = -7252972818862693546L; + @JsonProperty("info") + private ScoreInfo scoreInfo; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/warehouse/LocationPriorityResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/warehouse/LocationPriorityResponse.java new file mode 100644 index 0000000000..1d180d9c4a --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/warehouse/LocationPriorityResponse.java @@ -0,0 +1,25 @@ +package com.binarywang.wxjava.store.bean.warehouse; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 仓库优先级响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class LocationPriorityResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = -4037484169497319150L; + + /** 按照out_warehouse_id排序优先级从高到低 */ + @JsonProperty("priority_sort") + private List prioritySort; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/warehouse/PriorityLocationParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/warehouse/PriorityLocationParam.java new file mode 100644 index 0000000000..8af700d801 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/warehouse/PriorityLocationParam.java @@ -0,0 +1,24 @@ +package com.binarywang.wxjava.store.bean.warehouse; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * 带优先级的仓库区域 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class PriorityLocationParam extends WarehouseLocation { + + private static final long serialVersionUID = -3087702364669180903L; + + /** 按照out_warehouse_id排序优先级从高到低 */ + @JsonProperty("priority_sort") + private List prioritySort; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/warehouse/StockGetParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/warehouse/StockGetParam.java new file mode 100644 index 0000000000..09820d42b1 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/warehouse/StockGetParam.java @@ -0,0 +1,29 @@ +package com.binarywang.wxjava.store.bean.warehouse; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class StockGetParam implements Serializable { + + private static final long serialVersionUID = -4144913434092446664L; + /** 商品ID */ + @JsonProperty("product_id") + private String productId; + + /** skuID */ + @JsonProperty("sku_id") + private String skuId; + + /** 外部仓库ID */ + @JsonProperty("out_warehouse_id") + private String outWarehouseId; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/warehouse/UpdateLocationParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/warehouse/UpdateLocationParam.java new file mode 100644 index 0000000000..a59c17d6e7 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/warehouse/UpdateLocationParam.java @@ -0,0 +1,29 @@ +package com.binarywang.wxjava.store.bean.warehouse; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 仓库区域 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class UpdateLocationParam implements Serializable { + + private static final long serialVersionUID = 6102771485047925091L; + + /** 外部仓库ID */ + @JsonProperty("out_warehouse_id") + private String outWarehouseId; + + /** 覆盖区域 */ + @JsonProperty("cover_locations") + private List coverLocations; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/warehouse/Warehouse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/warehouse/Warehouse.java new file mode 100644 index 0000000000..2b7cd5c726 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/warehouse/Warehouse.java @@ -0,0 +1,36 @@ +package com.binarywang.wxjava.store.bean.warehouse; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 仓库 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class Warehouse implements Serializable { + + private static final long serialVersionUID = -2322154583471063637L; + + /** 外部仓库ID,一个店铺下,同一个外部ID只能创建一个仓库,最大32字符 */ + @JsonProperty("out_warehouse_id") + private String outWarehouseId; + + /** 仓库名称 */ + @JsonProperty("name") + private String name; + + /** 仓库介绍 */ + @JsonProperty("intro") + private String intro; + + /** 覆盖区域,可以在创建后添加 */ + @JsonProperty("cover_locations") + private List coverLocations; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/warehouse/WarehouseIdsResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/warehouse/WarehouseIdsResponse.java new file mode 100644 index 0000000000..c6e3739afb --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/warehouse/WarehouseIdsResponse.java @@ -0,0 +1,48 @@ +package com.binarywang.wxjava.store.bean.warehouse; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; +import lombok.Data; +import lombok.EqualsAndHashCode; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 仓库id列表响应 + * + * @author Zeyes + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class WarehouseIdsResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 3974529583232187473L; + + /** 外部仓库ID列表 */ + @JsonProperty("out_warehouse_ids") + private List ids; + + /** 本次翻页的上下文,用于请求下一页,如果是空,则当前是最后一页 */ + @JsonProperty("next_key") + private String nextKey; + + public WarehouseIdsResponse() { + } + + @JsonProperty("data") + private void unpackNameFromNestedObject(Map map) { + if (map == null) { + return; + } + Object obj = map.get("out_warehouse_ids"); + if (obj != null) { + if (obj instanceof List) { + this.ids = (List) obj; + } + } + obj = map.get("next_key"); + if (obj != null) { + this.nextKey = (String) obj; + } + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/warehouse/WarehouseLocation.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/warehouse/WarehouseLocation.java new file mode 100644 index 0000000000..1df5dc942a --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/warehouse/WarehouseLocation.java @@ -0,0 +1,36 @@ +package com.binarywang.wxjava.store.bean.warehouse; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 仓库区域 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class WarehouseLocation implements Serializable { + + private static final long serialVersionUID = 1626579682640060352L; + + /** 省份地址编码 */ + @JsonProperty("address_id1") + private Integer addressId1; + + /** 市地址编码 */ + @JsonProperty("address_id2") + private Integer addressId2; + + /** 区地址编码 */ + @JsonProperty("address_id3") + private Integer addressId3; + + /** 街道地址编码 */ + @JsonProperty("address_id4") + private Integer addressId4; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/warehouse/WarehouseLocationParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/warehouse/WarehouseLocationParam.java new file mode 100644 index 0000000000..b935482b02 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/warehouse/WarehouseLocationParam.java @@ -0,0 +1,22 @@ +package com.binarywang.wxjava.store.bean.warehouse; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import lombok.Data; + +/** + * @author Zeyes + */ +@Data +@JsonInclude(Include.NON_NULL) +public class WarehouseLocationParam extends WarehouseLocation { + + private static final long serialVersionUID = 3347484433136057123L; + + public WarehouseLocationParam() { + } + + public WarehouseLocationParam(Integer addressId1, Integer addressId2, Integer addressId3, Integer addressId4) { + super(addressId1, addressId2, addressId3, addressId4); + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/warehouse/WarehouseParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/warehouse/WarehouseParam.java new file mode 100644 index 0000000000..93e3810986 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/warehouse/WarehouseParam.java @@ -0,0 +1,20 @@ +package com.binarywang.wxjava.store.bean.warehouse; + +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * 仓库 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +public class WarehouseParam extends Warehouse { + + private static final long serialVersionUID = -3412047348380785225L; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/warehouse/WarehouseResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/warehouse/WarehouseResponse.java new file mode 100644 index 0000000000..6f7a62c988 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/warehouse/WarehouseResponse.java @@ -0,0 +1,21 @@ +package com.binarywang.wxjava.store.bean.warehouse; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 仓库响应 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class WarehouseResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 3206095869486573824L; + /** 仓库库存 */ + @JsonProperty("data") + private Warehouse data; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/warehouse/WarehouseStockParam.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/warehouse/WarehouseStockParam.java new file mode 100644 index 0000000000..6440a29e92 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/warehouse/WarehouseStockParam.java @@ -0,0 +1,22 @@ +package com.binarywang.wxjava.store.bean.warehouse; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.product.SkuStockParam; + +/** + * 库存参数 + * + * @author Zeyes + */ +@Data +@NoArgsConstructor +public class WarehouseStockParam extends SkuStockParam { + + private static final long serialVersionUID = -5121207621628542490L; + + /** 外部仓库ID */ + @JsonProperty("out_warehouse_id") + private String outWarehouseId; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/warehouse/WarehouseStockResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/warehouse/WarehouseStockResponse.java new file mode 100644 index 0000000000..0f9aecc543 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/warehouse/WarehouseStockResponse.java @@ -0,0 +1,34 @@ +package com.binarywang.wxjava.store.bean.warehouse; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; +import lombok.Data; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 仓库库存响应 + * + * @author Zeyes + */ +@Data +public class WarehouseStockResponse extends WxStoreBaseResponse { + + private static final long serialVersionUID = 1810645965041317763L; + /** 仓库库存 */ + @JsonProperty("num") + private Integer num; + + public WarehouseStockResponse() { + } + + @JsonProperty("data") + private void unpackNameFromNestedObject(Map map) { + if (map == null) { + return; + } + Object obj = map.get("num"); + if (obj != null) { + this.num = (Integer) obj; + } + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/window/request/AddWindowProductRequest.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/window/request/AddWindowProductRequest.java new file mode 100644 index 0000000000..13db23141f --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/window/request/AddWindowProductRequest.java @@ -0,0 +1,39 @@ +package com.binarywang.wxjava.store.bean.window.request; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 上架商品到橱窗 + * @author imyzt + * @date 2024/01/27 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@JsonInclude(JsonInclude.Include.NON_NULL) +public class AddWindowProductRequest { + + /** + * 橱窗商品ID + */ + @JsonProperty("product_id") + private String productId; + + /** + * 商品来源店铺的appid + */ + @JsonProperty("appid") + private String appid; + + /** + * 是否需要在个人橱窗页隐藏 (默认为false) + */ + @JsonProperty("is_hide_for_window") + private Boolean isHideForWindow; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/window/request/GetWindowProductListRequest.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/window/request/GetWindowProductListRequest.java new file mode 100644 index 0000000000..37603d44fb --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/window/request/GetWindowProductListRequest.java @@ -0,0 +1,57 @@ +package com.binarywang.wxjava.store.bean.window.request; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 获取账号收集的留资数据详情 + * @author imyzt + * @date 2024/01/27 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@JsonInclude(JsonInclude.Include.NON_NULL) +public class GetWindowProductListRequest { + + /** + * 用于指定查询某个店铺来源的商品 + */ + @JsonProperty("appid") + private String appid; + + /** + * 用于指定查询属于某个分店ID下的商品 + */ + @JsonProperty("branch_id") + private int branchId; + + /** + * 单页商品数(不超过200) + */ + @JsonProperty("page_size") + private int pageSize; + + /** + * 页面下标,下标从1开始,默认为1 + */ + @JsonProperty("page_index") + private int pageIndex; + + /** + * 由上次请求返回,顺序翻页时需要传入,会从上次返回的结果往后翻一页(填了该值后page_index不生效) + */ + @JsonProperty("last_buffer") + private String lastBuffer; + + /** + * 是否需要返回满足筛选条件的商品总数 + */ + @JsonProperty("need_total_num") + private int needTotalNum; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/window/request/WindowProductRequest.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/window/request/WindowProductRequest.java new file mode 100644 index 0000000000..064c8e8870 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/window/request/WindowProductRequest.java @@ -0,0 +1,32 @@ +package com.binarywang.wxjava.store.bean.window.request; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 橱窗商品 + * @author imyzt + * @date 2024/01/27 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@JsonInclude(JsonInclude.Include.NON_NULL) +public class WindowProductRequest { + + /** + * 橱窗商品ID + */ + @JsonProperty("product_id") + private String productId; + + /** + * 商品来源店铺的appid + */ + @JsonProperty("appid") + private String appid; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/window/response/GetWindowProductListResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/window/response/GetWindowProductListResponse.java new file mode 100644 index 0000000000..1b38304bc7 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/window/response/GetWindowProductListResponse.java @@ -0,0 +1,55 @@ +package com.binarywang.wxjava.store.bean.window.response; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +import java.util.List; + +/** + * 获取账号收集的留资数据详情 + * @author imyzt + * @date 2024/01/27 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class GetWindowProductListResponse extends WxStoreBaseResponse { + + /** + * 商品列表 + */ + private List products; + + /** + * 本次翻页的上下文,用于顺序翻页请求 + */ + @JsonProperty("last_buffer") + private String lastBuffer; + + /** + * 商品总数 + */ + @JsonProperty("total_num") + private int totalNum; + + /** + * 商品信息类 + */ + @Data + public static class ProductInfo { + /** + * 橱窗商品id + */ + @JsonProperty("product_id") + private String productId; + + /** + * 商品来源店铺的appid + */ + private String appid; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/window/response/GetWindowProductResponse.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/window/response/GetWindowProductResponse.java new file mode 100644 index 0000000000..6de2f304b9 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/bean/window/response/GetWindowProductResponse.java @@ -0,0 +1,238 @@ +package com.binarywang.wxjava.store.bean.window.response; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; + +/** + * 获取橱窗商品详情 + * @author imyzt + * @date 2024/01/27 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class GetWindowProductResponse extends WxStoreBaseResponse { + + /** + * 橱窗商品详情 + */ + @JsonProperty("product") + private String product; + + @Data + public static class Product { + /** + * 橱窗商品ID + */ + @JsonProperty("product_id") + private String productId; + + /** + * 商家侧外部商品ID + */ + @JsonProperty("out_product_id") + private String outProductId; + + /** + * 商品标题 + */ + private String title; + + /** + * 商品头图url + */ + @JsonProperty("img_url") + private String imgUrl; + + /** + * 商品所属三级类目ID + */ + @JsonProperty("third_category_id") + private String thirdCategoryId; + + /** + * 商品状态 + * 1 已上架到橱窗 + * 2 未上架到橱窗 + * 3 已在商品来源处删除 + */ + private Integer status; + + /** + * 价格区间最大值(单位分) (市场价,原价) + */ + @JsonProperty("market_price") + private Long marketPrice; + + /** + * 价格区间最小值(单位分) (销售价) + */ + @JsonProperty("selling_price") + private Long sellingPrice; + + /** + * 剩余库存 + */ + private Long stock; + + /** + * 商品来源店铺的appid(非带货商品才拥有) + */ + private String appid; + + /** + * 商品详情页路径信息 + */ + @JsonProperty("page_path") + private PagePath pagePath; + + /** + * 商品所属电商平台ID + */ + @JsonProperty("platform_id") + private Long platformId; + + /** + * 商品所属电商平台名 + */ + @JsonProperty("platform_name") + private String platformName; + + /** + * 是否在个人橱窗页隐藏 + */ + @JsonProperty("is_hide_for_window") + private Boolean isHideForWindow; + + /** + * 商品是否处于禁止售卖的状态 + */ + private Boolean banned; + + /** + * 禁售原因及申请相关信息 + */ + @JsonProperty("banned_details") + private BannedDetails bannedDetails; + + /** + * 分店信息 + */ + @JsonProperty("branch_info") + private BranchInfo branchInfo; + + /** + * 抢购活动信息 + */ + @JsonProperty("limit_discount_info") + private LimitDiscountInfo limitDiscountInfo; + } + + /** + * 商品详情页路径信息 + */ + @Data + public static class PagePath { + /** + * 商品详情半屏页、全屏页所属appid + */ + private String appid; + + /** + * 商品详情半屏页path + */ + @JsonProperty("half_page_path") + private String halfPagePath; + + /** + * 商品详情全屏页path + */ + @JsonProperty("full_page_path") + private String fullPagePath; + } + + /** + * 商品禁售原因及申请相关信息 + */ + @Data + public static class BannedDetails { + /** + * 禁售原因 + * 0 三级类目在橱窗禁售 或 商品在来源处被禁售 + * 1 商品属于可申请售卖的类目,但商家未完成申请 + * 2 商品所属分店未处于营业状态 + */ + private Integer reason; + + /** + * 需要申请的类目ID + */ + @JsonProperty("need_apply_category_id") + private String needApplyCategoryId; + + /** + * 需要申请的类目名 + */ + @JsonProperty("need_apply_category_name") + private String needApplyCategoryName; + } + + /** + * 分店信息 + */ + @Data + public static class BranchInfo { + /** + * 分店ID + */ + @JsonProperty("branch_id") + private Long branchId; + + /** + * 分店名 + */ + @JsonProperty("branch_name") + private String branchName; + + /** + * 分店状态 + * 0 营业中 + * 1 停业 + */ + @JsonProperty("branch_status") + private Integer branchStatus; + } + + /** + * 抢购活动信息 + */ + @Data + public static class LimitDiscountInfo { + /** + * 是否有生效中的抢购活动 + */ + @JsonProperty("is_effect") + private Boolean isEffect; + + /** + * 抢购价 + */ + @JsonProperty("discount_price") + private Long discountPrice; + + /** + * 抢购活动结束时间(毫秒时间戳) + */ + @JsonProperty("end_time_ms") + private String endTimeMs; + + /** + * 抢购剩余库存 + */ + private Long stock; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/common/StoreWxError.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/common/StoreWxError.java new file mode 100644 index 0000000000..814978864b --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/common/StoreWxError.java @@ -0,0 +1,27 @@ +package com.binarywang.wxjava.store.common; + +import com.binarywang.wxjava.store.enums.WxStoreErrorMsgEnum; +import me.chanjar.weixin.common.error.WxError; + +/** + * 微信小店错误码 + * + * @author Zeyes + * @deprecated 请使用 {@link me.chanjar.weixin.common.error.WxError} 替代 + */ +@Deprecated +public class StoreWxError extends WxError { + + private static final long serialVersionUID = -2638512715814977441L; + + public StoreWxError() { + } + + public StoreWxError(int errorCode, String errorMsgEn) { + super(errorCode, errorMsgEn); + if (WxStoreErrorMsgEnum.findMsgByCode(errorCode) != null) { + this.setErrorMsg(WxStoreErrorMsgEnum.findMsgByCode(errorCode)); + } + this.setErrorMsgEn(errorMsgEn); + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/config/WxStoreConfig.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/config/WxStoreConfig.java new file mode 100644 index 0000000000..e11884256f --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/config/WxStoreConfig.java @@ -0,0 +1,193 @@ +package com.binarywang.wxjava.store.config; + +import java.util.concurrent.locks.Lock; +import com.binarywang.wxjava.store.api.BaseWxStoreService; +import me.chanjar.weixin.common.bean.WxAccessToken; +import me.chanjar.weixin.common.util.http.apache.ApacheHttpClientBuilder; + +/** + * 微信小店配置 + * + * @author Zeyes + */ +public interface WxStoreConfig { + + /** + * Gets access token. + * + * @return the access token + */ + String getAccessToken(); + + /** + * Is use stable access token api + * + * @link 获取稳定版AccessToken + * @return the boolean + */ + boolean isStableAccessToken(); + + /** + * Gets access token lock. + * + * @return the access token lock + */ + Lock getAccessTokenLock(); + + /** + * Is access token expired boolean. + * + * @return the boolean + */ + boolean isAccessTokenExpired(); + + /** + * 强制将access token过期掉 + */ + void expireAccessToken(); + + /** + * 应该是线程安全的 + * + * @param accessToken 要更新的WxAccessToken对象 + */ + void updateAccessToken(WxAccessToken accessToken); + + /** + * 应该是线程安全的 + * + * @param accessToken 新的accessToken值 + * @param expiresInSeconds 过期时间,以秒为单位 + */ + void updateAccessToken(String accessToken, int expiresInSeconds); + + /** + * Gets appid. + * + * @return the appid + */ + String getAppid(); + + /** + * Gets secret. + * + * @return the secret + */ + String getSecret(); + + /** + * Gets token. + * + * @return the token + */ + String getToken(); + + /** + * Gets aes key. + * + * @return the aes key + */ + String getAesKey(); + + /** + * Gets msg data format. + * + * @return the msg data format + */ + String getMsgDataFormat(); + + /** + * Gets expires time. + * + * @return the expires time + */ + long getExpiresTime(); + + /** + * Gets http proxy host. + * + * @return the http proxy host + */ + String getHttpProxyHost(); + + /** + * Gets http proxy port. + * + * @return the http proxy port + */ + int getHttpProxyPort(); + + /** + * Gets http proxy username. + * + * @return the http proxy username + */ + String getHttpProxyUsername(); + + /** + * Gets http proxy password. + * + * @return the http proxy password + */ + String getHttpProxyPassword(); + + /** + * http 请求重试间隔 + *
+   *  {@link BaseWxStoreService#setRetrySleepMillis(int)(int)}
+   * 
+ */ + int getRetrySleepMillis(); + + /** + * http 请求最大重试次数 + *
+   *   {@link BaseWxStoreService#setMaxRetryTimes(int)}
+   * 
+ */ + int getMaxRetryTimes(); + + /** + * http client builder + * + * @return ApacheHttpClientBuilder apache http client builder + */ + ApacheHttpClientBuilder getApacheHttpClientBuilder(); + + /** + * 是否自动刷新token + * + * @return the boolean + */ + boolean autoRefreshToken(); + + /** + * 设置自定义的apiHost地址 + * 具体取值,可以参考https://developers.weixin.qq.com/doc/offiaccount/Basic_Information/Interface_field_description.html + * + * @param apiHostUrl api域名地址 + */ + void setApiHostUrl(String apiHostUrl); + + /** + * 获取自定义的apiHost地址,用于替换原请求中的https://api.weixin.qq.com + * 具体取值,可以参考https://developers.weixin.qq.com/doc/offiaccount/Basic_Information/Interface_field_description.html + * + * @return 自定义的api域名地址 + */ + String getApiHostUrl(); + + /** + * 获取自定义的获取accessToken地址,用于向自定义统一服务获取accessToken + * + * @return 自定义的获取accessToken地址 + */ + String getAccessTokenUrl(); + + /** + * 设置自定义的获取accessToken地址 可用于设置获取accessToken的自定义服务 + * + * @param accessTokenUrl 自定义的获取accessToken地址 + */ + void setAccessTokenUrl(String accessTokenUrl); +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/config/impl/WxStoreDefaultConfigImpl.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/config/impl/WxStoreDefaultConfigImpl.java new file mode 100644 index 0000000000..132b56a61e --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/config/impl/WxStoreDefaultConfigImpl.java @@ -0,0 +1,244 @@ +package com.binarywang.wxjava.store.config.impl; + +import java.io.File; +import java.util.concurrent.locks.Lock; +import java.util.concurrent.locks.ReentrantLock; +import lombok.Getter; +import com.binarywang.wxjava.store.config.WxStoreConfig; +import com.binarywang.wxjava.store.util.JsonUtils; +import me.chanjar.weixin.common.bean.WxAccessToken; +import me.chanjar.weixin.common.util.http.apache.ApacheHttpClientBuilder; + +/** + * 基于内存的微信配置provider,在实际生产环境中应该将这些配置持久化 + * + * @author Zeyes + */ +@Getter +public class WxStoreDefaultConfigImpl implements WxStoreConfig { + + protected volatile String appid; + protected volatile String token; + protected Lock accessTokenLock = new ReentrantLock(); + /** + * 临时文件目录. + */ + protected volatile File tmpDirFile; + private volatile String msgDataFormat; + private volatile String secret; + private volatile String accessToken; + private volatile String aesKey; + private volatile long expiresTime; + private volatile String httpProxyHost; + private volatile int httpProxyPort; + private volatile String httpProxyUsername; + private volatile String httpProxyPassword; + /** 是否使用稳定版获取accessToken接口 */ + private volatile boolean stableAccessToken; + + private volatile int retrySleepMillis = 1000; + private volatile int maxRetryTimes = 5; + private volatile ApacheHttpClientBuilder apacheHttpClientBuilder; + private String apiHostUrl; + private String accessTokenUrl; + + /** + * 会过期的数据提前过期时间,默认预留200秒的时间 + */ + protected long expiresAheadInMillis(int expiresInSeconds) { + return System.currentTimeMillis() + (expiresInSeconds - 200) * 1000L; + } + + /** + * 判断 expiresTime 是否已经过期 + */ + protected boolean isExpired(long expiresTime) { + return System.currentTimeMillis() > expiresTime; + } + + @Override + public String getAccessToken() { + return this.accessToken; + } + + public void setAccessToken(String accessToken) { + this.accessToken = accessToken; + } + + @Override + public boolean isStableAccessToken() { + return stableAccessToken; + } + + public void setStableAccessToken(boolean stableAccessToken) { + this.stableAccessToken = stableAccessToken; + } + + @Override + public Lock getAccessTokenLock() { + return this.accessTokenLock; + } + + public void setAccessTokenLock(Lock accessTokenLock) { + this.accessTokenLock = accessTokenLock; + } + + @Override + public boolean isAccessTokenExpired() { + return isExpired(this.expiresTime); + } + + @Override + public synchronized void updateAccessToken(WxAccessToken accessToken) { + updateAccessToken(accessToken.getAccessToken(), accessToken.getExpiresIn()); + } + + @Override + public synchronized void updateAccessToken(String accessToken, int expiresInSeconds) { + setAccessToken(accessToken); + setExpiresTime(expiresAheadInMillis(expiresInSeconds)); + } + + + @Override + public void expireAccessToken() { + this.expiresTime = 0; + } + + @Override + public String getSecret() { + return this.secret; + } + + public void setSecret(String secret) { + this.secret = secret; + } + + @Override + public String getToken() { + return this.token; + } + + public void setToken(String token) { + this.token = token; + } + + @Override + public long getExpiresTime() { + return this.expiresTime; + } + + public void setExpiresTime(long expiresTime) { + this.expiresTime = expiresTime; + } + + @Override + public String getAesKey() { + return this.aesKey; + } + + public void setAesKey(String aesKey) { + this.aesKey = aesKey; + } + + @Override + public String getMsgDataFormat() { + return this.msgDataFormat; + } + + public void setMsgDataFormat(String msgDataFormat) { + this.msgDataFormat = msgDataFormat; + } + + @Override + public String getHttpProxyHost() { + return this.httpProxyHost; + } + + public void setHttpProxyHost(String httpProxyHost) { + this.httpProxyHost = httpProxyHost; + } + + @Override + public int getHttpProxyPort() { + return this.httpProxyPort; + } + + public void setHttpProxyPort(int httpProxyPort) { + this.httpProxyPort = httpProxyPort; + } + + @Override + public String getHttpProxyUsername() { + return this.httpProxyUsername; + } + + public void setHttpProxyUsername(String httpProxyUsername) { + this.httpProxyUsername = httpProxyUsername; + } + + @Override + public String getHttpProxyPassword() { + return this.httpProxyPassword; + } + + public void setHttpProxyPassword(String httpProxyPassword) { + this.httpProxyPassword = httpProxyPassword; + } + + @Override + public int getRetrySleepMillis() { + return this.retrySleepMillis; + } + + public void setRetrySleepMillis(int retrySleepMillis) { + this.retrySleepMillis = retrySleepMillis; + } + + @Override + public int getMaxRetryTimes() { + return this.maxRetryTimes; + } + + public void setMaxRetryTimes(int maxRetryTimes) { + this.maxRetryTimes = maxRetryTimes; + } + + @Override + public String toString() { + return JsonUtils.encode(this); + } + + @Override + public ApacheHttpClientBuilder getApacheHttpClientBuilder() { + return this.apacheHttpClientBuilder; + } + + public void setApacheHttpClientBuilder(ApacheHttpClientBuilder apacheHttpClientBuilder) { + this.apacheHttpClientBuilder = apacheHttpClientBuilder; + } + + @Override + public boolean autoRefreshToken() { + return true; + } + + @Override + public void setApiHostUrl(String apiHostUrl) { + this.apiHostUrl = apiHostUrl; + } + + @Override + public void setAccessTokenUrl(String accessTokenUrl) { + this.accessTokenUrl = accessTokenUrl; + } + + @Override + public String getAppid() { + return appid; + } + + public void setAppid(String appid) { + this.appid = appid; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/config/impl/WxStoreRedisConfigImpl.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/config/impl/WxStoreRedisConfigImpl.java new file mode 100644 index 0000000000..ea13ec9d22 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/config/impl/WxStoreRedisConfigImpl.java @@ -0,0 +1,73 @@ +package com.binarywang.wxjava.store.config.impl; + +import java.util.concurrent.TimeUnit; +import me.chanjar.weixin.common.redis.WxRedisOps; + +/** + * 基于redis存储的微信微信小店配置类 + * + * @author Zeyes + */ +public class WxStoreRedisConfigImpl extends WxStoreDefaultConfigImpl { + + private static final String ACCESS_TOKEN_KEY_TPL = "%s:access_token:%s"; + private static final String LOCK_KEY_TPL = "%s:lock:%s:"; + + private final WxRedisOps redisOps; + private final String keyPrefix; + + private volatile String accessTokenKey; + private volatile String lockKey; + + public WxStoreRedisConfigImpl(WxRedisOps redisOps, String keyPrefix) { + this.redisOps = redisOps; + this.keyPrefix = keyPrefix; + } + + @Override + public void setAppid(String appId) { + super.setAppid(appId); + this.accessTokenKey = String.format(ACCESS_TOKEN_KEY_TPL, this.keyPrefix, appId); + this.lockKey = String.format(LOCK_KEY_TPL, this.keyPrefix, appId); + super.accessTokenLock = this.redisOps.getLock(lockKey.concat("accessTokenLock")); + } + + //------------------------------------------------------------------------ + // token相关 + //------------------------------------------------------------------------ + @Override + public String getAccessToken() { + return redisOps.getValue(this.accessTokenKey); + } + + @Override + public boolean isAccessTokenExpired() { + Long expire = redisOps.getExpire(this.accessTokenKey); + return expire == null || expire < 2; + } + + @Override + public synchronized void updateAccessToken(String accessToken, int expiresInSeconds) { + redisOps.setValue(this.accessTokenKey, accessToken, expiresInSeconds - 200, TimeUnit.SECONDS); + } + + @Override + public void expireAccessToken() { + redisOps.expire(this.accessTokenKey, 0, TimeUnit.SECONDS); + } + + + @Override + public String toString() { + return "WxStoreRedisConfigImpl{" + + "appid='" + appid + '\'' + + ", token='" + token + '\'' + + ", accessTokenLock=" + accessTokenLock + + ", tmpDirFile=" + tmpDirFile + + ", redisOps=" + redisOps + + ", keyPrefix='" + keyPrefix + '\'' + + ", accessTokenKey='" + accessTokenKey + '\'' + + ", lockKey='" + lockKey + '\'' + + '}'; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/config/impl/WxStoreRedissonConfigImpl.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/config/impl/WxStoreRedissonConfigImpl.java new file mode 100644 index 0000000000..fb635891ec --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/config/impl/WxStoreRedissonConfigImpl.java @@ -0,0 +1,89 @@ +package com.binarywang.wxjava.store.config.impl; + +import java.util.concurrent.TimeUnit; +import java.util.concurrent.locks.Lock; +import lombok.NonNull; +import me.chanjar.weixin.common.bean.WxAccessToken; +import me.chanjar.weixin.common.redis.RedissonWxRedisOps; +import me.chanjar.weixin.common.redis.WxRedisOps; +import org.apache.commons.lang3.StringUtils; +import org.redisson.api.RedissonClient; + +/** + * 基于Redisson的实现 + * + * @author yuanqixun + * created on 2020/5/3 + */ +public class WxStoreRedissonConfigImpl extends WxStoreDefaultConfigImpl { + + protected static final String LOCK_KEY = "wx_channel_lock:"; + protected static final String MA_ACCESS_TOKEN_KEY = "wx_channel_access_token_key:"; + + /** + * redis 存储的 key 的前缀,可为空 + */ + protected String keyPrefix; + protected String accessTokenKey; + protected String lockKey; + + private final WxRedisOps redisOps; + + public WxStoreRedissonConfigImpl(@NonNull RedissonClient redissonClient, String keyPrefix) { + this(new RedissonWxRedisOps(redissonClient), keyPrefix); + } + + public WxStoreRedissonConfigImpl(@NonNull RedissonClient redissonClient) { + this(redissonClient, null); + } + + private WxStoreRedissonConfigImpl(@NonNull WxRedisOps redisOps, String keyPrefix) { + this.redisOps = redisOps; + this.keyPrefix = keyPrefix; + } + + @Override + public void setAppid(String appid) { + super.setAppid(appid); + String prefix = StringUtils.isBlank(keyPrefix) ? "" : + (StringUtils.endsWith(keyPrefix, ":") ? keyPrefix : (keyPrefix + ":")); + lockKey = prefix + LOCK_KEY.concat(appid); + accessTokenKey = prefix + MA_ACCESS_TOKEN_KEY.concat(appid); + } + + protected Lock getLockByKey(String key) { + return redisOps.getLock(key); + } + + @Override + public Lock getAccessTokenLock() { + return getLockByKey(this.lockKey.concat(":").concat("accessToken")); + } + + @Override + public String getAccessToken() { + return redisOps.getValue(this.accessTokenKey); + } + + @Override + public boolean isAccessTokenExpired() { + Long expire = redisOps.getExpire(this.accessTokenKey); + return expire == null || expire < 2; + } + + @Override + public void updateAccessToken(WxAccessToken accessToken) { + redisOps.setValue(this.accessTokenKey, accessToken.getAccessToken(), accessToken.getExpiresIn(), TimeUnit.SECONDS); + } + + @Override + public void updateAccessToken(String accessToken, int expiresInSeconds) { + redisOps.setValue(this.accessTokenKey, accessToken, expiresInSeconds, TimeUnit.SECONDS); + } + + @Override + public void expireAccessToken() { + redisOps.expire(this.accessTokenKey, 0, TimeUnit.SECONDS); + } + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/constant/MessageEventConstants.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/constant/MessageEventConstants.java new file mode 100644 index 0000000000..b656f8f46c --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/constant/MessageEventConstants.java @@ -0,0 +1,98 @@ +package com.binarywang.wxjava.store.constant; + +/** + * 消息回调 + * + * @author Zeyes + */ +public interface MessageEventConstants { + /** 品牌资质事件回调 */ + String BRAND = "channels_ec_brand"; + /** 商品审核结果 */ + String PRODUCT_SPU_AUDIT = "product_spu_audit"; + /** 商品上下架 */ + String PRODUCT_SPU_STATUS_UPDATE = "product_spu_listing"; + /** 商品更新 */ + String PRODUCT_SPU_UPDATE = "product_spu_update"; + /** 类目审核结果 */ + String PRODUCT_CATEGORY_AUDIT = "product_category_audit"; + /** 库存不足 */ + String PRODUCT_STOCK_NO_ENOUGH = "channels_ec_stock_no_enough"; + /** 订单下单 */ + String ORDER_NEW = "channels_ec_order_new"; + /** 订单取消 */ + String ORDER_CANCEL = "channels_ec_order_cancel"; + /** 订单支付成功 */ + String ORDER_PAY = "channels_ec_order_pay"; + /** 订单待发货 */ + String ORDER_WAIT_SHIPPING = "channels_ec_order_wait_shipping"; + /** 订单发货 */ + String ORDER_DELIVER = "channels_ec_order_deliver"; + /** 订单确认收货 */ + String ORDER_CONFIRM = "channels_ec_order_confirm"; + /** 订单结算成功 */ + String ORDER_SETTLE = "channels_ec_order_settle"; + /** 订单其他信息更新 */ + String ORDER_EXT_INFO_UPDATE = "channels_ec_order_ext_info_update"; + /** 订单状态更新 */ + String ORDER_STATUS_UPDATE = "product_order_status_update"; + /** 售后单更新通知 */ + String AFTER_SALE_UPDATE = "channels_ec_aftersale_update"; + /** 纠纷更新通知 */ + String COMPLAINT_NOTIFY = "channels_ec_complaint_update"; + // 优惠券相关 + /** 优惠券领取通知 */ + String RECEIVE_COUPON = "channels_ec_coupon_receive"; + /** 创建优惠券通知 */ + String CREATE_COUPON = "channels_ec_coupon_create"; + /** 优惠券删除通知 */ + String DELETE_COUPON = "channels_ec_coupon_delete"; + /** 优惠券过期通知 */ + String EXPIRE_COUPON = "channels_ec_coupon_expire"; + /** 更新优惠券信息通知 */ + String UPDATE_COUPON_INFO = "channels_ec_coupon_info_change"; + /** 优惠券作废通知 */ + String INVALID_COUPON = "channels_ec_coupon_invalid"; + /** 用户优惠券过期通知 */ + String USER_COUPON_EXPIRE = "channels_ec_user_coupon_expire"; + /** 优惠券返还通知 */ + String USER_COUPON_UNUSE = "channels_ec_user_coupon_unuse"; + /** 优惠券核销通知 */ + String USER_COUPON_USE = "channels_ec_user_coupon_use"; + /** 发放团购优惠成功回调 */ + String VOUCHER_SEND_SUCC = "channels_ec_voucher_send_succ"; + // 资金相关 + /** 结算账户变更回调 */ + String ACCOUNT_NOTIFY = "channels_ec_acct_notify"; + /** 提现回调 */ + String WITHDRAW_NOTIFY = "channels_ec_withdraw_notify"; + /** 提现二维码回调 */ + String QRCODE_STATUS = "qrcode_status"; + // 团长 + String SUPPLIER_ITEM_UPDATE = "head_supplier_item_update"; + // 其他 + /** 进入会话事件 */ + String USER_ENTER_TEMP_SESSION = "user_enter_tempsession"; + + // 会员相关 + /** 用户加入会员 */ + String USER_VIP_JOIN = "channels_ec_vip_join"; + /** 用户注销会员 */ + String USER_VIP_CLOSE = "channels_ec_vip_close"; + /** 用户等级更新 */ + String USER_VIP_GRADE_INFO_UPDATE = "channels_ec_vip_grade_info_update"; + /** 用户积分更新 */ + String USER_VIP_SCORE_UPDATE = "channels_ec_vip_score_update"; + /** 用户积分兑换 */ + String USER_VIP_SCORE_EXCHANGE = "channels_ec_vip_score_exchange"; + + // 分享员相关 + /** 分享员变更 **/ + String SHARER_CHANGE = "channels_ec_sharer_change"; + + // 店铺相关 + /** 小店注销 */ + String CLOSE_STORE = "channels_ec_close_store"; + /** 小店修改 */ + String SET_SHOP_NICKNAME = "set_shop_nickname"; +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/constant/WxStoreApiUrlConstants.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/constant/WxStoreApiUrlConstants.java new file mode 100644 index 0000000000..2be536b101 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/constant/WxStoreApiUrlConstants.java @@ -0,0 +1,658 @@ +package com.binarywang.wxjava.store.constant; + +import lombok.experimental.UtilityClass; + +/** + * 微信小店接口地址常量 + * + * @author Zeyes + */ +@UtilityClass +public class WxStoreApiUrlConstants { + + /** + * 获取access_token. + */ + public static final String GET_ACCESS_TOKEN_URL = + "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=%s&secret=%s"; + + /** + * 获取Stable access_token. + */ + public static final String GET_STABLE_ACCESS_TOKEN_URL = "https://api.weixin.qq.com/cgi-bin/stable_token"; + + /** 基础接口 */ + public interface Basics { + + /** 获取店铺基本信息 */ + String GET_SHOP_INFO = "https://api.weixin.qq.com/channels/ec/basics/info/get"; + /** 上传图片 */ + String IMG_UPLOAD_URL = "https://api.weixin.qq.com/shop/ec/basics/img/upload"; + /** 上传资质图片 */ + String UPLOAD_QUALIFICATION_FILE = "https://api.weixin.qq.com/shop/ec/basics/qualification/upload"; + /** 下载图片 */ + String GET_IMG_URL = "https://api.weixin.qq.com/channels/ec/basics/media/get"; + /** 获取地址编码 */ + String GET_ADDRESS_CODE = "https://api.weixin.qq.com/channels/ec/basics/addresscode/get"; + /** 获取店铺H5链接 */ + String GET_SHOP_H5URL = "https://api.weixin.qq.com/channels/ec/basics/shop/h5url/get"; + /** 获取店铺二维码 */ + String GET_SHOP_QRCODE = "https://api.weixin.qq.com/channels/ec/basics/shop/qrcode/get"; + /** 获取店铺口令 */ + String GET_SHOP_TAGLINK = "https://api.weixin.qq.com/channels/ec/basics/shop/taglink/get"; + } + + /** 收藏管理相关接口 */ + public interface Favorite { + + /** 获取店铺收藏的人数 */ + String GET_FAVORITE_COUNT = "https://api.weixin.qq.com/channels/ec/favorites/count/get"; + } + + /** 商家客服相关接口 */ + public interface Kf { + + /** 上传客服素材 */ + String COS_UPLOAD_URL = "https://api.weixin.qq.com/channels/ec/commkf/cosupload"; + /** 发送客服消息 */ + String SEND_MSG_URL = "https://api.weixin.qq.com/channels/ec/commkf/sendmsg"; + } + + /** 商品类目相关接口 */ + public interface Category { + + /** 获取所有的类目 */ + String LIST_ALL_CATEGORY_URL = "https://api.weixin.qq.com/shop/ec/category/all"; + /** 获取类目详情 */ + String GET_CATEGORY_DETAIL_URL = "https://api.weixin.qq.com/shop/ec/category/detail"; + /** 获取可用的子类目详情 */ + String AVAILABLE_CATEGORY_URL = "https://api.weixin.qq.com/channels/ec/category/availablesoncategories/get"; + /** 上传类目资质 */ + String ADD_CATEGORY_URL = "https://api.weixin.qq.com/channels/ec/category/add"; + /** 获取类目审核结果 */ + String GET_CATEGORY_AUDIT_URL = "https://api.weixin.qq.com/channels/ec/category/audit/get"; + /** 取消类目提审 */ + String CANCEL_CATEGORY_AUDIT_URL = "https://api.weixin.qq.com/shop/ec/category/audit/cancel"; + /** 获取账号申请通过的类目和资质信息 */ + String LIST_PASS_CATEGORY_URL = "https://api.weixin.qq.com/channels/ec/category/list/get"; + /** 获取店铺的类目权限列表 */ + String LIST_RELATION_CATEGORY_URL = "https://api.weixin.qq.com/shop/ec/category/get_category_relation_list"; + } + + /** 主页管理相关接口 */ + public interface HomePage { + + /** 添加分类关联的商品 */ + String ADD_TREE_PRODUCT_URL = "https://api.weixin.qq.com/channels/ec/store/classification/tree/product/add"; + /** 删除分类关联的商品 */ + String DEL_TREE_PRODUCT_URL = "https://api.weixin.qq.com/channels/ec/store/classification/tree/product/del"; + /** 获取分类关联的商品ID列表 */ + String LIST_TREE_PRODUCT_URL = "https://api.weixin.qq.com/channels/ec/store/classification/tree/product/get"; + /** 设置展示在店铺主页的商品分类 */ + String SET_SHOW_TREE_URL = "https://api.weixin.qq.com/channels/ec/store/classification/tree/set"; + /** 获取在店铺主页展示的商品分类 */ + String GET_SHOW_TREE_URL = "https://api.weixin.qq.com/channels/ec/store/classification/tree/get"; + + /** 获取主页展示商品列表 */ + String LIST_WINDOW_PRODUCT_URL = "https://api.weixin.qq.com/channels/ec/store/window/product/list/get"; + /** 重新排序主页展示商品 */ + String REORDER_WINDOW_PRODUCT_URL = "https://api.weixin.qq.com/channels/ec/store/window/product/reorder"; + /** 隐藏小店主页商品 */ + String HIDE_WINDOW_PRODUCT_URL = "https://api.weixin.qq.com/channels/ec/store/window/product/hide"; + /** 置顶小店主页商品 */ + String TOP_WINDOW_PRODUCT_URL = "https://api.weixin.qq.com/channels/ec/store/window/product/settop"; + + /** 提交主页背景图申请 */ + String APPLY_BACKGROUND_URL = "https://api.weixin.qq.com/channels/ec/basics/homepage/background/apply/submit"; + /** 查询主页背景图 */ + String GET_BACKGROUND_URL = "https://api.weixin.qq.com/channels/ec/basics/homepage/background/get"; + /** 撤销主页背景图申请 */ + String CANCEL_BACKGROUND_URL = "https://api.weixin.qq.com/channels/ec/basics/homepage/background/apply/cancel"; + /** 清空主页背景图并撤销流程中的申请 */ + String REMOVE_BACKGROUND_URL = "https://api.weixin.qq.com/channels/ec/basics/homepage/background/remove"; + + /** 提交精选展示位申请 */ + String APPLY_BANNER_URL = "https://api.weixin.qq.com/channels/ec/basics/homepage/banner/apply/submit"; + /** 查询精选展示位 */ + String GET_BANNER_URL = "https://api.weixin.qq.com/channels/ec/basics/homepage/banner/get"; + /** 撤销精选展示位申请 */ + String CANCEL_BANNER_URL = "https://api.weixin.qq.com/channels/ec/basics/homepage/banner/apply/cancel"; + /** 清空精选展示位并撤销流程中的申请 */ + String REMOVE_BANNER_URL = "https://api.weixin.qq.com/channels/ec/basics/homepage/banner/remove"; + } + + /** 品牌资质相关接口 */ + public interface Brand { + + /** 获取品牌库列表 */ + String ALL_BRAND_URL = "https://api.weixin.qq.com/shop/ec/brand/all"; + /** 新增品牌资质 */ + String ADD_BRAND_URL = "https://api.weixin.qq.com/shop/ec/brand/add"; + /** 更新品牌资质 */ + String UPDATE_BRAND_URL = "https://api.weixin.qq.com/channels/ec/brand/update"; + /** 撤回品牌资质审核 */ + String CANCEL_BRAND_AUDIT_URL = "https://api.weixin.qq.com/shop/ec/brand/audit/cancel"; + /** 删除品牌资质 */ + String DELETE_BRAND_URL = "https://api.weixin.qq.com/channels/ec/brand/delete"; + /** 获取品牌资质申请详情 */ + String GET_BRAND_URL = "https://api.weixin.qq.com/channels/ec/brand/get"; + /** 获取品牌资质申请列表 */ + String LIST_BRAND_URL = "https://api.weixin.qq.com/channels/ec/brand/list/get"; + /** 获取生效中的品牌资质列表 */ + String LIST_BRAND_VALID_URL = "https://api.weixin.qq.com/channels/ec/brand/valid/list/get"; + } + + /** 商品操作相关接口 */ + public interface Spu { + + /** 添加商品 */ + String SPU_ADD_URL = "https://api.weixin.qq.com/channels/ec/product/add"; + /** 删除商品 */ + String SPU_DEL_URL = "https://api.weixin.qq.com/channels/ec/product/delete"; + /** 获取商品详情 */ + String SPU_GET_URL = "https://api.weixin.qq.com/channels/ec/product/get"; + /** 获取商品列表 */ + String SPU_LIST_URL = "https://api.weixin.qq.com/channels/ec/product/list/get"; + /** 更新商品 */ + String SPU_UPDATE_URL = "https://api.weixin.qq.com/channels/ec/product/update"; + /** 更新商品 */ + String SPU_AUDIT_FREE_UPDATE_URL = "https://api.weixin.qq.com/channels/ec/product/auditfree"; + /** 上架商品 */ + String SPU_LISTING_URL = "https://api.weixin.qq.com/channels/ec/product/listing"; + /** 下架商品 */ + String SPU_DELISTING_URL = "https://api.weixin.qq.com/channels/ec/product/delisting"; + /** 撤回商品审核 */ + String CANCEL_AUDIT_URL = "https://api.weixin.qq.com/channels/ec/product/audit/cancel"; + /** 获取商品H5短链 */ + String SPU_H5URL_URL = "https://api.weixin.qq.com/channels/ec/product/h5url/get"; + /** 获取商品二维码 */ + String SPU_QRCODE_URL = "https://api.weixin.qq.com/channels/ec/product/qrcode/get"; + /** 获取商品移动应用跳转 scheme 码 */ + String SPU_SCHEME_URL = "https://api.weixin.qq.com/channels/ec/product/scheme/get"; + /** 获取商品口令 */ + String SPU_TAGLINK_URL = "https://api.weixin.qq.com/channels/ec/product/taglink/get"; + /** 商品类目推荐 */ + String SPU_CATEGORY_CLASSIFY_URL = "https://api.weixin.qq.com/channels/ec/product/category/classify"; + /** 商品立即开售 */ + String SPU_BEGIN_TIMING_SALE_URL = "https://api.weixin.qq.com/channels/ec/product/begintimingsale"; + /** 取消商品开售 */ + String SPU_CANCEL_TIMING_SALE_URL = "https://api.weixin.qq.com/channels/ec/product/canceltimingsale"; + /** 站内外商品属性映射 */ + String SPU_EXTERNAL_PRODUCT_MAPPING_URL = "https://api.weixin.qq.com/channels/ec/product/externalproductmapping"; + /** 发品前校验 */ + String SPU_CATEGORY_PRE_CHECK_URL = "https://api.weixin.qq.com/channels/ec/product/categoryprecheck"; + /** 获取商品上架策略 */ + String SPU_AUDIT_STRATEGY_GET_URL = "https://api.weixin.qq.com/channels/ec/product/auditstrategy/get"; + /** 设置商品上架策略 */ + String SPU_AUDIT_STRATEGY_SET_URL = "https://api.weixin.qq.com/channels/ec/product/auditstrategy/set"; + /** 获取商品提审限额 */ + String SPU_GET_AUDIT_QUOTA_URL = "https://api.weixin.qq.com/channels/ec/product/getauditquota"; + /** 商品属性映射及推荐 */ + String SPU_EXTERNAL_PRODUCT_MAPPING_NEW_URL = "https://api.weixin.qq.com/channels/ec/product/externalproductmappingnew"; + /** 商品品牌推荐 */ + String SPU_PRODUCT_BRAND_RECOMMEND_URL = "https://api.weixin.qq.com/channels/ec/product/productbrandrecommend"; + /** 新增第三方货源信息 */ + String SPU_ADD_PRODUCT_THIRD_PARTY_SOURCE_URL = "https://api.weixin.qq.com/channels/ec/product/addproductthirdpartysource"; + /** 获取实时库存 */ + String SPU_GET_STOCK_URL = "https://api.weixin.qq.com/channels/ec/product/stock/get"; + /** 获取库存流水 */ + String SPU_GET_STOCK_FLOW_URL = "https://api.weixin.qq.com/channels/ec/product/stock/getflow"; + /** 获取实时库存 */ + String SPU_GET_STOCK_BATCH_URL = "https://api.weixin.qq.com/channels/ec/product/stock/batchget"; + /** 更新商品库存 */ + String SPU_UPDATE_STOCK_URL = "https://api.weixin.qq.com/channels/ec/product/stock/update"; + /** 添加非卖商品 */ + String GIFT_PRODUCT_ADD_URL = "https://api.weixin.qq.com/channels/ec/product/gift/add"; + /** 更新非卖商品 */ + String GIFT_PRODUCT_UPDATE_URL = "https://api.weixin.qq.com/channels/ec/product/gift/update"; + /** 在售商品转赠品 */ + String GIFT_PRODUCT_ON_SALE_SET_URL = "https://api.weixin.qq.com/channels/ec/product/gift/onsale/set"; + /** 获取赠品 */ + String GIFT_PRODUCT_GET_URL = "https://api.weixin.qq.com/channels/ec/product/gift/get"; + /** 获取赠品列表 */ + String GIFT_PRODUCT_LIST_URL = "https://api.weixin.qq.com/channels/ec/product/gift/list/get"; + /** 更新赠品库存 */ + String GIFT_PRODUCT_STOCK_UPDATE_URL = "https://api.weixin.qq.com/channels/ec/product/gift/stock/update"; + /** 创建赠品活动 */ + String GIFT_ACTIVITY_ADD_URL = "https://api.weixin.qq.com/channels/ec/product/activity/add"; + /** 删除赠品活动 */ + String GIFT_ACTIVITY_DELETE_URL = "https://api.weixin.qq.com/channels/ec/product/activity/del"; + /** 停止赠品活动 */ + String GIFT_ACTIVITY_STOP_URL = "https://api.weixin.qq.com/channels/ec/product/activity/stop"; + /** 添加限时抢购任务 */ + String ADD_LIMIT_TASK_URL = "https://api.weixin.qq.com/channels/ec/product/limiteddiscounttask/add"; + /** 拉取限时抢购任务列表 */ + String LIST_LIMIT_TASK_URL = "https://api.weixin.qq.com/channels/ec/product/limiteddiscounttask/list/get"; + /** 停止限时抢购任务 */ + String STOP_LIMIT_TASK_URL = "https://api.weixin.qq.com/channels/ec/product/limiteddiscounttask/stop"; + /** 删除限时抢购任务 */ + String DELETE_LIMIT_TASK_URL = "https://api.weixin.qq.com/channels/ec/product/limiteddiscounttask/delete"; + /** 更新限时抢购任务 */ + String UPDATE_LIMIT_TASK_URL = "https://api.weixin.qq.com/channels/ec/product/limiteddiscounttask/update"; + /** 发品前校验 */ + String CATEGORY_PRE_CHECK_URL = "https://api.weixin.qq.com/channels/ec/product/categoryprecheck"; + /** 商品品牌推荐 */ + String PRODUCT_BRAND_RECOMMEND_URL = "https://api.weixin.qq.com/channels/ec/product/productbrandrecommend"; + /** 站内外商品属性映射 */ + String EXTERNAL_PRODUCT_MAPPING_URL = "https://api.weixin.qq.com/channels/ec/product/externalproductmapping"; + /** 商品属性映射及推荐 */ + String EXTERNAL_PRODUCT_MAPPING_NEW_URL = + "https://api.weixin.qq.com/channels/ec/product/externalproductmappingnew"; + /** 商品立即开售 */ + String BEGIN_TIMING_SALE_URL = "https://api.weixin.qq.com/channels/ec/product/begintimingsale"; + /** 取消商品开售 */ + String CANCEL_TIMING_SALE_URL = "https://api.weixin.qq.com/channels/ec/product/canceltimingsale"; + } + + /** 区域仓库 */ + public interface Warehouse { + + /** 添加区域仓库 */ + String ADD_WAREHOUSE_URL = "https://api.weixin.qq.com/channels/ec/warehouse/create"; + /** 获取区域仓库列表 */ + String LIST_WAREHOUSE_URL = "https://api.weixin.qq.com/channels/ec/warehouse/list/get"; + /** 获取区域仓库详情 */ + String GET_WAREHOUSE_URL = "https://api.weixin.qq.com/channels/ec/warehouse/get"; + /** 更新区域仓库详情 */ + String UPDATE_WAREHOUSE_URL = "https://api.weixin.qq.com/channels/ec/warehouse/detail/update"; + /** 批量增加覆盖区域 */ + String ADD_COVER_AREA_URL = "https://api.weixin.qq.com/channels/ec/warehouse/coverlocations/add"; + /** 批量删除覆盖区域 */ + String DELETE_COVER_AREA_URL = "https://api.weixin.qq.com/channels/ec/warehouse/coverlocations/del"; + /** 设置指定地址下的仓的优先级 */ + String SET_WAREHOUSE_PRIORITY_URL = "https://api.weixin.qq.com/channels/ec/warehouse/address/prioritysort/set"; + /** 获取指定地址下的仓的优先级 */ + String GET_WAREHOUSE_PRIORITY_URL = "https://api.weixin.qq.com/channels/ec/warehouse/address/prioritysort/get"; + /** 更新区域仓库存 */ + String UPDATE_WAREHOUSE_STOCK_URL = "https://api.weixin.qq.com/channels/ec/warehouse/stock/update"; + /** 获取区域仓库存 */ + String GET_WAREHOUSE_STOCK_URL = "https://api.weixin.qq.com/channels/ec/warehouse/stock/get"; + } + + /** 订单相关接口 */ + public interface Order { + + /** 获取订单列表 */ + String ORDER_LIST_URL = "https://api.weixin.qq.com/channels/ec/order/list/get"; + /** 获取订单详情 */ + String ORDER_GET_URL = "https://api.weixin.qq.com/channels/ec/order/get"; + /** 更改订单价格 */ + String UPDATE_PRICE_URL = "https://api.weixin.qq.com/channels/ec/order/price/update"; + /** 修改订单备注 */ + String UPDATE_REMARK_URL = "https://api.weixin.qq.com/channels/ec/order/merchantnotes/update"; + /** 更修改订单地址 */ + String UPDATE_ADDRESS_URL = "https://api.weixin.qq.com/channels/ec/order/address/update"; + /** 修改物流信息 */ + String UPDATE_EXPRESS_URL = "https://api.weixin.qq.com/channels/ec/order/deliveryinfo/update"; + /** 同意用户修改收货地址申请 */ + String ACCEPT_ADDRESS_MODIFY_URL = "https://api.weixin.qq.com/channels/ec/order/addressmodify/accept"; + /** 拒绝用户修改收货地址申请 */ + String REJECT_ADDRESS_MODIFY_URL = "https://api.weixin.qq.com/channels/ec/order/addressmodify/reject"; + /** 订单搜索 */ + String ORDER_SEARCH_URL = "https://api.weixin.qq.com/channels/ec/order/search"; + /** 上传生鲜质检信息 */ + String UPLOAD_FRESH_INSPECT_URL = "https://api.weixin.qq.com/channels/ec/order/freshinspect/submit"; + /** 兑换虚拟号 */ + String VIRTUAL_TEL_NUMBER_URL = "https://api.weixin.qq.com/channels/ec/order/virtualtelnumber/get"; + /** 解码订单包含的敏感数据 */ + String DECODE_SENSITIVE_INFO_URL = "https://api.weixin.qq.com/channels/ec/order/sensitiveinfo/decode"; + /** 礼物订单新增备注信息 */ + String PRESENT_NOTE_ADD_URL = "https://api.weixin.qq.com/channels/ec/order/presentnote/add"; + /** 获取礼物单的子单列表 */ + String PRESENT_SUB_ORDER_GET_URL = "https://api.weixin.qq.com/channels/ec/order/presentsuborder/get"; + /** 获取待发货前更换sku待处理请求 */ + String PRE_SHIPMENT_CHANGE_SKU_GET_URL = "https://api.weixin.qq.com/channels/ec/order/preshipmentchangesku/get"; + /** 同意待发货前更换sku请求 */ + String PRE_SHIPMENT_CHANGE_SKU_APPROVE_URL = "https://api.weixin.qq.com/channels/ec/order/preshipmentchangesku/approve"; + /** 拒绝待发货前更换sku请求 */ + String PRE_SHIPMENT_CHANGE_SKU_REJECT_URL = "https://api.weixin.qq.com/channels/ec/order/preshipmentchangesku/reject"; + /** 申请查看订单真实号码 */ + String REAL_NUMBER_APPLY_URL = "https://api.weixin.qq.com/channels/ec/order/realnumber/apply"; + /** 查看订单真实号审核状态 */ + String REAL_NUMBER_VIEW_AUDIT_GET_URL = "https://api.weixin.qq.com/channels/ec/order/realnumberviewaudit/get"; + /** 订单再次申请虚拟号 */ + String VIRTUAL_NUMBER_APPLY_AGAIN_URL = "https://api.weixin.qq.com/channels/ec/order/virtualnumber/applyagain"; + /** 订单虚拟号延期 */ + String VIRTUAL_NUMBER_DELAY_URL = "https://api.weixin.qq.com/channels/ec/order/virtualnumber/delay"; + /** 订单补发货 */ + String DELIVERY_COMPENSATION_URL = "https://api.weixin.qq.com/channels/ec/order/delivery/compensation"; + } + + /** 虚拟号管理相关接口 */ + public interface PrivateNumber { + + /** 添加待认证的手机号 */ + String ADD_PHONE_URL = "https://api.weixin.qq.com/channels/ec/merchant/privatenumber/addphone"; + /** 获取短信验证码 */ + String SEND_VERIFY_CODE_URL = "https://api.weixin.qq.com/channels/ec/merchant/privatenumber/sendverifycode"; + /** 获取小店手机号认证状态 */ + String GET_PHONE_URL = "https://api.weixin.qq.com/channels/ec/merchant/privatenumber/getphone"; + } + + /** 售后相关接口 */ + public interface AfterSale { + String AFTER_SALE_GEN_AFTER_SALE_ORDER_URL = "https://api.weixin.qq.com/channels/ec/aftersale/genaftersaleorder"; + String AFTER_SALE_REFUND_PRICE_DIFF_URL = "https://api.weixin.qq.com/channels/ec/aftersale/refundpricediff"; + String AFTER_SALE_APPLY_VIRTUAL_TEL_NUM_URL = "https://api.weixin.qq.com/channels/ec/aftersale/applyvirtualtelnum"; + String AFTER_SALE_HANDLE_FAST_EXCHANGE_RECEIPT_URL = "https://api.weixin.qq.com/channels/ec/aftersale/handlefastexchangereceipt"; + String AFTER_SALE_GET_GUARANTEE_ORDER_URL = "https://api.weixin.qq.com/channels/ec/aftersale/getguaranteeorder"; + String AFTER_SALE_MERCHANT_ACCEPT_GUARANTEE_URL = "https://api.weixin.qq.com/channels/ec/aftersale/merchantacceptguarantee"; + String AFTER_SALE_MERCHANT_MODIFY_GUARANTEE_URL = "https://api.weixin.qq.com/channels/ec/aftersale/merchantmodifyguarantee"; + String AFTER_SALE_MERCHANT_PROOF_GUARANTEE_URL = "https://api.weixin.qq.com/channels/ec/aftersale/merchantproofguarantee"; + String AFTER_SALE_SYNC_WORK_ORDER_URL = "https://api.weixin.qq.com/channels/ec/aftersale/syncworkorder"; + + /** 获取售后列表 */ + String AFTER_SALE_LIST_URL = "https://api.weixin.qq.com/channels/ec/aftersale/getaftersalelist"; + /** 获取售后单 */ + String AFTER_SALE_GET_URL = "https://api.weixin.qq.com/channels/ec/aftersale/getaftersaleorder"; + /** 同意售后 */ + String AFTER_SALE_ACCEPT_URL = "https://api.weixin.qq.com/channels/ec/aftersale/acceptapply"; + /** 拒绝售后 */ + String AFTER_SALE_REJECT_URL = "https://api.weixin.qq.com/channels/ec/aftersale/rejectapply"; + /** 上传退款凭证 */ + String AFTER_SALE_UPLOAD_URL = "https://api.weixin.qq.com/channels/ec/aftersale/uploadrefundcertificate"; + /** 获取全量售后原因*/ + String AFTER_SALE_REASON_GET_URL = "https://api.weixin.qq.com/channels/ec/aftersale/reason/get"; + /** 获取拒绝售后原因*/ + String AFTER_SALE_REJECT_REASON_GET_URL = "https://api.weixin.qq.com/channels/ec/aftersale/rejectreason/get"; + /** 换货发货*/ + String AFTER_SALE_ACCEPT_EXCHANGE_RESHIP_URL = "https://api.weixin.qq.com/channels/ec/aftersale/acceptexchangereship"; + /** 换货拒绝发货*/ + String AFTER_SALE_REJECT_EXCHANGE_RESHIP_URL = "https://api.weixin.qq.com/channels/ec/aftersale/rejectexchangereship"; + /** 商家协商*/ + String AFTER_SALE_MERCHANT_UPDATE_URL = "https://api.weixin.qq.com/channels/ec/aftersale/merchantupdateaftersale"; + /** 获取保障单列表 */ + String GUARANTEE_ORDER_LIST_URL = "https://api.weixin.qq.com/channels/ec/aftersale/searchguaranteeorder"; + /** 获取保障单详情 */ + String GUARANTEE_ORDER_GET_URL = "https://api.weixin.qq.com/channels/ec/aftersale/getguaranteeorder"; + /** 同意保障单申请 */ + String GUARANTEE_ORDER_ACCEPT_URL = "https://api.weixin.qq.com/channels/ec/aftersale/merchantacceptguarantee"; + /** 商家协商保障单 */ + String GUARANTEE_ORDER_MODIFY_URL = "https://api.weixin.qq.com/channels/ec/aftersale/merchantmodifyguarantee"; + /** 商家举证保障单 */ + String GUARANTEE_ORDER_PROOF_URL = "https://api.weixin.qq.com/channels/ec/aftersale/merchantproofguarantee"; + /** 拒绝保障单申请 */ + String GUARANTEE_ORDER_REFUSE_URL = "https://api.weixin.qq.com/channels/ec/aftersale/merchantrefuseguarantee"; + } + + /** 纠纷相关接口 */ + public interface Complaint { + + /** 商家补充纠纷单留言 */ + String ADD_COMPLAINT_MATERIAL_URL = "https://api.weixin.qq.com/channels/ec/aftersale/addcomplaintmaterial"; + /** 商家举证 */ + String ADD_COMPLAINT_PROOF_URL = "https://api.weixin.qq.com/channels/ec/aftersale/addcomplaintproof"; + /** 获取纠纷单 */ + String GET_COMPLAINT_ORDER_URL = "https://api.weixin.qq.com/channels/ec/aftersale/getcomplaintorder"; + } + + /** 物流相关接口 */ + public interface Delivery { + /** 获取快递公司列表 */ + String GET_DELIVERY_COMPANY_NEW_URL = "https://api.weixin.qq.com/channels/ec/order/deliverycompanylist/new/get"; + /** 获取快递公司列表(旧) */ + String GET_DELIVERY_COMPANY_URL = "https://api.weixin.qq.com/channels/ec/order/deliverycompanylist/get"; + /** 订单发货 */ + String DELIVERY_SEND_URL = "https://api.weixin.qq.com/channels/ec/order/delivery/send"; + } + + /** 电子面单相关接口 */ + public interface Ewaybill { + /** 获取面单标准模板 */ + String GET_TEMPLATE_CONFIG_URL = "https://api.weixin.qq.com/channels/ec/logistics/ewaybill/biz/template/config"; + /** 新增面单模板 */ + String CREATE_TEMPLATE_URL = "https://api.weixin.qq.com/channels/ec/logistics/ewaybill/biz/template/create"; + /** 删除面单模板 */ + String DELETE_TEMPLATE_URL = "https://api.weixin.qq.com/channels/ec/logistics/ewaybill/biz/template/delete"; + /** 更新面单模板 */ + String UPDATE_TEMPLATE_URL = "https://api.weixin.qq.com/channels/ec/logistics/ewaybill/biz/template/update"; + /** 获取面单模板信息 */ + String GET_TEMPLATE_URL = "https://api.weixin.qq.com/channels/ec/logistics/ewaybill/biz/template/get"; + /** 根据模板ID获取面单模板信息 */ + String GET_TEMPLATE_BY_ID_URL = "https://api.weixin.qq.com/channels/ec/logistics/ewaybill/biz/template/getbyid"; + /** 查询开通的电子面单网点/账号信息 */ + String GET_ACCOUNT_URL = "https://api.weixin.qq.com/channels/ec/logistics/ewaybill/biz/account/get"; + /** 查询开通的快递公司列表 */ + String GET_DELIVERY_LIST_URL = "https://api.weixin.qq.com/channels/ec/logistics/ewaybill/biz/delivery/get"; + /** 电子面单预取号 */ + String PRE_CREATE_ORDER_URL = "https://api.weixin.qq.com/channels/ec/logistics/ewaybill/biz/order/precreate"; + /** 电子面单取号 */ + String CREATE_ORDER_URL = "https://api.weixin.qq.com/channels/ec/logistics/ewaybill/biz/order/create"; + /** 电子面单子件追加 */ + String ADD_SUB_ORDER_URL = "https://api.weixin.qq.com/channels/ec/logistics/ewaybill/biz/order/addsuborder"; + /** 电子面单取消下单 */ + String CANCEL_ORDER_URL = "https://api.weixin.qq.com/channels/ec/logistics/ewaybill/biz/order/cancel"; + /** 查询面单详情 */ + String GET_ORDER_URL = "https://api.weixin.qq.com/channels/ec/logistics/ewaybill/biz/order/get"; + /** 获取打印报文 */ + String GET_PRINT_CONTENT_URL = "https://api.weixin.qq.com/channels/ec/logistics/ewaybill/biz/print/get"; + /** 打印成功通知 */ + String PRINT_ORDER_URL = "https://api.weixin.qq.com/channels/ec/logistics/ewaybill/biz/order/print"; + /** 批量打印通知 */ + String BATCH_PRINT_ORDER_URL = "https://api.weixin.qq.com/channels/ec/logistics/ewaybill/biz/order/batchprint"; + } + + /** 运费模板相关接口 */ + public interface FreightTemplate { + + /** 获取运费模板列表 */ + String LIST_TEMPLATE_URL = "https://api.weixin.qq.com/channels/ec/merchant/getfreighttemplatelist"; + /** 查询运费模版 */ + String GET_TEMPLATE_URL = "https://api.weixin.qq.com/channels/ec/merchant/getfreighttemplatedetail"; + /** 增加运费模版 */ + String ADD_TEMPLATE_URL = "https://api.weixin.qq.com/channels/ec/merchant/addfreighttemplate"; + /** 更新运费模版 */ + String UPDATE_TEMPLATE_URL = "https://api.weixin.qq.com/channels/ec/merchant/updatefreighttemplate"; + } + + /** 地址管理相关接口 */ + public interface Address { + + /** 增加地址 */ + String ADD_ADDRESS_URL = "https://api.weixin.qq.com/channels/ec/merchant/address/add"; + /** 获取地址列表 */ + String LIST_ADDRESS_URL = "https://api.weixin.qq.com/channels/ec/merchant/address/list"; + /** 获取地址详情 */ + String GET_ADDRESS_URL = "https://api.weixin.qq.com/channels/ec/merchant/address/get"; + /** 更新地址 */ + String UPDATE_ADDRESS_URL = "https://api.weixin.qq.com/channels/ec/merchant/address/update"; + /** 删除地址 */ + String DELETE_ADDRESS_URL = "https://api.weixin.qq.com/channels/ec/merchant/address/delete"; + } + + /** 优惠券相关接口 */ + public interface Coupon { + + /** 创建优惠券 */ + String CREATE_COUPON_URL = "https://api.weixin.qq.com/channels/ec/coupon/create"; + /** 更新优惠券 */ + String UPDATE_COUPON_URL = "https://api.weixin.qq.com/channels/ec/coupon/update"; + /** 更新优惠券状态 */ + String UPDATE_COUPON_STATUS_URL = "https://api.weixin.qq.com/channels/ec/coupon/update_status"; + /** 获取优惠券详情 */ + String GET_COUPON_URL = "https://api.weixin.qq.com/channels/ec/coupon/get"; + /** 获取优惠券ID列表 */ + String LIST_COUPON_URL = "https://api.weixin.qq.com/channels/ec/coupon/get_list"; + /** 获取用户优惠券ID列表 */ + String LIST_USER_COUPON_URL = "https://api.weixin.qq.com/channels/ec/coupon/get_user_coupon_list"; + /** 获取用户优惠券详情 */ + String GET_USER_COUPON_URL = "https://api.weixin.qq.com/channels/ec/coupon/get_user_coupon"; + } + + /** 分享员相关接口 */ + public interface Share { + + /** 邀请分享员 */ + String BIND_SHARER_URL = "https://api.weixin.qq.com/channels/ec/sharer/bind"; + /** 获取绑定的分享员 */ + String SEARCH_SHARER_URL = "https://api.weixin.qq.com/channels/ec/sharer/search_sharer"; + /** 获取绑定的分享员列表 */ + String LIST_SHARER_URL = "https://api.weixin.qq.com/channels/ec/sharer/get_sharer_list"; + /** 获取分享员订单列表 */ + String LIST_SHARER_ORDER_URL = "https://api.weixin.qq.com/channels/ec/sharer/get_sharer_order_list"; + /** 解绑分享员 */ + String UNBIND_SHARER_URL = "https://api.weixin.qq.com/channels/ec/sharer/unbind"; + } + + /** 合作账号相关接口 */ + public interface Cooperation { + /** 获取合作账号列表 */ + String LIST_COOPERATION_URL = "https://api.weixin.qq.com/channels/ec/cooperation/list"; + /** 查看合作账号邀请状态 */ + String GET_COOPERATION_STATUS_URL = "https://api.weixin.qq.com/channels/ec/cooperation/invitation/get"; + /** 邀请合作账号 */ + String GENERATE_QRCODE_COOPERATION_URL = "https://api.weixin.qq.com/channels/ec/cooperation/invitation/qrcode/generate"; + /** 取消合作账号邀请 */ + String CANCEL_COOPERATION_URL = "https://api.weixin.qq.com/channels/ec/cooperation/invitation/cancel"; + /** 解绑合作账号 */ + String UNBIND_COOPERATION_URL = "https://api.weixin.qq.com/channels/ec/cooperation/unbind"; + } + + /** 资金相关接口 */ + public interface Fund { + + /** 获取账户余额 */ + String GET_BALANCE_URL = "https://api.weixin.qq.com/channels/ec/funds/getbalance"; + /** 获取结算账户 */ + String GET_BANK_ACCOUNT_URL = "https://api.weixin.qq.com/channels/ec/funds/getbankacct"; + /** 获取资金流水详情 */ + String GET_BALANCE_FLOW_DETAIL_URL = "https://api.weixin.qq.com/channels/ec/funds/getfundsflowdetail"; + /** 获取资金流水列表 */ + String GET_BALANCE_FLOW_LIST_URL = "https://api.weixin.qq.com/channels/ec/funds/getfundsflowlist"; + /** 获取提现记录 */ + String GET_WITHDRAW_DETAIL_URL = "https://api.weixin.qq.com/channels/ec/funds/getwithdrawdetail"; + /** 获取提现记录列表 */ + String GET_WITHDRAW_LIST_URL = "https://api.weixin.qq.com/channels/ec/funds/getwithdrawlist"; + /** 修改结算账户 */ + String SET_BANK_ACCOUNT_URL = "https://api.weixin.qq.com/channels/ec/funds/setbankacct"; + /** 商户提现 */ + String WITHDRAW_URL = "https://api.weixin.qq.com/channels/ec/funds/submitwithdraw"; + /** 根据卡号查银行信息 */ + String GET_BANK_BY_NUM_URL = "https://api.weixin.qq.com/shop/funds/getbankbynum"; + /** 搜索银行列表 */ + String GET_BANK_LIST_URL = "https://api.weixin.qq.com/shop/funds/getbanklist"; + /** 查询城市列表 */ + String GET_CITY_URL = "https://api.weixin.qq.com/shop/funds/getcity"; + /** 查询大陆银行省份列表 */ + String GET_PROVINCE_URL = "https://api.weixin.qq.com/shop/funds/getprovince"; + /** 查询支行列表 */ + String GET_SUB_BANK_URL = "https://api.weixin.qq.com/shop/funds/getsubbranch"; + /** 获取二维码 */ + String GET_QRCODE_URL = "https://api.weixin.qq.com/shop/funds/qrcode/get"; + /** 查询扫码状态 */ + String CHECK_QRCODE_URL = "https://api.weixin.qq.com/shop/funds/qrcode/check"; + } + + /** 代发管理相关接口 */ + public interface Supplier { + /** 获取供货商列表 */ + String GET_SUPPLIER_LIST_URL = "https://api.weixin.qq.com/channels/ec/supplier/relation/get_supplier_list"; + /** 获取分配方式 */ + String GET_DISTRIBUTE_URL = "https://api.weixin.qq.com/channels/ec/supplier/relation/get_distribute"; + /** 设置全店订单手动分配 */ + String SET_MANUALLY_DISTRIBUTE_URL = "https://api.weixin.qq.com/channels/ec/supplier/relation/set_manually_distribute"; + /** 设置全店订单自动分配 */ + String SET_ALL_DISTRIBUTION_URL = "https://api.weixin.qq.com/channels/ec/supplier/relation/set_all_distribution"; + /** 设置按商品自动分配 */ + String SET_PRODUCT_DISTRIBUTE_URL = "https://api.weixin.qq.com/channels/ec/supplier/relation/set_product_distribute"; + /** 获取商品对应的自动分配供货商 */ + String GET_PRODUCT_DEFAULT_DISTRIBUTE_URL = "https://api.weixin.qq.com/channels/ec/supplier/relation/get_product_default_distribute"; + /** 获取按商品自动分配的商品列表 */ + String GET_PRODUCT_LIST_URL = "https://api.weixin.qq.com/channels/ec/supplier/relation/get_product_list"; + /** 分配订单代发 */ + String ASSIGN_DROPSHIP_URL = "https://api.weixin.qq.com/channels/ec/order/dropship/assign"; + /** 取消分配代发单 */ + String CANCEL_DROPSHIP_URL = "https://api.weixin.qq.com/channels/ec/order/dropship/cancel"; + /** 查询代发单详情 */ + String GET_DROPSHIP_URL = "https://api.weixin.qq.com/channels/ec/order/dropship/get"; + /** 拉取代发单列表 */ + String GET_DROPSHIP_LIST_URL = "https://api.weixin.qq.com/channels/ec/order/dropship/list"; + /** 搜索代发单 */ + String SEARCH_DROPSHIP_URL = "https://api.weixin.qq.com/channels/ec/order/dropship/search"; + } + + /** 会员功能接口 */ + public interface Vip { + /** 拉取用户详情 */ + String VIP_USER_INFO_URL = "https://api.weixin.qq.com/channels/ec/vip/user/info/get"; + /** 拉取用户列表 */ + String VIP_USER_LIST_URL = "https://api.weixin.qq.com/channels/ec/vip/user/list/get"; + + /** 获取用户积分 */ + String VIP_SCORE_URL = "https://api.weixin.qq.com/channels/ec/vip/user/score/get"; + /** 增加用户积分 */ + String SCORE_INCREASE_URL = "https://api.weixin.qq.com/channels/ec/vip/user/score/increase"; + /** 减少用户积分 */ + String SCORE_DECREASE_URL = "https://api.weixin.qq.com/channels/ec/vip/user/score/decrease"; + + /** 更新用户等级 */ + String GRADE_UPDATE_URL = "https://api.weixin.qq.com/channels/ec/vip/user/grade/update"; + } + + /** 质检管理相关接口 */ + public interface Qic { + /** 查询质检仓配置 */ + String GET_INSPECT_CONFIG_URL = "https://api.weixin.qq.com/channels/ec/qic/inspect/config/get"; + /** 查询送检配置模板信息 */ + String GET_SUBMIT_CONFIG_URL = "https://api.weixin.qq.com/channels/ec/qic/inspect/submitconfig/get"; + /** 打印质检码 */ + String PRINT_INSPECT_CODE_URL = "https://api.weixin.qq.com/channels/ec/qic/inspect/code/print"; + /** 绑定送检信息 */ + String SUBMIT_INSPECT_INFO_URL = "https://api.weixin.qq.com/channels/ec/qic/inspect/submit"; + /** 自寄快递送检 */ + String REGISTER_LOGISTICS_URL = "https://api.weixin.qq.com/channels/ec/qic/inspect/register_logistics"; + } + + /** + * 带货助手API + */ + public interface Talent { + + /** + * 获取佣金单列表 + */ + String GET_ORDER_LIST_URL = "https://api.weixin.qq.com/channels/ec/talent/get_order_list"; + + /** + * 获取佣金单详情 + */ + String GET_ORDER_DETAIL_URL = "https://api.weixin.qq.com/channels/ec/talent/get_order_detail"; + + /** + * 获取达人橱窗商品列表 + */ + String GET_WINDOW_PRODUCT_LIST_URL = "https://api.weixin.qq.com/channels/ec/talent/window/product/list/get"; + + /** + * 获取达人橱窗商品详情 + */ + String GET_WINDOW_PRODUCT_DETAIL_URL = "https://api.weixin.qq.com/channels/ec/talent/window/product/get"; + } + + /** + * 罗盘商家版API + */ + public interface CompassShop { + + /** 获取电商数据概览 */ + String GET_SHOP_OVERALL_URL = "https://api.weixin.qq.com/channels/ec/compass/shop/overall/get"; + /** 获取授权视频号列表 */ + String FINDER_AUTH_LIST_URL = "https://api.weixin.qq.com/channels/ec/compass/shop/finder/authorization/list/get"; + /** 获取带货达人列表 */ + String FINDER_LIST_URL = "https://api.weixin.qq.com/channels/ec/compass/shop/finder/list/get"; + /** 获取带货数据概览 */ + String GET_FINDER_OVERALL_URL = "https://api.weixin.qq.com/channels/ec/compass/shop/finder/overall/get"; + /** 获取带货达人商品列表 */ + String GET_FINDER_PRODUCT_LIST_URL = "https://api.weixin.qq.com/channels/ec/compass/shop/finder/product/list/get"; + /** 获取带货达人商品数据 */ + String GET_FINDER_PRODUCT_OVERALL_URL = "https://api.weixin.qq.com/channels/ec/compass/shop/finder/product/overall/get"; + /** 获取店铺开播列表 */ + String GET_LIVE_LIST_URL = "https://api.weixin.qq.com/channels/ec/compass/shop/live/list/get"; + /** 获取商品详细信息 */ + String GET_SHOP_PRODUCT_DATA_URL = "https://api.weixin.qq.com/channels/ec/compass/shop/product/data/get"; + /** 获取商品列表 */ + String GET_SHOP_PRODUCT_LIST_URL = "https://api.weixin.qq.com/channels/ec/compass/shop/product/list/get"; + /** 获取店铺人群数据 */ + String GET_SHOP_SALE_PROFILE_DATA_URL = "https://api.weixin.qq.com/channels/ec/compass/shop/sale/profile/data/get"; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/AccountType.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/AccountType.java new file mode 100644 index 0000000000..8e77990884 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/AccountType.java @@ -0,0 +1,43 @@ +package com.binarywang.wxjava.store.enums; + +import com.fasterxml.jackson.annotation.JsonFormat; + +/** + * 微信小店 账户类型 + * + * @author Zeyes + */ +@JsonFormat(shape = JsonFormat.Shape.OBJECT) +public enum AccountType { + /** 对公银行账户 */ + ACCOUNT_TYPE_BUSINESS("ACCOUNT_TYPE_BUSINESS", "对公银行账户"), + /** 经营者个人银行卡 */ + ACCOUNT_TYPE_PRIVATE("ACCOUNT_TYPE_PRIVATE", "经营者个人银行卡"), + + ; + + private final String key; + private final String value; + + AccountType(String key, String value) { + this.key = key; + this.value = value; + } + + public static AccountType getByKey(String key) { + for (AccountType reason : AccountType.values()) { + if (reason.getKey().equals(key)) { + return reason; + } + } + return ACCOUNT_TYPE_PRIVATE; + } + + public String getKey() { + return key; + } + + public String getValue() { + return value; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/AfterSaleStatus.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/AfterSaleStatus.java new file mode 100644 index 0000000000..c7eb9c0210 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/AfterSaleStatus.java @@ -0,0 +1,64 @@ +package com.binarywang.wxjava.store.enums; + +import com.fasterxml.jackson.annotation.JsonFormat; + +/** + * 微信小店 售后单状态 + * + * @author Zeyes + */ +@JsonFormat(shape = JsonFormat.Shape.OBJECT) +public enum AfterSaleStatus { + /** 用户取消申请 */ + USER_CANCELD("USER_CANCELD", "用户取消申请"), + /** 商家受理中 */ + MERCHANT_PROCESSING("MERCHANT_PROCESSING", "商家受理中"), + /** 商家拒绝退款 */ + MERCHANT_REJECT_REFUND("MERCHANT_REJECT_REFUND", "商家拒绝退款"), + /** 商家拒绝退货退款 */ + MERCHANT_REJECT_RETURN("MERCHANT_REJECT_RETURN", "商家拒绝退货退款"), + /** 待买家退货 */ + USER_WAIT_RETURN("USER_WAIT_RETURN", "待买家退货"), + /** 7 售后单关闭 */ + RETURN_CLOSED("RETURN_CLOSED", "退货退款关闭"), + /** 8 待商家收货 */ + MERCHANT_WAIT_RECEIPT("MERCHANT_WAIT_RECEIPT", "待商家收货"), + /** 商家逾期未退款 */ + MERCHANT_OVERDUE_REFUND("MERCHANT_OVERDUE_REFUND", "商家逾期未退款"), + /** 退款完成 */ + MERCHANT_REFUND_SUCCESS("MERCHANT_REFUND_SUCCESS", "退款完成"), + /** 退货退款完成 */ + MERCHANT_RETURN_SUCCESS("MERCHANT_RETURN_SUCCESS", "退货退款完成"), + /** 11 平台退款中 */ + PLATFORM_REFUNDING("PLATFORM_REFUNDING", "平台退款中"), + /** 25 平台退款失败 */ + PLATFORM_REFUND_FAIL("PLATFORM_REFUND_FAIL", "平台退款失败"), + /** 待用户确认 */ + USER_WAIT_CONFIRM("USER_WAIT_CONFIRM", "待用户确认"), + /** 商家打款失败,客服关闭售后 */ + MERCHANT_REFUND_RETRY_FAIL("MERCHANT_REFUND_RETRY_FAIL", "商家打款失败,客服关闭售后"), + /** 售后关闭 */ + MERCHANT_FAIL("MERCHANT_FAIL", "售后关闭"), + /** 待用户处理商家协商 */ + USER_WAIT_CONFIRM_UPDATE("USER_WAIT_CONFIRM_UPDATE", "待用户处理商家协商"), + /** 待用户处理商家代发起的售后申请 */ + USER_WAIT_HANDLE_MERCHANT_AFTER_SALE("USER_WAIT_HANDLE_MERCHANT_AFTER_SALE", "待用户处理商家代发起的售后申请"), + ; + + private final String key; + private final String value; + + AfterSaleStatus(String key, String value) { + this.key = key; + this.value = value; + } + + public String getKey() { + return key; + } + + public String getValue() { + return value; + } + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/AfterSaleType.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/AfterSaleType.java new file mode 100644 index 0000000000..d36b9e46b3 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/AfterSaleType.java @@ -0,0 +1,32 @@ +package com.binarywang.wxjava.store.enums; + +import com.fasterxml.jackson.annotation.JsonFormat; + +/** + * 售后类型 + * + * @author Zeyes + */ +@JsonFormat(shape = JsonFormat.Shape.OBJECT) +public enum AfterSaleType { + /** 1 仅退款 */ + REFUND_ONLY("REFUND", "仅退款"), + /** 2 退货退款 */ + REFUND_GOODS("RETURN", "退货退款"); + + private final String key; + private final String value; + + AfterSaleType(String key, String value) { + this.key = key; + this.value = value; + } + + public String getKey() { + return key; + } + + public String getValue() { + return value; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/AfterSalesReason.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/AfterSalesReason.java new file mode 100644 index 0000000000..ee927d348d --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/AfterSalesReason.java @@ -0,0 +1,63 @@ +package com.binarywang.wxjava.store.enums; + +import com.fasterxml.jackson.annotation.JsonFormat; + +/** + * 微信小店 售后原因 + * + * @author Zeyes + */ +@JsonFormat(shape = JsonFormat.Shape.OBJECT) +public enum AfterSalesReason { + /** 拍错/多拍 */ + INCORRECT_SELECTION("INCORRECT_SELECTION", "拍错/多拍"), + /** 不想要了 */ + NO_LONGER_WANT("NO_LONGER_WANT", "不想要了"), + /** 无快递信息 */ + NO_EXPRESS_INFO("NO_EXPRESS_INFO", "无快递信息"), + /** 包裹为空 */ + EMPTY_PACKAGE("EMPTY_PACKAGE", "包裹为空"), + /** 已拒签包裹 */ + REJECT_RECEIVE_PACKAGE("REJECT_RECEIVE_PACKAGE", "已拒签包裹"), + /** 快递长时间未送达 */ + NOT_DELIVERED_TOO_LONG("NOT_DELIVERED_TOO_LONG", "快递长时间未送达了"), + /** 与商品描述不符 */ + NOT_MATCH_PRODUCT_DESC("NOT_MATCH_PRODUCT_DESC", "与商品描述不符"), + /** 质量问题 */ + QUALITY_ISSUE("QUALITY_ISSUE", "质量问题"), + /** 卖家发错货 */ + SEND_WRONG_GOODS("SEND_WRONG_GOODS", "卖家发错货"), + /** 三无产品 */ + THREE_NO_PRODUCT("THREE_NO_PRODUCT", "三无产品"), + /** 假冒产品 */ + FAKE_PRODUCT("FAKE_PRODUCT", "假冒产品"), + /** 其它 */ + OTHERS("OTHERS", "其它"), + ; + + private final String key; + private final String value; + + AfterSalesReason(String key, String value) { + this.key = key; + this.value = value; + } + + public static AfterSalesReason getByKey(String key) { + for (AfterSalesReason reason : AfterSalesReason.values()) { + if (reason.getKey().equals(key)) { + return reason; + } + } + // 找不到就返回其他了 + return OTHERS; + } + + public String getKey() { + return key; + } + + public String getValue() { + return value; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/BannerType.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/BannerType.java new file mode 100644 index 0000000000..bcd1077ac6 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/BannerType.java @@ -0,0 +1,37 @@ +package com.binarywang.wxjava.store.enums; + +import com.fasterxml.jackson.annotation.JsonFormat; + +/** + * 展示位类型 + * + * @author Zeyes + */ +@JsonFormat(shape = JsonFormat.Shape.OBJECT) +public enum BannerType { + + /** 1 商品 */ + PRODUCT(1, "商品"), + /** 3 视频号 */ + CHANNEL(3, "视频号"), + /** 4 公众号 */ + MP(4, "公众号"); + + ; + + private final int key; + private final String value; + + BannerType(int key, String value) { + this.key = key; + this.value = value; + } + + public int getKey() { + return key; + } + + public String getValue() { + return value; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/CommissionOrderStatus.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/CommissionOrderStatus.java new file mode 100644 index 0000000000..7cf6083296 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/CommissionOrderStatus.java @@ -0,0 +1,37 @@ +package com.binarywang.wxjava.store.enums; + +import com.fasterxml.jackson.annotation.JsonFormat; + +/** + * 佣金订单状态 + * + * @author Zeyes + */ +@JsonFormat(shape = JsonFormat.Shape.OBJECT) +public enum CommissionOrderStatus { + + /** 20 未结算 */ + NOT_SETTLED(20, "未结算"), + /** 100 已结算 */ + SETTLED(100, "已结算"), + /** 200 取消结算 */ + CANCEL_SETTLED(200, "取消结算"), + + ; + + private final int key; + private final String val; + + CommissionOrderStatus(int key, String val) { + this.key = key; + this.val = val; + } + + public int getKey() { + return key; + } + + public String getVal() { + return val; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/ComplaintItemType.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/ComplaintItemType.java new file mode 100644 index 0000000000..290024f479 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/ComplaintItemType.java @@ -0,0 +1,112 @@ +package com.binarywang.wxjava.store.enums; + +import com.fasterxml.jackson.annotation.JsonFormat; + +/** + * 纠纷历史操作类型 + * + * @author Zeyes + */ +@JsonFormat(shape = JsonFormat.Shape.OBJECT) +public enum ComplaintItemType { + /** 1 申请平台介入 */ + APPLY_PLATFORM_INTERVENTION(1, "申请平台介入"), + /** 2 用户留言 */ + USER_MESSAGE(2, "用户留言"), + /** 3 商家留言 */ + MERCHANT_MESSAGE(3, "商家留言"), + /** 4 提交投诉成功 */ + SUBMIT_COMPLAINT_SUCCESS(4, "提交投诉成功"), + /** 5 投诉已取消 */ + COMPLAINT_CANCELLED(5, "投诉已取消"), + /** 6 商家已超时 */ + MERCHANT_TIMEOUT(6, "商家已超时"), + /** 7 用户补充凭证 */ + USER_SUPPLEMENTARY_EVIDENCE(7, "用户补充凭证"), + /** 8 商家补充凭证 */ + MERCHANT_SUPPLEMENTARY_EVIDENCE(8, "商家补充凭证"), + /** 10 待商家处理纠纷 */ + WAIT_MERCHANT_HANDLE_DISPUTE(10, "待商家处理纠纷"), + /** 11 待平台处理 */ + WAIT_PLATFORM_HANDLE(11, "待平台处理"), + /** 12 取消平台介入 */ + CANCEL_PLATFORM_INTERVENTION(12, "取消平台介入"), + /** 13 平台处理中 */ + PLATFORM_PROCESSING(13, "平台处理中"), + /** 14 待用户补充凭证 */ + WAIT_USER_SUPPLEMENTARY_EVIDENCE(14, "待用户补充凭证"), + /** 16 待商家补充凭证 */ + WAIT_MERCHANT_SUPPLEMENTARY_EVIDENCE(16, "待商家补充凭证"), + /** 18 待双方补充凭证 */ + WAIT_BOTH_PARTIES_SUPPLEMENTARY_EVIDENCE(18, "待双方补充凭证"), + /** 20 待商家确认 */ + WAIT_MERCHANT_CONFIRM(20, "待商家确认"), + /** 21 商家申诉中 */ + MERCHANT_APPEALING(21, "商家申诉中"), + /** 22 调解完成 */ + MEDIATION_COMPLETE(22, "调解完成"), + /** 23 待平台核实 */ + WAIT_PLATFORM_VERIFY(23, "待平台核实"), + /** 24 重新退款中 */ + REFUNDING_AGAIN(24, "重新退款中"), + /** 26 调解关闭 */ + MEDIATION_CLOSED(26, "调解关闭"), + /** 30 平台判定用户责任 */ + PLATFORM_JUDGMENT_USER_RESPONSIBILITY(30, "平台判定用户责任"), + /** 31 平台判定商家责任 */ + PLATFORM_JUDGMENT_MERCHANT_RESPONSIBILITY(31, "平台判定商家责任"), + /** 32 平台判定双方责任 */ + PLATFORM_JUDGMENT_BOTH_PARTIES_RESPONSIBILITY(32, "平台判定双方责任"), + /** 33 平台判定无责任 */ + PLATFORM_JUDGMENT_NO_RESPONSIBILITY(33, "平台判定无责任"), + /** 34 平台判定申诉无效 */ + PLATFORM_JUDGMENT_APPEAL_INVALID(34, "平台判定申诉无效"), + /** 35 平台判定申诉生效 */ + PLATFORM_JUDGMENT_APPEAL_EFFECTIVE(35, "平台判定申诉生效"), + /** 36 平台判定退款有效 */ + PLATFORM_JUDGMENT_REFUND_EFFECTIVE(36, "平台判定退款有效"), + /** 37 平台判定退款无效 */ + PLATFORM_JUDGMENT_REFUND_INVALID(37, "平台判定退款无效"), + /** 50 用户发起退款 */ + USER_INITIATE_REFUND(50, "用户发起退款"), + /** 51 商家拒绝退款 */ + MERCHANT_REFUSE_REFUND(51, "商家拒绝退款"), + /** 52 用户取消申请 */ + USER_CANCEL_APPLICATION(52, "用户取消申请"), + /** 56 待买家退货 */ + WAIT_BUYER_RETURN_GOODS(56, "待买家退货"), + /** 57 退货退款关闭 */ + REFUND_CLOSED(57, "退货退款关闭"), + /** 58 待商家收货 */ + WAIT_MERCHANT_RECEIVE_GOODS(58, "待商家收货"), + /** 59 商家逾期未退款 */ + MERCHANT_OVERDUE_REFUND(59, "商家逾期未退款"), + /** 60 退款完成 */ + REFUND_COMPLETE(60, "退款完成"), + /** 61 退货退款完成 */ + REFUND_GOODS_COMPLETE(61, "退货退款完成"), + /** 62 平台退款中 */ + PLATFORM_REFUNDING(62, "平台退款中"), + /** 63 平台退款失败 */ + PLATFORM_REFUND_FAILED(63, "平台退款失败"), + /** 64 待用户确认 */ + WAIT_USER_CONFIRM(64, "待用户确认"), + + ; + + private final int key; + private final String value; + + ComplaintItemType(int key, String value) { + this.key = key; + this.value = value; + } + + public int getKey() { + return key; + } + + public String getValue() { + return value; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/ComplaintStatus.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/ComplaintStatus.java new file mode 100644 index 0000000000..3107e8e865 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/ComplaintStatus.java @@ -0,0 +1,30 @@ +package com.binarywang.wxjava.store.enums; + +import com.fasterxml.jackson.annotation.JsonFormat; + +/** + * 纠纷单状态 + * + * @author Zeyes + */ +@JsonFormat(shape = JsonFormat.Shape.OBJECT) +public enum ComplaintStatus { + + ; + + private final int key; + private final String value; + + ComplaintStatus(int key, String value) { + this.key = key; + this.value = value; + } + + public int getKey() { + return key; + } + + public String getValue() { + return value; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/CouponType.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/CouponType.java new file mode 100644 index 0000000000..e6bf78dd56 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/CouponType.java @@ -0,0 +1,45 @@ +package com.binarywang.wxjava.store.enums; + +import com.fasterxml.jackson.annotation.JsonFormat; + +/** + * 微信小店 优惠券 推广类型 + * + * @author Zeyes + */ +@JsonFormat(shape = JsonFormat.Shape.OBJECT) +public enum CouponType { + /** 1 商品条件折券 */ + C_1(1, "商品条件折券"), + /** 2 商品满减券 */ + C_2(2, "商品满减券"), + /** 3 商品统一折扣券 */ + C_3(3, "商品统一折扣券"), + /** 4 商品直减券 */ + C_4(4, "商品直减券"), + /** 101 店铺条件折扣券 */ + C_101(101, "店铺条件折扣券"), + /** 102 店铺满减券 */ + C_102(102, "店铺满减券"), + /** 103 店铺统一折扣券 */ + C_103(103, "店铺统一折扣券"), + /** 104 店铺直减券 */ + C_104(104, "店铺直减券"), + ; + + private final int key; + private final String val; + + CouponType(int key, String val) { + this.key = key; + this.val = val; + } + + public int getKey() { + return key; + } + + public String getVal() { + return val; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/CouponValidType.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/CouponValidType.java new file mode 100644 index 0000000000..508e8d5d4c --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/CouponValidType.java @@ -0,0 +1,34 @@ +package com.binarywang.wxjava.store.enums; + +import com.fasterxml.jackson.annotation.JsonFormat; + +/** + * 微信小店 优惠券 推广类型 + * + * @author Zeyes + */ +@JsonFormat(shape = JsonFormat.Shape.OBJECT) +public enum CouponValidType { + /** 指定时间范围生效 */ + COUPON_VALID_TYPE_TIME(1, "指定时间范围生效"), + /** 生效天数 */ + COUPON_VALID_TYPE_DAY(2, "生效天数"), + + ; + + private final int key; + private final String val; + + CouponValidType(int key, String val) { + this.key = key; + this.val = val; + } + + public int getKey() { + return key; + } + + public String getVal() { + return val; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/DeliveryType.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/DeliveryType.java new file mode 100644 index 0000000000..1caf928d0e --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/DeliveryType.java @@ -0,0 +1,42 @@ +package com.binarywang.wxjava.store.enums; + +/** + * 快递类型 + * + * @author Zeyes + */ +public enum DeliveryType { + /** 1 自寄快递 */ + SELF_DELIVERY(1, "自寄快递"), + /** 2 在线签约快递单 */ + ONLINE_DELIVERY(2, "在线签约快递单"), + /** 3 虚拟商品无需物流发货 */ + VIRTUAL_DELIVERY(3, "虚拟商品无需物流发货"), + /** 4 在线快递散单 */ + ONLINE_DELIVERY_SCATTER(4, "在线快递散单"); + + private final Integer key; + private final String value; + + DeliveryType(Integer key, String value) { + this.key = key; + this.value = value; + } + + public static DeliveryType getDeliveryType(Integer key) { + for (DeliveryType deliveryType : DeliveryType.values()) { + if (deliveryType.getKey().equals(key)) { + return deliveryType; + } + } + return null; + } + + public Integer getKey() { + return key; + } + + public String getValue() { + return value; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/FundsType.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/FundsType.java new file mode 100644 index 0000000000..fdd328c8b3 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/FundsType.java @@ -0,0 +1,61 @@ +package com.binarywang.wxjava.store.enums; + +/** + * 资金类型 + * + * @author Zeyes + */ +public enum FundsType { + + /** 1 订单支付收入 */ + ORDER_PAY_INCOME(1, "订单支付收入"), + /** 2 订单手续费 */ + ORDER_FEE(2, "订单手续费"), + /** 3 退款 */ + REFUND(3, "退款"), + /** 4 提现 */ + WITHDRAW(4, "提现"), + /** 5 提现失败退票 */ + WITHDRAW_FAIL(5, "提现失败退票"), + /** 6 导购分账 */ + GUIDE_SHARE(6, "导购分账"), + /** 7 联盟分账 */ + LEAGUE_SHARE(7, "联盟分账"), + /** 8 运费险分账 */ + FREIGHT_SHARE(8, "运费险分账"), + /** 9 联盟平台抽佣 */ + LEAGUE_PLAT_COMMISSION(9, "联盟平台抽佣"), + /** 10 联盟抽佣 */ + LEAGUE_COMMISSION(10, "联盟抽佣"), + /** 11台抽佣 */ + PLATFORM_COMMISSION(11, "平台抽佣"), + /** 12 团长抽佣 */ + LEADER_COMMISSION(12, "团长抽佣"), + /** 13 返佣人气卡 */ + POPULARITY_CARD(13, "返佣人气卡"), + /** 14 极速退款垫资金 */ + FAST_REFUND(14, "极速退款垫资金"), + /** 15 极速退款垫资回补 */ + FAST_REFUND_REPLENISHMENT(15, "极速退款垫资回补"), + /** 16 运费险 */ + FREIGHT_INSURANCE(16, "运费险"), + /** 99 分账 */ + SHARE(99, "分账"), + ; + + private final int key; + private final String value; + + FundsType(int key, String value) { + this.key = key; + this.value = value; + } + + public int getKey() { + return key; + } + + public String getValue() { + return value; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/MessageType.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/MessageType.java new file mode 100644 index 0000000000..9cc0bded14 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/MessageType.java @@ -0,0 +1,21 @@ +package com.binarywang.wxjava.store.enums; + +/** + * 消息类型 + * + * @author Zeyes + */ +public enum MessageType { + EVENT("event"), + ; + + private final String key; + + MessageType(String key) { + this.key = key; + } + + public String getKey() { + return key; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/OrderScene.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/OrderScene.java new file mode 100644 index 0000000000..51a1a8b942 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/OrderScene.java @@ -0,0 +1,52 @@ +package com.binarywang.wxjava.store.enums; + +/** + * 下单场景 + * + * @author lizhengwu + * @description + */ +public enum OrderScene { + /** + * 其他 + */ + OTHER(1, "其他"), + /** + * 直播间下单 + */ + LIVE(2, "直播间"), + /** + * 短视频 + */ + VIDEO(3, "短视频"), + /** + * 商品分享 + */ + SHARE(4, "商品分享"), + /** + * 商品橱窗主页 + */ + SHOW_CASE(5, "商品橱窗主页"), + /** + * 公众号文章商品卡片 + */ + ARTICLE_CARD(6, "公众号文章商品卡片"), + ; + + private final int key; + private final String value; + + OrderScene(int key, String value) { + this.key = key; + this.value = value; + } + + public int getKey() { + return key; + } + + public String getValue() { + return value; + } + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/PackageAuditItemType.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/PackageAuditItemType.java new file mode 100644 index 0000000000..b99e769047 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/PackageAuditItemType.java @@ -0,0 +1,37 @@ +package com.binarywang.wxjava.store.enums; + +import com.fasterxml.jackson.annotation.JsonFormat; + +/** + * 商品打包审核项 + * + * @author Zeyes + */ +@JsonFormat(shape = JsonFormat.Shape.OBJECT) +public enum PackageAuditItemType { + /** 商品快递单图片url */ + EXPRESS_PIC("product_express_pic_url", "商品快递单图片url"), + /** 商品包装箱图片url */ + BOX_PIC("product_packaging_box_pic_url", "商品包装箱图片url"), + /** 商品开箱图片url */ + UNBOXING_PIC("product_unboxing_pic_url", "商品开箱图片url"), + /** 商品单个细节图片url */ + DETAIL_PIC("single_product_detail_pic_url", "商品单个细节图片url"), + ; + + public final String key; + public final String value; + + PackageAuditItemType(String key, String value) { + this.key = key; + this.value = value; + } + + public String getKey() { + return key; + } + + public String getValue() { + return value; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/PromoteType.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/PromoteType.java new file mode 100644 index 0000000000..4e286f28f3 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/PromoteType.java @@ -0,0 +1,36 @@ +package com.binarywang.wxjava.store.enums; + +import com.fasterxml.jackson.annotation.JsonFormat; + +/** + * 微信小店 优惠券 推广类型 + * + * @author Zeyes + */ +@JsonFormat(shape = JsonFormat.Shape.OBJECT) +public enum PromoteType { + /** 1 小店内推广 */ + PROMOTE_TYPE_SHOP(1, "小店内推广"), + /** 9 会员券 */ + MEMBER(9, "会员券"), + /** 10 会员开卡礼券 */ + MEMBER_CARD(10, "会员开卡礼券"), + + ; + + private final int key; + private final String val; + + PromoteType(int key, String val) { + this.key = key; + this.val = val; + } + + public int getKey() { + return key; + } + + public String getVal() { + return val; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/QrCheckStatus.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/QrCheckStatus.java new file mode 100644 index 0000000000..d49864fcf4 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/QrCheckStatus.java @@ -0,0 +1,46 @@ +package com.binarywang.wxjava.store.enums; + +/** + * 二维码核销状态 + * + * @author Zeyes + */ +public enum QrCheckStatus { + /** 0 未扫码 */ + NOT_SCAN(0, "未扫码"), + /** 1 已确认 */ + CONFIRMED(1, "已确认"), + /** 2 已取消 */ + CANCEL(2, "已取消"), + /** 3 已失效 */ + INVALID(3, "已失效"), + /** 4 已扫码 */ + SCAN(4, "已扫码"), + + ; + + private final int key; + private final String value; + + QrCheckStatus(int key, String value) { + this.key = key; + this.value = value; + } + + public static QrCheckStatus getByKey(Integer key) { + for (QrCheckStatus status : QrCheckStatus.values()) { + if (status.getKey() == key) { + return status; + } + } + return NOT_SCAN; + } + + public int getKey() { + return key; + } + + public String getValue() { + return value; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/RefundReason.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/RefundReason.java new file mode 100644 index 0000000000..642d822142 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/RefundReason.java @@ -0,0 +1,51 @@ +package com.binarywang.wxjava.store.enums; + +import com.fasterxml.jackson.annotation.JsonFormat; + +/** + * 售后单退款直接原因 + * + * @author lizhengwu + */ +@JsonFormat(shape = JsonFormat.Shape.OBJECT) +public enum RefundReason { + /** 1 商家通过店铺管理页或者小助手发起退款 */ + MERCHANT_INITIATED_REFUND(1, "商家通过店铺管理页或者小助手发起退款"), + /** 2 退货退款场景,商家同意买家未上传物流单号情况下确认收货并退款,该场景限于订单无运费险 */ + MERCHANT_AGREES_NO_TRACKING_REFUND(2, "退货退款场景,商家同意买家未上传物流单号情况下确认收货并退款,该场景限于订单无运费险"), + /** 3 商家通过后台api发起退款 */ + MERCHANT_API_INITIATED_REFUND(3, "商家通过后台api发起退款"), + /** 4 未发货售后平台自动同意 */ + PRE_SHIPMENT_AUTOMATIC_REFUND(4, "未发货售后平台自动同意"), + /** 5 平台介入纠纷退款 */ + PLATFORM_INTERVENED_DISPUTE_REFUND(5, "平台介入纠纷退款"), + /** 6 特殊场景下平台强制退款 */ + PLATFORM_FORCED_REFUND(6, "特殊场景下平台强制退款"), + /** 7 退货退款场景,买家同意没有上传物流单号情况下,商家确认收货并退款,该场景限于订单包含运费险,并无法理赔 */ + BUYER_AGREES_NO_TRACKING_REFUND(7, "退货退款场景,买家同意没有上传物流单号情况下,商家确认收货并退款,该场景限于订单包含运费险,并无法理赔"), + /** 8 商家发货超时,平台退款 */ + LATE_SHIPMENT_PLATFORM_REFUND(8, "商家发货超时,平台退款"), + /** 9 商家处理买家售后申请超时,平台自动同意退款 */ + MERCHANT_OVERDUE_AUTO_REFUND(9, "商家处理买家售后申请超时,平台自动同意退款"), + /** 10 用户确认收货超时,平台退款 */ + BUYER_OVERDUE_AUTO_REFUND(10, "用户确认收货超时,平台退款"), + /** 11 商家确认收货超时,平台退款 */ + MERCHANT_OVERDUE_CONFIRMATION_REFUND(11, "商家确认收货超时,平台退款"), + ; + + private final int key; + private final String value; + + RefundReason(int key, String value) { + this.key = key; + this.value = value; + } + + public int getKey() { + return key; + } + + public String getValue() { + return value; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/SaleProfileUserType.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/SaleProfileUserType.java new file mode 100644 index 0000000000..988f903810 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/SaleProfileUserType.java @@ -0,0 +1,56 @@ +package com.binarywang.wxjava.store.enums; + +import com.fasterxml.jackson.annotation.JsonFormat; + +/** + * 带货人群用户类型 + * + * @author Winnie + */ +@JsonFormat(shape = JsonFormat.Shape.OBJECT) +public enum SaleProfileUserType { + + /** + * 商品曝光用户 + */ + PRODUCT_IMPRESSION_USER(1, "商品曝光用户"), + /** + * 商品点击用户 + */ + PRODUCT_CLICK_USER(2, "商品点击用户"), + /** + * 购买用户 + */ + PURCHASING_USER(3, "购买用户"), + /** + * 首购用户 + */ + FIRST_PURCHASE_USER(4, "首购用户"), + /** + * 复购用户 + */ + REPURCHASE_USER(5, "复购用户"), + /** + * 直播观看用户 + */ + LIVE_WATCHER_USER(6, "直播观看用户"), + + ; + + private final Integer key; + private final String value; + + SaleProfileUserType(Integer key, String value) { + this.key = key; + this.value = value; + } + + public Integer getKey() { + return key; + } + + public String getValue() { + return value; + } + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/SendTime.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/SendTime.java new file mode 100644 index 0000000000..266026aee8 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/SendTime.java @@ -0,0 +1,71 @@ +package com.binarywang.wxjava.store.enums; + +import com.fasterxml.jackson.annotation.JsonFormat; + +/** + * 微信小店 发货时间 + * + * @author Zeyes + */ +@JsonFormat(shape = JsonFormat.Shape.OBJECT) +public enum SendTime { +// /** 4小时内发货 */ +// FOUR_HOUR("SendTime_FOUR_HOUR", "4小时内发货"), +// /** 8小时内发货 */ +// EIGHT_HOUR("SendTime_EIGHT_HOUR", "8小时内发货"), +// /** 12小时内发货 */ +// TWELVE_HOUR("SendTime_TWELVE_HOUR", "12小时内发货"), +// /** 16小时内发货 */ +// SIXTEEN_HOUR("SendTime_SIXTEEN_HOUR", "16小时内发货"), +// /** 20小时内发货 */ +// TWENTY_HOUR("SendTime_TWENTY_HOUR", "20小时内发货"), + /** 24小时内发货 */ + TWENTYFOUR_HOUR("SendTime_TWENTYFOUR_HOUR", "24小时内发货"), + /** 48小时内发货 */ + FOUTYEIGHT_HOUR("SendTime_FOUTYEIGHT_HOUR", "48小时内发货"), + /** + * 3天内发货 + * @deprecated 已不支持,微信小店发货管理规则调整 + */ + @Deprecated + THREE_DAY("SendTime_THREE_DAY", "3天内发货"), +// /** 5天内发货 */ +// FIVE_DAY("SendTime_FIVE_DAY", "5天内发货"), +// /** 7天内发货 */ +// SEVEN_DAY("SendTime_SEVEN_DAY", "7天内发货"), +// /** 10天内发货 */ +// TEN_DAY("SendTime_TEN_DAY", "10天内发货"), +// /** 12天内发货 */ +// TWELVE_DAY("SendTime_TWELVE_DAY", "12天内发货"), +// /** 14天内发货 */ +// FOUTEEN_DAY("SendTime_FOUTEEN_DAY", "14天内发货"), +// /** 16天内发货 */ +// SIXTEEN_DAY("SendTime_SIXTEEN_DAY", "16天内发货"), +// /** 20天内发货 */ +// TWENTY_DAY("SendTime_TWENTY_DAY", "20天内发货"), +// /** 25天内发货 */ +// TWENTYFIVE_DAY("SendTime_TWENTYFIVE_DAY", "25天内发货"), +// /** 30天内发货 */ +// THIRY_DAY("SendTime_THIRY_DAY", "30天内发货"), +// /** 35天内发货 */ +// THIRYFIVE_DAY("SendTime_THIRYFIVE_DAY", "35天内发货"), +// /** 45天内发货 */ +// FOURTYFIVE_DAY("SendTime_FOURTYFIVE_DAY", "45天内发货"), + ; + + private final String key; + private final String value; + + SendTime(String key, String value) { + this.key = key; + this.value = value; + } + + public String getKey() { + return key; + } + + public String getValue() { + return value; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/ShareScene.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/ShareScene.java new file mode 100644 index 0000000000..dbeffa68ac --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/ShareScene.java @@ -0,0 +1,52 @@ +package com.binarywang.wxjava.store.enums; + +import com.fasterxml.jackson.annotation.JsonFormat; + +/** + * 分享场景 + * + * @author Zeyes + */ +@JsonFormat(shape = JsonFormat.Shape.OBJECT) +public enum ShareScene { + /** 1 直播间 */ + LIVE_ROOM(1, "直播间"), + /** 2 橱窗 */ + WINDOW(2, "橱窗"), + /** 3 短视频 */ + SHORT_VIDEO(3, "短视频"), + /** 4 视频号主页 */ + CHANNEL_HOME(4, "视频号主页"), + /** 5 商品详情页 */ + PRODUCT_DETAIL(5, "商品详情页"), + /** 6 带商品的公众号文章 */ + MP_ARTICLE(6, "带商品的公众号文章"), + /** 7 商品链接 */ + PRODUCT_LINK(7, "商品链接"), + /** 8 商品二维码 */ + PRODUCT_QR_CODE(8, "商品二维码"), + /** 9 商品口令 */ + PRODUCT_TAG_LINK(9, "商品口令"), + /** 12 视频号橱窗链接 */ + WINDOW_LINK(12, "视频号橱窗链接"), + /** 13 视频号橱窗二维码 */ + WINDOW_QR_CODE(13, "视频号橱窗二维码"), + ; + + + private final Integer key; + private final String value; + + ShareScene(Integer key, String value) { + this.key = key; + this.value = value; + } + + public Integer getKey() { + return key; + } + + public String getValue() { + return value; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/SharerType.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/SharerType.java new file mode 100644 index 0000000000..4d29d1c44f --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/SharerType.java @@ -0,0 +1,35 @@ +package com.binarywang.wxjava.store.enums; + +import com.fasterxml.jackson.annotation.JsonFormat; + +/** + * 分享员类型 + * + * @author Zeyes + */ +@JsonFormat(shape = JsonFormat.Shape.OBJECT) +public enum SharerType { + /** 0 普通分享员 */ + NORMAL(0, "普通分享员"), + /** 1 企业分享员 */ + ENTERPRISE(1, "企业分享员"), + + ; + + + private final Integer key; + private final String value; + + SharerType(Integer key, String value) { + this.key = key; + this.value = value; + } + + public Integer getKey() { + return key; + } + + public String getValue() { + return value; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/SpuEditStatus.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/SpuEditStatus.java new file mode 100644 index 0000000000..a1fc5c1ff7 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/SpuEditStatus.java @@ -0,0 +1,46 @@ +package com.binarywang.wxjava.store.enums; + +import com.fasterxml.jackson.annotation.JsonFormat; + +/** + * 商品编辑状态 + * + * @author Zeyes + */ +@JsonFormat(shape = JsonFormat.Shape.OBJECT) +public enum SpuEditStatus { + /** 0 初始值 */ + INIT(0, "初始值"), + /** 1 编辑中 */ + SUBMIT(1, "编辑中"), + /** 2 审核中 */ + ING(2, "审核中"), + /** 3 审核失败 */ + FAIL(3, "审核失败"), + /** 4 审核成功 */ + SUCCESS(4, "审核成功"), + /** 5 商品信息写入中 */ + WRITING(5, "商品信息写入中"), + /** 7 商品异步提交,上传中(处于该状态的商品调用上架商品接口会返回10020067) */ + ASYNC_WRITING(7, "商品异步提交,上传中"), + /** 8 商品异步提交,上传失败(请重新提交) */ + ASYNC_FAIL(8, "商品异步提交,上传失败"), + + ; + + private final int status; + private final String desc; + + SpuEditStatus(int status, String desc) { + this.status = status; + this.desc = desc; + } + + public int getStatus() { + return status; + } + + public String getDesc() { + return desc; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/SpuStatus.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/SpuStatus.java new file mode 100644 index 0000000000..ee2f85efe1 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/SpuStatus.java @@ -0,0 +1,49 @@ +package com.binarywang.wxjava.store.enums; + +import com.fasterxml.jackson.annotation.JsonFormat; + +/** + * 微信小店 商品上下架状态 + * + * @author Zeyes + */ +@JsonFormat(shape = JsonFormat.Shape.OBJECT) +public enum SpuStatus { + + /** 0 初始值 */ + INIT(0, "未上架"), + /** 5 上架 */ + UP(5, "上架"), + /** 6 回收站 */ + TRASH(6, "回收站"), + /** 9 彻底删除,商品无法再进行任何操作 */ + DELETE(9, "彻底删除"), + /** 11 自主下架 */ + DOWN(11, "自主下架"), + /** 13 违规下架/风控系统下架 */ + SYSTEM_DOWN(13, "违规下架/风控系统下架"), + /** 14 保证金不足下架 */ + DEPOSIT_INSUFFICIENT(14, "保证金不足下架"), + /** 15 品牌过期下架 */ + BRAND_EXPIRED(15, "品牌过期下架"), + /** 20 商品被封禁 */ + BAN(20, "商品被封禁"), + +; + + private final int status; + private final String desc; + + SpuStatus(int status, String desc) { + this.status = status; + this.desc = desc; + } + + public int getStatus() { + return status; + } + + public String getDesc() { + return desc; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/UserCouponStatus.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/UserCouponStatus.java new file mode 100644 index 0000000000..d0add5fd7b --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/UserCouponStatus.java @@ -0,0 +1,33 @@ +package com.binarywang.wxjava.store.enums; + +/** + * 微信小店 用户优惠券状态 + * + * @author Zeyes + */ +public enum UserCouponStatus { + /** 100 生效中 */ + VALID(100, "生效中"), + /** 101 已过期 */ + EXPIRED(101, "已过期"), + /** 102 已使用 */ + USED(102, "已使用"), + + ; + + private final int key; + private final String val; + + UserCouponStatus(int key, String val) { + this.key = key; + this.val = val; + } + + public int getKey() { + return key; + } + + public String getVal() { + return val; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/WithdrawStatus.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/WithdrawStatus.java new file mode 100644 index 0000000000..959e34e28b --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/WithdrawStatus.java @@ -0,0 +1,51 @@ +package com.binarywang.wxjava.store.enums; + +import com.fasterxml.jackson.annotation.JsonFormat; + +/** + * 微信小店 提现状态 + * + * @author Zeyes + */ +@JsonFormat(shape = JsonFormat.Shape.OBJECT) +public enum WithdrawStatus { + /** 受理成功 */ + CREATE_SUCCESS("CREATE_SUCCESS", "受理成功"), + /** 提现成功 */ + SUCCESS("SUCCESS", "提现成功"), + /** 提现失败 */ + FAIL("FAIL", "提现失败"), + /** 提现退票 */ + REFUND("REFUND", "提现退票"), + /** 关单 */ + CLOSE("CLOSE", "关单"), + /** 业务单已创建 */ + INIT("INIT", "业务单已创建"), + ; + + private final String key; + private final String value; + + WithdrawStatus(String key, String value) { + this.key = key; + this.value = value; + } + + public static WithdrawStatus getByKey(String key) { + for (WithdrawStatus reason : WithdrawStatus.values()) { + if (reason.getKey().equals(key)) { + return reason; + } + } + // 找不到就返回其他了 + return FAIL; + } + + public String getKey() { + return key; + } + + public String getValue() { + return value; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/WxCouponStatus.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/WxCouponStatus.java new file mode 100644 index 0000000000..87a1a84ce2 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/WxCouponStatus.java @@ -0,0 +1,35 @@ +package com.binarywang.wxjava.store.enums; + +/** + * 微信小店 优惠券状态 + * + * @author Zeyes + */ +public enum WxCouponStatus { + /** 1 初始 */ + INIT(1, "初始"), + /** 2 生效 */ + VALID(2, "生效"), + /** 4 已作废 */ + INVALID(4, "已作废"), + /** 5 删除 */ + DELETE(5, "删除"), + + ; + + private final int key; + private final String val; + + WxCouponStatus(int key, String val) { + this.key = key; + this.val = val; + } + + public int getKey() { + return key; + } + + public String getVal() { + return val; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/WxOrderStatus.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/WxOrderStatus.java new file mode 100644 index 0000000000..a3d28c5452 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/WxOrderStatus.java @@ -0,0 +1,73 @@ +package com.binarywang.wxjava.store.enums; + +/** + * 微信小店 订单状态 + * + * @author Zeyes + */ +public enum WxOrderStatus { + /** 10 待付款 */ + UNPAID(10, "待付款"), + /** 20 待发货(已付款/用户已付尾款) */ + PAID(20, "待发货"), + /** 21 部分发货 */ + PART_DELIVERY(21, "部分发货"), + /** 30 待收货 */ + DELIVERY(30, "待收货"), + /** 100 完成 */ + COMPLETED(100, "已完成"), + /** 190 商品超卖商家取消订单 */ + UNPAID_CANCEL(190, "已取消"), + /** 200 全部商品售后之后,订单取消 */ + ALL_AFTER_SALE(200, "已取消"), + /** 250 用户主动取消/待付款超时取消/商家取消 */ + CANCEL(250, "已取消"); + + private final int key; + + private final String val; + + WxOrderStatus(int key, String val) { + this.key = key; + this.val = val; + } + + public int getKey() { + return key; + } + + public String getVal() { + return val; + } + + /** + * 获取状态中文 + * + * @param key 状态码 + * @return 状态 + */ + public static String getStatusStr(Integer key) { + if (key == null) { + return "未知"; + } + for (WxOrderStatus status : WxOrderStatus.values()) { + if (key.equals(status.getKey())) { + return status.getVal(); + } + } + return String.valueOf(key); + } + + /** + * 判断是否在取消状态 + * + * @param key key + * @return boolean + */ + public static boolean isCancel(Integer key) { + if (key == null) { + return false; + } + return key.equals(UNPAID_CANCEL.key) || key.equals(ALL_AFTER_SALE.key) || key.equals(CANCEL.key); + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/WxStoreErrorMsgEnum.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/WxStoreErrorMsgEnum.java new file mode 100644 index 0000000000..f416e418ec --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/enums/WxStoreErrorMsgEnum.java @@ -0,0 +1,65 @@ +package com.binarywang.wxjava.store.enums; + +import com.google.common.collect.Maps; +import java.util.Map; +import lombok.Getter; + +/** + * 微信小店全局返回码 + * + * @author Zeyes + * @deprecated 请使用 {@link me.chanjar.weixin.common.error.WxStoreErrorMsgEnum} 替代 + */ +@Deprecated +@Getter +public enum WxStoreErrorMsgEnum { + /** + * 系统繁忙,此时请开发者稍候再试 system error + */ + CODE_1(-1, "系统繁忙,此时请开发者稍候再试"), + + /** + * 请求成功 ok + */ + CODE_0(0, "请求成功"), + + /** + * AppSecret 错误或者 AppSecret 不属于这个小店,请开发者确认 AppSecret 的正确性 + */ + CODE_40001(40001, "AppSecret 错误或者 AppSecret 不属于这个小店,请开发者确认 AppSecret 的正确性"), + + /** + * 请确保 grant_type 字段值为 client_credential + */ + CODE_40002(40002, "请确保 grant_type 字段值为 client_credential"), + + /** + * 不合法的 AppID,请开发者检查 AppID 的正确性,避免异常字符,注意大小写 + */ + CODE_40013(40013, "不合法的 AppID,请开发者检查 AppID 的正确性,避免异常字符,注意大小写"), + + ; + + private final int code; + private final String msg; + + WxStoreErrorMsgEnum(int code, String msg) { + this.code = code; + this.msg = msg; + } + + static final Map valueMap = Maps.newHashMap(); + + static { + for (WxStoreErrorMsgEnum value : WxStoreErrorMsgEnum.values()) { + valueMap.put(value.code, value.msg); + } + } + + /** + * 通过错误代码查找其中文含义. + */ + public static String findMsgByCode(int code) { + return valueMap.getOrDefault(code, null); + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/executor/ApacheHttpStoreFileUploadRequestExecutor.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/executor/ApacheHttpStoreFileUploadRequestExecutor.java new file mode 100644 index 0000000000..6f9853a83b --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/executor/ApacheHttpStoreFileUploadRequestExecutor.java @@ -0,0 +1,47 @@ +package com.binarywang.wxjava.store.executor; + +import me.chanjar.weixin.common.enums.WxType; +import me.chanjar.weixin.common.error.WxErrorException; +import me.chanjar.weixin.common.util.http.RequestHttp; +import me.chanjar.weixin.common.util.http.ResponseHandler; +import me.chanjar.weixin.common.util.http.apache.Utf8ResponseHandler; +import org.apache.http.HttpEntity; +import org.apache.http.HttpHost; +import org.apache.http.client.config.RequestConfig; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.entity.mime.HttpMultipartMode; +import org.apache.http.entity.mime.MultipartEntityBuilder; +import org.apache.http.impl.client.CloseableHttpClient; + +import java.io.File; +import java.io.IOException; + +public class ApacheHttpStoreFileUploadRequestExecutor extends StoreFileUploadRequestExecutor { + public ApacheHttpStoreFileUploadRequestExecutor(RequestHttp requestHttp) { + super(requestHttp); + } + + @Override + public String execute(String uri, File file, WxType wxType) throws WxErrorException, IOException { + HttpPost httpPost = new HttpPost(uri); + if (requestHttp.getRequestHttpProxy() != null) { + RequestConfig config = RequestConfig.custom().setProxy(requestHttp.getRequestHttpProxy()).build(); + httpPost.setConfig(config); + } + if (file != null) { + HttpEntity entity = MultipartEntityBuilder + .create() + .addBinaryBody("media", file) + .setMode(HttpMultipartMode.RFC6532) + .build(); + httpPost.setEntity(entity); + } + return requestHttp.getRequestHttpClient().execute(httpPost, Utf8ResponseHandler.INSTANCE); + } + + @Override + public void execute(String uri, File data, ResponseHandler handler, WxType wxType) + throws WxErrorException, IOException { + handler.handle(this.execute(uri, data, wxType)); + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/executor/ApacheHttpStoreMediaDownloadRequestExecutor.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/executor/ApacheHttpStoreMediaDownloadRequestExecutor.java new file mode 100644 index 0000000000..bb8a2a99ca --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/executor/ApacheHttpStoreMediaDownloadRequestExecutor.java @@ -0,0 +1,91 @@ +package com.binarywang.wxjava.store.executor; + +import com.binarywang.wxjava.store.bean.image.StoreImageResponse; +import com.binarywang.wxjava.store.util.JsonUtils; +import me.chanjar.weixin.common.enums.WxType; +import me.chanjar.weixin.common.error.WxErrorException; +import me.chanjar.weixin.common.util.http.RequestHttp; +import me.chanjar.weixin.common.util.http.ResponseHandler; +import me.chanjar.weixin.common.util.http.apache.InputStreamResponseHandler; +import me.chanjar.weixin.common.util.http.apache.Utf8ResponseHandler; +import org.apache.commons.io.FilenameUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.http.Header; +import org.apache.http.HttpHost; +import org.apache.http.client.config.RequestConfig; +import org.apache.http.client.methods.CloseableHttpResponse; +import org.apache.http.client.methods.HttpGet; +import org.apache.http.entity.ContentType; +import org.apache.http.impl.client.CloseableHttpClient; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; + +public class ApacheHttpStoreMediaDownloadRequestExecutor extends StoreMediaDownloadRequestExecutor { + + public ApacheHttpStoreMediaDownloadRequestExecutor(RequestHttp requestHttp, File tmpDirFile) { + super(requestHttp, tmpDirFile); + } + + @Override + public StoreImageResponse execute(String uri, String data, WxType wxType) throws WxErrorException, IOException { + if (data != null) { + if (uri.indexOf('?') == -1) { + uri += '?'; + } + uri += uri.endsWith("?") ? data : '&' + data; + } + + HttpGet httpGet = new HttpGet(uri); + if (requestHttp.getRequestHttpProxy() != null) { + RequestConfig config = RequestConfig.custom().setProxy(requestHttp.getRequestHttpProxy()).build(); + httpGet.setConfig(config); + } + + try (CloseableHttpResponse response = requestHttp.getRequestHttpClient().execute(httpGet)) { + Header[] contentTypeHeader = response.getHeaders("Content-Type"); + String contentType = null; + if (contentTypeHeader != null && contentTypeHeader.length > 0) { + contentType = contentTypeHeader[0].getValue(); + if (contentType.startsWith(ContentType.APPLICATION_JSON.getMimeType())) { + // application/json; encoding=utf-8 下载媒体文件出错 + String responseContent = Utf8ResponseHandler.INSTANCE.handleResponse(response); + return JsonUtils.decode(responseContent, StoreImageResponse.class); + } + } + + try (InputStream inputStream = InputStreamResponseHandler.INSTANCE.handleResponse(response)) { + String fileName = this.getFileName(response); + if (StringUtils.isBlank(fileName)) { + fileName = String.valueOf(System.currentTimeMillis()); + } + + String baseName = FilenameUtils.getBaseName(fileName); + if (StringUtils.isBlank(fileName) || baseName.length() < 3) { + baseName = String.valueOf(System.currentTimeMillis()); + } + String extension = FilenameUtils.getExtension(fileName); + if (StringUtils.isBlank(extension)) { + extension = "unknown"; + } + File file = createTmpFile(inputStream, baseName, extension, tmpDirFile); + return new StoreImageResponse(file, contentType); + } + } + } + + private String getFileName(CloseableHttpResponse response) throws WxErrorException { + Header[] contentDispositionHeader = response.getHeaders("Content-disposition"); + if (contentDispositionHeader == null || contentDispositionHeader.length == 0) { + return createDefaultFileName(); + } + return this.extractFileNameFromContentString(contentDispositionHeader[0].getValue()); + } + + @Override + public void execute(String uri, String data, ResponseHandler handler, WxType wxType) + throws WxErrorException, IOException { + handler.handle(this.execute(uri, data, wxType)); + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/executor/HttpComponentsStoreFileUploadRequestExecutor.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/executor/HttpComponentsStoreFileUploadRequestExecutor.java new file mode 100644 index 0000000000..19d849c326 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/executor/HttpComponentsStoreFileUploadRequestExecutor.java @@ -0,0 +1,47 @@ +package com.binarywang.wxjava.store.executor; + +import me.chanjar.weixin.common.enums.WxType; +import me.chanjar.weixin.common.error.WxErrorException; +import me.chanjar.weixin.common.util.http.RequestHttp; +import me.chanjar.weixin.common.util.http.ResponseHandler; +import me.chanjar.weixin.common.util.http.hc.Utf8ResponseHandler; +import org.apache.hc.client5.http.classic.methods.HttpPost; +import org.apache.hc.client5.http.config.RequestConfig; +import org.apache.hc.client5.http.entity.mime.HttpMultipartMode; +import org.apache.hc.client5.http.entity.mime.MultipartEntityBuilder; +import org.apache.hc.client5.http.impl.classic.CloseableHttpClient; +import org.apache.hc.core5.http.HttpEntity; +import org.apache.hc.core5.http.HttpHost; + +import java.io.File; +import java.io.IOException; + +public class HttpComponentsStoreFileUploadRequestExecutor extends StoreFileUploadRequestExecutor { + public HttpComponentsStoreFileUploadRequestExecutor(RequestHttp requestHttp) { + super(requestHttp); + } + + @Override + public String execute(String uri, File file, WxType wxType) throws WxErrorException, IOException { + HttpPost httpPost = new HttpPost(uri); + if (requestHttp.getRequestHttpProxy() != null) { + RequestConfig config = RequestConfig.custom().setProxy(requestHttp.getRequestHttpProxy()).build(); + httpPost.setConfig(config); + } + if (file != null) { + HttpEntity entity = MultipartEntityBuilder + .create() + .addBinaryBody("media", file) + .setMode(HttpMultipartMode.EXTENDED) + .build(); + httpPost.setEntity(entity); + } + return requestHttp.getRequestHttpClient().execute(httpPost, Utf8ResponseHandler.INSTANCE); + } + + @Override + public void execute(String uri, File data, ResponseHandler handler, WxType wxType) + throws WxErrorException, IOException { + handler.handle(this.execute(uri, data, wxType)); + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/executor/HttpComponentsStoreMediaDownloadRequestExecutor.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/executor/HttpComponentsStoreMediaDownloadRequestExecutor.java new file mode 100644 index 0000000000..2f464147a8 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/executor/HttpComponentsStoreMediaDownloadRequestExecutor.java @@ -0,0 +1,95 @@ +package com.binarywang.wxjava.store.executor; + +import com.binarywang.wxjava.store.bean.image.StoreImageResponse; +import com.binarywang.wxjava.store.util.JsonUtils; +import me.chanjar.weixin.common.enums.WxType; +import me.chanjar.weixin.common.error.WxErrorException; +import me.chanjar.weixin.common.util.http.RequestHttp; +import me.chanjar.weixin.common.util.http.ResponseHandler; +import me.chanjar.weixin.common.util.http.hc.InputStreamResponseHandler; +import me.chanjar.weixin.common.util.http.hc.Utf8ResponseHandler; +import org.apache.commons.io.FilenameUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.hc.client5.http.ClientProtocolException; +import org.apache.hc.client5.http.classic.methods.HttpGet; +import org.apache.hc.client5.http.config.RequestConfig; +import org.apache.hc.client5.http.impl.classic.CloseableHttpClient; +import org.apache.hc.client5.http.impl.classic.CloseableHttpResponse; +import org.apache.hc.core5.http.ContentType; +import org.apache.hc.core5.http.Header; +import org.apache.hc.core5.http.HttpException; +import org.apache.hc.core5.http.HttpHost; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; + +public class HttpComponentsStoreMediaDownloadRequestExecutor extends StoreMediaDownloadRequestExecutor { + + public HttpComponentsStoreMediaDownloadRequestExecutor(RequestHttp requestHttp, File tmpDirFile) { + super(requestHttp, tmpDirFile); + } + + @Override + public StoreImageResponse execute(String uri, String data, WxType wxType) throws WxErrorException, IOException { + if (data != null) { + if (uri.indexOf('?') == -1) { + uri += '?'; + } + uri += uri.endsWith("?") ? data : '&' + data; + } + + HttpGet httpGet = new HttpGet(uri); + if (requestHttp.getRequestHttpProxy() != null) { + RequestConfig config = RequestConfig.custom().setProxy(requestHttp.getRequestHttpProxy()).build(); + httpGet.setConfig(config); + } + + try (CloseableHttpResponse response = requestHttp.getRequestHttpClient().execute(httpGet)) { + Header[] contentTypeHeader = response.getHeaders("Content-Type"); + String contentType = null; + if (contentTypeHeader != null && contentTypeHeader.length > 0) { + contentType = contentTypeHeader[0].getValue(); + if (contentType.startsWith(ContentType.APPLICATION_JSON.getMimeType())) { + // application/json; encoding=utf-8 下载媒体文件出错 + String responseContent = Utf8ResponseHandler.INSTANCE.handleResponse(response); + return JsonUtils.decode(responseContent, StoreImageResponse.class); + } + } + + try (InputStream inputStream = InputStreamResponseHandler.INSTANCE.handleResponse(response)) { + String fileName = this.getFileName(response); + if (StringUtils.isBlank(fileName)) { + fileName = String.valueOf(System.currentTimeMillis()); + } + + String baseName = FilenameUtils.getBaseName(fileName); + if (StringUtils.isBlank(fileName) || baseName.length() < 3) { + baseName = String.valueOf(System.currentTimeMillis()); + } + String extension = FilenameUtils.getExtension(fileName); + if (StringUtils.isBlank(extension)) { + extension = "unknown"; + } + File file = createTmpFile(inputStream, baseName, extension, tmpDirFile); + return new StoreImageResponse(file, contentType); + } + } catch (HttpException httpException) { + throw new ClientProtocolException(httpException.getMessage(), httpException); + } + } + + private String getFileName(CloseableHttpResponse response) throws WxErrorException { + Header[] contentDispositionHeader = response.getHeaders("Content-disposition"); + if (contentDispositionHeader == null || contentDispositionHeader.length == 0) { + return createDefaultFileName(); + } + return this.extractFileNameFromContentString(contentDispositionHeader[0].getValue()); + } + + @Override + public void execute(String uri, String data, ResponseHandler handler, WxType wxType) + throws WxErrorException, IOException { + handler.handle(this.execute(uri, data, wxType)); + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/executor/OkHttpStoreFileUploadRequestExecutor.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/executor/OkHttpStoreFileUploadRequestExecutor.java new file mode 100644 index 0000000000..774327e219 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/executor/OkHttpStoreFileUploadRequestExecutor.java @@ -0,0 +1,38 @@ +package com.binarywang.wxjava.store.executor; + +import java.io.File; +import java.io.IOException; +import me.chanjar.weixin.common.enums.WxType; +import me.chanjar.weixin.common.error.WxErrorException; +import me.chanjar.weixin.common.util.http.RequestHttp; +import me.chanjar.weixin.common.util.http.ResponseHandler; +import me.chanjar.weixin.common.util.http.okhttp.OkHttpProxyInfo; +import okhttp3.MediaType; +import okhttp3.MultipartBody; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.RequestBody; +import okhttp3.Response; + +/** OkHttp implementation for 微信小店 file uploads. */ +public class OkHttpStoreFileUploadRequestExecutor extends StoreFileUploadRequestExecutor { + public OkHttpStoreFileUploadRequestExecutor(RequestHttp requestHttp) { + super(requestHttp); + } + + @Override + public String execute(String uri, File file, WxType wxType) throws WxErrorException, IOException { + RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM) + .addFormDataPart("media", file.getName(), RequestBody.create(MediaType.parse("application/octet-stream"), file)) + .build(); + try (Response response = requestHttp.getRequestHttpClient().newCall(new Request.Builder().url(uri).post(body).build()).execute()) { + return response.body().string(); + } + } + + @Override + public void execute(String uri, File data, ResponseHandler handler, WxType wxType) + throws WxErrorException, IOException { + handler.handle(execute(uri, data, wxType)); + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/executor/OkHttpStoreMediaDownloadRequestExecutor.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/executor/OkHttpStoreMediaDownloadRequestExecutor.java new file mode 100644 index 0000000000..f5f2dc78f0 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/executor/OkHttpStoreMediaDownloadRequestExecutor.java @@ -0,0 +1,60 @@ +package com.binarywang.wxjava.store.executor; + +import com.binarywang.wxjava.store.bean.image.StoreImageResponse; +import com.binarywang.wxjava.store.util.JsonUtils; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import me.chanjar.weixin.common.enums.WxType; +import me.chanjar.weixin.common.error.WxErrorException; +import me.chanjar.weixin.common.util.http.RequestHttp; +import me.chanjar.weixin.common.util.http.ResponseHandler; +import me.chanjar.weixin.common.util.http.okhttp.OkHttpProxyInfo; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; +import okhttp3.ResponseBody; +import org.apache.commons.io.FilenameUtils; +import org.apache.commons.lang3.StringUtils; + +/** OkHttp implementation for 微信小店 image downloads. */ +public class OkHttpStoreMediaDownloadRequestExecutor extends StoreMediaDownloadRequestExecutor { + public OkHttpStoreMediaDownloadRequestExecutor(RequestHttp requestHttp, File tmpDirFile) { + super(requestHttp, tmpDirFile); + } + + @Override + public StoreImageResponse execute(String uri, String data, WxType wxType) throws WxErrorException, IOException { + if (data != null) { + uri += (uri.contains("?") ? "&" : "?") + data; + } + try (Response response = requestHttp.getRequestHttpClient().newCall(new Request.Builder().url(uri).get().build()).execute()) { + ResponseBody responseBody = response.body(); + if (responseBody == null) { + throw new IOException("下载图片响应体为空"); + } + String contentType = response.header("Content-Type"); + if (contentType != null && contentType.startsWith("application/json")) { + return JsonUtils.decode(responseBody.string(), StoreImageResponse.class); + } + String fileName = extractFileNameFromContentString(response.header("Content-disposition")); + String baseName = FilenameUtils.getBaseName(fileName); + if (StringUtils.isBlank(baseName) || baseName.length() < 3) { + baseName = String.valueOf(System.currentTimeMillis()); + } + String extension = FilenameUtils.getExtension(fileName); + if (StringUtils.isBlank(extension)) { + extension = "unknown"; + } + try (InputStream inputStream = responseBody.byteStream()) { + return new StoreImageResponse(createTmpFile(inputStream, baseName, extension, tmpDirFile), contentType); + } + } + } + + @Override + public void execute(String uri, String data, ResponseHandler handler, WxType wxType) + throws WxErrorException, IOException { + handler.handle(execute(uri, data, wxType)); + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/executor/StoreFileUploadRequestExecutor.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/executor/StoreFileUploadRequestExecutor.java new file mode 100644 index 0000000000..c46c988154 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/executor/StoreFileUploadRequestExecutor.java @@ -0,0 +1,38 @@ +package com.binarywang.wxjava.store.executor; + +import me.chanjar.weixin.common.util.http.RequestExecutor; +import me.chanjar.weixin.common.util.http.RequestHttp; + +import java.io.File; + +/** + * 微信小店 图片上传接口 请求的参数是File, 返回的结果是String + * + * @author Zeyes + */ +public abstract class StoreFileUploadRequestExecutor implements RequestExecutor { + + protected RequestHttp requestHttp; + + public StoreFileUploadRequestExecutor(RequestHttp requestHttp) { + this.requestHttp = requestHttp; + } + + @SuppressWarnings("unchecked") + public static RequestExecutor create(RequestHttp requestHttp) { + switch (requestHttp.getRequestType()) { + case APACHE_HTTP: + return new ApacheHttpStoreFileUploadRequestExecutor( + (RequestHttp) requestHttp); + case HTTP_COMPONENTS: + return new HttpComponentsStoreFileUploadRequestExecutor( + (RequestHttp) requestHttp); + case OK_HTTP: + return new OkHttpStoreFileUploadRequestExecutor( + (RequestHttp) requestHttp); + default: + throw new IllegalArgumentException("不支持的http执行器类型:" + requestHttp.getRequestType()); + } + } + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/executor/StoreMediaDownloadRequestExecutor.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/executor/StoreMediaDownloadRequestExecutor.java new file mode 100644 index 0000000000..8be0741b91 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/executor/StoreMediaDownloadRequestExecutor.java @@ -0,0 +1,84 @@ +package com.binarywang.wxjava.store.executor; + +import com.binarywang.wxjava.store.bean.image.StoreImageResponse; +import me.chanjar.weixin.common.util.http.RequestExecutor; +import me.chanjar.weixin.common.util.http.RequestHttp; +import org.apache.commons.io.IOUtils; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.util.UUID; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import static org.apache.commons.io.FileUtils.openOutputStream; + +/** + * 下载媒体文件请求执行器 + * + * @author Zeyes + */ +public abstract class StoreMediaDownloadRequestExecutor implements RequestExecutor { + + protected RequestHttp requestHttp; + protected File tmpDirFile; + + private static final Pattern PATTERN = Pattern.compile(".*filename=\"([^\"]+)\".*"); + + public StoreMediaDownloadRequestExecutor(RequestHttp requestHttp, File tmpDirFile) { + this.requestHttp = requestHttp; + this.tmpDirFile = tmpDirFile; + } + + @SuppressWarnings("unchecked") + public static RequestExecutor create(RequestHttp requestHttp, File tmpDirFile) { + switch (requestHttp.getRequestType()) { + case APACHE_HTTP: + return new ApacheHttpStoreMediaDownloadRequestExecutor( + (RequestHttp) requestHttp, tmpDirFile); + case HTTP_COMPONENTS: + return new HttpComponentsStoreMediaDownloadRequestExecutor( + (RequestHttp) requestHttp, tmpDirFile); + case OK_HTTP: + return new OkHttpStoreMediaDownloadRequestExecutor( + (RequestHttp) requestHttp, tmpDirFile); + default: + throw new IllegalArgumentException("不支持的http执行器类型:" + requestHttp.getRequestType()); + } + } + + /** + * 创建临时文件 + * + * @param inputStream 输入文件流 + * @param name 文件名 + * @param ext 扩展名 + * @param tmpDirFile 临时文件夹目录 + */ + public static File createTmpFile(InputStream inputStream, String name, String ext, File tmpDirFile) + throws IOException { + File resultFile = File.createTempFile(name, '.' + ext, tmpDirFile); + try (InputStream in = inputStream; OutputStream out = openOutputStream(resultFile)) { + IOUtils.copy(in, out); + } + return resultFile; + } + + protected String createDefaultFileName() { + return UUID.randomUUID().toString(); + } + + protected String extractFileNameFromContentString(String content) { + if (content == null || content.isEmpty()) { + return createDefaultFileName(); + } + Matcher m = PATTERN.matcher(content); + if (m.matches()) { + return m.group(1); + } + return createDefaultFileName(); + } + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/message/WxStoreMessage.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/message/WxStoreMessage.java new file mode 100644 index 0000000000..6ca621c9c1 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/message/WxStoreMessage.java @@ -0,0 +1,125 @@ +package com.binarywang.wxjava.store.message; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlCData; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import java.io.Serializable; +import com.binarywang.wxjava.store.util.JsonUtils; + +/** + * 视频号 消息 兼容Json和xml + * + * @author Zeyes + */ +@JacksonXmlRootElement(localName = "xml") +public class WxStoreMessage implements Serializable { + + private static final long serialVersionUID = -6929595548318897649L; + + @JsonProperty("ToUserName") + @JacksonXmlProperty(localName = "ToUserName") + @JacksonXmlCData + private String toUser; + + @JsonProperty("FromUserName") + @JacksonXmlProperty(localName = "FromUserName") + @JacksonXmlCData + private String fromUser; + + @JsonProperty("CreateTime") + @JacksonXmlProperty(localName = "CreateTime") + private Long createTime; + + @JsonProperty("MsgType") + @JacksonXmlProperty(localName = "MsgType") + @JacksonXmlCData + private String msgType; + + @JsonProperty("Event") + @JacksonXmlProperty(localName = "Event") + @JacksonXmlCData + private String event; + + @JsonProperty("Encrypt") + @JacksonXmlProperty(localName = "Encrypt") + @JacksonXmlCData + private String encrypt; + + @JsonProperty("MsgId") + @JacksonXmlProperty(localName = "MsgId") + private Long msgId; + + @JsonProperty("MsgID") + @JacksonXmlProperty(localName = "MsgID") + private void msgIdFill(Long msgId) { + if (msgId != null) { + this.msgId = msgId; + } + } + + @Override + public String toString() { + return this.toJson(); + } + + public String toJson() { + return JsonUtils.encode(this); + } + + public String getToUser() { + return toUser; + } + + public String getFromUser() { + return fromUser; + } + + public Long getCreateTime() { + return createTime; + } + + public String getMsgType() { + return msgType; + } + + public String getEvent() { + return event; + } + + public String getEncrypt() { + return encrypt; + } + + public Long getMsgId() { + return msgId; + } + + public void setToUser(String toUser) { + this.toUser = toUser; + } + + public void setFromUser(String fromUser) { + this.fromUser = fromUser; + } + + public void setCreateTime(Long createTime) { + this.createTime = createTime; + } + + public void setMsgType(String msgType) { + this.msgType = msgType; + } + + public void setEvent(String event) { + this.event = event; + } + + public void setEncrypt(String encrypt) { + this.encrypt = encrypt; + } + + public void setMsgId(Long msgId) { + this.msgId = msgId; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/message/WxStoreMessageRouter.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/message/WxStoreMessageRouter.java new file mode 100644 index 0000000000..e7c39e8ad8 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/message/WxStoreMessageRouter.java @@ -0,0 +1,236 @@ +package com.binarywang.wxjava.store.message; + +import com.google.common.util.concurrent.ThreadFactoryBuilder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Future; +import java.util.concurrent.LinkedBlockingQueue; +import java.util.concurrent.ThreadFactory; +import java.util.concurrent.ThreadPoolExecutor; +import java.util.concurrent.TimeUnit; +import lombok.Data; +import lombok.extern.slf4j.Slf4j; +import com.binarywang.wxjava.store.api.WxStoreService; +import me.chanjar.weixin.common.api.WxErrorExceptionHandler; +import me.chanjar.weixin.common.api.WxMessageDuplicateChecker; +import me.chanjar.weixin.common.api.WxMessageInMemoryDuplicateCheckerSingleton; +import me.chanjar.weixin.common.session.InternalSession; +import me.chanjar.weixin.common.session.InternalSessionManager; +import me.chanjar.weixin.common.session.StandardSessionManager; +import me.chanjar.weixin.common.session.WxSessionManager; +import me.chanjar.weixin.common.util.LogExceptionHandler; +import org.apache.commons.lang3.StringUtils; + +/** + * 消息路由器 + * + * @author Zeyes + */ +@Data +@Slf4j +public class WxStoreMessageRouter { + /** 规则列表 */ + private final List> rules = new ArrayList<>(); + /** + * 线程池。默认使用容量为 1000 的有界队列;队列与最大线程数均耗尽时, + * 由提交消息的调用线程执行任务,以施加背压并避免丢弃回调消息。 + */ + private ExecutorService executorService; + /** 异常处理器 */ + private WxErrorExceptionHandler exceptionHandler; + /** 消息重复检查器 */ + private WxMessageDuplicateChecker messageDuplicateChecker; + /** 默认会话管理器 */ + private WxSessionManager sessionManager; + + public WxStoreMessageRouter() { + ThreadFactory namedThreadFactory = new ThreadFactoryBuilder().setNameFormat("WxChMsgRouter-pool-%d").build(); + this.executorService = new ThreadPoolExecutor(2, 100, + 60L, TimeUnit.SECONDS, new LinkedBlockingQueue<>(1000), namedThreadFactory, + new ThreadPoolExecutor.CallerRunsPolicy()); + this.sessionManager = new StandardSessionManager(); + this.exceptionHandler = new LogExceptionHandler(); + this.messageDuplicateChecker = WxMessageInMemoryDuplicateCheckerSingleton.getInstance(); + } + + /** + * 使用自定义的 {@link ExecutorService}. + */ + public WxStoreMessageRouter(ExecutorService executorService) { + this.executorService = executorService; + this.exceptionHandler = new LogExceptionHandler(); + this.messageDuplicateChecker = WxMessageInMemoryDuplicateCheckerSingleton.getInstance(); + } + + /** + * 系统退出前,应该调用该方法 + */ + public void shutDownExecutorService() { + this.executorService.shutdown(); + } + + /** + * 系统退出前,应该调用该方法,增加了超时时间检测 + */ + public void shutDownExecutorService(Integer second) { + this.executorService.shutdown(); + try { + if (!this.executorService.awaitTermination(second, TimeUnit.SECONDS)) { + this.executorService.shutdownNow(); + if (!this.executorService.awaitTermination(second, TimeUnit.SECONDS)) { + log.error("线程池未关闭!"); + } + } + } catch (InterruptedException ie) { + this.executorService.shutdownNow(); + Thread.currentThread().interrupt(); + } + } + + /** + *
+   * 设置自定义的 {@link ExecutorService}
+   * 如果不调用该方法,默认使用内置的
+   * 
+ */ + public void setExecutorService(ExecutorService executorService) { + this.executorService = executorService; + } + + /** + * 消息路由入口 + * + * @param message 消息 + * @param content 原始消息(解密之后的) + * @param appId appId + * @param service 服务实例 + * @return 返回值 + */ + public Object route(final WxStoreMessage message, final String content, final String appId, + final WxStoreService service) { + return this.route(message, content, appId, new HashMap<>(2), service, this.sessionManager); + } + + /** + * 路由微信消息 + * + * @param message 消息 + * @param content 消息原始内容 + * @param context 上下文 + * @return Object + */ + public Object route(final WxStoreMessage message, final String content, final String appId, + final Map context, final WxStoreService service, final WxSessionManager sessionManager) { + // 如果是重复消息,那么就不做处理 + if (isMsgDuplicated(message)) { + log.info("收到重复消息,{}", content); + return null; + } + + final List> matchRules = new ArrayList<>(); + + // 收集匹配的规则 + for (final WxStoreMessageRouterRule rule : this.rules) { + if (rule.isMatch(message)) { + matchRules.add(rule); + if (!rule.isNext()) { + break; + } + } + } + + if (matchRules.isEmpty()) { + return null; + } + final List> futures = new ArrayList<>(); + Object result = null; + for (final WxStoreMessageRouterRule rule : matchRules) { + // 返回最后一个非异步的rule的执行结果 + if (rule.isAsync()) { + futures.add( + this.executorService.submit(() -> { + rule.process(message, content, appId, context, service, sessionManager, exceptionHandler); + }) + ); + } else { + result = rule.process(message, content, appId, context, service, sessionManager, exceptionHandler); + // 在同步操作结束,session访问结束 + sessionEndAccess(sessionManager, message, false); + } + } + + if (!futures.isEmpty()) { + this.executorService.submit(() -> { + for (Future future : futures) { + try { + future.get(); + // 异步操作结束,session访问结束 + sessionEndAccess(sessionManager, message, true); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + log.error("Error happened when wait task finish", e); + break; + } catch (ExecutionException e) { + log.error("Error happened when wait task finish", e); + } + } + }); + } + return result; + } + + /** + * 判断消息是否重复 + * + * @param wxMessage 消息 + * @return 是否重复 + */ + protected boolean isMsgDuplicated(WxStoreMessage wxMessage) { + String messageId = this.generateMessageId(wxMessage); + return this.messageDuplicateChecker.isDuplicate(messageId); + } + + /** + * 生成消息id + * + * @return 消息id + */ + protected String generateMessageId(WxStoreMessage wxMessage) { + StringBuilder sb = new StringBuilder(); + if (wxMessage.getMsgId() == null) { + sb.append(wxMessage.getCreateTime()) + .append("-").append(wxMessage.getFromUser()) + .append("-").append(StringUtils.trimToEmpty(wxMessage.getEvent())); + } else { + sb.append(wxMessage.getMsgId()) + .append("-").append(wxMessage.getCreateTime()) + .append("-").append(wxMessage.getFromUser()); + } + + if (StringUtils.isNotEmpty(wxMessage.getToUser())) { + sb.append("-").append(wxMessage.getToUser()); + } + return sb.toString(); + } + + /** + * 对session的访问结束 + * + * @param sessionManager session管理器 + * @param message 消息 + * @param async 是否异步 打印log用 + */ + private void sessionEndAccess(WxSessionManager sessionManager, WxStoreMessage message, boolean async) { + log.debug("End session access: async={}, sessionId={}", async, message.getFromUser()); + InternalSession session = ((InternalSessionManager) sessionManager).findSession(message.getFromUser()); + if (session != null) { + session.endAccess(); + } + } + + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/message/WxStoreMessageRouterRule.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/message/WxStoreMessageRouterRule.java new file mode 100644 index 0000000000..64c71dad4f --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/message/WxStoreMessageRouterRule.java @@ -0,0 +1,172 @@ +package com.binarywang.wxjava.store.message; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import lombok.Data; +import lombok.Singular; +import lombok.experimental.Accessors; +import lombok.extern.slf4j.Slf4j; +import com.binarywang.wxjava.store.api.WxStoreService; +import com.binarywang.wxjava.store.enums.MessageType; +import com.binarywang.wxjava.store.message.rule.WxStoreMessageHandler; +import com.binarywang.wxjava.store.message.rule.WxStoreMessageInterceptor; +import com.binarywang.wxjava.store.message.rule.WxStoreMessageMatcher; +import com.binarywang.wxjava.store.util.JsonUtils; +import com.binarywang.wxjava.store.util.XmlUtils; +import me.chanjar.weixin.common.api.WxErrorExceptionHandler; +import me.chanjar.weixin.common.error.WxErrorException; +import me.chanjar.weixin.common.session.WxSessionManager; +import org.apache.commons.lang3.StringUtils; + +/** + * @author Zeyes + */ +@Data +@Accessors(chain = true) +@Slf4j +public class WxStoreMessageRouterRule { + /** 是否异步, 默认是true */ + private boolean async = true; + /** 消息类型 */ + private String msgType; + /** 事件类型 */ + private String event; + /** 自定义匹配器 */ + private WxStoreMessageMatcher matcher; + /** 进入下一个rule,默认是false */ + private boolean next = false; + /** 消息处理器 */ + @Singular + private List> handlers = new ArrayList<>(4); + /** 消息拦截器 */ + @Singular + private List interceptors = new ArrayList<>(4); + /** 消息类型 */ + private Class messageClass; + + public WxStoreMessageRouterRule() { + } + + /** + * 设置事件 + * + * @param event 事件 + * @return this + */ + public WxStoreMessageRouterRule setEvent(String event) { + this.msgType = MessageType.EVENT.getKey(); + this.event = event; + return this; + } + + /** + * 测试消息是否匹配规则 + * + * @param message 消息 + * @return 是否匹配 + */ + protected boolean isMatch(WxStoreMessage message) { + String msgType = message.getMsgType() == null ? null : message.getMsgType().toLowerCase(); + String event = message.getEvent() == null ? null : message.getEvent().toLowerCase(); + + boolean matchMsgType = this.msgType == null || this.msgType.toLowerCase().equals(msgType); + boolean matchEvent = this.event == null || this.event.toLowerCase().equals(event); + boolean matchMatcher = this.matcher == null || this.matcher.match(message); + + return matchMsgType && matchEvent && matchMatcher; + } + + /** + * 处理微信推送过来的消息 + * + * @param message 消息 + * @param content 消息原始内容 + * @param appId appId + * @param context 上下文,如果handler或interceptor之间有信息要传递,可以用这个 + * @param service 服务实例 + * @param sessionManager session管理器 + * @param exceptionHandler 异常处理器 + * @return 返回消息 + */ + protected Object process(WxStoreMessage message, String content, String appId, Map context, + WxStoreService service, WxSessionManager sessionManager, WxErrorExceptionHandler exceptionHandler) { + if (context == null) { + context = new HashMap<>(16); + } + // 重新反序列化消息 + T tempMessage = deserialize(content, messageClass, service); + if (tempMessage == null) { + log.error("消息重新反序列化失败,请检查消息格式是否正确或者指定正确的messageClass"); + return null; + } + + Object outMessage = null; + try { + // 如果拦截器不通过,返回null + for (WxStoreMessageInterceptor interceptor : this.interceptors) { + if (!interceptor.intercept(message, content, context, service, sessionManager)) { + return null; + } + } + + // 交给handler处理 + for (WxStoreMessageHandler handler : this.handlers) { + // 返回最后handler的结果 + if (handler == null) { + continue; + } + + outMessage = handler.handle(tempMessage, content, appId, context, sessionManager); + } + } catch (WxErrorException e) { + exceptionHandler.handle(e); + } + return outMessage; + } + + /** + * 重新反序列化消息 + * + * @param content 消息内容 + * @param clazz 消息类型 + * @param service 服务实例 + * @return T + */ + private T deserialize(String content, Class clazz, WxStoreService service) { + String msgFormat = service.getConfig().getMsgDataFormat(); + T t = deserialize(content, clazz, msgFormat); + if (t != null) { + return t; + } + // 如果指定的消息格式不正确,根据内容猜猜格式 + if (StringUtils.isNotBlank(content)) { + if (content.startsWith("")) { + t = deserialize(content, clazz, "XML"); + } else if (content.startsWith("{")){ + t = deserialize(content, clazz, "JSON"); + } + } + return t; + } + + /** + * 重新反序列化消息 + * + * @param content 消息内容 + * @param clazz 消息类型 + * @param msgFormat 消息格式 + * @return T + */ + private T deserialize(String content, Class clazz, String msgFormat) { + T message = null; + // 重新反序列化原始消息 + if (msgFormat == null || msgFormat.equalsIgnoreCase("JSON")) { + message = JsonUtils.decode(content, clazz); + } else { + message = XmlUtils.decode(content, clazz); + } + return message; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/message/rule/HandlerConsumer.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/message/rule/HandlerConsumer.java new file mode 100644 index 0000000000..fcf2c4bf0f --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/message/rule/HandlerConsumer.java @@ -0,0 +1,12 @@ +package com.binarywang.wxjava.store.message.rule; + +import com.binarywang.wxjava.store.message.WxStoreMessage; + +/** + * @author Zeyes + */ +@FunctionalInterface +public interface HandlerConsumer { + + void accept(T t, U u, V v, W w, X x); +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/message/rule/WxStoreMessageHandler.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/message/rule/WxStoreMessageHandler.java new file mode 100644 index 0000000000..e78fe74e60 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/message/rule/WxStoreMessageHandler.java @@ -0,0 +1,30 @@ +package com.binarywang.wxjava.store.message.rule; + +import java.util.Map; +import com.binarywang.wxjava.store.message.WxStoreMessage; +import me.chanjar.weixin.common.error.WxErrorException; +import me.chanjar.weixin.common.session.WxSessionManager; + +/** + * 处理视频号推送消息的处理器 + * + * @author Zeyes + */ +public interface WxStoreMessageHandler { + + /** + * 处理消息 + * + * @param message 消息 + * @param content 消息原始内容 + * @param appId appId + * @param context 上下文 + * @param sessionManager session管理器 + * @return 输出消息 格式可能是String/Xml/Json,视情况而定 + * + * @throws WxErrorException 异常 + */ + Object handle(T message, String content, String appId, Map context, WxSessionManager sessionManager) + throws WxErrorException; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/message/rule/WxStoreMessageInterceptor.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/message/rule/WxStoreMessageInterceptor.java new file mode 100644 index 0000000000..dc7403c180 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/message/rule/WxStoreMessageInterceptor.java @@ -0,0 +1,31 @@ +package com.binarywang.wxjava.store.message.rule; + +import java.util.Map; +import com.binarywang.wxjava.store.api.WxStoreService; +import com.binarywang.wxjava.store.message.WxStoreMessage; +import me.chanjar.weixin.common.error.WxErrorException; +import me.chanjar.weixin.common.session.WxSessionManager; + +/** + * 微信消息拦截器,可以用来做验证 + * + * @author Zeyes + */ +public interface WxStoreMessageInterceptor { + + /** + * 拦截微信消息 + * + * @param message 消息 + * @param content 消息原始内容 + * @param context 上下文,如果handler或interceptor之间有信息要传递,可以用这个 + * @param service 服务实例 + * @param sessionManager session管理器 + * @return true代表OK,false代表不OK + * + * @throws WxErrorException 异常 + */ + boolean intercept(WxStoreMessage message, String content, Map context, WxStoreService service, + WxSessionManager sessionManager) throws WxErrorException; + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/message/rule/WxStoreMessageMatcher.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/message/rule/WxStoreMessageMatcher.java new file mode 100644 index 0000000000..c203f9cccc --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/message/rule/WxStoreMessageMatcher.java @@ -0,0 +1,20 @@ +package com.binarywang.wxjava.store.message.rule; + +import com.binarywang.wxjava.store.message.WxStoreMessage; + +/** + * 消息匹配器,用在消息路由的时候 + * + * @author Zeyes + */ +public interface WxStoreMessageMatcher { + + /** + * 消息是否匹配某种模式 + * + * @param message 消息 + * @return 是否匹配 + */ + boolean match(WxStoreMessage message); + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/util/JsonUtils.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/util/JsonUtils.java new file mode 100644 index 0000000000..4141470a4b --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/util/JsonUtils.java @@ -0,0 +1,100 @@ +package com.binarywang.wxjava.store.util; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.core.json.JsonReadFeature; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.json.JsonMapper; +import java.io.IOException; +import lombok.extern.slf4j.Slf4j; + +/** + * Json序列化/反序列化工具类 + * + * @author Zeyes + */ +@Slf4j +public class JsonUtils { + + private static final JsonMapper JSON_MAPPER = new JsonMapper(); + + static { + JSON_MAPPER.enable(JsonReadFeature.ALLOW_JAVA_COMMENTS.mappedFeature()); + JSON_MAPPER.enable(JsonReadFeature.ALLOW_UNQUOTED_FIELD_NAMES.mappedFeature()); + JSON_MAPPER.enable(JsonReadFeature.ALLOW_SINGLE_QUOTES.mappedFeature()); + JSON_MAPPER.enable(JsonReadFeature.ALLOW_UNESCAPED_CONTROL_CHARS.mappedFeature()); + JSON_MAPPER.setSerializationInclusion(JsonInclude.Include.NON_NULL); + JSON_MAPPER.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); + JSON_MAPPER.disable(DeserializationFeature.FAIL_ON_IGNORED_PROPERTIES); + } + + private JsonUtils() { + } + + /** + * 对象序列化 + * + * @param obj 对象 + * @return json + */ + public static String encode(Object obj) { + try { + return JSON_MAPPER.writeValueAsString(obj); + } catch (IOException e) { + log.error("encode(Object)", e); + } + return null; + } + + /** + * 对象序列化 + * + * @param objectMapper ObjectMapper + * @param obj obj + * @return json + */ + public static String encode(ObjectMapper objectMapper, Object obj) { + try { + return objectMapper.writeValueAsString(obj); + } catch (IOException e) { + log.error("encode(Object)", e); + } + return null; + } + + /** + * 将json反序列化成对象 + * + * @param json json + * @param valueType Class + * @return T + */ + public static T decode(String json, Class valueType) { + if (json == null || json.length() <= 0) { + return null; + } + try { + return JSON_MAPPER.readValue(json, valueType); + } catch (IOException e) { + log.info("decode(String, Class)", e); + } + return null; + } + + /** + * 将json反序列化为对象 + * + * @param json json + * @param typeReference TypeReference + * @return T + */ + public static T decode(String json, TypeReference typeReference) { + try { + return (T) JSON_MAPPER.readValue(json, typeReference); + } catch (IOException e) { + log.info("decode(String, JsonTypeReference)", e); + } + return null; + } +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/util/ResponseUtils.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/util/ResponseUtils.java new file mode 100644 index 0000000000..ac1845a828 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/util/ResponseUtils.java @@ -0,0 +1,63 @@ +package com.binarywang.wxjava.store.util; + + +import static com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse.INTERNAL_ERROR_CODE; + +import java.lang.reflect.InvocationTargetException; +import lombok.experimental.UtilityClass; +import lombok.extern.slf4j.Slf4j; +import com.binarywang.wxjava.store.bean.base.WxStoreBaseResponse; +import org.apache.commons.lang3.StringUtils; + +/** + * 响应工具类 + * + * @author Zeyes + */ +@Slf4j +@UtilityClass +public class ResponseUtils { + + /** + * 将json反序列化成对象 + * + * @param json json + * @param valueType Class + * @return T + */ + public static T decode(String json, Class valueType) { + T t = null; + try { + if (StringUtils.isNotBlank(json)) { + t = JsonUtils.decode(json, valueType); + } + } catch (Exception e) { + log.error("decode", e); + } + if (t == null) { + t = internalError(valueType); + } + return t; + } + + /** + * 设置系统内部错误 + * + * @param clazz 类 + * @param T + * @return 错误 + */ + public static T internalError(Class clazz) { + try { + T t = clazz.getDeclaredConstructor().newInstance(); + t.setErrCode(INTERNAL_ERROR_CODE); + t.setErrMsg("内部错误"); + return t; + } catch (InstantiationException | IllegalAccessException | InvocationTargetException | NoSuchMethodException e) { + log.error("internalError", e); + } + // 正常情况下不会执行到这里 + return null; + } + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/util/WxChCryptUtils.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/util/WxChCryptUtils.java new file mode 100644 index 0000000000..f8ddafd892 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/util/WxChCryptUtils.java @@ -0,0 +1,51 @@ +package com.binarywang.wxjava.store.util; + +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.security.AlgorithmParameters; +import javax.crypto.Cipher; +import javax.crypto.spec.IvParameterSpec; +import javax.crypto.spec.SecretKeySpec; +import lombok.extern.slf4j.Slf4j; +import com.binarywang.wxjava.store.config.WxStoreConfig; +import me.chanjar.weixin.common.util.crypto.PKCS7Encoder; +import me.chanjar.weixin.common.util.crypto.WxCryptUtil; +import org.apache.commons.codec.binary.Base64; +import org.apache.commons.lang3.StringUtils; + +/** + * @author Zeyes + */ +@Slf4j +public class WxChCryptUtils extends WxCryptUtil { + + protected static final Charset UTF_8 = StandardCharsets.UTF_8; + + public WxChCryptUtils(WxStoreConfig config) { + this.appidOrCorpid = config.getAppid(); + this.token = config.getToken(); + this.aesKey = Base64.decodeBase64(StringUtils.trim(config.getAesKey()) + "="); + } + + /** + * AES解密 + * + * @param sessionKey session_key + * @param encryptedData 消息密文 + * @param ivStr iv字符串 + */ + public static String decrypt(String sessionKey, String encryptedData, String ivStr) { + try { + AlgorithmParameters params = AlgorithmParameters.getInstance("AES"); + params.init(new IvParameterSpec(Base64.decodeBase64(ivStr))); + + Cipher cipher = Cipher.getInstance("AES/CBC/NoPadding"); + cipher.init(Cipher.DECRYPT_MODE, new SecretKeySpec(Base64.decodeBase64(sessionKey), "AES"), params); + + return new String(PKCS7Encoder.decode(cipher.doFinal(Base64.decodeBase64(encryptedData))), UTF_8); + } catch (Exception e) { + throw new RuntimeException("AES解密失败!", e); + } + } + +} diff --git a/weixin-java-store/src/main/java/com/binarywang/wxjava/store/util/XmlUtils.java b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/util/XmlUtils.java new file mode 100644 index 0000000000..bf53785893 --- /dev/null +++ b/weixin-java-store/src/main/java/com/binarywang/wxjava/store/util/XmlUtils.java @@ -0,0 +1,113 @@ +package com.binarywang.wxjava.store.util; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.dataformat.xml.XmlMapper; +import com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator; +import java.io.IOException; +import java.io.InputStream; +import lombok.extern.slf4j.Slf4j; + +/** + * Xml序列化/反序列化工具类 + * + * @author Zeyes + */ +@Slf4j +public class XmlUtils { + + private static final XmlMapper XML_MAPPER = new XmlMapper(); + + static { + XML_MAPPER.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); + XML_MAPPER.disable(DeserializationFeature.FAIL_ON_IGNORED_PROPERTIES); + // 带有xml文件头, + XML_MAPPER.disable(ToXmlGenerator.Feature.WRITE_XML_DECLARATION); + } + + private XmlUtils() { + } + + /** + * 对象序列化 + * + * @param obj 对象 + * @return json + */ + public static String encode(Object obj) { + try { + return XML_MAPPER.writeValueAsString(obj); + } catch (IOException e) { + log.error("encode(Object)", e); + } + return null; + } + + /** + * 对象序列化 + * + * @param objectMapper ObjectMapper + * @param obj obj + * @return json + */ + public static String encode(ObjectMapper objectMapper, Object obj) { + try { + return objectMapper.writeValueAsString(obj); + } catch (IOException e) { + log.error("encode(Object)", e); + } + return null; + } + + /** + * 将xml反序列化成对象 + * + * @param xml xml + * @param valueType Class + * @return T + */ + public static T decode(String xml, Class valueType) { + if (xml == null || xml.length() <= 0) { + return null; + } + try { + return XML_MAPPER.readValue(xml, valueType); + } catch (IOException e) { + log.info("decode(String, Class)", e); + } + return null; + } + + /** + * 将xml反序列化为对象 + * + * @param xml xml + * @param typeReference TypeReference + * @return T + */ + public static T decode(String xml, TypeReference typeReference) { + try { + return (T) XML_MAPPER.readValue(xml, typeReference); + } catch (IOException e) { + log.info("decode(String, TypeReference)", e); + } + return null; + } + + /** + * 将xml反序列化为对象 + * + * @param is InputStream + * @param valueType Class + * @return T + */ + public static T decode(InputStream is, Class valueType) { + try { + return (T) XML_MAPPER.readValue(is, valueType); + } catch (IOException e) { + log.info("decode(InputStream, Class)", e); + } + return null; + } +} diff --git a/weixin-java-store/src/test/java/com/binarywang/wxjava/store/api/WxStoreServiceContractTest.java b/weixin-java-store/src/test/java/com/binarywang/wxjava/store/api/WxStoreServiceContractTest.java new file mode 100644 index 0000000000..c5c1e277bc --- /dev/null +++ b/weixin-java-store/src/test/java/com/binarywang/wxjava/store/api/WxStoreServiceContractTest.java @@ -0,0 +1,53 @@ +package com.binarywang.wxjava.store.api; + +import org.testng.Assert; +import org.testng.annotations.Test; +import com.binarywang.wxjava.store.bean.message.vip.UserInfoMessage; +import com.binarywang.wxjava.store.util.XmlUtils; + +import java.util.Arrays; + +/** Contract tests for the store module public entry point. */ +public class WxStoreServiceContractTest { + + @Test + public void shouldExposeIndependentStoreServiceType() throws ClassNotFoundException { + Class serviceType = Class.forName("com.binarywang.wxjava.store.api.WxStoreService"); + + Assert.assertEquals(serviceType.getName(), "com.binarywang.wxjava.store.api.WxStoreService"); + Assert.assertNull(serviceType.getSuperclass()); + } + + @Test + public void shouldNotExposeChannelOnlyServices() { + Assert.assertFalse(Arrays.stream(WxStoreService.class.getMethods()) + .anyMatch(method -> method.getName().equals("getLeagueProductService") + || method.getName().equals("getFinderLiveService") + || method.getName().equals("getLiveDashboardService") + || method.getName().equals("getLeadComponentService"))); + } + + @Test + public void shouldExposeStoreCommerceServices() { + Assert.assertTrue(Arrays.stream(WxStoreService.class.getMethods()) + .anyMatch(method -> method.getName().equals("getProductService"))); + Assert.assertTrue(Arrays.stream(WxStoreService.class.getMethods()) + .anyMatch(method -> method.getName().equals("getOrderService"))); + Assert.assertTrue(Arrays.stream(WxStoreService.class.getMethods()) + .anyMatch(method -> method.getName().equals("getAfterSaleService"))); + Assert.assertTrue(Arrays.stream(WxStoreService.class.getMethods()) + .anyMatch(method -> method.getName().equals("getFundService"))); + } + + @Test + public void shouldDeserializeVipUserInfoFromXml() { + UserInfoMessage message = XmlUtils.decode( + "138000000002", + UserInfoMessage.class); + + Assert.assertNotNull(message); + Assert.assertNotNull(message.getUserInfo()); + Assert.assertEquals(message.getUserInfo().getPhoneNumber(), "13800000000"); + Assert.assertEquals(message.getUserInfo().getGrade(), Integer.valueOf(2)); + } +} diff --git a/weixin-java-store/src/test/java/com/binarywang/wxjava/store/message/WxStoreMessageRouterTest.java b/weixin-java-store/src/test/java/com/binarywang/wxjava/store/message/WxStoreMessageRouterTest.java new file mode 100644 index 0000000000..1cf1997180 --- /dev/null +++ b/weixin-java-store/src/test/java/com/binarywang/wxjava/store/message/WxStoreMessageRouterTest.java @@ -0,0 +1,52 @@ +package com.binarywang.wxjava.store.message; + +import java.util.concurrent.ThreadPoolExecutor; +import com.binarywang.wxjava.store.executor.StoreMediaDownloadRequestExecutor; +import java.io.IOException; +import me.chanjar.weixin.common.enums.WxType; +import me.chanjar.weixin.common.error.WxErrorException; +import me.chanjar.weixin.common.util.http.ResponseHandler; +import org.testng.Assert; +import org.testng.annotations.Test; + +/** Tests the default router backpressure policy. */ +public class WxStoreMessageRouterTest { + + @Test + public void shouldUseBoundedQueueAndCallerRunsPolicy() { + WxStoreMessageRouter router = new WxStoreMessageRouter(); + ThreadPoolExecutor executor = (ThreadPoolExecutor) router.getExecutorService(); + + Assert.assertTrue(executor.getQueue().remainingCapacity() > 0); + Assert.assertTrue(executor.getRejectedExecutionHandler() instanceof ThreadPoolExecutor.CallerRunsPolicy); + router.shutDownExecutorService(); + } + + @Test + public void shouldExtractOnlyTheFilenameFromContentDisposition() { + TestStoreMediaDownloadRequestExecutor executor = new TestStoreMediaDownloadRequestExecutor(); + + Assert.assertEquals(executor.extract("attachment; filename=\"image.jpg\"; size=123"), "image.jpg"); + } + + private static class TestStoreMediaDownloadRequestExecutor extends StoreMediaDownloadRequestExecutor { + private TestStoreMediaDownloadRequestExecutor() { + super(null, null); + } + + @Override + public com.binarywang.wxjava.store.bean.image.StoreImageResponse execute(String uri, String data, WxType wxType) + throws WxErrorException, IOException { + return null; + } + + @Override + public void execute(String uri, String data, ResponseHandler handler, + WxType wxType) throws WxErrorException, IOException { + } + + private String extract(String contentDisposition) { + return extractFileNameFromContentString(contentDisposition); + } + } +} diff --git a/wx-java-bom/pom.xml b/wx-java-bom/pom.xml index a7f6703631..14104482fc 100644 --- a/wx-java-bom/pom.xml +++ b/wx-java-bom/pom.xml @@ -57,6 +57,11 @@ weixin-java-channel ${project.version} + + com.github.binarywang + weixin-java-store + ${project.version} + com.github.binarywang weixin-java-qidian @@ -134,6 +139,16 @@ wx-java-channel-multi-spring-boot-starter ${project.version} + + com.github.binarywang + wx-java-store-spring-boot-starter + ${project.version} + + + com.github.binarywang + wx-java-store-multi-spring-boot-starter + ${project.version} + com.github.binarywang wx-java-qidian-spring-boot-starter @@ -191,6 +206,16 @@ wx-java-channel-multi-solon-plugin ${project.version} + + com.github.binarywang + wx-java-store-solon-plugin + ${project.version} + + + com.github.binarywang + wx-java-store-multi-solon-plugin + ${project.version} + com.github.binarywang wx-java-qidian-solon-plugin From 474f4c7a0fc549032efad3c029fa9a981bd82f9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=BF=E9=9B=B7?= <191789784@qq.com> Date: Tue, 1 Sep 2026 10:20:18 +0800 Subject: [PATCH 29/31] =?UTF-8?q?:new:=20#4116=20=E3=80=90=E5=BE=AE?= =?UTF-8?q?=E4=BF=A1=E6=94=AF=E4=BB=98=E3=80=91=E5=A2=9E=E5=8A=A0=E5=BC=80?= =?UTF-8?q?=E5=85=B7=E6=97=85=E5=AE=A2=E8=BF=90=E8=BE=93=E8=A1=8C=E4=B8=9A?= =?UTF-8?q?=E7=94=B5=E5=AD=90=E5=8F=91=E7=A5=A8=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/ELECTRONIC_INVOICE_API_COMPARISON.md | 4 +- .../PassengerTransportInvoiceRequest.java | 285 ++++++++++++++++++ .../wxpay/service/PartnerInvoiceService.java | 16 + .../impl/PartnerInvoiceServiceImpl.java | 8 + .../PassengerTransportInvoiceRequestTest.java | 93 ++++++ .../impl/PartnerInvoiceServiceImplTest.java | 46 +++ 6 files changed, 450 insertions(+), 2 deletions(-) create mode 100644 weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/invoice/PassengerTransportInvoiceRequest.java create mode 100644 weixin-java-pay/src/test/java/com/github/binarywang/wxpay/bean/invoice/PassengerTransportInvoiceRequestTest.java diff --git a/docs/ELECTRONIC_INVOICE_API_COMPARISON.md b/docs/ELECTRONIC_INVOICE_API_COMPARISON.md index 54568878f9..aed15d321d 100644 --- a/docs/ELECTRONIC_INVOICE_API_COMPARISON.md +++ b/docs/ELECTRONIC_INVOICE_API_COMPARISON.md @@ -62,5 +62,5 @@ V3 服务商电子发票产品文档:前者是 API 列表中的具体接口, | 身份/鉴权上下文 | 公众号 access token、用户授权页/授权数据 | 微信支付服务商号、子商户号、V3 签名与敏感字段加密 | | 覆盖范围 | 授权、开票、冲红、查询及公众号商户配置 | 子商户邀约/状态、模板/开发配置、行业开票、文件和卡包、通知 | -因此,两个 Issue 都是同一个微信支付 V3 服务商电子发票接入需求,当前代码库检索未 -发现对应的 `new-tax-control-fapiao` API 实现。 +因此,两个 Issue 都是同一个微信支付 V3 服务商电子发票接入需求,当前由 +`weixin-java-pay` 的 `PartnerInvoiceService` 提供对应的 `new-tax-control-fapiao` API 实现。 diff --git a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/invoice/PassengerTransportInvoiceRequest.java b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/invoice/PassengerTransportInvoiceRequest.java new file mode 100644 index 0000000000..a1eebcffc1 --- /dev/null +++ b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/invoice/PassengerTransportInvoiceRequest.java @@ -0,0 +1,285 @@ +package com.github.binarywang.wxpay.bean.invoice; + +import com.google.gson.annotations.SerializedName; +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * 服务商开具旅客运输行业电子发票请求。 + * + *

购买方手机号、邮箱以及出行人证件号码由调用方按微信支付文档加密。

+ * + * @see 开具旅客运输行业电子发票 + */ +@Data +public class PassengerTransportInvoiceRequest implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * 子商户号。微信支付分配的子商户号,必填,最长32个字符。 + */ + @SerializedName("sub_mchid") + private String subMchid; + + /** + * 发票申请单号。唯一标识一次开票行为并关联唯一的购买方信息,必填,最长32个字符; + * 微信支付账单开票场景下填写微信支付交易单号。 + */ + @SerializedName("fapiao_apply_id") + private String fapiaoApplyId; + + /** + * 购买方信息,即发票抬头,必填。 + */ + @SerializedName("buyer_information") + private BuyerInformation buyerInformation; + + /** + * 需要开具的旅客运输行业数电发票信息,必填。 + */ + @SerializedName("fapiao_information") + private FapiaoInformation fapiaoInformation; + + /** + * 需要开具的旅客运输行业数电发票信息。 + */ + @Data + public static class FapiaoInformation implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * 商户发票单号,必填,最长32个字符,在每个商户下必须唯一。 + * 仅支持字母、数字、中划线、下划线、竖线和星号;开票失败或发票已冲红时可更换后重试, + * 同一发票申请单最多支持5个商户发票单号。 + */ + @SerializedName("fapiao_id") + private String fapiaoId; + + /** + * 总价税合计,必填,单位:分。值为所有发票行单行金额合计之和,且全部发票的总价税合计 + * 不能超过交易总金额。 + */ + @SerializedName("total_amount") + private Long totalAmount; + + /** + * 发票行信息,必填;单张发票最多包含8行。 + */ + private List items; + + /** + * 出口业务适用政策代码。可选值:1(退税政策)、2(免税政策)、3(征税政策)。 + */ + @SerializedName("export_business_policy_code") + private Long exportBusinessPolicyCode; + + /** + * 增值税即征即退代码。可选值:1(软件产品)、2(资源综合利用产品)、3(管道运输服务)、 + * 4(有形动产融资租赁服务)、5(有形动产融资性售后回租服务)、6(新型墙体材料)、 + * 7(风力发电产品)、8(光伏发电产品)、9(动漫软件产品)、10(飞机维修劳务)、 + * 11(黄金)、12(铂金)。 + */ + @SerializedName("vat_refund_levy_code") + private Long vatRefundLevyCode; + + /** + * 开票人ID,必填,最长64个字符,为税局乐企系统登记的开票人ID。 + */ + @SerializedName("billing_person_id") + private String billingPersonId; + + /** + * 开票人名称,最长64个字符,为税局乐企系统登记的脱敏后名称;格式为脱敏姓名、空格和身份证后四位。 + */ + @SerializedName("billing_person") + private String billingPerson; + + /** + * 发票类型,必填。可选值:COMM_FAPIAO(增值税普通发票)、VAT_FAPIAO(增值税专用发票)。 + */ + @SerializedName("fapiao_bill_type") + private String fapiaoBillType; + + /** + * 发票对应的交易信息,必填,最多支持10条。 + */ + @SerializedName("transaction_information") + private List transactionInformation; + + /** + * 发票备注。 + */ + private String remark; + } + + /** + * 发票行信息。 + */ + @Data + public static class InvoiceItem implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * 税局侧规定的货物或应税劳务、服务税收分类编码,必填,长度为19个字符; + * 旅客运输业务仅支持以301开头的税收分类编码。 + */ + @SerializedName("tax_code") + private String taxCode; + + /** + * 货物或应税劳务、服务名称,必填,由商户自定义,最长128个字符。 + */ + @SerializedName("goods_name") + private String goodsName; + + /** + * 规格型号,展示在发票规格型号列,最长20个字符。 + */ + private String specification; + + /** + * 单位,展示在发票单位列;折扣行不填写。 + */ + private String unit; + + /** + * 数量,单位为10的负8次方,100000000表示数量1。非折扣行不填写时默认为100000000; + * 折扣行不填写。 + */ + private Long quantity; + + /** + * 单行金额合计,必填,单位:分。折扣行为负数,非折扣行为正数。 + */ + @SerializedName("total_amount") + private Long totalAmount; + + /** + * 税率,必填,单位为万分之一,例如1300表示13%。当前支持0、1%、1.5%、3%、5%、6%、 + * 9%、10%、11%、13%、16%和17%。 + */ + @SerializedName("tax_rate") + private Long taxRate; + + /** + * 是否为折扣行,必填;折扣行必须紧跟在被折扣行之后。 + */ + private Boolean discount; + + /** + * 优惠政策标识。可选值:1(简易征收)、2(稀土产品)、3(免税)、4(不征税)、 + * 5(先征后退)、6(100%先征后退)、7(50%先征后退)、8(按3%简易征收)、 + * 9(按5%简易征收)、10(按5%简易征收减按1.5%计征)、11(即征即退30%)、 + * 12(即征即退50%)、13(即征即退70%)、14(即征即退100%)、 + * 15(超税负3%即征即退)、16(超税负8%即征即退)、17(超税负12%即征即退)、 + * 18(超税负6%即征即退)。 + */ + @SerializedName("preferential_policy_code") + private Long preferentialPolicyCode; + + /** + * 出行人额外信息,可选;传入时其内部必填字段必须完整填写。 + */ + @SerializedName("passenger_information") + private PassengerInformation passengerInformation; + } + + /** + * 出行人额外信息。证件号码由调用方按微信支付文档加密。 + */ + @Data + public static class PassengerInformation implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * 出行人姓名;填写出行人额外信息时必填,最长20个字符。 + */ + private String name; + + /** + * 出行人证件类型;填写出行人额外信息时必填。可选值:IDENTITY_CARD(居民身份证)、 + * PASSPORT(护照)、HONG_KONG_PERMIT(中国香港居民来往内地通行证)、 + * MACAO_PERMIT(中国澳门居民来往内地通行证)、TAIWAN_PERMIT(中国台湾居民来往大陆通行证)、 + * FOREIGNER_RESIDENCE_PERMIT(外国人居留证)、HONG_KONG_RESIDENT_CARD(香港居民证)、 + * MACAO_RESIDENT_CARD(澳门居民证)、TAIWAN_RESIDENT_CARD(台湾居民证)、 + * MILITARY_OFFICER_CARD(军官证)、ARMED_POLICE_OFFICER_CARD(武警警官证)、 + * SOLDIER_CARD(士兵证)、HOMECOMING_CERT(港澳同胞回乡证)、 + * TAIWAN_COMPATRIOT_CERT(台胞证)。 + */ + @SerializedName("certificate_type") + private String certificateType; + + /** + * 出行人证件号码;填写出行人额外信息时必填。该字段为密文字段,调用方需使用微信支付公钥 + * 或微信支付平台证书公钥加密后传入。 + */ + @SerializedName("certificate_number") + private String certificateNumber; + + /** + * 出行日期;填写出行人额外信息时必填,使用 RFC3339 格式:yyyy-MM-DDTHH:mm:ss+TIMEZONE。 + */ + @SerializedName("departure_date") + private String departureDate; + + /** + * 出发地详细地址;填写出行人额外信息时必填,最长80个字符。 + */ + @SerializedName("departure_place") + private String departurePlace; + + /** + * 目的地详细地址;填写出行人额外信息时必填,最长80个字符。 + */ + private String destination; + + /** + * 交通工具类型;填写出行人额外信息时必填。可选值:LONG_DISTANCE_BUS(长途汽车)、 + * PUBLIC_TRANSPORTATION(公共交通)、CAR(汽车)、SHIP(船舶)、 + * OTHER_TRANSPORTATION(其他交通工具)。 + */ + @SerializedName("transportation_type") + private String transportationType; + + /** + * 交通工具等级。交通工具为 SHIP 时必填,可选值:SHIP_FIRST_CLASS_CABIN(船舶一等舱)、 + * SHIP_SECOND_CLASS_CABIN(船舶二等舱)、SHIP_THIRD_CLASS_CABIN(船舶三等舱); + * 其他交通工具不填写。 + */ + @SerializedName("transportation_classes") + private String transportationClasses; + } + + /** + * 发票对应的交易信息。 + */ + @Data + public static class TransactionInformation implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * 支付渠道,必填。当前可选值:WECHAT_PAY(微信支付)。 + */ + @SerializedName("pay_channel") + private String payChannel; + + /** + * 支付订单号,最长64个字符。支付渠道为 WECHAT_PAY 时,本字段与商户订单号至少填写一个。 + */ + @SerializedName("transaction_id") + private String transactionId; + + /** + * 支付商户订单号,最长64个字符。支付渠道为 WECHAT_PAY 时,本字段与支付订单号至少填写一个。 + */ + @SerializedName("out_trade_no") + private String outTradeNo; + + /** + * 交易金额,必填,单位:分。 + */ + private Long amount; + } +} diff --git a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/PartnerInvoiceService.java b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/PartnerInvoiceService.java index 39390ba713..a504b00005 100644 --- a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/PartnerInvoiceService.java +++ b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/PartnerInvoiceService.java @@ -3,6 +3,7 @@ import com.github.binarywang.wxpay.bean.invoice.InviteUrlResult; import com.github.binarywang.wxpay.bean.invoice.InviteUrlRequest; import com.github.binarywang.wxpay.bean.invoice.GeneralInvoiceRequest; +import com.github.binarywang.wxpay.bean.invoice.PassengerTransportInvoiceRequest; import com.github.binarywang.wxpay.bean.invoice.InvoiceResult; import com.github.binarywang.wxpay.bean.invoice.InvoiceFileResult; import com.github.binarywang.wxpay.bean.invoice.ReverseInvoiceRequest; @@ -51,6 +52,21 @@ public interface PartnerInvoiceService { */ void issueGeneralInvoice(GeneralInvoiceRequest request) throws WxPayException; + /** + * 开具旅客运输行业电子发票。 + * + *

接口受理成功时返回 HTTP 202 Accepted,无应答包体。受理成功不代表开票完成, + * 请通过开票结果回调或查询电子发票接口获取处理结果。

+ * + * @param request 开票申请 + * @throws WxPayException 微信支付异常 + * @throws UnsupportedOperationException 当前实现不支持开具旅客运输行业电子发票 + * @see 官方文档 + */ + default void issuePassengerTransportInvoice(PassengerTransportInvoiceRequest request) throws WxPayException { + throw new UnsupportedOperationException("当前实现不支持开具旅客运输行业电子发票"); + } + /** * 查询电子发票。 * diff --git a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/PartnerInvoiceServiceImpl.java b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/PartnerInvoiceServiceImpl.java index af173851f1..c51f8006e4 100644 --- a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/PartnerInvoiceServiceImpl.java +++ b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/PartnerInvoiceServiceImpl.java @@ -3,6 +3,7 @@ import com.github.binarywang.wxpay.bean.invoice.InviteUrlResult; import com.github.binarywang.wxpay.bean.invoice.InviteUrlRequest; import com.github.binarywang.wxpay.bean.invoice.GeneralInvoiceRequest; +import com.github.binarywang.wxpay.bean.invoice.PassengerTransportInvoiceRequest; import com.github.binarywang.wxpay.bean.invoice.InvoiceResult; import com.github.binarywang.wxpay.bean.invoice.InvoiceFileResult; import com.github.binarywang.wxpay.bean.invoice.ReverseInvoiceRequest; @@ -45,6 +46,7 @@ public class PartnerInvoiceServiceImpl implements PartnerInvoiceService { private static final com.google.gson.Gson GSON = WxGsonBuilder.create(); private static final String INVITE_URL_PATH = "/v3/new-tax-control-fapiao/fapiaomerchant/getspinviteurl"; private static final String ISSUE_GENERAL_PATH = "/v3/new-tax-control-fapiao/fapiao-applications/issue-general"; + private static final String ISSUE_PASSENGER_TRANSPORT_PATH = "/v3/new-tax-control-fapiao/fapiao-applications/issue-passenger-transport"; private static final String FAPIAO_APPLICATIONS_PATH = "/v3/new-tax-control-fapiao/fapiao-applications/"; private final WxPayService payService; @@ -80,6 +82,12 @@ public void issueGeneralInvoice(GeneralInvoiceRequest request) throws WxPayExcep this.payService.postV3(url, GSON.toJson(request)); } + @Override + public void issuePassengerTransportInvoice(PassengerTransportInvoiceRequest request) throws WxPayException { + String url = this.payService.getPayBaseUrl() + ISSUE_PASSENGER_TRANSPORT_PATH; + this.payService.postV3(url, GSON.toJson(request)); + } + @Override public InvoiceResult getInvoice(String fapiaoApplyId, String subMchId, String fapiaoId) throws WxPayException { String url = this.payService.getPayBaseUrl() + FAPIAO_APPLICATIONS_PATH + encode(fapiaoApplyId) + "?sub_mchid=" + encode(subMchId); diff --git a/weixin-java-pay/src/test/java/com/github/binarywang/wxpay/bean/invoice/PassengerTransportInvoiceRequestTest.java b/weixin-java-pay/src/test/java/com/github/binarywang/wxpay/bean/invoice/PassengerTransportInvoiceRequestTest.java new file mode 100644 index 0000000000..e4b8fe0783 --- /dev/null +++ b/weixin-java-pay/src/test/java/com/github/binarywang/wxpay/bean/invoice/PassengerTransportInvoiceRequestTest.java @@ -0,0 +1,93 @@ +package com.github.binarywang.wxpay.bean.invoice; + +import com.google.gson.Gson; +import com.google.gson.JsonObject; +import org.testng.annotations.Test; + +import java.util.Collections; + +import static org.assertj.core.api.Assertions.assertThat; + +/** + * {@link PassengerTransportInvoiceRequest} 单元测试。 + */ +public class PassengerTransportInvoiceRequestTest { + + @Test + public void shouldSerializePassengerTransportInvoiceRequestUsingWechatPayFieldNames() { + PassengerTransportInvoiceRequest request = new PassengerTransportInvoiceRequest(); + request.setSubMchid("1900000109"); + request.setFapiaoApplyId("apply_20260827_001"); + + BuyerInformation buyer = new BuyerInformation(); + buyer.setType("INDIVIDUAL"); + buyer.setName("示例旅客"); + buyer.setPhone("encrypted-phone"); + buyer.setEmail("encrypted-email"); + buyer.setAmount(1000); + request.setBuyerInformation(buyer); + + PassengerTransportInvoiceRequest.PassengerInformation passenger = + new PassengerTransportInvoiceRequest.PassengerInformation(); + passenger.setName("张**"); + passenger.setCertificateType("IDENTITY_CARD"); + passenger.setCertificateNumber("encrypted-certificate-number"); + passenger.setDepartureDate("2026-08-27T10:00:00+08:00"); + passenger.setDeparturePlace("重庆市渝北区示例出发地"); + passenger.setDestination("重庆市两江新区示例目的地"); + passenger.setTransportationType("SHIP"); + passenger.setTransportationClasses("SHIP_FIRST_CLASS_CABIN"); + + PassengerTransportInvoiceRequest.InvoiceItem item = new PassengerTransportInvoiceRequest.InvoiceItem(); + item.setTaxCode("3010101020100000000"); + item.setGoodsName("旅客运输服务"); + item.setQuantity(2200000000L); + item.setTotalAmount(1000L); + item.setTaxRate(300L); + item.setDiscount(false); + item.setPassengerInformation(passenger); + + PassengerTransportInvoiceRequest.TransactionInformation transaction = + new PassengerTransportInvoiceRequest.TransactionInformation(); + transaction.setPayChannel("WECHAT_PAY"); + transaction.setOutTradeNo("order_20260827_001"); + transaction.setAmount(1000L); + + PassengerTransportInvoiceRequest.FapiaoInformation fapiao = + new PassengerTransportInvoiceRequest.FapiaoInformation(); + fapiao.setFapiaoId("invoice_20260827_001"); + fapiao.setTotalAmount(1000L); + fapiao.setItems(Collections.singletonList(item)); + fapiao.setBillingPersonId("billing_person_001"); + fapiao.setFapiaoBillType("COMM_FAPIAO"); + fapiao.setTransactionInformation(Collections.singletonList(transaction)); + request.setFapiaoInformation(fapiao); + + JsonObject json = new Gson().toJsonTree(request).getAsJsonObject(); + JsonObject passengerJson = json.getAsJsonObject("fapiao_information") + .getAsJsonArray("items").get(0).getAsJsonObject() + .getAsJsonObject("passenger_information"); + + assertThat(json.get("sub_mchid").getAsString()).isEqualTo("1900000109"); + assertThat(json.get("fapiao_apply_id").getAsString()).isEqualTo("apply_20260827_001"); + assertThat(json.getAsJsonObject("buyer_information").get("phone").getAsString()) + .isEqualTo("encrypted-phone"); + assertThat(json.getAsJsonObject("fapiao_information").getAsJsonArray("items").get(0) + .getAsJsonObject().get("quantity").getAsLong()).isEqualTo(2200000000L); + assertThat(passengerJson.get("name").getAsString()).isEqualTo("张**"); + assertThat(passengerJson.get("certificate_type").getAsString()).isEqualTo("IDENTITY_CARD"); + assertThat(passengerJson.get("certificate_number").getAsString()) + .isEqualTo("encrypted-certificate-number"); + assertThat(passengerJson.get("departure_date").getAsString()) + .isEqualTo("2026-08-27T10:00:00+08:00"); + assertThat(passengerJson.get("departure_place").getAsString()) + .isEqualTo("重庆市渝北区示例出发地"); + assertThat(passengerJson.get("destination").getAsString()) + .isEqualTo("重庆市两江新区示例目的地"); + assertThat(passengerJson.get("transportation_type").getAsString()).isEqualTo("SHIP"); + assertThat(passengerJson.get("transportation_classes").getAsString()) + .isEqualTo("SHIP_FIRST_CLASS_CABIN"); + assertThat(json.getAsJsonObject("fapiao_information").getAsJsonArray("transaction_information").get(0) + .getAsJsonObject().get("out_trade_no").getAsString()).isEqualTo("order_20260827_001"); + } +} diff --git a/weixin-java-pay/src/test/java/com/github/binarywang/wxpay/service/impl/PartnerInvoiceServiceImplTest.java b/weixin-java-pay/src/test/java/com/github/binarywang/wxpay/service/impl/PartnerInvoiceServiceImplTest.java index f0aa2d16a5..51bff93bb6 100644 --- a/weixin-java-pay/src/test/java/com/github/binarywang/wxpay/service/impl/PartnerInvoiceServiceImplTest.java +++ b/weixin-java-pay/src/test/java/com/github/binarywang/wxpay/service/impl/PartnerInvoiceServiceImplTest.java @@ -1,7 +1,9 @@ package com.github.binarywang.wxpay.service.impl; +import com.github.binarywang.wxpay.service.PartnerInvoiceService; import com.github.binarywang.wxpay.service.WxPayService; import com.github.binarywang.wxpay.bean.invoice.GeneralInvoiceRequest; +import com.github.binarywang.wxpay.bean.invoice.PassengerTransportInvoiceRequest; import com.github.binarywang.wxpay.bean.invoice.InvoiceResult; import com.github.binarywang.wxpay.bean.invoice.ReverseInvoiceRequest; import com.github.binarywang.wxpay.bean.invoice.InvoiceFileResult; @@ -18,6 +20,12 @@ */ public class PartnerInvoiceServiceImplTest { + @Test + public void shouldKeepPassengerTransportInvoiceMethodSourceCompatible() throws Exception { + Assert.assertTrue(PartnerInvoiceService.class + .getMethod("issuePassengerTransportInvoice", PassengerTransportInvoiceRequest.class).isDefault()); + } + @Test public void shouldRequestInviteUrlWithOptionalSubMchId() throws Exception { AtomicReference requestedUrl = new AtomicReference<>(); @@ -67,6 +75,44 @@ public void shouldPostGeneralInvoiceToV3Endpoint() throws Exception { Assert.assertTrue(requestedBody.get().contains("\"fapiao_apply_id\":\"invoice-001\"")); } + @Test + public void shouldPostPassengerTransportInvoiceToV3Endpoint() throws Exception { + AtomicReference requestedUrl = new AtomicReference<>(); + AtomicReference requestedBody = new AtomicReference<>(); + WxPayService payService = (WxPayService) Proxy.newProxyInstance( + getClass().getClassLoader(), new Class[]{WxPayService.class}, (proxy, method, args) -> { + if ("getPayBaseUrl".equals(method.getName())) { + return "https://api.mch.weixin.qq.com"; + } + if ("postV3".equals(method.getName())) { + requestedUrl.set((String) args[0]); + requestedBody.set((String) args[1]); + return null; + } + throw new UnsupportedOperationException(method.getName()); + }); + PassengerTransportInvoiceRequest request = new PassengerTransportInvoiceRequest(); + request.setSubMchid("1900000109"); + request.setFapiaoApplyId("invoice-002"); + PassengerTransportInvoiceRequest.PassengerInformation passenger = + new PassengerTransportInvoiceRequest.PassengerInformation(); + passenger.setCertificateNumber("encrypted-certificate-number"); + PassengerTransportInvoiceRequest.InvoiceItem item = new PassengerTransportInvoiceRequest.InvoiceItem(); + item.setPassengerInformation(passenger); + PassengerTransportInvoiceRequest.FapiaoInformation fapiao = + new PassengerTransportInvoiceRequest.FapiaoInformation(); + fapiao.setItems(java.util.Collections.singletonList(item)); + request.setFapiaoInformation(fapiao); + + new PartnerInvoiceServiceImpl(payService).issuePassengerTransportInvoice(request); + + Assert.assertEquals(requestedUrl.get(), + "https://api.mch.weixin.qq.com/v3/new-tax-control-fapiao/fapiao-applications/issue-passenger-transport"); + Assert.assertTrue(requestedBody.get().contains("\"fapiao_apply_id\":\"invoice-002\"")); + Assert.assertTrue(requestedBody.get().contains("\"passenger_information\"")); + Assert.assertTrue(requestedBody.get().contains("\"certificate_number\":\"encrypted-certificate-number\"")); + } + @Test public void shouldQueryInvoiceWithRequiredSubMchId() throws Exception { AtomicReference requestedUrl = new AtomicReference<>(); From c1591bae9c041ab82914d9129c10ee8cb08f9997 Mon Sep 17 00:00:00 2001 From: Binary Wang Date: Sat, 5 Sep 2026 16:40:41 +0800 Subject: [PATCH 30/31] =?UTF-8?q?:new:=20#4118=20=E3=80=90=E4=BC=81?= =?UTF-8?q?=E4=B8=9A=E5=BE=AE=E4=BF=A1=E3=80=91=E5=A2=9E=E5=8A=A0=E5=BE=AE?= =?UTF-8?q?=E4=BF=A1=E5=AE=A2=E6=9C=8D=E7=9F=A5=E8=AF=86=E5=BA=93=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chanjar/weixin/cp/api/WxCpKfService.java | 77 ++++++++++++ .../weixin/cp/api/impl/WxCpKfServiceImpl.java | 77 ++++++++++++ .../cp/bean/kf/WxCpKfKnowledgeGroup.java | 22 ++++ .../bean/kf/WxCpKfKnowledgeGroupAddResp.java | 23 ++++ .../bean/kf/WxCpKfKnowledgeGroupListResp.java | 31 +++++ .../cp/bean/kf/WxCpKfKnowledgeIntent.java | 109 +++++++++++++++++ .../bean/kf/WxCpKfKnowledgeIntentAddResp.java | 23 ++++ .../kf/WxCpKfKnowledgeIntentListResp.java | 31 +++++ .../weixin/cp/constant/WxCpApiPathConsts.java | 17 +++ .../cp/bean/kf/WxCpKfKnowledgeTest.java | 110 ++++++++++++++++++ weixin-java-cp/src/test/resources/testng.xml | 1 + 11 files changed, 521 insertions(+) create mode 100644 weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfKnowledgeGroup.java create mode 100644 weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfKnowledgeGroupAddResp.java create mode 100644 weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfKnowledgeGroupListResp.java create mode 100644 weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfKnowledgeIntent.java create mode 100644 weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfKnowledgeIntentAddResp.java create mode 100644 weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfKnowledgeIntentListResp.java create mode 100644 weixin-java-cp/src/test/java/me/chanjar/weixin/cp/bean/kf/WxCpKfKnowledgeTest.java diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpKfService.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpKfService.java index 046cfbc5bb..850ffaae5a 100644 --- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpKfService.java +++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpKfService.java @@ -291,4 +291,81 @@ WxCpBaseResp upgradeGroupchatService(String openKfid, String externalUserId, */ WxCpBaseResp cancelUpgradeService(String openKfid, String externalUserId) throws WxErrorException; + + /** + * 添加知识库分组。 + * + * @param group 分组信息 + * @return 新增结果,包含分组 ID + * @throws WxErrorException 异常 + */ + WxCpKfKnowledgeGroupAddResp addKnowledgeGroup(WxCpKfKnowledgeGroup group) throws WxErrorException; + + /** + * 删除知识库分组。 + * + * @param groupId 分组 ID + * @return 接口返回结果 + * @throws WxErrorException 异常 + */ + WxCpBaseResp delKnowledgeGroup(String groupId) throws WxErrorException; + + /** + * 修改知识库分组。 + * + * @param group 分组信息,必须包含分组 ID 和名称 + * @return 接口返回结果 + * @throws WxErrorException 异常 + */ + WxCpBaseResp modKnowledgeGroup(WxCpKfKnowledgeGroup group) throws WxErrorException; + + /** + * 分页获取知识库分组。 + * + * @param cursor 分页游标,可为空 + * @param limit 每页数量,可为空 + * @param groupId 指定分组 ID,可为空 + * @return 分组列表 + * @throws WxErrorException 异常 + */ + WxCpKfKnowledgeGroupListResp listKnowledgeGroup(String cursor, Integer limit, String groupId) throws WxErrorException; + + /** + * 添加知识库问答。 + * + * @param intent 问答信息 + * @return 新增结果,包含问答 ID + * @throws WxErrorException 异常 + */ + WxCpKfKnowledgeIntentAddResp addKnowledgeIntent(WxCpKfKnowledgeIntent intent) throws WxErrorException; + + /** + * 删除知识库问答。 + * + * @param intentId 问答 ID + * @return 接口返回结果 + * @throws WxErrorException 异常 + */ + WxCpBaseResp delKnowledgeIntent(String intentId) throws WxErrorException; + + /** + * 修改知识库问答。 + * + * @param intent 问答信息,必须包含问答 ID + * @return 接口返回结果 + * @throws WxErrorException 异常 + */ + WxCpBaseResp modKnowledgeIntent(WxCpKfKnowledgeIntent intent) throws WxErrorException; + + /** + * 分页获取知识库问答。 + * + * @param cursor 分页游标,可为空 + * @param limit 每页数量,可为空 + * @param groupId 指定分组 ID,可为空 + * @param intentId 指定问答 ID,可为空 + * @return 问答列表 + * @throws WxErrorException 异常 + */ + WxCpKfKnowledgeIntentListResp listKnowledgeIntent(String cursor, Integer limit, String groupId, String intentId) throws WxErrorException; } diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpKfServiceImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpKfServiceImpl.java index be4f2a5850..be6c61ea92 100644 --- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpKfServiceImpl.java +++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpKfServiceImpl.java @@ -317,4 +317,81 @@ public WxCpKfGetServicerStatisticResp getServicerStatistic(WxCpKfGetServicerStat return WxCpKfGetServicerStatisticResp.fromJson(responseContent); } + @Override + public WxCpKfKnowledgeGroupAddResp addKnowledgeGroup(WxCpKfKnowledgeGroup group) throws WxErrorException { + String url = cpService.getWxCpConfigStorage().getApiUrl(KNOWLEDGE_ADD_GROUP); + String responseContent = cpService.post(url, GSON.toJson(group)); + return WxCpKfKnowledgeGroupAddResp.fromJson(responseContent); + } + + @Override + public WxCpBaseResp delKnowledgeGroup(String groupId) throws WxErrorException { + return knowledgeBaseResp(KNOWLEDGE_DEL_GROUP, "group_id", groupId); + } + + @Override + public WxCpBaseResp modKnowledgeGroup(WxCpKfKnowledgeGroup group) throws WxErrorException { + String url = cpService.getWxCpConfigStorage().getApiUrl(KNOWLEDGE_MOD_GROUP); + String responseContent = cpService.post(url, GSON.toJson(group)); + return WxCpBaseResp.fromJson(responseContent); + } + + @Override + public WxCpKfKnowledgeGroupListResp listKnowledgeGroup(String cursor, Integer limit, String groupId) throws WxErrorException { + String url = cpService.getWxCpConfigStorage().getApiUrl(KNOWLEDGE_LIST_GROUP); + String responseContent = cpService.post(url, GSON.toJson(listKnowledgeJson(cursor, limit, groupId, null))); + return WxCpKfKnowledgeGroupListResp.fromJson(responseContent); + } + + @Override + public WxCpKfKnowledgeIntentAddResp addKnowledgeIntent(WxCpKfKnowledgeIntent intent) throws WxErrorException { + String url = cpService.getWxCpConfigStorage().getApiUrl(KNOWLEDGE_ADD_INTENT); + String responseContent = cpService.post(url, GSON.toJson(intent)); + return WxCpKfKnowledgeIntentAddResp.fromJson(responseContent); + } + + @Override + public WxCpBaseResp delKnowledgeIntent(String intentId) throws WxErrorException { + return knowledgeBaseResp(KNOWLEDGE_DEL_INTENT, "intent_id", intentId); + } + + @Override + public WxCpBaseResp modKnowledgeIntent(WxCpKfKnowledgeIntent intent) throws WxErrorException { + String url = cpService.getWxCpConfigStorage().getApiUrl(KNOWLEDGE_MOD_INTENT); + String responseContent = cpService.post(url, GSON.toJson(intent)); + return WxCpBaseResp.fromJson(responseContent); + } + + @Override + public WxCpKfKnowledgeIntentListResp listKnowledgeIntent(String cursor, Integer limit, String groupId, String intentId) throws WxErrorException { + String url = cpService.getWxCpConfigStorage().getApiUrl(KNOWLEDGE_LIST_INTENT); + String responseContent = cpService.post(url, GSON.toJson(listKnowledgeJson(cursor, limit, groupId, intentId))); + return WxCpKfKnowledgeIntentListResp.fromJson(responseContent); + } + + private WxCpBaseResp knowledgeBaseResp(String apiPath, String key, String value) throws WxErrorException { + String url = cpService.getWxCpConfigStorage().getApiUrl(apiPath); + JsonObject json = new JsonObject(); + json.addProperty(key, value); + String responseContent = cpService.post(url, GSON.toJson(json)); + return WxCpBaseResp.fromJson(responseContent); + } + + private JsonObject listKnowledgeJson(String cursor, Integer limit, String groupId, String intentId) { + JsonObject json = new JsonObject(); + if (cursor != null) { + json.addProperty("cursor", cursor); + } + if (limit != null) { + json.addProperty("limit", limit); + } + if (groupId != null) { + json.addProperty("group_id", groupId); + } + if (intentId != null) { + json.addProperty("intent_id", intentId); + } + return json; + } + } diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfKnowledgeGroup.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfKnowledgeGroup.java new file mode 100644 index 0000000000..5cc6c3e79c --- /dev/null +++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfKnowledgeGroup.java @@ -0,0 +1,22 @@ +package me.chanjar.weixin.cp.bean.kf; + +import com.google.gson.annotations.SerializedName; +import lombok.Data; + +import java.io.Serializable; + +/** + * 微信客服知识库分组。 + */ +@Data +public class WxCpKfKnowledgeGroup implements Serializable { + private static final long serialVersionUID = -170690715179803477L; + + @SerializedName("group_id") + private String groupId; + + private String name; + + @SerializedName("is_default") + private Integer isDefault; +} diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfKnowledgeGroupAddResp.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfKnowledgeGroupAddResp.java new file mode 100644 index 0000000000..52bd89bdb1 --- /dev/null +++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfKnowledgeGroupAddResp.java @@ -0,0 +1,23 @@ +package me.chanjar.weixin.cp.bean.kf; + +import com.google.gson.annotations.SerializedName; +import lombok.Data; +import lombok.EqualsAndHashCode; +import me.chanjar.weixin.cp.bean.WxCpBaseResp; +import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder; + +/** + * 微信客服知识库分组新增返回结果。 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class WxCpKfKnowledgeGroupAddResp extends WxCpBaseResp { + private static final long serialVersionUID = 232872665454024387L; + + @SerializedName("group_id") + private String groupId; + + public static WxCpKfKnowledgeGroupAddResp fromJson(String json) { + return WxCpGsonBuilder.create().fromJson(json, WxCpKfKnowledgeGroupAddResp.class); + } +} diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfKnowledgeGroupListResp.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfKnowledgeGroupListResp.java new file mode 100644 index 0000000000..bed6bfae82 --- /dev/null +++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfKnowledgeGroupListResp.java @@ -0,0 +1,31 @@ +package me.chanjar.weixin.cp.bean.kf; + +import com.google.gson.annotations.SerializedName; +import lombok.Data; +import lombok.EqualsAndHashCode; +import me.chanjar.weixin.cp.bean.WxCpBaseResp; +import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder; + +import java.util.List; + +/** + * 微信客服知识库分组列表返回结果。 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class WxCpKfKnowledgeGroupListResp extends WxCpBaseResp { + private static final long serialVersionUID = -8350717377843545855L; + + @SerializedName("next_cursor") + private String nextCursor; + + @SerializedName("has_more") + private Integer hasMore; + + @SerializedName("group_list") + private List groupList; + + public static WxCpKfKnowledgeGroupListResp fromJson(String json) { + return WxCpGsonBuilder.create().fromJson(json, WxCpKfKnowledgeGroupListResp.class); + } +} diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfKnowledgeIntent.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfKnowledgeIntent.java new file mode 100644 index 0000000000..bbe569effd --- /dev/null +++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfKnowledgeIntent.java @@ -0,0 +1,109 @@ +package me.chanjar.weixin.cp.bean.kf; + +import com.google.gson.annotations.SerializedName; +import lombok.Data; +import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder; + +import java.io.Serializable; +import java.util.List; + +/** + * 微信客服知识库问答。 + */ +@Data +public class WxCpKfKnowledgeIntent implements Serializable { + private static final long serialVersionUID = -3777712166335763935L; + + @SerializedName("group_id") + private String groupId; + + @SerializedName("intent_id") + private String intentId; + + private Question question; + + @SerializedName("similar_questions") + private SimilarQuestions similarQuestions; + + private List answers; + + public static WxCpKfKnowledgeIntent fromJson(String json) { + return WxCpGsonBuilder.create().fromJson(json, WxCpKfKnowledgeIntent.class); + } + + @Data + public static class Question implements Serializable { + private static final long serialVersionUID = -1833564733770700525L; + private Text text; + @SerializedName("similar_questions") + private SimilarQuestions similarQuestions; + private List answers; + } + + @Data + public static class Text implements Serializable { + private static final long serialVersionUID = -4775152873471313775L; + private String content; + } + + @Data + public static class SimilarQuestions implements Serializable { + private static final long serialVersionUID = -3338135520171174537L; + private List items; + } + + @Data + public static class Answer implements Serializable { + private static final long serialVersionUID = 482114683168970317L; + private Text text; + private List attachments; + } + + @Data + public static class Attachment implements Serializable { + private static final long serialVersionUID = 547601649734690079L; + @SerializedName("msgtype") + private String msgType; + private Image image; + private Video video; + private Link link; + @SerializedName("miniprogram") + private MiniProgram miniProgram; + } + + @Data + public static class Image implements Serializable { + private static final long serialVersionUID = -6305485241850490695L; + @SerializedName("media_id") + private String mediaId; + private String name; + } + + @Data + public static class Video implements Serializable { + private static final long serialVersionUID = 4002145709503795505L; + @SerializedName("media_id") + private String mediaId; + private String name; + } + + @Data + public static class Link implements Serializable { + private static final long serialVersionUID = -1844812819777892606L; + private String title; + @SerializedName("pic_url") + private String picUrl; + private String desc; + private String url; + } + + @Data + public static class MiniProgram implements Serializable { + private static final long serialVersionUID = 6893025025270416975L; + private String title; + @SerializedName("thumb_media_id") + private String thumbMediaId; + private String appid; + private String pagepath; + } +} diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfKnowledgeIntentAddResp.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfKnowledgeIntentAddResp.java new file mode 100644 index 0000000000..44f162e78f --- /dev/null +++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfKnowledgeIntentAddResp.java @@ -0,0 +1,23 @@ +package me.chanjar.weixin.cp.bean.kf; + +import com.google.gson.annotations.SerializedName; +import lombok.Data; +import lombok.EqualsAndHashCode; +import me.chanjar.weixin.cp.bean.WxCpBaseResp; +import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder; + +/** + * 微信客服知识库问答新增返回结果。 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class WxCpKfKnowledgeIntentAddResp extends WxCpBaseResp { + private static final long serialVersionUID = -2693926545826175543L; + + @SerializedName("intent_id") + private String intentId; + + public static WxCpKfKnowledgeIntentAddResp fromJson(String json) { + return WxCpGsonBuilder.create().fromJson(json, WxCpKfKnowledgeIntentAddResp.class); + } +} diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfKnowledgeIntentListResp.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfKnowledgeIntentListResp.java new file mode 100644 index 0000000000..a188a03c0d --- /dev/null +++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfKnowledgeIntentListResp.java @@ -0,0 +1,31 @@ +package me.chanjar.weixin.cp.bean.kf; + +import com.google.gson.annotations.SerializedName; +import lombok.Data; +import lombok.EqualsAndHashCode; +import me.chanjar.weixin.cp.bean.WxCpBaseResp; +import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder; + +import java.util.List; + +/** + * 微信客服知识库问答列表返回结果。 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class WxCpKfKnowledgeIntentListResp extends WxCpBaseResp { + private static final long serialVersionUID = -724770244623284115L; + + @SerializedName("next_cursor") + private String nextCursor; + + @SerializedName("has_more") + private Integer hasMore; + + @SerializedName("intent_list") + private List intentList; + + public static WxCpKfKnowledgeIntentListResp fromJson(String json) { + return WxCpGsonBuilder.create().fromJson(json, WxCpKfKnowledgeIntentListResp.class); + } +} diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/constant/WxCpApiPathConsts.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/constant/WxCpApiPathConsts.java index d95bf0a130..bb180cc40a 100644 --- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/constant/WxCpApiPathConsts.java +++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/constant/WxCpApiPathConsts.java @@ -1719,6 +1719,23 @@ interface Kf { */ String CUSTOMER_CANCEL_UPGRADE_SERVICE = "/cgi-bin/kf/customer/cancel_upgrade_service"; + /** 添加知识库分组。 */ + String KNOWLEDGE_ADD_GROUP = "/cgi-bin/kf/knowledge/add_group"; + /** 删除知识库分组。 */ + String KNOWLEDGE_DEL_GROUP = "/cgi-bin/kf/knowledge/del_group"; + /** 修改知识库分组。 */ + String KNOWLEDGE_MOD_GROUP = "/cgi-bin/kf/knowledge/mod_group"; + /** 获取知识库分组列表。 */ + String KNOWLEDGE_LIST_GROUP = "/cgi-bin/kf/knowledge/list_group"; + /** 添加知识库问答。 */ + String KNOWLEDGE_ADD_INTENT = "/cgi-bin/kf/knowledge/add_intent"; + /** 删除知识库问答。 */ + String KNOWLEDGE_DEL_INTENT = "/cgi-bin/kf/knowledge/del_intent"; + /** 修改知识库问答。 */ + String KNOWLEDGE_MOD_INTENT = "/cgi-bin/kf/knowledge/mod_intent"; + /** 获取知识库问答列表。 */ + String KNOWLEDGE_LIST_INTENT = "/cgi-bin/kf/knowledge/list_intent"; + } /** diff --git a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/bean/kf/WxCpKfKnowledgeTest.java b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/bean/kf/WxCpKfKnowledgeTest.java new file mode 100644 index 0000000000..9f8ff6fa78 --- /dev/null +++ b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/bean/kf/WxCpKfKnowledgeTest.java @@ -0,0 +1,110 @@ +package me.chanjar.weixin.cp.bean.kf; + +import com.google.gson.JsonParser; +import me.chanjar.weixin.cp.api.WxCpKfService; +import me.chanjar.weixin.cp.api.WxCpService; +import me.chanjar.weixin.cp.api.impl.WxCpKfServiceImpl; +import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder; +import org.testng.annotations.Test; +import org.mockito.ArgumentCaptor; + +import java.util.Arrays; +import java.util.List; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.Mockito.RETURNS_DEEP_STUBS; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + +public class WxCpKfKnowledgeTest { + + @Test + public void testKnowledgeGroupListFromJson() { + String json = "{\"errcode\":0,\"errmsg\":\"ok\",\"next_cursor\":\"next\",\"has_more\":1,\"group_list\":[{\"group_id\":\"group-1\",\"name\":\"默认分组\",\"is_default\":1}]}"; + + WxCpKfKnowledgeGroupListResp response = WxCpKfKnowledgeGroupListResp.fromJson(json); + + assertThat(response.getNextCursor()).isEqualTo("next"); + assertThat(response.getHasMore()).isEqualTo(1); + assertThat(response.getGroupList()).singleElement().satisfies(group -> { + assertThat(group.getGroupId()).isEqualTo("group-1"); + assertThat(group.getName()).isEqualTo("默认分组"); + assertThat(group.getIsDefault()).isEqualTo(1); + }); + } + + @Test + public void testKnowledgeIntentToJsonAndFromJson() { + String json = "{\"group_id\":\"group-1\",\"intent_id\":\"intent-1\",\"question\":{\"text\":{\"content\":\"主问题\"}},\"similar_questions\":{\"items\":[{\"text\":{\"content\":\"相似问题\"}}]},\"answers\":[{\"text\":{\"content\":\"回答\"},\"attachments\":[{\"msgtype\":\"image\",\"image\":{\"media_id\":\"media-1\"}}]}]}"; + + WxCpKfKnowledgeIntent intent = WxCpKfKnowledgeIntent.fromJson(json); + String serialized = WxCpGsonBuilder.create().toJson(intent); + + assertThat(intent.getQuestion().getText().getContent()).isEqualTo("主问题"); + assertThat(intent.getSimilarQuestions().getItems()).hasSize(1); + assertThat(intent.getAnswers().get(0).getAttachments().get(0).getImage().getMediaId()).isEqualTo("media-1"); + assertThat(JsonParser.parseString(serialized)).isEqualTo(JsonParser.parseString(json)); + } + + @Test + public void testKnowledgeIntentListFromJson() { + String json = "{\"errcode\":0,\"errmsg\":\"ok\",\"intent_list\":[{\"group_id\":\"group-1\",\"intent_id\":\"intent-1\",\"question\":{\"text\":{\"content\":\"主问题\"},\"similar_questions\":{\"items\":[{\"text\":{\"content\":\"相似问题\"}}]},\"answers\":[{\"text\":{\"content\":\"回答\"}}]}}]}"; + + WxCpKfKnowledgeIntentListResp response = WxCpKfKnowledgeIntentListResp.fromJson(json); + WxCpKfKnowledgeIntent intent = response.getIntentList().get(0); + + assertThat(intent.getQuestion().getSimilarQuestions().getItems()).hasSize(1); + assertThat(intent.getQuestion().getAnswers()).singleElement().satisfies(answer -> + assertThat(answer.getText().getContent()).isEqualTo("回答")); + } + + @Test + public void testKnowledgeApiRequests() throws Exception { + WxCpService cpService = mock(WxCpService.class, RETURNS_DEEP_STUBS); + when(cpService.getWxCpConfigStorage().getApiUrl(anyString())).thenAnswer(invocation -> invocation.getArgument(0)); + when(cpService.post(anyString(), anyString())).thenReturn("{\"errcode\":0,\"errmsg\":\"ok\",\"group_id\":\"group-1\",\"intent_id\":\"intent-1\"}"); + WxCpKfService service = new WxCpKfServiceImpl(cpService); + + WxCpKfKnowledgeGroup group = new WxCpKfKnowledgeGroup(); + group.setName("常见问题"); + WxCpKfKnowledgeIntent intent = WxCpKfKnowledgeIntent.fromJson("{\"group_id\":\"group-1\",\"intent_id\":\"intent-1\",\"question\":{\"text\":{\"content\":\"主问题\"}},\"answers\":[{\"text\":{\"content\":\"回答\"}}]}"); + + assertThat(service.addKnowledgeGroup(group).getGroupId()).isEqualTo("group-1"); + group.setGroupId("group-1"); + service.delKnowledgeGroup("group-1"); + service.modKnowledgeGroup(group); + service.listKnowledgeGroup("cursor", 100, "group-1"); + assertThat(service.addKnowledgeIntent(intent).getIntentId()).isEqualTo("intent-1"); + service.delKnowledgeIntent("intent-1"); + service.modKnowledgeIntent(intent); + service.listKnowledgeIntent("cursor", 100, "group-1", "intent-1"); + service.listKnowledgeIntent(null, null, null, null); + + ArgumentCaptor urlCaptor = ArgumentCaptor.forClass(String.class); + ArgumentCaptor requestCaptor = ArgumentCaptor.forClass(String.class); + verify(cpService, times(9)).post(urlCaptor.capture(), requestCaptor.capture()); + + assertThat(urlCaptor.getAllValues()).isEqualTo(Arrays.asList( + "/cgi-bin/kf/knowledge/add_group", "/cgi-bin/kf/knowledge/del_group", + "/cgi-bin/kf/knowledge/mod_group", "/cgi-bin/kf/knowledge/list_group", + "/cgi-bin/kf/knowledge/add_intent", "/cgi-bin/kf/knowledge/del_intent", + "/cgi-bin/kf/knowledge/mod_intent", "/cgi-bin/kf/knowledge/list_intent", + "/cgi-bin/kf/knowledge/list_intent")); + assertJsonRequests(requestCaptor.getAllValues(), Arrays.asList( + "{\"name\":\"常见问题\"}", "{\"group_id\":\"group-1\"}", + "{\"group_id\":\"group-1\",\"name\":\"常见问题\"}", "{\"cursor\":\"cursor\",\"limit\":100,\"group_id\":\"group-1\"}", + "{\"group_id\":\"group-1\",\"intent_id\":\"intent-1\",\"question\":{\"text\":{\"content\":\"主问题\"}},\"answers\":[{\"text\":{\"content\":\"回答\"}}]}", "{\"intent_id\":\"intent-1\"}", + "{\"group_id\":\"group-1\",\"intent_id\":\"intent-1\",\"question\":{\"text\":{\"content\":\"主问题\"}},\"answers\":[{\"text\":{\"content\":\"回答\"}}]}", "{\"cursor\":\"cursor\",\"limit\":100,\"group_id\":\"group-1\",\"intent_id\":\"intent-1\"}", + "{}")); + } + + private void assertJsonRequests(List actual, List expected) { + assertThat(actual).hasSameSizeAs(expected); + for (int i = 0; i < actual.size(); i++) { + assertThat(JsonParser.parseString(actual.get(i))).isEqualTo(JsonParser.parseString(expected.get(i))); + } + } +} diff --git a/weixin-java-cp/src/test/resources/testng.xml b/weixin-java-cp/src/test/resources/testng.xml index a8f5713235..ed49a2da0a 100644 --- a/weixin-java-cp/src/test/resources/testng.xml +++ b/weixin-java-cp/src/test/resources/testng.xml @@ -28,6 +28,7 @@ +
From 017421583aca8017aff5c5a1ba79fe58fd006bc2 Mon Sep 17 00:00:00 2001 From: Binary Wang Date: Tue, 8 Sep 2026 10:56:59 +0800 Subject: [PATCH 31/31] =?UTF-8?q?:art:=20#4120=20=E3=80=90=E5=B0=8F?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E3=80=91=E6=96=B0=E5=A2=9E=E4=B8=AA=E4=BA=BA?= =?UTF-8?q?=E4=B8=BB=E4=BD=93=E8=99=9A=E6=8B=9F=E6=94=AF=E4=BB=98=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wx/miniapp/api/WxMaXPayService.java | 12 +++ .../wx/miniapp/bean/WxMaMessage.java | 27 ++++++ .../miniapp/bean/xpay/WxMaXPayGoodsInfo.java | 26 ++++++ .../WxMaXPayRequestVirtualPaymentData.java | 49 +++++++++++ .../WxMaXPayRequestVirtualPaymentRequest.java | 84 +++++++++++++++++++ .../bean/xpay/WxMaXPayWeChatPayInfo.java | 22 +++++ .../wx/miniapp/bean/WxMaMessageTest.java | 71 ++++++++++++++++ .../WxMaXPayRequestVirtualPaymentTest.java | 76 +++++++++++++++++ 8 files changed, 367 insertions(+) create mode 100644 weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/bean/xpay/WxMaXPayGoodsInfo.java create mode 100644 weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/bean/xpay/WxMaXPayRequestVirtualPaymentData.java create mode 100644 weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/bean/xpay/WxMaXPayRequestVirtualPaymentRequest.java create mode 100644 weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/bean/xpay/WxMaXPayWeChatPayInfo.java create mode 100644 weixin-java-miniapp/src/test/java/cn/binarywang/wx/miniapp/bean/xpay/WxMaXPayRequestVirtualPaymentTest.java diff --git a/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/api/WxMaXPayService.java b/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/api/WxMaXPayService.java index 68d4dc0c97..52f3b82e66 100644 --- a/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/api/WxMaXPayService.java +++ b/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/api/WxMaXPayService.java @@ -51,6 +51,18 @@ public interface WxMaXPayService { */ WxMaXPayCancelCurrencyPayResponse cancelCurrencyPay(WxMaXPayCancelCurrencyPayRequest request, WxMaXPaySigParams sigParams) throws WxErrorException; + /** + * 生成调起 wx.requestVirtualPayment 所需的支付参数。 + * + * @param request 虚拟支付调起参数 + * @param sigParams 签名参数对象 + * @return 支付参数 + */ + default WxMaXPayRequestVirtualPaymentData createRequestVirtualPaymentData(WxMaXPayRequestVirtualPaymentRequest request, + WxMaXPaySigParams sigParams) { + return request.createPayData(sigParams); + } + /** * 通知发货。 * diff --git a/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/bean/WxMaMessage.java b/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/bean/WxMaMessage.java index 6d01e58034..f81e7d37e3 100644 --- a/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/bean/WxMaMessage.java +++ b/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/bean/WxMaMessage.java @@ -1,6 +1,8 @@ package cn.binarywang.wx.miniapp.bean; +import cn.binarywang.wx.miniapp.bean.xpay.WxMaXPayGoodsInfo; import cn.binarywang.wx.miniapp.bean.xpay.WxMaXPayTeamInfo; +import cn.binarywang.wx.miniapp.bean.xpay.WxMaXPayWeChatPayInfo; import cn.binarywang.wx.miniapp.config.WxMaConfig; import cn.binarywang.wx.miniapp.util.crypt.WxMaCryptUtils; import cn.binarywang.wx.miniapp.json.WxMaGsonBuilder; @@ -213,6 +215,31 @@ public class WxMaMessage implements Serializable { @XStreamAlias("SubscribeMsgSentEvent") private WxMaSubscribeMsgEvent.SubscribeMsgSentEvent subscribeMsgSentEvent; + /** + * 商户订单号. + * xpay_goods_deliver_notify + */ + @SerializedName("OutTradeNo") + @XStreamAlias("OutTradeNo") + @XStreamConverter(value = XStreamCDataConverter.class) + private String outTradeNo; + + /** + * 微信支付信息. + * xpay_goods_deliver_notify + */ + @SerializedName("WeChatPayInfo") + @XStreamAlias("WeChatPayInfo") + private WxMaXPayWeChatPayInfo weChatPayInfo; + + /** + * 道具信息. + * xpay_goods_deliver_notify + */ + @SerializedName("GoodsInfo") + @XStreamAlias("GoodsInfo") + private WxMaXPayGoodsInfo goodsInfo; + // 小程序基本信息 //region 小程序基本信息 infoType=notify_3rd_wxa_auth_and_icp diff --git a/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/bean/xpay/WxMaXPayGoodsInfo.java b/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/bean/xpay/WxMaXPayGoodsInfo.java new file mode 100644 index 0000000000..238004afde --- /dev/null +++ b/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/bean/xpay/WxMaXPayGoodsInfo.java @@ -0,0 +1,26 @@ +package cn.binarywang.wx.miniapp.bean.xpay; + +import com.google.gson.annotations.SerializedName; +import com.thoughtworks.xstream.annotations.XStreamAlias; +import com.thoughtworks.xstream.annotations.XStreamConverter; +import lombok.Data; +import me.chanjar.weixin.common.util.xml.XStreamCDataConverter; + +import java.io.Serializable; + +/** + * xpay_goods_deliver_notify 推送中的道具信息。 + */ +@Data +public class WxMaXPayGoodsInfo implements Serializable { + private static final long serialVersionUID = 7495157056049312108L; + + @SerializedName("ProductId") + @XStreamAlias("ProductId") + @XStreamConverter(value = XStreamCDataConverter.class) + private String productId; + + @SerializedName("Quantity") + @XStreamAlias("Quantity") + private Integer quantity; +} diff --git a/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/bean/xpay/WxMaXPayRequestVirtualPaymentData.java b/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/bean/xpay/WxMaXPayRequestVirtualPaymentData.java new file mode 100644 index 0000000000..000226f666 --- /dev/null +++ b/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/bean/xpay/WxMaXPayRequestVirtualPaymentData.java @@ -0,0 +1,49 @@ +package cn.binarywang.wx.miniapp.bean.xpay; + +import cn.binarywang.wx.miniapp.json.WxMaGsonBuilder; +import com.google.gson.annotations.SerializedName; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * 调用 wx.requestVirtualPayment 所需的支付参数。 + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class WxMaXPayRequestVirtualPaymentData implements Serializable { + private static final long serialVersionUID = 7495157056049312108L; + + /** + * 支付模式,个人主体虚拟支付固定为 short_series_goods。 + */ + @SerializedName("mode") + private String mode; + + /** + * 下单签名原文,需与计算 paySig 和 signature 时使用的字符串完全一致。 + */ + @SerializedName("signData") + private String signData; + + /** + * 使用 AppKey 对 requestVirtualPayment&signData 计算得到的签名。 + */ + @SerializedName("paySig") + private String paySig; + + /** + * 使用 session_key 对 signData 计算得到的签名。 + */ + @SerializedName("signature") + private String signature; + + public String toJson() { + return WxMaGsonBuilder.create().toJson(this); + } +} diff --git a/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/bean/xpay/WxMaXPayRequestVirtualPaymentRequest.java b/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/bean/xpay/WxMaXPayRequestVirtualPaymentRequest.java new file mode 100644 index 0000000000..32ca891107 --- /dev/null +++ b/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/bean/xpay/WxMaXPayRequestVirtualPaymentRequest.java @@ -0,0 +1,84 @@ +package cn.binarywang.wx.miniapp.bean.xpay; + +import cn.binarywang.wx.miniapp.constant.WxMaConstants; +import cn.binarywang.wx.miniapp.json.WxMaGsonBuilder; +import com.google.gson.annotations.SerializedName; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * 个人主体虚拟支付调起 wx.requestVirtualPayment 的签名原文参数。 + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class WxMaXPayRequestVirtualPaymentRequest implements Serializable { + private static final long serialVersionUID = 7495157056049312108L; + + /** + * 支付应用 ID。 + */ + @SerializedName("offerId") + private String offerId; + + /** + * 购买数量。 + */ + @SerializedName("buyQuantity") + private Integer buyQuantity; + + /** + * 环境,个人主体虚拟支付固定为 0。 + */ + @SerializedName("env") + private Integer env; + + /** + * 币种,个人主体虚拟支付固定为 CNY。 + */ + @SerializedName("currencyType") + private String currencyType; + + /** + * 道具 ID。 + */ + @SerializedName("productId") + private String productId; + + /** + * 道具单价,单位为分。 + */ + @SerializedName("goodsPrice") + private Integer goodsPrice; + + /** + * 商户订单号,8 到 32 位且不能以下划线开头。 + */ + @SerializedName("outTradeNo") + private String outTradeNo; + + /** + * 商户透传数据。 + */ + @SerializedName("attach") + private String attach; + + public WxMaXPayRequestVirtualPaymentData createPayData(WxMaXPaySigParams sigParams) { + final String signData = this.toJson(); + return WxMaXPayRequestVirtualPaymentData.builder() + .mode(WxMaConstants.XPayPaymentMode.GOODS) + .signData(signData) + .paySig(sigParams.calcPaySig(WxMaConstants.XPayWxApiSigUri.WXAPI, signData)) + .signature(sigParams.calcSig(signData)) + .build(); + } + + public String toJson() { + return WxMaGsonBuilder.create().toJson(this); + } +} diff --git a/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/bean/xpay/WxMaXPayWeChatPayInfo.java b/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/bean/xpay/WxMaXPayWeChatPayInfo.java new file mode 100644 index 0000000000..c1580b2ba4 --- /dev/null +++ b/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/bean/xpay/WxMaXPayWeChatPayInfo.java @@ -0,0 +1,22 @@ +package cn.binarywang.wx.miniapp.bean.xpay; + +import com.google.gson.annotations.SerializedName; +import com.thoughtworks.xstream.annotations.XStreamAlias; +import com.thoughtworks.xstream.annotations.XStreamConverter; +import lombok.Data; +import me.chanjar.weixin.common.util.xml.XStreamCDataConverter; + +import java.io.Serializable; + +/** + * xpay_goods_deliver_notify 推送中的微信支付信息。 + */ +@Data +public class WxMaXPayWeChatPayInfo implements Serializable { + private static final long serialVersionUID = 7495157056049312108L; + + @SerializedName("MchOrderNo") + @XStreamAlias("MchOrderNo") + @XStreamConverter(value = XStreamCDataConverter.class) + private String mchOrderNo; +} diff --git a/weixin-java-miniapp/src/test/java/cn/binarywang/wx/miniapp/bean/WxMaMessageTest.java b/weixin-java-miniapp/src/test/java/cn/binarywang/wx/miniapp/bean/WxMaMessageTest.java index 0b7060e79b..13b6d62bba 100644 --- a/weixin-java-miniapp/src/test/java/cn/binarywang/wx/miniapp/bean/WxMaMessageTest.java +++ b/weixin-java-miniapp/src/test/java/cn/binarywang/wx/miniapp/bean/WxMaMessageTest.java @@ -397,6 +397,77 @@ private void checkXPayRefundNotifyMessage(WxMaMessage msg) { assertEquals(teamInfo.getTeamAction(), new Integer(0)); } + /** + * 个人主体虚拟支付发货通知事件 xpay_goods_deliver_notify 测试用例(XML格式)。 + */ + @Test + public void testXPayGoodsDeliverNotifyFromXml() { + String xml = "\n" + + " \n" + + " \n" + + " 1700000000\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " 2\n" + + " \n" + + " 0\n" + + ""; + + WxMaMessage msg = WxMaMessage.fromXml(xml); + + checkXPayGoodsDeliverNotifyMessage(msg); + } + + /** + * 个人主体虚拟支付发货通知事件 xpay_goods_deliver_notify 测试用例(JSON格式)。 + */ + @Test + public void testXPayGoodsDeliverNotifyFromJson() { + String json = "{\n" + + " \"ToUserName\": \"gh_abcdefg\",\n" + + " \"FromUserName\": \"oABCDEFG\",\n" + + " \"CreateTime\": 1700000000,\n" + + " \"MsgType\": \"event\",\n" + + " \"Event\": \"xpay_goods_deliver_notify\",\n" + + " \"OpenId\": \"oABCDEFG\",\n" + + " \"OutTradeNo\": \"order12345\",\n" + + " \"WeChatPayInfo\": {\n" + + " \"MchOrderNo\": \"wx_order_123\"\n" + + " },\n" + + " \"GoodsInfo\": {\n" + + " \"ProductId\": \"product_001\",\n" + + " \"Quantity\": 2\n" + + " },\n" + + " \"RetryTimes\": 0\n" + + "}"; + + WxMaMessage msg = WxMaMessage.fromJson(json); + checkXPayGoodsDeliverNotifyMessage(msg); + } + + private void checkXPayGoodsDeliverNotifyMessage(WxMaMessage msg) { + assertEquals(msg.getToUser(), "gh_abcdefg"); + assertEquals(msg.getFromUser(), "oABCDEFG"); + assertEquals(msg.getCreateTime(), new Integer(1700000000)); + assertEquals(msg.getMsgType(), WxConsts.XmlMsgType.EVENT); + assertEquals(msg.getEvent(), WxMaConstants.XPayNotifyEvent.GOODS_DELIVER); + assertEquals(msg.getOpenId(), "oABCDEFG"); + assertEquals(msg.getOutTradeNo(), "order12345"); + assertNotNull(msg.getWeChatPayInfo()); + assertEquals(msg.getWeChatPayInfo().getMchOrderNo(), "wx_order_123"); + assertNotNull(msg.getGoodsInfo()); + assertEquals(msg.getGoodsInfo().getProductId(), "product_001"); + assertEquals(msg.getGoodsInfo().getQuantity(), new Integer(2)); + assertEquals(msg.getRetryTimes(), new Integer(0)); + } + /** * 虚拟支付投诉推送事件 xpay_complaint_notify 测试用例(XML格式) */ diff --git a/weixin-java-miniapp/src/test/java/cn/binarywang/wx/miniapp/bean/xpay/WxMaXPayRequestVirtualPaymentTest.java b/weixin-java-miniapp/src/test/java/cn/binarywang/wx/miniapp/bean/xpay/WxMaXPayRequestVirtualPaymentTest.java new file mode 100644 index 0000000000..7694033860 --- /dev/null +++ b/weixin-java-miniapp/src/test/java/cn/binarywang/wx/miniapp/bean/xpay/WxMaXPayRequestVirtualPaymentTest.java @@ -0,0 +1,76 @@ +package cn.binarywang.wx.miniapp.bean.xpay; + +import cn.binarywang.wx.miniapp.api.WxMaService; +import cn.binarywang.wx.miniapp.api.impl.WxMaXPayServiceImpl; +import cn.binarywang.wx.miniapp.constant.WxMaConstants; +import cn.binarywang.wx.miniapp.json.WxMaGsonBuilder; +import com.google.gson.JsonObject; +import org.testng.annotations.Test; + +import static org.mockito.Mockito.mock; +import static org.testng.Assert.assertEquals; + +/** + * 验证个人主体虚拟支付调起 wx.requestVirtualPayment 所需参数。 + */ +public class WxMaXPayRequestVirtualPaymentTest { + + @Test + public void testCreatePayData() { + WxMaXPayRequestVirtualPaymentRequest request = WxMaXPayRequestVirtualPaymentRequest.builder() + .offerId("1450019686") + .buyQuantity(1) + .env(0) + .currencyType(WxMaConstants.XPayCurrencyType.CNY) + .productId("product_001") + .goodsPrice(100) + .outTradeNo("order12345") + .attach("attach中文") + .build(); + WxMaXPaySigParams sigParams = WxMaXPaySigParams.builder() + .appKey("app_key_123") + .sessionKey("session_key_123") + .build(); + + WxMaXPayRequestVirtualPaymentData payData = request.createPayData(sigParams); + + assertEquals(payData.getMode(), WxMaConstants.XPayPaymentMode.GOODS); + assertEquals(payData.getSignData(), + "{\"offerId\":\"1450019686\",\"buyQuantity\":1,\"env\":0,\"currencyType\":\"CNY\"," + + "\"productId\":\"product_001\",\"goodsPrice\":100,\"outTradeNo\":\"order12345\"," + + "\"attach\":\"attach中文\"}"); + assertEquals(payData.getPaySig(), "52b0abda3c933b0273d328b5c5102ee9ab9249309474ddcdf5e9ce0f80b23532"); + assertEquals(payData.getSignature(), "602f76d9cadf36c232f7f6c1faa5fe295b0f955d188049997d0df699c0619c86"); + + JsonObject jsonObject = WxMaGsonBuilder.create().fromJson(payData.toJson(), JsonObject.class); + assertEquals(jsonObject.get("mode").getAsString(), WxMaConstants.XPayPaymentMode.GOODS); + assertEquals(jsonObject.get("paySig").getAsString(), payData.getPaySig()); + assertEquals(jsonObject.get("signature").getAsString(), payData.getSignature()); + assertEquals(jsonObject.get("signData").getAsString(), payData.getSignData()); + } + + @Test + public void testCreatePayDataByService() { + WxMaXPayRequestVirtualPaymentRequest request = WxMaXPayRequestVirtualPaymentRequest.builder() + .offerId("1450019686") + .buyQuantity(1) + .env(0) + .currencyType(WxMaConstants.XPayCurrencyType.CNY) + .productId("product_001") + .goodsPrice(100) + .outTradeNo("order12345") + .attach("attach中文") + .build(); + WxMaXPaySigParams sigParams = WxMaXPaySigParams.builder() + .appKey("app_key_123") + .sessionKey("session_key_123") + .build(); + + WxMaXPayRequestVirtualPaymentData payData = new WxMaXPayServiceImpl(mock(WxMaService.class)) + .createRequestVirtualPaymentData(request, sigParams); + + assertEquals(payData.getMode(), WxMaConstants.XPayPaymentMode.GOODS); + assertEquals(payData.getPaySig(), "52b0abda3c933b0273d328b5c5102ee9ab9249309474ddcdf5e9ce0f80b23532"); + assertEquals(payData.getSignature(), "602f76d9cadf36c232f7f6c1faa5fe295b0f955d188049997d0df699c0619c86"); + } +}