mirror of
https://gitee.com/dromara/dax-pay.git
synced 2025-09-17 01:32:35 +00:00
ref 局部微调
This commit is contained in:
13
README.md
13
README.md
@@ -94,7 +94,7 @@
|
||||
```xml
|
||||
<!-- 支付SDK -->
|
||||
<dependency>
|
||||
<groupId>cn.bootx.platform</groupId>
|
||||
<groupId>cn.daxpay.single</groupId>
|
||||
<artifactId>daxpay-single-sdk</artifactId>
|
||||
<version>${latest.version}</version>
|
||||
</dependency>
|
||||
@@ -128,8 +128,6 @@ public class PayOrderTest {
|
||||
public void pay() {
|
||||
PayParam param = new PayParam();
|
||||
param.setClientIp("127.0.0.1");
|
||||
param.setNotNotify(true);
|
||||
|
||||
param.setBizOrderNo("P0004");
|
||||
param.setTitle("测试接口支付");
|
||||
param.setChannel(PayChannelEnum.ALI.getCode());
|
||||
@@ -143,7 +141,7 @@ public class PayOrderTest {
|
||||
|
||||
## 🍎 系统截图
|
||||
### 收银台演示
|
||||

|
||||

|
||||
### 驾驶舱
|
||||

|
||||
### H5收银台演示
|
||||
@@ -162,10 +160,15 @@ public class PayOrderTest {
|
||||
## 🥪 关于我们
|
||||
|
||||
扫码加入QQ交流群
|
||||
|
||||
交流一群
|
||||
<p>
|
||||
<img src="https://jsd.cdn.zzko.cn/gh/xxm1995/picx-images-hosting@master/connect/微信图片_20240412132238.3rb0hgrf2z.webp" width = "330" height = "500"/>
|
||||
</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>
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -94,6 +94,10 @@ public class FileUploadService {
|
||||
@SneakyThrows
|
||||
public void preview(Long id, HttpServletResponse response) {
|
||||
FileInfo info = fileStorageService.getFileInfoByUrl(String.valueOf(id));
|
||||
if (info == null){
|
||||
log.warn("文件不存在");
|
||||
return;
|
||||
}
|
||||
byte[] bytes = fileStorageService.download(info).bytes();
|
||||
val is = new ByteArrayInputStream(bytes);
|
||||
// 获取响应输出流
|
||||
|
@@ -43,7 +43,7 @@
|
||||
<dependency>
|
||||
<groupId>cn.daxpay.single</groupId>
|
||||
<artifactId>daxpay-single-sdk</artifactId>
|
||||
<version>2.0.5</version>
|
||||
<version>${daxpay.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
@@ -6,13 +6,13 @@
|
||||
|
||||
<groupId>cn.daxpay.single</groupId>
|
||||
<artifactId>daxpay-single-sdk</artifactId>
|
||||
<version>2.0.5</version>
|
||||
<version>2.0.6</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<!-- 项目信息 -->
|
||||
<name>daxpay-single-sdk</name>
|
||||
<description>daxpay-single-sdk 是 daxpay单商户版的JavaSDK,用于业务系统快速接入到支付网关中</description>
|
||||
<url>https://gitee.com/single/daxpay</url>
|
||||
<url>https://gitee.com/dromara/dax-pay</url>
|
||||
|
||||
<!-- 许可证 -->
|
||||
<licenses>
|
||||
@@ -36,7 +36,7 @@
|
||||
<scm>
|
||||
<connection>scm:git:git@gitee.com:dromara/daxpay.git</connection>
|
||||
<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>
|
||||
|
||||
<properties>
|
||||
|
@@ -1,6 +1,7 @@
|
||||
package cn.daxpay.single.sdk.model.sync;
|
||||
|
||||
import cn.daxpay.single.sdk.code.PaySyncStatusEnum;
|
||||
import cn.daxpay.single.sdk.code.RefundSyncStatusEnum;
|
||||
import cn.daxpay.single.sdk.net.DaxPayResponseModel;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
@@ -17,9 +18,10 @@ import lombok.ToString;
|
||||
public class SyncModel extends DaxPayResponseModel {
|
||||
|
||||
/**
|
||||
* 支付订单同步结果
|
||||
* 同步结果
|
||||
* @see PaySyncStatusEnum
|
||||
* @see RefundSyncStatusEnum
|
||||
*/
|
||||
private Boolean status;
|
||||
private String status;
|
||||
|
||||
}
|
||||
|
@@ -6,7 +6,7 @@ import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
/**
|
||||
*
|
||||
* 响应参数接收类
|
||||
* @author xxm
|
||||
* @since 2024/2/2
|
||||
*/
|
||||
|
@@ -31,9 +31,8 @@ public class RefundOrderSyncTest {
|
||||
@Test
|
||||
public void testPay() {
|
||||
RefundSyncParam param = new RefundSyncParam();
|
||||
|
||||
param.setRefundNo("R0001");
|
||||
|
||||
param.setRefundNo("DEVR24051020530263000002");
|
||||
param.setClientIp("127.0.0.1");
|
||||
DaxPayResult<SyncModel> execute = DaxPayKit.execute(param);
|
||||
System.out.println(execute);
|
||||
System.out.println(execute.getData());
|
||||
|
@@ -127,7 +127,7 @@ bootx:
|
||||
store: jdbc
|
||||
# ip归属地
|
||||
ip2region:
|
||||
# 数据文件路径
|
||||
# 数据文件路径, 下载地址 https://gitee.com/lionsoul/ip2region/blob/master/data/ip2region.xdb
|
||||
file-path: /data/ip2region/ip2region.xdb
|
||||
# 查询方式
|
||||
search-type: cache
|
||||
|
@@ -113,7 +113,7 @@ bootx:
|
||||
store: jdbc
|
||||
# ip归属地
|
||||
ip2region:
|
||||
# 数据文件路径
|
||||
# 数据文件路径, 下载地址 https://gitee.com/lionsoul/ip2region/blob/master/data/ip2region.xdb
|
||||
file-path: /data/ip2region/ip2region.xdb
|
||||
# 查询方式
|
||||
search-type: cache
|
||||
|
@@ -28,7 +28,7 @@ public enum PaySyncStatusEnum {
|
||||
* 所以查询为了区分,增加一个未知的状态, 用于处理这种特殊情况, 然后根据业务需要,关闭订单或者进行其他操作
|
||||
*/
|
||||
NOT_FOUND_UNKNOWN("pay_not_found_unknown","交易不存在(特殊)"),
|
||||
/** 订单到了超时时间, 可以进行手动设置支付超时状态 */
|
||||
/** 订单到了超时时间, 可以手动设置订单为状态 */
|
||||
TIMEOUT("pay_timeout", "支付超时");
|
||||
|
||||
/** 编码 */
|
||||
|
@@ -59,9 +59,9 @@ public class RefundSyncService {
|
||||
// 先获取退款单
|
||||
RefundOrder refundOrder = refundOrderQueryService.findByBizOrRefundNo(param.getRefundNo(), param.getBizRefundNo())
|
||||
.orElseThrow(() -> new PayFailureException("未查询到退款订单"));
|
||||
// 如果订单已经关闭, 直接返回失败
|
||||
// 如果订单已经关闭, 直接返回退款关闭
|
||||
if (Objects.equals(refundOrder.getStatus(), RefundStatusEnum.CLOSE.getCode())){
|
||||
throw new PayFailureException("订单已经关闭,不需要同步");
|
||||
return new SyncResult().setStatus(RefundStatusEnum.CLOSE.getCode());
|
||||
}
|
||||
return this.syncRefundOrder(refundOrder);
|
||||
}
|
||||
|
Reference in New Issue
Block a user