baolei 7 mesiacov pred
rodič
commit
bd912e3127
100 zmenil súbory, kde vykonal 3022 pridanie a 805 odobranie
  1. 5 0
      08.src/Xingxi/.idea/misc.xml
  2. 1 6
      08.src/Xingxi/pom.xml
  3. 1 1
      08.src/Xingxi/xingxi-common/src/main/java/com/xingxi/common/enums/EYesNo.java
  4. 1 1
      08.src/Xingxi/xingxi-common/src/main/java/com/xingxi/common/exception/BusinessException.java
  5. 1 1
      08.src/Xingxi/xingxi-common/src/main/java/com/xingxi/common/mq/bo/invoice/InvoiceBO.java
  6. 1 1
      08.src/Xingxi/xingxi-common/src/main/java/com/xingxi/common/mq/bo/order/OrderBO.java
  7. 1 1
      08.src/Xingxi/xingxi-common/src/main/java/com/xingxi/common/mq/bo/order/OrderCanceledBO.java
  8. 1 1
      08.src/Xingxi/xingxi-common/src/main/java/com/xingxi/common/mq/bo/order/OrderDetailBO.java
  9. 1 1
      08.src/Xingxi/xingxi-common/src/main/java/com/xingxi/common/mq/bo/order/OrderFinishedBO.java
  10. 1 1
      08.src/Xingxi/xingxi-common/src/main/java/com/xingxi/common/mq/bo/order/OrderReturnedBO.java
  11. 1 1
      08.src/Xingxi/xingxi-common/src/main/java/com/xingxi/common/mq/constant/InvoiceMqKey.java
  12. 1 1
      08.src/Xingxi/xingxi-common/src/main/java/com/xingxi/common/mq/core/AbstractRabbit.java
  13. 1 1
      08.src/Xingxi/xingxi-common/src/main/java/com/xingxi/common/mq/core/AbstractRabbitConsumer.java
  14. 1 1
      08.src/Xingxi/xingxi-common/src/main/java/com/xingxi/common/mq/core/AbstractRabbitPublisher.java
  15. 1 1
      08.src/Xingxi/xingxi-common/src/main/java/com/xingxi/common/mq/publisher/invoice/InvoiceApplyMqPublisher.java
  16. 1 1
      08.src/Xingxi/xingxi-common/src/main/java/com/xingxi/common/mq/publisher/order/OrderCanceledMqPublisher.java
  17. 1 1
      08.src/Xingxi/xingxi-common/src/main/java/com/xingxi/common/mq/publisher/order/OrderCreatedMqPublisher.java
  18. 1 1
      08.src/Xingxi/xingxi-common/src/main/java/com/xingxi/common/mq/publisher/order/OrderDeliveredMqPublisher.java
  19. 1 1
      08.src/Xingxi/xingxi-common/src/main/java/com/xingxi/common/mq/publisher/order/OrderDeliveryCanceledMqPublisher.java
  20. 1 1
      08.src/Xingxi/xingxi-common/src/main/java/com/xingxi/common/mq/publisher/order/OrderFinishedMqPublisher.java
  21. 1 1
      08.src/Xingxi/xingxi-common/src/main/java/com/xingxi/common/mq/publisher/order/OrderPayedMqPublisher.java
  22. 1 1
      08.src/Xingxi/xingxi-common/src/main/java/com/xingxi/common/mq/publisher/order/OrderReturnedMqPublisher.java
  23. 1 1
      08.src/Xingxi/xingxi-common/src/main/java/com/xingxi/common/mq/publisher/order/OrderUnPaidMqPublisher.java
  24. 5 5
      08.src/Xingxi/xingxi-miniprogram-api/pom.xml
  25. 0 735
      08.src/Xingxi/xingxi-miniprogram-api/src/main/java/com/xingxi/api/common/ImageUtils.java
  26. 1 1
      08.src/Xingxi/xingxi-miniprogram-api/src/main/java/com/xingxi/api/configuration/RequestResultWrapperResponseAdvice.java
  27. 3 4
      08.src/Xingxi/xingxi-miniprogram-api/src/main/java/com/xingxi/api/controller/OrderApiController.java
  28. 1 1
      08.src/Xingxi/xingxi-miniprogram-api/src/main/java/com/xingxi/api/service/impl/OrderApiServiceImpl.java
  29. 15 16
      08.src/Xingxi/xingxi-miniprogram-api/src/main/resources/application-local.yml
  30. 2 2
      08.src/Xingxi/xingxi-miniprogram-api/src/main/resources/application-release.yml
  31. 1 1
      08.src/Xingxi/xingxi-miniprogram-api/src/main/resources/application-test.yml
  32. 1 1
      08.src/Xingxi/xingxi-miniprogram-api/src/main/resources/logback-local.xml
  33. 2 2
      08.src/Xingxi/xingxi-miniprogram-api/src/main/resources/logback-release.xml
  34. 2 2
      08.src/Xingxi/xingxi-miniprogram-api/src/main/resources/logback-test.xml
  35. 1 1
      08.src/Xingxi/xingxi-mq-server/pom.xml
  36. 1 1
      08.src/Xingxi/xingxi-mq-server/src/main/java/com/xingxi/mq/config/RabbitMqConfig.java
  37. 2 2
      08.src/Xingxi/xingxi-mq-server/src/main/resources/logback-local.xml
  38. 2 2
      08.src/Xingxi/xingxi-mq-server/src/main/resources/logback-release.xml
  39. 2 2
      08.src/Xingxi/xingxi-mq-server/src/main/resources/logback-test.xml
  40. 33 0
      08.src/Xingxi/xingxi-pay-utils/.gitignore
  41. 9 0
      08.src/Xingxi/xingxi-pay-utils/.gitmodules
  42. 22 0
      08.src/Xingxi/xingxi-pay-utils/pom.xml
  43. 33 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/.gitignore
  44. BIN
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/.mvn/wrapper/maven-wrapper.jar
  45. 2 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/.mvn/wrapper/maven-wrapper.properties
  46. 1 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/README.md
  47. 316 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/mvnw
  48. 188 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/mvnw.cmd
  49. 66 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/pom.xml
  50. 18 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BaseBiandanUnifiedpayRequest.java
  51. 11 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BaseBiandanUnifiedpayResponse.java
  52. 22 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayAddProfitsharingReceiversRequest.java
  53. 14 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayAddProfitsharingReceiversResponse.java
  54. 24 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayCallbackRequest.java
  55. 4 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayCallbackResponse.java
  56. 20 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayContinue2payRequest.java
  57. 12 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayContinue2payResponse.java
  58. 810 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayCreateSubMchApplyRequest.java
  59. 12 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayCreateSubMchApplyResponse.java
  60. 21 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayDelProfitsharingReceiversRequest.java
  61. 4 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayDelProfitsharingReceiversResponse.java
  62. 24 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayFinishProfitSharingRequest.java
  63. 14 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayFinishProfitSharingResponse.java
  64. 27 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayOrderRequest.java
  65. 18 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayOrderResponse.java
  66. 21 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayProfitSharingOrdersUnSplitAmountRequest.java
  67. 14 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayProfitSharingOrdersUnSplitAmountResponse.java
  68. 34 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayProfitSharingRequest.java
  69. 8 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayProfitSharingResponse.java
  70. 21 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayQueryApplyStatusRequest.java
  71. 307 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayQueryApplyStatusResponse.java
  72. 22 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayQueryOrderRequest.java
  73. 21 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayQueryOrderResponse.java
  74. 22 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayQueryProfitSharingRequest.java
  75. 47 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayQueryProfitSharingResponse.java
  76. 21 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayQueryRefundRequest.java
  77. 16 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayQueryRefundResponse.java
  78. 23 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayQuerySubMchCurrBalanceRequest.java
  79. 13 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayQuerySubMchCurrBalanceResponse.java
  80. 22 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayQuerySubWithdrawRequest.java
  81. 12 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayQuerySubWithdrawResponse.java
  82. 13 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayRedpackRequest.java
  83. 4 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayRedpackResponse.java
  84. 25 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayRefundRequest.java
  85. 18 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayRefundResponse.java
  86. 23 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpaySubWithdrawRequest.java
  87. 16 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpaySubWithdrawResponse.java
  88. 63 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/configuration/RegisterMissingBeanPostProcessor.java
  89. 61 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/configuration/XingxiUnifiedpayConfiguration.java
  90. 13 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/configuration/XingxiUnifiedpayProperties.java
  91. 70 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/configuration/XingxiUnifiedpayWxPayProperties.java
  92. 13 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/domain/MercUnifiedpayConfigDTO.java
  93. 97 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/domain/MercUnifiedpayDTO.java
  94. 33 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/domain/XingxiUnifiedPaymentInfoDTO.java
  95. 18 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/domain/XingxiUnifiedpayCallbackResultDTO.java
  96. 43 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/open/WXPayCallbackEndpoint.java
  97. 8 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/open/XingxiUnifiedpayCallbackServiceI.java
  98. 11 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/open/XingxiUnifiedpayServiceI.java
  99. 69 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/open/XingxiUnifiedpayServiceImpl.java
  100. 7 0
      08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/repository/XingxiUnifiedpayRepository.java

+ 5 - 0
08.src/Xingxi/.idea/misc.xml

@@ -7,6 +7,11 @@
         <option value="$PROJECT_DIR$/pom.xml" />
       </list>
     </option>
+    <option name="ignoredFiles">
+      <set>
+        <option value="$PROJECT_DIR$/xingxi-pay-utils/xingxi-common-utils/pom.xml" />
+      </set>
+    </option>
   </component>
   <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
 </project>

+ 1 - 6
08.src/Xingxi/pom.xml

@@ -39,7 +39,6 @@
         <logback.version>1.2.13</logback.version>
         <spring-framework.version>5.3.39</spring-framework.version>
         <oss-client.version>3.10.2</oss-client.version>
-        <wechatpay.version>4.5.6.B</wechatpay.version>
     </properties>
 
     <!-- 依赖声明 -->
@@ -256,11 +255,6 @@
                 <artifactId>aliyun-sdk-oss</artifactId>
                 <version>${oss-client.version}</version>
             </dependency>
-            <dependency>
-                <groupId>com.github.binarywang</groupId>
-                <artifactId>wx-java-pay-spring-boot-starter</artifactId>
-                <version>${wechatpay.version}</version>
-            </dependency>
         </dependencies>
     </dependencyManagement>
 
@@ -269,6 +263,7 @@
         <module>xingxi-system</module>
         <module>xingxi-framework</module>
         <module>xingxi-mq-server</module>
+        <module>xingxi-pay-utils</module>
         <module>xingxi-admin</module>
         <module>xingxi-miniprogram-api</module>
         <module>xingxi-quartz</module>

+ 1 - 1
08.src/Xingxi/xingxi-common/src/main/java/com/xingxi/common/enums/EYesNo.java

@@ -4,7 +4,7 @@ import lombok.AllArgsConstructor;
 import lombok.Getter;
 
 /**
- * @program: biandan
+ * @program: xingxi
  * @description: 是否标志
  * @author: bao
  * @create: 2022-02-14

+ 1 - 1
08.src/Xingxi/xingxi-common/src/main/java/com/xingxi/common/exception/BusinessException.java

@@ -3,7 +3,7 @@ package com.xingxi.common.exception;
 /**
  * 业务异常
  *
- * @author biandan
+ * @author xingxi
  */
 public class BusinessException extends RuntimeException {
     private static final long serialVersionUID = 1L;

+ 1 - 1
08.src/Xingxi/xingxi-common/src/main/java/com/xingxi/common/mq/bo/invoice/InvoiceBO.java

@@ -10,7 +10,7 @@ import java.util.Date;
 /**
  * 发票信息对象
  * 
- * @author biandan
+ * @author xingxi
  * @date 2022-02-17
  */
 @Data

+ 1 - 1
08.src/Xingxi/xingxi-common/src/main/java/com/xingxi/common/mq/bo/order/OrderBO.java

@@ -8,7 +8,7 @@ import java.util.Date;
 
 /**
  * @ClassName OrderBO
- * @projectName biandan
+ * @projectName xingxi
  * @Description
  * @Author FZ.Dong
  * @Date 2020/9/16 17:02

+ 1 - 1
08.src/Xingxi/xingxi-common/src/main/java/com/xingxi/common/mq/bo/order/OrderCanceledBO.java

@@ -5,7 +5,7 @@ import lombok.ToString;
 
 /**
  * @ClassName OrderCanceledBO
- * @projectName biandan
+ * @projectName xingxi
  * @Deacription
  * @Author FZ.Dong
  * @Date 2020/9/18 16:15

+ 1 - 1
08.src/Xingxi/xingxi-common/src/main/java/com/xingxi/common/mq/bo/order/OrderDetailBO.java

@@ -8,7 +8,7 @@ import java.util.Date;
 
 /**
  * @ClassName OrderDetailBO
- * @projectName biandan
+ * @projectName xingxi
  * @Deacription
  * @Author FZ.Dong
  * @Date 2020/9/16 17:03

+ 1 - 1
08.src/Xingxi/xingxi-common/src/main/java/com/xingxi/common/mq/bo/order/OrderFinishedBO.java

@@ -5,7 +5,7 @@ import lombok.ToString;
 
 /**
  * @ClassName OrderSettledBO
- * @projectName biandan
+ * @projectName xingxi
  * @Deacription
  * @Author FZ.Dong
  * @Date 2020/9/17 10:17

+ 1 - 1
08.src/Xingxi/xingxi-common/src/main/java/com/xingxi/common/mq/bo/order/OrderReturnedBO.java

@@ -7,7 +7,7 @@ import java.math.BigDecimal;
 
 /**
  * @ClassName OrderReturnBO
- * @projectName biandan
+ * @projectName xingxi
  * @Deacription
  * @Author FZ.Dong
  * @Date 2020/9/17 10:50

+ 1 - 1
08.src/Xingxi/xingxi-common/src/main/java/com/xingxi/common/mq/constant/InvoiceMqKey.java

@@ -2,7 +2,7 @@ package com.xingxi.common.mq.constant;
 
 /**
  * @ClassName InvoiceMqKey
- * @projectName biandan
+ * @projectName xingxi
  * @Deacription
  * @Author FZ.Dong
  * @Date 2020/11/4 13:38

+ 1 - 1
08.src/Xingxi/xingxi-common/src/main/java/com/xingxi/common/mq/core/AbstractRabbit.java

@@ -16,7 +16,7 @@ import java.util.Map;
 
 /**
  * @ClassName BaseRabbit
- * @projectName biandan
+ * @projectName xingxi
  * @Deacription
  * @Author FZ.Dong
  * @Date 2020/9/15 14:52

+ 1 - 1
08.src/Xingxi/xingxi-common/src/main/java/com/xingxi/common/mq/core/AbstractRabbitConsumer.java

@@ -12,7 +12,7 @@ import static java.nio.charset.StandardCharsets.UTF_8;
 
 /**
  * @ClassName BaseMessageReceiver
- * @projectName biandan
+ * @projectName xingxi
  * @Deacription // TODO
  * @Author FZ.Dong
  * @Date 2020/9/15 15:24

+ 1 - 1
08.src/Xingxi/xingxi-common/src/main/java/com/xingxi/common/mq/core/AbstractRabbitPublisher.java

@@ -14,7 +14,7 @@ import static java.nio.charset.StandardCharsets.UTF_8;
 
 /**
  * @ClassName AbstractRabbitPublisher
- * @projectName biandan
+ * @projectName xingxi
  * @Deacription
  * @Author FZ.Dong
  * @Date 2020/9/16 11:39

+ 1 - 1
08.src/Xingxi/xingxi-common/src/main/java/com/xingxi/common/mq/publisher/invoice/InvoiceApplyMqPublisher.java

@@ -7,7 +7,7 @@ import org.springframework.stereotype.Component;
 
 /**
  * @ClassName InvoiceApplyMqPublisher
- * @projectName biandan
+ * @projectName Xingxi
  * @Deacription
  * @Author FZ.Dong
  * @Date 2022/11/4 13:27

+ 1 - 1
08.src/Xingxi/xingxi-common/src/main/java/com/xingxi/common/mq/publisher/order/OrderCanceledMqPublisher.java

@@ -11,7 +11,7 @@ import java.util.List;
 
 /**
  * @ClassName OrderCanceledMqPublisher
- * @projectName biandan
+ * @projectName Xingxi
  * @Deacription
  * @Author FZ.Dong
  * @Date 2020/9/18 16:20

+ 1 - 1
08.src/Xingxi/xingxi-common/src/main/java/com/xingxi/common/mq/publisher/order/OrderCreatedMqPublisher.java

@@ -9,7 +9,7 @@ import org.springframework.stereotype.Component;
 
 /**
  * @ClassName OrderCreatedMqPublisher
- * @projectName biandan
+ * @projectName Xingxi
  * @Deacription 生成订单推送
  * @Author FZ.Dong
  * @Date 2020/9/15 16:32

+ 1 - 1
08.src/Xingxi/xingxi-common/src/main/java/com/xingxi/common/mq/publisher/order/OrderDeliveredMqPublisher.java

@@ -9,7 +9,7 @@ import org.springframework.stereotype.Component;
 
 /**
  * @ClassName OrderDeliveredMqPublisher
- * @projectName biandan
+ * @projectName Xingxi
  * @Deacription 订单发货后发送消息
  * @Author FZ.Dong
  * @Date 2020/9/15 16:32

+ 1 - 1
08.src/Xingxi/xingxi-common/src/main/java/com/xingxi/common/mq/publisher/order/OrderDeliveryCanceledMqPublisher.java

@@ -9,7 +9,7 @@ import org.springframework.stereotype.Component;
 
 /**
  * @ClassName OrderDeliveryCanceledMqPublisher
- * @projectName biandan
+ * @projectName Xingxi
  * @Deacription 支付完成订单推送
  * @Author FZ.Dong
  * @Date 2020/9/15 16:32

+ 1 - 1
08.src/Xingxi/xingxi-common/src/main/java/com/xingxi/common/mq/publisher/order/OrderFinishedMqPublisher.java

@@ -9,7 +9,7 @@ import org.springframework.stereotype.Component;
 
 /**
  * @ClassName OrderFinishedMqPublisher
- * @projectName biandan
+ * @projectName Xingxi
  * @Deacription
  * @Author FZ.Dong
  * @Date 2020/9/17 10:54

+ 1 - 1
08.src/Xingxi/xingxi-common/src/main/java/com/xingxi/common/mq/publisher/order/OrderPayedMqPublisher.java

@@ -9,7 +9,7 @@ import org.springframework.stereotype.Component;
 
 /**
  * @ClassName OrderPayedMqPublisher
- * @projectName biandan
+ * @projectName Xingxi
  * @Deacription 支付完成订单推送
  * @Author FZ.Dong
  * @Date 2020/9/15 16:32

+ 1 - 1
08.src/Xingxi/xingxi-common/src/main/java/com/xingxi/common/mq/publisher/order/OrderReturnedMqPublisher.java

@@ -11,7 +11,7 @@ import java.util.List;
 
 /**
  * @ClassName OrderReturnedMqPublisher
- * @projectName biandan
+ * @projectName Xingxi
  * @Deacription 支付完成订单推送
  * @Author FZ.Dong
  * @Date 2020/9/15 16:32

+ 1 - 1
08.src/Xingxi/xingxi-common/src/main/java/com/xingxi/common/mq/publisher/order/OrderUnPaidMqPublisher.java

@@ -9,7 +9,7 @@ import org.springframework.stereotype.Component;
 
 /**
  * @ClassName OrderUnPaidMqPublisher
- * @projectName biandan
+ * @projectName Xingxi
  * @Deacription 订单支付未完成推送
  * @Author FZ.Dong
  * @Date 2020/9/15 16:32

+ 5 - 5
08.src/Xingxi/xingxi-miniprogram-api/pom.xml

@@ -16,6 +16,11 @@
     <dependencies>
         <dependency>
             <groupId>com.xingxi</groupId>
+            <artifactId>xingxi-unifiedpay-spring-boot-starter</artifactId>
+            <version>0.0.1-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>com.xingxi</groupId>
             <artifactId>xingxi-system</artifactId>
         </dependency>
         <dependency>
@@ -105,11 +110,6 @@
             <version>4.6.0</version>
         </dependency>
         <dependency>
-            <groupId>com.github.binarywang</groupId>
-            <artifactId>wx-java-pay-spring-boot-starter</artifactId>
-            <version>4.5.6.B</version>
-        </dependency>
-        <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-configuration-processor</artifactId>
             <optional>true</optional>

+ 0 - 735
08.src/Xingxi/xingxi-miniprogram-api/src/main/java/com/xingxi/api/common/ImageUtils.java

@@ -1,735 +0,0 @@
-package com.xingxi.api.common;
-
-import com.jhlabs.image.*;
-import net.coobird.thumbnailator.Thumbnails;
-import org.apache.commons.lang3.StringUtils;
-import sun.font.FontDesignMetrics;
-
-import javax.imageio.ImageIO;
-import java.awt.*;
-import java.awt.geom.AffineTransform;
-import java.awt.image.AffineTransformOp;
-import java.awt.image.BufferedImage;
-import java.io.ByteArrayInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.util.List;
-import java.util.*;
-
-/**
- * ImageUtil 图像处理工具类
- *
- * @author : jinqiwen
- * @Date : 2014-1-2 下午9:13:21
- * @Description : 图像处理工具类
- * @Version : 1.0.0
- */
-public final class ImageUtils {
-    public static final String IMAGE_SUFFIX_PNG = ".png";
-    public static final String SEPARATRIX_COMMA = ",";
-    public static final String COLOR_STRING_REPLACE_TEXT = "rgb()";
-
-    private ImageUtils() {
-    }
-
-
-    public static BufferedImage base64StringToBufferedImage(String base64String) {
-
-        int index = base64String.indexOf(",");
-        // have Data URI Scheme
-        if (index >= 0) {
-            base64String = base64String.substring(index + 1);
-        }
-
-        try {
-            return ImageIO.read(new ByteArrayInputStream(base64String.getBytes()));
-        } catch (IOException e) {
-            e.printStackTrace();
-            throw new RuntimeException(e);
-        }
-
-    }
-
-    public static BufferedImage createBufferedImage(int width, int height) {
-        return new BufferedImage(width, height, 1);
-    }
-
-    public static BufferedImage createTransparencyBufferedImage(int width, int height) {
-        BufferedImage bufferedImage = createBufferedImage(width, height);
-        Graphics2D graphics2D = bufferedImage.createGraphics();
-        bufferedImage = graphics2D.getDeviceConfiguration().createCompatibleImage(width, height, 3);
-        graphics2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
-        graphics2D.dispose();
-        return bufferedImage;
-    }
-
-    public static BufferedImage createBufferedImage(int width, int height, Color color) {
-        BufferedImage bufferedImage = createBufferedImage(width, height);
-        Graphics2D graphics2D = bufferedImage.createGraphics();
-        graphics2D.setColor(color);
-        graphics2D.fillRect(0, 0, width, height);
-        graphics2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
-        graphics2D.dispose();
-        return bufferedImage;
-    }
-
-
-    public static void makeImageFile(BufferedImage inputImage, String outputImage) {
-        try {
-            Thumbnails.of(inputImage)
-                    .size(inputImage.getWidth(), inputImage.getHeight())
-                    .outputQuality(1f)
-                    .toFile(outputImage);
-        } catch (IOException ex) {
-            throw new RuntimeException(ex);
-        }
-    }
-
-    public static void makeImageFile(BufferedImage inputImage, BufferedImage waterImage, String outputImage) {
-        try {
-            Thumbnails.of(inputImage).watermark(waterImage, 0.8f).size(1000, 1000).outputQuality(1f).toFile(outputImage);
-        } catch (IOException ex) {
-            throw new RuntimeException(ex);
-        }
-    }
-
-    private static int getWordWidth(Font font, String content){
-        FontMetrics fontMetrics = FontDesignMetrics.getMetrics(font);
-        int w = 0;
-        for (int i = 0; i < content.length(); i++) {
-            w += fontMetrics.charWidth(content.charAt(i));
-        }
-
-        return w;
-    }
-
-    public static BufferedImage drawString(
-            List<String> contents, Color color,
-            Font font, int width, int height, int gap) {
-
-//        BufferedImage bufferedImage = createTransparencyBufferedImage(width, height);
-        BufferedImage bufferedImage = createBufferedImage(width, height, Color.BLUE);
-        GraphicsEnvironment localGraphicsEnvironment = GraphicsEnvironment.getLocalGraphicsEnvironment();
-        localGraphicsEnvironment.registerFont(font);
-        Graphics2D graphics = localGraphicsEnvironment.createGraphics(bufferedImage);
-        graphics.setColor(color);
-        graphics.setFont(font);
-        int y = graphics.getFontMetrics().getAscent();
-        int height1 = graphics.getFontMetrics().getHeight();
-        int descent = graphics.getFontMetrics().getDescent();
-//        int y = (height  / 2) + graphics.getFontMetrics().getAscent();
-//        y = y;
-        int size = contents.size();
-        for (int i = 0; i < size; i++) {
-            String content = contents.get(i);
-            int wordWidth = getWordWidth(font, content);
-            if (i == 0) {
-                graphics.drawString(content, (width-wordWidth) / 2, y + descent);
-            } else {
-                graphics.drawString(content, (width-wordWidth) / 2, (y + descent)*i + height1 + gap);
-            }
-        }
-
-        graphics.dispose();
-
-        return bufferedImage;
-    }
-
-
-    public static BufferedImage waterMark2(String content, Color foreColor, Font font) {
-
-        FontMetrics fontMetrics = FontDesignMetrics.getMetrics(font);
-        int width = fontMetrics.stringWidth(content);
-        int height = fontMetrics.getHeight();
-
-        BufferedImage bufferedImage = createTransparencyBufferedImage(width, height);
-        GraphicsEnvironment localGraphicsEnvironment = GraphicsEnvironment.getLocalGraphicsEnvironment();
-        localGraphicsEnvironment.registerFont(font);
-        Graphics2D graphics = localGraphicsEnvironment.createGraphics(bufferedImage);
-        graphics.setColor(foreColor);
-        graphics.setFont(font);
-        graphics.drawString(content, 0, fontMetrics.getAscent());
-        graphics.dispose();
-
-        return bufferedImage;
-    }
-
-    public static BufferedImage waterMark(String content, Color foreColor, Font font) {
-
-        FontMetrics fm = FontDesignMetrics.getMetrics(font);
-        int width = fm.stringWidth(content);
-        int height = fm.getHeight();
-
-
-        BufferedImage outputImage = createTransparencyBufferedImage(width, height);
-        Graphics2D g = outputImage.createGraphics();
-        g.setColor(foreColor);
-        g.setFont(font);
-        g.drawString(content, 0, fm.getAscent());
-        g.dispose();
-
-        return outputImage;
-    }
-
-    //生成分享图片
-//    public static void makeShareImg(String bgImagePath,
-//                                    String qrCodePath,
-//                                    String outPath,
-//                                    String name,
-//                                    String rmb, String shopname, String merchantLogoPath, String shareDesc, Color shopColor, String backShare) {
-//        //底图
-//        BufferedImage bi = read(backShare);
-//
-//        //效果图
-//        BufferedImage backBi = read(bgImagePath);
-//        backBi = resize(backBi, 375, 375);
-//        bi = addImage(bi, backBi, 0, 67);
-//
-//        //LOGO图
-//        if (org.apache.commons.lang3.StringUtils.isNotBlank(merchantLogoPath)) {
-//            BufferedImage logoBi = read(merchantLogoPath);
-//            try {
-////                logoBi = Thumbnails.of(logoBi).size(100,40).asBufferedImage();
-//                logoBi = Thumbnails.of(logoBi).width(55).height(55).asBufferedImage();
-//            } catch (IOException e) {
-//                logoBi = resize(logoBi, 55, 55);
-//            }
-//            bi = addImage(bi, logoBi, 10, 10);
-//        }
-//
-//        //二维码
-//        BufferedImage qrCodeBi = read(qrCodePath);
-//        qrCodeBi = resize(qrCodeBi, 100, 100);
-//        bi = addImage(bi, qrCodeBi, 265, 490);
-//
-////        Font font = new Font("宋体", Font.PLAIN, 20);
-//        //商铺名称
-//        BufferedImage shopnameBi = waterMark(shopname, Color.BLACK, new Font("宋体", Font.BOLD, 22));
-//        bi = addImage(bi, shopnameBi, 90, 15);
-//
-//        //商铺分享口号
-//        if (org.apache.commons.lang3.StringUtils.isNotBlank(shareDesc)) {
-//            BufferedImage shareDescBi = waterMark(shareDesc, Color.BLACK, new Font("宋体", Font.ITALIC, 14));
-//            bi = addImage(bi, shareDescBi, 90, 42);
-//        }
-//        //商品名称
-//        BufferedImage nameBi = waterMark(name, Color.BLACK, new Font("宋体", Font.PLAIN, 20));
-//        bi = addImage(bi, nameBi, 30, 500);
-//        //价格
-//        BufferedImage rmbBi = waterMark("RMB: " + rmb, Color.BLACK, new Font("宋体", Font.PLAIN, 20));
-//        bi = addImage(bi, rmbBi, 30, 530);
-//
-//        //主题色块
-//        BufferedImage biblock = create(20, 75, shopColor);
-//        bi = addImage(bi, biblock, 0, 480);
-//
-//        makeImageFile(bi, outPath);
-//    }
-
-
-    public static void base64Str2Image(String filePath, String str) {
-        FileOutputStream fos = null;
-        try {
-            fos = new FileOutputStream(filePath);
-            byte[] bytes = Base64.getDecoder().decode(str);
-            fos.write(bytes);
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        } finally {
-            if (fos != null) {
-                try {
-                    fos.close();
-                } catch (IOException e) {
-                }
-            }
-        }
-    }
-
-//    public static BufferedImage read(String sourceFile) {
-//
-//        InputStream is = null;
-//        BufferedImage bi;
-//        try {
-//            URL url = new URL(sourceFile);
-//            bi = ImageIO.read(url);
-//        } catch (Exception ex) {
-//            if (ex instanceof MalformedURLException) {
-//                try {
-//                    is = Files.newInputStream(Paths.get(sourceFile));
-//                    bi = ImageIO.read(is);
-//                } catch (IOException e) {
-//                    throw new RuntimeException(e);
-//                } finally {
-//                    if (is != null) {
-//                        try {
-//                            is.close();
-//                        } catch (IOException e) {
-//                        }
-//                    }
-//                }
-//            } else {
-//                throw new RuntimeException(ex);
-//            }
-//        }
-//
-//        return bi;
-//    }
-
-
-    public static BufferedImage gray(BufferedImage image) {
-
-        int width = image.getWidth();
-        int height = image.getHeight();
-
-        BufferedImage grayImage = new BufferedImage(width, height, BufferedImage.TYPE_BYTE_GRAY);
-        for (int i = 0; i < width; i++) {
-            for (int j = 0; j < height; j++) {
-                int rgb = image.getRGB(i, j);
-                grayImage.setRGB(i, j, rgb);
-            }
-        }
-
-        return grayImage;
-    }
-
-    public static BufferedImage embossEdge(BufferedImage image) throws IOException {
-
-        BufferedImage dst = null;
-
-        //加亮
-        AbstractBufferedImageOp exposure = new ExposureFilter();
-        dst = exposure.filter(image, dst);
-
-        //压花
-        AbstractBufferedImageOp gray = new EmbossFilter();
-        dst = gray.filter(image, dst);
-
-
-        return dst;
-    }
-
-
-    public static BufferedImage print(BufferedImage source) {
-        System.out.println("print");
-        return source;
-    }
-
-
-    public static BufferedImage embroid(BufferedImage source) {
-        System.out.println("embroid");
-        try {
-            return embossEdge(source);
-        } catch (IOException e) {
-            e.printStackTrace();
-            throw new RuntimeException(e);
-        }
-    }
-
-
-    public static BufferedImage laser(BufferedImage source) {
-        System.out.println("laser");
-        try {
-            return lineEdge(source);
-        } catch (IOException e) {
-            e.printStackTrace();
-            throw new RuntimeException(e);
-        }
-    }
-
-
-    public static BufferedImage lineEdge(BufferedImage image) throws IOException {
-
-
-        /*
-        JHLABS
-         */
-        BufferedImage dst = null;
-//        //加亮
-//        AbstractBufferedImageOp exposure = new ExposureFilter();
-//        dst = exposure.filter(image,dst);
-
-        //灰度
-        AbstractBufferedImageOp gray = new GrayscaleFilter();
-        dst = gray.filter(image, dst);
-
-        //中值
-        AbstractBufferedImageOp median = new MedianFilter();
-        dst = median.filter(dst, dst);
-
-        //边缘
-        AbstractBufferedImageOp edge = new EdgeFilter();
-        dst = edge.filter(dst, dst);
-
-        AbstractBufferedImageOp invert = new InvertFilter();
-        dst = invert.filter(dst, dst);
-
-        AbstractBufferedImageOp threshold = new ThresholdFilter(235);
-        dst = threshold.filter(dst, dst);
-//
-//        StampFilter sf = new StampFilter();
-//        sf.setRadius(1f);
-//        sf.setSoftness(0f);
-//        AbstractBufferedImageOp bbf2 = sf;
-//        dst = bbf2.filter(dst, dst);
-        return dst;
-
-//        //将Mat转BufferedImage
-//        MatOfByte mob = new MatOfByte();
-//        Imgcodecs.imencode(".jpg", dstImage, mob);
-//        // convert the "matrix of bytes" into a byte array
-//        byte[] byteArray = mob.toArray();
-//        InputStream in = new ByteArrayInputStream(byteArray);
-//        return ImageIO.read(in);
-    }
-
-    public static String randomImgName() {
-        return UUID.randomUUID() + IMAGE_SUFFIX_PNG;
-    }
-
-
-    public static Color getColor(String colorStr) {
-        Color color = null;
-        if (colorStr != null && !colorStr.isEmpty()) {
-            colorStr = StringUtils.strip(colorStr, COLOR_STRING_REPLACE_TEXT);
-            String[] rgbs = colorStr.split(SEPARATRIX_COMMA);
-            color = new Color(
-                    Integer.parseInt(rgbs[0]),
-                    Integer.parseInt(rgbs[1]),
-                    Integer.parseInt(rgbs[2])
-            );
-        }
-        return color;
-    }
-
-    /*
-        6位数字字符串转颜色
-     */
-    public static Color strToColor(String colorStr) {
-        colorStr = colorStr.replace("#", "");
-        int i = Integer.parseInt(colorStr, 16);
-        return new Color(i);
-    }
-
-//    /**
-//     * opencv 检测图片亮度
-//     * brightnessException 计算并返回一幅图像的色偏度以及,色偏方向
-//     * cast 计算出的偏差值,小于1表示比较正常,大于1表示存在亮度异常;当cast异常时,da大于0表示过亮,da小于0表示过暗
-//     * 返回值通过cast、da两个引用返回,无显式返回值
-//     */
-//    public static Integer brightnessException (Mat srcImage) {
-//        Mat dstImage = new Mat();
-//        // 将RGB图转为灰度图
-//        Imgproc.cvtColor(srcImage,dstImage, Imgproc.COLOR_BGR2GRAY);
-//        float a=0;
-//        int[] Hist = new int[256];
-//        for(int i=0;i<256;i++) {
-//            Hist[i] = 0;
-//        }
-//        for(int i=0;i<dstImage.rows();i++)
-//        {
-//            for(int j=0;j<dstImage.cols();j++)
-//            {
-//                //在计算过程中,考虑128为亮度均值点
-//                a+=(float)(dstImage.get(i,j)[0]-128);
-//                int x=(int)dstImage.get(i,j)[0];
-//                Hist[x]++;
-//            }
-//        }
-//        float da =  a/(float)(dstImage.rows()*dstImage.cols());
-//        System.out.println(da);
-//        float D =Math.abs(da);
-//        float Ma=0;
-//        for(int i=0;i<256;i++)
-//        {
-//            Ma+=Math.abs(i-128-da)*Hist[i];
-//        }
-//        Ma/=(float)((dstImage.rows()*dstImage.cols()));
-//        float M=Math.abs(Ma);
-//        float K=D/M;
-//        float cast = K;
-//        System.out.printf("亮度指数: %f\n",cast);
-//        if(cast>=1) {
-//            System.out.printf("亮度:"+da);
-//            if(da > 0) {
-//                System.out.printf("过亮\n");
-//                return 2;
-//            } else {
-//                System.out.printf("过暗\n");
-//                return 1;
-//            }
-//        } else {
-//            System.out.printf("亮度:正常\n");
-//            return 0;
-//        }
-//    }
-
-    /**
-     * @param inputImage 源图缓存
-     * @param addImage   叠加的图片
-     * @param x          叠加图片的位置-x
-     * @param y          叠加图片的位置-y
-     * @MethodName : processImageWithAddImage
-     * @Description : 对缓存的图形进行缩放
-     */
-    public static BufferedImage addImage(BufferedImage inputImage, BufferedImage addImage, int x, int y) {
-        /* 原始图像的宽度和高度 */
-        int width = inputImage.getWidth();
-        int height = inputImage.getHeight();
-
-        //定义一个临时BufferedImage对象,用于保存缩放后的位图
-        BufferedImage outputImage = createTransparencyBufferedImage(width, height);
-        // 获取Graphics2D画布
-        Graphics2D g2d = outputImage.createGraphics();
-
-        // 添加原图到画布
-        g2d.drawImage(inputImage, 0, 0, null);
-        g2d = outputImage.createGraphics();
-        // 添加原图到画布
-        g2d.drawImage(addImage, x, y, null);
-        g2d = outputImage.createGraphics();
-
-        // 释放对象
-        g2d.dispose();
-
-        return outputImage;
-    }
-
-
-
-
-    public static BufferedImage resized(BufferedImage inputImage) {
-        return resized(inputImage, 300, 300);
-    }
-
-    public static BufferedImage resized(BufferedImage inputImage, int width, int height) {
-        try {
-            inputImage = Thumbnails.of(inputImage).size(width, height).outputQuality(1f).asBufferedImage();
-        } catch (IOException ex) {
-            throw new RuntimeException(ex);
-        }
-        return inputImage;
-    }
-
-
-    public static BufferedImage resize(BufferedImage inputImage, float scale) {
-
-        int width = inputImage.getWidth();
-        int height = inputImage.getHeight();
-
-        int resizedWidth = (int) (width * scale);
-        int resizedHeight = (int) (height * scale);
-
-        return resize(inputImage, resizedWidth, resizedHeight);
-    }
-
-    public static BufferedImage resize(BufferedImage inputImage, int width, int height) {
-
-        Image resizedImage = inputImage.getScaledInstance(width, height, Image.SCALE_SMOOTH);
-        BufferedImage newImage = createTransparencyBufferedImage(width, height);
-        Graphics2D g = newImage.createGraphics();
-        g.drawImage(resizedImage, 0, 0, width, height, null);
-        g.dispose();
-
-        return newImage;
-    }
-
-    /**
-     * @param inputImage 源图文件
-     * @param degree     旋转角度
-     * @return 旋转后图像
-     * @MethodName : processImageWithSpin
-     * @Description : 对缓存的图形进行旋转
-     */
-    public static BufferedImage rotate(BufferedImage inputImage, double degree) {
-        int swidth = 0; // 旋转后的宽度
-        int sheight = 0; // 旋转后的高度
-        int x; // 原点横坐标
-        int y; // 原点纵坐标
-
-        // 处理角度--确定旋转弧度
-        degree = degree % 360;
-        // 将角度转换到0-360度之间
-        if (degree < 0) {
-            degree = 360 + degree;
-        }
-
-        // 将角度转为弧度
-        double theta = Math.toRadians(degree);
-
-        // 确定旋转后的宽和高
-        if (degree == 180 || degree == 0 || degree == 360) {
-            swidth = inputImage.getWidth();
-            sheight = inputImage.getHeight();
-        } else if (degree == 90 || degree == 270) {
-            sheight = inputImage.getWidth();
-            swidth = inputImage.getHeight();
-        } else {
-            swidth = (int) (Math.sqrt(inputImage.getWidth() * inputImage.getWidth()
-                    + inputImage.getHeight() * inputImage.getHeight()));
-            sheight = (int) (Math.sqrt(inputImage.getWidth() * inputImage.getWidth()
-                    + inputImage.getHeight() * inputImage.getHeight()));
-        }
-
-        // 确定原点坐标
-        x = (swidth / 2) - (inputImage.getWidth() / 2);
-        y = (sheight / 2) - (inputImage.getHeight() / 2);
-
-        BufferedImage spinImage = new BufferedImage(swidth, sheight, inputImage.getType());
-
-        AffineTransform at = new AffineTransform();
-        // 旋转图象
-        at.rotate(theta, swidth >> 1, sheight >> 1);
-        at.translate(x, y);
-        AffineTransformOp op = new AffineTransformOp(at, AffineTransformOp.TYPE_BICUBIC);
-        spinImage = op.filter(inputImage, spinImage);
-
-        return spinImage;
-    }
-
-
-    /**
-     * @param inputImage 源图缓存
-     * @param x          移动后坐标-x
-     * @param y          移动后坐标-y
-     * @MethodName : processImageWithMove
-     * @Description : 对缓存的图形进行移动
-     */
-    public static BufferedImage move(BufferedImage inputImage, int x, int y) {
-        // 获取原始图像的宽度和高度
-        int width = inputImage.getWidth();
-        int height = inputImage.getHeight();
-
-        //定义一个临时BufferedImage对象,用于保存移动后的位图
-        BufferedImage outputImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
-        // 获取Graphics2D画布
-        Graphics2D g2d = outputImage.createGraphics();
-        // 增加下面代码使得背景透明
-        outputImage = g2d.getDeviceConfiguration().createCompatibleImage(width, height, Transparency.TRANSLUCENT);
-        // 添加图像到画布
-        g2d = outputImage.createGraphics();
-        g2d.drawImage(inputImage, x, y, null);
-
-        // 释放对象
-        g2d.dispose();
-
-        return outputImage;
-    }
-
-
-
-    public static BufferedImage test(List<String> words, Font font, Color fontColor, int heightSpace){
-
-        Optional<String> max = words.stream().max(Comparator.comparing(String::length));
-        String maxString = max.get(); // 文字的最大长度
-        int lineCount = words.size(); // 行数
-
-        FontMetrics fm = FontDesignMetrics.getMetrics(font);
-
-        int startX = 0; // x
-        int startY = fm.getAscent(); // y
-//        int heightSpace = 100; // 行间距
-        int descent = fm.getDescent();
-        int leading = fm.getLeading();
-        int baseline = 30;
-
-
-        int maxWidth = fm.stringWidth(maxString);  // 最大宽度
-        int textHeight = fm.getHeight(); // 文字高度
-
-        heightSpace = textHeight / 2 * heightSpace + descent;
-        int maxHeight =  lineCount * textHeight + (lineCount - 1 + heightSpace);
-
-//        BufferedImage bufferedImage = createBufferedImage(maxWidth, maxHeight, Color.BLUE);
-        BufferedImage bufferedImage = createTransparencyBufferedImage(maxWidth, maxHeight);
-        GraphicsEnvironment localGraphicsEnvironment = GraphicsEnvironment.getLocalGraphicsEnvironment();
-        localGraphicsEnvironment.registerFont(font);
-        Graphics2D graphics = localGraphicsEnvironment.createGraphics(bufferedImage);
-        graphics.setFont(font);
-        graphics.setColor(fontColor);
-
-        for (int i = 0; i < lineCount; i++) {
-            String s = words.get(i);
-            graphics.drawString(s, startX, startY + i * (textHeight / 2  + heightSpace));
-        }
-
-        graphics.dispose();
-
-
-
-        return bufferedImage;
-    }
-
-
-    public static void main(String[] args) throws Exception {
-
-//
-//        // 设置测试用图片的名字
-//        String fileName = "1.png";
-//        // 设置测试用的目录
-//        String inputPath = "D:/测试用图片/";
-//        // 设置测试用的输出目录
-//        String outputPath = "D:/测试用图片/convert/";
-//        // 设置目标打印宽度,根据设置的宽度来计算缩放倍数
-//        float printWidth = 1500;
-//
-//
-//        read("https://test.njnet.vip/public/img/custom/20190408/result-front-NEM0q25Cp9c7.png");
-//
-////
-////        saveWebImg("https://test.njnet.vip/public/images/picUpload/platform/20190403/20190403111904010.png",
-////                "d:/test.png");
-//
-//        // 设置输入文件
-//        File inputImage = new File(inputPath + fileName);
-//        // 设置输出文件
-//
-//        String nweImagePath = outputPath + "new_" + fileName;
-//        File outputImage = new File(outputPath + "new_" + fileName);
-//        // 读取输入的图片文件
-//        ImageIcon oImageIcon = new ImageIcon(inputPath + fileName);
-//        // 获取原始图像的宽度和高度
-//        int oWidth = oImageIcon.getIconWidth();
-//        // 计算缩放比例
-//        float scaleSize = printWidth / oWidth;
-//        // 读取源图
-//        BufferedImage tProcessImage = ImageIO.read(inputImage);
-//        // 进行缩放
-//        tProcessImage = resize(tProcessImage, scaleSize);
-//        // 进行旋转
-//        tProcessImage = rotate(tProcessImage, 0);
-//        // 叠加图片
-//        BufferedImage tAddImage = ImageIO.read(new File(inputPath + "transformer.jpg"));
-//
-//        tAddImage = resize(tAddImage, 1);
-//
-//        tProcessImage = addImage(tProcessImage, tAddImage, 100, 100);
-//        // 添加文字
-//        BufferedImage tStringImage = null;
-////        tProcessImage = processImageWithWaterMark(tProcessImage, 750, 750, "第一个大大的水印", Color.MAGENTA, new Font("微软雅黑", Font.PLAIN, 150), 90);
-////        tProcessImage = processImageWithWaterMark(tProcessImage, 0, 200, "第二个大大的水印", Color.MAGENTA, new Font("宋体", Font.PLAIN, 150), 0);
-////        tStringImage = processImageWithWaterMark(tProcessImage, 750, 250, "第一个大大的水印", Color.MAGENTA, new Font("微软雅黑", Font.PLAIN, 150), 0);
-//        tStringImage = resize(tStringImage, 300, 400);
-//        tProcessImage = addImage(tProcessImage, tStringImage, 100, 100);![](../../../../../../../../../../../../../../../App/test.png)
-//        // 进行移动
-//        tProcessImage = move(tProcessImage, 0, 0);
-//
-//        makeImageFile(tProcessImage, nweImagePath);
-
-//        long start = System.currentTimeMillis();
-//        ImageIO.read(new URL("https://test.njnet.vip/public/img/custom/20190408/result-front-NEM0q25Cp9c7.png"));
-//        long end  = System.currentTimeMillis();
-//        System.out.println("convert finish:"+ (end - start)+"ms");
-
-//        BufferedImage transparencyBufferedImage = createTransparencyBufferedImage(100, 100);
-//        makeImageFile(transparencyBufferedImage, "c:/app/test.png");
-//
-
-        List<String> list = new ArrayList<String>(){{
-            add("你好");
-            add("厉害");
-        }};
-        Font font = new Font("宋体", Font.PLAIN, 30);
-
-        makeImageFile(test(list, font, Color.black, 20), "D:/test.png");
-    }
-}

+ 1 - 1
08.src/Xingxi/xingxi-miniprogram-api/src/main/java/com/xingxi/api/configuration/RequestResultWrapperResponseAdvice.java

@@ -20,7 +20,7 @@ import javax.servlet.http.HttpServletRequest;
 
 
 @Slf4j
-@ControllerAdvice("cn.com.xingxi.biandan.store.controller")
+@ControllerAdvice("com.xingxi.store.controller")
 @RequiredArgsConstructor
 class RequestResultWrapperResponseAdvice implements ResponseBodyAdvice<Object> {
     private final ObjectMapper objectMapper;

+ 3 - 4
08.src/Xingxi/xingxi-miniprogram-api/src/main/java/com/xingxi/api/controller/OrderApiController.java

@@ -1,7 +1,7 @@
 package com.xingxi.api.controller;
 
 import com.fasterxml.jackson.databind.ObjectMapper;
-import com.github.binarywang.wxpay.bean.notify.WxPayNotifyV3Result;
+import com.github.binarywang.wxpay.bean.notify.WxPayOrderNotifyV3Result;
 import com.github.binarywang.wxpay.service.WxPayService;
 import com.xingxi.api.common.BaseApiController;
 import com.xingxi.api.model.OrderCreateRequest;
@@ -28,7 +28,6 @@ import org.springframework.web.bind.annotation.RestController;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.validation.Valid;
-import java.nio.charset.Charset;
 import java.nio.charset.StandardCharsets;
 import java.util.Date;
 import java.util.HashMap;
@@ -67,8 +66,8 @@ public class OrderApiController extends BaseApiController {
 
         try {
             String notifyData = StreamUtils.copyToString(request.getInputStream(), StandardCharsets.UTF_8);
-            WxPayNotifyV3Result rV3Result = wxPayService.parseOrderNotifyV3Result(notifyData, null);
-            WxPayNotifyV3Result.DecryptNotifyResult result = rV3Result.getResult();
+            WxPayOrderNotifyV3Result rV3Result = wxPayService.parseOrderNotifyV3Result(notifyData, null);
+            WxPayOrderNotifyV3Result.DecryptNotifyResult result = rV3Result.getResult();
             String outTradeNo = result.getOutTradeNo();
 
             // 通过outTradeNo查找paymentInfo

+ 1 - 1
08.src/Xingxi/xingxi-miniprogram-api/src/main/java/com/xingxi/api/service/impl/OrderApiServiceImpl.java

@@ -95,7 +95,7 @@ class OrderApiServiceImpl implements OrderServiceI {
 
     private final OrderCreatedMqPublisher createdMqPublisher;
 
-    @Value("${spring.application.biandan.unifiedpay.callbackUrl}")
+    @Value("${spring.application.xingxi.unifiedpay.callbackUrl}")
     private String notifyUrl;
 
     private WxPayConfig config;

+ 15 - 16
08.src/Xingxi/xingxi-miniprogram-api/src/main/resources/application-local.yml

@@ -3,13 +3,13 @@ server:
 
 spring:
   application:
-    biandan:
+    xingxi:
       unifiedpay:
         enabled: "true"
         callbackUrl: "https://managertest.gululuq.com/api/store/order/wxpay/callback"
         wxpay:
           enabled: "true"
-          app-id: "wxe53a2bd91cc5b4c2"
+          app-id: "wx12e34630814e5d30"
           mch-id: "1662657667"
           apiv3-key: "Xiangmai20231225Xiangmai20231225"
           cert-serial-no: 6BAA04DCBF80E735518219CC8BCD196BE039F713
@@ -21,7 +21,7 @@ spring:
       pathPattern: "/api/store/**"
       allowedMethods: "GET,POST"
       allowedHeaders: "authorization,x-requested-with,content-type"
-      allowedOrigins: "*,https://bdapi.njnet.co"
+      allowedOrigins: "*,https://mpapitest.gululuq.com"
   datasource:
     type: com.alibaba.druid.pool.DruidDataSource
     driver-class-name: com.mysql.cj.jdbc.Driver
@@ -81,19 +81,18 @@ logging:
     cn.com.xingxi.biandan: debug
     org.springframework: warn
     org.apache.http: info
-wx:
-  mp:
-    appid: "wx12e34630814e5d30"
-    secret: "fc06d584d8544a00f0ff9df65a30af02"
-#  pay:
-#    domain: http://managertest.gululuq.com
-#    appId: aaaaa
-#    mchId: 1658989336 #商户id
-#    apiV3Key: bbbbb #V3密钥
-#    certSerialNo: ccccc
-#    privateKeyPath: classpath:wxcert/apiclient_key.pem #apiclient_key.pem证书文件的绝对路径或者以classpath:开头的类路径
-#    privateCertPath: classpath:wxcert/apiclient_cert.pem #apiclient_cert.pem证书文件的绝对路径或者以classpath:开头的类路径
-#    notifyUrl: https://managertest.gululuq.com/api/store/order/wxpay/callback
 idworkcfg:
   workerId: "1"
   dataCenterId: "9"
+wx:
+  miniapp:
+    appid: "wx12e34630814e5d30"
+    secret: "fc06d584d8544a00f0ff9df65a30af02"
+  qrCode:
+    scene: "%s,%s"
+    page: "pages/logs/logs"
+    width: 420
+    checkPath: true
+    envVersion: release
+  pay:
+    enabled: "false"

+ 2 - 2
08.src/Xingxi/xingxi-miniprogram-api/src/main/resources/application-release.yml

@@ -3,13 +3,13 @@ server:
 
 spring:
   application:
-    biandan:
+    xingxi:
       unifiedpay:
         enabled: "true"
         callbackUrl: "https://ministore.ysyd.cloud/unifiedpay/%s/callback"
         wxpay:
           enabled: "true"
-          app-id: "wxe53a2bd91cc5b4c2"
+          app-id: "wx12e34630814e5d30"
           # 15141660511
           mch-id: "1662657667"
           apiv3-key: "Xiangmai20231225Xiangmai20231225"

+ 1 - 1
08.src/Xingxi/xingxi-miniprogram-api/src/main/resources/application-test.yml

@@ -3,7 +3,7 @@ server:
 
 spring:
   application:
-    biandan:
+    xingxi:
       unifiedpay:
         enabled: "true"
         callbackUrl: "https://mpapi.ysyd.cloud/unifiedpay/%s/callback"

+ 1 - 1
08.src/Xingxi/xingxi-miniprogram-api/src/main/resources/logback-local.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <configuration>
     <!-- 日志存放路径 -->
-	<property name="log.path" value="/home/appuser/server/dev/biandan-miniprogram-store-api/logs/" />
+	<property name="log.path" value="/home/appuser/server/dev/xingxi-miniprogram-store-api/logs/" />
     <!-- 日志输出格式 -->
 	<property name="log.pattern" value="%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
 

+ 2 - 2
08.src/Xingxi/xingxi-miniprogram-api/src/main/resources/logback-release.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <configuration>
     <!-- 日志存放路径 -->
-	<property name="log.path" value="/home/appuser/server/biandan-miniprogram-store-api/logs/" />
+	<property name="log.path" value="/home/appuser/server/xingxi-miniprogram-store-api/logs/" />
     <!-- 日志输出格式 -->
 	<property name="log.pattern" value="%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
 
@@ -72,7 +72,7 @@
     </appender>
 	
 	<!-- 系统模块日志级别控制  -->
-	<logger name="com.biandan" level="info" />
+	<logger name="com.xingxi" level="info" />
 	<!-- Spring日志级别控制  -->
 	<logger name="org.springframework" level="warn" />
 

+ 2 - 2
08.src/Xingxi/xingxi-miniprogram-api/src/main/resources/logback-test.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <configuration>
     <!-- 日志存放路径 -->
-	<property name="log.path" value="/home/appuser/server/biandan-miniprogram-store-api/logs/" />
+	<property name="log.path" value="/home/appuser/server/xingxi-miniprogram-store-api/logs/" />
     <!-- 日志输出格式 -->
 	<property name="log.pattern" value="%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
 
@@ -72,7 +72,7 @@
     </appender>
 	
 	<!-- 系统模块日志级别控制  -->
-	<logger name="com.biandan" level="info" />
+	<logger name="com.xingxi" level="info" />
 	<!-- Spring日志级别控制  -->
 	<logger name="org.springframework" level="warn" />
 

+ 1 - 1
08.src/Xingxi/xingxi-mq-server/pom.xml

@@ -164,7 +164,7 @@
 <!--                            <addClasspath>true</addClasspath>-->
 <!--                            <classpathPrefix>lib/</classpathPrefix>-->
 <!--                            <useUniqueVersions>false</useUniqueVersions>-->
-<!--                            <mainClass>cn.com.wingxi.xingxi.BiandanMqServerApplication</mainClass>-->
+<!--                            <mainClass>com.xingxi.BiandanMqServerApplication</mainClass>-->
 <!--                        </manifest>-->
 <!--                        <manifestEntries>-->
 <!--                            <Class-Path>lib/kp-1.0.jar</Class-Path>-->

+ 1 - 1
08.src/Xingxi/xingxi-mq-server/src/main/java/com/xingxi/mq/config/RabbitMqConfig.java

@@ -9,7 +9,7 @@ import org.springframework.context.annotation.Configuration;
 
 /**
  * @ClassName RabbitMqConfig
- * @projectName biandan
+ * @projectName Xingxi
  * @Deacription // TODO
  * @Author FZ.Dong
  * @Date 2020/9/16 13:48

+ 2 - 2
08.src/Xingxi/xingxi-mq-server/src/main/resources/logback-local.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <configuration>
     <!-- 日志存放路径 -->
-	<property name="log.path" value="/home/appuser/server/biandan-mq-server/logs/" />
+	<property name="log.path" value="/home/appuser/server/xingxi-mq-server/logs/" />
     <!-- 日志输出格式 -->
 	<property name="log.pattern" value="%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
 
@@ -72,7 +72,7 @@
     </appender>
 	
 	<!-- 系统模块日志级别控制  -->
-	<logger name="com.biandan" level="info" />
+	<logger name="com.xingxi" level="info" />
 	<!-- Spring日志级别控制  -->
 	<logger name="org.springframework" level="warn" />
 

+ 2 - 2
08.src/Xingxi/xingxi-mq-server/src/main/resources/logback-release.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <configuration>
     <!-- 日志存放路径 -->
-	<property name="log.path" value="/home/appuser/server/biandan-mq-server/logs/" />
+	<property name="log.path" value="/home/appuser/server/xingxi-mq-server/logs/" />
     <!-- 日志输出格式 -->
 	<property name="log.pattern" value="%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
 
@@ -72,7 +72,7 @@
     </appender>
 	
 	<!-- 系统模块日志级别控制  -->
-	<logger name="com.biandan" level="info" />
+	<logger name="com.xingxi" level="info" />
 	<!-- Spring日志级别控制  -->
 	<logger name="org.springframework" level="warn" />
 

+ 2 - 2
08.src/Xingxi/xingxi-mq-server/src/main/resources/logback-test.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <configuration>
     <!-- 日志存放路径 -->
-	<property name="log.path" value="/home/appuser/server/biandan-mq-server/logs/" />
+	<property name="log.path" value="/home/appuser/server/xingxi-mq-server/logs/" />
     <!-- 日志输出格式 -->
 	<property name="log.pattern" value="%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
 
@@ -72,7 +72,7 @@
     </appender>
 	
 	<!-- 系统模块日志级别控制  -->
-	<logger name="com.biandan" level="info" />
+	<logger name="com.xingxi" level="info" />
 	<!-- Spring日志级别控制  -->
 	<logger name="org.springframework" level="warn" />
 

+ 33 - 0
08.src/Xingxi/xingxi-pay-utils/.gitignore

@@ -0,0 +1,33 @@
+HELP.md
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/

+ 9 - 0
08.src/Xingxi/xingxi-pay-utils/.gitmodules

@@ -0,0 +1,9 @@
+[submodule "biandan-open-api"]
+	path = biandan-open-api
+	url = https://gogs.njnet.vip/Biandan-Ver-2.0/biandan-open-api.git
+[submodule "biandan-common-utils"]
+	path = biandan-common-utils
+	url = https://gogs.njnet.vip/Biandan-Ver-2.0/biandan-common-utils.git
+[submodule "biandan-unifiedpay-spring-boot-starter"]
+	path = biandan-unifiedpay-spring-boot-starter
+	url = https://gogs.njnet.vip/Biandan-Ver-2.0/biandan-unifiedpay-spring-boot-starter.git

+ 22 - 0
08.src/Xingxi/xingxi-pay-utils/pom.xml

@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>com.xingxi</groupId>
+        <artifactId>xingxi</artifactId>
+        <version>4.7.9</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <name>xingxi-pay-utils</name>
+    <artifactId>xingxi-pay-utils</artifactId>
+    <version>0.0.1-SNAPSHOT</version>
+    <packaging>pom</packaging>
+    <description>xingxi-pay-utils</description>
+
+    <modules>
+        <module>xingxi-unifiedpay-spring-boot-starter</module>
+    </modules>
+</project>

+ 33 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/.gitignore

@@ -0,0 +1,33 @@
+HELP.md
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/

BIN
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/.mvn/wrapper/maven-wrapper.jar


+ 2 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/.mvn/wrapper/maven-wrapper.properties

@@ -0,0 +1,2 @@
+distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.4/apache-maven-3.8.4-bin.zip
+wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar

+ 1 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/README.md

@@ -0,0 +1 @@
+biandan-unifiedpay-spring-boot-starter

+ 316 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/mvnw

@@ -0,0 +1,316 @@
+#!/bin/sh
+# ----------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#    https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# ----------------------------------------------------------------------------
+
+# ----------------------------------------------------------------------------
+# Maven Start Up Batch script
+#
+# Required ENV vars:
+# ------------------
+#   JAVA_HOME - location of a JDK home dir
+#
+# Optional ENV vars
+# -----------------
+#   M2_HOME - location of maven2's installed home dir
+#   MAVEN_OPTS - parameters passed to the Java VM when running Maven
+#     e.g. to debug Maven itself, use
+#       set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+#   MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+# ----------------------------------------------------------------------------
+
+if [ -z "$MAVEN_SKIP_RC" ] ; then
+
+  if [ -f /usr/local/etc/mavenrc ] ; then
+    . /usr/local/etc/mavenrc
+  fi
+
+  if [ -f /etc/mavenrc ] ; then
+    . /etc/mavenrc
+  fi
+
+  if [ -f "$HOME/.mavenrc" ] ; then
+    . "$HOME/.mavenrc"
+  fi
+
+fi
+
+# OS specific support.  $var _must_ be set to either true or false.
+cygwin=false;
+darwin=false;
+mingw=false
+case "`uname`" in
+  CYGWIN*) cygwin=true ;;
+  MINGW*) mingw=true;;
+  Darwin*) darwin=true
+    # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
+    # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
+    if [ -z "$JAVA_HOME" ]; then
+      if [ -x "/usr/libexec/java_home" ]; then
+        export JAVA_HOME="`/usr/libexec/java_home`"
+      else
+        export JAVA_HOME="/Library/Java/Home"
+      fi
+    fi
+    ;;
+esac
+
+if [ -z "$JAVA_HOME" ] ; then
+  if [ -r /etc/gentoo-release ] ; then
+    JAVA_HOME=`java-config --jre-home`
+  fi
+fi
+
+if [ -z "$M2_HOME" ] ; then
+  ## resolve links - $0 may be a link to maven's home
+  PRG="$0"
+
+  # need this for relative symlinks
+  while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+      PRG="$link"
+    else
+      PRG="`dirname "$PRG"`/$link"
+    fi
+  done
+
+  saveddir=`pwd`
+
+  M2_HOME=`dirname "$PRG"`/..
+
+  # make it fully qualified
+  M2_HOME=`cd "$M2_HOME" && pwd`
+
+  cd "$saveddir"
+  # echo Using m2 at $M2_HOME
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin ; then
+  [ -n "$M2_HOME" ] &&
+    M2_HOME=`cygpath --unix "$M2_HOME"`
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+  [ -n "$CLASSPATH" ] &&
+    CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
+fi
+
+# For Mingw, ensure paths are in UNIX format before anything is touched
+if $mingw ; then
+  [ -n "$M2_HOME" ] &&
+    M2_HOME="`(cd "$M2_HOME"; pwd)`"
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
+fi
+
+if [ -z "$JAVA_HOME" ]; then
+  javaExecutable="`which javac`"
+  if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
+    # readlink(1) is not available as standard on Solaris 10.
+    readLink=`which readlink`
+    if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
+      if $darwin ; then
+        javaHome="`dirname \"$javaExecutable\"`"
+        javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
+      else
+        javaExecutable="`readlink -f \"$javaExecutable\"`"
+      fi
+      javaHome="`dirname \"$javaExecutable\"`"
+      javaHome=`expr "$javaHome" : '\(.*\)/bin'`
+      JAVA_HOME="$javaHome"
+      export JAVA_HOME
+    fi
+  fi
+fi
+
+if [ -z "$JAVACMD" ] ; then
+  if [ -n "$JAVA_HOME"  ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+      # IBM's JDK on AIX uses strange locations for the executables
+      JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+      JAVACMD="$JAVA_HOME/bin/java"
+    fi
+  else
+    JAVACMD="`\\unset -f command; \\command -v java`"
+  fi
+fi
+
+if [ ! -x "$JAVACMD" ] ; then
+  echo "Error: JAVA_HOME is not defined correctly." >&2
+  echo "  We cannot execute $JAVACMD" >&2
+  exit 1
+fi
+
+if [ -z "$JAVA_HOME" ] ; then
+  echo "Warning: JAVA_HOME environment variable is not set."
+fi
+
+CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
+
+# traverses directory structure from process work directory to filesystem root
+# first directory with .mvn subdirectory is considered project base directory
+find_maven_basedir() {
+
+  if [ -z "$1" ]
+  then
+    echo "Path not specified to find_maven_basedir"
+    return 1
+  fi
+
+  basedir="$1"
+  wdir="$1"
+  while [ "$wdir" != '/' ] ; do
+    if [ -d "$wdir"/.mvn ] ; then
+      basedir=$wdir
+      break
+    fi
+    # workaround for JBEAP-8937 (on Solaris 10/Sparc)
+    if [ -d "${wdir}" ]; then
+      wdir=`cd "$wdir/.."; pwd`
+    fi
+    # end of workaround
+  done
+  echo "${basedir}"
+}
+
+# concatenates all lines of a file
+concat_lines() {
+  if [ -f "$1" ]; then
+    echo "$(tr -s '\n' ' ' < "$1")"
+  fi
+}
+
+BASE_DIR=`find_maven_basedir "$(pwd)"`
+if [ -z "$BASE_DIR" ]; then
+  exit 1;
+fi
+
+##########################################################################################
+# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+# This allows using the maven wrapper in projects that prohibit checking in binary data.
+##########################################################################################
+if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
+    if [ "$MVNW_VERBOSE" = true ]; then
+      echo "Found .mvn/wrapper/maven-wrapper.jar"
+    fi
+else
+    if [ "$MVNW_VERBOSE" = true ]; then
+      echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
+    fi
+    if [ -n "$MVNW_REPOURL" ]; then
+      jarUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
+    else
+      jarUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
+    fi
+    while IFS="=" read key value; do
+      case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
+      esac
+    done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
+    if [ "$MVNW_VERBOSE" = true ]; then
+      echo "Downloading from: $jarUrl"
+    fi
+    wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
+    if $cygwin; then
+      wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"`
+    fi
+
+    if command -v wget > /dev/null; then
+        if [ "$MVNW_VERBOSE" = true ]; then
+          echo "Found wget ... using wget"
+        fi
+        if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+            wget "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
+        else
+            wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
+        fi
+    elif command -v curl > /dev/null; then
+        if [ "$MVNW_VERBOSE" = true ]; then
+          echo "Found curl ... using curl"
+        fi
+        if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+            curl -o "$wrapperJarPath" "$jarUrl" -f
+        else
+            curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
+        fi
+
+    else
+        if [ "$MVNW_VERBOSE" = true ]; then
+          echo "Falling back to using Java to download"
+        fi
+        javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
+        # For Cygwin, switch paths to Windows format before running javac
+        if $cygwin; then
+          javaClass=`cygpath --path --windows "$javaClass"`
+        fi
+        if [ -e "$javaClass" ]; then
+            if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+                if [ "$MVNW_VERBOSE" = true ]; then
+                  echo " - Compiling MavenWrapperDownloader.java ..."
+                fi
+                # Compiling the Java class
+                ("$JAVA_HOME/bin/javac" "$javaClass")
+            fi
+            if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+                # Running the downloader
+                if [ "$MVNW_VERBOSE" = true ]; then
+                  echo " - Running MavenWrapperDownloader.java ..."
+                fi
+                ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
+            fi
+        fi
+    fi
+fi
+##########################################################################################
+# End of extension
+##########################################################################################
+
+export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
+if [ "$MVNW_VERBOSE" = true ]; then
+  echo $MAVEN_PROJECTBASEDIR
+fi
+MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+  [ -n "$M2_HOME" ] &&
+    M2_HOME=`cygpath --path --windows "$M2_HOME"`
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
+  [ -n "$CLASSPATH" ] &&
+    CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
+  [ -n "$MAVEN_PROJECTBASEDIR" ] &&
+    MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
+fi
+
+# Provide a "standardized" way to retrieve the CLI args that will
+# work with both Windows and non-Windows executions.
+MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
+export MAVEN_CMD_LINE_ARGS
+
+WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+exec "$JAVACMD" \
+  $MAVEN_OPTS \
+  $MAVEN_DEBUG_OPTS \
+  -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
+  "-Dmaven.home=${M2_HOME}" \
+  "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
+  ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"

+ 188 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/mvnw.cmd

@@ -0,0 +1,188 @@
+@REM ----------------------------------------------------------------------------
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements.  See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership.  The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License.  You may obtain a copy of the License at
+@REM
+@REM    https://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing,
+@REM software distributed under the License is distributed on an
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@REM KIND, either express or implied.  See the License for the
+@REM specific language governing permissions and limitations
+@REM under the License.
+@REM ----------------------------------------------------------------------------
+
+@REM ----------------------------------------------------------------------------
+@REM Maven Start Up Batch script
+@REM
+@REM Required ENV vars:
+@REM JAVA_HOME - location of a JDK home dir
+@REM
+@REM Optional ENV vars
+@REM M2_HOME - location of maven2's installed home dir
+@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
+@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
+@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
+@REM     e.g. to debug Maven itself, use
+@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+@REM ----------------------------------------------------------------------------
+
+@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
+@echo off
+@REM set title of command window
+title %0
+@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
+@if "%MAVEN_BATCH_ECHO%" == "on"  echo %MAVEN_BATCH_ECHO%
+
+@REM set %HOME% to equivalent of $HOME
+if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
+
+@REM Execute a user defined script before this one
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
+@REM check for pre script, once with legacy .bat ending and once with .cmd ending
+if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %*
+if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %*
+:skipRcPre
+
+@setlocal
+
+set ERROR_CODE=0
+
+@REM To isolate internal variables from possible post scripts, we use another setlocal
+@setlocal
+
+@REM ==== START VALIDATION ====
+if not "%JAVA_HOME%" == "" goto OkJHome
+
+echo.
+echo Error: JAVA_HOME not found in your environment. >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+:OkJHome
+if exist "%JAVA_HOME%\bin\java.exe" goto init
+
+echo.
+echo Error: JAVA_HOME is set to an invalid directory. >&2
+echo JAVA_HOME = "%JAVA_HOME%" >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+@REM ==== END VALIDATION ====
+
+:init
+
+@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
+@REM Fallback to current working directory if not found.
+
+set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
+IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
+
+set EXEC_DIR=%CD%
+set WDIR=%EXEC_DIR%
+:findBaseDir
+IF EXIST "%WDIR%"\.mvn goto baseDirFound
+cd ..
+IF "%WDIR%"=="%CD%" goto baseDirNotFound
+set WDIR=%CD%
+goto findBaseDir
+
+:baseDirFound
+set MAVEN_PROJECTBASEDIR=%WDIR%
+cd "%EXEC_DIR%"
+goto endDetectBaseDir
+
+:baseDirNotFound
+set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
+cd "%EXEC_DIR%"
+
+:endDetectBaseDir
+
+IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
+
+@setlocal EnableExtensions EnableDelayedExpansion
+for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
+@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
+
+:endReadAdditionalConfig
+
+SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
+set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
+set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
+
+FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
+    IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
+)
+
+@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
+if exist %WRAPPER_JAR% (
+    if "%MVNW_VERBOSE%" == "true" (
+        echo Found %WRAPPER_JAR%
+    )
+) else (
+    if not "%MVNW_REPOURL%" == "" (
+        SET DOWNLOAD_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
+    )
+    if "%MVNW_VERBOSE%" == "true" (
+        echo Couldn't find %WRAPPER_JAR%, downloading it ...
+        echo Downloading from: %DOWNLOAD_URL%
+    )
+
+    powershell -Command "&{"^
+		"$webclient = new-object System.Net.WebClient;"^
+		"if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
+		"$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
+		"}"^
+		"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
+		"}"
+    if "%MVNW_VERBOSE%" == "true" (
+        echo Finished downloading %WRAPPER_JAR%
+    )
+)
+@REM End of extension
+
+@REM Provide a "standardized" way to retrieve the CLI args that will
+@REM work with both Windows and non-Windows executions.
+set MAVEN_CMD_LINE_ARGS=%*
+
+%MAVEN_JAVA_EXE% ^
+  %JVM_CONFIG_MAVEN_PROPS% ^
+  %MAVEN_OPTS% ^
+  %MAVEN_DEBUG_OPTS% ^
+  -classpath %WRAPPER_JAR% ^
+  "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^
+  %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
+if ERRORLEVEL 1 goto error
+goto end
+
+:error
+set ERROR_CODE=1
+
+:end
+@endlocal & set ERROR_CODE=%ERROR_CODE%
+
+if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost
+@REM check for post script, once with legacy .bat ending and once with .cmd ending
+if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat"
+if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd"
+:skipRcPost
+
+@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
+if "%MAVEN_BATCH_PAUSE%"=="on" pause
+
+if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE%
+
+cmd /C exit /B %ERROR_CODE%

+ 66 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/pom.xml

@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>com.xingxi</groupId>
+        <artifactId>xingxi-pay-utils</artifactId>
+        <version>0.0.1-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>xingxi-unifiedpay-spring-boot-starter</artifactId>
+    <version>0.0.1-SNAPSHOT</version>
+    <name>xingxi-unifiedpay-spring-boot-starter</name>
+    <description>xingxi-unifiedpay-spring-boot-starter</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.github.binarywang</groupId>
+            <artifactId>weixin-java-pay</artifactId>
+            <version>4.5.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.jodd</groupId>
+            <artifactId>jodd-util</artifactId>
+            <version>6.1.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-configuration-processor</artifactId>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.xingxi</groupId>
+            <artifactId>xingxi-system</artifactId>
+        </dependency>
+    </dependencies>
+
+    <repositories>
+        <repository>
+            <id>aliyunmaven</id>
+            <url>https://maven.aliyun.com/repository/public/</url>
+            <releases>
+                <enabled>true</enabled>
+            </releases>
+        </repository>
+    </repositories>
+</project>

+ 18 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BaseBiandanUnifiedpayRequest.java

@@ -0,0 +1,18 @@
+package com.xingxi.unifiedpay.bean;
+
+import lombok.Getter;
+import lombok.RequiredArgsConstructor;
+import lombok.Setter;
+
+@RequiredArgsConstructor
+public abstract class BaseBiandanUnifiedpayRequest<T extends BaseBiandanUnifiedpayResponse> {
+
+    @Getter
+    private final String callMethod;
+
+    @Getter
+    @Setter
+    private Long sellerId;
+
+    abstract public Class<T> getResponseClass();
+}

+ 11 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BaseBiandanUnifiedpayResponse.java

@@ -0,0 +1,11 @@
+package com.xingxi.unifiedpay.bean;
+
+import lombok.Getter;
+import lombok.Setter;
+
+@Getter
+@Setter
+public class BaseBiandanUnifiedpayResponse {
+
+    private Object originalResponseObj;
+}

+ 22 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayAddProfitsharingReceiversRequest.java

@@ -0,0 +1,22 @@
+package com.xingxi.unifiedpay.bean;
+
+
+import lombok.Getter;
+import lombok.Setter;
+
+@Getter
+@Setter
+public class BiandanUnifiedpayAddProfitsharingReceiversRequest extends BaseBiandanUnifiedpayRequest<BiandanUnifiedpayAddProfitsharingReceiversResponse> {
+
+    private String account;
+
+
+    public BiandanUnifiedpayAddProfitsharingReceiversRequest() {
+        super("addProfitsharingReceivers");
+    }
+
+    @Override
+    public Class<BiandanUnifiedpayAddProfitsharingReceiversResponse> getResponseClass() {
+        return null;
+    }
+}

+ 14 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayAddProfitsharingReceiversResponse.java

@@ -0,0 +1,14 @@
+package com.xingxi.unifiedpay.bean;
+
+
+import lombok.Getter;
+import lombok.Setter;
+
+@Getter
+@Setter
+public class BiandanUnifiedpayAddProfitsharingReceiversResponse extends BaseBiandanUnifiedpayResponse{
+
+    private String type;
+
+
+}

+ 24 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayCallbackRequest.java

@@ -0,0 +1,24 @@
+package com.xingxi.unifiedpay.bean;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.servlet.http.HttpServletRequest;
+
+
+@Getter
+@Setter
+public class BiandanUnifiedpayCallbackRequest extends BaseBiandanUnifiedpayRequest<BiandanUnifiedpayCallbackResponse>{
+
+
+    private HttpServletRequest httpServletRequest;
+
+    public BiandanUnifiedpayCallbackRequest() {
+        super("callback");
+    }
+
+    @Override
+    public Class<BiandanUnifiedpayCallbackResponse> getResponseClass() {
+        return BiandanUnifiedpayCallbackResponse.class;
+    }
+}

+ 4 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayCallbackResponse.java

@@ -0,0 +1,4 @@
+package com.xingxi.unifiedpay.bean;
+
+public class BiandanUnifiedpayCallbackResponse extends BaseBiandanUnifiedpayResponse{
+}

+ 20 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayContinue2payRequest.java

@@ -0,0 +1,20 @@
+package com.xingxi.unifiedpay.bean;
+
+import lombok.Getter;
+import lombok.Setter;
+
+@Getter
+@Setter
+public class BiandanUnifiedpayContinue2payRequest extends BaseBiandanUnifiedpayRequest<BiandanUnifiedpayContinue2payResponse>{
+
+    private String prepayId;
+
+    public BiandanUnifiedpayContinue2payRequest() {
+        super("continue2pay");
+    }
+
+    @Override
+    public Class<BiandanUnifiedpayContinue2payResponse> getResponseClass() {
+        return null;
+    }
+}

+ 12 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayContinue2payResponse.java

@@ -0,0 +1,12 @@
+package com.xingxi.unifiedpay.bean;
+
+import lombok.Getter;
+import lombok.Setter;
+
+
+@Getter
+@Setter
+public class BiandanUnifiedpayContinue2payResponse extends BaseBiandanUnifiedpayResponse{
+    private Object paySign;
+
+}

+ 810 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayCreateSubMchApplyRequest.java

@@ -0,0 +1,810 @@
+package com.xingxi.unifiedpay.bean;
+
+import lombok.Data;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+
+import java.io.Serializable;
+
+
+@Getter
+@Setter
+public class BiandanUnifiedpayCreateSubMchApplyRequest extends BaseBiandanUnifiedpayRequest<BiandanUnifiedpayCreateSubMchApplyResponse>{
+
+    /**
+     * <pre>
+     * 字段名:业务申请编号
+     * 变量名:out_request_no
+     * 是否必填:是
+     * 类型:string(124)
+     * 描述:
+     *  1、服务商自定义的商户唯一编号。
+     *  2、每个编号对应一个申请单,每个申请单审核通过后会生成一个微信支付商户号。
+     *  3、若申请单被驳回,可填写相同的“业务申请编号”,即可覆盖修改原申请单信息 。
+     *  示例值:APPLYMENT_00000000001
+     * </pre>
+     */
+    private String outRequestNo;
+
+    /**
+     * <pre>
+     * 字段名:主体类型
+     * 变量名:organization_type
+     * 是否必填:是
+     * 类型:string(4)
+     * 描述:
+     *  枚举值:
+     *  2401:小微商户,指无营业执照的商户。
+     *  4:个体工商户,营业执照上的主体类型一般为个体户、个体工商户、个体经营。
+     *  2:企业,营业执照上的主体类型一般为有限公司、有限责任公司。
+     *  3:党政、机关及事业单位,包括国内各级、各类政府机构、事业单位等(如:公安、党团、司法、交通、旅游、工商税务、市政、医疗、教育、学校等机构)。
+     *  1708:其他组织,不属于企业、政府/事业单位的组织机构(如社会团体、民办非企业、基金会),要求机构已办理组织机构代码证。
+     *  示例值:2401
+     * </pre>
+     */
+    private String organizationType;
+
+    /**
+     * <pre>
+     * 字段名:+营业执照/登记证书信息
+     * 变量名:business_license_info
+     * 是否必填:条件选填
+     * 类型:object
+     * 描述:
+     *  1、主体为“小微”时,不填。
+     *  2、主体为“个体工商户/企业”时,请上传营业执照。
+     *  3、主体为“党政、机关及事业单位/其他组织”时,请上传登记证书。
+     * </pre>
+     */
+    private BiandanUnifiedpayCreateSubMchApplyRequest.BusinessLicenseInfo businessLicenseInfo;
+
+    /**
+     * <pre>
+     * 字段名:+组织机构代码证信息
+     * 变量名:organization_cert_info
+     * 是否必填:条件选填
+     * 类型:object
+     * 描述:主体为企业/党政、机关及事业单位/其他组织,且证件号码不是18位时必填。
+     * </pre>
+     */
+    private BiandanUnifiedpayCreateSubMchApplyRequest.OrganizationCertInfo organizationCertInfo;
+
+    /**
+     * <pre>
+     * 字段名:经营者/法人证件类型
+     * 变量名:id_doc_type
+     * 是否必填:否
+     * 类型:string(64)
+     * 描述:
+     *  1、主体为“小微”,只可选择:身份证。
+     *  2、主体为“个体户/企业/党政、机关及事业单位/其他组织”,可选择:任一证件类型。
+     *  3、若没有填写,系统默认选择:身份证。
+     *  枚举值:
+     *  IDENTIFICATION_TYPE_MAINLAND_IDCARD:中国大陆居民-身份证
+     *  IDENTIFICATION_TYPE_OVERSEA_PASSPORT:其他国家或地区居民-护照
+     *  IDENTIFICATION_TYPE_HONGKONG:中国香港居民–来往内地通行证
+     *  IDENTIFICATION_TYPE_MACAO:中国澳门居民–来往内地通行证
+     *  IDENTIFICATION_TYPE_TAIWAN:中国台湾居民–来往大陆通行证
+     *  示例值:IDENTIFICATION_TYPE_MACAO
+     * </pre>
+     */
+    private String idDocType;
+
+    /**
+     * <pre>
+     * 字段名:+经营者/法人身份证信息
+     * 变量名:id_card_info
+     * 是否必填:条件选填
+     * 类型:object
+     * 描述:
+     *  请填写经营者/法人的身份证信息
+     *  证件类型为“身份证”时填写。
+     *
+     * </pre>
+     */
+
+    private BiandanUnifiedpayCreateSubMchApplyRequest.IdCardInfo idCardInfo;
+
+    /**
+     * <pre>
+     * 字段名:+经营者/法人其他类型证件信息
+     * 变量名:id_doc_info
+     * 是否必填:条件选填
+     * 类型:object
+     * 描述:证件类型为“来往内地通行证、来往大陆通行证、护照”时填写。
+     * </pre>
+     */
+
+    private BiandanUnifiedpayCreateSubMchApplyRequest.IdDocInfo idDocInfo;
+
+    /**
+     * <pre>
+     * 字段名:经营者/法人是否为受益人
+     * 变量名:owner
+     * 是否必填:条件选填
+     * 类型:bool
+     * 描述:主体类型为企业时,需要填写:1、若经营者/法人是最终受益人,则填写:true。2、若经营者/法人不是最终受益人,则填写:false。
+     * 示例值:true
+     * </pre>
+     */
+    private Boolean owner;
+
+    /**
+     * <pre>
+     * 字段名:是否填写结算账户信息
+     * 变量名:need_account_info
+     * 是否必填:是
+     * 类型:bool
+     * 描述:
+     *  可根据实际情况,填写“true”或“false”。
+     *  1、若为“true”,则需填写结算账户信息。
+     *  2、若为“false”,则无需填写结算账户信息。
+     *  示例值:true
+     * </pre>
+     */
+    private Boolean needAccountInfo;
+
+    /**
+     * <pre>
+     * 字段名:+结算账户信息
+     * 变量名:account_info
+     * 是否必填:条件选填
+     * 类型:object
+     * 描述:若"是否填写结算账户信息"填写为“true”, 则必填,填写为“false”不填 。
+     * </pre>
+     */
+    private BiandanUnifiedpayCreateSubMchApplyRequest.AccountInfo accountInfo;
+
+    /**
+     * <pre>
+     * 字段名:+超级管理员信息
+     * 变量名:contact_info
+     * 是否必填:是
+     * 类型:object
+     * 描述:
+     *  请填写店铺的超级管理员信息。
+     *  超级管理员需在开户后进行签约,并可接收日常重要管理信息和进行资金操作,请确定其为商户法定代表人或负责人。
+     * </pre>
+     */
+    private BiandanUnifiedpayCreateSubMchApplyRequest.ContactInfo contactInfo;
+
+    /**
+     * <pre>
+     * 字段名:+店铺信息
+     * 变量名:sales_scene_info
+     * 是否必填:是
+     * 类型:object
+     * 描述:请填写店铺信息
+     * </pre>
+     */
+    private BiandanUnifiedpayCreateSubMchApplyRequest.SalesSceneInfo salesSceneInfo;
+
+    /**
+     * <pre>
+     * 字段名:+结算规则
+     * 变量名:settlement_info
+     * 是否必填:否
+     * 类型:object
+     * 描述:请填写商家的结算费率规则、所属行业等信息。若电商平台未传入,系统将填写默认值
+     * </pre>
+     */
+    private BiandanUnifiedpayCreateSubMchApplyRequest.SettlementInfo settlementInfo;
+
+    /**
+     * <pre>
+     * 字段名:商户简称
+     * 变量名:merchant_shortname
+     * 是否必填:是
+     * 类型:string(64)
+     * 描述:
+     *  UTF-8格式,中文占3个字节,即最多16个汉字长度。将在支付完成页向买家展示,需与商家的实际售卖商品相符 。
+     *  示例值:腾讯
+     * </pre>
+     */
+    private String merchantShortname;
+
+    /**
+     * <pre>
+     * 字段名:特殊资质
+     * 变量名:qualifications
+     * 是否必填:否
+     * 类型:string(1024)
+     * 描述:
+     *  1、若店铺业务包含互联网售药,则需上传特殊资质-《互联网药品交易服务证》。
+     *  2、最多可上传5张照片,请填写通过图片上传接口预先上传图片生成好的MediaID 。
+     *  示例值:[\"jTpGmxUX3FBWVQ5NJInE4d2I6_H7I4\"]
+     * </pre>
+     */
+    private String qualifications;
+
+    /**
+     * <pre>
+     * 字段名:补充材料
+     * 变量名:business_addition_pics
+     * 是否必填:否
+     * 类型:string(1024)
+     * 描述:
+     *   最多可上传5张照片,请填写通过图片上传接口预先上传图片生成好的MediaID 。
+     *  示例值:[\"jTpGmg05InE4d2I6_H7I4\"]
+     * </pre>
+     */
+    private String businessAdditionPics;
+
+    /**
+     * <pre>
+     * 字段名:补充说明
+     * 变量名:business_addition_desc
+     * 是否必填:否
+     * 类型:string(256)
+     * 描述:
+     *   可填写512字以内 。
+     *  示例值:特殊情况,说明原因
+     * </pre>
+     */
+    private String businessAdditionDesc;
+
+    @Data
+    @NoArgsConstructor
+    public static class BusinessLicenseInfo implements Serializable {
+        /**
+         * <pre>
+         * 字段名:证件扫描件
+         * 变量名:business_license_copy
+         * 是否必填:是
+         * 类型:string(256)
+         * 描述:
+         *  1、主体为“个体工商户/企业”时,请上传营业执照的证件图片。
+         *  2、主体为“党政、机关及事业单位/其他组织”时,请上传登记证书的证件图片。
+         *  3、可上传1张图片,请填写通过图片上传接口预先上传图片生成好的MediaID 。
+         *  4、图片要求:
+         *  (1)请上传证件的彩色扫描件或彩色数码拍摄件,黑白复印件需加盖公章(公章信息需完整) 。
+         *  (2)不得添加无关水印(非微信支付商户申请用途的其他水印)。
+         *  (3)需提供证件的正面拍摄件,完整、照面信息清晰可见。信息不清晰、扭曲、压缩变形、反光、不完整均不接受。
+         *  (4)不接受二次剪裁、翻拍、PS的证件照片。
+         *  示例值: 47ZC6GC-vnrbEny__Ie_An5-tCpqxucuxi-vByf3Gjm7KE53JXvGy9tqZm2XAUf-4KGprrKhpVBDIUv0OF4wFNIO4kqg05InE4d2I6_H7I4
+         * </pre>
+         */
+        private String businessLicenseCopy;
+
+        /**
+         * <pre>
+         * 字段名:证件注册号
+         * 变量名:business_license_number
+         * 是否必填:是
+         * 类型:string(18)
+         * 描述:
+         *  1、主体为“个体工商户/企业”时,请填写营业执照上的注册号/统一社会信用代码,须为15位数字或 18位数字|大写字母。
+         *  2、主体为“党政、机关及事业单位/其他组织”时,请填写登记证书的证书编号。
+         *  示例值:123456789012345678
+         *  特殊规则:长度最小15个字节
+         * </pre>
+         */
+        private String businessLicenseNumber;
+
+        /**
+         * <pre>
+         * 字段名:商户名称
+         * 变量名:merchant_name
+         * 是否必填:是
+         * 类型:string(128)
+         * 描述:
+         *  1、请填写营业执照/登记证书的商家名称,2~110个字符,支持括号 。
+         *  2、个体工商户/党政、机关及事业单位,不能以“公司”结尾。
+         *  3、个体工商户,若营业执照上商户名称为空或为“无”,请填写"个体户+经营者姓名",如“个体户张三” 。
+         *  示例值:腾讯科技有限公司
+         * </pre>
+         */
+        private String merchantName;
+
+        /**
+         * <pre>
+         * 字段名:经营者/法定代表人姓名
+         * 变量名:legal_person
+         * 是否必填:是
+         * 类型:string(128)
+         * 描述:
+         *  请填写证件的经营者/法定代表人姓名
+         *  示例值:张三
+         * </pre>
+         */
+        private String legalPerson;
+
+        /**
+         * <pre>
+         * 字段名:注册地址
+         * 变量名:company_address
+         * 是否必填:条件选填
+         * 类型:string(128)
+         * 描述:
+         *  主体为“党政、机关及事业单位/其他组织”时必填,请填写登记证书的注册地址。
+         *  示例值:深圳南山区科苑路
+         * </pre>
+         */
+        private String companyAddress;
+
+        /**
+         * <pre>
+         * 字段名:营业期限
+         * 变量名:business_time
+         * 是否必填:条件选填
+         * 类型:string(256)
+         * 描述:
+         *  1、主体为“党政、机关及事业单位/其他组织”时必填,请填写证件有效期。
+         *  2、若证件有效期为长期,请填写:长期。
+         *  3、结束时间需大于开始时间。
+         *  4、有效期必须大于60天,即结束时间距当前时间需超过60天。
+         *  示例值:[\"2014-01-01\",\"长期\"]
+         * </pre>
+         */
+        private String businessTime;
+
+    }
+
+    @Data
+    @NoArgsConstructor
+    public static class OrganizationCertInfo implements Serializable {
+        /**
+         * <pre>
+         * 字段名:组织机构代码证照片
+         * 变量名:organization_copy
+         * 是否必填:是
+         * 类型:string(256)
+         * 描述:
+         *  可上传1张图片,请填写通过图片上传接口预先上传图片生成好的MediaID。
+         *  示例值:vByf3Gjm7KE53JXv\prrKhpVBDIUv0OF4wFNIO4kqg05InE4d2I6_H7I4
+         * </pre>
+         */
+        private String organizationCopy;
+
+        /**
+         * <pre>
+         * 字段名:组织机构代码
+         * 变量名:organization_number
+         * 是否必填:是
+         * 类型:string(256)
+         * 描述:
+         *  1、请填写组织机构代码证上的组织机构代码。
+         *  2、可填写9或10位 数字|字母|连字符。
+         *  示例值:12345679-A
+         * </pre>
+         */
+        private String organizationNumber;
+
+        /**
+         * <pre>
+         * 字段名:组织机构代码有效期限
+         * 变量名:organization_time
+         * 是否必填:是
+         * 类型:string(256)
+         * 描述:
+         *  1、请填写组织机构代码证的有效期限,注意参照示例中的格式。
+         *  2、若证件有效期为长期,请填写:长期。
+         *  3、结束时间需大于开始时间。
+         *  4、有效期必须大于60天,即结束时间距当前时间需超过60天。
+         *  示例值:[\"2014-01-01\",\"长期\"]
+         * </pre>
+         */
+        private String organizationTime;
+
+    }
+
+    @Data
+    @NoArgsConstructor
+    public static class IdCardInfo implements Serializable {
+        /**
+         * <pre>
+         * 字段名:身份证人像面照片
+         * 变量名:id_card_copy
+         * 是否必填:是
+         * 类型:string(256)
+         * 描述:
+         *  1、请上传经营者/法定代表人的身份证人像面照片。
+         *  2、可上传1张图片,请填写通过图片上传接口预先上传图片生成好的MediaID。
+         *  示例值:xpnFuAxhBTEO_PvWkfSCJ3zVIn001D8daLC-ehEuo0BJqRTvDujqhThn4ReFxikqJ5YW6zFQ
+         * </pre>
+         */
+        private String idCardCopy;
+
+        /**
+         * <pre>
+         * 字段名:身份证国徽面照片
+         * 变量名:id_card_national
+         * 是否必填:是
+         * 类型:string(256)
+         * 描述:
+         *  1、请上传经营者/法定代表人的身份证国徽面照片。
+         *  2、可上传1张图片,请填写通过图片上传接口预先上传图片生成好的MediaID 。
+         *  示例值:vByf3Gjm7KE53JXvGy9tqZm2XAUf-4KGprrKhpVBDIUv0OF4wFNIO4kqg05InE4d2I6_H7I4
+         * </pre>
+         */
+        private String idCardNational;
+
+        /**
+         * <pre>
+         * 字段名:身份证姓名
+         * 变量名:id_card_name
+         * 是否必填:是
+         * 类型:string(256)
+         * 描述:
+         *  1、请填写经营者/法定代表人对应身份证的姓名,2~30个中文字符、英文字符、符号。
+         *  2、该字段需进行加密处理,加密方法详见敏感信息加密说明。
+         *  示例值:pVd1HJ6v/69bDnuC4EL5Kz4jBHLiCa8MRtelw/wDa4SzfeespQO/0kjiwfqdfg==
+         *  字段加密:使用APIv3定义的方式加密
+         * </pre>
+         */
+        private String idCardName;
+
+        /**
+         * <pre>
+         * 字段名:身份证号码
+         * 变量名:id_card_number
+         * 是否必填:是
+         * 类型:string(18)
+         * 描述:
+         *  1、请填写经营者/法定代表人对应身份证的号码。
+         *  2、15位数字或17位数字+1位数字|X ,该字段需进行加密处理,加密方法详见敏感信息加密说明。
+         *  示例值:zV+BEmytMNQCqQ8juwEc4P4TG5xzchG/5IL9DBd+Z0zZXkw==4
+         *  特殊规则:长度最小15个字节
+         * </pre>
+         */
+        private String idCardNumber;
+
+        /**
+         * <pre>
+         * 字段名:身份证有效期限
+         * 变量名:id_card_valid_time
+         * 是否必填:是
+         * 类型:string(128)
+         * 描述:
+         *  1、请填写身份证有效期的结束时间,注意参照示例中的格式。
+         *  2、若证件有效期为长期,请填写:长期。
+         *  3、证件有效期需大于60天。
+         *  示例值:2026-06-06,长期
+         * </pre>
+         */
+        private String idCardValidTime;
+
+    }
+
+    @Data
+    @NoArgsConstructor
+    public static class IdDocInfo implements Serializable {
+        /**
+         * <pre>
+         * 字段名:证件姓名
+         * 变量名:id_doc_name
+         * 是否必填:是
+         * 类型:string(128)
+         * 描述:
+         *  请填写经营者/法人姓名。
+         *  示例值:jTpGmxUX3FBWVQ5NJTZvlKX_gdU4LC-ehEuo0BJqRTvDujqhThn4ReFxikqJ5YW6zFQ
+         * </pre>
+         */
+        private String idDocName;
+
+        /**
+         * <pre>
+         * 字段名:证件号码
+         * 变量名:id_doc_number
+         * 是否必填:是
+         * 类型:string(128)
+         * 描述:
+         *  7~11位 数字|字母|连字符 。
+         *  示例值:jTpGmxUX3FBWVQ5NJTZvlKX_go0BJqRTvDujqhThn4ReFxikqJ5YW6zFQ
+         * </pre>
+         */
+        private String idDocNumber;
+
+        /**
+         * <pre>
+         * 字段名:证件照片
+         * 变量名:id_doc_copy
+         * 是否必填:是
+         * 类型:string(256)
+         * 描述:
+         *  1、可上传1张图片,请填写通过图片上传接口预先上传图片生成好的MediaID。
+         *  2、2M内的彩色图片,格式可为bmp、png、jpeg、jpg或gif 。
+         *  示例值:xi-vByf3Gjm7KE53JXvGy9tqZm2XAUf-4KGprrKhpVBDIUv0OF4wFNIO4kqg05InE4d2I6_H7I4
+         * </pre>
+         */
+        private String idDocCopy;
+
+        /**
+         * <pre>
+         * 字段名:证件结束日期
+         * 变量名:doc_period_end
+         * 是否必填:是
+         * 类型:string(128)
+         * 描述:
+         *  1、请按照示例值填写。
+         *  2、若证件有效期为长期,请填写:长期。
+         *  3、证件有效期需大于60天 。
+         *  示例值:2020-01-02
+         * </pre>
+         */
+        private String docPeriodEnd;
+
+    }
+
+    @Data
+    @NoArgsConstructor
+    public static class AccountInfo implements Serializable {
+        /**
+         * <pre>
+         * 字段名:账户类型
+         * 变量名:bank_account_type
+         * 是否必填:是
+         * 类型:string(2)
+         * 描述:
+         *  1、若主体为企业/党政、机关及事业单位/其他组织,可填写:74-对公账户。
+         *  2、若主体为小微,可填写:75-对私账户。
+         *  3、若主体为个体工商户,可填写:74-对公账户或75-对私账户。
+         *  示例值:75
+         * </pre>
+         */
+        private String bankAccountType;
+
+        /**
+         * <pre>
+         * 字段名:开户银行
+         * 变量名:account_bank
+         * 是否必填:是
+         * 类型:string(10)
+         * 描述:
+         *  详细参见开户银行对照表。
+         *  示例值:工商银行
+         * </pre>
+         */
+        private String accountBank;
+
+        /**
+         * <pre>
+         * 字段名:开户名称
+         * 变量名:account_name
+         * 是否必填:是
+         * 类型:string(128)
+         * 描述:
+         *  1、选择经营者个人银行卡时,开户名称必须与身份证姓名一致。
+         *  2、选择对公账户时,开户名称必须与营业执照上的“商户名称”一致。
+         *  3、该字段需进行加密处理,加密方法详见敏感信息加密说明。
+         *  示例值:AOZdYGISxo4yw96uY1Pk7Rq79Jtt7+I8juwEc4P4TG5xzchG/5IL9DBd+Z0zZXkw==
+         * </pre>
+         */
+        private String accountName;
+
+        /**
+         * <pre>
+         * 字段名:开户银行省市编码
+         * 变量名:bank_address_code
+         * 是否必填:是
+         * 类型:string(12)
+         * 描述:
+         *  至少精确到市,详细参见省市区编号对照表。
+         *  示例值:110000
+         * </pre>
+         */
+        private String bankAddressCode;
+
+        /**
+         * <pre>
+         * 字段名:开户银行联行号
+         * 变量名:bank_branch_id
+         * 是否必填:条件选填
+         * 类型:string(64)
+         * 描述:
+         *  1、17家直连银行无需填写,如为其他银行,开户银行全称(含支行)和开户银行联行号二选一。
+         *  2、详细参见开户银行全称(含支行)对照表。
+         *  示例值:402713354941
+         * </pre>
+         */
+        private String bankBranchId;
+
+        /**
+         * <pre>
+         * 字段名:开户银行全称 (含支行)
+         * 变量名:bank_name
+         * 是否必填:条件选填
+         * 类型:string(128)
+         * 描述:
+         *  1、17家直连银行无需填写,如为其他银行,开户银行全称(含支行)和开户银行联行号二选一。
+         *  2、需填写银行全称,如"深圳农村商业银行XXX支行" 。
+         *  3、详细参见开户银行全称(含支行)对照表。
+         *  示例值:施秉县农村信用合作联社城关信用社
+         * </pre>
+         */
+        private String bankName;
+
+        /**
+         * <pre>
+         * 字段名:银行帐号
+         * 变量名:account_number
+         * 是否必填:是
+         * 类型:string(128)
+         * 描述:
+         *  1、数字,长度遵循系统支持的对公/对私卡号长度要求表。
+         *  2、该字段需进行加密处理,加密方法详见敏感信息加密说明。
+         *  示例值: d+xT+MQCvrLHUVDWv/8MR/dB7TkXLVfSrUxMPZy6jWWYzpRrEEaYQE8ZRGYoeorwC+w==
+         * </pre>
+         */
+        private String accountNumber;
+
+    }
+
+    @Data
+    @NoArgsConstructor
+    public static class ContactInfo implements Serializable {
+        /**
+         * <pre>
+         * 字段名:超级管理员类型
+         * 变量名:contact_type
+         * 是否必填:是
+         * 类型:string(2)
+         * 描述:
+         *  1、小微商户,选择:65-法人/经营者。
+         *  2、个体工商户/企业/党政、机关及事业单位/其他组织,可选择:65-法人/经营者、66- 负责人。 (负责人:经商户授权办理微信支付业务的人员,授权范围包括但不限于签约,入驻过程需完成账户验证)。
+         *  示例值:65
+         * </pre>
+         */
+        private String contactType;
+
+        /**
+         * <pre>
+         * 字段名:超级管理员姓名
+         * 变量名:contact_name
+         * 是否必填:是
+         * 类型:string(256)
+         * 描述:
+         *  1、若管理员类型为“法人”,则该姓名需与法人身份证姓名一致。
+         *  2、若管理员类型为“经办人”,则可填写实际经办人的姓名。
+         *  3、该字段需进行加密处理,加密方法详见敏感信息加密说明。
+         *  (后续该管理员需使用实名微信号完成签约)
+         *  示例值: pVd1HJ6zyvPedzGaV+X3IdGdbDnuC4Eelw/wDa4SzfeespQO/0kjiwfqdfg==
+         * </pre>
+         */
+        private String contactName;
+
+        /**
+         * <pre>
+         * 字段名:超级管理员身份证件号码
+         * 变量名:contact_id_card_number
+         * 是否必填:是
+         * 类型:string(256)
+         * 描述:
+         *  1、若管理员类型为法人,则该身份证号码需与法人身份证号码一致。若管理员类型为经办人,则可填写实际经办人的身份证号码。
+         *  2、可传身份证、来往内地通行证、来往大陆通行证、护照等证件号码。
+         *  3、超级管理员签约时,校验微信号绑定的银行卡实名信息,是否与该证件号码一致。
+         *  4、该字段需进行加密处理,加密方法详见敏感信息加密说明。
+         *  示例值:pVd1HJ6zmty7/mYNxLMpRSvMRtelw/wDa4SzfeespQO/0kjiwfqdfg==
+         * </pre>
+         */
+        private String contactIdCardNumber;
+
+        /**
+         * <pre>
+         * 字段名:超级管理员手机
+         * 变量名:mobile_phone
+         * 是否必填:是
+         * 类型:string(256)
+         * 描述:
+         *  1、请填写管理员的手机号,11位数字, 用于接收微信支付的重要管理信息及日常操作验证码 。
+         *  2、该字段需进行加密处理,加密方法详见敏感信息加密说明。
+         *  示例值:pVd1HJ6zyvPedzGaV+X3qtmrq9bb9tPROvwia4ibL+F6mfjbzQIzfb3HHLEjZ4YiNWWNeespQO/0kjiwfqdfg==
+         * </pre>
+         */
+        private String mobilePhone;
+
+        /**
+         * <pre>
+         * 字段名:超级管理员邮箱
+         * 变量名:contact_email
+         * 是否必填:是
+         * 类型:string(256)
+         * 描述:
+         *  1、用于接收微信支付的开户邮件及日常业务通知。
+         *  2、需要带@,遵循邮箱格式校验 。
+         *  3、该字段需进行加密处理,加密方法详见敏感信息加密说明。
+         *  示例值:pVd1HJ6zyvPedzGaV+X3qtmrq9bb9tPROvwia4ibL+FWWNUlw/wDa4SzfeespQO/0kjiwfqdfg==
+         * </pre>
+         */
+        private String contactEmail;
+
+    }
+
+    @Data
+    @NoArgsConstructor
+    public static class SalesSceneInfo implements Serializable {
+        /**
+         * <pre>
+         * 字段名:店铺名称
+         * 变量名:store_name
+         * 是否必填:是
+         * 类型:string(256)
+         * 描述:
+         *  请填写店铺全称。
+         *  示例值:爱烧烤
+         * </pre>
+         */
+        private String storeName;
+
+        /**
+         * <pre>
+         * 字段名:店铺链接
+         * 变量名:store_url
+         * 是否必填:二选一
+         * 类型:string(1024)
+         * 描述:
+         *  1、店铺二维码or店铺链接二选一必填。
+         *  2、请填写店铺主页链接,需符合网站规范。
+         *  示例值:http://www.qq.com
+         * </pre>
+         */
+        private String storeUrl;
+
+        /**
+         * <pre>
+         * 字段名:店铺二维码
+         * 变量名:store_qr_code
+         * 是否必填:1、店铺二维码 or 店铺链接二选一必填。 2、若为电商小程序,可上传店铺页面的小程序二维码。 3、请填写通过图片上传接口预先上传图片生成好的MediaID,仅能上传1张图片 。 示例值:jTpGmxUX3FBWVQ5NJTZvlKX_gdU4cRz7z5NxpnFuAxhBTEO1D8daLC-ehEuo0BJqRTvDujqhThn4ReFxikqJ5YW6zFQ
+         * 类型:string(256)
+         * 描述:
+         * </pre>
+         */
+        private String storeQrCode;
+
+        /**
+         * <pre>
+         * 字段名:小程序AppID
+         * 变量名:mini_program_sub_appid
+         * 是否必填:否
+         * 类型:string(256)
+         * 描述:
+         * </pre>
+         */
+        private String miniProgramSubAppid;
+
+    }
+
+    @Data
+    @NoArgsConstructor
+    public static class SettlementInfo implements Serializable {
+        /**
+         * <pre>
+         * 字段名:结算规则ID
+         * 变量名:settlement_id
+         * 是否必填:否
+         * 类型:int
+         * 描述:
+         *  1、选填,请选择二级商户的结算规则ID,需匹配电商平台开通工具箱选择的费率档位,详细参见电商二级商户结算规则对照表;https://kf.qq.com/faq/220228qEfuAz220228bMFji6.html
+         *  2、若电商平台未传入,将默认选择0.6%费率对应的结算规则id;
+         *  示例值:719
+         * </pre>
+         */
+        private Integer settlementId;
+
+        /**
+         * <pre>
+         * 字段名:所属行业
+         * 变量名:qualification_type
+         * 是否必填:二选一
+         * 类型:string[1, 200]
+         * 描述:
+         *  1、选填,请填写二级商户所属的行业名称,映射特殊资质要求,详细参见电商二级商户结算规则对照表;
+         *  2、若电商平台未传入,将默认填写无需特殊资质的行业名称;
+         *  示例值:零售批发/生活娱乐/其他
+         * </pre>
+         */
+        private String qualificationType;
+
+    }
+
+
+    public BiandanUnifiedpayCreateSubMchApplyRequest() {
+        super("createSubMchApply");
+    }
+
+    @Override
+    public Class<BiandanUnifiedpayCreateSubMchApplyResponse> getResponseClass() {
+        return null;
+    }
+}

+ 12 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayCreateSubMchApplyResponse.java

@@ -0,0 +1,12 @@
+package com.xingxi.unifiedpay.bean;
+
+
+import lombok.Getter;
+import lombok.Setter;
+
+@Getter
+@Setter
+public class BiandanUnifiedpayCreateSubMchApplyResponse extends BaseBiandanUnifiedpayResponse{
+
+    private String applymentId;
+}

+ 21 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayDelProfitsharingReceiversRequest.java

@@ -0,0 +1,21 @@
+package com.xingxi.unifiedpay.bean;
+
+
+import lombok.Getter;
+import lombok.Setter;
+
+@Getter
+@Setter
+public class BiandanUnifiedpayDelProfitsharingReceiversRequest extends BaseBiandanUnifiedpayRequest<BiandanUnifiedpayDelProfitsharingReceiversResponse>{
+
+    private String account;
+
+    public BiandanUnifiedpayDelProfitsharingReceiversRequest() {
+        super("delProfitsharingReceivers");
+    }
+
+    @Override
+    public Class<BiandanUnifiedpayDelProfitsharingReceiversResponse> getResponseClass() {
+        return null;
+    }
+}

+ 4 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayDelProfitsharingReceiversResponse.java

@@ -0,0 +1,4 @@
+package com.xingxi.unifiedpay.bean;
+
+public class BiandanUnifiedpayDelProfitsharingReceiversResponse extends BiandanUnifiedpayAddProfitsharingReceiversResponse{
+}

+ 24 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayFinishProfitSharingRequest.java

@@ -0,0 +1,24 @@
+package com.xingxi.unifiedpay.bean;
+
+
+import lombok.Getter;
+import lombok.Setter;
+
+@Getter
+@Setter
+public class BiandanUnifiedpayFinishProfitSharingRequest extends BaseBiandanUnifiedpayRequest<BiandanUnifiedpayFinishProfitSharingResponse>{
+
+    private String transactionId;
+    private String outOrderNo;
+    private String description;
+    private String subMchid;
+
+    public BiandanUnifiedpayFinishProfitSharingRequest() {
+        super("finishProfitSharing");
+    }
+
+    @Override
+    public Class<BiandanUnifiedpayFinishProfitSharingResponse> getResponseClass() {
+        return null;
+    }
+}

+ 14 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayFinishProfitSharingResponse.java

@@ -0,0 +1,14 @@
+package com.xingxi.unifiedpay.bean;
+
+
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+
+@Getter
+@Setter
+@ToString(callSuper = true)
+public class BiandanUnifiedpayFinishProfitSharingResponse extends BaseBiandanUnifiedpayResponse{
+
+    private String orderId;
+}

+ 27 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayOrderRequest.java

@@ -0,0 +1,27 @@
+package com.xingxi.unifiedpay.bean;
+
+import lombok.Getter;
+import lombok.Setter;
+
+
+@Getter
+@Setter
+public class BiandanUnifiedpayOrderRequest extends BaseBiandanUnifiedpayRequest<BiandanUnifiedpayOrderResponse>{
+
+    private Long orderId;
+    private String orderNo;
+    private String unifiedpayOutTradeNo;
+    private String orderStatus;
+    private Long sellerId;
+    private Integer txAmt;
+    private String payerOpenid;
+
+    public BiandanUnifiedpayOrderRequest() {
+        super("unifiedpay");
+    }
+
+    @Override
+    public Class<BiandanUnifiedpayOrderResponse> getResponseClass() {
+        return BiandanUnifiedpayOrderResponse.class;
+    }
+}

+ 18 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayOrderResponse.java

@@ -0,0 +1,18 @@
+package com.xingxi.unifiedpay.bean;
+
+
+import com.xingxi.unifiedpay.domain.XingxiUnifiedPaymentInfoDTO;
+import lombok.Getter;
+import lombok.Setter;
+
+
+@Setter
+@Getter
+public class BiandanUnifiedpayOrderResponse extends BaseBiandanUnifiedpayResponse{
+
+    private Object paySign;
+
+    private XingxiUnifiedPaymentInfoDTO biandanUnifiedPaymentInfoDTO;
+
+
+}

+ 21 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayProfitSharingOrdersUnSplitAmountRequest.java

@@ -0,0 +1,21 @@
+package com.xingxi.unifiedpay.bean;
+
+
+import lombok.Getter;
+import lombok.Setter;
+
+@Getter
+@Setter
+public class BiandanUnifiedpayProfitSharingOrdersUnSplitAmountRequest extends BaseBiandanUnifiedpayRequest<BiandanUnifiedpayProfitSharingOrdersUnSplitAmountResponse>{
+
+    private String transactionId;
+
+    public BiandanUnifiedpayProfitSharingOrdersUnSplitAmountRequest() {
+        super("queryProfitSharingOrdersUnsplitAmount");
+    }
+
+    @Override
+    public Class<BiandanUnifiedpayProfitSharingOrdersUnSplitAmountResponse> getResponseClass() {
+        return null;
+    }
+}

+ 14 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayProfitSharingOrdersUnSplitAmountResponse.java

@@ -0,0 +1,14 @@
+package com.xingxi.unifiedpay.bean;
+
+
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+
+@Getter
+@Setter
+@ToString(callSuper = true)
+public class BiandanUnifiedpayProfitSharingOrdersUnSplitAmountResponse extends BaseBiandanUnifiedpayResponse{
+
+    private Integer unsplitAmount;
+}

+ 34 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayProfitSharingRequest.java

@@ -0,0 +1,34 @@
+package com.xingxi.unifiedpay.bean;
+
+import lombok.Data;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+
+@Getter
+@Setter
+public class BiandanUnifiedpayProfitSharingRequest extends BaseBiandanUnifiedpayRequest<BiandanUnifiedpayProfitSharingResponse>{
+
+    private String transactionId;
+    private String outOrderNo;
+    private List<ProfitSharingReceiversDTO> profitSharingReceivers;
+
+    public BiandanUnifiedpayProfitSharingRequest() {
+        super("profitSharing");
+    }
+
+    @Override
+    public Class<BiandanUnifiedpayProfitSharingResponse> getResponseClass() {
+        return null;
+    }
+
+
+    @Data
+    public static class ProfitSharingReceiversDTO{
+        private String receiverAccount;
+        private Integer amount;
+        private String description;
+    }
+}

+ 8 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayProfitSharingResponse.java

@@ -0,0 +1,8 @@
+package com.xingxi.unifiedpay.bean;
+
+
+import lombok.ToString;
+
+@ToString(callSuper = true)
+public class BiandanUnifiedpayProfitSharingResponse extends BiandanUnifiedpayQueryProfitSharingResponse{
+}

+ 21 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayQueryApplyStatusRequest.java

@@ -0,0 +1,21 @@
+package com.xingxi.unifiedpay.bean;
+
+
+import lombok.Getter;
+import lombok.Setter;
+
+@Getter
+@Setter
+public class BiandanUnifiedpayQueryApplyStatusRequest extends BaseBiandanUnifiedpayRequest<BiandanUnifiedpayQueryApplyStatusResponse>{
+
+    private String applymentId;
+
+    public BiandanUnifiedpayQueryApplyStatusRequest() {
+        super("queryApplyStatusByApplymentId");
+    }
+
+    @Override
+    public Class<BiandanUnifiedpayQueryApplyStatusResponse> getResponseClass() {
+        return null;
+    }
+}

+ 307 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayQueryApplyStatusResponse.java

@@ -0,0 +1,307 @@
+package com.xingxi.unifiedpay.bean;
+
+import com.github.binarywang.wxpay.bean.ecommerce.ApplymentsStatusResult;
+import lombok.Data;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+
+import java.util.List;
+
+
+
+@Getter
+@Setter
+public class BiandanUnifiedpayQueryApplyStatusResponse extends BaseBiandanUnifiedpayResponse{
+
+    /**
+     * <pre>
+     * 字段名:申请状态
+     * 变量名:applyment_state
+     * 是否必填:否
+     * 类型:string(32)
+     * 描述:
+     *  枚举值:
+     *  CHECKING:资料校验中
+     *  ACCOUNT_NEED_VERIFY:待账户验证
+     *  AUDITING:审核中
+     *  REJECTED:已驳回
+     *  NEED_SIGN:待签约
+     *  FINISH:完成
+     *  FROZEN:已冻结
+     *  示例值:FINISH
+     * </pre>
+     */
+    private String applymentState;
+
+    /**
+     * <pre>
+     * 字段名:申请状态描述
+     * 变量名:applyment_state_desc
+     * 是否必填:否
+     * 类型:string(32)
+     * 描述:
+     *  申请状态描述
+     *  示例值:“审核中”
+     * </pre>
+     */
+    private String applymentStateDesc;
+
+    /**
+     * <pre>
+     * 字段名:签约链接
+     * 变量名:sign_url
+     * 是否必填:否
+     * 类型:string(256)
+     * 描述:
+     *  1、当申请状态为NEED_SIGN时才返回。
+     *  2、建议将链接转为二维码展示,需让申请单-管理者用微信扫码打开,完成签约。
+     *  示例值:https://pay.weixin.qq.com/public/apply4ec_sign/s?applymentId=2000002126198476&sign=b207b673049a32c858f3aabd7d27c7ec
+     * </pre>
+     */
+    private String signUrl;
+
+    /**
+     * <pre>
+     * 字段名:签约状态
+     * 变量名:sign_state
+     * 是否必填:否
+     * 类型:string(16)
+     * 描述:
+     *  1、UNSIGNED:未签约。该状态下,电商平台可查询获取签约链接,引导二级商户的超级管理员完成签约;
+     *  2、SIGNED :已签约。指二级商户的超级管理员已完成签约。注意:若申请单被驳回,商户修改了商户主体名称、法人名称、超级管理员信息、主体类型等信息,则需重新签约。
+     *  3、NOT_SIGNABLE:不可签约。该状态下,暂不支持超级管理员签约。一般为申请单处于已驳回、已冻结、机器校验中状态,无法签约。
+     *  示例值:https://pay.weixin.qq.com/public/apply4ec_sign/s?applymentId=2000002126198476&sign=b207b673049a32c858f3aabd7d27c7ec
+     * </pre>
+     */
+    private String signState;
+
+    /**
+     * <pre>
+     * 字段名:电商平台二级商户号
+     * 变量名:sub_mchid
+     * 是否必填:否
+     * 类型:string(32)
+     * 描述:
+     *  当申请状态为NEED_SIGN或FINISH时才返回。
+     *  示例值:1542488631
+     * </pre>
+     */
+    private String subMchid;
+
+    /**
+     * <pre>
+     * 字段名:+汇款账户验证信息
+     * 变量名:account_validation
+     * 是否必填:否
+     * 类型:object
+     * 描述:当申请状态为ACCOUNT_NEED_VERIFY 时有返回,可根据指引汇款,完成账户验证。
+     * </pre>
+     */
+    private ApplymentsStatusResult.AccountValidation accountValidation;
+
+    /**
+     * <pre>
+     * 字段名:+驳回原因详情
+     * 变量名:audit_detail
+     * 是否必填:否
+     * 类型:array
+     * 描述:各项资料的审核情况。当申请状态为REJECTED或 FROZEN时才返回。
+     * </pre>
+     */
+    private List<ApplymentsStatusResult.AuditDetail> auditDetail;
+
+    /**
+     * <pre>
+     * 字段名:法人验证链接
+     * 变量名:legal_validation_url
+     * 是否必填:否
+     * 类型:string(256)
+     * 描述:
+     *  1、当申请状态为
+     *  ACCOUNT_NEED_VERIFY,且通过系统校验的申请单,将返回链接。
+     *  2、建议将链接转为二维码展示,让商户法人用微信扫码打开,完成账户验证。
+     *  示例值: https://pay.weixin.qq.com/public/apply4ec_sign/s?applymentId=2000002126198476&sign=b207b673049a32c858f3aabd7d27c7ec
+     * </pre>
+     */
+    private String legalValidationUrl;
+
+    /**
+     * <pre>
+     * 字段名:业务申请编号
+     * 变量名:out_request_no
+     * 是否必填:是
+     * 类型:string(124)
+     * 描述:
+     *  提交接口填写的业务申请编号。
+     *  示例值:APPLYMENT_00000000001
+     * </pre>
+     */
+    private String outRequestNo;
+
+    /**
+     * <pre>
+     * 字段名:微信支付申请单号
+     * 变量名:applyment_id
+     * 是否必填:否
+     * 类型:uint64
+     * 描述:
+     *  微信支付分配的申请单号。
+     *  示例值:2000002124775691
+     * </pre>
+     */
+    private String applymentId;
+
+    @Data
+    @NoArgsConstructor
+    public static class AccountValidation  {
+        /**
+         * <pre>
+         * 字段名:付款户名
+         * 变量名:account_name
+         * 是否必填:否
+         * 类型:uint64
+         * 描述:
+         *  需商户使用该户名的账户进行汇款。
+         *  示例值: rDdICA3ZYXshYqeOSslSjSMf+MhhC4oaujiISFzq3AE+as7mAEDJly+DgRuVs74msmKUH8pl+3oA==
+         * </pre>
+         */
+        private String accountName;
+
+        /**
+         * <pre>
+         * 字段名:付款卡号
+         * 变量名:account_no
+         * 是否必填:否
+         * 类型:string(128)
+         * 描述:
+         *  结算账户为对私时会返回,商户需使用该付款卡号进行汇款。
+         *  示例值:9nZYDEvBT4rDdICA3ZYXshYqeOSslSjSauAE+as7mAEDJly+DgRuVs74msmKUH8pl+3oA==
+         * </pre>
+         */
+        private String accountNo;
+
+        /**
+         * <pre>
+         * 字段名:汇款金额
+         * 变量名:pay_amount
+         * 是否必填:否
+         * 类型:string(32)
+         * 描述:
+         *  需要汇款的金额(单位:分)。
+         *  示例值:124
+         * </pre>
+         */
+        private String payAmount;
+
+        /**
+         * <pre>
+         * 字段名:收款卡号
+         * 变量名:destination_account_number
+         * 是否必填:否
+         * 类型:string(128)
+         * 描述:
+         *  收款账户的卡号
+         *  示例值:7222223333322332
+         * </pre>
+         */
+        private String destinationAccountNumber;
+
+        /**
+         * <pre>
+         * 字段名:收款户名
+         * 变量名:destination_account_name
+         * 是否必填:否
+         * 类型:string(128)
+         * 描述:
+         *  收款账户名
+         *  示例值:财付通支付科技有限公司
+         * </pre>
+         */
+        private String destinationAccountName;
+
+        /**
+         * <pre>
+         * 字段名:开户银行
+         * 变量名:destination_account_bank
+         * 是否必填:否
+         * 类型:string(128)
+         * 描述:
+         *  收款账户的开户银行名称。
+         *  示例值:招商银行威盛大厦支行
+         * </pre>
+         */
+        private String destinationAccountBank;
+
+        /**
+         * <pre>
+         * 字段名:省市信息
+         * 变量名:city
+         * 是否必填:否
+         * 类型:string(128)
+         * 描述:
+         *  收款账户的省市。
+         *  示例值:深圳
+         * </pre>
+         */
+        private String city;
+
+        /**
+         * <pre>
+         * 字段名:备注信息
+         * 变量名:remark
+         * 是否必填:否
+         * 类型:string(128)
+         * 描述:
+         *  商户汇款时,需要填写的备注信息。
+         *  示例值:入驻账户验证
+         * </pre>
+         */
+        private String remark;
+
+        /**
+         * <pre>
+         * 字段名:汇款截止时间
+         * 变量名:deadline
+         * 是否必填:否
+         * 类型:string(20)
+         * 描述:
+         *  请在此时间前完成汇款。
+         *  示例值:2018-12-1017:09:01
+         * </pre>
+         */
+        private String deadline;
+
+    }
+
+    @Data
+    @NoArgsConstructor
+    public static class AuditDetail {
+        /**
+         * <pre>
+         * 字段名:参数名称
+         * 变量名:param_name
+         * 是否必填:否
+         * 类型:string(32)
+         * 描述:
+         *  提交申请单的资料项名称。
+         *  示例值:id_card_copy
+         * </pre>
+         */
+        private String paramName;
+
+        /**
+         * <pre>
+         * 字段名:驳回原因
+         * 变量名:reject_reason
+         * 是否必填:否
+         * 类型:string(32)
+         * 描述:
+         *  提交资料项被驳回原因。
+         *  示例值:身份证背面识别失败,请上传更清晰的身份证图片
+         * </pre>
+         */
+        private String rejectReason;
+
+    }
+}

+ 22 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayQueryOrderRequest.java

@@ -0,0 +1,22 @@
+package com.xingxi.unifiedpay.bean;
+
+
+import lombok.Getter;
+import lombok.Setter;
+
+@Getter
+@Setter
+public class BiandanUnifiedpayQueryOrderRequest extends BaseBiandanUnifiedpayRequest<BiandanUnifiedpayQueryOrderResponse>{
+
+    private String transactionId;
+    private String outTradeNo;
+
+    public BiandanUnifiedpayQueryOrderRequest() {
+        super("queryOrder");
+    }
+
+    @Override
+    public Class<BiandanUnifiedpayQueryOrderResponse> getResponseClass() {
+        return null;
+    }
+}

+ 21 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayQueryOrderResponse.java

@@ -0,0 +1,21 @@
+package com.xingxi.unifiedpay.bean;
+
+
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+
+@Getter
+@Setter
+@ToString(callSuper = true)
+public class BiandanUnifiedpayQueryOrderResponse extends BaseBiandanUnifiedpayResponse{
+    private String tradeState;
+    private String outTradeNo;
+    private String successTimeString;
+    private String tradeType;
+    private String bankType;
+    private String attach;
+    private String transactionId;
+    private String callUnifiedpayComponent;
+
+}

+ 22 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayQueryProfitSharingRequest.java

@@ -0,0 +1,22 @@
+package com.xingxi.unifiedpay.bean;
+
+
+import lombok.Getter;
+import lombok.Setter;
+
+@Getter
+@Setter
+public class BiandanUnifiedpayQueryProfitSharingRequest extends BaseBiandanUnifiedpayRequest<BiandanUnifiedpayQueryProfitSharingResponse>{
+
+    private String transactionId;
+    private String outOrderNo;
+
+    public BiandanUnifiedpayQueryProfitSharingRequest() {
+        super("queryProfitSharing");
+    }
+
+    @Override
+    public Class<BiandanUnifiedpayQueryProfitSharingResponse> getResponseClass() {
+        return null;
+    }
+}

+ 47 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayQueryProfitSharingResponse.java

@@ -0,0 +1,47 @@
+package com.xingxi.unifiedpay.bean;
+
+
+import lombok.Data;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+
+import java.util.List;
+
+@Getter
+@Setter
+@ToString(callSuper = true)
+public class BiandanUnifiedpayQueryProfitSharingResponse extends BaseBiandanUnifiedpayResponse{
+
+    private String orderId;
+    private String profitSharingStatus;
+    private List<Receiver> receivers;
+
+
+
+    @Data
+    public static class Receiver{
+        private String receiverMchid;
+        private Integer amount;
+        private String description;
+
+        /**
+         * <pre>
+         * 字段名:分账结果
+         * 变量名:result
+         * 是否必填:是
+         * 类型:string (32)
+         * 描述:
+         *  分账结果,枚举值:
+         *    PENDING:待分账
+         *    SUCCESS:分账成功
+         *    ADJUST:分账失败待调账
+         *    RETURNED:已转回分账方
+         *    CLOSED:已关闭
+         * 示例值:SUCCESS
+         * </pre>
+         */
+        private String result;
+
+    }
+}

+ 21 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayQueryRefundRequest.java

@@ -0,0 +1,21 @@
+package com.xingxi.unifiedpay.bean;
+
+
+import lombok.Getter;
+import lombok.Setter;
+
+@Setter
+@Getter
+public class BiandanUnifiedpayQueryRefundRequest extends BaseBiandanUnifiedpayRequest<BiandanUnifiedpayQueryRefundResponse>{
+
+    private String outRefundNo;
+
+    public BiandanUnifiedpayQueryRefundRequest() {
+        super("queryRefund");
+    }
+
+    @Override
+    public Class<BiandanUnifiedpayQueryRefundResponse> getResponseClass() {
+        return null;
+    }
+}

+ 16 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayQueryRefundResponse.java

@@ -0,0 +1,16 @@
+package com.xingxi.unifiedpay.bean;
+
+
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+
+@Setter
+@Getter
+@ToString(callSuper = true)
+public class BiandanUnifiedpayQueryRefundResponse extends BaseBiandanUnifiedpayResponse{
+
+    private String refundId;
+    private String refundStatus;
+
+}

+ 23 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayQuerySubMchCurrBalanceRequest.java

@@ -0,0 +1,23 @@
+package com.xingxi.unifiedpay.bean;
+
+
+import lombok.Getter;
+import lombok.Setter;
+
+@Getter
+@Setter
+public class BiandanUnifiedpayQuerySubMchCurrBalanceRequest extends BaseBiandanUnifiedpayRequest<BiandanUnifiedpayQuerySubMchCurrBalanceResponse> {
+
+
+    private String subMchid;
+
+
+    public BiandanUnifiedpayQuerySubMchCurrBalanceRequest() {
+        super("querySubMchCurrBalance");
+    }
+
+    @Override
+    public Class<BiandanUnifiedpayQuerySubMchCurrBalanceResponse> getResponseClass() {
+        return null;
+    }
+}

+ 13 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayQuerySubMchCurrBalanceResponse.java

@@ -0,0 +1,13 @@
+package com.xingxi.unifiedpay.bean;
+
+
+import lombok.Getter;
+import lombok.Setter;
+
+@Setter
+@Getter
+public class BiandanUnifiedpayQuerySubMchCurrBalanceResponse extends BaseBiandanUnifiedpayResponse{
+
+    private Integer availableAmount;
+    private Integer pendingAmount;
+}

+ 22 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayQuerySubWithdrawRequest.java

@@ -0,0 +1,22 @@
+package com.xingxi.unifiedpay.bean;
+
+
+import lombok.Getter;
+import lombok.Setter;
+
+@Getter
+@Setter
+public class BiandanUnifiedpayQuerySubWithdrawRequest extends BaseBiandanUnifiedpayRequest<BiandanUnifiedpayQuerySubWithdrawResponse>{
+
+    private String subMchid;
+    private String outRequestNo;
+
+    public BiandanUnifiedpayQuerySubWithdrawRequest() {
+        super("querySubWithdraw");
+    }
+
+    @Override
+    public Class<BiandanUnifiedpayQuerySubWithdrawResponse> getResponseClass() {
+        return null;
+    }
+}

+ 12 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayQuerySubWithdrawResponse.java

@@ -0,0 +1,12 @@
+package com.xingxi.unifiedpay.bean;
+
+
+import lombok.Getter;
+import lombok.Setter;
+
+@Getter
+@Setter
+public class BiandanUnifiedpayQuerySubWithdrawResponse extends BaseBiandanUnifiedpayResponse{
+
+    private String status;
+}

+ 13 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayRedpackRequest.java

@@ -0,0 +1,13 @@
+package com.xingxi.unifiedpay.bean;
+
+public class BiandanUnifiedpayRedpackRequest extends BaseBiandanUnifiedpayRequest<BiandanUnifiedpayRedpackResponse> {
+
+    public BiandanUnifiedpayRedpackRequest() {
+        super("sendMiniProgramRedpackV2");
+    }
+
+    @Override
+    public Class<BiandanUnifiedpayRedpackResponse> getResponseClass() {
+        return null;
+    }
+}

+ 4 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayRedpackResponse.java

@@ -0,0 +1,4 @@
+package com.xingxi.unifiedpay.bean;
+
+public class BiandanUnifiedpayRedpackResponse extends BaseBiandanUnifiedpayResponse{
+}

+ 25 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayRefundRequest.java

@@ -0,0 +1,25 @@
+package com.xingxi.unifiedpay.bean;
+
+import lombok.Getter;
+import lombok.Setter;
+
+
+@Setter
+@Getter
+public class BiandanUnifiedpayRefundRequest extends BaseBiandanUnifiedpayRequest<BiandanUnifiedpayRefundResponse>{
+
+    private String transactionId;
+    private String outRefundNo;
+    private Integer refundAmt;
+    private Integer orderOriginalTotalAmt;
+    private String currency;
+
+    public BiandanUnifiedpayRefundRequest() {
+        super("refund");
+    }
+
+    @Override
+    public Class<BiandanUnifiedpayRefundResponse> getResponseClass() {
+        return null;
+    }
+}

+ 18 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpayRefundResponse.java

@@ -0,0 +1,18 @@
+package com.xingxi.unifiedpay.bean;
+
+
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+
+@Getter
+@Setter
+@ToString(callSuper = true)
+public class BiandanUnifiedpayRefundResponse extends BaseBiandanUnifiedpayResponse{
+
+    private String refundId;
+
+    private String refundStatus;
+
+
+}

+ 23 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpaySubWithdrawRequest.java

@@ -0,0 +1,23 @@
+package com.xingxi.unifiedpay.bean;
+
+
+import lombok.Getter;
+import lombok.Setter;
+
+@Getter
+@Setter
+public class BiandanUnifiedpaySubWithdrawRequest extends BaseBiandanUnifiedpayRequest<BiandanUnifiedpaySubWithdrawResponse>{
+
+    private String subMchid;
+    private String outRequestNo;
+    private Integer txAmt;
+
+    public BiandanUnifiedpaySubWithdrawRequest() {
+        super("subWithdraw");
+    }
+
+    @Override
+    public Class<BiandanUnifiedpaySubWithdrawResponse> getResponseClass() {
+        return null;
+    }
+}

+ 16 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/bean/BiandanUnifiedpaySubWithdrawResponse.java

@@ -0,0 +1,16 @@
+package com.xingxi.unifiedpay.bean;
+
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+
+
+@Getter
+@Setter
+@ToString(callSuper = true)
+public class BiandanUnifiedpaySubWithdrawResponse extends BaseBiandanUnifiedpayResponse{
+
+    private String subMchid;
+    private String withdrawId;
+    private String outRequestNo;
+}

+ 63 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/configuration/RegisterMissingBeanPostProcessor.java

@@ -0,0 +1,63 @@
+package com.xingxi.unifiedpay.configuration;
+
+import com.xingxi.unifiedpay.service.XingxiUnifiedpay;
+import org.springframework.beans.BeansException;
+import org.springframework.beans.factory.config.BeanDefinition;
+import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
+import org.springframework.beans.factory.support.BeanDefinitionRegistry;
+import org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor;
+import org.springframework.context.annotation.ClassPathBeanDefinitionScanner;
+import org.springframework.core.type.classreading.MetadataReader;
+import org.springframework.core.type.classreading.MetadataReaderFactory;
+import org.springframework.core.type.filter.TypeFilter;
+
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.Set;
+
+class RegisterMissingBeanPostProcessor implements BeanDefinitionRegistryPostProcessor {
+
+    @Override
+    public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) throws BeansException {
+
+        ClassPathBeanDefinitionScanner scanner = new ClassPathBeanDefinitionScanner(registry, false);
+        scanner.addIncludeFilter(new TypeFilter() {
+            @Override
+            public boolean match(MetadataReader metadataReader, MetadataReaderFactory metadataReaderFactory) throws IOException {
+                return metadataReader.getAnnotationMetadata().isAnnotated(XingxiUnifiedpay.class.getName());
+            }
+        });
+
+        Set<BeanDefinition> candidateComponents = scanner.findCandidateComponents("com.xingxi.unifiedpay.service");
+        if (!candidateComponents.isEmpty()) {
+            for (BeanDefinition candidateComponent : candidateComponents) {
+                String beanClassName = candidateComponent.getBeanClassName();
+
+                Class<?> aClass = null;
+                try {
+                    aClass = Class.forName(beanClassName);
+                } catch (ClassNotFoundException e) {
+                    throw new RuntimeException(e);
+                }
+
+                XingxiUnifiedpay annotation = aClass.getAnnotation(XingxiUnifiedpay.class);
+                String[] dependsOn = annotation.dependsOn();
+                if (dependsOn.length > 0) {
+                    boolean test = Arrays.stream(dependsOn).anyMatch(x -> !x.isEmpty() && !registry.containsBeanDefinition(x));
+                    if (test) {
+                        continue;
+                    }
+                }
+
+                registry.registerBeanDefinition(annotation.name(), candidateComponent);
+
+            }
+        }
+
+    }
+
+    @Override
+    public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
+    }
+
+}

+ 61 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/configuration/XingxiUnifiedpayConfiguration.java

@@ -0,0 +1,61 @@
+package com.xingxi.unifiedpay.configuration;
+
+import com.xingxi.unifiedpay.domain.XingxiUnifiedpayCallbackResultDTO;
+import com.xingxi.unifiedpay.open.XingxiUnifiedpayCallbackServiceI;
+import com.xingxi.unifiedpay.repository.XingxiUnifiedpayRepository;
+import com.github.binarywang.wxpay.config.WxPayConfig;
+import com.github.binarywang.wxpay.service.WxPayService;
+import com.github.binarywang.wxpay.service.impl.WxPayServiceImpl;
+import lombok.RequiredArgsConstructor;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.Configuration;
+
+@Configuration(proxyBeanMethods = false)
+@ComponentScan(basePackages = {"com.xingxi.unifiedpay"})
+@ConditionalOnProperty(prefix = "spring.application.xingxi.unifiedpay", name = "enabled", havingValue = "true")
+@EnableConfigurationProperties(XingxiUnifiedpayWxPayProperties.class)
+@RequiredArgsConstructor
+@ConditionalOnBean(XingxiUnifiedpayRepository.class)
+class XingxiUnifiedpayConfiguration {
+    private final XingxiUnifiedpayWxPayProperties wxPayProperties;
+
+    @Bean
+    @ConditionalOnMissingBean(XingxiUnifiedpayCallbackServiceI.class)
+    XingxiUnifiedpayCallbackServiceI biandanUnifiedpayCallbackServiceI(){
+        return new XingxiUnifiedpayCallbackServiceI() {
+            @Override
+            public void callbackFollowUpProcessing(XingxiUnifiedpayCallbackResultDTO biandanUnifiedpayCallbackResultDTO) {
+                throw new RuntimeException("业务实现[BiandanUnifiedpayCallbackServiceI]");
+            }
+        };
+    }
+
+    @Bean("wxPayService")
+    @ConditionalOnProperty(prefix = "spring.application.xingxi.unifiedpay.wxpay", name = "enabled", havingValue = "true")
+    WxPayService wxPayService() {
+        final WxPayService wxPayService = new WxPayServiceImpl();
+        WxPayConfig payConfig = new WxPayConfig();
+        payConfig.setAppId(StringUtils.trimToNull(this.wxPayProperties.getAppId()));
+        payConfig.setMchId(StringUtils.trimToNull(this.wxPayProperties.getMchId()));
+        payConfig.setMchKey(StringUtils.trimToNull(this.wxPayProperties.getMchKey()));
+        payConfig.setSubAppId(StringUtils.trimToNull(this.wxPayProperties.getSubAppId()));
+        payConfig.setSubMchId(StringUtils.trimToNull(this.wxPayProperties.getSubMchId()));
+        payConfig.setKeyPath(StringUtils.trimToNull(this.wxPayProperties.getKeyPath()));
+        //以下是apiv3以及支付分相关
+        payConfig.setServiceId(StringUtils.trimToNull(this.wxPayProperties.getServiceId()));
+        payConfig.setPayScoreNotifyUrl(StringUtils.trimToNull(this.wxPayProperties.getPayScoreNotifyUrl()));
+        payConfig.setPrivateKeyPath(StringUtils.trimToNull(this.wxPayProperties.getPrivateKeyPath()));
+        payConfig.setPrivateCertPath(StringUtils.trimToNull(this.wxPayProperties.getPrivateCertPath()));
+        payConfig.setCertSerialNo(StringUtils.trimToNull(this.wxPayProperties.getCertSerialNo()));
+        payConfig.setApiV3Key(StringUtils.trimToNull(this.wxPayProperties.getApiv3Key()));
+        wxPayService.setConfig(payConfig);
+        return wxPayService;
+    }
+
+}

+ 13 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/configuration/XingxiUnifiedpayProperties.java

@@ -0,0 +1,13 @@
+package com.xingxi.unifiedpay.configuration;
+
+import lombok.Data;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
+
+@Data
+@Component
+public class XingxiUnifiedpayProperties {
+
+    @Value("${spring.application.xingxi.unifiedpay.callbackUrl:}")
+    private String unifiedpayCallbackUrl;
+}

+ 70 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/configuration/XingxiUnifiedpayWxPayProperties.java

@@ -0,0 +1,70 @@
+package com.xingxi.unifiedpay.configuration;
+
+import lombok.Data;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+@Data
+@ConfigurationProperties(prefix = "spring.application.xingxi.unifiedpay.wxpay")
+public class XingxiUnifiedpayWxPayProperties {
+
+    /**
+     * 设置微信公众号或者小程序等的appid.
+     */
+    private String appId;
+
+    /**
+     * 微信支付商户号.
+     */
+    private String mchId;
+
+    /**
+     * 微信支付商户密钥.
+     */
+    private String mchKey;
+
+    /**
+     * 服务商模式下的子商户公众账号ID,普通模式请不要配置,请在配置文件中将对应项删除.
+     */
+    private String subAppId;
+
+    /**
+     * 服务商模式下的子商户号,普通模式请不要配置,最好是请在配置文件中将对应项删除.
+     */
+    private String subMchId;
+
+    /**
+     * apiclient_cert.p12文件的绝对路径,或者如果放在项目中,请以classpath:开头指定.
+     */
+    private String keyPath;
+
+    /**
+     * 微信支付分serviceId
+     */
+    private String serviceId;
+
+    /**
+     * 证书序列号
+     */
+    private String certSerialNo;
+
+    /**
+     * apiV3秘钥
+     */
+    private String apiv3Key;
+
+    /**
+     * 微信支付分回调地址
+     */
+    private String payScoreNotifyUrl;
+
+    /**
+     * apiv3 商户apiclient_key.pem
+     */
+    private String privateKeyPath;
+
+    /**
+     * apiv3 商户apiclient_cert.pem
+     */
+    private String privateCertPath;
+
+}

+ 13 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/domain/MercUnifiedpayConfigDTO.java

@@ -0,0 +1,13 @@
+package com.xingxi.unifiedpay.domain;
+
+import lombok.Data;
+
+@Data
+public class MercUnifiedpayConfigDTO {
+
+    private String appId;
+    private String mchId;
+    private String apiV3Key;
+    private byte[] privateKeyContent;
+    private byte[] privateCertContent;
+}

+ 97 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/domain/MercUnifiedpayDTO.java

@@ -0,0 +1,97 @@
+package com.xingxi.unifiedpay.domain;
+
+import lombok.Data;
+import org.apache.commons.lang3.ObjectUtils;
+import org.apache.commons.lang3.StringUtils;
+
+@Data
+public class MercUnifiedpayDTO {
+
+    private Long mercId;
+    private String subMchid;
+    private String paymentMethod;
+    private String paymentChannel;
+
+    private Long callUnifiedpayMercId;
+    private String unifiedPayMethod;
+    private String callUnifiedPayMercRole;
+
+    public Long getCallUnifiedpayMercId() {
+        if (ObjectUtils.isEmpty(callUnifiedpayMercId)) {
+            switchMercUnifiepay();
+        }
+
+        return callUnifiedpayMercId;
+    }
+
+    public String getUnifiedPayMethod() {
+        if (StringUtils.isEmpty(unifiedPayMethod)) {
+            switchMercUnifiepay();
+        }
+
+        return unifiedPayMethod;
+    }
+
+    public String getCallUnifiedPayMercRole() {
+        if (StringUtils.isEmpty(callUnifiedPayMercRole)) {
+            switchMercUnifiepay();
+        }
+
+        return callUnifiedPayMercRole;
+    }
+
+
+    private void setCallUnifiedpayMercId(Long callUnifiedpayMercId) {
+        this.callUnifiedpayMercId = callUnifiedpayMercId;
+    }
+
+    private void setUnifiedPayMethod(String unifiedPayMethod) {
+        this.unifiedPayMethod = unifiedPayMethod;
+    }
+
+    private void setCallUnifiedPayMercRole(String callUnifiedPayMercRole) {
+        this.callUnifiedPayMercRole = callUnifiedPayMercRole;
+    }
+
+    /**
+     * 商户收款+微信支付    商户自己上传证书 自己微信支付收款
+     * 商户收款+电商收付通  我们的电商收付通
+     * 平台收款+微信支付    我们的微信支付
+     * <p>
+     * payment_method
+     * PLATFORM_PAYMENT 平台收款
+     * MERCHANT_PAYMENT 商户收款
+     * payment_channel
+     * PAYTYPE_WX_PAY 微信支付
+     * PAYTYPE_WX_ECOMMERCE 微信收付通
+     *
+     * @return payType
+     */
+    private MercUnifiedpayDTO switchMercUnifiepay() {
+        String payType = getPaymentMethod() + getPaymentChannel();
+        switch (payType) {
+            case "MERCHANT_PAYMENTPAYTYPE_WX_PAY": // 微信支付 商户自己上传证书
+                setCallUnifiedpayMercId(getMercId());
+                setUnifiedPayMethod("WXPay");
+                setCallUnifiedPayMercRole("merchant");
+                break;
+            case "MERCHANT_PAYMENTPAYTYPE_WX_ECOMMERCE": // 电商收付通合单支付
+                setCallUnifiedpayMercId(getMercId());
+                setUnifiedPayMethod("EcommerceWXPay");
+                setCallUnifiedPayMercRole("merchant");
+                break;
+            case "PLATFORM_PAYMENTPAYTYPE_WX_PAY": //微信支付平台支付证书
+                setCallUnifiedpayMercId(100L);
+                setUnifiedPayMethod("WXPay");
+                setCallUnifiedPayMercRole("platform");
+                break;
+            default:
+                setCallUnifiedpayMercId(99999999999L);
+                setUnifiedPayMethod("OtherPayTest");
+                setCallUnifiedPayMercRole("UNKNOW");
+                break;
+        }
+        return this;
+    }
+
+}

+ 33 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/domain/XingxiUnifiedPaymentInfoDTO.java

@@ -0,0 +1,33 @@
+package com.xingxi.unifiedpay.domain;
+
+import lombok.Data;
+
+import java.time.LocalDateTime;
+
+@Data
+public class XingxiUnifiedPaymentInfoDTO {
+
+    private Long orderId;
+    private String orderNo;
+    private String orderStatus;
+    private String payKind;
+    private Long sellerId;
+    private String combineAppid;
+    private String combineMchid;
+    private String mchid;
+    private String outTradeNo;
+    private String subMchid;
+    private Integer payAmount;
+    private String subCurrency;
+    private String profitSharing;
+    private String wxOpenId;
+    private String notifyUrl;
+    private String prepayId;
+    private LocalDateTime timeExpire;
+    private LocalDateTime timeStart;
+    private Long callUnifiedpayMercId;
+    private String unifiedPayMethod;
+    private String callUnifiedPayMercRole;
+
+
+}

+ 18 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/domain/XingxiUnifiedpayCallbackResultDTO.java

@@ -0,0 +1,18 @@
+package com.xingxi.unifiedpay.domain;
+
+import lombok.Data;
+
+@Data
+public class XingxiUnifiedpayCallbackResultDTO {
+
+    private String tradeState;
+    private String outTradeNo;
+    private String successTimeString;
+    private String tradeType;
+    private String bankType;
+    private String attach;
+    private String transactionId;
+    private String callUnifiedpayComponent;
+    private Object originalObj;
+
+}

+ 43 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/open/WXPayCallbackEndpoint.java

@@ -0,0 +1,43 @@
+package com.xingxi.unifiedpay.open;
+
+import com.xingxi.unifiedpay.bean.BiandanUnifiedpayCallbackRequest;
+import com.xingxi.unifiedpay.bean.BiandanUnifiedpayCallbackResponse;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@Slf4j
+@RequiredArgsConstructor
+@RestController
+@RequestMapping("/unifiedpay")
+@ConditionalOnBean({XingxiUnifiedpayServiceI.class})
+public class WXPayCallbackEndpoint {
+    private final XingxiUnifiedpayServiceI unifiedpayServiceI;
+
+
+    @PostMapping("/{mercId}/callback")
+    public String callback(@PathVariable("mercId") Long mercId, HttpServletRequest request, HttpServletResponse response) {
+        log.debug("MercId[" + mercId + "]WXPayCallback");
+
+        BiandanUnifiedpayCallbackRequest callbackRequest = new BiandanUnifiedpayCallbackRequest();
+        callbackRequest.setHttpServletRequest(request);
+        callbackRequest.setSellerId(mercId);
+
+        try {
+            BiandanUnifiedpayCallbackResponse callbackResponse = unifiedpayServiceI.getResponse(callbackRequest);
+        } catch (Exception e) {
+            e.printStackTrace();
+            log.debug("商户[" + mercId + "]处理微信支付回调通知失败!!!!");
+            return "FAIL";
+        }
+
+        return "SUCCESS";
+    }
+}

+ 8 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/open/XingxiUnifiedpayCallbackServiceI.java

@@ -0,0 +1,8 @@
+package com.xingxi.unifiedpay.open;
+
+import com.xingxi.unifiedpay.domain.XingxiUnifiedpayCallbackResultDTO;
+
+public interface XingxiUnifiedpayCallbackServiceI {
+
+    void callbackFollowUpProcessing(XingxiUnifiedpayCallbackResultDTO biandanUnifiedpayCallbackResultDTO);
+}

+ 11 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/open/XingxiUnifiedpayServiceI.java

@@ -0,0 +1,11 @@
+package com.xingxi.unifiedpay.open;
+
+import com.xingxi.unifiedpay.bean.BaseBiandanUnifiedpayRequest;
+import com.xingxi.unifiedpay.bean.BaseBiandanUnifiedpayResponse;
+
+public interface XingxiUnifiedpayServiceI {
+
+    <T extends BaseBiandanUnifiedpayResponse> T getResponse(BaseBiandanUnifiedpayRequest<T> request) throws Exception;
+
+
+}

+ 69 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/open/XingxiUnifiedpayServiceImpl.java

@@ -0,0 +1,69 @@
+package com.xingxi.unifiedpay.open;
+
+import com.xingxi.unifiedpay.bean.BaseBiandanUnifiedpayRequest;
+import com.xingxi.unifiedpay.bean.BaseBiandanUnifiedpayResponse;
+import com.xingxi.unifiedpay.domain.MercUnifiedpayDTO;
+import com.xingxi.unifiedpay.repository.XingxiUnifiedpayRepository;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.BeansException;
+import org.springframework.context.ApplicationContext;
+import org.springframework.stereotype.Component;
+import org.springframework.util.Assert;
+import org.springframework.util.ObjectUtils;
+import org.springframework.util.ReflectionUtils;
+
+import java.lang.reflect.Method;
+
+
+@Slf4j
+@Component
+@RequiredArgsConstructor
+class XingxiUnifiedpayServiceImpl implements XingxiUnifiedpayServiceI {
+    private final XingxiUnifiedpayRepository biandanUnifiedpayRepository;
+    private final ApplicationContext applicationContext;
+
+    @SuppressWarnings("unchecked")
+    @Override
+    public <T extends BaseBiandanUnifiedpayResponse> T getResponse(BaseBiandanUnifiedpayRequest<T> request) throws Exception {
+        Long sellerId = request.getSellerId();
+        MercUnifiedpayDTO mercUnifiedpayDTO = getMercUnifiedpayDTOByMercId(sellerId);
+        String unifiedPayMethod = mercUnifiedpayDTO.getUnifiedPayMethod();
+
+        Object unifiedpayServiceI = null;
+
+        try {
+            unifiedpayServiceI = applicationContext.getBean(unifiedPayMethod);
+        } catch (BeansException e) {
+            log.debug("支付服务[" + unifiedPayMethod + "]不存在");
+            throw new RuntimeException("支付服务不存在");
+        }
+
+        String callMethod = request.getCallMethod();
+        Method invokeMethod = ReflectionUtils.findMethod(unifiedpayServiceI.getClass(), callMethod, MercUnifiedpayDTO.class, request.getClass());
+        if (ObjectUtils.isEmpty(invokeMethod)) {
+            log.debug("接口[" + callMethod + "]不支持");
+            throw new RuntimeException("接口不支持");
+        }
+
+        ReflectionUtils.makeAccessible(invokeMethod);
+        return (T) ReflectionUtils.invokeMethod(
+                invokeMethod,
+                unifiedpayServiceI,
+                mercUnifiedpayDTO,
+                request
+        );
+    }
+
+
+    private MercUnifiedpayDTO getMercUnifiedpayDTOByMercId(Long sellerId) {
+        Assert.notNull(sellerId, "[sellerId]不能为空");
+        // todo
+        MercUnifiedpayDTO mercUnifiedpayDTO = new MercUnifiedpayDTO();
+//        MercUnifiedpayDTO mercUnifiedpayDTO = biandanUnifiedpayRepository.selectMercUnifiedpayDTOByMercId(sellerId);
+//        log.debug("[{}]", mercUnifiedpayDTO);
+        return mercUnifiedpayDTO;
+    }
+
+
+}

+ 7 - 0
08.src/Xingxi/xingxi-pay-utils/xingxi-unifiedpay-spring-boot-starter/src/main/java/com/xingxi/unifiedpay/repository/XingxiUnifiedpayRepository.java

@@ -0,0 +1,7 @@
+package com.xingxi.unifiedpay.repository;
+
+public interface XingxiUnifiedpayRepository {
+//    MercUnifiedpayDTO selectMercUnifiedpayDTOByMercId(Long mercId);
+//
+//    MercUnifiedpayConfigDTO selectMercUnifiedpayConfigDTOByCallUnifiedpayMercId(Long mercId);
+}

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov