mirror of
https://gitee.com/dromara/dax-pay.git
synced 2025-09-11 14:59:04 +00:00
perf 支付限额名称统一, 去除一些无用配置参数
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
- [ ] DEMO增加转账演示功能
|
||||
- [x] 支付宝微信等消息通知地址支持一键生成
|
||||
- [ ] 管理端界面支持扫码绑定对账接收方功能
|
||||
- [x] 界面金额统一显示为分
|
||||
- [ ] 上下文对象进行优化精简
|
||||
- [x] 请求IP参数增加正则校验
|
||||
- [x] 支付接口公共参数添加随机数字段, 预防重放问题
|
||||
|
@@ -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
|
||||
# 当前环境,会影响订单号的生成
|
||||
|
@@ -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:
|
||||
# 网关地址
|
||||
|
@@ -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";
|
||||
|
||||
|
@@ -48,7 +48,7 @@ public class AliPayConfig extends MpBaseEntity implements EntityBaseFunction<Ali
|
||||
|
||||
/** 支付限额 */
|
||||
@DbColumn(comment = "支付限额", length = 15)
|
||||
private Integer singleLimit;
|
||||
private Integer limitAmount;
|
||||
|
||||
/**
|
||||
* 服务器异步通知页面路径, 需要填写本网关服务的地址, 不可以直接填写业务系统的地址
|
||||
|
@@ -59,7 +59,7 @@ public class AliPayService {
|
||||
throw new PayFailureException("该支付宝支付方式不可用");
|
||||
}
|
||||
// 验证订单金额是否超限
|
||||
if(payParam.getAmount() > alipayConfig.getSingleLimit()){
|
||||
if(payParam.getAmount() > alipayConfig.getLimitAmount()){
|
||||
throw new PayFailureException("支付宝支付金额超过限额");
|
||||
}
|
||||
// 支付参数开启分账, 配置未开启分账
|
||||
|
@@ -44,7 +44,7 @@ public class UnionPayConfig extends MpBaseEntity implements EntityBaseFunction<U
|
||||
|
||||
/** 支付限额 */
|
||||
@DbColumn(comment = "支付限额")
|
||||
private Integer singleLimit;
|
||||
private Integer limitAmount;
|
||||
|
||||
/**
|
||||
* 商户收款账号
|
||||
|
@@ -54,7 +54,7 @@ public class UnionPayService {
|
||||
throw new PayFailureException("该云闪付支付方式不可用");
|
||||
}
|
||||
// 支付金额是否超限
|
||||
if (payParam.getAmount() > unionPayConfig.getSingleLimit()) {
|
||||
if (payParam.getAmount() > unionPayConfig.getLimitAmount()) {
|
||||
throw new PayFailureException("云闪付支付金额超限");
|
||||
}
|
||||
// 分账
|
||||
|
@@ -35,7 +35,7 @@ public class WalletConfig extends MpBaseEntity implements EntityBaseFunction<Wal
|
||||
|
||||
/** 单次支付最多多少金额 */
|
||||
@DbColumn(comment = "单次支付最多多少金额 ")
|
||||
private Integer singleLimit;
|
||||
private Integer limitAmount;
|
||||
|
||||
/** 可用支付方式 */
|
||||
@DbColumn(comment = "可用支付方式")
|
||||
|
@@ -53,7 +53,7 @@ public class WeChatPayConfig extends MpBaseEntity implements EntityBaseFunction<
|
||||
|
||||
/** 支付限额 */
|
||||
@DbColumn(comment = "支付限额")
|
||||
private Integer singleLimit;
|
||||
private Integer limitAmount;
|
||||
|
||||
/**
|
||||
* 服务器异步通知页面路径, 需要填写本网关服务的地址, 不可以直接填写业务系统的地址
|
||||
|
@@ -71,7 +71,7 @@ public class WeChatPayService {
|
||||
throw new PayFailureException("该微信支付方式不可用");
|
||||
}
|
||||
// 支付金额是否超限
|
||||
if (payParam.getAmount() > weChatPayConfig.getSingleLimit()) {
|
||||
if (payParam.getAmount() > weChatPayConfig.getLimitAmount()) {
|
||||
throw new PayFailureException("微信支付金额超限");
|
||||
}
|
||||
// 是否支持分账
|
||||
|
@@ -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("钱包支付金额超过限额");
|
||||
}
|
||||
// 判断余额
|
||||
|
@@ -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;
|
||||
|
@@ -29,7 +29,7 @@ public class UnionPayConfigDto extends BaseDto {
|
||||
private Boolean enable;
|
||||
|
||||
@Schema(description = "支付限额")
|
||||
private Integer singleLimit;
|
||||
private Integer limitAmount;
|
||||
|
||||
/**
|
||||
* 商户收款账号
|
||||
|
@@ -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 = "备注")
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
@@ -26,7 +26,7 @@ public class UnionPayConfigParam {
|
||||
private Boolean enable;
|
||||
|
||||
@Schema(description = "支付限额")
|
||||
private Integer singleLimit;
|
||||
private Integer limitAmount;
|
||||
|
||||
/**
|
||||
* 商户收款账号
|
||||
|
@@ -29,7 +29,7 @@ public class WalletConfigParam {
|
||||
|
||||
/** 单次支付最多少金额 */
|
||||
@Schema(description = "单次支付最多少金额")
|
||||
private Integer singleLimit;
|
||||
private Integer limitAmount;
|
||||
|
||||
/** 备注 */
|
||||
@Schema(description = "备注")
|
||||
|
@@ -33,7 +33,7 @@ public class WeChatPayConfigParam {
|
||||
private Boolean allocation;
|
||||
|
||||
@Schema(description = "支付限额")
|
||||
private Integer singleLimit;
|
||||
private Integer limitAmount;
|
||||
|
||||
@Schema(description = "异步通知地址")
|
||||
private String notifyUrl;
|
||||
|
Reference in New Issue
Block a user