fix demo参数校验调整, 支付配置中包装类属性防止空指针处理

This commit is contained in:
DaxPay
2024-05-15 13:22:09 +08:00
parent fc88ae56d4
commit 2572e08522
5 changed files with 21 additions and 2 deletions

View File

@@ -22,7 +22,7 @@
## 🍈项目介绍
> DaxPay是一套开源支付网关系统已经对接支付宝、微信支付相关的接口。可以独立部署提供接口供业务系统进行调用不对原有系统产生影响
> DaxPay是一套开源支付网关系统已经对接支付宝、微信支付、云闪付相关的接口。可以独立部署,提供接口供业务系统进行调用,不对原有系统产生影响
## 🧭 特色功能
- 封装各类支付通道的接口为统一的接口,方便业务系统进行调用,简化对接多种支付方式的复杂度

View File

@@ -23,7 +23,6 @@ public class CashierSimplePayParam {
private String bizOrderNo;
@Schema(description = "是否分账")
@NotNull(message = "分账是否启用必输")
private Boolean allocation;

View File

@@ -59,6 +59,7 @@ public class AggregateService {
.setTitle(param.getTitle())
.setBizOrderNo(param.getBizOrderNo())
.setAllocation(param.getAllocation())
.setAutoAllocation(param.getAutoAllocation())
.setAmount(amount);
String code = IdUtil.getSnowflakeNextIdStr();
String serverUrl = daxPayDemoProperties.getServerUrl();

View File

@@ -19,6 +19,7 @@ import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.util.List;
import java.util.Objects;
/**
* 支付宝支付配置
@@ -138,6 +139,14 @@ public class AliPayConfig extends MpBaseEntity implements EntityBaseFunction<Ali
@DbColumn(comment = "备注")
private String remark;
public Boolean getAllocation() {
return Objects.equals(allocation,true);
}
public Boolean getEnable() {
return Objects.equals(enable,true);
}
@Override
public AliPayConfigDto toDto() {
return AlipayConvert.CONVERT.convert(this);

View File

@@ -20,6 +20,7 @@ import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.util.List;
import java.util.Objects;
/**
* 微信支付配置
@@ -117,6 +118,15 @@ public class WeChatPayConfig extends MpBaseEntity implements EntityBaseFunction<
@DbColumn(comment = "备注")
private String remark;
public Boolean getAllocation() {
return Objects.equals(allocation,true);
}
public Boolean getEnable() {
return Objects.equals(enable,true);
}
@Override
public WeChatPayConfigDto toDto() {
return WeChatConvert.CONVERT.convert(this);