perf 支付限额名称统一, 去除一些无用配置参数

This commit is contained in:
DaxPay
2024-06-14 18:02:08 +08:00
parent 0c046ca65e
commit ed2b1c535b
20 changed files with 18 additions and 31 deletions

View File

@@ -9,6 +9,7 @@
- [ ] DEMO增加转账演示功能
- [x] 支付宝微信等消息通知地址支持一键生成
- [ ] 管理端界面支持扫码绑定对账接收方功能
- [x] 界面金额统一显示为分
- [ ] 上下文对象进行优化精简
- [x] 请求IP参数增加正则校验
- [x] 支付接口公共参数添加随机数字段, 预防重放问题

View File

@@ -160,12 +160,8 @@ dromara:
storage-path: D:/data/files/
# 支付系统配置
dax-pay:
# 服务地址
server-url: http://localhost:9000
# 前端h5地址
# h5访问地址
front-h5-url: http://pay1.bootx.cn/h5/#
# 前端web地址
front-web-url: http://localhost:9000/#
# 机器号码
machine-no: 63
# 当前环境,会影响订单号的生成

View File

@@ -143,12 +143,8 @@ dromara:
storage-path: D:/data/files/
# 支付系统配置
dax-pay:
# 服务地址
server-url: http://pay1.bootx.cn
# 前端h5地址
front-h5-url: http://pay1.bootx.cn/h5/#
# 前端web地址
front-web-url: http://pay1.bootx.cn/#
# 演示模块
demo:
# 网关地址

View File

@@ -14,15 +14,10 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
@Setter
@ConfigurationProperties(prefix = "dax-pay")
public class DaxPayProperties {
/** 服务地址 */
private String serverUrl;
/** 前端地址(h5) */
private String frontH5Url;
/** 前端地址(web) */
private String frontWebUrl;
/** 机器码, 用于区分不同机器生成的流水号 */
private String machineNo = "56";

View File

@@ -48,7 +48,7 @@ public class AliPayConfig extends MpBaseEntity implements EntityBaseFunction<Ali
/** 支付限额 */
@DbColumn(comment = "支付限额", length = 15)
private Integer singleLimit;
private Integer limitAmount;
/**
* 服务器异步通知页面路径, 需要填写本网关服务的地址, 不可以直接填写业务系统的地址

View File

@@ -59,7 +59,7 @@ public class AliPayService {
throw new PayFailureException("该支付宝支付方式不可用");
}
// 验证订单金额是否超限
if(payParam.getAmount() > alipayConfig.getSingleLimit()){
if(payParam.getAmount() > alipayConfig.getLimitAmount()){
throw new PayFailureException("支付宝支付金额超过限额");
}
// 支付参数开启分账, 配置未开启分账

View File

@@ -44,7 +44,7 @@ public class UnionPayConfig extends MpBaseEntity implements EntityBaseFunction<U
/** 支付限额 */
@DbColumn(comment = "支付限额")
private Integer singleLimit;
private Integer limitAmount;
/**
* 商户收款账号

View File

@@ -54,7 +54,7 @@ public class UnionPayService {
throw new PayFailureException("该云闪付支付方式不可用");
}
// 支付金额是否超限
if (payParam.getAmount() > unionPayConfig.getSingleLimit()) {
if (payParam.getAmount() > unionPayConfig.getLimitAmount()) {
throw new PayFailureException("云闪付支付金额超限");
}
// 分账

View File

@@ -35,7 +35,7 @@ public class WalletConfig extends MpBaseEntity implements EntityBaseFunction<Wal
/** 单次支付最多多少金额 */
@DbColumn(comment = "单次支付最多多少金额 ")
private Integer singleLimit;
private Integer limitAmount;
/** 可用支付方式 */
@DbColumn(comment = "可用支付方式")

View File

@@ -53,7 +53,7 @@ public class WeChatPayConfig extends MpBaseEntity implements EntityBaseFunction<
/** 支付限额 */
@DbColumn(comment = "支付限额")
private Integer singleLimit;
private Integer limitAmount;
/**
* 服务器异步通知页面路径, 需要填写本网关服务的地址, 不可以直接填写业务系统的地址

View File

@@ -71,7 +71,7 @@ public class WeChatPayService {
throw new PayFailureException("该微信支付方式不可用");
}
// 支付金额是否超限
if (payParam.getAmount() > weChatPayConfig.getSingleLimit()) {
if (payParam.getAmount() > weChatPayConfig.getLimitAmount()) {
throw new PayFailureException("微信支付金额超限");
}
// 是否支持分账

View File

@@ -76,7 +76,7 @@ public class WalletPayStrategy extends AbsPayStrategy {
throw new WalletBannedException();
}
// 判断是否超过限额
if (this.getPayParam().getAmount() > walletConfig.getSingleLimit()){
if (this.getPayParam().getAmount() > walletConfig.getLimitAmount()){
throw new PayFailureException("钱包支付金额超过限额");
}
// 判断余额

View File

@@ -33,7 +33,7 @@ public class AliPayConfigDto extends BaseDto implements Serializable {
private Boolean allocation;
@Schema(description = "支付限额")
private Integer singleLimit;
private Integer limitAmount;
@Schema(description = "服务器异步通知页面路径 需http://或者https://格式的完整路径,不能加?id=123这类自定义参数必须外网可以正常访问")
private String notifyUrl;

View File

@@ -29,7 +29,7 @@ public class UnionPayConfigDto extends BaseDto {
private Boolean enable;
@Schema(description = "支付限额")
private Integer singleLimit;
private Integer limitAmount;
/**
* 商户收款账号

View File

@@ -1,7 +1,6 @@
package cn.daxpay.single.service.dto.channel.wallet;
import cn.bootx.platform.common.core.rest.dto.BaseDto;
import cn.bootx.table.modify.annotation.DbColumn;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -30,7 +29,7 @@ public class WalletConfigDto extends BaseDto {
/** 单次支持支持多少钱 */
@Schema(description = "单次支持支持多少钱")
private Integer singleLimit;
private Integer limitAmount;
/** 备注 */
@Schema(description = "备注")

View File

@@ -35,7 +35,7 @@ public class WeChatPayConfigDto extends BaseDto implements Serializable {
private Boolean allocation;
@Schema(description = "支付限额")
private Integer singleLimit;
private Integer limitAmount;
@Schema(description = "异步通知地址")
private String notifyUrl;

View File

@@ -25,7 +25,7 @@ public class AliPayConfigParam {
private Boolean allocation;
@Schema(description = "支付限额")
private Integer singleLimit;
private Integer limitAmount;
@Schema(description = "服务器异步通知页面路径 需http://或者https://格式的完整路径,不能加?id=123这类自定义参数必须外网可以正常访问")
private String notifyUrl;

View File

@@ -26,7 +26,7 @@ public class UnionPayConfigParam {
private Boolean enable;
@Schema(description = "支付限额")
private Integer singleLimit;
private Integer limitAmount;
/**
* 商户收款账号

View File

@@ -29,7 +29,7 @@ public class WalletConfigParam {
/** 单次支付最多少金额 */
@Schema(description = "单次支付最多少金额")
private Integer singleLimit;
private Integer limitAmount;
/** 备注 */
@Schema(description = "备注")

View File

@@ -33,7 +33,7 @@ public class WeChatPayConfigParam {
private Boolean allocation;
@Schema(description = "支付限额")
private Integer singleLimit;
private Integer limitAmount;
@Schema(description = "异步通知地址")
private String notifyUrl;