From b0dadbaa1f9ebae4ce9e8bd2ba1a004699b580f5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=85=AD=E5=A6=82?= <8775@163.com>
Date: Wed, 26 Feb 2025 09:38:11 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0Java17=E7=A4=BA=E4=BE=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../payment-api-java17/pom.xml | 16 ++
.../gitee/sop/payment/api/PaymentService.java | 7 +
.../payment-service-java17/.gitignore | 25 +++
.../payment-service-java17/pom.xml | 137 +++++++++++++
.../payment-service-java17/push-doc.sh | 1 +
.../ExamplePaymentJava17Application.java | 16 ++
.../gitee/sop/payment/open/OpenPayment.java | 37 ++++
.../payment/open/impl/OpenPaymentImpl.java | 44 ++++
.../open/req/PayOrderSearchRequest.java | 19 ++
.../open/req/PayTradeWapPayRequest.java | 193 ++++++++++++++++++
.../open/resp/PayOrderSearchResponse.java | 35 ++++
.../open/resp/PayTradeWapPayResponse.java | 21 ++
.../main/resources/application-dev.properties | 1 +
.../resources/application-test.properties | 2 +
.../src/main/resources/application.properties | 10 +
.../src/main/resources/doc.json | 27 +++
.../resources/i18n/isp/bizerror_en.properties | 10 +
.../i18n/isp/bizerror_zh_CN.properties | 14 ++
.../i18n/isp/goods_error_en.properties | 2 +
.../i18n/isp/goods_error_zh_CN.properties | 5 +
.../src/main/resources/smart-doc.json | 13 ++
.../com/gitee/sop/payment/DocPushTest.java | 14 ++
sop-example/example-payment-java17/pom.xml | 33 +++
23 files changed, 682 insertions(+)
create mode 100644 sop-example/example-payment-java17/payment-api-java17/pom.xml
create mode 100644 sop-example/example-payment-java17/payment-api-java17/src/main/java/com/gitee/sop/payment/api/PaymentService.java
create mode 100755 sop-example/example-payment-java17/payment-service-java17/.gitignore
create mode 100755 sop-example/example-payment-java17/payment-service-java17/pom.xml
create mode 100644 sop-example/example-payment-java17/payment-service-java17/push-doc.sh
create mode 100755 sop-example/example-payment-java17/payment-service-java17/src/main/java/com/gitee/sop/payment/ExamplePaymentJava17Application.java
create mode 100755 sop-example/example-payment-java17/payment-service-java17/src/main/java/com/gitee/sop/payment/open/OpenPayment.java
create mode 100755 sop-example/example-payment-java17/payment-service-java17/src/main/java/com/gitee/sop/payment/open/impl/OpenPaymentImpl.java
create mode 100755 sop-example/example-payment-java17/payment-service-java17/src/main/java/com/gitee/sop/payment/open/req/PayOrderSearchRequest.java
create mode 100755 sop-example/example-payment-java17/payment-service-java17/src/main/java/com/gitee/sop/payment/open/req/PayTradeWapPayRequest.java
create mode 100755 sop-example/example-payment-java17/payment-service-java17/src/main/java/com/gitee/sop/payment/open/resp/PayOrderSearchResponse.java
create mode 100755 sop-example/example-payment-java17/payment-service-java17/src/main/java/com/gitee/sop/payment/open/resp/PayTradeWapPayResponse.java
create mode 100755 sop-example/example-payment-java17/payment-service-java17/src/main/resources/application-dev.properties
create mode 100755 sop-example/example-payment-java17/payment-service-java17/src/main/resources/application-test.properties
create mode 100755 sop-example/example-payment-java17/payment-service-java17/src/main/resources/application.properties
create mode 100755 sop-example/example-payment-java17/payment-service-java17/src/main/resources/doc.json
create mode 100755 sop-example/example-payment-java17/payment-service-java17/src/main/resources/i18n/isp/bizerror_en.properties
create mode 100755 sop-example/example-payment-java17/payment-service-java17/src/main/resources/i18n/isp/bizerror_zh_CN.properties
create mode 100755 sop-example/example-payment-java17/payment-service-java17/src/main/resources/i18n/isp/goods_error_en.properties
create mode 100755 sop-example/example-payment-java17/payment-service-java17/src/main/resources/i18n/isp/goods_error_zh_CN.properties
create mode 100644 sop-example/example-payment-java17/payment-service-java17/src/main/resources/smart-doc.json
create mode 100755 sop-example/example-payment-java17/payment-service-java17/src/test/java/com/gitee/sop/payment/DocPushTest.java
create mode 100755 sop-example/example-payment-java17/pom.xml
diff --git a/sop-example/example-payment-java17/payment-api-java17/pom.xml b/sop-example/example-payment-java17/payment-api-java17/pom.xml
new file mode 100644
index 00000000..693ca655
--- /dev/null
+++ b/sop-example/example-payment-java17/payment-api-java17/pom.xml
@@ -0,0 +1,16 @@
+
+
+ 4.0.0
+ com.gitee.sop
+ payment-api-java17
+ 5.0.0-SNAPSHOT
+
+
+ 17
+ 17
+ UTF-8
+
+
+
diff --git a/sop-example/example-payment-java17/payment-api-java17/src/main/java/com/gitee/sop/payment/api/PaymentService.java b/sop-example/example-payment-java17/payment-api-java17/src/main/java/com/gitee/sop/payment/api/PaymentService.java
new file mode 100644
index 00000000..90310389
--- /dev/null
+++ b/sop-example/example-payment-java17/payment-api-java17/src/main/java/com/gitee/sop/payment/api/PaymentService.java
@@ -0,0 +1,7 @@
+package com.gitee.sop.payment.api;
+
+/**
+ * @author 六如
+ */
+public interface PaymentService {
+}
diff --git a/sop-example/example-payment-java17/payment-service-java17/.gitignore b/sop-example/example-payment-java17/payment-service-java17/.gitignore
new file mode 100755
index 00000000..18ccf36e
--- /dev/null
+++ b/sop-example/example-payment-java17/payment-service-java17/.gitignore
@@ -0,0 +1,25 @@
+target/
+!.mvn/wrapper/maven-wrapper.jar
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### NetBeans ###
+nbproject/private/
+build/
+nbbuild/
+dist/
+nbdist/
+.nb-gradle/
+/local-config/
diff --git a/sop-example/example-payment-java17/payment-service-java17/pom.xml b/sop-example/example-payment-java17/payment-service-java17/pom.xml
new file mode 100755
index 00000000..e30551cd
--- /dev/null
+++ b/sop-example/example-payment-java17/payment-service-java17/pom.xml
@@ -0,0 +1,137 @@
+
+
+
+ 4.0.0
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ 2.6.15
+
+
+
+ com.gitee.sop
+ payment-service-java17
+ 5.0.0-SNAPSHOT
+
+
+ 17
+ 17
+ 17
+ UTF-8
+
+ 3.2.16
+
+
+
+
+ com.gitee.sop
+ payment-api-java17
+ 5.0.0-SNAPSHOT
+
+
+
+ com.gitee.sop
+ sop-spring-boot-starter
+ 5.0.0-SNAPSHOT
+
+
+
+ org.apache.dubbo
+ dubbo-nacos-spring-boot-starter
+
+
+
+ org.apache.dubbo
+ dubbo-zookeeper-curator5-spring-boot-starter
+
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+
+ org.projectlombok
+ lombok
+ 1.18.34
+ provided
+
+
+
+
+
+
+ org.apache.dubbo
+ dubbo-bom
+ ${dubbo.version}
+ pom
+ import
+
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+ 2.12.4
+
+ true
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.6.2
+
+ 17
+ 17
+
+ -parameters
+
+
+
+
+
+ com.ly.smart-doc
+ smart-doc-maven-plugin
+ 3.0.9
+
+
+ ./src/main/resources/smart-doc.json
+
+ ${project.artifactId}
+
+
+
+ com.gitee.sop
+ sop-service-support
+ 5.0.0-SNAPSHOT
+
+
+
+
+
+
+
+
+ spring-milestones
+ Spring Milestones
+ https://repo.spring.io/milestone
+
+
+ maven_central
+ Maven Central
+ https://repo.maven.apache.org/maven2/
+
+
+
+
diff --git a/sop-example/example-payment-java17/payment-service-java17/push-doc.sh b/sop-example/example-payment-java17/payment-service-java17/push-doc.sh
new file mode 100644
index 00000000..7068d908
--- /dev/null
+++ b/sop-example/example-payment-java17/payment-service-java17/push-doc.sh
@@ -0,0 +1 @@
+mvn -Dfile.encoding=UTF-8 -Dcheckstyle.skip=true smart-doc:torna-rpc
diff --git a/sop-example/example-payment-java17/payment-service-java17/src/main/java/com/gitee/sop/payment/ExamplePaymentJava17Application.java b/sop-example/example-payment-java17/payment-service-java17/src/main/java/com/gitee/sop/payment/ExamplePaymentJava17Application.java
new file mode 100755
index 00000000..b9cb2a06
--- /dev/null
+++ b/sop-example/example-payment-java17/payment-service-java17/src/main/java/com/gitee/sop/payment/ExamplePaymentJava17Application.java
@@ -0,0 +1,16 @@
+package com.gitee.sop.payment;
+
+import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+@EnableDubbo
+public class ExamplePaymentJava17Application {
+
+ public static void main(String[] args) {
+ SpringApplication.run(ExamplePaymentJava17Application.class, args);
+ }
+
+}
+
diff --git a/sop-example/example-payment-java17/payment-service-java17/src/main/java/com/gitee/sop/payment/open/OpenPayment.java b/sop-example/example-payment-java17/payment-service-java17/src/main/java/com/gitee/sop/payment/open/OpenPayment.java
new file mode 100755
index 00000000..007122b2
--- /dev/null
+++ b/sop-example/example-payment-java17/payment-service-java17/src/main/java/com/gitee/sop/payment/open/OpenPayment.java
@@ -0,0 +1,37 @@
+package com.gitee.sop.payment.open;
+
+import com.gitee.sop.payment.open.req.PayOrderSearchRequest;
+import com.gitee.sop.payment.open.req.PayTradeWapPayRequest;
+import com.gitee.sop.payment.open.resp.PayOrderSearchResponse;
+import com.gitee.sop.payment.open.resp.PayTradeWapPayResponse;
+import com.gitee.sop.support.annotation.Open;
+
+/**
+ * 支付接口
+ *
+ * @author 六如
+ */
+public interface OpenPayment {
+
+ /**
+ * 手机网站支付接口
+ *
+ * @apiNote 该接口是页面跳转接口,用于生成用户访问跳转链接。
+ * 请在服务端执行SDK中pageExecute方法,读取响应中的body()结果。
+ * 该结果用于跳转到页面,返回到用户浏览器渲染或重定向跳转到页面。
+ * 具体使用方法请参考 接入指南
+ */
+ @Open("pay.trade.wap.pay")
+ PayTradeWapPayResponse tradeWapPay(PayTradeWapPayRequest request);
+
+
+ /**
+ * 订单查询接口
+ *
+ * @param request
+ * @return
+ */
+ @Open("pay.order.search")
+ PayOrderSearchResponse orderSearch(PayOrderSearchRequest request);
+
+}
diff --git a/sop-example/example-payment-java17/payment-service-java17/src/main/java/com/gitee/sop/payment/open/impl/OpenPaymentImpl.java b/sop-example/example-payment-java17/payment-service-java17/src/main/java/com/gitee/sop/payment/open/impl/OpenPaymentImpl.java
new file mode 100755
index 00000000..d22f0e13
--- /dev/null
+++ b/sop-example/example-payment-java17/payment-service-java17/src/main/java/com/gitee/sop/payment/open/impl/OpenPaymentImpl.java
@@ -0,0 +1,44 @@
+package com.gitee.sop.payment.open.impl;
+
+import com.gitee.sop.payment.open.OpenPayment;
+import com.gitee.sop.payment.open.req.PayOrderSearchRequest;
+import com.gitee.sop.payment.open.req.PayTradeWapPayRequest;
+import com.gitee.sop.payment.open.resp.PayOrderSearchResponse;
+import com.gitee.sop.payment.open.resp.PayTradeWapPayResponse;
+import org.apache.dubbo.config.annotation.DubboService;
+import org.springframework.beans.factory.annotation.Value;
+
+import java.util.UUID;
+
+
+/**
+ * 开放接口实现
+ *
+ * @author 六如
+ */
+@DubboService(validation = "true")
+public class OpenPaymentImpl implements OpenPayment {
+
+
+ @Value("${dubbo.labels:}")
+ private String env;
+
+
+ @Override
+ public PayTradeWapPayResponse tradeWapPay(PayTradeWapPayRequest request) {
+ PayTradeWapPayResponse payTradeWapPayResponse = new PayTradeWapPayResponse();
+ payTradeWapPayResponse.setPageRedirectionData(UUID.randomUUID().toString());
+ return payTradeWapPayResponse;
+ }
+
+ @Override
+ public PayOrderSearchResponse orderSearch(PayOrderSearchRequest request) {
+ PayOrderSearchResponse payOrderSearchResponse = new PayOrderSearchResponse();
+ payOrderSearchResponse.setOrderNo(request.getOrderNo());
+ payOrderSearchResponse.setPayNo("xxxx");
+ payOrderSearchResponse.setPayUserId(111L);
+ payOrderSearchResponse.setPayUserName("Jim");
+
+ return payOrderSearchResponse;
+ }
+}
diff --git a/sop-example/example-payment-java17/payment-service-java17/src/main/java/com/gitee/sop/payment/open/req/PayOrderSearchRequest.java b/sop-example/example-payment-java17/payment-service-java17/src/main/java/com/gitee/sop/payment/open/req/PayOrderSearchRequest.java
new file mode 100755
index 00000000..a69c8659
--- /dev/null
+++ b/sop-example/example-payment-java17/payment-service-java17/src/main/java/com/gitee/sop/payment/open/req/PayOrderSearchRequest.java
@@ -0,0 +1,19 @@
+package com.gitee.sop.payment.open.req;
+
+import lombok.Data;
+import org.hibernate.validator.constraints.Length;
+
+/**
+ * @author 六如
+ */
+@Data
+public class PayOrderSearchRequest {
+
+ /**
+ * 订单编号
+ * @mock xxxx
+ */
+ @Length(max = 64) // 最大长度
+ private String orderNo;
+
+}
diff --git a/sop-example/example-payment-java17/payment-service-java17/src/main/java/com/gitee/sop/payment/open/req/PayTradeWapPayRequest.java b/sop-example/example-payment-java17/payment-service-java17/src/main/java/com/gitee/sop/payment/open/req/PayTradeWapPayRequest.java
new file mode 100755
index 00000000..e57387a2
--- /dev/null
+++ b/sop-example/example-payment-java17/payment-service-java17/src/main/java/com/gitee/sop/payment/open/req/PayTradeWapPayRequest.java
@@ -0,0 +1,193 @@
+package com.gitee.sop.payment.open.req;
+
+import lombok.Data;
+import org.hibernate.validator.constraints.Length;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import java.math.BigDecimal;
+import java.util.List;
+
+/**
+ * pay.trade.wap.pay(手机网站支付接口)
+ *
+ * @author 六如
+ * https://opendocs.alipay.com/open/29ae8cb6_alipay.trade.wap.pay?pathHash=1ef587fd&ref=api&scene=21
+ */
+@Data
+public class PayTradeWapPayRequest {
+
+
+ /**
+ * 商户网站唯一订单号
+ *
+ * @mock 70501111111S001111119
+ */
+ @Length(max = 64)
+ @NotBlank(message = "商户网站唯一订单号必填")
+ private String outTradeNo;
+
+ /**
+ * 订单总金额.单位为元,精确到小数点后两位,取值范围:[0.01,100000000]
+ *
+ * @mock 9.00
+ */
+ @NotNull(message = "订单总金额不能为空")
+ private BigDecimal totalAmount;
+
+
+ /**
+ * 订单标题。注意:不可使用特殊字符,如 /,=,& 等。
+ *
+ * @mock 大乐透
+ */
+ @Length(max = 256)
+ @NotBlank(message = "订单标题不能为空")
+ private String subject;
+
+ /**
+ * 销售产品码,商家和支付平台签约的产品码。手机网站支付为:QUICK_WAP_WAY
+ *
+ * @mock QUICK_WAP_WAY
+ */
+ @NotBlank(message = "销售产品码不能为空")
+ @Length(max = 64)
+ private String productCode;
+
+
+ /**
+ * 针对用户授权接口,获取用户相关数据时,用于标识用户授权关系
+ *
+ * @mock appopenBb64d181d0146481ab6a762c00714cC27
+ */
+ @Length(max = 40)
+ private String authToken;
+
+ /**
+ * 用户付款中途退出返回商户网站的地址
+ *
+ * @mock http://www.taobao.com/product/113714.html
+ */
+ @Length(max = 400)
+ private String quit_url;
+
+ /**
+ * 订单包含的商品列表信息,json格式,其它说明详见商品明细说明
+ */
+ private List goodsDetail;
+
+ /**
+ * 绝对超时时间,格式为yyyy-MM-dd HH:mm:ss。超时时间范围:1m~15d。
+ *
+ * @mock 2016-12-31 10:05:00
+ */
+ @Length(max = 32)
+ private String timeExpire;
+
+ /**
+ * 商户传入业务信息,具体值要和支付平台约定,应用于安全,营销等参数直传场景,格式为json格式
+ *
+ * @mock {"mc_create_trade_ip":"127.0.0.1"}
+ */
+ @Length(max = 512)
+ private String businessParams;
+
+ /**
+ * 公用回传参数,如果请求时传递了该参数,则返回给商户时会回传该参数。支付平台只会在同步返回(包括跳转回商户网站)和异步通知时将该参数原样返回。本参数必须进行UrlEncode之后才可以发送给支付平台。
+ *
+ * @mock merchantBizType%3d3C%26merchantBizNo%3d2016010101111
+ */
+ @Length(max = 512)
+ private String passbackParams;
+
+ /**
+ * 商户原始订单号,最大长度限制32位
+ *
+ * @mock {"mc_create_trade_ip":"127.0.0.1"}
+ */
+ @Length(max = 32)
+ private String merchantOrderNo;
+
+ // ---
+
+ @Data
+ public static class GoodsDetail {
+ /**
+ * 商品的编号
+ *
+ * @mock apple-01
+ */
+ @NotBlank
+ @Length(max = 64)
+ private String goodsId;
+
+
+ /**
+ * 商品名称
+ *
+ * @mock ipad
+ */
+ @NotBlank
+ @Length(max = 256)
+ private String goodsName;
+
+ /**
+ * 商品数量
+ *
+ * @mock 1
+ */
+ @NotNull
+ private Integer quantity;
+
+ /**
+ * 商品单价,单位为元
+ *
+ * @mock 2000
+ */
+ @NotNull
+ private BigDecimal price;
+
+ /**
+ * 支付平台定义的统一商品编号
+ *
+ * @mock 20010001
+ */
+ @Length(max = 32)
+ private String alipayGoodsId;
+
+ /**
+ * 商品类目
+ *
+ * @mock 34543238
+ */
+ @Length(max = 24)
+ private String goodsCategory;
+
+ /**
+ * 商品类目树,从商品类目根节点到叶子节点的类目id组成,类目id值使用|分割
+ *
+ * @mock 124868003|126232002|126252004
+ */
+ @Length(max = 128)
+ private String categoriesTree;
+
+ /**
+ * 商品描述信息
+ *
+ * @mock 特价手机
+ */
+ @Length(max = 1000)
+ private String body;
+
+ /**
+ * 商品的展示地址
+ *
+ * @mock http://www.alipay.com/xxx.jpg
+ */
+ @Length(max = 400)
+ private String showUrl;
+
+
+ }
+
+}
diff --git a/sop-example/example-payment-java17/payment-service-java17/src/main/java/com/gitee/sop/payment/open/resp/PayOrderSearchResponse.java b/sop-example/example-payment-java17/payment-service-java17/src/main/java/com/gitee/sop/payment/open/resp/PayOrderSearchResponse.java
new file mode 100755
index 00000000..2714de7a
--- /dev/null
+++ b/sop-example/example-payment-java17/payment-service-java17/src/main/java/com/gitee/sop/payment/open/resp/PayOrderSearchResponse.java
@@ -0,0 +1,35 @@
+package com.gitee.sop.payment.open.resp;
+
+import lombok.Data;
+
+/**
+ * @author 六如
+ */
+@Data
+public class PayOrderSearchResponse {
+
+ /**
+ * 订单编号
+ */
+ private String orderNo;
+
+ /**
+ * 支付编号
+ */
+ private String payNo;
+
+ /**
+ * 支付人id
+ */
+ private Long payUserId;
+
+ /**
+ * 支付人姓名
+ */
+ private String payUserName;
+
+ /**
+ * 备注
+ */
+ private String remark;
+}
diff --git a/sop-example/example-payment-java17/payment-service-java17/src/main/java/com/gitee/sop/payment/open/resp/PayTradeWapPayResponse.java b/sop-example/example-payment-java17/payment-service-java17/src/main/java/com/gitee/sop/payment/open/resp/PayTradeWapPayResponse.java
new file mode 100755
index 00000000..a38675ed
--- /dev/null
+++ b/sop-example/example-payment-java17/payment-service-java17/src/main/java/com/gitee/sop/payment/open/resp/PayTradeWapPayResponse.java
@@ -0,0 +1,21 @@
+package com.gitee.sop.payment.open.resp;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * @author 六如
+ */
+@Data
+public class PayTradeWapPayResponse {
+
+ /**
+ * 用于跳转支付平台页面的信息,POST和GET方法生成内容不同:使用POST方法执行,结果为html form表单,在浏览器渲染即可
使用GET方法会得到支付平台URL,需要打开或重定向到该URL。建议使用POST方式。
+ *
+ * @mock 请参考响应示例
+ */
+ @NotNull
+ private String pageRedirectionData;
+
+}
diff --git a/sop-example/example-payment-java17/payment-service-java17/src/main/resources/application-dev.properties b/sop-example/example-payment-java17/payment-service-java17/src/main/resources/application-dev.properties
new file mode 100755
index 00000000..bfead63f
--- /dev/null
+++ b/sop-example/example-payment-java17/payment-service-java17/src/main/resources/application-dev.properties
@@ -0,0 +1 @@
+dubbo.registry.address=zookeeper://localhost:2181
diff --git a/sop-example/example-payment-java17/payment-service-java17/src/main/resources/application-test.properties b/sop-example/example-payment-java17/payment-service-java17/src/main/resources/application-test.properties
new file mode 100755
index 00000000..53e5d0bc
--- /dev/null
+++ b/sop-example/example-payment-java17/payment-service-java17/src/main/resources/application-test.properties
@@ -0,0 +1,2 @@
+
+dubbo.registry.address=nacos://localhost:8848
diff --git a/sop-example/example-payment-java17/payment-service-java17/src/main/resources/application.properties b/sop-example/example-payment-java17/payment-service-java17/src/main/resources/application.properties
new file mode 100755
index 00000000..17ba6fa9
--- /dev/null
+++ b/sop-example/example-payment-java17/payment-service-java17/src/main/resources/application.properties
@@ -0,0 +1,10 @@
+spring.profiles.active=dev
+
+server.port=7072
+spring.application.name=payment-service
+
+dubbo.protocol.name=dubbo
+dubbo.protocol.port=-1
+dubbo.application.qos-enable=false
+dubbo.consumer.check=false
+dubbo.registry.address=zookeeper://localhost:2181
diff --git a/sop-example/example-payment-java17/payment-service-java17/src/main/resources/doc.json b/sop-example/example-payment-java17/payment-service-java17/src/main/resources/doc.json
new file mode 100755
index 00000000..2e1ba445
--- /dev/null
+++ b/sop-example/example-payment-java17/payment-service-java17/src/main/resources/doc.json
@@ -0,0 +1,27 @@
+{
+ // 开启推送
+ "enable": true,
+ // 扫描package,多个用;隔开
+ "basePackage": "com.gitee.sop.payment.open",
+ // 推送URL,IP端口对应Torna服务器
+ "url": "http://localhost:7700/api",
+ // 模块token
+ "token": "34ff76952462413982d21219cf099d46",
+ // 推送人
+ "author": "Jim",
+ // 打开调试:true/false
+ "debug": true,
+ // 是否替换文档,true:替换,false:不替换(追加)。默认:true
+ "isReplace": true,
+ // 第三方jar中的class配置
+ "jarClass": {
+ "com.xx.Page": {
+ "records": { "value": "查询数据列表", "example": "" },
+ "total": { "value": "总数", "example": "100" },
+ "size": { "value": "页数", "example": "10" },
+ "current": { "value": "当前页", "example": "1" },
+ "countId": { "hidden": true },
+ "orders": { "hidden": true }
+ }
+ }
+}
diff --git a/sop-example/example-payment-java17/payment-service-java17/src/main/resources/i18n/isp/bizerror_en.properties b/sop-example/example-payment-java17/payment-service-java17/src/main/resources/i18n/isp/bizerror_en.properties
new file mode 100755
index 00000000..48d134c8
--- /dev/null
+++ b/sop-example/example-payment-java17/payment-service-java17/src/main/resources/i18n/isp/bizerror_en.properties
@@ -0,0 +1,10 @@
+# 错误配置
+
+# 系统配置
+isp.error_isv.common-error=The system is busy.
+isp.error_isv.invalid-parameter=Invalid parameter, {0}
+
+# ==== 参数配置 ====
+
+goods.remark.notNull=The goods_remark can not be null
+goods.comment.length=The goods_comment length must >= {0} and <= {1}
\ No newline at end of file
diff --git a/sop-example/example-payment-java17/payment-service-java17/src/main/resources/i18n/isp/bizerror_zh_CN.properties b/sop-example/example-payment-java17/payment-service-java17/src/main/resources/i18n/isp/bizerror_zh_CN.properties
new file mode 100755
index 00000000..4ac48428
--- /dev/null
+++ b/sop-example/example-payment-java17/payment-service-java17/src/main/resources/i18n/isp/bizerror_zh_CN.properties
@@ -0,0 +1,14 @@
+# 错误配置
+
+# 系统繁忙
+isp.error_isv.common-error=\u7cfb\u7edf\u7e41\u5fd9
+# 参数无效
+isp.error_isv.invalid-parameter=\u53c2\u6570\u65e0\u6548, {0}
+
+# ==== 参数配置 ====
+
+# 商品备注不能为空
+goods.remark.notNull=\u5546\u54c1\u5907\u6ce8\u4e0d\u80fd\u4e3a\u7a7a
+# 商品评论长度必须在{0}和{1}之间
+goods.comment.length=\u5546\u54c1\u8bc4\u8bba\u957f\u5ea6\u5fc5\u987b\u5728{0}\u548c{1}\u4e4b\u95f4
+
diff --git a/sop-example/example-payment-java17/payment-service-java17/src/main/resources/i18n/isp/goods_error_en.properties b/sop-example/example-payment-java17/payment-service-java17/src/main/resources/i18n/isp/goods_error_en.properties
new file mode 100755
index 00000000..195c7d2b
--- /dev/null
+++ b/sop-example/example-payment-java17/payment-service-java17/src/main/resources/i18n/isp/goods_error_en.properties
@@ -0,0 +1,2 @@
+isp.goods_error_100=the goods_name can NOT be null
+isp.goods_error_101=the goods_name must bigger than {0}
\ No newline at end of file
diff --git a/sop-example/example-payment-java17/payment-service-java17/src/main/resources/i18n/isp/goods_error_zh_CN.properties b/sop-example/example-payment-java17/payment-service-java17/src/main/resources/i18n/isp/goods_error_zh_CN.properties
new file mode 100755
index 00000000..af1a43bc
--- /dev/null
+++ b/sop-example/example-payment-java17/payment-service-java17/src/main/resources/i18n/isp/goods_error_zh_CN.properties
@@ -0,0 +1,5 @@
+# 商品名字不能为空
+isp.goods_error_100=\u5546\u54C1\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A
+
+# 商品名称太短,不能小于{0}个字
+isp.goods_error_101=\u5546\u54C1\u540D\u79F0\u592A\u77ED\uFF0C\u4E0D\u80FD\u5C0F\u4E8E{0}\u4E2A\u5B57
\ No newline at end of file
diff --git a/sop-example/example-payment-java17/payment-service-java17/src/main/resources/smart-doc.json b/sop-example/example-payment-java17/payment-service-java17/src/main/resources/smart-doc.json
new file mode 100644
index 00000000..29e2956a
--- /dev/null
+++ b/sop-example/example-payment-java17/payment-service-java17/src/main/resources/smart-doc.json
@@ -0,0 +1,13 @@
+{
+ "framework": "sop",
+ "outPath": "target/doc",
+ "projectName": "项目",
+ "packageFilters": "com.gitee.sop.payment.open.*",
+ "openUrl": "http://localhost:7700/api", // torna服务器地址
+ "appToken": "34ff76952462413982d21219cf099d46", // torna应用token
+ "debugEnvName":"本地环境",
+ "debugEnvUrl":"http://127.0.0.1:8081",
+ "tornaDebug": true,
+ "replace": true,
+ "showValidation": false
+}
diff --git a/sop-example/example-payment-java17/payment-service-java17/src/test/java/com/gitee/sop/payment/DocPushTest.java b/sop-example/example-payment-java17/payment-service-java17/src/test/java/com/gitee/sop/payment/DocPushTest.java
new file mode 100755
index 00000000..eabde25a
--- /dev/null
+++ b/sop-example/example-payment-java17/payment-service-java17/src/test/java/com/gitee/sop/payment/DocPushTest.java
@@ -0,0 +1,14 @@
+package com.gitee.sop.payment;
+
+
+import cn.torna.swaggerplugin.SwaggerPlugin;
+
+/**
+ * 推送swagger文档
+ * @author thc
+ */
+public class DocPushTest {
+ public static void main(String[] args) {
+ SwaggerPlugin.pushDoc();
+ }
+}
diff --git a/sop-example/example-payment-java17/pom.xml b/sop-example/example-payment-java17/pom.xml
new file mode 100755
index 00000000..6e1d4c82
--- /dev/null
+++ b/sop-example/example-payment-java17/pom.xml
@@ -0,0 +1,33 @@
+
+
+
+ 4.0.0
+ com.gitee.sop
+ example-payment-java17
+ 5.0.0-SNAPSHOT
+ pom
+
+
+ payment-api-java17
+ payment-service-java17
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.6.2
+
+ 17
+ 17
+
+ -parameters
+
+
+
+
+
+