ref 局部微调

This commit is contained in:
DaxPay
2024-05-13 20:40:47 +08:00
parent e9e44deb42
commit 407862d426
12 changed files with 763 additions and 75 deletions

View File

@@ -94,7 +94,7 @@
```xml ```xml
<!-- 支付SDK --> <!-- 支付SDK -->
<dependency> <dependency>
<groupId>cn.bootx.platform</groupId> <groupId>cn.daxpay.single</groupId>
<artifactId>daxpay-single-sdk</artifactId> <artifactId>daxpay-single-sdk</artifactId>
<version>${latest.version}</version> <version>${latest.version}</version>
</dependency> </dependency>
@@ -128,8 +128,6 @@ public class PayOrderTest {
public void pay() { public void pay() {
PayParam param = new PayParam(); PayParam param = new PayParam();
param.setClientIp("127.0.0.1"); param.setClientIp("127.0.0.1");
param.setNotNotify(true);
param.setBizOrderNo("P0004"); param.setBizOrderNo("P0004");
param.setTitle("测试接口支付"); param.setTitle("测试接口支付");
param.setChannel(PayChannelEnum.ALI.getCode()); param.setChannel(PayChannelEnum.ALI.getCode());
@@ -143,7 +141,7 @@ public class PayOrderTest {
## 🍎 系统截图 ## 🍎 系统截图
### 收银台演示 ### 收银台演示
![微信截图_20240326141126](https://jsd.cdn.zzko.cn/gh/xxm1995/picx-images-hosting@master/daxpay/微信截图_20240326141126.es9yupxd3.webp) ![微信截图_20240326141126](https://jsd.cdn.zzko.cn/gh/xxm1995/picx-images-hosting@master/daxpay/微信截图_20240513192801.2ruycydkl6.webp)
### 驾驶舱 ### 驾驶舱
![QQ截图20240326141912](https://jsd.cdn.zzko.cn/gh/xxm1995/picx-images-hosting@master/daxpay/QQ截图20240326141912.60u0cpvjg5.webp) ![QQ截图20240326141912](https://jsd.cdn.zzko.cn/gh/xxm1995/picx-images-hosting@master/daxpay/QQ截图20240326141912.60u0cpvjg5.webp)
### H5收银台演示 ### H5收银台演示
@@ -162,10 +160,15 @@ public class PayOrderTest {
## 🥪 关于我们 ## 🥪 关于我们
扫码加入QQ交流群 扫码加入QQ交流群
交流一群
<p> <p>
<img src="https://jsd.cdn.zzko.cn/gh/xxm1995/picx-images-hosting@master/connect/微信图片_20240412132238.3rb0hgrf2z.webp" width = "330" height = "500"/> <img src="https://jsd.cdn.zzko.cn/gh/xxm1995/picx-images-hosting@master/connect/微信图片_20240412132238.3rb0hgrf2z.webp" width = "330" height = "500"/>
</p> </p>
交流二群
<p>
<img src="https://jsd.cdn.zzko.cn/gh/xxm1995/picx-images-hosting@master/connect/微信图片_20240513180310.2yy68aykip.webp" width = "330" height = "500"/>
</p>
扫码加入钉钉交流群 扫码加入钉钉交流群
<p> <p>

File diff suppressed because it is too large Load Diff

View File

@@ -94,6 +94,10 @@ public class FileUploadService {
@SneakyThrows @SneakyThrows
public void preview(Long id, HttpServletResponse response) { public void preview(Long id, HttpServletResponse response) {
FileInfo info = fileStorageService.getFileInfoByUrl(String.valueOf(id)); FileInfo info = fileStorageService.getFileInfoByUrl(String.valueOf(id));
if (info == null){
log.warn("文件不存在");
return;
}
byte[] bytes = fileStorageService.download(info).bytes(); byte[] bytes = fileStorageService.download(info).bytes();
val is = new ByteArrayInputStream(bytes); val is = new ByteArrayInputStream(bytes);
// 获取响应输出流 // 获取响应输出流

View File

@@ -43,7 +43,7 @@
<dependency> <dependency>
<groupId>cn.daxpay.single</groupId> <groupId>cn.daxpay.single</groupId>
<artifactId>daxpay-single-sdk</artifactId> <artifactId>daxpay-single-sdk</artifactId>
<version>2.0.5</version> <version>${daxpay.version}</version>
</dependency> </dependency>
</dependencies> </dependencies>

View File

@@ -6,13 +6,13 @@
<groupId>cn.daxpay.single</groupId> <groupId>cn.daxpay.single</groupId>
<artifactId>daxpay-single-sdk</artifactId> <artifactId>daxpay-single-sdk</artifactId>
<version>2.0.5</version> <version>2.0.6</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<!-- 项目信息 --> <!-- 项目信息 -->
<name>daxpay-single-sdk</name> <name>daxpay-single-sdk</name>
<description>daxpay-single-sdk 是 daxpay单商户版的JavaSDK用于业务系统快速接入到支付网关中</description> <description>daxpay-single-sdk 是 daxpay单商户版的JavaSDK用于业务系统快速接入到支付网关中</description>
<url>https://gitee.com/single/daxpay</url> <url>https://gitee.com/dromara/dax-pay</url>
<!-- 许可证 --> <!-- 许可证 -->
<licenses> <licenses>
@@ -36,7 +36,7 @@
<scm> <scm>
<connection>scm:git:git@gitee.com:dromara/daxpay.git</connection> <connection>scm:git:git@gitee.com:dromara/daxpay.git</connection>
<developerConnection>scm:git:git@gitee.com:dromara/daxpay.git</developerConnection> <developerConnection>scm:git:git@gitee.com:dromara/daxpay.git</developerConnection>
<url>https://gitee.com/dromara/daxpay</url> <url>https://gitee.com/dromara/dax-pay</url>
</scm> </scm>
<properties> <properties>

View File

@@ -1,6 +1,7 @@
package cn.daxpay.single.sdk.model.sync; package cn.daxpay.single.sdk.model.sync;
import cn.daxpay.single.sdk.code.PaySyncStatusEnum; import cn.daxpay.single.sdk.code.PaySyncStatusEnum;
import cn.daxpay.single.sdk.code.RefundSyncStatusEnum;
import cn.daxpay.single.sdk.net.DaxPayResponseModel; import cn.daxpay.single.sdk.net.DaxPayResponseModel;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
@@ -17,9 +18,10 @@ import lombok.ToString;
public class SyncModel extends DaxPayResponseModel { public class SyncModel extends DaxPayResponseModel {
/** /**
* 支付订单同步结果 * 同步结果
* @see PaySyncStatusEnum * @see PaySyncStatusEnum
* @see RefundSyncStatusEnum
*/ */
private Boolean status; private String status;
} }

View File

@@ -6,7 +6,7 @@ import lombok.Setter;
import lombok.ToString; import lombok.ToString;
/** /**
* * 响应参数接收类
* @author xxm * @author xxm
* @since 2024/2/2 * @since 2024/2/2
*/ */

View File

@@ -31,9 +31,8 @@ public class RefundOrderSyncTest {
@Test @Test
public void testPay() { public void testPay() {
RefundSyncParam param = new RefundSyncParam(); RefundSyncParam param = new RefundSyncParam();
param.setRefundNo("DEVR24051020530263000002");
param.setRefundNo("R0001"); param.setClientIp("127.0.0.1");
DaxPayResult<SyncModel> execute = DaxPayKit.execute(param); DaxPayResult<SyncModel> execute = DaxPayKit.execute(param);
System.out.println(execute); System.out.println(execute);
System.out.println(execute.getData()); System.out.println(execute.getData());

View File

@@ -127,7 +127,7 @@ bootx:
store: jdbc store: jdbc
# ip归属地 # ip归属地
ip2region: ip2region:
# 数据文件路径 # 数据文件路径, 下载地址 https://gitee.com/lionsoul/ip2region/blob/master/data/ip2region.xdb
file-path: /data/ip2region/ip2region.xdb file-path: /data/ip2region/ip2region.xdb
# 查询方式 # 查询方式
search-type: cache search-type: cache

View File

@@ -113,7 +113,7 @@ bootx:
store: jdbc store: jdbc
# ip归属地 # ip归属地
ip2region: ip2region:
# 数据文件路径 # 数据文件路径, 下载地址 https://gitee.com/lionsoul/ip2region/blob/master/data/ip2region.xdb
file-path: /data/ip2region/ip2region.xdb file-path: /data/ip2region/ip2region.xdb
# 查询方式 # 查询方式
search-type: cache search-type: cache

View File

@@ -28,7 +28,7 @@ public enum PaySyncStatusEnum {
* 所以查询为了区分,增加一个未知的状态, 用于处理这种特殊情况, 然后根据业务需要,关闭订单或者进行其他操作 * 所以查询为了区分,增加一个未知的状态, 用于处理这种特殊情况, 然后根据业务需要,关闭订单或者进行其他操作
*/ */
NOT_FOUND_UNKNOWN("pay_not_found_unknown","交易不存在(特殊)"), NOT_FOUND_UNKNOWN("pay_not_found_unknown","交易不存在(特殊)"),
/** 订单到了超时时间, 可以进行手动设置支付超时状态 */ /** 订单到了超时时间, 可以手动设置订单为状态 */
TIMEOUT("pay_timeout", "支付超时"); TIMEOUT("pay_timeout", "支付超时");
/** 编码 */ /** 编码 */

View File

@@ -59,9 +59,9 @@ public class RefundSyncService {
// 先获取退款单 // 先获取退款单
RefundOrder refundOrder = refundOrderQueryService.findByBizOrRefundNo(param.getRefundNo(), param.getBizRefundNo()) RefundOrder refundOrder = refundOrderQueryService.findByBizOrRefundNo(param.getRefundNo(), param.getBizRefundNo())
.orElseThrow(() -> new PayFailureException("未查询到退款订单")); .orElseThrow(() -> new PayFailureException("未查询到退款订单"));
// 如果订单已经关闭, 直接返回失败 // 如果订单已经关闭, 直接返回退款关闭
if (Objects.equals(refundOrder.getStatus(), RefundStatusEnum.CLOSE.getCode())){ if (Objects.equals(refundOrder.getStatus(), RefundStatusEnum.CLOSE.getCode())){
throw new PayFailureException("订单已经关闭,不需要同步"); return new SyncResult().setStatus(RefundStatusEnum.CLOSE.getCode());
} }
return this.syncRefundOrder(refundOrder); return this.syncRefundOrder(refundOrder);
} }