mirror of
https://gitee.com/dromara/dax-pay
synced 2026-08-05 21:05:52 +08:00
ref 删除无用类和调整部分字段名称
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
- [ ] 前端增加对应的枚举
|
||||
- [ ] 优化自动分账逻辑
|
||||
- [ ] 前端查询条件适配
|
||||
- [ ] paymentId替换
|
||||
|
||||
2.0.7: 分账完善和基础架构优化
|
||||
- [ ] 资金流水优化
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
package cn.bootx.platform.daxpay.service.core.channel.alipay.convert;
|
||||
|
||||
import cn.bootx.platform.daxpay.service.core.channel.alipay.entity.AliPayConfig;
|
||||
import cn.bootx.platform.daxpay.service.core.payment.reconcile.domain.GeneralReconcileRecord;
|
||||
import cn.bootx.platform.daxpay.service.dto.channel.alipay.AliPayConfigDto;
|
||||
import cn.bootx.platform.daxpay.service.dto.channel.alipay.AliPayRecordDto;
|
||||
import cn.bootx.platform.daxpay.service.param.channel.alipay.AliPayConfigParam;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
@@ -3,11 +3,9 @@ package cn.bootx.platform.daxpay.service.core.channel.wallet.convert;
|
||||
import cn.bootx.platform.daxpay.service.core.channel.wallet.entity.Wallet;
|
||||
import cn.bootx.platform.daxpay.service.core.channel.wallet.entity.WalletConfig;
|
||||
import cn.bootx.platform.daxpay.service.core.channel.wallet.entity.WalletRecord;
|
||||
import cn.bootx.platform.daxpay.service.core.channel.wechat.entity.WeChatPayRecord;
|
||||
import cn.bootx.platform.daxpay.service.dto.channel.wallet.WalletConfigDto;
|
||||
import cn.bootx.platform.daxpay.service.dto.channel.wallet.WalletDto;
|
||||
import cn.bootx.platform.daxpay.service.dto.channel.wallet.WalletRecordDto;
|
||||
import cn.bootx.platform.daxpay.service.dto.channel.wechat.WeChatPayRecordDto;
|
||||
import cn.bootx.platform.daxpay.service.param.channel.wechat.WalletConfigParam;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package cn.bootx.platform.daxpay.service.core.channel.wechat.convert;
|
||||
|
||||
import cn.bootx.platform.daxpay.service.core.channel.wechat.entity.WeChatPayConfig;
|
||||
import cn.bootx.platform.daxpay.service.core.channel.wechat.entity.WeChatPayRecord;
|
||||
import cn.bootx.platform.daxpay.service.core.payment.reconcile.domain.GeneralReconcileRecord;
|
||||
import cn.bootx.platform.daxpay.service.dto.channel.wechat.WeChatPayConfigDto;
|
||||
import cn.bootx.platform.daxpay.service.dto.channel.wechat.WeChatPayRecordDto;
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
package cn.bootx.platform.daxpay.service.core.channel.wechat.dao;
|
||||
|
||||
import cn.bootx.platform.common.core.rest.param.PageParam;
|
||||
import cn.bootx.platform.common.mybatisplus.impl.BaseManager;
|
||||
import cn.bootx.platform.common.mybatisplus.util.MpUtil;
|
||||
import cn.bootx.platform.common.query.generator.QueryGenerator;
|
||||
import cn.bootx.platform.daxpay.service.core.channel.wechat.entity.WeChatPayRecord;
|
||||
import cn.bootx.platform.daxpay.service.param.channel.wechat.WeChatPayRecordQuery;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author xxm
|
||||
* @since 2024/2/19
|
||||
*/
|
||||
@Slf4j
|
||||
@Repository
|
||||
@RequiredArgsConstructor
|
||||
public class WeChatPayRecordManager extends BaseManager<WeChatPayRecordMapper, WeChatPayRecord> {
|
||||
|
||||
/**
|
||||
* 分页
|
||||
*/
|
||||
public Page<WeChatPayRecord> page(PageParam pageParam, WeChatPayRecordQuery param){
|
||||
Page<WeChatPayRecord> mpPage = MpUtil.getMpPage(pageParam, WeChatPayRecord.class);
|
||||
QueryWrapper<WeChatPayRecord> generator = QueryGenerator.generator(param);
|
||||
return this.page(mpPage, generator);
|
||||
}
|
||||
|
||||
/**
|
||||
* 按时间范围查询
|
||||
*/
|
||||
public List<WeChatPayRecord> findByDate(LocalDateTime start, LocalDateTime end) {
|
||||
return this.lambdaQuery()
|
||||
.between(WeChatPayRecord::getGatewayTime, start, end)
|
||||
.list();
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
package cn.bootx.platform.daxpay.service.core.channel.wechat.dao;
|
||||
|
||||
import cn.bootx.platform.daxpay.service.core.channel.wechat.entity.WeChatPayRecord;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author xxm
|
||||
* @since 2024/2/19
|
||||
*/
|
||||
@Mapper
|
||||
public interface WeChatPayRecordMapper extends BaseMapper<WeChatPayRecord> {
|
||||
}
|
||||
@@ -1,60 +0,0 @@
|
||||
package cn.bootx.platform.daxpay.service.core.channel.wechat.entity;
|
||||
|
||||
import cn.bootx.platform.common.core.function.EntityBaseFunction;
|
||||
import cn.bootx.platform.common.mybatisplus.base.MpCreateEntity;
|
||||
import cn.bootx.platform.daxpay.service.code.TradeFlowRecordTypeEnum;
|
||||
import cn.bootx.platform.daxpay.service.core.channel.wechat.convert.WeChatConvert;
|
||||
import cn.bootx.platform.daxpay.service.dto.channel.wechat.WeChatPayRecordDto;
|
||||
import cn.bootx.table.modify.annotation.DbColumn;
|
||||
import cn.bootx.table.modify.annotation.DbTable;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 微信支付记录
|
||||
* @author xxm
|
||||
* @since 2024/2/19
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@DbTable(comment = "微信支付记录")
|
||||
@Accessors(chain = true)
|
||||
@TableName("pay_wechat_pay_record")
|
||||
public class WeChatPayRecord extends MpCreateEntity implements EntityBaseFunction<WeChatPayRecordDto> {
|
||||
|
||||
/** 标题 */
|
||||
@DbColumn(comment = "标题")
|
||||
private String title;
|
||||
|
||||
/** 金额 */
|
||||
@DbColumn(comment = "金额")
|
||||
private Integer amount;
|
||||
|
||||
/**
|
||||
* 业务类型
|
||||
* @see TradeFlowRecordTypeEnum
|
||||
*/
|
||||
@DbColumn(comment = "业务类型")
|
||||
private String type;
|
||||
|
||||
/** 本地订单号 */
|
||||
@DbColumn(comment = "本地订单号")
|
||||
private Long orderId;
|
||||
|
||||
/** 网关订单号 */
|
||||
@DbColumn(comment = "网关订单号")
|
||||
private String gatewayOrderNo;
|
||||
|
||||
/** 网关完成时间 */
|
||||
@DbColumn(comment = "网关完成时间")
|
||||
private LocalDateTime gatewayTime;
|
||||
|
||||
@Override
|
||||
public WeChatPayRecordDto toDto() {
|
||||
return WeChatConvert.CONVERT.convert(this);
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,6 @@ import cn.bootx.platform.daxpay.code.ReconcileTradeEnum;
|
||||
import cn.bootx.platform.daxpay.exception.pay.PayFailureException;
|
||||
import cn.bootx.platform.daxpay.service.code.WeChatPayCode;
|
||||
import cn.bootx.platform.daxpay.service.common.local.PaymentContextLocal;
|
||||
import cn.bootx.platform.daxpay.service.core.channel.wechat.dao.WeChatPayRecordManager;
|
||||
import cn.bootx.platform.daxpay.service.core.channel.wechat.dao.WxReconcileBillDetailManager;
|
||||
import cn.bootx.platform.daxpay.service.core.channel.wechat.dao.WxReconcileBillTotalManger;
|
||||
import cn.bootx.platform.daxpay.service.core.channel.wechat.entity.WeChatPayConfig;
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
package cn.bootx.platform.daxpay.service.dto.channel.alipay;
|
||||
|
||||
import cn.bootx.platform.common.core.rest.dto.BaseDto;
|
||||
import cn.bootx.platform.daxpay.service.code.AliPayRecordTypeEnum;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 微信支付记录
|
||||
* @author xxm
|
||||
* @since 2024/2/20
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@Schema(title = "微信支付记录")
|
||||
public class AliPayRecordDto extends BaseDto {
|
||||
|
||||
/** 标题 */
|
||||
@Schema(description = "标题")
|
||||
private String title;
|
||||
|
||||
/** 金额 */
|
||||
@Schema(description = "金额")
|
||||
private Integer amount;
|
||||
|
||||
/**
|
||||
* 业务类型
|
||||
* @see AliPayRecordTypeEnum
|
||||
*/
|
||||
@Schema(description = "业务类型")
|
||||
private String type;
|
||||
|
||||
/** 本地订单号 */
|
||||
@Schema(description = "本地订单号")
|
||||
private Long orderId;
|
||||
|
||||
/** 网关订单号 */
|
||||
@Schema(description = "网关订单号")
|
||||
private String gatewayOrderNo;
|
||||
|
||||
/** 网关完成时间 */
|
||||
@Schema(description = "网关完成时间")
|
||||
private LocalDateTime gatewayTime;
|
||||
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
package cn.bootx.platform.daxpay.service.dto.channel.union;
|
||||
|
||||
import cn.bootx.platform.common.core.rest.dto.BaseDto;
|
||||
import cn.bootx.platform.daxpay.service.code.UnionPayRecordTypeEnum;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 云闪付流水记录
|
||||
* @author xxm
|
||||
* @since 2024/3/7
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@Schema(title = "云闪付流水记录")
|
||||
public class UnionPayRecordDto extends BaseDto {
|
||||
|
||||
/** 标题 */
|
||||
@Schema(description = "标题")
|
||||
private String title;
|
||||
|
||||
/** 金额 */
|
||||
@Schema(description = "金额")
|
||||
private Integer amount;
|
||||
|
||||
/**
|
||||
* 业务类型
|
||||
* @see UnionPayRecordTypeEnum
|
||||
*/
|
||||
@Schema(description = "业务类型")
|
||||
private String type;
|
||||
|
||||
/** 本地订单号 */
|
||||
@Schema(description = "本地订单号")
|
||||
private Long orderId;
|
||||
|
||||
/** 网关订单号 */
|
||||
@Schema(description = "网关订单号")
|
||||
private String gatewayOrderNo;
|
||||
|
||||
/** 网关完成时间 */
|
||||
@Schema(description = "网关完成时间")
|
||||
private LocalDateTime gatewayTime;
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
package cn.bootx.platform.daxpay.service.param.channel.alipay;
|
||||
|
||||
import cn.bootx.platform.common.core.annotation.QueryParam;
|
||||
import cn.bootx.platform.common.core.rest.param.QueryOrder;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 支付宝支付记录查询参数
|
||||
* @author xxm
|
||||
* @since 2024/2/20
|
||||
*/
|
||||
@QueryParam
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@Schema(title = "支付宝支付记录查询参数")
|
||||
public class AliPayRecordQuery extends QueryOrder {
|
||||
|
||||
@QueryParam(type = QueryParam.CompareTypeEnum.LIKE)
|
||||
@Schema(description = "标题")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "类型")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "本地订单ID")
|
||||
private Long orderId;
|
||||
|
||||
@Schema(description = "网关订单号")
|
||||
private String gatewayOrderNo;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
package cn.bootx.platform.daxpay.service.param.channel.union;
|
||||
|
||||
import cn.bootx.platform.common.core.annotation.QueryParam;
|
||||
import cn.bootx.platform.common.core.rest.param.QueryOrder;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 云闪付流水查询参数
|
||||
* @author xxm
|
||||
* @since 2024/3/7
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@Schema(title = "云闪付流水查询参数")
|
||||
public class UnionPayRecordQuery extends QueryOrder {
|
||||
|
||||
@QueryParam(type = QueryParam.CompareTypeEnum.LIKE)
|
||||
@Schema(description = "标题")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "类型")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "本地订单ID")
|
||||
private Long orderId;
|
||||
|
||||
@Schema(description = "网关订单号")
|
||||
private String gatewayOrderNo;
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
package cn.bootx.platform.daxpay.service.param.channel.wechat;
|
||||
|
||||
import cn.bootx.platform.common.core.annotation.QueryParam;
|
||||
import cn.bootx.platform.common.core.rest.param.QueryOrder;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 微信支付记录查询参数
|
||||
* @author xxm
|
||||
* @since 2024/2/20
|
||||
*/
|
||||
@QueryParam
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@Schema(title = "微信支付记录查询参数")
|
||||
public class WeChatPayRecordQuery extends QueryOrder {
|
||||
|
||||
@QueryParam(type = QueryParam.CompareTypeEnum.LIKE)
|
||||
@Schema(description = "标题")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "类型")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "本地订单ID")
|
||||
private Long orderId;
|
||||
|
||||
@Schema(description = "网关订单号")
|
||||
private String gatewayOrderNo;
|
||||
|
||||
|
||||
}
|
||||
@@ -26,6 +26,7 @@ public class PayOrderQuery extends QueryOrder {
|
||||
@Schema(description = "商户订单号")
|
||||
private String bizOrderNo;
|
||||
|
||||
/** 支付订单号 */
|
||||
@Schema(description = "支付订单号")
|
||||
private String orderNo;
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ package cn.bootx.platform.daxpay.service.param.order;
|
||||
|
||||
import cn.bootx.platform.common.core.annotation.QueryParam;
|
||||
import cn.bootx.platform.common.core.rest.param.QueryOrder;
|
||||
import cn.bootx.platform.daxpay.code.PayChannelEnum;
|
||||
import cn.bootx.platform.daxpay.code.RefundStatusEnum;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
@@ -20,29 +21,46 @@ import lombok.experimental.Accessors;
|
||||
@Schema(title = "支付退款查询参数")
|
||||
public class RefundOrderQuery extends QueryOrder {
|
||||
|
||||
@Schema(description = "退款Id")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "退款号")
|
||||
private String refundNo;
|
||||
|
||||
@Schema(description = "支付ID")
|
||||
private Long paymentId;
|
||||
@Schema(description = "商户退款号")
|
||||
private String bizRefundNo;
|
||||
|
||||
@Schema(description = "关联的业务号")
|
||||
@QueryParam(type = QueryParam.CompareTypeEnum.LIKE)
|
||||
private String businessNo;
|
||||
/** 三方支付系统退款交易号 */
|
||||
@Schema(description = "三方支付系统退款交易号")
|
||||
private String outRefundNo;
|
||||
|
||||
@Schema(description = "支付网关订单号")
|
||||
private String gatewayOrderNo;
|
||||
/** 支付订单ID */
|
||||
@Schema(description = "支付订单ID")
|
||||
private Long orderId;
|
||||
|
||||
@Schema(description = "标题")
|
||||
@QueryParam(type = QueryParam.CompareTypeEnum.LIKE)
|
||||
/** 支付订单号 */
|
||||
@Schema(description = "支付订单号")
|
||||
private String orderNo;
|
||||
|
||||
/** 商户支付订单号 */
|
||||
@Schema(description = "商户支付订单号")
|
||||
private String bizOrderNo;
|
||||
|
||||
/** 支付标题 */
|
||||
@Schema(description = "支付标题")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 退款通道
|
||||
* @see PayChannelEnum
|
||||
*/
|
||||
@Schema(description = "支付通道")
|
||||
private String channel;
|
||||
|
||||
/**
|
||||
* @see RefundStatusEnum
|
||||
*/
|
||||
@Schema(description = "退款状态")
|
||||
private String status;
|
||||
|
||||
/** 错误码 */
|
||||
@Schema(description = "错误码")
|
||||
private String errorCode;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user