Commit 86f88ea590888b507f6883e2e1a7a268ec9d12c5
1 parent
494711a6
reactor:移除 pay 的 api 包
Showing
265 changed files
with
1221 additions
and
1295 deletions
pom.xml
| ... | ... | @@ -38,7 +38,7 @@ |
| 38 | 38 | <maven.compiler.source>${java.version}</maven.compiler.source> |
| 39 | 39 | <maven.compiler.target>${java.version}</maven.compiler.target> |
| 40 | 40 | <maven-surefire-plugin.version>3.2.2</maven-surefire-plugin.version> |
| 41 | - <maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version> | |
| 41 | + <maven-compiler-plugin.version>3.14.0</maven-compiler-plugin.version> | |
| 42 | 42 | <flatten-maven-plugin.version>1.6.0</flatten-maven-plugin.version> |
| 43 | 43 | <!-- 看看咋放到 bom 里 --> |
| 44 | 44 | <lombok.version>1.18.36</lombok.version> | ... | ... |
yudao-module-pay/pom.xml
| ... | ... | @@ -9,11 +9,7 @@ |
| 9 | 9 | </parent> |
| 10 | 10 | <modelVersion>4.0.0</modelVersion> |
| 11 | 11 | <artifactId>yudao-module-pay</artifactId> |
| 12 | - <packaging>pom</packaging> | |
| 13 | - <modules> | |
| 14 | - <module>yudao-module-pay-api</module> | |
| 15 | - <module>yudao-module-pay-biz</module> | |
| 16 | - </modules> | |
| 12 | + <packaging>jar</packaging> | |
| 17 | 13 | |
| 18 | 14 | <name>${project.artifactId}</name> |
| 19 | 15 | <description> |
| ... | ... | @@ -21,4 +17,73 @@ |
| 21 | 17 | 例如说:商户、应用、支付、退款等等 |
| 22 | 18 | </description> |
| 23 | 19 | |
| 20 | + | |
| 21 | + <dependencies> | |
| 22 | + <dependency> | |
| 23 | + <groupId>cn.iocoder.boot</groupId> | |
| 24 | + <artifactId>yudao-module-system</artifactId> | |
| 25 | + <version>${revision}</version> | |
| 26 | + </dependency> | |
| 27 | + | |
| 28 | + <!-- 业务组件 --> | |
| 29 | + <dependency> | |
| 30 | + <groupId>cn.iocoder.boot</groupId> | |
| 31 | + <artifactId>yudao-spring-boot-starter-biz-tenant</artifactId> | |
| 32 | + </dependency> | |
| 33 | + | |
| 34 | + <!-- Web 相关 --> | |
| 35 | + <dependency> | |
| 36 | + <groupId>cn.iocoder.boot</groupId> | |
| 37 | + <artifactId>yudao-spring-boot-starter-security</artifactId> | |
| 38 | + </dependency> | |
| 39 | + | |
| 40 | + <!-- DB 相关 --> | |
| 41 | + <dependency> | |
| 42 | + <groupId>cn.iocoder.boot</groupId> | |
| 43 | + <artifactId>yudao-spring-boot-starter-mybatis</artifactId> | |
| 44 | + </dependency> | |
| 45 | + | |
| 46 | + <dependency> | |
| 47 | + <groupId>cn.iocoder.boot</groupId> | |
| 48 | + <artifactId>yudao-spring-boot-starter-redis</artifactId> | |
| 49 | + </dependency> | |
| 50 | + | |
| 51 | + <!-- Job 定时任务相关 --> | |
| 52 | + <dependency> | |
| 53 | + <groupId>cn.iocoder.boot</groupId> | |
| 54 | + <artifactId>yudao-spring-boot-starter-job</artifactId> | |
| 55 | + </dependency> | |
| 56 | + | |
| 57 | + <!-- Test 测试相关 --> | |
| 58 | + <dependency> | |
| 59 | + <groupId>cn.iocoder.boot</groupId> | |
| 60 | + <artifactId>yudao-spring-boot-starter-test</artifactId> | |
| 61 | + <scope>test</scope> | |
| 62 | + </dependency> | |
| 63 | + | |
| 64 | + <!-- 工具类相关 --> | |
| 65 | + <dependency> | |
| 66 | + <groupId>cn.iocoder.boot</groupId> | |
| 67 | + <artifactId>yudao-spring-boot-starter-excel</artifactId> | |
| 68 | + </dependency> | |
| 69 | + | |
| 70 | + <!-- 三方云服务相关 --> | |
| 71 | + <dependency> | |
| 72 | + <groupId>com.alipay.sdk</groupId> | |
| 73 | + <artifactId>alipay-sdk-java</artifactId> | |
| 74 | + <version>4.35.79.ALL</version> | |
| 75 | + <exclusions> | |
| 76 | + <exclusion> | |
| 77 | + <groupId>org.bouncycastle</groupId> | |
| 78 | + <artifactId>bcprov-jdk15on</artifactId> | |
| 79 | + </exclusion> | |
| 80 | + </exclusions> | |
| 81 | + </dependency> | |
| 82 | + <dependency> | |
| 83 | + <groupId>com.github.binarywang</groupId> | |
| 84 | + <artifactId>weixin-java-pay</artifactId> | |
| 85 | + </dependency> | |
| 86 | + | |
| 87 | + </dependencies> | |
| 88 | + | |
| 24 | 89 | </project> | ... | ... |
yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/api/notify/dto/PayOrderNotifyReqDTO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/api/notify/dto/PayOrderNotifyReqDTO.java
yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/api/notify/dto/PayRefundNotifyReqDTO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/api/notify/dto/PayRefundNotifyReqDTO.java
yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/api/notify/dto/PayTransferNotifyReqDTO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/api/notify/dto/PayTransferNotifyReqDTO.java
yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/api/notify/package-info.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/api/notify/package-info.java
yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/api/order/PayOrderApi.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/api/order/PayOrderApi.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/api/order/PayOrderApiImpl.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/api/order/PayOrderApiImpl.java
yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/api/order/dto/PayOrderCreateReqDTO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/api/order/dto/PayOrderCreateReqDTO.java
yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/api/order/dto/PayOrderRespDTO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/api/order/dto/PayOrderRespDTO.java
yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/api/package-info.java
0 → 100644
yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/api/refund/PayRefundApi.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/api/refund/PayRefundApi.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/api/refund/PayRefundApiImpl.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/api/refund/PayRefundApiImpl.java
yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/api/refund/dto/PayRefundCreateReqDTO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/api/refund/dto/PayRefundCreateReqDTO.java
yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/api/refund/dto/PayRefundRespDTO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/api/refund/dto/PayRefundRespDTO.java
yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/api/transfer/PayTransferApi.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/api/transfer/PayTransferApi.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/api/transfer/PayTransferApiImpl.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/api/transfer/PayTransferApiImpl.java
yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/api/transfer/dto/PayTransferCreateReqDTO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/api/transfer/dto/PayTransferCreateReqDTO.java
yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/api/transfer/dto/PayTransferCreateRespDTO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/api/transfer/dto/PayTransferCreateRespDTO.java
yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/api/transfer/dto/PayTransferRespDTO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/api/transfer/dto/PayTransferRespDTO.java
yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/api/wallet/PayWalletApi.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/api/wallet/PayWalletApi.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/api/wallet/PayWalletApiImpl.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/api/wallet/PayWalletApiImpl.java
yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/api/wallet/dto/PayWalletAddBalanceReqDTO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/api/wallet/dto/PayWalletAddBalanceReqDTO.java
yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/api/wallet/dto/PayWalletRespDTO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/api/wallet/dto/PayWalletRespDTO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/PayAppController.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/PayAppController.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/vo/PayAppBaseVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/vo/PayAppBaseVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/vo/PayAppCreateReqVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/vo/PayAppCreateReqVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/vo/PayAppPageItemRespVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/vo/PayAppPageItemRespVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/vo/PayAppPageReqVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/vo/PayAppPageReqVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/vo/PayAppRespVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/vo/PayAppRespVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/vo/PayAppUpdateReqVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/vo/PayAppUpdateReqVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/vo/PayAppUpdateStatusReqVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/vo/PayAppUpdateStatusReqVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/channel/PayChannelController.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/channel/PayChannelController.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/channel/vo/PayChannelBaseVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/channel/vo/PayChannelBaseVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/channel/vo/PayChannelCreateReqVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/channel/vo/PayChannelCreateReqVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/channel/vo/PayChannelRespVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/channel/vo/PayChannelRespVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/channel/vo/PayChannelUpdateReqVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/channel/vo/PayChannelUpdateReqVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/demo/PayDemoOrderController.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/demo/PayDemoOrderController.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/demo/PayDemoWithdrawController.http renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/demo/PayDemoWithdrawController.http
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/demo/PayDemoWithdrawController.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/demo/PayDemoWithdrawController.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/demo/vo/order/PayDemoOrderCreateReqVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/demo/vo/order/PayDemoOrderCreateReqVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/demo/vo/order/PayDemoOrderRespVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/demo/vo/order/PayDemoOrderRespVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/demo/vo/withdraw/PayDemoWithdrawCreateReqVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/demo/vo/withdraw/PayDemoWithdrawCreateReqVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/demo/vo/withdraw/PayDemoWithdrawRespVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/demo/vo/withdraw/PayDemoWithdrawRespVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/notify/PayNotifyController.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/notify/PayNotifyController.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/notify/vo/PayNotifyTaskDetailRespVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/notify/vo/PayNotifyTaskDetailRespVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/notify/vo/PayNotifyTaskPageReqVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/notify/vo/PayNotifyTaskPageReqVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/notify/vo/PayNotifyTaskRespVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/notify/vo/PayNotifyTaskRespVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/PayOrderController.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/PayOrderController.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderBaseVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderBaseVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderDetailsRespVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderDetailsRespVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderExcelVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderExcelVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderExportReqVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderExportReqVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderPageItemRespVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderPageItemRespVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderPageReqVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderPageReqVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderRespVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderRespVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderSubmitReqVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderSubmitReqVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderSubmitRespVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderSubmitRespVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/PayRefundController.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/PayRefundController.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundBaseVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundBaseVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundDetailsRespVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundDetailsRespVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundExcelVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundExcelVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundExportReqVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundExportReqVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundPageItemRespVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundPageItemRespVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundPageReqVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundPageReqVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/transfer/PayTransferController.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/transfer/PayTransferController.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/transfer/vo/PayTransferCreateRespVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/transfer/vo/PayTransferCreateRespVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/transfer/vo/PayTransferPageReqVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/transfer/vo/PayTransferPageReqVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/transfer/vo/PayTransferRespVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/transfer/vo/PayTransferRespVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/wallet/PayWalletController.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/wallet/PayWalletController.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/wallet/PayWalletRechargeController.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/wallet/PayWalletRechargeController.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/wallet/PayWalletRechargePackageController.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/wallet/PayWalletRechargePackageController.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/wallet/PayWalletTransactionController.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/wallet/PayWalletTransactionController.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/wallet/vo/rechargepackage/WalletRechargePackageBaseVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/wallet/vo/rechargepackage/WalletRechargePackageBaseVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/wallet/vo/rechargepackage/WalletRechargePackageCreateReqVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/wallet/vo/rechargepackage/WalletRechargePackageCreateReqVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/wallet/vo/rechargepackage/WalletRechargePackagePageReqVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/wallet/vo/rechargepackage/WalletRechargePackagePageReqVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/wallet/vo/rechargepackage/WalletRechargePackageRespVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/wallet/vo/rechargepackage/WalletRechargePackageRespVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/wallet/vo/rechargepackage/WalletRechargePackageUpdateReqVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/wallet/vo/rechargepackage/WalletRechargePackageUpdateReqVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/wallet/vo/transaction/PayWalletTransactionPageReqVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/wallet/vo/transaction/PayWalletTransactionPageReqVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/wallet/vo/transaction/PayWalletTransactionRespVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/wallet/vo/transaction/PayWalletTransactionRespVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/wallet/vo/wallet/PayWalletBaseVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/wallet/vo/wallet/PayWalletBaseVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/wallet/vo/wallet/PayWalletPageReqVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/wallet/vo/wallet/PayWalletPageReqVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/wallet/vo/wallet/PayWalletRespVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/wallet/vo/wallet/PayWalletRespVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/wallet/vo/wallet/PayWalletUpdateBalanceReqVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/wallet/vo/wallet/PayWalletUpdateBalanceReqVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/wallet/vo/wallet/PayWalletUserReqVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/wallet/vo/wallet/PayWalletUserReqVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/channel/AppPayChannelController.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/app/channel/AppPayChannelController.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/order/AppPayOrderController.http renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/app/order/AppPayOrderController.http
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/order/AppPayOrderController.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/app/order/AppPayOrderController.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/order/vo/AppPayOrderSubmitReqVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/app/order/vo/AppPayOrderSubmitReqVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/order/vo/AppPayOrderSubmitRespVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/app/order/vo/AppPayOrderSubmitRespVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/transfer/AppPayTransferController.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/app/transfer/AppPayTransferController.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/wallet/AppPayWalletController.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/app/wallet/AppPayWalletController.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/wallet/AppPayWalletRechargeController.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/app/wallet/AppPayWalletRechargeController.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/wallet/AppPayWalletRechargePackageController.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/app/wallet/AppPayWalletRechargePackageController.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/wallet/AppPayWalletTransactionController.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/app/wallet/AppPayWalletTransactionController.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/wallet/vo/recharge/AppPayWalletPackageRespVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/app/wallet/vo/recharge/AppPayWalletPackageRespVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/wallet/vo/recharge/AppPayWalletRechargeCreateReqVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/app/wallet/vo/recharge/AppPayWalletRechargeCreateReqVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/wallet/vo/recharge/AppPayWalletRechargeCreateRespVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/app/wallet/vo/recharge/AppPayWalletRechargeCreateRespVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/wallet/vo/recharge/AppPayWalletRechargeRespVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/app/wallet/vo/recharge/AppPayWalletRechargeRespVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/wallet/vo/transaction/AppPayWalletTransactionPageReqVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/app/wallet/vo/transaction/AppPayWalletTransactionPageReqVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/wallet/vo/transaction/AppPayWalletTransactionRespVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/app/wallet/vo/transaction/AppPayWalletTransactionRespVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/wallet/vo/transaction/AppPayWalletTransactionSummaryRespVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/app/wallet/vo/transaction/AppPayWalletTransactionSummaryRespVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/wallet/vo/wallet/AppPayWalletRespVO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/app/wallet/vo/wallet/AppPayWalletRespVO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/package-info.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/controller/package-info.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/convert/app/PayAppConvert.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/convert/app/PayAppConvert.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/convert/channel/PayChannelConvert.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/convert/channel/PayChannelConvert.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/convert/order/PayOrderConvert.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/convert/order/PayOrderConvert.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/convert/package-info.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/convert/package-info.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/convert/refund/PayRefundConvert.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/convert/refund/PayRefundConvert.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/convert/wallet/PayWalletConvert.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/convert/wallet/PayWalletConvert.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/convert/wallet/PayWalletRechargeConvert.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/convert/wallet/PayWalletRechargeConvert.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/convert/wallet/PayWalletRechargePackageConvert.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/convert/wallet/PayWalletRechargePackageConvert.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/convert/wallet/PayWalletTransactionConvert.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/convert/wallet/PayWalletTransactionConvert.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/convert/《芋道 Spring Boot 对象转换 MapStruct 入门》.md renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/convert/《芋道 Spring Boot 对象转换 MapStruct 入门》.md
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/app/PayAppDO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/app/PayAppDO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/channel/PayChannelDO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/channel/PayChannelDO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/demo/PayDemoOrderDO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/demo/PayDemoOrderDO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/demo/PayDemoWithdrawDO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/demo/PayDemoWithdrawDO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/notify/PayNotifyLogDO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/notify/PayNotifyLogDO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/notify/PayNotifyTaskDO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/notify/PayNotifyTaskDO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/order/PayOrderDO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/order/PayOrderDO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/order/PayOrderExtensionDO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/order/PayOrderExtensionDO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/refund/PayRefundDO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/refund/PayRefundDO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/transfer/PayTransferDO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/transfer/PayTransferDO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/wallet/PayWalletDO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/wallet/PayWalletDO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/wallet/PayWalletRechargeDO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/wallet/PayWalletRechargeDO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/wallet/PayWalletRechargePackageDO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/wallet/PayWalletRechargePackageDO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/wallet/PayWalletTransactionDO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/wallet/PayWalletTransactionDO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/app/PayAppMapper.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/app/PayAppMapper.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/channel/PayChannelMapper.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/channel/PayChannelMapper.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/demo/PayDemoOrderMapper.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/demo/PayDemoOrderMapper.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/demo/PayDemoWithdrawMapper.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/demo/PayDemoWithdrawMapper.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/notify/PayNotifyLogMapper.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/notify/PayNotifyLogMapper.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/notify/PayNotifyTaskMapper.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/notify/PayNotifyTaskMapper.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/order/PayOrderExtensionMapper.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/order/PayOrderExtensionMapper.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/order/PayOrderMapper.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/order/PayOrderMapper.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/refund/PayRefundMapper.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/refund/PayRefundMapper.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/transfer/PayTransferMapper.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/transfer/PayTransferMapper.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/wallet/PayWalletMapper.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/wallet/PayWalletMapper.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/wallet/PayWalletRechargeMapper.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/wallet/PayWalletRechargeMapper.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/wallet/PayWalletRechargePackageMapper.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/wallet/PayWalletRechargePackageMapper.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/wallet/PayWalletTransactionMapper.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/wallet/PayWalletTransactionMapper.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/redis/RedisKeyConstants.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/dal/redis/RedisKeyConstants.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/redis/no/PayNoRedisDAO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/dal/redis/no/PayNoRedisDAO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/redis/notify/PayNotifyLockRedisDAO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/dal/redis/notify/PayNotifyLockRedisDAO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/redis/wallet/PayWalletLockRedisDAO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/dal/redis/wallet/PayWalletLockRedisDAO.java
yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/enums/DictTypeConstants.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/enums/DictTypeConstants.java
yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/enums/ErrorCodeConstants.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/enums/ErrorCodeConstants.java
yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/enums/MessageTemplateConstants.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/enums/MessageTemplateConstants.java
yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/enums/PayChannelEnum.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/enums/PayChannelEnum.java
yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/enums/demo/PayDemoWithdrawStatusEnum.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/enums/demo/PayDemoWithdrawStatusEnum.java
yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/enums/demo/PayDemoWithdrawTypeEnum.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/enums/demo/PayDemoWithdrawTypeEnum.java
yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/enums/notify/PayNotifyStatusEnum.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/enums/notify/PayNotifyStatusEnum.java
yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/enums/notify/PayNotifyTypeEnum.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/enums/notify/PayNotifyTypeEnum.java
yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/enums/order/PayOrderStatusEnum.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/enums/order/PayOrderStatusEnum.java
yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/enums/refund/PayRefundStatusEnum.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/enums/refund/PayRefundStatusEnum.java
yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/enums/transfer/PayTransferStatusEnum.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/enums/transfer/PayTransferStatusEnum.java
yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/enums/wallet/PayWalletBizTypeEnum.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/enums/wallet/PayWalletBizTypeEnum.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/framework/job/config/PayJobConfiguration.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/framework/job/config/PayJobConfiguration.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/framework/job/core/package-info.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/framework/job/core/package-info.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/framework/package-info.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/framework/package-info.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/config/PayConfiguration.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/config/PayConfiguration.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/config/PayProperties.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/config/PayProperties.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/PayClient.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/PayClient.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/PayClientConfig.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/PayClientConfig.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/PayClientFactory.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/PayClientFactory.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/dto/order/PayOrderRespDTO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/dto/order/PayOrderRespDTO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/dto/order/PayOrderUnifiedReqDTO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/dto/order/PayOrderUnifiedReqDTO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/dto/refund/PayRefundRespDTO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/dto/refund/PayRefundRespDTO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/dto/refund/PayRefundUnifiedReqDTO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/dto/refund/PayRefundUnifiedReqDTO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/dto/transfer/PayTransferRespDTO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/dto/transfer/PayTransferRespDTO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/dto/transfer/PayTransferUnifiedReqDTO.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/dto/transfer/PayTransferUnifiedReqDTO.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/exception/PayClientException.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/exception/PayClientException.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/AbstractPayClient.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/AbstractPayClient.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/NonePayClientConfig.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/NonePayClientConfig.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/PayClientFactoryImpl.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/PayClientFactoryImpl.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/alipay/AbstractAlipayPayClient.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/alipay/AbstractAlipayPayClient.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/alipay/AlipayAppPayClient.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/alipay/AlipayAppPayClient.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/alipay/AlipayBarPayClient.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/alipay/AlipayBarPayClient.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/alipay/AlipayPayClientConfig.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/alipay/AlipayPayClientConfig.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/alipay/AlipayPcPayClient.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/alipay/AlipayPcPayClient.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/alipay/AlipayQrPayClient.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/alipay/AlipayQrPayClient.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/alipay/AlipayWapPayClient.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/alipay/AlipayWapPayClient.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/mock/MockPayClient.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/mock/MockPayClient.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/wallet/WalletPayClient.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/wallet/WalletPayClient.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/weixin/AbstractWxPayClient.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/weixin/AbstractWxPayClient.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/weixin/WxAppPayClient.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/weixin/WxAppPayClient.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/weixin/WxBarPayClient.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/weixin/WxBarPayClient.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/weixin/WxLitePayClient.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/weixin/WxLitePayClient.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/weixin/WxNativePayClient.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/weixin/WxNativePayClient.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/weixin/WxPayClientConfig.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/weixin/WxPayClientConfig.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/weixin/WxPubPayClient.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/weixin/WxPubPayClient.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/weixin/WxWapPayClient.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/weixin/WxWapPayClient.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/enums/PayOrderDisplayModeEnum.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/core/enums/PayOrderDisplayModeEnum.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/package-info.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/framework/pay/package-info.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/framework/web/config/PayWebConfiguration.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/framework/web/config/PayWebConfiguration.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/framework/web/package-info.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/framework/web/package-info.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/job/notify/PayNotifyJob.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/job/notify/PayNotifyJob.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/job/order/PayOrderExpireJob.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/job/order/PayOrderExpireJob.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/job/order/PayOrderSyncJob.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/job/order/PayOrderSyncJob.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/job/refund/PayRefundSyncJob.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/job/refund/PayRefundSyncJob.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/job/transfer/PayTransferSyncJob.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/job/transfer/PayTransferSyncJob.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/package-info.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/package-info.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/app/PayAppService.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/service/app/PayAppService.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/app/PayAppServiceImpl.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/service/app/PayAppServiceImpl.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/channel/PayChannelService.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/service/channel/PayChannelService.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/channel/PayChannelServiceImpl.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/service/channel/PayChannelServiceImpl.java
yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/service/demo/PayDemoOrderService.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.pay.service.demo; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.pojo.PageParam; | |
| 4 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 5 | +import cn.iocoder.yudao.module.pay.controller.admin.demo.vo.order.PayDemoOrderCreateReqVO; | |
| 6 | +import cn.iocoder.yudao.module.pay.dal.dataobject.demo.PayDemoOrderDO; | |
| 7 | + | |
| 8 | +import jakarta.validation.Valid; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * 示例订单 Service 接口 | |
| 12 | + * | |
| 13 | + * @author 芋道源码 | |
| 14 | + */ | |
| 15 | +public interface PayDemoOrderService { | |
| 16 | + | |
| 17 | + /** | |
| 18 | + * 创建示例订单 | |
| 19 | + * | |
| 20 | + * @param userId 用户编号 | |
| 21 | + * @param createReqVO 创建信息 | |
| 22 | + * @return 编号 | |
| 23 | + */ | |
| 24 | + Long createDemoOrder(Long userId, @Valid PayDemoOrderCreateReqVO createReqVO); | |
| 25 | + | |
| 26 | + /** | |
| 27 | + * 获得示例订单 | |
| 28 | + * | |
| 29 | + * @param id 编号 | |
| 30 | + * @return 示例订单 | |
| 31 | + */ | |
| 32 | + PayDemoOrderDO getDemoOrder(Long id); | |
| 33 | + | |
| 34 | + /** | |
| 35 | + * 获得示例订单分页 | |
| 36 | + * | |
| 37 | + * @param pageReqVO 分页查询 | |
| 38 | + * @return 示例订单分页 | |
| 39 | + */ | |
| 40 | + PageResult<PayDemoOrderDO> getDemoOrderPage(PageParam pageReqVO); | |
| 41 | + | |
| 42 | + /** | |
| 43 | + * 更新示例订单为已支付 | |
| 44 | + * | |
| 45 | + * @param id 编号 | |
| 46 | + * @param payOrderId 支付订单号 | |
| 47 | + */ | |
| 48 | + void updateDemoOrderPaid(Long id, Long payOrderId); | |
| 49 | + | |
| 50 | + /** | |
| 51 | + * 发起示例订单的退款 | |
| 52 | + * | |
| 53 | + * @param id 编号 | |
| 54 | + * @param userIp 用户编号 | |
| 55 | + */ | |
| 56 | + void refundDemoOrder(Long id, String userIp); | |
| 57 | + | |
| 58 | + /** | |
| 59 | + * 更新示例订单为已退款 | |
| 60 | + * | |
| 61 | + * @param id 编号 | |
| 62 | + * @param refundId 退款编号 | |
| 63 | + * @param payRefundId 退款订单号 | |
| 64 | + */ | |
| 65 | + void updateDemoOrderRefunded(Long id, String refundId, Long payRefundId); | |
| 66 | + | |
| 67 | +} | ... | ... |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/demo/PayDemoOrderServiceImpl.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/service/demo/PayDemoOrderServiceImpl.java
yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/service/demo/PayDemoWithdrawService.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.pay.service.demo; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.pojo.PageParam; | |
| 4 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 5 | +import cn.iocoder.yudao.module.pay.controller.admin.demo.vo.withdraw.PayDemoWithdrawCreateReqVO; | |
| 6 | +import cn.iocoder.yudao.module.pay.dal.dataobject.demo.PayDemoWithdrawDO; | |
| 7 | + | |
| 8 | +import jakarta.validation.Valid; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * 示例提现单 Service 接口 | |
| 12 | + * | |
| 13 | + * @author jason | |
| 14 | + */ | |
| 15 | +public interface PayDemoWithdrawService { | |
| 16 | + | |
| 17 | + /** | |
| 18 | + * 创建示例提现单 | |
| 19 | + * | |
| 20 | + * @param createReqVO 创建信息 | |
| 21 | + * @return 编号 | |
| 22 | + */ | |
| 23 | + Long createDemoWithdraw(@Valid PayDemoWithdrawCreateReqVO createReqVO); | |
| 24 | + | |
| 25 | + /** | |
| 26 | + * 提现单转账 | |
| 27 | + * | |
| 28 | + * @param id 提现单编号 | |
| 29 | + * @return 转账编号 | |
| 30 | + */ | |
| 31 | + Long transferDemoWithdraw(Long id); | |
| 32 | + | |
| 33 | + /** | |
| 34 | + * 获得示例提现单分页 | |
| 35 | + * | |
| 36 | + * @param pageVO 分页查询参数 | |
| 37 | + */ | |
| 38 | + PageResult<PayDemoWithdrawDO> getDemoWithdrawPage(PageParam pageVO); | |
| 39 | + | |
| 40 | + /** | |
| 41 | + * 更新示例提现单的状态 | |
| 42 | + * | |
| 43 | + * @param id 编号 | |
| 44 | + * @param payTransferId 转账单编号 | |
| 45 | + */ | |
| 46 | + void updateDemoWithdrawTransferred(Long id, Long payTransferId); | |
| 47 | + | |
| 48 | +} | ... | ... |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/demo/PayDemoWithdrawServiceImpl.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/service/demo/PayDemoWithdrawServiceImpl.java
yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/service/notify/PayNotifyService.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.pay.service.notify; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 4 | +import cn.iocoder.yudao.module.pay.controller.admin.notify.vo.PayNotifyTaskPageReqVO; | |
| 5 | +import cn.iocoder.yudao.module.pay.dal.dataobject.notify.PayNotifyLogDO; | |
| 6 | +import cn.iocoder.yudao.module.pay.dal.dataobject.notify.PayNotifyTaskDO; | |
| 7 | + | |
| 8 | +import java.util.List; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * 回调通知 Service 接口 | |
| 12 | + * | |
| 13 | + * @author 芋道源码 | |
| 14 | + */ | |
| 15 | +public interface PayNotifyService { | |
| 16 | + | |
| 17 | + /** | |
| 18 | + * 创建回调通知任务 | |
| 19 | + * | |
| 20 | + * @param type 类型 | |
| 21 | + * @param dataId 数据编号 | |
| 22 | + */ | |
| 23 | + void createPayNotifyTask(Integer type, Long dataId); | |
| 24 | + | |
| 25 | + /** | |
| 26 | + * 执行回调通知 | |
| 27 | + * | |
| 28 | + * 注意,该方法提供给定时任务调用。目前是 yudao-server 进行调用 | |
| 29 | + * @return 通知数量 | |
| 30 | + */ | |
| 31 | + int executeNotify() throws InterruptedException; | |
| 32 | + | |
| 33 | + /** | |
| 34 | + * 获得回调通知 | |
| 35 | + * | |
| 36 | + * @param id 编号 | |
| 37 | + * @return 回调通知 | |
| 38 | + */ | |
| 39 | + PayNotifyTaskDO getNotifyTask(Long id); | |
| 40 | + | |
| 41 | + /** | |
| 42 | + * 获得回调通知分页 | |
| 43 | + * | |
| 44 | + * @param pageReqVO 分页查询 | |
| 45 | + * @return 回调通知分页 | |
| 46 | + */ | |
| 47 | + PageResult<PayNotifyTaskDO> getNotifyTaskPage(PayNotifyTaskPageReqVO pageReqVO); | |
| 48 | + | |
| 49 | + /** | |
| 50 | + * 获得回调日志列表 | |
| 51 | + * | |
| 52 | + * @param taskId 任务编号 | |
| 53 | + * @return 日志列表 | |
| 54 | + */ | |
| 55 | + List<PayNotifyLogDO> getNotifyLogList(Long taskId); | |
| 56 | + | |
| 57 | +} | ... | ... |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/notify/PayNotifyServiceImpl.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/service/notify/PayNotifyServiceImpl.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/order/PayOrderService.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/service/order/PayOrderService.java
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/order/PayOrderServiceImpl.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/service/order/PayOrderServiceImpl.java
yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/service/refund/PayRefundService.java
0 → 100755
| 1 | +package cn.iocoder.yudao.module.pay.service.refund; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 4 | +import cn.iocoder.yudao.module.pay.framework.pay.core.client.dto.refund.PayRefundRespDTO; | |
| 5 | +import cn.iocoder.yudao.module.pay.api.refund.dto.PayRefundCreateReqDTO; | |
| 6 | +import cn.iocoder.yudao.module.pay.controller.admin.refund.vo.PayRefundExportReqVO; | |
| 7 | +import cn.iocoder.yudao.module.pay.controller.admin.refund.vo.PayRefundPageReqVO; | |
| 8 | +import cn.iocoder.yudao.module.pay.dal.dataobject.refund.PayRefundDO; | |
| 9 | + | |
| 10 | +import java.util.List; | |
| 11 | + | |
| 12 | +/** | |
| 13 | + * 退款订单 Service 接口 | |
| 14 | + * | |
| 15 | + * @author aquan | |
| 16 | + */ | |
| 17 | +public interface PayRefundService { | |
| 18 | + | |
| 19 | + /** | |
| 20 | + * 获得退款订单 | |
| 21 | + * | |
| 22 | + * @param id 编号 | |
| 23 | + * @return 退款订单 | |
| 24 | + */ | |
| 25 | + PayRefundDO getRefund(Long id); | |
| 26 | + | |
| 27 | + /** | |
| 28 | + * 获得退款订单 | |
| 29 | + * | |
| 30 | + * @param no 外部退款单号 | |
| 31 | + * @return 退款订单 | |
| 32 | + */ | |
| 33 | + PayRefundDO getRefundByNo(String no); | |
| 34 | + | |
| 35 | + /** | |
| 36 | + * 获得指定应用的退款数量 | |
| 37 | + * | |
| 38 | + * @param appId 应用编号 | |
| 39 | + * @return 退款数量 | |
| 40 | + */ | |
| 41 | + Long getRefundCountByAppId(Long appId); | |
| 42 | + | |
| 43 | + /** | |
| 44 | + * 获得退款订单分页 | |
| 45 | + * | |
| 46 | + * @param pageReqVO 分页查询 | |
| 47 | + * @return 退款订单分页 | |
| 48 | + */ | |
| 49 | + PageResult<PayRefundDO> getRefundPage(PayRefundPageReqVO pageReqVO); | |
| 50 | + | |
| 51 | + /** | |
| 52 | + * 获得退款订单列表, 用于 Excel 导出 | |
| 53 | + * | |
| 54 | + * @param exportReqVO 查询条件 | |
| 55 | + * @return 退款订单列表 | |
| 56 | + */ | |
| 57 | + List<PayRefundDO> getRefundList(PayRefundExportReqVO exportReqVO); | |
| 58 | + | |
| 59 | + /** | |
| 60 | + * 创建退款申请 | |
| 61 | + * | |
| 62 | + * @param reqDTO 退款申请信息 | |
| 63 | + * @return 退款单号 | |
| 64 | + */ | |
| 65 | + Long createRefund(PayRefundCreateReqDTO reqDTO); | |
| 66 | + | |
| 67 | + /** | |
| 68 | + * 渠道的退款通知 | |
| 69 | + * | |
| 70 | + * @param channelId 渠道编号 | |
| 71 | + * @param notify 通知 | |
| 72 | + */ | |
| 73 | + void notifyRefund(Long channelId, PayRefundRespDTO notify); | |
| 74 | + | |
| 75 | + /** | |
| 76 | + * 同步渠道退款的退款状态 | |
| 77 | + * | |
| 78 | + * @return 同步到状态的退款数量,包括退款成功、退款失败 | |
| 79 | + */ | |
| 80 | + int syncRefund(); | |
| 81 | + | |
| 82 | +} | ... | ... |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/refund/PayRefundServiceImpl.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/service/refund/PayRefundServiceImpl.java
yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/service/transfer/PayTransferService.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.pay.service.transfer; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 4 | +import cn.iocoder.yudao.module.pay.framework.pay.core.client.dto.transfer.PayTransferRespDTO; | |
| 5 | +import cn.iocoder.yudao.module.pay.api.transfer.dto.PayTransferCreateReqDTO; | |
| 6 | +import cn.iocoder.yudao.module.pay.api.transfer.dto.PayTransferCreateRespDTO; | |
| 7 | +import cn.iocoder.yudao.module.pay.controller.admin.transfer.vo.PayTransferPageReqVO; | |
| 8 | +import cn.iocoder.yudao.module.pay.dal.dataobject.transfer.PayTransferDO; | |
| 9 | +import jakarta.validation.Valid; | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * 转账 Service 接口 | |
| 13 | + * | |
| 14 | + * @author jason | |
| 15 | + */ | |
| 16 | +public interface PayTransferService { | |
| 17 | + | |
| 18 | + /** | |
| 19 | + * 创建转账单,并发起转账 | |
| 20 | + * | |
| 21 | + * @param reqDTO 创建请求 | |
| 22 | + * @return 转账单编号 | |
| 23 | + */ | |
| 24 | + PayTransferCreateRespDTO createTransfer(@Valid PayTransferCreateReqDTO reqDTO); | |
| 25 | + | |
| 26 | + /** | |
| 27 | + * 获取转账单 | |
| 28 | + * @param id 转账单编号 | |
| 29 | + */ | |
| 30 | + PayTransferDO getTransfer(Long id); | |
| 31 | + | |
| 32 | + /** | |
| 33 | + * 根据转账单号获取转账单 | |
| 34 | + * | |
| 35 | + * @param no 转账单号 | |
| 36 | + * @return 转账单 | |
| 37 | + */ | |
| 38 | + PayTransferDO getTransferByNo(String no); | |
| 39 | + | |
| 40 | + /** | |
| 41 | + * 获得转账单分页 | |
| 42 | + * | |
| 43 | + * @param pageReqVO 分页查询 | |
| 44 | + * @return 转账单分页 | |
| 45 | + */ | |
| 46 | + PageResult<PayTransferDO> getTransferPage(PayTransferPageReqVO pageReqVO); | |
| 47 | + | |
| 48 | + /** | |
| 49 | + * 同步渠道转账单状态 | |
| 50 | + * | |
| 51 | + * @return 同步到状态的转账数量,包括转账成功、转账失败、转账中的 | |
| 52 | + */ | |
| 53 | + int syncTransfer(); | |
| 54 | + | |
| 55 | + /** | |
| 56 | + * 【单个】同步渠道转账单状态 | |
| 57 | + * | |
| 58 | + * @param id 转账单编号 | |
| 59 | + */ | |
| 60 | + void syncTransfer(Long id); | |
| 61 | + | |
| 62 | + /** | |
| 63 | + * 渠道的转账通知 | |
| 64 | + * | |
| 65 | + * @param channelId 渠道编号 | |
| 66 | + * @param notify 通知 | |
| 67 | + */ | |
| 68 | + void notifyTransfer(Long channelId, PayTransferRespDTO notify); | |
| 69 | + | |
| 70 | +} | ... | ... |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/transfer/PayTransferServiceImpl.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/service/transfer/PayTransferServiceImpl.java
yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletRechargePackageService.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.pay.service.wallet; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 4 | +import cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.rechargepackage.WalletRechargePackageCreateReqVO; | |
| 5 | +import cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.rechargepackage.WalletRechargePackagePageReqVO; | |
| 6 | +import cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.rechargepackage.WalletRechargePackageUpdateReqVO; | |
| 7 | +import cn.iocoder.yudao.module.pay.dal.dataobject.wallet.PayWalletRechargePackageDO; | |
| 8 | + | |
| 9 | +import jakarta.validation.Valid; | |
| 10 | +import java.util.Collection; | |
| 11 | +import java.util.List; | |
| 12 | + | |
| 13 | +/** | |
| 14 | + * 钱包充值套餐 Service 接口 | |
| 15 | + * | |
| 16 | + * @author jason | |
| 17 | + */ | |
| 18 | +public interface PayWalletRechargePackageService { | |
| 19 | + | |
| 20 | + /** | |
| 21 | + * 获取钱包充值套餐 | |
| 22 | + * @param packageId 充值套餐编号 | |
| 23 | + */ | |
| 24 | + PayWalletRechargePackageDO getWalletRechargePackage(Long packageId); | |
| 25 | + | |
| 26 | + /** | |
| 27 | + * 校验钱包充值套餐的有效性, 无效的话抛出 ServiceException 异常 | |
| 28 | + * | |
| 29 | + * @param packageId 充值套餐编号 | |
| 30 | + */ | |
| 31 | + PayWalletRechargePackageDO validWalletRechargePackage(Long packageId); | |
| 32 | + | |
| 33 | + /** | |
| 34 | + * 创建充值套餐 | |
| 35 | + * | |
| 36 | + * @param createReqVO 创建信息 | |
| 37 | + * @return 编号 | |
| 38 | + */ | |
| 39 | + Long createWalletRechargePackage(@Valid WalletRechargePackageCreateReqVO createReqVO); | |
| 40 | + | |
| 41 | + /** | |
| 42 | + * 更新充值套餐 | |
| 43 | + * | |
| 44 | + * @param updateReqVO 更新信息 | |
| 45 | + */ | |
| 46 | + void updateWalletRechargePackage(@Valid WalletRechargePackageUpdateReqVO updateReqVO); | |
| 47 | + | |
| 48 | + /** | |
| 49 | + * 删除充值套餐 | |
| 50 | + * | |
| 51 | + * @param id 编号 | |
| 52 | + */ | |
| 53 | + void deleteWalletRechargePackage(Long id); | |
| 54 | + | |
| 55 | + /** | |
| 56 | + * 获得充值套餐分页 | |
| 57 | + * | |
| 58 | + * @param pageReqVO 分页查询 | |
| 59 | + * @return 充值套餐分页 | |
| 60 | + */ | |
| 61 | + PageResult<PayWalletRechargePackageDO> getWalletRechargePackagePage(WalletRechargePackagePageReqVO pageReqVO); | |
| 62 | + | |
| 63 | + /** | |
| 64 | + * 获得充值套餐列表 | |
| 65 | + * | |
| 66 | + * @param status 状态 | |
| 67 | + * @return 充值套餐列表 | |
| 68 | + */ | |
| 69 | + List<PayWalletRechargePackageDO> getWalletRechargePackageList(Integer status); | |
| 70 | + | |
| 71 | +} | ... | ... |
yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletRechargePackageServiceImpl.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.pay.service.wallet; | |
| 2 | + | |
| 3 | +import cn.hutool.core.util.StrUtil; | |
| 4 | +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; | |
| 5 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 6 | +import cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.rechargepackage.WalletRechargePackageCreateReqVO; | |
| 7 | +import cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.rechargepackage.WalletRechargePackagePageReqVO; | |
| 8 | +import cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.rechargepackage.WalletRechargePackageUpdateReqVO; | |
| 9 | +import cn.iocoder.yudao.module.pay.convert.wallet.PayWalletRechargePackageConvert; | |
| 10 | +import cn.iocoder.yudao.module.pay.dal.dataobject.wallet.PayWalletRechargePackageDO; | |
| 11 | +import cn.iocoder.yudao.module.pay.dal.mysql.wallet.PayWalletRechargePackageMapper; | |
| 12 | +import org.springframework.stereotype.Service; | |
| 13 | + | |
| 14 | +import jakarta.annotation.Resource; | |
| 15 | + | |
| 16 | +import java.util.List; | |
| 17 | + | |
| 18 | +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; | |
| 19 | +import static cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants.*; | |
| 20 | + | |
| 21 | +/** | |
| 22 | + * 钱包充值套餐 Service 实现类 | |
| 23 | + * | |
| 24 | + * @author jason | |
| 25 | + */ | |
| 26 | +@Service | |
| 27 | +public class PayWalletRechargePackageServiceImpl implements PayWalletRechargePackageService { | |
| 28 | + | |
| 29 | + @Resource | |
| 30 | + private PayWalletRechargePackageMapper walletRechargePackageMapper; | |
| 31 | + | |
| 32 | + @Override | |
| 33 | + public PayWalletRechargePackageDO getWalletRechargePackage(Long packageId) { | |
| 34 | + return walletRechargePackageMapper.selectById(packageId); | |
| 35 | + } | |
| 36 | + | |
| 37 | + @Override | |
| 38 | + public PayWalletRechargePackageDO validWalletRechargePackage(Long packageId) { | |
| 39 | + PayWalletRechargePackageDO rechargePackageDO = walletRechargePackageMapper.selectById(packageId); | |
| 40 | + if (rechargePackageDO == null) { | |
| 41 | + throw exception(WALLET_RECHARGE_PACKAGE_NOT_FOUND); | |
| 42 | + } | |
| 43 | + if (CommonStatusEnum.DISABLE.getStatus().equals(rechargePackageDO.getStatus())) { | |
| 44 | + throw exception(WALLET_RECHARGE_PACKAGE_IS_DISABLE); | |
| 45 | + } | |
| 46 | + return rechargePackageDO; | |
| 47 | + } | |
| 48 | + | |
| 49 | + @Override | |
| 50 | + public Long createWalletRechargePackage(WalletRechargePackageCreateReqVO createReqVO) { | |
| 51 | + // 校验套餐名是否唯一 | |
| 52 | + validateRechargePackageNameUnique(null, createReqVO.getName()); | |
| 53 | + | |
| 54 | + // 插入 | |
| 55 | + PayWalletRechargePackageDO walletRechargePackage = PayWalletRechargePackageConvert.INSTANCE.convert(createReqVO); | |
| 56 | + walletRechargePackageMapper.insert(walletRechargePackage); | |
| 57 | + // 返回 | |
| 58 | + return walletRechargePackage.getId(); | |
| 59 | + } | |
| 60 | + | |
| 61 | + @Override | |
| 62 | + public void updateWalletRechargePackage(WalletRechargePackageUpdateReqVO updateReqVO) { | |
| 63 | + // 校验存在 | |
| 64 | + validateWalletRechargePackageExists(updateReqVO.getId()); | |
| 65 | + // 校验套餐名是否唯一 | |
| 66 | + validateRechargePackageNameUnique(updateReqVO.getId(), updateReqVO.getName()); | |
| 67 | + | |
| 68 | + // 更新 | |
| 69 | + PayWalletRechargePackageDO updateObj = PayWalletRechargePackageConvert.INSTANCE.convert(updateReqVO); | |
| 70 | + walletRechargePackageMapper.updateById(updateObj); | |
| 71 | + } | |
| 72 | + | |
| 73 | + private void validateRechargePackageNameUnique(Long id, String name) { | |
| 74 | + if (StrUtil.isBlank(name)) { | |
| 75 | + return; | |
| 76 | + } | |
| 77 | + PayWalletRechargePackageDO rechargePackage = walletRechargePackageMapper.selectByName(name); | |
| 78 | + if (rechargePackage == null) { | |
| 79 | + return ; | |
| 80 | + } | |
| 81 | + if (id == null) { | |
| 82 | + throw exception(WALLET_RECHARGE_PACKAGE_NAME_EXISTS); | |
| 83 | + } | |
| 84 | + if (!id.equals(rechargePackage.getId())) { | |
| 85 | + throw exception(WALLET_RECHARGE_PACKAGE_NAME_EXISTS); | |
| 86 | + } | |
| 87 | + } | |
| 88 | + | |
| 89 | + @Override | |
| 90 | + public void deleteWalletRechargePackage(Long id) { | |
| 91 | + // 校验存在 | |
| 92 | + validateWalletRechargePackageExists(id); | |
| 93 | + // 删除 | |
| 94 | + walletRechargePackageMapper.deleteById(id); | |
| 95 | + } | |
| 96 | + | |
| 97 | + private void validateWalletRechargePackageExists(Long id) { | |
| 98 | + if (walletRechargePackageMapper.selectById(id) == null) { | |
| 99 | + throw exception(WALLET_RECHARGE_PACKAGE_NOT_FOUND); | |
| 100 | + } | |
| 101 | + } | |
| 102 | + | |
| 103 | + @Override | |
| 104 | + public PageResult<PayWalletRechargePackageDO> getWalletRechargePackagePage(WalletRechargePackagePageReqVO pageReqVO) { | |
| 105 | + return walletRechargePackageMapper.selectPage(pageReqVO); | |
| 106 | + } | |
| 107 | + | |
| 108 | + @Override | |
| 109 | + public List<PayWalletRechargePackageDO> getWalletRechargePackageList(Integer status) { | |
| 110 | + return walletRechargePackageMapper.selectListByStatus(status); | |
| 111 | + } | |
| 112 | + | |
| 113 | +} | ... | ... |
yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletRechargeService.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.pay.service.wallet; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.pojo.PageParam; | |
| 4 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 5 | +import cn.iocoder.yudao.module.pay.controller.app.wallet.vo.recharge.AppPayWalletRechargeCreateReqVO; | |
| 6 | +import cn.iocoder.yudao.module.pay.dal.dataobject.wallet.PayWalletRechargeDO; | |
| 7 | + | |
| 8 | +/** | |
| 9 | + * 钱包充值 Service 接口 | |
| 10 | + * | |
| 11 | + * @author jason | |
| 12 | + */ | |
| 13 | +public interface PayWalletRechargeService { | |
| 14 | + | |
| 15 | + /** | |
| 16 | + * 创建钱包充值记录(发起充值) | |
| 17 | + * | |
| 18 | + * @param userId 用户编号 | |
| 19 | + * @param userType 用户类型 | |
| 20 | + * @param createReqVO 钱包充值请求 VO | |
| 21 | + * @param userIp 用户Ip | |
| 22 | + * @return 钱包充值记录 | |
| 23 | + */ | |
| 24 | + PayWalletRechargeDO createWalletRecharge(Long userId, Integer userType, String userIp, | |
| 25 | + AppPayWalletRechargeCreateReqVO createReqVO); | |
| 26 | + | |
| 27 | + /** | |
| 28 | + * 获得钱包充值记录分页 | |
| 29 | + * | |
| 30 | + * @param userId 用户编号 | |
| 31 | + * @param userType 用户类型 | |
| 32 | + * @param pageReqVO 分页请求 | |
| 33 | + * @param payStatus 是否支付 | |
| 34 | + * @return 钱包充值记录分页 | |
| 35 | + */ | |
| 36 | + PageResult<PayWalletRechargeDO> getWalletRechargePackagePage(Long userId, Integer userType, | |
| 37 | + PageParam pageReqVO, Boolean payStatus); | |
| 38 | + | |
| 39 | + /** | |
| 40 | + * 更新钱包充值成功 | |
| 41 | + * | |
| 42 | + * @param id 钱包充值记录编号 | |
| 43 | + * @param payOrderId 支付订单编号 | |
| 44 | + */ | |
| 45 | + void updateWalletRechargerPaid(Long id, Long payOrderId); | |
| 46 | + | |
| 47 | + /** | |
| 48 | + * 发起钱包充值退款 | |
| 49 | + * | |
| 50 | + * @param id 钱包充值编号 | |
| 51 | + * @param userIp 用户 ip 地址 | |
| 52 | + */ | |
| 53 | + void refundWalletRecharge(Long id, String userIp); | |
| 54 | + | |
| 55 | + /** | |
| 56 | + * 更新钱包充值记录为已退款 | |
| 57 | + * | |
| 58 | + * @param id 钱包充值记录编号 | |
| 59 | + * @param refundId 钱包充值退款编号(实际和 id 相同) | |
| 60 | + * @param payRefundId 退款单id | |
| 61 | + */ | |
| 62 | + void updateWalletRechargeRefunded(Long id, Long refundId, Long payRefundId); | |
| 63 | + | |
| 64 | +} | ... | ... |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletRechargeServiceImpl.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletRechargeServiceImpl.java
yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletService.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.pay.service.wallet; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 4 | +import cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.wallet.PayWalletPageReqVO; | |
| 5 | +import cn.iocoder.yudao.module.pay.dal.dataobject.wallet.PayWalletDO; | |
| 6 | +import cn.iocoder.yudao.module.pay.dal.dataobject.wallet.PayWalletTransactionDO; | |
| 7 | +import cn.iocoder.yudao.module.pay.enums.wallet.PayWalletBizTypeEnum; | |
| 8 | + | |
| 9 | +/** | |
| 10 | + * 钱包 Service 接口 | |
| 11 | + * | |
| 12 | + * @author jason | |
| 13 | + */ | |
| 14 | +public interface PayWalletService { | |
| 15 | + | |
| 16 | + /** | |
| 17 | + * 获取钱包信息 | |
| 18 | + * <p> | |
| 19 | + * 如果不存在,则创建钱包。由于用户注册时候不会创建钱包 | |
| 20 | + * | |
| 21 | + * @param userId 用户编号 | |
| 22 | + * @param userType 用户类型 | |
| 23 | + */ | |
| 24 | + PayWalletDO getOrCreateWallet(Long userId, Integer userType); | |
| 25 | + | |
| 26 | + /** | |
| 27 | + * 获取钱包信息 | |
| 28 | + * | |
| 29 | + * @param walletId 钱包 id | |
| 30 | + */ | |
| 31 | + PayWalletDO getWallet(Long walletId); | |
| 32 | + | |
| 33 | + /** | |
| 34 | + * 获得会员钱包分页 | |
| 35 | + * | |
| 36 | + * @param pageReqVO 分页查询 | |
| 37 | + * @return 会员钱包分页 | |
| 38 | + */ | |
| 39 | + PageResult<PayWalletDO> getWalletPage(PayWalletPageReqVO pageReqVO); | |
| 40 | + | |
| 41 | + /** | |
| 42 | + * 钱包订单支付 | |
| 43 | + * | |
| 44 | + * @param walletId 钱包编号 | |
| 45 | + * @param outTradeNo 外部订单号 | |
| 46 | + * @param price 金额 | |
| 47 | + */ | |
| 48 | + PayWalletTransactionDO orderPay(Long walletId, String outTradeNo, Integer price); | |
| 49 | + | |
| 50 | + /** | |
| 51 | + * 钱包订单支付退款 | |
| 52 | + * | |
| 53 | + * @param outRefundNo 外部退款号 | |
| 54 | + * @param refundPrice 退款金额 | |
| 55 | + * @param reason 退款原因 | |
| 56 | + */ | |
| 57 | + PayWalletTransactionDO orderRefund(String outRefundNo, Integer refundPrice, String reason); | |
| 58 | + | |
| 59 | + /** | |
| 60 | + * 扣减钱包余额 | |
| 61 | + * | |
| 62 | + * @param walletId 钱包编号 | |
| 63 | + * @param bizId 业务关联编号 | |
| 64 | + * @param bizType 业务关联分类 | |
| 65 | + * @param price 扣减金额 | |
| 66 | + * @return 钱包流水 | |
| 67 | + */ | |
| 68 | + PayWalletTransactionDO reduceWalletBalance(Long walletId, Long bizId, | |
| 69 | + PayWalletBizTypeEnum bizType, Integer price); | |
| 70 | + | |
| 71 | + /** | |
| 72 | + * 增加钱包余额 | |
| 73 | + * | |
| 74 | + * @param walletId 钱包编号 | |
| 75 | + * @param bizId 业务关联编号 | |
| 76 | + * @param bizType 业务关联分类 | |
| 77 | + * @param price 增加金额 | |
| 78 | + * @return 钱包流水 | |
| 79 | + */ | |
| 80 | + PayWalletTransactionDO addWalletBalance(Long walletId, String bizId, | |
| 81 | + PayWalletBizTypeEnum bizType, Integer price); | |
| 82 | + | |
| 83 | + /** | |
| 84 | + * 冻结钱包部分余额 | |
| 85 | + * | |
| 86 | + * @param id 钱包编号 | |
| 87 | + * @param price 冻结金额 | |
| 88 | + */ | |
| 89 | + void freezePrice(Long id, Integer price); | |
| 90 | + | |
| 91 | + /** | |
| 92 | + * 解冻钱包余额 | |
| 93 | + * | |
| 94 | + * @param id 钱包编号 | |
| 95 | + * @param price 解冻金额 | |
| 96 | + */ | |
| 97 | + void unfreezePrice(Long id, Integer price); | |
| 98 | + | |
| 99 | +} | ... | ... |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletServiceImpl.java renamed to yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletServiceImpl.java
yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletTransactionService.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.pay.service.wallet; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 4 | +import cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.transaction.PayWalletTransactionPageReqVO; | |
| 5 | +import cn.iocoder.yudao.module.pay.controller.app.wallet.vo.transaction.AppPayWalletTransactionPageReqVO; | |
| 6 | +import cn.iocoder.yudao.module.pay.controller.app.wallet.vo.transaction.AppPayWalletTransactionSummaryRespVO; | |
| 7 | +import cn.iocoder.yudao.module.pay.dal.dataobject.wallet.PayWalletTransactionDO; | |
| 8 | +import cn.iocoder.yudao.module.pay.enums.wallet.PayWalletBizTypeEnum; | |
| 9 | +import cn.iocoder.yudao.module.pay.service.wallet.bo.WalletTransactionCreateReqBO; | |
| 10 | + | |
| 11 | +import jakarta.validation.Valid; | |
| 12 | + | |
| 13 | +import java.time.LocalDateTime; | |
| 14 | + | |
| 15 | +/** | |
| 16 | + * 钱包余额流水 Service 接口 | |
| 17 | + * | |
| 18 | + * @author jason | |
| 19 | + */ | |
| 20 | +public interface PayWalletTransactionService { | |
| 21 | + | |
| 22 | + /** | |
| 23 | + * 查询钱包余额流水分页 | |
| 24 | + * | |
| 25 | + * @param userId 用户编号 | |
| 26 | + * @param userType 用户类型 | |
| 27 | + * @param pageVO 分页查询参数 | |
| 28 | + */ | |
| 29 | + PageResult<PayWalletTransactionDO> getWalletTransactionPage(Long userId, Integer userType, | |
| 30 | + AppPayWalletTransactionPageReqVO pageVO); | |
| 31 | + | |
| 32 | + /** | |
| 33 | + * 查询钱包余额流水分页 | |
| 34 | + * | |
| 35 | + * @param pageVO 分页查询参数 | |
| 36 | + */ | |
| 37 | + PageResult<PayWalletTransactionDO> getWalletTransactionPage(PayWalletTransactionPageReqVO pageVO); | |
| 38 | + | |
| 39 | + /** | |
| 40 | + * 新增钱包余额流水 | |
| 41 | + * | |
| 42 | + * @param bo 创建钱包流水 bo | |
| 43 | + * @return 新建的钱包 do | |
| 44 | + */ | |
| 45 | + PayWalletTransactionDO createWalletTransaction(@Valid WalletTransactionCreateReqBO bo); | |
| 46 | + | |
| 47 | + /** | |
| 48 | + * 根据 no,获取钱包余流水 | |
| 49 | + * | |
| 50 | + * @param no 流水号 | |
| 51 | + */ | |
| 52 | + PayWalletTransactionDO getWalletTransactionByNo(String no); | |
| 53 | + | |
| 54 | + /** | |
| 55 | + * 获取钱包流水 | |
| 56 | + * | |
| 57 | + * @param bizId 业务编号 | |
| 58 | + * @param type 业务类型 | |
| 59 | + * @return 钱包流水 | |
| 60 | + */ | |
| 61 | + PayWalletTransactionDO getWalletTransaction(String bizId, PayWalletBizTypeEnum type); | |
| 62 | + | |
| 63 | + /** | |
| 64 | + * 获得钱包流水统计 | |
| 65 | + * | |
| 66 | + * @param userId 用户编号 | |
| 67 | + * @param userType 用户类型 | |
| 68 | + * @param createTime 时间段 | |
| 69 | + * @return 钱包流水统计 | |
| 70 | + */ | |
| 71 | + AppPayWalletTransactionSummaryRespVO getWalletTransactionSummary(Long userId, Integer userType, | |
| 72 | + LocalDateTime[] createTime); | |
| 73 | + | |
| 74 | +} | ... | ... |
yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletTransactionServiceImpl.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.pay.service.wallet; | |
| 2 | + | |
| 3 | +import cn.hutool.core.util.ObjectUtil; | |
| 4 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 5 | +import cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.transaction.PayWalletTransactionPageReqVO; | |
| 6 | +import cn.iocoder.yudao.module.pay.controller.app.wallet.vo.transaction.AppPayWalletTransactionPageReqVO; | |
| 7 | +import cn.iocoder.yudao.module.pay.controller.app.wallet.vo.transaction.AppPayWalletTransactionSummaryRespVO; | |
| 8 | +import cn.iocoder.yudao.module.pay.convert.wallet.PayWalletTransactionConvert; | |
| 9 | +import cn.iocoder.yudao.module.pay.dal.dataobject.wallet.PayWalletDO; | |
| 10 | +import cn.iocoder.yudao.module.pay.dal.dataobject.wallet.PayWalletTransactionDO; | |
| 11 | +import cn.iocoder.yudao.module.pay.dal.mysql.wallet.PayWalletTransactionMapper; | |
| 12 | +import cn.iocoder.yudao.module.pay.dal.redis.no.PayNoRedisDAO; | |
| 13 | +import cn.iocoder.yudao.module.pay.enums.wallet.PayWalletBizTypeEnum; | |
| 14 | +import cn.iocoder.yudao.module.pay.service.wallet.bo.WalletTransactionCreateReqBO; | |
| 15 | +import jakarta.annotation.Resource; | |
| 16 | +import lombok.extern.slf4j.Slf4j; | |
| 17 | +import org.springframework.stereotype.Service; | |
| 18 | +import org.springframework.validation.annotation.Validated; | |
| 19 | + | |
| 20 | +import java.time.LocalDateTime; | |
| 21 | + | |
| 22 | +import static cn.iocoder.yudao.module.pay.controller.app.wallet.vo.transaction.AppPayWalletTransactionPageReqVO.TYPE_EXPENSE; | |
| 23 | +import static cn.iocoder.yudao.module.pay.controller.app.wallet.vo.transaction.AppPayWalletTransactionPageReqVO.TYPE_INCOME; | |
| 24 | + | |
| 25 | +/** | |
| 26 | + * 钱包流水 Service 实现类 | |
| 27 | + * | |
| 28 | + * @author jason | |
| 29 | + */ | |
| 30 | +@Service | |
| 31 | +@Slf4j | |
| 32 | +@Validated | |
| 33 | +public class PayWalletTransactionServiceImpl implements PayWalletTransactionService { | |
| 34 | + | |
| 35 | + /** | |
| 36 | + * 钱包流水的 no 前缀 | |
| 37 | + */ | |
| 38 | + private static final String WALLET_NO_PREFIX = "W"; | |
| 39 | + | |
| 40 | + @Resource | |
| 41 | + private PayWalletService payWalletService; | |
| 42 | + @Resource | |
| 43 | + private PayWalletTransactionMapper payWalletTransactionMapper; | |
| 44 | + @Resource | |
| 45 | + private PayNoRedisDAO noRedisDAO; | |
| 46 | + | |
| 47 | + @Override | |
| 48 | + public PageResult<PayWalletTransactionDO> getWalletTransactionPage(Long userId, Integer userType, | |
| 49 | + AppPayWalletTransactionPageReqVO pageVO) { | |
| 50 | + PayWalletDO wallet = payWalletService.getOrCreateWallet(userId, userType); | |
| 51 | + return payWalletTransactionMapper.selectPage(wallet.getId(), pageVO.getType(), pageVO, pageVO.getCreateTime()); | |
| 52 | + } | |
| 53 | + | |
| 54 | + @Override | |
| 55 | + public PageResult<PayWalletTransactionDO> getWalletTransactionPage(PayWalletTransactionPageReqVO pageVO) { | |
| 56 | + // 基于 userId + userType 查询钱包 | |
| 57 | + if (pageVO.getWalletId() == null | |
| 58 | + && ObjectUtil.isAllNotEmpty(pageVO.getUserId(), pageVO.getUserType())) { | |
| 59 | + PayWalletDO wallet = payWalletService.getOrCreateWallet(pageVO.getUserId(), pageVO.getUserType()); | |
| 60 | + if (wallet != null) { | |
| 61 | + pageVO.setWalletId(wallet.getId()); | |
| 62 | + } | |
| 63 | + } | |
| 64 | + | |
| 65 | + // 查询分页 | |
| 66 | + return payWalletTransactionMapper.selectPage(pageVO.getWalletId(), null, pageVO, null); | |
| 67 | + } | |
| 68 | + | |
| 69 | + @Override | |
| 70 | + public PayWalletTransactionDO createWalletTransaction(WalletTransactionCreateReqBO bo) { | |
| 71 | + PayWalletTransactionDO transaction = PayWalletTransactionConvert.INSTANCE.convert(bo) | |
| 72 | + .setNo(noRedisDAO.generate(WALLET_NO_PREFIX)); | |
| 73 | + payWalletTransactionMapper.insert(transaction); | |
| 74 | + return transaction; | |
| 75 | + } | |
| 76 | + | |
| 77 | + @Override | |
| 78 | + public PayWalletTransactionDO getWalletTransactionByNo(String no) { | |
| 79 | + return payWalletTransactionMapper.selectByNo(no); | |
| 80 | + } | |
| 81 | + | |
| 82 | + @Override | |
| 83 | + public PayWalletTransactionDO getWalletTransaction(String bizId, PayWalletBizTypeEnum type) { | |
| 84 | + return payWalletTransactionMapper.selectByBiz(bizId, type.getType()); | |
| 85 | + } | |
| 86 | + | |
| 87 | + @Override | |
| 88 | + public AppPayWalletTransactionSummaryRespVO getWalletTransactionSummary(Long userId, Integer userType, LocalDateTime[] createTime) { | |
| 89 | + PayWalletDO wallet = payWalletService.getOrCreateWallet(userId, userType); | |
| 90 | + return new AppPayWalletTransactionSummaryRespVO() | |
| 91 | + .setTotalExpense(payWalletTransactionMapper.selectPriceSum(wallet.getId(), TYPE_EXPENSE, createTime)) | |
| 92 | + .setTotalIncome(payWalletTransactionMapper.selectPriceSum(wallet.getId(), TYPE_INCOME, createTime)); | |
| 93 | + } | |
| 94 | + | |
| 95 | +} | ... | ... |
yudao-module-pay/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/bo/WalletTransactionCreateReqBO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.pay.service.wallet.bo; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.validation.InEnum; | |
| 4 | +import cn.iocoder.yudao.module.pay.enums.wallet.PayWalletBizTypeEnum; | |
| 5 | +import lombok.Data; | |
| 6 | + | |
| 7 | +import jakarta.validation.constraints.NotEmpty; | |
| 8 | +import jakarta.validation.constraints.NotNull; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * 创建钱包流水 BO | |
| 12 | + * | |
| 13 | + * @author jason | |
| 14 | + */ | |
| 15 | +@Data | |
| 16 | +public class WalletTransactionCreateReqBO { | |
| 17 | + | |
| 18 | + /** | |
| 19 | + * 钱包编号 | |
| 20 | + * | |
| 21 | + */ | |
| 22 | + @NotNull(message = "钱包编号不能为空") | |
| 23 | + private Long walletId; | |
| 24 | + | |
| 25 | + /** | |
| 26 | + * 交易金额,单位分 | |
| 27 | + * | |
| 28 | + * 正值表示余额增加,负值表示余额减少 | |
| 29 | + */ | |
| 30 | + @NotNull(message = "交易金额不能为空") | |
| 31 | + private Integer price; | |
| 32 | + | |
| 33 | + /** | |
| 34 | + * 交易后余额,单位分 | |
| 35 | + */ | |
| 36 | + @NotNull(message = "交易后余额不能为空") | |
| 37 | + private Integer balance; | |
| 38 | + | |
| 39 | + /** | |
| 40 | + * 关联业务分类 | |
| 41 | + * | |
| 42 | + * 枚举 {@link PayWalletBizTypeEnum#getType()} | |
| 43 | + */ | |
| 44 | + @NotNull(message = "关联业务分类不能为空") | |
| 45 | + @InEnum(PayWalletBizTypeEnum.class) | |
| 46 | + private Integer bizType; | |
| 47 | + | |
| 48 | + /** | |
| 49 | + * 关联业务编号 | |
| 50 | + */ | |
| 51 | + @NotEmpty(message = "关联业务编号不能为空") | |
| 52 | + private String bizId; | |
| 53 | + | |
| 54 | + /** | |
| 55 | + * 流水说明 | |
| 56 | + */ | |
| 57 | + @NotEmpty(message = "流水说明不能为空") | |
| 58 | + private String title; | |
| 59 | +} | ... | ... |
yudao-module-pay/yudao-module-pay-biz/src/test/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/PayClientFactoryImplIntegrationTest.java renamed to yudao-module-pay/src/test/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/PayClientFactoryImplIntegrationTest.java
yudao-module-pay/yudao-module-pay-biz/src/test/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/alipay/AbstractAlipayClientTest.java renamed to yudao-module-pay/src/test/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/alipay/AbstractAlipayClientTest.java
yudao-module-pay/yudao-module-pay-biz/src/test/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/alipay/AlipayBarPayClientTest.java renamed to yudao-module-pay/src/test/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/alipay/AlipayBarPayClientTest.java
yudao-module-pay/yudao-module-pay-biz/src/test/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/alipay/AlipayPcPayClientTest.java renamed to yudao-module-pay/src/test/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/alipay/AlipayPcPayClientTest.java
yudao-module-pay/yudao-module-pay-biz/src/test/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/alipay/AlipayQrPayClientTest.java renamed to yudao-module-pay/src/test/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/alipay/AlipayQrPayClientTest.java
yudao-module-pay/src/test/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/alipay/AlipayWapPayClientTest.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.pay.framework.pay.core.client.impl.alipay; | |
| 2 | + | |
| 3 | +import cn.hutool.http.Method; | |
| 4 | +import cn.iocoder.yudao.module.pay.framework.pay.core.client.dto.order.PayOrderRespDTO; | |
| 5 | +import cn.iocoder.yudao.module.pay.framework.pay.core.client.dto.order.PayOrderUnifiedReqDTO; | |
| 6 | +import cn.iocoder.yudao.module.pay.framework.pay.core.enums.PayOrderDisplayModeEnum; | |
| 7 | +import com.alipay.api.AlipayApiException; | |
| 8 | +import com.alipay.api.domain.AlipayTradeWapPayModel; | |
| 9 | +import com.alipay.api.request.AlipayTradeWapPayRequest; | |
| 10 | +import com.alipay.api.response.AlipayTradeWapPayResponse; | |
| 11 | +import org.junit.jupiter.api.BeforeEach; | |
| 12 | +import org.junit.jupiter.api.DisplayName; | |
| 13 | +import org.junit.jupiter.api.Test; | |
| 14 | +import org.mockito.ArgumentMatcher; | |
| 15 | +import org.mockito.InjectMocks; | |
| 16 | + | |
| 17 | +import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.*; | |
| 18 | +import static cn.iocoder.yudao.module.pay.enums.order.PayOrderStatusEnum.CLOSED; | |
| 19 | +import static cn.iocoder.yudao.module.pay.enums.order.PayOrderStatusEnum.WAITING; | |
| 20 | +import static org.junit.jupiter.api.Assertions.*; | |
| 21 | +import static org.junit.jupiter.api.Assertions.assertEquals; | |
| 22 | +import static org.mockito.ArgumentMatchers.argThat; | |
| 23 | +import static org.mockito.ArgumentMatchers.eq; | |
| 24 | +import static org.mockito.Mockito.when; | |
| 25 | + | |
| 26 | +/** | |
| 27 | + * {@link AlipayWapPayClient} 单元测试 | |
| 28 | + * | |
| 29 | + * @author jason | |
| 30 | + */ | |
| 31 | +public class AlipayWapPayClientTest extends AbstractAlipayClientTest { | |
| 32 | + | |
| 33 | + /** | |
| 34 | + * 支付宝 H5 支付 Client | |
| 35 | + */ | |
| 36 | + @InjectMocks | |
| 37 | + private AlipayWapPayClient client = new AlipayWapPayClient(randomLongId(), config); | |
| 38 | + | |
| 39 | + @BeforeEach | |
| 40 | + public void setUp() { | |
| 41 | + setClient(client); | |
| 42 | + } | |
| 43 | + | |
| 44 | + @Test | |
| 45 | + @DisplayName("支付宝 H5 支付:下单成功") | |
| 46 | + public void testUnifiedOrder_success() throws AlipayApiException { | |
| 47 | + // mock 方法 | |
| 48 | + String h5Body = randomString(); | |
| 49 | + Integer price = randomInteger(); | |
| 50 | + AlipayTradeWapPayResponse response = randomPojo(AlipayTradeWapPayResponse.class, o -> { | |
| 51 | + o.setSubCode(""); | |
| 52 | + o.setBody(h5Body); | |
| 53 | + }); | |
| 54 | + String notifyUrl = randomURL(); | |
| 55 | + when(defaultAlipayClient.pageExecute(argThat((ArgumentMatcher<AlipayTradeWapPayRequest>) request -> { | |
| 56 | + assertInstanceOf(AlipayTradeWapPayModel.class, request.getBizModel()); | |
| 57 | + AlipayTradeWapPayModel bizModel = (AlipayTradeWapPayModel) request.getBizModel(); | |
| 58 | + assertEquals(String.valueOf(price / 100.0), bizModel.getTotalAmount()); | |
| 59 | + assertEquals(notifyUrl, request.getNotifyUrl()); | |
| 60 | + return true; | |
| 61 | + }), eq(Method.GET.name()))).thenReturn(response); | |
| 62 | + // 准备请求参数 | |
| 63 | + String outTradeNo = randomString(); | |
| 64 | + PayOrderUnifiedReqDTO reqDTO = buildOrderUnifiedReqDTO(notifyUrl, outTradeNo, price); | |
| 65 | + | |
| 66 | + // 调用 | |
| 67 | + PayOrderRespDTO resp = client.unifiedOrder(reqDTO); | |
| 68 | + // 断言 | |
| 69 | + assertEquals(WAITING.getStatus(), resp.getStatus()); | |
| 70 | + assertEquals(outTradeNo, resp.getOutTradeNo()); | |
| 71 | + assertNull(resp.getChannelOrderNo()); | |
| 72 | + assertNull(resp.getChannelUserId()); | |
| 73 | + assertNull(resp.getSuccessTime()); | |
| 74 | + assertEquals(PayOrderDisplayModeEnum.URL.getMode(), resp.getDisplayMode()); | |
| 75 | + assertEquals(response.getBody(), resp.getDisplayContent()); | |
| 76 | + assertSame(response, resp.getRawData()); | |
| 77 | + assertNull(resp.getChannelErrorCode()); | |
| 78 | + assertNull(resp.getChannelErrorMsg()); | |
| 79 | + } | |
| 80 | + | |
| 81 | + @Test | |
| 82 | + @DisplayName("支付宝 H5 支付:渠道返回失败") | |
| 83 | + public void test_unified_order_channel_failed() throws AlipayApiException { | |
| 84 | + // mock 方法 | |
| 85 | + String subCode = randomString(); | |
| 86 | + String subMsg = randomString(); | |
| 87 | + AlipayTradeWapPayResponse response = randomPojo(AlipayTradeWapPayResponse.class, o -> { | |
| 88 | + o.setSubCode(subCode); | |
| 89 | + o.setSubMsg(subMsg); | |
| 90 | + }); | |
| 91 | + when(defaultAlipayClient.pageExecute(argThat((ArgumentMatcher<AlipayTradeWapPayRequest>) request -> true), | |
| 92 | + eq(Method.GET.name()))).thenReturn(response); | |
| 93 | + String outTradeNo = randomString(); | |
| 94 | + PayOrderUnifiedReqDTO reqDTO = buildOrderUnifiedReqDTO(randomURL(), outTradeNo, randomInteger()); | |
| 95 | + | |
| 96 | + // 调用 | |
| 97 | + PayOrderRespDTO resp = client.unifiedOrder(reqDTO); | |
| 98 | + // 断言 | |
| 99 | + assertEquals(CLOSED.getStatus(), resp.getStatus()); | |
| 100 | + assertEquals(outTradeNo, resp.getOutTradeNo()); | |
| 101 | + assertNull(resp.getChannelOrderNo()); | |
| 102 | + assertNull(resp.getChannelUserId()); | |
| 103 | + assertNull(resp.getSuccessTime()); | |
| 104 | + assertNull(resp.getDisplayMode()); | |
| 105 | + assertNull(resp.getDisplayContent()); | |
| 106 | + assertSame(response, resp.getRawData()); | |
| 107 | + assertEquals(subCode, resp.getChannelErrorCode()); | |
| 108 | + assertEquals(subMsg, resp.getChannelErrorMsg()); | |
| 109 | + } | |
| 110 | + | |
| 111 | +} | ... | ... |
yudao-module-pay/yudao-module-pay-biz/src/test/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/weixin/WxBarPayClientIntegrationTest.java renamed to yudao-module-pay/src/test/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/weixin/WxBarPayClientIntegrationTest.java
yudao-module-pay/src/test/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/weixin/WxNativePayClientIntegrationTest.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.pay.framework.pay.core.client.impl.weixin; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils; | |
| 4 | +import cn.iocoder.yudao.framework.common.util.json.JsonUtils; | |
| 5 | +import com.github.binarywang.wxpay.bean.request.WxPayRefundV3Request; | |
| 6 | +import com.github.binarywang.wxpay.bean.request.WxPayUnifiedOrderV3Request; | |
| 7 | +import com.github.binarywang.wxpay.bean.result.WxPayRefundV3Result; | |
| 8 | +import com.github.binarywang.wxpay.bean.result.enums.TradeTypeEnum; | |
| 9 | +import com.github.binarywang.wxpay.config.WxPayConfig; | |
| 10 | +import com.github.binarywang.wxpay.exception.WxPayException; | |
| 11 | +import com.github.binarywang.wxpay.service.WxPayService; | |
| 12 | +import com.github.binarywang.wxpay.service.impl.WxPayServiceImpl; | |
| 13 | +import org.junit.jupiter.api.Disabled; | |
| 14 | +import org.junit.jupiter.api.Test; | |
| 15 | + | |
| 16 | +import java.time.Duration; | |
| 17 | + | |
| 18 | +import static cn.iocoder.yudao.module.pay.framework.pay.core.client.impl.weixin.AbstractWxPayClient.formatDateV3; | |
| 19 | + | |
| 20 | + | |
| 21 | +/** | |
| 22 | + * {@link WxNativePayClient} 的集成测试,用于快速调试微信扫码支付 | |
| 23 | + * | |
| 24 | + * @author 芋道源码 | |
| 25 | + */ | |
| 26 | +@Disabled | |
| 27 | +public class WxNativePayClientIntegrationTest { | |
| 28 | + | |
| 29 | + @Test | |
| 30 | + public void testPayV3() throws WxPayException { | |
| 31 | + // 创建 config 配置 | |
| 32 | + WxPayConfig config = buildWxPayConfigV3(); | |
| 33 | + // 创建 WxPayService 客户端 | |
| 34 | + WxPayService client = new WxPayServiceImpl(); | |
| 35 | + client.setConfig(config); | |
| 36 | + | |
| 37 | + // 执行发起支付 | |
| 38 | + WxPayUnifiedOrderV3Request request = new WxPayUnifiedOrderV3Request() | |
| 39 | + .setOutTradeNo(String.valueOf(System.currentTimeMillis())) | |
| 40 | + .setDescription("测试支付-body") | |
| 41 | + .setAmount(new WxPayUnifiedOrderV3Request.Amount().setTotal(1)) // 单位分 | |
| 42 | + .setTimeExpire(formatDateV3(LocalDateTimeUtils.addTime(Duration.ofMinutes(2)))) | |
| 43 | + .setSceneInfo(new WxPayUnifiedOrderV3Request.SceneInfo().setPayerClientIp("127.0.0.1")) | |
| 44 | + .setNotifyUrl("http://127.0.0.1:48080"); | |
| 45 | + System.out.println("========= request =========="); | |
| 46 | + System.out.println(JsonUtils.toJsonPrettyString(request)); | |
| 47 | + String response = client.createOrderV3(TradeTypeEnum.NATIVE, request); | |
| 48 | + System.out.println("========= response =========="); | |
| 49 | + System.out.println(JsonUtils.toJsonPrettyString(response)); | |
| 50 | + } | |
| 51 | + | |
| 52 | + @Test | |
| 53 | + public void testRefundV3() throws WxPayException { | |
| 54 | + // 创建 config 配置 | |
| 55 | + WxPayConfig config = buildWxPayConfigV3(); | |
| 56 | + // 创建 WxPayService 客户端 | |
| 57 | + WxPayService client = new WxPayServiceImpl(); | |
| 58 | + client.setConfig(config); | |
| 59 | + | |
| 60 | + // 执行发起退款 | |
| 61 | + WxPayRefundV3Request request = new WxPayRefundV3Request() | |
| 62 | + .setOutTradeNo("1689545729695") | |
| 63 | + .setOutRefundNo(String.valueOf(System.currentTimeMillis())) | |
| 64 | + .setAmount(new WxPayRefundV3Request.Amount().setTotal(1).setRefund(1).setCurrency("CNY")) | |
| 65 | + .setReason("就是想退了"); | |
| 66 | + System.out.println("========= request =========="); | |
| 67 | + System.out.println(JsonUtils.toJsonPrettyString(request)); | |
| 68 | + WxPayRefundV3Result response = client.refundV3(request); | |
| 69 | + System.out.println("========= response =========="); | |
| 70 | + System.out.println(JsonUtils.toJsonPrettyString(response)); | |
| 71 | + } | |
| 72 | + | |
| 73 | + private WxPayConfig buildWxPayConfigV3() { | |
| 74 | + WxPayConfig config = new WxPayConfig(); | |
| 75 | + config.setAppId("wx62056c0d5e8db250"); | |
| 76 | + config.setMchId("1545083881"); | |
| 77 | + config.setApiV3Key("459arNsYHl1mgkiO6H9ZH5KkhFXSxaA4"); | |
| 78 | +// config.setCertSerialNo(serialNo); | |
| 79 | + config.setPrivateCertPath("/Users/yunai/Downloads/wx_pay/apiclient_cert.pem"); | |
| 80 | + config.setPrivateKeyPath("/Users/yunai/Downloads/wx_pay/apiclient_key.pem"); | |
| 81 | + return config; | |
| 82 | + } | |
| 83 | + | |
| 84 | +} | ... | ... |
yudao-module-pay/yudao-module-pay-biz/src/test/java/cn/iocoder/yudao/module/pay/service/app/PayAppServiceTest.java renamed to yudao-module-pay/src/test/java/cn/iocoder/yudao/module/pay/service/app/PayAppServiceTest.java
yudao-module-pay/yudao-module-pay-biz/src/test/java/cn/iocoder/yudao/module/pay/service/channel/PayChannelServiceTest.java renamed to yudao-module-pay/src/test/java/cn/iocoder/yudao/module/pay/service/channel/PayChannelServiceTest.java
yudao-module-pay/yudao-module-pay-biz/src/test/java/cn/iocoder/yudao/module/pay/service/notify/PayNotifyServiceTest.java renamed to yudao-module-pay/src/test/java/cn/iocoder/yudao/module/pay/service/notify/PayNotifyServiceTest.java
yudao-module-pay/yudao-module-pay-biz/src/test/java/cn/iocoder/yudao/module/pay/service/order/PayOrderServiceTest.java renamed to yudao-module-pay/src/test/java/cn/iocoder/yudao/module/pay/service/order/PayOrderServiceTest.java
yudao-module-pay/yudao-module-pay-biz/src/test/java/cn/iocoder/yudao/module/pay/service/refund/PayRefundServiceTest.java renamed to yudao-module-pay/src/test/java/cn/iocoder/yudao/module/pay/service/refund/PayRefundServiceTest.java
yudao-module-pay/src/test/resources/application-unit-test.yaml
0 → 100644
| 1 | +spring: | |
| 2 | + main: | |
| 3 | + lazy-initialization: true # 开启懒加载,加快速度 | |
| 4 | + banner-mode: off # 单元测试,禁用 Banner | |
| 5 | + | |
| 6 | +--- #################### 数据库相关配置 #################### | |
| 7 | + | |
| 8 | +spring: | |
| 9 | + # 数据源配置项 | |
| 10 | + datasource: | |
| 11 | + name: ruoyi-vue-pro | |
| 12 | + url: jdbc:h2:mem:testdb;MODE=MYSQL;DATABASE_TO_UPPER=false;NON_KEYWORDS=value; # MODE 使用 MySQL 模式;DATABASE_TO_UPPER 配置表和字段使用小写 | |
| 13 | + driver-class-name: org.h2.Driver | |
| 14 | + username: sa | |
| 15 | + password: | |
| 16 | + druid: | |
| 17 | + async-init: true # 单元测试,异步初始化 Druid 连接池,提升启动速度 | |
| 18 | + initial-size: 1 # 单元测试,配置为 1,提升启动速度 | |
| 19 | + sql: | |
| 20 | + init: | |
| 21 | + schema-locations: classpath:/sql/create_tables.sql | |
| 22 | + | |
| 23 | + # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 | |
| 24 | + data: | |
| 25 | + redis: | |
| 26 | + host: 127.0.0.1 # 地址 | |
| 27 | + port: 16379 # 端口(单元测试,使用 16379 端口) | |
| 28 | + database: 0 # 数据库索引 | |
| 29 | + | |
| 30 | +mybatis: | |
| 31 | + lazy-initialization: true # 单元测试,设置 MyBatis Mapper 延迟加载,加速每个单元测试 | |
| 32 | + | |
| 33 | +--- #################### 定时任务相关配置 #################### | |
| 34 | + | |
| 35 | +--- #################### 配置中心相关配置 #################### | |
| 36 | + | |
| 37 | +--- #################### 服务保障相关配置 #################### | |
| 38 | + | |
| 39 | +# Lock4j 配置项(单元测试,禁用 Lock4j) | |
| 40 | + | |
| 41 | +--- #################### 监控相关配置 #################### | |
| 42 | + | |
| 43 | +--- #################### 芋道相关配置 #################### | |
| 44 | + | |
| 45 | +# 芋道配置项,设置当前项目所有自定义的配置 | |
| 46 | +yudao: | |
| 47 | + info: | |
| 48 | + base-package: cn.iocoder.yudao.module | ... | ... |
yudao-module-pay/yudao-module-pay-biz/src/test/resources/logback.xml renamed to yudao-module-pay/src/test/resources/logback.xml
yudao-module-pay/yudao-module-pay-biz/src/test/resources/sql/clean.sql renamed to yudao-module-pay/src/test/resources/sql/clean.sql
yudao-module-pay/yudao-module-pay-biz/src/test/resources/sql/create_tables.sql renamed to yudao-module-pay/src/test/resources/sql/create_tables.sql
yudao-module-pay/yudao-module-pay-api/pom.xml deleted
| 1 | -<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | -<project xmlns="http://maven.apache.org/POM/4.0.0" | |
| 3 | - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| 4 | - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
| 5 | - <parent> | |
| 6 | - <artifactId>yudao-module-pay</artifactId> | |
| 7 | - <groupId>cn.iocoder.boot</groupId> | |
| 8 | - <version>${revision}</version> | |
| 9 | - </parent> | |
| 10 | - <modelVersion>4.0.0</modelVersion> | |
| 11 | - <artifactId>yudao-module-pay-api</artifactId> | |
| 12 | - <packaging>jar</packaging> | |
| 13 | - | |
| 14 | - <name>${project.artifactId}</name> | |
| 15 | - <description> | |
| 16 | - pay 模块 API,暴露给其它模块调用 | |
| 17 | - </description> | |
| 18 | - | |
| 19 | - <dependencies> | |
| 20 | - <dependency> | |
| 21 | - <groupId>cn.iocoder.boot</groupId> | |
| 22 | - <artifactId>yudao-common</artifactId> | |
| 23 | - </dependency> | |
| 24 | - | |
| 25 | - <!-- 参数校验 --> | |
| 26 | - <dependency> | |
| 27 | - <groupId>org.springframework.boot</groupId> | |
| 28 | - <artifactId>spring-boot-starter-validation</artifactId> | |
| 29 | - <optional>true</optional> | |
| 30 | - </dependency> | |
| 31 | - </dependencies> | |
| 32 | - | |
| 33 | -</project> |
yudao-module-pay/yudao-module-pay-biz/pom.xml deleted
| 1 | -<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | -<project xmlns="http://maven.apache.org/POM/4.0.0" | |
| 3 | - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| 4 | - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
| 5 | - <parent> | |
| 6 | - <groupId>cn.iocoder.boot</groupId> | |
| 7 | - <artifactId>yudao-module-pay</artifactId> | |
| 8 | - <version>${revision}</version> | |
| 9 | - </parent> | |
| 10 | - <modelVersion>4.0.0</modelVersion> | |
| 11 | - <artifactId>yudao-module-pay-biz</artifactId> | |
| 12 | - <packaging>jar</packaging> | |
| 13 | - | |
| 14 | - <name>${project.artifactId}</name> | |
| 15 | - <description> | |
| 16 | - pay 模块,我们放支付业务,提供业务的支付能力。 | |
| 17 | - 例如说:商户、应用、支付、退款等等 | |
| 18 | - </description> | |
| 19 | - | |
| 20 | - <dependencies> | |
| 21 | - <dependency> | |
| 22 | - <groupId>cn.iocoder.boot</groupId> | |
| 23 | - <artifactId>yudao-module-system-api</artifactId> | |
| 24 | - <version>${revision}</version> | |
| 25 | - </dependency> | |
| 26 | - <dependency> | |
| 27 | - <groupId>cn.iocoder.boot</groupId> | |
| 28 | - <artifactId>yudao-module-pay-api</artifactId> | |
| 29 | - <version>${revision}</version> | |
| 30 | - </dependency> | |
| 31 | - | |
| 32 | - <!-- 业务组件 --> | |
| 33 | - <dependency> | |
| 34 | - <groupId>cn.iocoder.boot</groupId> | |
| 35 | - <artifactId>yudao-spring-boot-starter-biz-tenant</artifactId> | |
| 36 | - </dependency> | |
| 37 | - | |
| 38 | - <!-- Web 相关 --> | |
| 39 | - <dependency> | |
| 40 | - <groupId>cn.iocoder.boot</groupId> | |
| 41 | - <artifactId>yudao-spring-boot-starter-security</artifactId> | |
| 42 | - </dependency> | |
| 43 | - | |
| 44 | - <!-- DB 相关 --> | |
| 45 | - <dependency> | |
| 46 | - <groupId>cn.iocoder.boot</groupId> | |
| 47 | - <artifactId>yudao-spring-boot-starter-mybatis</artifactId> | |
| 48 | - </dependency> | |
| 49 | - | |
| 50 | - <dependency> | |
| 51 | - <groupId>cn.iocoder.boot</groupId> | |
| 52 | - <artifactId>yudao-spring-boot-starter-redis</artifactId> | |
| 53 | - </dependency> | |
| 54 | - | |
| 55 | - <!-- Job 定时任务相关 --> | |
| 56 | - <dependency> | |
| 57 | - <groupId>cn.iocoder.boot</groupId> | |
| 58 | - <artifactId>yudao-spring-boot-starter-job</artifactId> | |
| 59 | - </dependency> | |
| 60 | - | |
| 61 | - <!-- Test 测试相关 --> | |
| 62 | - <dependency> | |
| 63 | - <groupId>cn.iocoder.boot</groupId> | |
| 64 | - <artifactId>yudao-spring-boot-starter-test</artifactId> | |
| 65 | - <scope>test</scope> | |
| 66 | - </dependency> | |
| 67 | - | |
| 68 | - <!-- 工具类相关 --> | |
| 69 | - <dependency> | |
| 70 | - <groupId>cn.iocoder.boot</groupId> | |
| 71 | - <artifactId>yudao-spring-boot-starter-excel</artifactId> | |
| 72 | - </dependency> | |
| 73 | - | |
| 74 | - <!-- 三方云服务相关 --> | |
| 75 | - <dependency> | |
| 76 | - <groupId>com.alipay.sdk</groupId> | |
| 77 | - <artifactId>alipay-sdk-java</artifactId> | |
| 78 | - <version>4.35.79.ALL</version> | |
| 79 | - <exclusions> | |
| 80 | - <exclusion> | |
| 81 | - <groupId>org.bouncycastle</groupId> | |
| 82 | - <artifactId>bcprov-jdk15on</artifactId> | |
| 83 | - </exclusion> | |
| 84 | - </exclusions> | |
| 85 | - </dependency> | |
| 86 | - <dependency> | |
| 87 | - <groupId>com.github.binarywang</groupId> | |
| 88 | - <artifactId>weixin-java-pay</artifactId> | |
| 89 | - </dependency> | |
| 90 | - | |
| 91 | - </dependencies> | |
| 92 | - | |
| 93 | -</project> |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/demo/PayDemoOrderService.java deleted
| 1 | -package cn.iocoder.yudao.module.pay.service.demo; | |
| 2 | - | |
| 3 | -import cn.iocoder.yudao.framework.common.pojo.PageParam; | |
| 4 | -import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 5 | -import cn.iocoder.yudao.module.pay.controller.admin.demo.vo.order.PayDemoOrderCreateReqVO; | |
| 6 | -import cn.iocoder.yudao.module.pay.dal.dataobject.demo.PayDemoOrderDO; | |
| 7 | - | |
| 8 | -import jakarta.validation.Valid; | |
| 9 | - | |
| 10 | -/** | |
| 11 | - * 示例订单 Service 接口 | |
| 12 | - * | |
| 13 | - * @author 芋道源码 | |
| 14 | - */ | |
| 15 | -public interface PayDemoOrderService { | |
| 16 | - | |
| 17 | - /** | |
| 18 | - * 创建示例订单 | |
| 19 | - * | |
| 20 | - * @param userId 用户编号 | |
| 21 | - * @param createReqVO 创建信息 | |
| 22 | - * @return 编号 | |
| 23 | - */ | |
| 24 | - Long createDemoOrder(Long userId, @Valid PayDemoOrderCreateReqVO createReqVO); | |
| 25 | - | |
| 26 | - /** | |
| 27 | - * 获得示例订单 | |
| 28 | - * | |
| 29 | - * @param id 编号 | |
| 30 | - * @return 示例订单 | |
| 31 | - */ | |
| 32 | - PayDemoOrderDO getDemoOrder(Long id); | |
| 33 | - | |
| 34 | - /** | |
| 35 | - * 获得示例订单分页 | |
| 36 | - * | |
| 37 | - * @param pageReqVO 分页查询 | |
| 38 | - * @return 示例订单分页 | |
| 39 | - */ | |
| 40 | - PageResult<PayDemoOrderDO> getDemoOrderPage(PageParam pageReqVO); | |
| 41 | - | |
| 42 | - /** | |
| 43 | - * 更新示例订单为已支付 | |
| 44 | - * | |
| 45 | - * @param id 编号 | |
| 46 | - * @param payOrderId 支付订单号 | |
| 47 | - */ | |
| 48 | - void updateDemoOrderPaid(Long id, Long payOrderId); | |
| 49 | - | |
| 50 | - /** | |
| 51 | - * 发起示例订单的退款 | |
| 52 | - * | |
| 53 | - * @param id 编号 | |
| 54 | - * @param userIp 用户编号 | |
| 55 | - */ | |
| 56 | - void refundDemoOrder(Long id, String userIp); | |
| 57 | - | |
| 58 | - /** | |
| 59 | - * 更新示例订单为已退款 | |
| 60 | - * | |
| 61 | - * @param id 编号 | |
| 62 | - * @param refundId 退款编号 | |
| 63 | - * @param payRefundId 退款订单号 | |
| 64 | - */ | |
| 65 | - void updateDemoOrderRefunded(Long id, String refundId, Long payRefundId); | |
| 66 | - | |
| 67 | -} |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/demo/PayDemoWithdrawService.java deleted
| 1 | -package cn.iocoder.yudao.module.pay.service.demo; | |
| 2 | - | |
| 3 | -import cn.iocoder.yudao.framework.common.pojo.PageParam; | |
| 4 | -import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 5 | -import cn.iocoder.yudao.module.pay.controller.admin.demo.vo.withdraw.PayDemoWithdrawCreateReqVO; | |
| 6 | -import cn.iocoder.yudao.module.pay.dal.dataobject.demo.PayDemoWithdrawDO; | |
| 7 | - | |
| 8 | -import jakarta.validation.Valid; | |
| 9 | - | |
| 10 | -/** | |
| 11 | - * 示例提现单 Service 接口 | |
| 12 | - * | |
| 13 | - * @author jason | |
| 14 | - */ | |
| 15 | -public interface PayDemoWithdrawService { | |
| 16 | - | |
| 17 | - /** | |
| 18 | - * 创建示例提现单 | |
| 19 | - * | |
| 20 | - * @param createReqVO 创建信息 | |
| 21 | - * @return 编号 | |
| 22 | - */ | |
| 23 | - Long createDemoWithdraw(@Valid PayDemoWithdrawCreateReqVO createReqVO); | |
| 24 | - | |
| 25 | - /** | |
| 26 | - * 提现单转账 | |
| 27 | - * | |
| 28 | - * @param id 提现单编号 | |
| 29 | - * @return 转账编号 | |
| 30 | - */ | |
| 31 | - Long transferDemoWithdraw(Long id); | |
| 32 | - | |
| 33 | - /** | |
| 34 | - * 获得示例提现单分页 | |
| 35 | - * | |
| 36 | - * @param pageVO 分页查询参数 | |
| 37 | - */ | |
| 38 | - PageResult<PayDemoWithdrawDO> getDemoWithdrawPage(PageParam pageVO); | |
| 39 | - | |
| 40 | - /** | |
| 41 | - * 更新示例提现单的状态 | |
| 42 | - * | |
| 43 | - * @param id 编号 | |
| 44 | - * @param payTransferId 转账单编号 | |
| 45 | - */ | |
| 46 | - void updateDemoWithdrawTransferred(Long id, Long payTransferId); | |
| 47 | - | |
| 48 | -} |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/notify/PayNotifyService.java deleted
| 1 | -package cn.iocoder.yudao.module.pay.service.notify; | |
| 2 | - | |
| 3 | -import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 4 | -import cn.iocoder.yudao.module.pay.controller.admin.notify.vo.PayNotifyTaskPageReqVO; | |
| 5 | -import cn.iocoder.yudao.module.pay.dal.dataobject.notify.PayNotifyLogDO; | |
| 6 | -import cn.iocoder.yudao.module.pay.dal.dataobject.notify.PayNotifyTaskDO; | |
| 7 | - | |
| 8 | -import java.util.List; | |
| 9 | - | |
| 10 | -/** | |
| 11 | - * 回调通知 Service 接口 | |
| 12 | - * | |
| 13 | - * @author 芋道源码 | |
| 14 | - */ | |
| 15 | -public interface PayNotifyService { | |
| 16 | - | |
| 17 | - /** | |
| 18 | - * 创建回调通知任务 | |
| 19 | - * | |
| 20 | - * @param type 类型 | |
| 21 | - * @param dataId 数据编号 | |
| 22 | - */ | |
| 23 | - void createPayNotifyTask(Integer type, Long dataId); | |
| 24 | - | |
| 25 | - /** | |
| 26 | - * 执行回调通知 | |
| 27 | - * | |
| 28 | - * 注意,该方法提供给定时任务调用。目前是 yudao-server 进行调用 | |
| 29 | - * @return 通知数量 | |
| 30 | - */ | |
| 31 | - int executeNotify() throws InterruptedException; | |
| 32 | - | |
| 33 | - /** | |
| 34 | - * 获得回调通知 | |
| 35 | - * | |
| 36 | - * @param id 编号 | |
| 37 | - * @return 回调通知 | |
| 38 | - */ | |
| 39 | - PayNotifyTaskDO getNotifyTask(Long id); | |
| 40 | - | |
| 41 | - /** | |
| 42 | - * 获得回调通知分页 | |
| 43 | - * | |
| 44 | - * @param pageReqVO 分页查询 | |
| 45 | - * @return 回调通知分页 | |
| 46 | - */ | |
| 47 | - PageResult<PayNotifyTaskDO> getNotifyTaskPage(PayNotifyTaskPageReqVO pageReqVO); | |
| 48 | - | |
| 49 | - /** | |
| 50 | - * 获得回调日志列表 | |
| 51 | - * | |
| 52 | - * @param taskId 任务编号 | |
| 53 | - * @return 日志列表 | |
| 54 | - */ | |
| 55 | - List<PayNotifyLogDO> getNotifyLogList(Long taskId); | |
| 56 | - | |
| 57 | -} |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/refund/PayRefundService.java deleted
| 1 | -package cn.iocoder.yudao.module.pay.service.refund; | |
| 2 | - | |
| 3 | -import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 4 | -import cn.iocoder.yudao.module.pay.framework.pay.core.client.dto.refund.PayRefundRespDTO; | |
| 5 | -import cn.iocoder.yudao.module.pay.api.refund.dto.PayRefundCreateReqDTO; | |
| 6 | -import cn.iocoder.yudao.module.pay.controller.admin.refund.vo.PayRefundExportReqVO; | |
| 7 | -import cn.iocoder.yudao.module.pay.controller.admin.refund.vo.PayRefundPageReqVO; | |
| 8 | -import cn.iocoder.yudao.module.pay.dal.dataobject.refund.PayRefundDO; | |
| 9 | - | |
| 10 | -import java.util.List; | |
| 11 | - | |
| 12 | -/** | |
| 13 | - * 退款订单 Service 接口 | |
| 14 | - * | |
| 15 | - * @author aquan | |
| 16 | - */ | |
| 17 | -public interface PayRefundService { | |
| 18 | - | |
| 19 | - /** | |
| 20 | - * 获得退款订单 | |
| 21 | - * | |
| 22 | - * @param id 编号 | |
| 23 | - * @return 退款订单 | |
| 24 | - */ | |
| 25 | - PayRefundDO getRefund(Long id); | |
| 26 | - | |
| 27 | - /** | |
| 28 | - * 获得退款订单 | |
| 29 | - * | |
| 30 | - * @param no 外部退款单号 | |
| 31 | - * @return 退款订单 | |
| 32 | - */ | |
| 33 | - PayRefundDO getRefundByNo(String no); | |
| 34 | - | |
| 35 | - /** | |
| 36 | - * 获得指定应用的退款数量 | |
| 37 | - * | |
| 38 | - * @param appId 应用编号 | |
| 39 | - * @return 退款数量 | |
| 40 | - */ | |
| 41 | - Long getRefundCountByAppId(Long appId); | |
| 42 | - | |
| 43 | - /** | |
| 44 | - * 获得退款订单分页 | |
| 45 | - * | |
| 46 | - * @param pageReqVO 分页查询 | |
| 47 | - * @return 退款订单分页 | |
| 48 | - */ | |
| 49 | - PageResult<PayRefundDO> getRefundPage(PayRefundPageReqVO pageReqVO); | |
| 50 | - | |
| 51 | - /** | |
| 52 | - * 获得退款订单列表, 用于 Excel 导出 | |
| 53 | - * | |
| 54 | - * @param exportReqVO 查询条件 | |
| 55 | - * @return 退款订单列表 | |
| 56 | - */ | |
| 57 | - List<PayRefundDO> getRefundList(PayRefundExportReqVO exportReqVO); | |
| 58 | - | |
| 59 | - /** | |
| 60 | - * 创建退款申请 | |
| 61 | - * | |
| 62 | - * @param reqDTO 退款申请信息 | |
| 63 | - * @return 退款单号 | |
| 64 | - */ | |
| 65 | - Long createRefund(PayRefundCreateReqDTO reqDTO); | |
| 66 | - | |
| 67 | - /** | |
| 68 | - * 渠道的退款通知 | |
| 69 | - * | |
| 70 | - * @param channelId 渠道编号 | |
| 71 | - * @param notify 通知 | |
| 72 | - */ | |
| 73 | - void notifyRefund(Long channelId, PayRefundRespDTO notify); | |
| 74 | - | |
| 75 | - /** | |
| 76 | - * 同步渠道退款的退款状态 | |
| 77 | - * | |
| 78 | - * @return 同步到状态的退款数量,包括退款成功、退款失败 | |
| 79 | - */ | |
| 80 | - int syncRefund(); | |
| 81 | - | |
| 82 | -} |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/transfer/PayTransferService.java deleted
| 1 | -package cn.iocoder.yudao.module.pay.service.transfer; | |
| 2 | - | |
| 3 | -import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 4 | -import cn.iocoder.yudao.module.pay.framework.pay.core.client.dto.transfer.PayTransferRespDTO; | |
| 5 | -import cn.iocoder.yudao.module.pay.api.transfer.dto.PayTransferCreateReqDTO; | |
| 6 | -import cn.iocoder.yudao.module.pay.api.transfer.dto.PayTransferCreateRespDTO; | |
| 7 | -import cn.iocoder.yudao.module.pay.controller.admin.transfer.vo.PayTransferPageReqVO; | |
| 8 | -import cn.iocoder.yudao.module.pay.dal.dataobject.transfer.PayTransferDO; | |
| 9 | -import jakarta.validation.Valid; | |
| 10 | - | |
| 11 | -/** | |
| 12 | - * 转账 Service 接口 | |
| 13 | - * | |
| 14 | - * @author jason | |
| 15 | - */ | |
| 16 | -public interface PayTransferService { | |
| 17 | - | |
| 18 | - /** | |
| 19 | - * 创建转账单,并发起转账 | |
| 20 | - * | |
| 21 | - * @param reqDTO 创建请求 | |
| 22 | - * @return 转账单编号 | |
| 23 | - */ | |
| 24 | - PayTransferCreateRespDTO createTransfer(@Valid PayTransferCreateReqDTO reqDTO); | |
| 25 | - | |
| 26 | - /** | |
| 27 | - * 获取转账单 | |
| 28 | - * @param id 转账单编号 | |
| 29 | - */ | |
| 30 | - PayTransferDO getTransfer(Long id); | |
| 31 | - | |
| 32 | - /** | |
| 33 | - * 根据转账单号获取转账单 | |
| 34 | - * | |
| 35 | - * @param no 转账单号 | |
| 36 | - * @return 转账单 | |
| 37 | - */ | |
| 38 | - PayTransferDO getTransferByNo(String no); | |
| 39 | - | |
| 40 | - /** | |
| 41 | - * 获得转账单分页 | |
| 42 | - * | |
| 43 | - * @param pageReqVO 分页查询 | |
| 44 | - * @return 转账单分页 | |
| 45 | - */ | |
| 46 | - PageResult<PayTransferDO> getTransferPage(PayTransferPageReqVO pageReqVO); | |
| 47 | - | |
| 48 | - /** | |
| 49 | - * 同步渠道转账单状态 | |
| 50 | - * | |
| 51 | - * @return 同步到状态的转账数量,包括转账成功、转账失败、转账中的 | |
| 52 | - */ | |
| 53 | - int syncTransfer(); | |
| 54 | - | |
| 55 | - /** | |
| 56 | - * 【单个】同步渠道转账单状态 | |
| 57 | - * | |
| 58 | - * @param id 转账单编号 | |
| 59 | - */ | |
| 60 | - void syncTransfer(Long id); | |
| 61 | - | |
| 62 | - /** | |
| 63 | - * 渠道的转账通知 | |
| 64 | - * | |
| 65 | - * @param channelId 渠道编号 | |
| 66 | - * @param notify 通知 | |
| 67 | - */ | |
| 68 | - void notifyTransfer(Long channelId, PayTransferRespDTO notify); | |
| 69 | - | |
| 70 | -} |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletRechargePackageService.java deleted
| 1 | -package cn.iocoder.yudao.module.pay.service.wallet; | |
| 2 | - | |
| 3 | -import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 4 | -import cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.rechargepackage.WalletRechargePackageCreateReqVO; | |
| 5 | -import cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.rechargepackage.WalletRechargePackagePageReqVO; | |
| 6 | -import cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.rechargepackage.WalletRechargePackageUpdateReqVO; | |
| 7 | -import cn.iocoder.yudao.module.pay.dal.dataobject.wallet.PayWalletRechargePackageDO; | |
| 8 | - | |
| 9 | -import jakarta.validation.Valid; | |
| 10 | -import java.util.Collection; | |
| 11 | -import java.util.List; | |
| 12 | - | |
| 13 | -/** | |
| 14 | - * 钱包充值套餐 Service 接口 | |
| 15 | - * | |
| 16 | - * @author jason | |
| 17 | - */ | |
| 18 | -public interface PayWalletRechargePackageService { | |
| 19 | - | |
| 20 | - /** | |
| 21 | - * 获取钱包充值套餐 | |
| 22 | - * @param packageId 充值套餐编号 | |
| 23 | - */ | |
| 24 | - PayWalletRechargePackageDO getWalletRechargePackage(Long packageId); | |
| 25 | - | |
| 26 | - /** | |
| 27 | - * 校验钱包充值套餐的有效性, 无效的话抛出 ServiceException 异常 | |
| 28 | - * | |
| 29 | - * @param packageId 充值套餐编号 | |
| 30 | - */ | |
| 31 | - PayWalletRechargePackageDO validWalletRechargePackage(Long packageId); | |
| 32 | - | |
| 33 | - /** | |
| 34 | - * 创建充值套餐 | |
| 35 | - * | |
| 36 | - * @param createReqVO 创建信息 | |
| 37 | - * @return 编号 | |
| 38 | - */ | |
| 39 | - Long createWalletRechargePackage(@Valid WalletRechargePackageCreateReqVO createReqVO); | |
| 40 | - | |
| 41 | - /** | |
| 42 | - * 更新充值套餐 | |
| 43 | - * | |
| 44 | - * @param updateReqVO 更新信息 | |
| 45 | - */ | |
| 46 | - void updateWalletRechargePackage(@Valid WalletRechargePackageUpdateReqVO updateReqVO); | |
| 47 | - | |
| 48 | - /** | |
| 49 | - * 删除充值套餐 | |
| 50 | - * | |
| 51 | - * @param id 编号 | |
| 52 | - */ | |
| 53 | - void deleteWalletRechargePackage(Long id); | |
| 54 | - | |
| 55 | - /** | |
| 56 | - * 获得充值套餐分页 | |
| 57 | - * | |
| 58 | - * @param pageReqVO 分页查询 | |
| 59 | - * @return 充值套餐分页 | |
| 60 | - */ | |
| 61 | - PageResult<PayWalletRechargePackageDO> getWalletRechargePackagePage(WalletRechargePackagePageReqVO pageReqVO); | |
| 62 | - | |
| 63 | - /** | |
| 64 | - * 获得充值套餐列表 | |
| 65 | - * | |
| 66 | - * @param status 状态 | |
| 67 | - * @return 充值套餐列表 | |
| 68 | - */ | |
| 69 | - List<PayWalletRechargePackageDO> getWalletRechargePackageList(Integer status); | |
| 70 | - | |
| 71 | -} |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletRechargePackageServiceImpl.java deleted
| 1 | -package cn.iocoder.yudao.module.pay.service.wallet; | |
| 2 | - | |
| 3 | -import cn.hutool.core.util.StrUtil; | |
| 4 | -import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; | |
| 5 | -import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 6 | -import cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.rechargepackage.WalletRechargePackageCreateReqVO; | |
| 7 | -import cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.rechargepackage.WalletRechargePackagePageReqVO; | |
| 8 | -import cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.rechargepackage.WalletRechargePackageUpdateReqVO; | |
| 9 | -import cn.iocoder.yudao.module.pay.convert.wallet.PayWalletRechargePackageConvert; | |
| 10 | -import cn.iocoder.yudao.module.pay.dal.dataobject.wallet.PayWalletRechargePackageDO; | |
| 11 | -import cn.iocoder.yudao.module.pay.dal.mysql.wallet.PayWalletRechargePackageMapper; | |
| 12 | -import org.springframework.stereotype.Service; | |
| 13 | - | |
| 14 | -import jakarta.annotation.Resource; | |
| 15 | - | |
| 16 | -import java.util.List; | |
| 17 | - | |
| 18 | -import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; | |
| 19 | -import static cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants.*; | |
| 20 | - | |
| 21 | -/** | |
| 22 | - * 钱包充值套餐 Service 实现类 | |
| 23 | - * | |
| 24 | - * @author jason | |
| 25 | - */ | |
| 26 | -@Service | |
| 27 | -public class PayWalletRechargePackageServiceImpl implements PayWalletRechargePackageService { | |
| 28 | - | |
| 29 | - @Resource | |
| 30 | - private PayWalletRechargePackageMapper walletRechargePackageMapper; | |
| 31 | - | |
| 32 | - @Override | |
| 33 | - public PayWalletRechargePackageDO getWalletRechargePackage(Long packageId) { | |
| 34 | - return walletRechargePackageMapper.selectById(packageId); | |
| 35 | - } | |
| 36 | - | |
| 37 | - @Override | |
| 38 | - public PayWalletRechargePackageDO validWalletRechargePackage(Long packageId) { | |
| 39 | - PayWalletRechargePackageDO rechargePackageDO = walletRechargePackageMapper.selectById(packageId); | |
| 40 | - if (rechargePackageDO == null) { | |
| 41 | - throw exception(WALLET_RECHARGE_PACKAGE_NOT_FOUND); | |
| 42 | - } | |
| 43 | - if (CommonStatusEnum.DISABLE.getStatus().equals(rechargePackageDO.getStatus())) { | |
| 44 | - throw exception(WALLET_RECHARGE_PACKAGE_IS_DISABLE); | |
| 45 | - } | |
| 46 | - return rechargePackageDO; | |
| 47 | - } | |
| 48 | - | |
| 49 | - @Override | |
| 50 | - public Long createWalletRechargePackage(WalletRechargePackageCreateReqVO createReqVO) { | |
| 51 | - // 校验套餐名是否唯一 | |
| 52 | - validateRechargePackageNameUnique(null, createReqVO.getName()); | |
| 53 | - | |
| 54 | - // 插入 | |
| 55 | - PayWalletRechargePackageDO walletRechargePackage = PayWalletRechargePackageConvert.INSTANCE.convert(createReqVO); | |
| 56 | - walletRechargePackageMapper.insert(walletRechargePackage); | |
| 57 | - // 返回 | |
| 58 | - return walletRechargePackage.getId(); | |
| 59 | - } | |
| 60 | - | |
| 61 | - @Override | |
| 62 | - public void updateWalletRechargePackage(WalletRechargePackageUpdateReqVO updateReqVO) { | |
| 63 | - // 校验存在 | |
| 64 | - validateWalletRechargePackageExists(updateReqVO.getId()); | |
| 65 | - // 校验套餐名是否唯一 | |
| 66 | - validateRechargePackageNameUnique(updateReqVO.getId(), updateReqVO.getName()); | |
| 67 | - | |
| 68 | - // 更新 | |
| 69 | - PayWalletRechargePackageDO updateObj = PayWalletRechargePackageConvert.INSTANCE.convert(updateReqVO); | |
| 70 | - walletRechargePackageMapper.updateById(updateObj); | |
| 71 | - } | |
| 72 | - | |
| 73 | - private void validateRechargePackageNameUnique(Long id, String name) { | |
| 74 | - if (StrUtil.isBlank(name)) { | |
| 75 | - return; | |
| 76 | - } | |
| 77 | - PayWalletRechargePackageDO rechargePackage = walletRechargePackageMapper.selectByName(name); | |
| 78 | - if (rechargePackage == null) { | |
| 79 | - return ; | |
| 80 | - } | |
| 81 | - if (id == null) { | |
| 82 | - throw exception(WALLET_RECHARGE_PACKAGE_NAME_EXISTS); | |
| 83 | - } | |
| 84 | - if (!id.equals(rechargePackage.getId())) { | |
| 85 | - throw exception(WALLET_RECHARGE_PACKAGE_NAME_EXISTS); | |
| 86 | - } | |
| 87 | - } | |
| 88 | - | |
| 89 | - @Override | |
| 90 | - public void deleteWalletRechargePackage(Long id) { | |
| 91 | - // 校验存在 | |
| 92 | - validateWalletRechargePackageExists(id); | |
| 93 | - // 删除 | |
| 94 | - walletRechargePackageMapper.deleteById(id); | |
| 95 | - } | |
| 96 | - | |
| 97 | - private void validateWalletRechargePackageExists(Long id) { | |
| 98 | - if (walletRechargePackageMapper.selectById(id) == null) { | |
| 99 | - throw exception(WALLET_RECHARGE_PACKAGE_NOT_FOUND); | |
| 100 | - } | |
| 101 | - } | |
| 102 | - | |
| 103 | - @Override | |
| 104 | - public PageResult<PayWalletRechargePackageDO> getWalletRechargePackagePage(WalletRechargePackagePageReqVO pageReqVO) { | |
| 105 | - return walletRechargePackageMapper.selectPage(pageReqVO); | |
| 106 | - } | |
| 107 | - | |
| 108 | - @Override | |
| 109 | - public List<PayWalletRechargePackageDO> getWalletRechargePackageList(Integer status) { | |
| 110 | - return walletRechargePackageMapper.selectListByStatus(status); | |
| 111 | - } | |
| 112 | - | |
| 113 | -} |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletRechargeService.java deleted
| 1 | -package cn.iocoder.yudao.module.pay.service.wallet; | |
| 2 | - | |
| 3 | -import cn.iocoder.yudao.framework.common.pojo.PageParam; | |
| 4 | -import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 5 | -import cn.iocoder.yudao.module.pay.controller.app.wallet.vo.recharge.AppPayWalletRechargeCreateReqVO; | |
| 6 | -import cn.iocoder.yudao.module.pay.dal.dataobject.wallet.PayWalletRechargeDO; | |
| 7 | - | |
| 8 | -/** | |
| 9 | - * 钱包充值 Service 接口 | |
| 10 | - * | |
| 11 | - * @author jason | |
| 12 | - */ | |
| 13 | -public interface PayWalletRechargeService { | |
| 14 | - | |
| 15 | - /** | |
| 16 | - * 创建钱包充值记录(发起充值) | |
| 17 | - * | |
| 18 | - * @param userId 用户编号 | |
| 19 | - * @param userType 用户类型 | |
| 20 | - * @param createReqVO 钱包充值请求 VO | |
| 21 | - * @param userIp 用户Ip | |
| 22 | - * @return 钱包充值记录 | |
| 23 | - */ | |
| 24 | - PayWalletRechargeDO createWalletRecharge(Long userId, Integer userType, String userIp, | |
| 25 | - AppPayWalletRechargeCreateReqVO createReqVO); | |
| 26 | - | |
| 27 | - /** | |
| 28 | - * 获得钱包充值记录分页 | |
| 29 | - * | |
| 30 | - * @param userId 用户编号 | |
| 31 | - * @param userType 用户类型 | |
| 32 | - * @param pageReqVO 分页请求 | |
| 33 | - * @param payStatus 是否支付 | |
| 34 | - * @return 钱包充值记录分页 | |
| 35 | - */ | |
| 36 | - PageResult<PayWalletRechargeDO> getWalletRechargePackagePage(Long userId, Integer userType, | |
| 37 | - PageParam pageReqVO, Boolean payStatus); | |
| 38 | - | |
| 39 | - /** | |
| 40 | - * 更新钱包充值成功 | |
| 41 | - * | |
| 42 | - * @param id 钱包充值记录编号 | |
| 43 | - * @param payOrderId 支付订单编号 | |
| 44 | - */ | |
| 45 | - void updateWalletRechargerPaid(Long id, Long payOrderId); | |
| 46 | - | |
| 47 | - /** | |
| 48 | - * 发起钱包充值退款 | |
| 49 | - * | |
| 50 | - * @param id 钱包充值编号 | |
| 51 | - * @param userIp 用户 ip 地址 | |
| 52 | - */ | |
| 53 | - void refundWalletRecharge(Long id, String userIp); | |
| 54 | - | |
| 55 | - /** | |
| 56 | - * 更新钱包充值记录为已退款 | |
| 57 | - * | |
| 58 | - * @param id 钱包充值记录编号 | |
| 59 | - * @param refundId 钱包充值退款编号(实际和 id 相同) | |
| 60 | - * @param payRefundId 退款单id | |
| 61 | - */ | |
| 62 | - void updateWalletRechargeRefunded(Long id, Long refundId, Long payRefundId); | |
| 63 | - | |
| 64 | -} |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletService.java deleted
| 1 | -package cn.iocoder.yudao.module.pay.service.wallet; | |
| 2 | - | |
| 3 | -import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 4 | -import cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.wallet.PayWalletPageReqVO; | |
| 5 | -import cn.iocoder.yudao.module.pay.dal.dataobject.wallet.PayWalletDO; | |
| 6 | -import cn.iocoder.yudao.module.pay.dal.dataobject.wallet.PayWalletTransactionDO; | |
| 7 | -import cn.iocoder.yudao.module.pay.enums.wallet.PayWalletBizTypeEnum; | |
| 8 | - | |
| 9 | -/** | |
| 10 | - * 钱包 Service 接口 | |
| 11 | - * | |
| 12 | - * @author jason | |
| 13 | - */ | |
| 14 | -public interface PayWalletService { | |
| 15 | - | |
| 16 | - /** | |
| 17 | - * 获取钱包信息 | |
| 18 | - * <p> | |
| 19 | - * 如果不存在,则创建钱包。由于用户注册时候不会创建钱包 | |
| 20 | - * | |
| 21 | - * @param userId 用户编号 | |
| 22 | - * @param userType 用户类型 | |
| 23 | - */ | |
| 24 | - PayWalletDO getOrCreateWallet(Long userId, Integer userType); | |
| 25 | - | |
| 26 | - /** | |
| 27 | - * 获取钱包信息 | |
| 28 | - * | |
| 29 | - * @param walletId 钱包 id | |
| 30 | - */ | |
| 31 | - PayWalletDO getWallet(Long walletId); | |
| 32 | - | |
| 33 | - /** | |
| 34 | - * 获得会员钱包分页 | |
| 35 | - * | |
| 36 | - * @param pageReqVO 分页查询 | |
| 37 | - * @return 会员钱包分页 | |
| 38 | - */ | |
| 39 | - PageResult<PayWalletDO> getWalletPage(PayWalletPageReqVO pageReqVO); | |
| 40 | - | |
| 41 | - /** | |
| 42 | - * 钱包订单支付 | |
| 43 | - * | |
| 44 | - * @param walletId 钱包编号 | |
| 45 | - * @param outTradeNo 外部订单号 | |
| 46 | - * @param price 金额 | |
| 47 | - */ | |
| 48 | - PayWalletTransactionDO orderPay(Long walletId, String outTradeNo, Integer price); | |
| 49 | - | |
| 50 | - /** | |
| 51 | - * 钱包订单支付退款 | |
| 52 | - * | |
| 53 | - * @param outRefundNo 外部退款号 | |
| 54 | - * @param refundPrice 退款金额 | |
| 55 | - * @param reason 退款原因 | |
| 56 | - */ | |
| 57 | - PayWalletTransactionDO orderRefund(String outRefundNo, Integer refundPrice, String reason); | |
| 58 | - | |
| 59 | - /** | |
| 60 | - * 扣减钱包余额 | |
| 61 | - * | |
| 62 | - * @param walletId 钱包编号 | |
| 63 | - * @param bizId 业务关联编号 | |
| 64 | - * @param bizType 业务关联分类 | |
| 65 | - * @param price 扣减金额 | |
| 66 | - * @return 钱包流水 | |
| 67 | - */ | |
| 68 | - PayWalletTransactionDO reduceWalletBalance(Long walletId, Long bizId, | |
| 69 | - PayWalletBizTypeEnum bizType, Integer price); | |
| 70 | - | |
| 71 | - /** | |
| 72 | - * 增加钱包余额 | |
| 73 | - * | |
| 74 | - * @param walletId 钱包编号 | |
| 75 | - * @param bizId 业务关联编号 | |
| 76 | - * @param bizType 业务关联分类 | |
| 77 | - * @param price 增加金额 | |
| 78 | - * @return 钱包流水 | |
| 79 | - */ | |
| 80 | - PayWalletTransactionDO addWalletBalance(Long walletId, String bizId, | |
| 81 | - PayWalletBizTypeEnum bizType, Integer price); | |
| 82 | - | |
| 83 | - /** | |
| 84 | - * 冻结钱包部分余额 | |
| 85 | - * | |
| 86 | - * @param id 钱包编号 | |
| 87 | - * @param price 冻结金额 | |
| 88 | - */ | |
| 89 | - void freezePrice(Long id, Integer price); | |
| 90 | - | |
| 91 | - /** | |
| 92 | - * 解冻钱包余额 | |
| 93 | - * | |
| 94 | - * @param id 钱包编号 | |
| 95 | - * @param price 解冻金额 | |
| 96 | - */ | |
| 97 | - void unfreezePrice(Long id, Integer price); | |
| 98 | - | |
| 99 | -} |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletTransactionService.java deleted
| 1 | -package cn.iocoder.yudao.module.pay.service.wallet; | |
| 2 | - | |
| 3 | -import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 4 | -import cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.transaction.PayWalletTransactionPageReqVO; | |
| 5 | -import cn.iocoder.yudao.module.pay.controller.app.wallet.vo.transaction.AppPayWalletTransactionPageReqVO; | |
| 6 | -import cn.iocoder.yudao.module.pay.controller.app.wallet.vo.transaction.AppPayWalletTransactionSummaryRespVO; | |
| 7 | -import cn.iocoder.yudao.module.pay.dal.dataobject.wallet.PayWalletTransactionDO; | |
| 8 | -import cn.iocoder.yudao.module.pay.enums.wallet.PayWalletBizTypeEnum; | |
| 9 | -import cn.iocoder.yudao.module.pay.service.wallet.bo.WalletTransactionCreateReqBO; | |
| 10 | - | |
| 11 | -import jakarta.validation.Valid; | |
| 12 | - | |
| 13 | -import java.time.LocalDateTime; | |
| 14 | - | |
| 15 | -/** | |
| 16 | - * 钱包余额流水 Service 接口 | |
| 17 | - * | |
| 18 | - * @author jason | |
| 19 | - */ | |
| 20 | -public interface PayWalletTransactionService { | |
| 21 | - | |
| 22 | - /** | |
| 23 | - * 查询钱包余额流水分页 | |
| 24 | - * | |
| 25 | - * @param userId 用户编号 | |
| 26 | - * @param userType 用户类型 | |
| 27 | - * @param pageVO 分页查询参数 | |
| 28 | - */ | |
| 29 | - PageResult<PayWalletTransactionDO> getWalletTransactionPage(Long userId, Integer userType, | |
| 30 | - AppPayWalletTransactionPageReqVO pageVO); | |
| 31 | - | |
| 32 | - /** | |
| 33 | - * 查询钱包余额流水分页 | |
| 34 | - * | |
| 35 | - * @param pageVO 分页查询参数 | |
| 36 | - */ | |
| 37 | - PageResult<PayWalletTransactionDO> getWalletTransactionPage(PayWalletTransactionPageReqVO pageVO); | |
| 38 | - | |
| 39 | - /** | |
| 40 | - * 新增钱包余额流水 | |
| 41 | - * | |
| 42 | - * @param bo 创建钱包流水 bo | |
| 43 | - * @return 新建的钱包 do | |
| 44 | - */ | |
| 45 | - PayWalletTransactionDO createWalletTransaction(@Valid WalletTransactionCreateReqBO bo); | |
| 46 | - | |
| 47 | - /** | |
| 48 | - * 根据 no,获取钱包余流水 | |
| 49 | - * | |
| 50 | - * @param no 流水号 | |
| 51 | - */ | |
| 52 | - PayWalletTransactionDO getWalletTransactionByNo(String no); | |
| 53 | - | |
| 54 | - /** | |
| 55 | - * 获取钱包流水 | |
| 56 | - * | |
| 57 | - * @param bizId 业务编号 | |
| 58 | - * @param type 业务类型 | |
| 59 | - * @return 钱包流水 | |
| 60 | - */ | |
| 61 | - PayWalletTransactionDO getWalletTransaction(String bizId, PayWalletBizTypeEnum type); | |
| 62 | - | |
| 63 | - /** | |
| 64 | - * 获得钱包流水统计 | |
| 65 | - * | |
| 66 | - * @param userId 用户编号 | |
| 67 | - * @param userType 用户类型 | |
| 68 | - * @param createTime 时间段 | |
| 69 | - * @return 钱包流水统计 | |
| 70 | - */ | |
| 71 | - AppPayWalletTransactionSummaryRespVO getWalletTransactionSummary(Long userId, Integer userType, | |
| 72 | - LocalDateTime[] createTime); | |
| 73 | - | |
| 74 | -} |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletTransactionServiceImpl.java deleted
| 1 | -package cn.iocoder.yudao.module.pay.service.wallet; | |
| 2 | - | |
| 3 | -import cn.hutool.core.util.ObjectUtil; | |
| 4 | -import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 5 | -import cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.transaction.PayWalletTransactionPageReqVO; | |
| 6 | -import cn.iocoder.yudao.module.pay.controller.app.wallet.vo.transaction.AppPayWalletTransactionPageReqVO; | |
| 7 | -import cn.iocoder.yudao.module.pay.controller.app.wallet.vo.transaction.AppPayWalletTransactionSummaryRespVO; | |
| 8 | -import cn.iocoder.yudao.module.pay.convert.wallet.PayWalletTransactionConvert; | |
| 9 | -import cn.iocoder.yudao.module.pay.dal.dataobject.wallet.PayWalletDO; | |
| 10 | -import cn.iocoder.yudao.module.pay.dal.dataobject.wallet.PayWalletTransactionDO; | |
| 11 | -import cn.iocoder.yudao.module.pay.dal.mysql.wallet.PayWalletTransactionMapper; | |
| 12 | -import cn.iocoder.yudao.module.pay.dal.redis.no.PayNoRedisDAO; | |
| 13 | -import cn.iocoder.yudao.module.pay.enums.wallet.PayWalletBizTypeEnum; | |
| 14 | -import cn.iocoder.yudao.module.pay.service.wallet.bo.WalletTransactionCreateReqBO; | |
| 15 | -import jakarta.annotation.Resource; | |
| 16 | -import lombok.extern.slf4j.Slf4j; | |
| 17 | -import org.springframework.stereotype.Service; | |
| 18 | -import org.springframework.validation.annotation.Validated; | |
| 19 | - | |
| 20 | -import java.time.LocalDateTime; | |
| 21 | - | |
| 22 | -import static cn.iocoder.yudao.module.pay.controller.app.wallet.vo.transaction.AppPayWalletTransactionPageReqVO.TYPE_EXPENSE; | |
| 23 | -import static cn.iocoder.yudao.module.pay.controller.app.wallet.vo.transaction.AppPayWalletTransactionPageReqVO.TYPE_INCOME; | |
| 24 | - | |
| 25 | -/** | |
| 26 | - * 钱包流水 Service 实现类 | |
| 27 | - * | |
| 28 | - * @author jason | |
| 29 | - */ | |
| 30 | -@Service | |
| 31 | -@Slf4j | |
| 32 | -@Validated | |
| 33 | -public class PayWalletTransactionServiceImpl implements PayWalletTransactionService { | |
| 34 | - | |
| 35 | - /** | |
| 36 | - * 钱包流水的 no 前缀 | |
| 37 | - */ | |
| 38 | - private static final String WALLET_NO_PREFIX = "W"; | |
| 39 | - | |
| 40 | - @Resource | |
| 41 | - private PayWalletService payWalletService; | |
| 42 | - @Resource | |
| 43 | - private PayWalletTransactionMapper payWalletTransactionMapper; | |
| 44 | - @Resource | |
| 45 | - private PayNoRedisDAO noRedisDAO; | |
| 46 | - | |
| 47 | - @Override | |
| 48 | - public PageResult<PayWalletTransactionDO> getWalletTransactionPage(Long userId, Integer userType, | |
| 49 | - AppPayWalletTransactionPageReqVO pageVO) { | |
| 50 | - PayWalletDO wallet = payWalletService.getOrCreateWallet(userId, userType); | |
| 51 | - return payWalletTransactionMapper.selectPage(wallet.getId(), pageVO.getType(), pageVO, pageVO.getCreateTime()); | |
| 52 | - } | |
| 53 | - | |
| 54 | - @Override | |
| 55 | - public PageResult<PayWalletTransactionDO> getWalletTransactionPage(PayWalletTransactionPageReqVO pageVO) { | |
| 56 | - // 基于 userId + userType 查询钱包 | |
| 57 | - if (pageVO.getWalletId() == null | |
| 58 | - && ObjectUtil.isAllNotEmpty(pageVO.getUserId(), pageVO.getUserType())) { | |
| 59 | - PayWalletDO wallet = payWalletService.getOrCreateWallet(pageVO.getUserId(), pageVO.getUserType()); | |
| 60 | - if (wallet != null) { | |
| 61 | - pageVO.setWalletId(wallet.getId()); | |
| 62 | - } | |
| 63 | - } | |
| 64 | - | |
| 65 | - // 查询分页 | |
| 66 | - return payWalletTransactionMapper.selectPage(pageVO.getWalletId(), null, pageVO, null); | |
| 67 | - } | |
| 68 | - | |
| 69 | - @Override | |
| 70 | - public PayWalletTransactionDO createWalletTransaction(WalletTransactionCreateReqBO bo) { | |
| 71 | - PayWalletTransactionDO transaction = PayWalletTransactionConvert.INSTANCE.convert(bo) | |
| 72 | - .setNo(noRedisDAO.generate(WALLET_NO_PREFIX)); | |
| 73 | - payWalletTransactionMapper.insert(transaction); | |
| 74 | - return transaction; | |
| 75 | - } | |
| 76 | - | |
| 77 | - @Override | |
| 78 | - public PayWalletTransactionDO getWalletTransactionByNo(String no) { | |
| 79 | - return payWalletTransactionMapper.selectByNo(no); | |
| 80 | - } | |
| 81 | - | |
| 82 | - @Override | |
| 83 | - public PayWalletTransactionDO getWalletTransaction(String bizId, PayWalletBizTypeEnum type) { | |
| 84 | - return payWalletTransactionMapper.selectByBiz(bizId, type.getType()); | |
| 85 | - } | |
| 86 | - | |
| 87 | - @Override | |
| 88 | - public AppPayWalletTransactionSummaryRespVO getWalletTransactionSummary(Long userId, Integer userType, LocalDateTime[] createTime) { | |
| 89 | - PayWalletDO wallet = payWalletService.getOrCreateWallet(userId, userType); | |
| 90 | - return new AppPayWalletTransactionSummaryRespVO() | |
| 91 | - .setTotalExpense(payWalletTransactionMapper.selectPriceSum(wallet.getId(), TYPE_EXPENSE, createTime)) | |
| 92 | - .setTotalIncome(payWalletTransactionMapper.selectPriceSum(wallet.getId(), TYPE_INCOME, createTime)); | |
| 93 | - } | |
| 94 | - | |
| 95 | -} |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/bo/WalletTransactionCreateReqBO.java deleted
| 1 | -package cn.iocoder.yudao.module.pay.service.wallet.bo; | |
| 2 | - | |
| 3 | -import cn.iocoder.yudao.framework.common.validation.InEnum; | |
| 4 | -import cn.iocoder.yudao.module.pay.enums.wallet.PayWalletBizTypeEnum; | |
| 5 | -import lombok.Data; | |
| 6 | - | |
| 7 | -import jakarta.validation.constraints.NotEmpty; | |
| 8 | -import jakarta.validation.constraints.NotNull; | |
| 9 | - | |
| 10 | -/** | |
| 11 | - * 创建钱包流水 BO | |
| 12 | - * | |
| 13 | - * @author jason | |
| 14 | - */ | |
| 15 | -@Data | |
| 16 | -public class WalletTransactionCreateReqBO { | |
| 17 | - | |
| 18 | - /** | |
| 19 | - * 钱包编号 | |
| 20 | - * | |
| 21 | - */ | |
| 22 | - @NotNull(message = "钱包编号不能为空") | |
| 23 | - private Long walletId; | |
| 24 | - | |
| 25 | - /** | |
| 26 | - * 交易金额,单位分 | |
| 27 | - * | |
| 28 | - * 正值表示余额增加,负值表示余额减少 | |
| 29 | - */ | |
| 30 | - @NotNull(message = "交易金额不能为空") | |
| 31 | - private Integer price; | |
| 32 | - | |
| 33 | - /** | |
| 34 | - * 交易后余额,单位分 | |
| 35 | - */ | |
| 36 | - @NotNull(message = "交易后余额不能为空") | |
| 37 | - private Integer balance; | |
| 38 | - | |
| 39 | - /** | |
| 40 | - * 关联业务分类 | |
| 41 | - * | |
| 42 | - * 枚举 {@link PayWalletBizTypeEnum#getType()} | |
| 43 | - */ | |
| 44 | - @NotNull(message = "关联业务分类不能为空") | |
| 45 | - @InEnum(PayWalletBizTypeEnum.class) | |
| 46 | - private Integer bizType; | |
| 47 | - | |
| 48 | - /** | |
| 49 | - * 关联业务编号 | |
| 50 | - */ | |
| 51 | - @NotEmpty(message = "关联业务编号不能为空") | |
| 52 | - private String bizId; | |
| 53 | - | |
| 54 | - /** | |
| 55 | - * 流水说明 | |
| 56 | - */ | |
| 57 | - @NotEmpty(message = "流水说明不能为空") | |
| 58 | - private String title; | |
| 59 | -} |
yudao-module-pay/yudao-module-pay-biz/src/test/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/alipay/AlipayWapPayClientTest.java deleted
| 1 | -package cn.iocoder.yudao.module.pay.framework.pay.core.client.impl.alipay; | |
| 2 | - | |
| 3 | -import cn.hutool.http.Method; | |
| 4 | -import cn.iocoder.yudao.module.pay.framework.pay.core.client.dto.order.PayOrderRespDTO; | |
| 5 | -import cn.iocoder.yudao.module.pay.framework.pay.core.client.dto.order.PayOrderUnifiedReqDTO; | |
| 6 | -import cn.iocoder.yudao.module.pay.framework.pay.core.enums.PayOrderDisplayModeEnum; | |
| 7 | -import com.alipay.api.AlipayApiException; | |
| 8 | -import com.alipay.api.domain.AlipayTradeWapPayModel; | |
| 9 | -import com.alipay.api.request.AlipayTradeWapPayRequest; | |
| 10 | -import com.alipay.api.response.AlipayTradeWapPayResponse; | |
| 11 | -import org.junit.jupiter.api.BeforeEach; | |
| 12 | -import org.junit.jupiter.api.DisplayName; | |
| 13 | -import org.junit.jupiter.api.Test; | |
| 14 | -import org.mockito.ArgumentMatcher; | |
| 15 | -import org.mockito.InjectMocks; | |
| 16 | - | |
| 17 | -import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.*; | |
| 18 | -import static cn.iocoder.yudao.module.pay.enums.order.PayOrderStatusEnum.CLOSED; | |
| 19 | -import static cn.iocoder.yudao.module.pay.enums.order.PayOrderStatusEnum.WAITING; | |
| 20 | -import static org.junit.jupiter.api.Assertions.*; | |
| 21 | -import static org.junit.jupiter.api.Assertions.assertEquals; | |
| 22 | -import static org.mockito.ArgumentMatchers.argThat; | |
| 23 | -import static org.mockito.ArgumentMatchers.eq; | |
| 24 | -import static org.mockito.Mockito.when; | |
| 25 | - | |
| 26 | -/** | |
| 27 | - * {@link AlipayWapPayClient} 单元测试 | |
| 28 | - * | |
| 29 | - * @author jason | |
| 30 | - */ | |
| 31 | -public class AlipayWapPayClientTest extends AbstractAlipayClientTest { | |
| 32 | - | |
| 33 | - /** | |
| 34 | - * 支付宝 H5 支付 Client | |
| 35 | - */ | |
| 36 | - @InjectMocks | |
| 37 | - private AlipayWapPayClient client = new AlipayWapPayClient(randomLongId(), config); | |
| 38 | - | |
| 39 | - @BeforeEach | |
| 40 | - public void setUp() { | |
| 41 | - setClient(client); | |
| 42 | - } | |
| 43 | - | |
| 44 | - @Test | |
| 45 | - @DisplayName("支付宝 H5 支付:下单成功") | |
| 46 | - public void testUnifiedOrder_success() throws AlipayApiException { | |
| 47 | - // mock 方法 | |
| 48 | - String h5Body = randomString(); | |
| 49 | - Integer price = randomInteger(); | |
| 50 | - AlipayTradeWapPayResponse response = randomPojo(AlipayTradeWapPayResponse.class, o -> { | |
| 51 | - o.setSubCode(""); | |
| 52 | - o.setBody(h5Body); | |
| 53 | - }); | |
| 54 | - String notifyUrl = randomURL(); | |
| 55 | - when(defaultAlipayClient.pageExecute(argThat((ArgumentMatcher<AlipayTradeWapPayRequest>) request -> { | |
| 56 | - assertInstanceOf(AlipayTradeWapPayModel.class, request.getBizModel()); | |
| 57 | - AlipayTradeWapPayModel bizModel = (AlipayTradeWapPayModel) request.getBizModel(); | |
| 58 | - assertEquals(String.valueOf(price / 100.0), bizModel.getTotalAmount()); | |
| 59 | - assertEquals(notifyUrl, request.getNotifyUrl()); | |
| 60 | - return true; | |
| 61 | - }), eq(Method.GET.name()))).thenReturn(response); | |
| 62 | - // 准备请求参数 | |
| 63 | - String outTradeNo = randomString(); | |
| 64 | - PayOrderUnifiedReqDTO reqDTO = buildOrderUnifiedReqDTO(notifyUrl, outTradeNo, price); | |
| 65 | - | |
| 66 | - // 调用 | |
| 67 | - PayOrderRespDTO resp = client.unifiedOrder(reqDTO); | |
| 68 | - // 断言 | |
| 69 | - assertEquals(WAITING.getStatus(), resp.getStatus()); | |
| 70 | - assertEquals(outTradeNo, resp.getOutTradeNo()); | |
| 71 | - assertNull(resp.getChannelOrderNo()); | |
| 72 | - assertNull(resp.getChannelUserId()); | |
| 73 | - assertNull(resp.getSuccessTime()); | |
| 74 | - assertEquals(PayOrderDisplayModeEnum.URL.getMode(), resp.getDisplayMode()); | |
| 75 | - assertEquals(response.getBody(), resp.getDisplayContent()); | |
| 76 | - assertSame(response, resp.getRawData()); | |
| 77 | - assertNull(resp.getChannelErrorCode()); | |
| 78 | - assertNull(resp.getChannelErrorMsg()); | |
| 79 | - } | |
| 80 | - | |
| 81 | - @Test | |
| 82 | - @DisplayName("支付宝 H5 支付:渠道返回失败") | |
| 83 | - public void test_unified_order_channel_failed() throws AlipayApiException { | |
| 84 | - // mock 方法 | |
| 85 | - String subCode = randomString(); | |
| 86 | - String subMsg = randomString(); | |
| 87 | - AlipayTradeWapPayResponse response = randomPojo(AlipayTradeWapPayResponse.class, o -> { | |
| 88 | - o.setSubCode(subCode); | |
| 89 | - o.setSubMsg(subMsg); | |
| 90 | - }); | |
| 91 | - when(defaultAlipayClient.pageExecute(argThat((ArgumentMatcher<AlipayTradeWapPayRequest>) request -> true), | |
| 92 | - eq(Method.GET.name()))).thenReturn(response); | |
| 93 | - String outTradeNo = randomString(); | |
| 94 | - PayOrderUnifiedReqDTO reqDTO = buildOrderUnifiedReqDTO(randomURL(), outTradeNo, randomInteger()); | |
| 95 | - | |
| 96 | - // 调用 | |
| 97 | - PayOrderRespDTO resp = client.unifiedOrder(reqDTO); | |
| 98 | - // 断言 | |
| 99 | - assertEquals(CLOSED.getStatus(), resp.getStatus()); | |
| 100 | - assertEquals(outTradeNo, resp.getOutTradeNo()); | |
| 101 | - assertNull(resp.getChannelOrderNo()); | |
| 102 | - assertNull(resp.getChannelUserId()); | |
| 103 | - assertNull(resp.getSuccessTime()); | |
| 104 | - assertNull(resp.getDisplayMode()); | |
| 105 | - assertNull(resp.getDisplayContent()); | |
| 106 | - assertSame(response, resp.getRawData()); | |
| 107 | - assertEquals(subCode, resp.getChannelErrorCode()); | |
| 108 | - assertEquals(subMsg, resp.getChannelErrorMsg()); | |
| 109 | - } | |
| 110 | - | |
| 111 | -} |
yudao-module-pay/yudao-module-pay-biz/src/test/java/cn/iocoder/yudao/module/pay/framework/pay/core/client/impl/weixin/WxNativePayClientIntegrationTest.java deleted
| 1 | -package cn.iocoder.yudao.module.pay.framework.pay.core.client.impl.weixin; | |
| 2 | - | |
| 3 | -import cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils; | |
| 4 | -import cn.iocoder.yudao.framework.common.util.json.JsonUtils; | |
| 5 | -import com.github.binarywang.wxpay.bean.request.WxPayRefundV3Request; | |
| 6 | -import com.github.binarywang.wxpay.bean.request.WxPayUnifiedOrderV3Request; | |
| 7 | -import com.github.binarywang.wxpay.bean.result.WxPayRefundV3Result; | |
| 8 | -import com.github.binarywang.wxpay.bean.result.enums.TradeTypeEnum; | |
| 9 | -import com.github.binarywang.wxpay.config.WxPayConfig; | |
| 10 | -import com.github.binarywang.wxpay.exception.WxPayException; | |
| 11 | -import com.github.binarywang.wxpay.service.WxPayService; | |
| 12 | -import com.github.binarywang.wxpay.service.impl.WxPayServiceImpl; | |
| 13 | -import org.junit.jupiter.api.Disabled; | |
| 14 | -import org.junit.jupiter.api.Test; | |
| 15 | - | |
| 16 | -import java.time.Duration; | |
| 17 | - | |
| 18 | -import static cn.iocoder.yudao.module.pay.framework.pay.core.client.impl.weixin.AbstractWxPayClient.formatDateV3; | |
| 19 | - | |
| 20 | - | |
| 21 | -/** | |
| 22 | - * {@link WxNativePayClient} 的集成测试,用于快速调试微信扫码支付 | |
| 23 | - * | |
| 24 | - * @author 芋道源码 | |
| 25 | - */ | |
| 26 | -@Disabled | |
| 27 | -public class WxNativePayClientIntegrationTest { | |
| 28 | - | |
| 29 | - @Test | |
| 30 | - public void testPayV3() throws WxPayException { | |
| 31 | - // 创建 config 配置 | |
| 32 | - WxPayConfig config = buildWxPayConfigV3(); | |
| 33 | - // 创建 WxPayService 客户端 | |
| 34 | - WxPayService client = new WxPayServiceImpl(); | |
| 35 | - client.setConfig(config); | |
| 36 | - | |
| 37 | - // 执行发起支付 | |
| 38 | - WxPayUnifiedOrderV3Request request = new WxPayUnifiedOrderV3Request() | |
| 39 | - .setOutTradeNo(String.valueOf(System.currentTimeMillis())) | |
| 40 | - .setDescription("测试支付-body") | |
| 41 | - .setAmount(new WxPayUnifiedOrderV3Request.Amount().setTotal(1)) // 单位分 | |
| 42 | - .setTimeExpire(formatDateV3(LocalDateTimeUtils.addTime(Duration.ofMinutes(2)))) | |
| 43 | - .setSceneInfo(new WxPayUnifiedOrderV3Request.SceneInfo().setPayerClientIp("127.0.0.1")) | |
| 44 | - .setNotifyUrl("http://127.0.0.1:48080"); | |
| 45 | - System.out.println("========= request =========="); | |
| 46 | - System.out.println(JsonUtils.toJsonPrettyString(request)); | |
| 47 | - String response = client.createOrderV3(TradeTypeEnum.NATIVE, request); | |
| 48 | - System.out.println("========= response =========="); | |
| 49 | - System.out.println(JsonUtils.toJsonPrettyString(response)); | |
| 50 | - } | |
| 51 | - | |
| 52 | - @Test | |
| 53 | - public void testRefundV3() throws WxPayException { | |
| 54 | - // 创建 config 配置 | |
| 55 | - WxPayConfig config = buildWxPayConfigV3(); | |
| 56 | - // 创建 WxPayService 客户端 | |
| 57 | - WxPayService client = new WxPayServiceImpl(); | |
| 58 | - client.setConfig(config); | |
| 59 | - | |
| 60 | - // 执行发起退款 | |
| 61 | - WxPayRefundV3Request request = new WxPayRefundV3Request() | |
| 62 | - .setOutTradeNo("1689545729695") | |
| 63 | - .setOutRefundNo(String.valueOf(System.currentTimeMillis())) | |
| 64 | - .setAmount(new WxPayRefundV3Request.Amount().setTotal(1).setRefund(1).setCurrency("CNY")) | |
| 65 | - .setReason("就是想退了"); | |
| 66 | - System.out.println("========= request =========="); | |
| 67 | - System.out.println(JsonUtils.toJsonPrettyString(request)); | |
| 68 | - WxPayRefundV3Result response = client.refundV3(request); | |
| 69 | - System.out.println("========= response =========="); | |
| 70 | - System.out.println(JsonUtils.toJsonPrettyString(response)); | |
| 71 | - } | |
| 72 | - | |
| 73 | - private WxPayConfig buildWxPayConfigV3() { | |
| 74 | - WxPayConfig config = new WxPayConfig(); | |
| 75 | - config.setAppId("wx62056c0d5e8db250"); | |
| 76 | - config.setMchId("1545083881"); | |
| 77 | - config.setApiV3Key("459arNsYHl1mgkiO6H9ZH5KkhFXSxaA4"); | |
| 78 | -// config.setCertSerialNo(serialNo); | |
| 79 | - config.setPrivateCertPath("/Users/yunai/Downloads/wx_pay/apiclient_cert.pem"); | |
| 80 | - config.setPrivateKeyPath("/Users/yunai/Downloads/wx_pay/apiclient_key.pem"); | |
| 81 | - return config; | |
| 82 | - } | |
| 83 | - | |
| 84 | -} |
yudao-module-pay/yudao-module-pay-biz/src/test/resources/application-unit-test.yaml deleted
| 1 | -spring: | |
| 2 | - main: | |
| 3 | - lazy-initialization: true # 开启懒加载,加快速度 | |
| 4 | - banner-mode: off # 单元测试,禁用 Banner | |
| 5 | - | |
| 6 | ---- #################### 数据库相关配置 #################### | |
| 7 | - | |
| 8 | -spring: | |
| 9 | - # 数据源配置项 | |
| 10 | - datasource: | |
| 11 | - name: ruoyi-vue-pro | |
| 12 | - url: jdbc:h2:mem:testdb;MODE=MYSQL;DATABASE_TO_UPPER=false;NON_KEYWORDS=value; # MODE 使用 MySQL 模式;DATABASE_TO_UPPER 配置表和字段使用小写 | |
| 13 | - driver-class-name: org.h2.Driver | |
| 14 | - username: sa | |
| 15 | - password: | |
| 16 | - druid: | |
| 17 | - async-init: true # 单元测试,异步初始化 Druid 连接池,提升启动速度 | |
| 18 | - initial-size: 1 # 单元测试,配置为 1,提升启动速度 | |
| 19 | - sql: | |
| 20 | - init: | |
| 21 | - schema-locations: classpath:/sql/create_tables.sql | |
| 22 | - | |
| 23 | - # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 | |
| 24 | - data: | |
| 25 | - redis: | |
| 26 | - host: 127.0.0.1 # 地址 | |
| 27 | - port: 16379 # 端口(单元测试,使用 16379 端口) | |
| 28 | - database: 0 # 数据库索引 | |
| 29 | - | |
| 30 | -mybatis: | |
| 31 | - lazy-initialization: true # 单元测试,设置 MyBatis Mapper 延迟加载,加速每个单元测试 | |
| 32 | - | |
| 33 | ---- #################### 定时任务相关配置 #################### | |
| 34 | - | |
| 35 | ---- #################### 配置中心相关配置 #################### | |
| 36 | - | |
| 37 | ---- #################### 服务保障相关配置 #################### | |
| 38 | - | |
| 39 | -# Lock4j 配置项(单元测试,禁用 Lock4j) | |
| 40 | - | |
| 41 | ---- #################### 监控相关配置 #################### | |
| 42 | - | |
| 43 | ---- #################### 芋道相关配置 #################### | |
| 44 | - | |
| 45 | -# 芋道配置项,设置当前项目所有自定义的配置 | |
| 46 | -yudao: | |
| 47 | - info: | |
| 48 | - base-package: cn.iocoder.yudao.module |
yudao-module-system/src/main/java/cn/iocoder/yudao/module/system/controller/admin/socail/SocialUserController.java
| ... | ... | @@ -4,11 +4,11 @@ import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; |
| 4 | 4 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 5 | 5 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 6 | 6 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| 7 | +import cn.iocoder.yudao.module.system.api.social.dto.SocialUserBindReqDTO; | |
| 7 | 8 | import cn.iocoder.yudao.module.system.controller.admin.socail.vo.user.SocialUserBindReqVO; |
| 8 | 9 | import cn.iocoder.yudao.module.system.controller.admin.socail.vo.user.SocialUserPageReqVO; |
| 9 | 10 | import cn.iocoder.yudao.module.system.controller.admin.socail.vo.user.SocialUserRespVO; |
| 10 | 11 | import cn.iocoder.yudao.module.system.controller.admin.socail.vo.user.SocialUserUnbindReqVO; |
| 11 | -import cn.iocoder.yudao.module.system.convert.social.SocialUserConvert; | |
| 12 | 12 | import cn.iocoder.yudao.module.system.dal.dataobject.social.SocialUserDO; |
| 13 | 13 | import cn.iocoder.yudao.module.system.service.social.SocialUserService; |
| 14 | 14 | import io.swagger.v3.oas.annotations.Operation; |
| ... | ... | @@ -38,8 +38,8 @@ public class SocialUserController { |
| 38 | 38 | @PostMapping("/bind") |
| 39 | 39 | @Operation(summary = "社交绑定,使用 code 授权码") |
| 40 | 40 | public CommonResult<Boolean> socialBind(@RequestBody @Valid SocialUserBindReqVO reqVO) { |
| 41 | - socialUserService.bindSocialUser(SocialUserConvert.INSTANCE.convert( | |
| 42 | - getLoginUserId(), UserTypeEnum.ADMIN.getValue(), reqVO)); | |
| 41 | + socialUserService.bindSocialUser(BeanUtils.toBean(reqVO, SocialUserBindReqDTO.class) | |
| 42 | + .setUserId(getLoginUserId()).setUserType(UserTypeEnum.ADMIN.getValue())); | |
| 43 | 43 | return CommonResult.success(true); |
| 44 | 44 | } |
| 45 | 45 | ... | ... |
yudao-module-system/src/main/java/cn/iocoder/yudao/module/system/convert/social/SocialUserConvert.java deleted
| 1 | -package cn.iocoder.yudao.module.system.convert.social; | |
| 2 | - | |
| 3 | -import cn.iocoder.yudao.module.system.api.social.dto.SocialUserBindReqDTO; | |
| 4 | -import cn.iocoder.yudao.module.system.controller.admin.socail.vo.user.SocialUserBindReqVO; | |
| 5 | -import org.mapstruct.Mapper; | |
| 6 | -import org.mapstruct.Mapping; | |
| 7 | -import org.mapstruct.factory.Mappers; | |
| 8 | - | |
| 9 | -@Mapper | |
| 10 | -public interface SocialUserConvert { | |
| 11 | - | |
| 12 | - SocialUserConvert INSTANCE = Mappers.getMapper(SocialUserConvert.class); | |
| 13 | - | |
| 14 | - @Mapping(source = "reqVO.type", target = "socialType") | |
| 15 | - SocialUserBindReqDTO convert(Long userId, Integer userType, SocialUserBindReqVO reqVO); | |
| 16 | - | |
| 17 | -} |
yudao-server/pom.xml
| ... | ... | @@ -54,7 +54,7 @@ |
| 54 | 54 | <!-- 支付服务。默认注释,保证编译速度 --> |
| 55 | 55 | <!-- <dependency>--> |
| 56 | 56 | <!-- <groupId>cn.iocoder.boot</groupId>--> |
| 57 | -<!-- <artifactId>yudao-module-pay-biz</artifactId>--> | |
| 57 | +<!-- <artifactId>yudao-module-pay</artifactId>--> | |
| 58 | 58 | <!-- <version>${revision}</version>--> |
| 59 | 59 | <!-- </dependency>--> |
| 60 | 60 | ... | ... |