From 28b96cf8224cc3593f99e9d55b514997fc40d5a6 Mon Sep 17 00:00:00 2001 From: bootx Date: Tue, 6 Feb 2024 23:06:56 +0800 Subject: [PATCH] =?UTF-8?q?style=20=E9=83=A8=E5=88=86=E7=B1=BB=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=E5=8F=98=E6=9B=B4=EF=BC=8Creadme=E7=BC=96=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 82 +++++++++++++++--- _doc/images/jetbrains.png | Bin 0 -> 5739 bytes ...dStatusEnum.java => RefundStatusEnum.java} | 4 +- ...tusEnum.java => RefundSyncStatusEnum.java} | 2 +- .../result/order/RefundOrderResult.java | 4 +- .../daxpay/result/pay/SyncResult.java | 4 +- .../service/common/context/CallbackLocal.java | 4 +- .../service/common/context/RefundLocal.java | 4 +- .../alipay/service/AliPayRefundService.java | 6 +- .../alipay/service/AliPaySyncService.java | 10 +-- .../wechat/service/WeChatPaySyncService.java | 10 +-- .../wechat/service/WechatRefundService.java | 6 +- .../pay/service/PayChannelOrderService.java | 4 +- .../refund/entity/PayRefundChannelOrder.java | 4 +- .../order/refund/entity/PayRefundOrder.java | 4 +- .../service/PayRefundCallbackService.java | 6 +- .../service/PayRefundAssistService.java | 6 +- .../refund/service/PayRefundService.java | 6 +- .../refund/strategy/AliPayRefundStrategy.java | 4 +- .../strategy/WeChatPayRefundStrategy.java | 4 +- .../repair/result/RefundRepairResult.java | 6 +- .../repair/service/RefundRepairService.java | 14 +-- .../sync/result/RefundGatewaySyncResult.java | 8 +- .../sync/service/PayRefundSyncService.java | 30 +++---- .../record/sync/entity/PaySyncRecord.java | 4 +- .../dto/order/refund/PayRefundOrderDto.java | 4 +- .../order/refund/RefundChannelOrderDto.java | 4 +- .../dto/record/sync/PaySyncRecordDto.java | 4 +- .../service/func/AbsRefundRepairStrategy.java | 6 +- .../service/func/AbsRefundStrategy.java | 4 +- .../service/param/order/PayOrderQuery.java | 2 +- .../param/order/PayRefundOrderQuery.java | 4 +- .../src/main/resources/application-dev.yml | 14 --- 33 files changed, 159 insertions(+), 119 deletions(-) create mode 100644 _doc/images/jetbrains.png rename daxpay-single/daxpay-single-core/src/main/java/cn/bootx/platform/daxpay/code/{PayRefundStatusEnum.java => RefundStatusEnum.java} (90%) rename daxpay-single/daxpay-single-core/src/main/java/cn/bootx/platform/daxpay/code/{PayRefundSyncStatusEnum.java => RefundSyncStatusEnum.java} (91%) diff --git a/README.md b/README.md index e87b796bf..2329f8bbf 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@

star - Build Status + Build Status star Build Status Build Status @@ -10,32 +10,88 @@

-## 🙏🙏🙏 求star呀,走过路过留个star吧,非常非常感谢。🙏🙏🙏 - ## 🍈项目介绍 -[**查看开发进度**](https://gitee.com/bootx/dax-pay/issues/I8TQ9Q) -单商户模式模式重构中, 敬请期待!!! +> DaxPay是一套基于Bootx-Platform脚手架构建的一套开源支付网关系统,已经对接支付宝、微信支付相关的接口,以及扩展了钱包支付、储值卡支付、现金支付等新的支付方式。 -## 🍒文档 +## 🧭 特色功能 +- 已对接`微信支付`相关的接口,目前已经支持`V2`版本的接口,后续版本将支持`V3`版本的接口 +- 已对接`支付宝`相关的接口,目前已经支持`V2`版本的接口,后续版本将支持`V3`版本的接口 +- 支持组合支付,满足用户系统需要多种方式同时进行支付的场景。 +- 提供`HTTP`方式接口调用能力,和`Java`版本的`SDK`,方便业务系统进行对接 +- 接口请求和响应数据支持启用签名机制,可根据实际需要进行开关,保证交易安全可靠 +- 提供管理平台,方便运营人员进行管理和操作,不需要懂IT技术也可以轻松使用 + +## 🍒文档和演示地址 +### 文档地址 + +在 [Bootx开源文档站](https://bootx.gitee.io/) 下的`支付网关(DaxPay)`模块下可以进行差异相关文档,具体链接地址如下 +[快速指南](https://bootx.gitee.io/daxpay/guides/overview/项目介绍.html)、 +[支付对接](https://bootx.gitee.io/daxpay/gateway/overview/接口清单.html)、 +[平台配置](https://bootx.gitee.io/daxpay/admin/config/平台配置.html) + + +### 管理平台: +> 注:演示账号部分功能修改删除权限未开放。 + +地址:https://daxpay.demo.bootx.cn + +账号:daxpay + +密码:123456 + +### 网关接口 +> 注:接口平台只开放支付网关相关的接口,不开放系统其他接口。 + +地址: https://daxpay.server.demo.bootx.cn:9000/doc.html + +账号: daxpay + +密码: 123456 + +## 🥞 核心技术栈 +| 名称 | 描述 | 版本要求 | +|-------------|----------|----------------------------| +| Jdk | Java环境 | 1.8+,11版本可以正常使用,但17+版本暂不支持 | +| Spring Boot | 开发框架 | 2.7.x | +| Redis | 分布式缓存 | 5.x版本及以上 | +| MySQL | 数据库 | 基于5.7.X版本开发,基本支持8.x版本 | +| Vue | 前端框架 | 3.x | +| IJpay | 支付SDK开发包 | 项目自动管理,不需要额外处理 | + + +## 💾 系统截图 ## 🍎 路线图 +[**查看开发进度**](https://gitee.com/bootx/dax-pay/issues/I8TQ9Q) +### 2.0.X版本: -## 🥂 Quick Start +- [ ] 钱包功能完善 +- [ ] 储值卡功能完善 +- [ ] 现金支付功能完善 +- [ ] 微信增加V3版本接口支持 +- [ ] 支付宝增加V3版本接口支持 +- [ ] 支付宝进行关闭时,支持通过撤销模式进行订单关闭 +- [ ] 对账功能剩余比对功能实现 +- [ ] 消息通知支持消息中间件模式 +- [ ] 支持转账操作 +- [ ] 增加验签调试等功能的页面 +### 2.1.X版本: -## 名词解释 - -## 🥞项目结构(dax-pay) +- [ ] 增加账户金额表 +- [ ] 增加统计管理 +- [ ] 支持微信消息通知 +- [ ] 支持钉钉消息通知 +- [ ] 新增支付单预警功能, 处理支付单与网关状态不一致且无法自动修复的情况 ## 🥂 Bootx 项目合集 - Bootx-Platform:单体版脚手架 [Gitee地址](https://gitee.com/bootx/bootx-platform) - Bootx-Cloud:微服务版脚手架 [Gitee地址](https://gitee.com/bootx/bootx-cloud) - dax-pay:开源支付系统 [Gitee地址](https://gitee.com/bootx/daxpay) -- bpm-plus:协同办公系统 [Gitee地址](https://gitee.com/bootx/bpm-plus) - mybatis-table-modify:数据表结构管理 [Gitee地址](https://gitee.com/bootx/mybatis-table-modify) ## 🥪 关于我们 @@ -45,13 +101,11 @@ QQ扫码加入QQ交流群

-## 💾 系统截图 - ## 🍻 鸣谢 感谢 JetBrains 提供的免费开源 License: -[![JetBrains](https://oscimg.oschina.net/oscnet/up-4aab9fa8bc769295b48c888d93e71320d93.png)](https://www.jetbrains.com/?from=bootx) +[![JetBrains](_doc/images/jetbrains.png)](https://www.jetbrains.com/?from=bootx) 感谢其他提供灵感和思路的开源项目 diff --git a/_doc/images/jetbrains.png b/_doc/images/jetbrains.png new file mode 100644 index 0000000000000000000000000000000000000000..15a430e2491e0f52bdd656623c0b5436b990c7d1 GIT binary patch literal 5739 zcmbuDXEfYz(D#2z^b%#&h#t|BtQMV!8ZG*=N?1f#WTSTy!s<(OQ4s>a5Fp+9iRlXc0*+725myzbL(68Y<^Ga8LOI@sOmB2n1!DOP2>Oh z!#-ktHa|B#C-^%(dJ%@zD^^-9)i+#hD(LNzE)lGeUBX##3VAD8nOwX~WhJu|sfO52wpi>40#xa6Zru70b=9WNJ!8esyi5c5FwuP#f zpK3JYoCDKx7>aclzJr%1Y(zEOrTJ-G)X8Iw+)`!bb0R4-XWA#QhRQKNa& zC$yD+S3Tx$$#ucihG`WBeG(d*s(MCRB3#JQ9c(LknWiQwAg5>%R~LxLv54XGvMet4 z(RgngsAdfXtS>W97S*39sU^9_ngxf}uV9%tQET_dMA!XCW^;%9+Np|!J56*|xZ%(Nsnf&4&zB{C z48BMVF}a#7Tr_OD-HL&mWYvt1WB1$M#m1duUgZ2+P494Iwf)RaPH^7dwo-5Abh+lT zu=D8mIHhV6A=ZUw&6GW)| z$bWZp+8j-CqEkaMoSVCHU$|^%9PBi4a@Uwy#3%R{4+rW?RW-2kX*yVC*}iAz67YC0 z;$6xYXAc)^cUBy18ftGU=rAXakK~+fI6Zja5Fwvll*1T8_w5QfdX;}#hgal+@jDI&$3a;imY@T+qlqfQ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2f!@s%7#J!PjcOez|6QTW3=mCR#*_rEx1@Of;S+~5%vHgY(`TlHNfIfrtv ztze|7fY1i9%SXB9tsHlm@Dy1;115);)Y~&D6bf|Bhq)So&8>D`=tk%K`+3XRU-9B! zqo-<(jOMHyf}0%oUVgPUo+r{xN|m8*vc^&zi_X`*D5dWQ-|ph$>E0ZW${u~KXz}MY zB&nXzZB`E+Q9olF-k=N(=He3Z1`g$DvW!1?OYwDE=@Ceo@)cgOHQW>Vgu;8!^)dwZ zcT*fco!ebz6PdG{+(|`epyuiEnR2PtTr_i%>LZ2|W}Jy^UR8BT;d@l>aE?-ldDDyu!;E6@PA=cMr)Ejc<`m*GB<*bL zBD4fBF`*y~&ASf-0;FMAIkNA}2f~RCgZ2NODTXv|p#1E<;1bTPtG4|sDUc`YSF#h= zz{$hItKO+|$_GC$^O`#{m98nu^P3+qzRAjtuq{CX!x-|-n zkh59hRLOV!x3*nX!~v5aU)E2&hKwukk!#N_qMIrEj>huIV3Aa>si_{RvH6)Zf-(28 ziy@BHH*Y_>l0O>R@Z#KjfZL!ZJ9F_DSKn*_zvTAH+&R@z6A8rl(!D+n2Wl=1 z+<0QMpdXx&KeDBE gSNW>Fz={Ul`{ycTC4Xc)=q2>O%aHk$*Y(W*0|kq-5C8xG literal 0 HcmV?d00001 diff --git a/daxpay-single/daxpay-single-core/src/main/java/cn/bootx/platform/daxpay/code/PayRefundStatusEnum.java b/daxpay-single/daxpay-single-core/src/main/java/cn/bootx/platform/daxpay/code/RefundStatusEnum.java similarity index 90% rename from daxpay-single/daxpay-single-core/src/main/java/cn/bootx/platform/daxpay/code/PayRefundStatusEnum.java rename to daxpay-single/daxpay-single-core/src/main/java/cn/bootx/platform/daxpay/code/RefundStatusEnum.java index 289838831..c79a4664f 100644 --- a/daxpay-single/daxpay-single-core/src/main/java/cn/bootx/platform/daxpay/code/PayRefundStatusEnum.java +++ b/daxpay-single/daxpay-single-core/src/main/java/cn/bootx/platform/daxpay/code/RefundStatusEnum.java @@ -14,7 +14,7 @@ import java.util.Objects; */ @Getter @AllArgsConstructor -public enum PayRefundStatusEnum { +public enum RefundStatusEnum { /** * 接口调用成功不代表成功 @@ -32,7 +32,7 @@ public enum PayRefundStatusEnum { /** * 根据编码获取枚举 */ - public static PayRefundStatusEnum findByCode(String code){ + public static RefundStatusEnum findByCode(String code){ return Arrays.stream(values()) .filter(statusEnum -> Objects.equals(statusEnum.getCode(), code)) .findFirst() diff --git a/daxpay-single/daxpay-single-core/src/main/java/cn/bootx/platform/daxpay/code/PayRefundSyncStatusEnum.java b/daxpay-single/daxpay-single-core/src/main/java/cn/bootx/platform/daxpay/code/RefundSyncStatusEnum.java similarity index 91% rename from daxpay-single/daxpay-single-core/src/main/java/cn/bootx/platform/daxpay/code/PayRefundSyncStatusEnum.java rename to daxpay-single/daxpay-single-core/src/main/java/cn/bootx/platform/daxpay/code/RefundSyncStatusEnum.java index 9d6dcb3a2..09a165922 100644 --- a/daxpay-single/daxpay-single-core/src/main/java/cn/bootx/platform/daxpay/code/PayRefundSyncStatusEnum.java +++ b/daxpay-single/daxpay-single-core/src/main/java/cn/bootx/platform/daxpay/code/RefundSyncStatusEnum.java @@ -10,7 +10,7 @@ import lombok.Getter; */ @Getter @AllArgsConstructor -public enum PayRefundSyncStatusEnum { +public enum RefundSyncStatusEnum { SUCCESS("refund_success","退款成功"), FAIL("refund_fail","退款失败"), PROGRESS("refund_progress","退款中"); diff --git a/daxpay-single/daxpay-single-core/src/main/java/cn/bootx/platform/daxpay/result/order/RefundOrderResult.java b/daxpay-single/daxpay-single-core/src/main/java/cn/bootx/platform/daxpay/result/order/RefundOrderResult.java index 494122bdf..e5c5a4a97 100644 --- a/daxpay-single/daxpay-single-core/src/main/java/cn/bootx/platform/daxpay/result/order/RefundOrderResult.java +++ b/daxpay-single/daxpay-single-core/src/main/java/cn/bootx/platform/daxpay/result/order/RefundOrderResult.java @@ -1,6 +1,6 @@ package cn.bootx.platform.daxpay.result.order; -import cn.bootx.platform.daxpay.code.PayRefundStatusEnum; +import cn.bootx.platform.daxpay.code.RefundStatusEnum; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.experimental.Accessors; @@ -52,7 +52,7 @@ public class RefundOrderResult { private LocalDateTime refundTime; /** - * @see PayRefundStatusEnum + * @see RefundStatusEnum */ @Schema(description = "退款状态") private String status; diff --git a/daxpay-single/daxpay-single-core/src/main/java/cn/bootx/platform/daxpay/result/pay/SyncResult.java b/daxpay-single/daxpay-single-core/src/main/java/cn/bootx/platform/daxpay/result/pay/SyncResult.java index 3827a0765..92795c776 100644 --- a/daxpay-single/daxpay-single-core/src/main/java/cn/bootx/platform/daxpay/result/pay/SyncResult.java +++ b/daxpay-single/daxpay-single-core/src/main/java/cn/bootx/platform/daxpay/result/pay/SyncResult.java @@ -1,6 +1,6 @@ package cn.bootx.platform.daxpay.result.pay; -import cn.bootx.platform.daxpay.code.PayRefundSyncStatusEnum; +import cn.bootx.platform.daxpay.code.RefundSyncStatusEnum; import cn.bootx.platform.daxpay.code.PaySyncStatusEnum; import cn.bootx.platform.daxpay.result.CommonResult; import io.swagger.v3.oas.annotations.media.Schema; @@ -24,7 +24,7 @@ public class SyncResult extends CommonResult { /** * 支付网关同步状态 * @see PaySyncStatusEnum - * @see PayRefundSyncStatusEnum + * @see RefundSyncStatusEnum */ @Schema(description = "支付网关同步状态") private String gatewayStatus = FAIL.getCode(); diff --git a/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/common/context/CallbackLocal.java b/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/common/context/CallbackLocal.java index 507c1146b..43b4fce39 100644 --- a/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/common/context/CallbackLocal.java +++ b/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/common/context/CallbackLocal.java @@ -1,6 +1,6 @@ package cn.bootx.platform.daxpay.service.common.context; -import cn.bootx.platform.daxpay.code.PayRefundStatusEnum; +import cn.bootx.platform.daxpay.code.RefundStatusEnum; import cn.bootx.platform.daxpay.code.PayStatusEnum; import cn.bootx.platform.daxpay.service.code.PayCallbackStatusEnum; import lombok.Data; @@ -33,7 +33,7 @@ public class CallbackLocal { /** * 网关返回状态 * @see PayStatusEnum 支付状态 - * @see PayRefundStatusEnum 退款状态 + * @see RefundStatusEnum 退款状态 */ private String gatewayStatus; diff --git a/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/common/context/RefundLocal.java b/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/common/context/RefundLocal.java index 7f1a6c70a..b1bcfd012 100644 --- a/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/common/context/RefundLocal.java +++ b/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/common/context/RefundLocal.java @@ -1,6 +1,6 @@ package cn.bootx.platform.daxpay.service.common.context; -import cn.bootx.platform.daxpay.code.PayRefundStatusEnum; +import cn.bootx.platform.daxpay.code.RefundStatusEnum; import lombok.Data; import lombok.experimental.Accessors; @@ -21,7 +21,7 @@ public class RefundLocal { /** * 退款状态, 默认为成功, 通常含有异步支付时, 才会出现别的状态 */ - private PayRefundStatusEnum status = PayRefundStatusEnum.SUCCESS; + private RefundStatusEnum status = RefundStatusEnum.SUCCESS; /** 错误码 */ private String errorCode; diff --git a/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/channel/alipay/service/AliPayRefundService.java b/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/channel/alipay/service/AliPayRefundService.java index d84804249..4cf8127e9 100644 --- a/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/channel/alipay/service/AliPayRefundService.java +++ b/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/channel/alipay/service/AliPayRefundService.java @@ -1,6 +1,6 @@ package cn.bootx.platform.daxpay.service.core.channel.alipay.service; -import cn.bootx.platform.daxpay.code.PayRefundStatusEnum; +import cn.bootx.platform.daxpay.code.RefundStatusEnum; import cn.bootx.platform.daxpay.exception.pay.PayFailureException; import cn.bootx.platform.daxpay.service.code.AliPayCode; import cn.bootx.platform.daxpay.service.common.context.RefundLocal; @@ -49,10 +49,10 @@ public class AliPayRefundService { } // 接口返回fund_change=Y为退款成功,fund_change=N或无此字段值返回时需通过退款查询接口进一步确认退款状态 if (response.getFundChange().equals("Y")){ -// refundInfo.setStatus(PayRefundStatusEnum.SUCCESS) +// refundInfo.setStatus(RefundStatusEnum.SUCCESS) // .setGatewayOrderNo(response.getTradeNo()); } - refundInfo.setStatus(PayRefundStatusEnum.PROGRESS) + refundInfo.setStatus(RefundStatusEnum.PROGRESS) .setGatewayOrderNo(response.getTradeNo()); } catch (AlipayApiException e) { diff --git a/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/channel/alipay/service/AliPaySyncService.java b/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/channel/alipay/service/AliPaySyncService.java index 04fbf1142..3703288bb 100644 --- a/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/channel/alipay/service/AliPaySyncService.java +++ b/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/channel/alipay/service/AliPaySyncService.java @@ -1,7 +1,7 @@ package cn.bootx.platform.daxpay.service.core.channel.alipay.service; import cn.bootx.platform.common.core.util.LocalDateTimeUtil; -import cn.bootx.platform.daxpay.code.PayRefundSyncStatusEnum; +import cn.bootx.platform.daxpay.code.RefundSyncStatusEnum; import cn.bootx.platform.daxpay.code.PaySyncStatusEnum; import cn.bootx.platform.daxpay.service.code.AliPayCode; import cn.bootx.platform.daxpay.service.core.order.pay.entity.PayOrder; @@ -96,7 +96,7 @@ public class AliPaySyncService { * 退款同步查询 */ public RefundGatewaySyncResult syncRefundStatus(PayRefundOrder refundOrder) { - RefundGatewaySyncResult syncResult = new RefundGatewaySyncResult().setSyncStatus(PayRefundSyncStatusEnum.FAIL); + RefundGatewaySyncResult syncResult = new RefundGatewaySyncResult().setSyncStatus(RefundSyncStatusEnum.FAIL); try { AlipayTradeFastpayRefundQueryModel queryModel = new AlipayTradeFastpayRefundQueryModel(); // 退款请求号 @@ -109,7 +109,7 @@ public class AliPaySyncService { syncResult.setSyncInfo(JSONUtil.toJsonStr(response)); // 失败 if (!Objects.equals(AliPayCode.SUCCESS, response.getCode())) { - syncResult.setSyncStatus(PayRefundSyncStatusEnum.FAIL); + syncResult.setSyncStatus(RefundSyncStatusEnum.FAIL); syncResult.setErrorCode(response.getSubCode()); syncResult.setErrorMsg(response.getSubMsg()); return syncResult; @@ -120,9 +120,9 @@ public class AliPaySyncService { // 成功 if (Objects.equals(tradeStatus, AliPayCode.REFUND_SUCCESS)){ LocalDateTime localDateTime = LocalDateTimeUtil.of(response.getGmtRefundPay()); - return syncResult.setRefundTime(localDateTime).setSyncStatus(PayRefundSyncStatusEnum.SUCCESS); + return syncResult.setRefundTime(localDateTime).setSyncStatus(RefundSyncStatusEnum.SUCCESS); } else { - return syncResult.setSyncStatus(PayRefundSyncStatusEnum.FAIL).setErrorMsg("支付宝网关反正退款未成功"); + return syncResult.setSyncStatus(RefundSyncStatusEnum.FAIL).setErrorMsg("支付宝网关反正退款未成功"); } } catch (AlipayApiException e) { log.error("退款订单同步失败:", e); diff --git a/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/channel/wechat/service/WeChatPaySyncService.java b/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/channel/wechat/service/WeChatPaySyncService.java index 488597504..d4bf66f6b 100644 --- a/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/channel/wechat/service/WeChatPaySyncService.java +++ b/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/channel/wechat/service/WeChatPaySyncService.java @@ -1,7 +1,7 @@ package cn.bootx.platform.daxpay.service.core.channel.wechat.service; import cn.bootx.platform.common.core.util.LocalDateTimeUtil; -import cn.bootx.platform.daxpay.code.PayRefundSyncStatusEnum; +import cn.bootx.platform.daxpay.code.RefundSyncStatusEnum; import cn.bootx.platform.daxpay.code.PaySyncStatusEnum; import cn.bootx.platform.daxpay.service.code.WeChatPayCode; import cn.bootx.platform.daxpay.service.core.channel.wechat.entity.WeChatPayConfig; @@ -126,16 +126,16 @@ public class WeChatPaySyncService { if (Objects.equals(tradeStatus, WeChatPayCode.REFUND_SUCCESS)) { String timeEnd = result.get(WeChatPayCode.REFUND_SUCCESS_TIME); LocalDateTime time = LocalDateTimeUtil.parse(timeEnd, DatePattern.NORM_DATETIME_PATTERN); - return syncResult.setRefundTime(time).setSyncStatus(PayRefundSyncStatusEnum.SUCCESS); + return syncResult.setRefundTime(time).setSyncStatus(RefundSyncStatusEnum.SUCCESS); } // 退款中 if (Objects.equals(tradeStatus, WeChatPayCode.REFUND_PROCESSING)) { - return syncResult.setSyncStatus(PayRefundSyncStatusEnum.PROGRESS); + return syncResult.setSyncStatus(RefundSyncStatusEnum.PROGRESS); } - return syncResult.setSyncStatus(PayRefundSyncStatusEnum.FAIL); + return syncResult.setSyncStatus(RefundSyncStatusEnum.FAIL); } catch (Exception e) { log.error("查询退款订单失败:", e); - syncResult.setSyncStatus(PayRefundSyncStatusEnum.PROGRESS).setErrorMsg(e.getMessage()); + syncResult.setSyncStatus(RefundSyncStatusEnum.PROGRESS).setErrorMsg(e.getMessage()); } return syncResult; diff --git a/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/channel/wechat/service/WechatRefundService.java b/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/channel/wechat/service/WechatRefundService.java index fac09012b..91bb914bf 100644 --- a/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/channel/wechat/service/WechatRefundService.java +++ b/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/channel/wechat/service/WechatRefundService.java @@ -1,6 +1,6 @@ package cn.bootx.platform.daxpay.service.core.channel.wechat.service; -import cn.bootx.platform.daxpay.code.PayRefundStatusEnum; +import cn.bootx.platform.daxpay.code.RefundStatusEnum; import cn.bootx.platform.daxpay.exception.pay.PayFailureException; import cn.bootx.platform.daxpay.service.code.WeChatPayCode; import cn.bootx.platform.daxpay.service.common.context.RefundLocal; @@ -59,7 +59,7 @@ public class WechatRefundService { if (StrUtil.isBlank(weChatPayConfig.getP12())){ String errorMsg = "微信p.12证书未配置,无法进行退款"; refundInfo.setErrorMsg(errorMsg); - refundInfo.setErrorCode(PayRefundStatusEnum.FAIL.getCode()); + refundInfo.setErrorCode(RefundStatusEnum.FAIL.getCode()); throw new PayFailureException(errorMsg); } byte[] fileBytes = Base64.decode(weChatPayConfig.getP12()); @@ -69,7 +69,7 @@ public class WechatRefundService { Map result = WxPayKit.xmlToMap(xmlResult); this.verifyErrorMsg(result); // 微信退款是否成功需要查询状态或者回调, 所以设置为退款中状态 - refundInfo.setStatus(PayRefundStatusEnum.PROGRESS) + refundInfo.setStatus(RefundStatusEnum.PROGRESS) .setGatewayOrderNo(result.get("refund_id")); } diff --git a/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/order/pay/service/PayChannelOrderService.java b/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/order/pay/service/PayChannelOrderService.java index 618ffbb2e..059479c30 100644 --- a/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/order/pay/service/PayChannelOrderService.java +++ b/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/order/pay/service/PayChannelOrderService.java @@ -2,7 +2,7 @@ package cn.bootx.platform.daxpay.service.core.order.pay.service; import cn.bootx.platform.common.core.exception.DataNotExistException; import cn.bootx.platform.common.core.util.ResultConvertUtil; -import cn.bootx.platform.daxpay.code.PayRefundStatusEnum; +import cn.bootx.platform.daxpay.code.RefundStatusEnum; import cn.bootx.platform.daxpay.code.PayStatusEnum; import cn.bootx.platform.daxpay.param.pay.PayChannelParam; import cn.bootx.platform.daxpay.service.common.context.AsyncPayLocal; @@ -91,7 +91,7 @@ public class PayChannelOrderService { int refundableBalance = payChannelOrder.getRefundableBalance() - refundChannelOrder.getAmount(); payChannelOrder.setRefundableBalance(refundableBalance); // 支付通道订单状态 - if (Objects.equals(refundChannelOrder.getStatus(), PayRefundStatusEnum.SUCCESS.getCode())){ + if (Objects.equals(refundChannelOrder.getStatus(), RefundStatusEnum.SUCCESS.getCode())){ PayStatusEnum status = refundableBalance == 0 ? PayStatusEnum.REFUNDED : PayStatusEnum.PARTIAL_REFUND; payChannelOrder.setStatus(status.getCode()); refundChannelOrder.setRefundTime(LocalDateTime.now()); diff --git a/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/order/refund/entity/PayRefundChannelOrder.java b/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/order/refund/entity/PayRefundChannelOrder.java index 56fa29bb2..9e521b0f5 100644 --- a/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/order/refund/entity/PayRefundChannelOrder.java +++ b/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/order/refund/entity/PayRefundChannelOrder.java @@ -2,7 +2,7 @@ package cn.bootx.platform.daxpay.service.core.order.refund.entity; import cn.bootx.platform.common.core.function.EntityBaseFunction; import cn.bootx.platform.common.mybatisplus.base.MpCreateEntity; -import cn.bootx.platform.daxpay.code.PayRefundStatusEnum; +import cn.bootx.platform.daxpay.code.RefundStatusEnum; import cn.bootx.platform.daxpay.service.core.order.refund.convert.RefundOrderChannelConvert; import cn.bootx.platform.daxpay.service.dto.order.refund.RefundChannelOrderDto; import cn.bootx.table.modify.annotation.DbColumn; @@ -52,7 +52,7 @@ public class PayRefundChannelOrder extends MpCreateEntity implements EntityBaseF /** * 退款状态 - * @see PayRefundStatusEnum + * @see RefundStatusEnum */ @DbColumn(comment = "退款状态") private String status; diff --git a/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/order/refund/entity/PayRefundOrder.java b/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/order/refund/entity/PayRefundOrder.java index 1ccd48889..0181fd047 100644 --- a/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/order/refund/entity/PayRefundOrder.java +++ b/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/order/refund/entity/PayRefundOrder.java @@ -3,7 +3,7 @@ package cn.bootx.platform.daxpay.service.core.order.refund.entity; import cn.bootx.platform.common.core.function.EntityBaseFunction; import cn.bootx.platform.common.mybatisplus.base.MpBaseEntity; import cn.bootx.platform.daxpay.code.PayChannelEnum; -import cn.bootx.platform.daxpay.code.PayRefundStatusEnum; +import cn.bootx.platform.daxpay.code.RefundStatusEnum; import cn.bootx.platform.daxpay.service.core.order.refund.convert.PayRefundOrderConvert; import cn.bootx.platform.daxpay.service.dto.order.refund.PayRefundOrderDto; import cn.bootx.table.modify.annotation.DbColumn; @@ -95,7 +95,7 @@ public class PayRefundOrder extends MpBaseEntity implements EntityBaseFunction