ok() {
22 | return new DaxResult<>(SUCCESS_CODE, SUCCESS_MSG);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/DaxpayPayServiceApp.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service;
2 |
3 | import org.apache.ibatis.annotations.Mapper;
4 | import org.mybatis.spring.annotation.MapperScan;
5 | import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
6 | import org.springframework.context.annotation.ComponentScan;
7 |
8 | /**
9 | * 支付业务实现层
10 | * @author xxm
11 | * @since 2024/5/23
12 | */
13 | @ConfigurationPropertiesScan
14 | @MapperScan(annotationClass = Mapper.class)
15 | @ComponentScan
16 | public class DaxpayPayServiceApp {
17 | }
18 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/bo/allocation/AllocSyncResultBo.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.bo.allocation;
2 |
3 | import lombok.Data;
4 | import lombok.experimental.Accessors;
5 |
6 | /**
7 | * 分账同步结果
8 | * @author xxm
9 | * @since 2024/5/23
10 | */
11 | @Data
12 | @Accessors(chain = true)
13 | public class AllocSyncResultBo {
14 | /** 同步时网关返回的对象, 序列化为json字符串 */
15 | private String syncInfo;
16 | }
17 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/bo/trade/PayResultBo.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.bo.trade;
2 |
3 | import lombok.Data;
4 | import lombok.experimental.Accessors;
5 |
6 | import java.time.LocalDateTime;
7 |
8 | /**
9 | * 支付结果业务类
10 | * @author xxm
11 | * @since 2024/7/23
12 | */
13 | @Data
14 | @Accessors(chain = true)
15 | public class PayResultBo {
16 |
17 | /**
18 | * 第三方支付网关生成的订单号, 用与将记录关联起来
19 | * 1. 如付款码支付直接成功时会出现
20 | * 2. 部分通道创建订单是会直接返回
21 | */
22 | private String outOrderNo;
23 |
24 | /** 是否支付完成 */
25 | private boolean complete;
26 |
27 | /** 完成时间 */
28 | private LocalDateTime finishTime;
29 |
30 | /** 支付参数体(通常用于发起支付的参数) */
31 | private String payBody;
32 | }
33 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/bo/trade/RefundResultBo.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.bo.trade;
2 |
3 | import org.dromara.daxpay.core.enums.RefundStatusEnum;
4 | import lombok.Data;
5 | import lombok.experimental.Accessors;
6 |
7 | import java.time.LocalDateTime;
8 |
9 | /**
10 | * 退款结果业务类
11 | * @author xxm
12 | * @since 2024/7/23
13 | */
14 | @Data
15 | @Accessors(chain = true)
16 | public class RefundResultBo {
17 | /**
18 | * 第三方支付网关生成的退款订单号, 用与将记录关联起来
19 | */
20 | private String outRefundNo;
21 |
22 | /**
23 | * 退款状态
24 | */
25 | private RefundStatusEnum status;
26 |
27 | /** 退款完成时间 */
28 | private LocalDateTime finishTime;
29 | }
30 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/bo/trade/TransferResultBo.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.bo.trade;
2 |
3 | import org.dromara.daxpay.core.enums.TransferStatusEnum;
4 | import lombok.Data;
5 | import lombok.experimental.Accessors;
6 |
7 | import java.time.LocalDateTime;
8 |
9 | /**
10 | * 转账结果业务类
11 | * @author xxm
12 | * @since 2024/7/23
13 | */
14 | @Data
15 | @Accessors(chain = true)
16 | public class TransferResultBo {
17 | /** 通道转账订单号 */
18 | private String outTransferNo;
19 |
20 | /** 状态 */
21 | private TransferStatusEnum status = TransferStatusEnum.PROGRESS;
22 |
23 | /** 完成时间 */
24 | private LocalDateTime finishTime;
25 | }
26 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/common/anno/PaymentVerify.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.common.anno;
2 |
3 | import java.lang.annotation.*;
4 |
5 | /**
6 | * 支付校验校验标识
7 | * 入参出参要求:
8 | *
9 | * 1. 方法至少有一个参数,并且需要签名的参数放在第一位, 并为PaymentCommonParam的子类
10 | * 2. 返回对象必须为 DaxResult 格式
11 | *
12 | *
13 | * 注解实现的功能(按先后顺序):
14 | * 1. 参数校验
15 | * 2. 商户和应用信息初始化
16 | * 3. 终端信息初始化
17 | * 4. 参数签名校验
18 | * 5. 参数请求时间校验
19 | *
20 | *
21 | * @author xxm
22 | * @since 2023/12/22
23 | */
24 | @Target({ ElementType.METHOD, ElementType.TYPE })
25 | @Retention(RetentionPolicy.RUNTIME)
26 | @Documented
27 | @Inherited
28 | public @interface PaymentVerify {
29 | }
30 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/convert/allocation/AllocConfigConvert.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.convert.allocation;
2 |
3 | import org.dromara.daxpay.service.entity.allocation.AllocConfig;
4 | import org.dromara.daxpay.service.param.allocation.AllocConfigParam;
5 | import org.dromara.daxpay.service.result.allocation.AllocConfigResult;
6 | import org.mapstruct.Mapper;
7 | import org.mapstruct.factory.Mappers;
8 |
9 | /**
10 | * 分账配置
11 | * @author xxm
12 | * @since 2024/12/9
13 | */
14 | @Mapper
15 | public interface AllocConfigConvert {
16 |
17 | AllocConfigConvert CONVERT = Mappers.getMapper(AllocConfigConvert.class);
18 |
19 | AllocConfigResult toResult(AllocConfig in);
20 |
21 | AllocConfig toEntity(AllocConfigParam in);
22 | }
23 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/convert/allocation/AllocGroupConvert.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.convert.allocation;
2 |
3 | import org.dromara.daxpay.service.entity.allocation.receiver.AllocGroup;
4 | import org.dromara.daxpay.service.param.allocation.group.AllocGroupParam;
5 | import org.dromara.daxpay.service.result.allocation.receiver.AllocGroupVo;
6 | import org.mapstruct.Mapper;
7 | import org.mapstruct.factory.Mappers;
8 |
9 | /**
10 | *
11 | * @author xxm
12 | * @since 2024/4/1
13 | */
14 | @Mapper
15 | public interface AllocGroupConvert {
16 | AllocGroupConvert CONVERT = Mappers.getMapper(AllocGroupConvert.class);
17 |
18 | AllocGroupVo toVo(AllocGroup in);
19 |
20 | AllocGroup toEntity(AllocGroupParam in);
21 | }
22 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/convert/assist/TerminalDeviceConvert.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.convert.assist;
2 |
3 | import org.dromara.daxpay.service.entity.assist.TerminalDevice;
4 | import org.dromara.daxpay.service.param.termina.TerminalDeviceParam;
5 | import org.dromara.daxpay.service.result.termina.TerminalDeviceResult;
6 | import org.mapstruct.Mapper;
7 | import org.mapstruct.factory.Mappers;
8 |
9 | /**
10 | * 支付终端设备转换
11 | * @author xxm
12 | * @since 2025/3/8
13 | */
14 | @Mapper
15 | public interface TerminalDeviceConvert {
16 | TerminalDeviceConvert CONVERT = Mappers.getMapper(TerminalDeviceConvert.class);
17 |
18 | TerminalDeviceResult toResult(TerminalDevice entity);
19 |
20 | TerminalDevice toEntity(TerminalDeviceParam param);
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/convert/config/ChannelConfigConvert.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.convert.config;
2 |
3 | import org.dromara.daxpay.service.entity.config.ChannelConfig;
4 | import org.dromara.daxpay.service.result.config.ChannelConfigResult;
5 | import org.mapstruct.Mapper;
6 | import org.mapstruct.factory.Mappers;
7 |
8 | /**
9 | * 通道配置
10 | * @author xxm
11 | * @since 2024/6/25
12 | */
13 | @Mapper
14 | public interface ChannelConfigConvert {
15 | ChannelConfigConvert INSTANCE = Mappers.getMapper(ChannelConfigConvert.class);
16 |
17 | ChannelConfigResult toResult(ChannelConfig in);
18 | }
19 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/convert/config/PlatformConfigConvert.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.convert.config;
2 |
3 | import org.dromara.daxpay.service.entity.config.PlatformConfig;
4 | import org.dromara.daxpay.service.result.config.PlatformConfigResult;
5 | import org.mapstruct.Mapper;
6 | import org.mapstruct.factory.Mappers;
7 |
8 | /**
9 | *
10 | * @author xxm
11 | * @since 2024/9/19
12 | */
13 | @Mapper
14 | public interface PlatformConfigConvert {
15 | PlatformConfigConvert CONVERT = Mappers.getMapper(PlatformConfigConvert.class);
16 |
17 | PlatformConfigResult toResult(PlatformConfig entity);
18 | }
19 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/convert/constant/ApiConstConvert.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.convert.constant;
2 |
3 | import org.dromara.daxpay.service.entity.constant.ApiConst;
4 | import org.dromara.daxpay.service.result.constant.ApiConstResult;
5 | import org.mapstruct.Mapper;
6 | import org.mapstruct.factory.Mappers;
7 |
8 | /**
9 | *
10 | * @author xxm
11 | * @since 2024/7/14
12 | */
13 | @Mapper
14 | public interface ApiConstConvert {
15 | ApiConstConvert CONVERT = Mappers.getMapper(ApiConstConvert.class);
16 |
17 | ApiConstResult toResult(ApiConst source);
18 | }
19 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/convert/constant/ChannelConstConvert.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.convert.constant;
2 |
3 | import org.dromara.daxpay.service.entity.constant.ChannelConst;
4 | import org.dromara.daxpay.service.result.constant.ChannelConstResult;
5 | import org.mapstruct.Mapper;
6 | import org.mapstruct.factory.Mappers;
7 |
8 | /**
9 | *
10 | * @author xxm
11 | * @since 2024/7/14
12 | */
13 | @Mapper
14 | public interface ChannelConstConvert {
15 | ChannelConstConvert CONVERT = Mappers.getMapper(ChannelConstConvert.class);
16 |
17 | ChannelConstResult toResult(ChannelConst source);
18 | }
19 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/convert/constant/MerchantNotifyConstConvert.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.convert.constant;
2 |
3 | import org.dromara.daxpay.service.entity.constant.MerchantNotifyConst;
4 | import org.dromara.daxpay.service.result.constant.MerchantNotifyConstResult;
5 | import org.mapstruct.Mapper;
6 | import org.mapstruct.factory.Mappers;
7 |
8 | /**
9 | *
10 | * @author xxm
11 | * @since 2024/8/5
12 | */
13 | @Mapper
14 | public interface MerchantNotifyConstConvert {
15 | MerchantNotifyConstConvert CONVERT = Mappers.getMapper(MerchantNotifyConstConvert.class);
16 |
17 | MerchantNotifyConstResult toResult(MerchantNotifyConst model);
18 | }
19 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/convert/constant/MethodConstConvert.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.convert.constant;
2 |
3 | import org.dromara.daxpay.service.entity.constant.PayMethodConst;
4 | import org.dromara.daxpay.service.result.constant.PayMethodConstResult;
5 | import org.mapstruct.Mapper;
6 | import org.mapstruct.factory.Mappers;
7 |
8 | /**
9 | *
10 | * @author xxm
11 | * @since 2024/7/14
12 | */
13 | @Mapper
14 | public interface MethodConstConvert {
15 | MethodConstConvert CONVERT = Mappers.getMapper(MethodConstConvert.class);
16 |
17 | PayMethodConstResult toResult(PayMethodConst source);
18 | }
19 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/convert/merchant/MchAppConvert.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.convert.merchant;
2 |
3 | import org.dromara.daxpay.service.entity.merchant.MchApp;
4 | import org.dromara.daxpay.service.param.merchant.MchAppParam;
5 | import org.dromara.daxpay.service.result.merchant.MchAppResult;
6 | import org.mapstruct.Mapper;
7 | import org.mapstruct.factory.Mappers;
8 |
9 | /**
10 | *
11 | * @author xxm
12 | * @since 2024/6/24
13 | */
14 | @Mapper
15 | public interface MchAppConvert {
16 | MchAppConvert CONVERT = Mappers.getMapper(MchAppConvert.class);
17 |
18 | MchAppResult toResult(MchApp entity);
19 |
20 | MchApp toEntity(MchAppParam param);
21 | }
22 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/convert/order/pay/PayOrderConvert.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.convert.order.pay;
2 |
3 | import org.dromara.daxpay.core.result.trade.pay.PayOrderResult;
4 | import org.dromara.daxpay.service.entity.order.pay.PayOrder;
5 | import org.dromara.daxpay.service.result.order.pay.PayOrderVo;
6 | import org.mapstruct.Mapper;
7 | import org.mapstruct.factory.Mappers;
8 |
9 | /**
10 | * 支付订单
11 | * @author xxm
12 | * @since 2024/6/27
13 | */
14 | @Mapper
15 | public interface PayOrderConvert {
16 | PayOrderConvert CONVERT = Mappers.getMapper(PayOrderConvert.class);
17 |
18 | PayOrderVo toVo(PayOrder payOrder);
19 |
20 | PayOrderResult toResult(PayOrder payOrder);
21 | }
22 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/convert/order/refund/RefundOrderConvert.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.convert.order.refund;
2 |
3 | import org.dromara.daxpay.core.result.trade.refund.RefundOrderResult;
4 | import org.dromara.daxpay.service.entity.order.refund.RefundOrder;
5 | import org.dromara.daxpay.service.result.order.refund.RefundOrderVo;
6 | import org.mapstruct.Mapper;
7 | import org.mapstruct.factory.Mappers;
8 |
9 | /**
10 | * @author xxm
11 | * @since 2022/3/2
12 | */
13 | @Mapper
14 | public interface RefundOrderConvert {
15 |
16 | RefundOrderConvert CONVERT = Mappers.getMapper(RefundOrderConvert.class);
17 |
18 | RefundOrderVo toVo(RefundOrder in);
19 |
20 | RefundOrderResult toResult(RefundOrder in);
21 | }
22 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/convert/order/transfer/TransferOrderConvert.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.convert.order.transfer;
2 |
3 | import org.dromara.daxpay.core.result.trade.transfer.TransferOrderResult;
4 | import org.dromara.daxpay.service.entity.order.transfer.TransferOrder;
5 | import org.dromara.daxpay.service.result.order.transfer.TransferOrderVo;
6 | import org.mapstruct.Mapper;
7 | import org.mapstruct.factory.Mappers;
8 |
9 | /**
10 | *
11 | * @author xxm
12 | * @since 2024/7/20
13 | */
14 | @Mapper
15 | public interface TransferOrderConvert {
16 | TransferOrderConvert CONVERT = Mappers.getMapper(TransferOrderConvert.class);
17 |
18 | TransferOrderVo toVo(TransferOrder in);
19 |
20 | TransferOrderResult toResult(TransferOrder in);
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/convert/record/PayCloseRecordConvert.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.convert.record;
2 |
3 | import org.dromara.daxpay.service.entity.record.close.PayCloseRecord;
4 | import org.dromara.daxpay.service.result.record.close.PayCloseRecordResult;
5 | import org.mapstruct.Mapper;
6 | import org.mapstruct.factory.Mappers;
7 |
8 | /**
9 | *
10 | * @author xxm
11 | * @since 2024/1/4
12 | */
13 | @Mapper
14 | public interface PayCloseRecordConvert {
15 | PayCloseRecordConvert CONVERT = Mappers.getMapper(PayCloseRecordConvert.class);
16 |
17 | /**
18 | * 转换
19 | */
20 | PayCloseRecordResult convert(PayCloseRecord in);
21 | }
22 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/convert/record/TradeCallbackRecordConvert.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.convert.record;
2 |
3 | import org.dromara.daxpay.service.entity.record.callback.TradeCallbackRecord;
4 | import org.dromara.daxpay.service.result.record.callback.TradeCallbackRecordResult;
5 | import org.mapstruct.Mapper;
6 | import org.mapstruct.factory.Mappers;
7 |
8 | /**
9 | * 回调记录
10 | * @author xxm
11 | * @since 2024/7/22
12 | */
13 | @Mapper
14 | public interface TradeCallbackRecordConvert {
15 | TradeCallbackRecordConvert CONVERT = Mappers.getMapper(TradeCallbackRecordConvert.class);
16 |
17 | TradeCallbackRecordResult convert(TradeCallbackRecord record);
18 | }
19 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/convert/record/TradeFlowRecordConvert.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.convert.record;
2 |
3 | import org.dromara.daxpay.service.entity.record.flow.TradeFlowRecord;
4 | import org.dromara.daxpay.service.result.record.flow.TradeFlowRecordResult;
5 | import org.mapstruct.Mapper;
6 | import org.mapstruct.factory.Mappers;
7 |
8 | /**
9 | *
10 | * @author xxm
11 | * @since 2024/4/21
12 | */
13 | @Mapper
14 | public interface TradeFlowRecordConvert {
15 | TradeFlowRecordConvert CONVERT = Mappers.getMapper(TradeFlowRecordConvert.class);
16 |
17 | TradeFlowRecordResult convert(TradeFlowRecord entity);
18 | }
19 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/convert/record/TradeSyncRecordConvert.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.convert.record;
2 |
3 | import org.dromara.daxpay.service.entity.record.sync.TradeSyncRecord;
4 | import org.dromara.daxpay.service.result.record.sync.TradeSyncRecordResult;
5 | import org.mapstruct.Mapper;
6 | import org.mapstruct.factory.Mappers;
7 |
8 | /**
9 | * 支付同步记录同步
10 | * @author xxm
11 | * @since 2023/7/14
12 | */
13 | @Mapper
14 | public interface TradeSyncRecordConvert {
15 | TradeSyncRecordConvert CONVERT = Mappers.getMapper(TradeSyncRecordConvert.class);
16 |
17 | TradeSyncRecordResult convert(TradeSyncRecord in);
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/dao/allocation/AllocConfigMapper.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.dao.allocation;
2 |
3 | import org.dromara.daxpay.service.entity.allocation.AllocConfig;
4 | import com.github.yulichang.base.MPJBaseMapper;
5 | import org.apache.ibatis.annotations.Mapper;
6 |
7 | /**
8 | *
9 | * @author xxm
10 | * @since 2024/10/6
11 | */
12 | @Mapper
13 | public interface AllocConfigMapper extends MPJBaseMapper {
14 | }
15 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/dao/allocation/order/AllocDetailMapper.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.dao.allocation.order;
2 |
3 | import org.dromara.daxpay.service.entity.allocation.order.AllocDetail;
4 | import com.github.yulichang.base.MPJBaseMapper;
5 | import org.apache.ibatis.annotations.Mapper;
6 |
7 | /**
8 | *
9 | * @author xxm
10 | * @since 2024/11/14
11 | */
12 | @Mapper
13 | public interface AllocDetailMapper extends MPJBaseMapper {
14 | }
15 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/dao/allocation/order/AllocOrderMapper.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.dao.allocation.order;
2 |
3 | import org.dromara.daxpay.service.entity.allocation.order.AllocOrder;
4 | import com.github.yulichang.base.MPJBaseMapper;
5 | import org.apache.ibatis.annotations.Mapper;
6 |
7 | /**
8 | *
9 | * @author xxm
10 | * @since 2024/11/14
11 | */
12 | @Mapper
13 | public interface AllocOrderMapper extends MPJBaseMapper {
14 | }
15 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/dao/allocation/receiver/AllocGroupMapper.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.dao.allocation.receiver;
2 |
3 | import org.dromara.daxpay.service.entity.allocation.receiver.AllocGroup;
4 | import com.github.yulichang.base.MPJBaseMapper;
5 | import org.apache.ibatis.annotations.Mapper;
6 |
7 | /**
8 | *
9 | * @author xxm
10 | * @since 2024/10/6
11 | */
12 | @Mapper
13 | public interface AllocGroupMapper extends MPJBaseMapper {
14 | }
15 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/dao/allocation/receiver/AllocGroupReceiverMapper.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.dao.allocation.receiver;
2 |
3 | import org.dromara.daxpay.service.entity.allocation.receiver.AllocGroupReceiver;
4 | import com.github.yulichang.base.MPJBaseMapper;
5 | import org.apache.ibatis.annotations.Mapper;
6 |
7 | /**
8 | *
9 | * @author xxm
10 | * @since 2024/10/6
11 | */
12 | @Mapper
13 | public interface AllocGroupReceiverMapper extends MPJBaseMapper {
14 | }
15 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/dao/allocation/receiver/AllocReceiverMapper.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.dao.allocation.receiver;
2 |
3 | import org.dromara.daxpay.service.entity.allocation.receiver.AllocReceiver;
4 | import com.github.yulichang.base.MPJBaseMapper;
5 | import org.apache.ibatis.annotations.Mapper;
6 |
7 | /**
8 | *
9 | * @author xxm
10 | * @since 2024/10/6
11 | */
12 | @Mapper
13 | public interface AllocReceiverMapper extends MPJBaseMapper {
14 | }
15 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/dao/assist/TerminalDeviceMapper.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.dao.assist;
2 |
3 | import org.dromara.daxpay.service.entity.assist.TerminalDevice;
4 | import com.github.yulichang.base.MPJBaseMapper;
5 | import org.apache.ibatis.annotations.Mapper;
6 |
7 | /**
8 | * 支付终端设备管理
9 | * @author xxm
10 | * @since 2025/3/7
11 | */
12 | @Mapper
13 | public interface TerminalDeviceMapper extends MPJBaseMapper {
14 | }
15 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/dao/config/ChannelConfigMapper.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.dao.config;
2 |
3 | import org.dromara.daxpay.service.entity.config.ChannelConfig;
4 | import com.github.yulichang.base.MPJBaseMapper;
5 | import org.apache.ibatis.annotations.Mapper;
6 |
7 | /**
8 | * 通道支付配置
9 | * @author xxm
10 | * @since 2024/6/25
11 | */
12 | @Mapper
13 | public interface ChannelConfigMapper extends MPJBaseMapper {
14 | }
15 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/dao/config/MerchantNotifyConfigMapper.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.dao.config;
2 |
3 | import org.dromara.daxpay.service.entity.config.MerchantNotifyConfig;
4 | import com.github.yulichang.base.MPJBaseMapper;
5 | import org.apache.ibatis.annotations.Mapper;
6 |
7 | /**
8 | * 商户应用消息通知配置
9 | * @author xxm
10 | * @since 2024/8/2
11 | */
12 | @Mapper
13 | public interface MerchantNotifyConfigMapper extends MPJBaseMapper {
14 | }
15 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/dao/config/PlatformConfigManager.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.dao.config;
2 |
3 | import cn.bootx.platform.common.mybatisplus.impl.BaseManager;
4 | import org.dromara.daxpay.service.entity.config.PlatformConfig;
5 | import lombok.RequiredArgsConstructor;
6 | import lombok.extern.slf4j.Slf4j;
7 | import org.springframework.stereotype.Repository;
8 |
9 | /**
10 | *
11 | * @author xxm
12 | * @since 2024/7/17
13 | */
14 | @Slf4j
15 | @Repository
16 | @RequiredArgsConstructor
17 | public class PlatformConfigManager extends BaseManager {
18 | }
19 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/dao/config/PlatformConfigMapper.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.dao.config;
2 |
3 | import org.dromara.daxpay.service.entity.config.PlatformConfig;
4 | import com.github.yulichang.base.MPJBaseMapper;
5 | import org.apache.ibatis.annotations.Mapper;
6 |
7 | /**
8 | *
9 | * @author xxm
10 | * @since 2024/7/17
11 | */
12 | @Mapper
13 | public interface PlatformConfigMapper extends MPJBaseMapper {
14 | }
15 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/dao/constant/ApiConstMapper.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.dao.constant;
2 |
3 | import org.dromara.daxpay.service.entity.constant.ApiConst;
4 | import com.github.yulichang.base.MPJBaseMapper;
5 | import org.apache.ibatis.annotations.Mapper;
6 |
7 | /**
8 | *
9 | * @author xxm
10 | * @since 2024/7/14
11 | */
12 | @Mapper
13 | public interface ApiConstMapper extends MPJBaseMapper {
14 | }
15 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/dao/constant/ChannelConstMapper.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.dao.constant;
2 |
3 | import org.dromara.daxpay.service.entity.constant.ChannelConst;
4 | import com.github.yulichang.base.MPJBaseMapper;
5 | import org.apache.ibatis.annotations.Mapper;
6 |
7 | /**
8 | *
9 | * @author xxm
10 | * @since 2024/6/25
11 | */
12 | @Mapper
13 | public interface ChannelConstMapper extends MPJBaseMapper {
14 | }
15 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/dao/constant/MerchantNotifyConstMapper.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.dao.constant;
2 |
3 | import org.dromara.daxpay.service.entity.constant.MerchantNotifyConst;
4 | import com.github.yulichang.base.MPJBaseMapper;
5 | import org.apache.ibatis.annotations.Mapper;
6 |
7 | /**
8 | *
9 | * @author xxm
10 | * @since 2024/7/30
11 | */
12 | @Mapper
13 | public interface MerchantNotifyConstMapper extends MPJBaseMapper {
14 | }
15 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/dao/constant/MethodConstMapper.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.dao.constant;
2 |
3 | import org.dromara.daxpay.service.entity.constant.PayMethodConst;
4 | import com.github.yulichang.base.MPJBaseMapper;
5 | import org.apache.ibatis.annotations.Mapper;
6 |
7 | /**
8 | * 支付方式
9 | * @author xxm
10 | * @since 2024/6/26
11 | */
12 | @Mapper
13 | public interface MethodConstMapper extends MPJBaseMapper {
14 | }
15 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/dao/gateway/AggregateBarPayConfigMapper.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.dao.gateway;
2 |
3 | import org.dromara.daxpay.service.entity.gateway.AggregateBarPayConfig;
4 | import com.github.yulichang.base.MPJBaseMapper;
5 | import org.apache.ibatis.annotations.Mapper;
6 |
7 | /**
8 | * 网关聚合付款码支付配置
9 | * @author xxm
10 | * @since 2025/3/24
11 | */
12 | @Mapper
13 | public interface AggregateBarPayConfigMapper extends MPJBaseMapper {
14 | }
15 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/dao/gateway/AggregatePayConfigMapper.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.dao.gateway;
2 |
3 | import org.dromara.daxpay.service.entity.gateway.AggregatePayConfig;
4 | import com.github.yulichang.base.MPJBaseMapper;
5 | import org.apache.ibatis.annotations.Mapper;
6 |
7 | /**
8 | * 网关聚合支付配置
9 | * @author xxm
10 | * @since 2025/3/19
11 | */
12 | @Mapper
13 | public interface AggregatePayConfigMapper extends MPJBaseMapper {
14 | }
15 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/dao/gateway/CashierCodeConfigMapper.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.dao.gateway;
2 |
3 | import org.dromara.daxpay.service.entity.gateway.CashierCodeConfig;
4 | import com.github.yulichang.base.MPJBaseMapper;
5 | import org.apache.ibatis.annotations.Mapper;
6 |
7 | /**
8 | * 收银台码牌配置
9 | * @author xxm
10 | * @since 2024/11/20
11 | */
12 | @Mapper
13 | public interface CashierCodeConfigMapper extends MPJBaseMapper {
14 | }
15 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/dao/gateway/CashierCodeItemConfigMapper.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.dao.gateway;
2 |
3 | import org.dromara.daxpay.service.entity.gateway.CashierCodeItemConfig;
4 | import com.github.yulichang.base.MPJBaseMapper;
5 | import org.apache.ibatis.annotations.Mapper;
6 |
7 | /**
8 | * 渠道码类型配置表 Mapper 接口
9 | * @author xxm
10 | * @since 2024/11/20
11 | */
12 | @Mapper
13 | public interface CashierCodeItemConfigMapper extends MPJBaseMapper {
14 | }
15 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/dao/gateway/CashierGroupConfigMapper.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.dao.gateway;
2 |
3 | import org.dromara.daxpay.service.entity.gateway.CashierGroupConfig;
4 | import com.github.yulichang.base.MPJBaseMapper;
5 | import org.apache.ibatis.annotations.Mapper;
6 |
7 | /**
8 | * 网关收银台分组配置
9 | * @author xxm
10 | * @since 2025/3/19
11 | */
12 | @Mapper
13 | public interface CashierGroupConfigMapper extends MPJBaseMapper {
14 | }
15 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/dao/gateway/CashierItemConfigMapper.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.dao.gateway;
2 |
3 | import org.dromara.daxpay.service.entity.gateway.CashierItemConfig;
4 | import com.github.yulichang.base.MPJBaseMapper;
5 | import org.apache.ibatis.annotations.Mapper;
6 |
7 | /**
8 | * 网关收银台配置项
9 | * @author xxm
10 | * @since 2025/3/19
11 | */
12 | @Mapper
13 | public interface CashierItemConfigMapper extends MPJBaseMapper {
14 | }
15 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/dao/gateway/GatewayPayConfigMapper.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.dao.gateway;
2 |
3 | import org.dromara.daxpay.service.entity.gateway.GatewayPayConfig;
4 | import com.github.yulichang.base.MPJBaseMapper;
5 | import org.apache.ibatis.annotations.Mapper;
6 |
7 | /**
8 | *网关支付配置
9 | * @author xxm
10 | * @since 2025/3/19
11 | */
12 | @Mapper
13 | public interface GatewayPayConfigMapper extends MPJBaseMapper {
14 | }
15 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/dao/merchant/MchAppMapper.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.dao.merchant;
2 |
3 | import org.dromara.daxpay.service.entity.merchant.MchApp;
4 | import com.github.yulichang.base.MPJBaseMapper;
5 | import org.apache.ibatis.annotations.Mapper;
6 |
7 | /**
8 | * 商户应用
9 | * @author xxm
10 | * @since 2024/5/27
11 | */
12 | @Mapper
13 | public interface MchAppMapper extends MPJBaseMapper {
14 | }
15 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/dao/notice/callback/MerchantCallbackRecordMapper.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.dao.notice.callback;
2 |
3 | import org.dromara.daxpay.service.entity.notice.callback.MerchantCallbackRecord;
4 | import com.github.yulichang.base.MPJBaseMapper;
5 | import org.apache.ibatis.annotations.Mapper;
6 |
7 | /**
8 | *
9 | * @author xxm
10 | * @since 2024/7/30
11 | */
12 | @Mapper
13 | public interface MerchantCallbackRecordMapper extends MPJBaseMapper {
14 | }
15 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/dao/notice/callback/MerchantCallbackTaskMapper.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.dao.notice.callback;
2 |
3 | import org.dromara.daxpay.service.entity.notice.callback.MerchantCallbackTask;
4 | import com.github.yulichang.base.MPJBaseMapper;
5 | import org.apache.ibatis.annotations.Mapper;
6 |
7 | /**
8 | *
9 | * @author xxm
10 | * @since 2024/7/30
11 | */
12 | @Mapper
13 | public interface MerchantCallbackTaskMapper extends MPJBaseMapper {
14 | }
15 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/dao/notice/notify/MerchantNotifyRecordMapper.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.dao.notice.notify;
2 |
3 | import org.dromara.daxpay.service.entity.notice.notify.MerchantNotifyRecord;
4 | import com.github.yulichang.base.MPJBaseMapper;
5 | import org.apache.ibatis.annotations.Mapper;
6 |
7 | /**
8 | *
9 | * @author xxm
10 | * @since 2024/7/30
11 | */
12 | @Mapper
13 | public interface MerchantNotifyRecordMapper extends MPJBaseMapper {
14 | }
15 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/dao/notice/notify/MerchantNotifyTaskMapper.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.dao.notice.notify;
2 |
3 | import org.dromara.daxpay.service.entity.notice.notify.MerchantNotifyTask;
4 | import com.github.yulichang.base.MPJBaseMapper;
5 | import org.apache.ibatis.annotations.Mapper;
6 |
7 | /**
8 | *
9 | * @author xxm
10 | * @since 2024/7/30
11 | */
12 | @Mapper
13 | public interface MerchantNotifyTaskMapper extends MPJBaseMapper {
14 | }
15 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/dao/record/callback/TradeCallbackRecordMapper.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.dao.record.callback;
2 |
3 | import org.dromara.daxpay.service.entity.record.callback.TradeCallbackRecord;
4 | import com.github.yulichang.base.MPJBaseMapper;
5 | import org.apache.ibatis.annotations.Mapper;
6 |
7 | /**
8 | *
9 | * @author xxm
10 | * @since 2024/7/22
11 | */
12 | @Mapper
13 | public interface TradeCallbackRecordMapper extends MPJBaseMapper {
14 | }
15 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/dao/record/close/PayCloseRecordMapper.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.dao.record.close;
2 |
3 | import org.dromara.daxpay.service.entity.record.close.PayCloseRecord;
4 | import com.github.yulichang.base.MPJBaseMapper;
5 | import org.apache.ibatis.annotations.Mapper;
6 |
7 | /**
8 | *
9 | * @author xxm
10 | * @since 2024/1/4
11 | */
12 | @Mapper
13 | public interface PayCloseRecordMapper extends MPJBaseMapper {
14 | }
15 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/dao/record/sync/TradeSyncRecordMapper.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.dao.record.sync;
2 |
3 | import org.dromara.daxpay.service.entity.record.sync.TradeSyncRecord;
4 | import com.github.yulichang.base.MPJBaseMapper;
5 | import org.apache.ibatis.annotations.Mapper;
6 |
7 | /**
8 | * 支付同步记录
9 | * @author xxm
10 | * @since 2023/7/14
11 | */
12 | @Mapper
13 | public interface TradeSyncRecordMapper extends MPJBaseMapper {
14 | }
15 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/dao/report/IndexMerchantReportMapper.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.dao.report;
2 |
3 | import org.apache.ibatis.annotations.Mapper;
4 |
5 | /**
6 | * 首页商户信息报表
7 | * @author xxm
8 | * @since 2024/11/17
9 | */
10 | @Mapper
11 | public interface IndexMerchantReportMapper {
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/entity/allocation/order/AllocAndDetail.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.entity.allocation.order;
2 |
3 | import java.util.List;
4 |
5 | /**
6 | * 分账订单和分账明细
7 | * @author xxm
8 | * @since 2024/11/14
9 | */
10 | public record AllocAndDetail(AllocOrder transaction, List details) {}
11 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/entity/config/MerchantNotifyConfig.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.entity.config;
2 |
3 | import org.dromara.daxpay.service.common.entity.MchAppBaseEntity;
4 | import com.baomidou.mybatisplus.annotation.TableName;
5 | import lombok.Data;
6 | import lombok.EqualsAndHashCode;
7 | import lombok.experimental.Accessors;
8 |
9 | /**
10 | * 商户应用消息通知配置
11 | * @author xxm
12 | * @since 2024/7/30
13 | */
14 | @EqualsAndHashCode(callSuper = true)
15 | @Data
16 | @Accessors(chain = true)
17 | @TableName("pay_merchant_notify_config")
18 | public class MerchantNotifyConfig extends MchAppBaseEntity {
19 |
20 | /** 消息通知类型编码 */
21 | private String code;
22 |
23 | /** 是否订阅 */
24 | private boolean subscribe;
25 | }
26 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/enums/NoticeSendTypeEnum.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.enums;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Getter;
5 |
6 | /**
7 | * 消息发送类型
8 | * 字典: notice_send_type
9 | * @author xxm
10 | * @since 2024/2/25
11 | */
12 | @Getter
13 | @AllArgsConstructor
14 | public enum NoticeSendTypeEnum {
15 |
16 | /** 自动发送 */
17 | AUTO("auto", "自动发送"),
18 | /** 手动发送 */
19 | MANUAL("manual", "手动发送");
20 |
21 | private final String type;
22 | private final String name;
23 | }
24 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/enums/NotifyContentTypeEnum.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.enums;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Getter;
5 |
6 | /**
7 | * 客户通知内容类型
8 | * 字典: notify_content_type
9 | * @author xxm
10 | * @since 2024/7/30
11 | */
12 | @Getter
13 | @AllArgsConstructor
14 | public enum NotifyContentTypeEnum {
15 |
16 | /** 支付订单变动通知 */
17 | PAY("pay", "支付订单变动通知"),
18 |
19 | /** 退款订单变动通知 */
20 | REFUND("refund", "退款订单变动通知"),
21 |
22 | /** 支付订单变动通知 */
23 | TRANSFER("transfer", "转账订单变动通知"),
24 |
25 | /** 分账订单变动通知 */
26 | ALLOCATION("allocation", "分账订单变动通知"),
27 | ;
28 | private final String code;
29 | private final String name;
30 | }
31 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/param/config/NotifySubscribeParam.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.param.config;
2 |
3 | import io.swagger.v3.oas.annotations.media.Schema;
4 | import lombok.Data;
5 | import lombok.experimental.Accessors;
6 |
7 | /**
8 | * 商户消息订阅参数
9 | * @author xxm
10 | * @since 2024/8/2
11 | */
12 | @Data
13 | @Accessors(chain = true)
14 | @Schema(title = "商户消息订阅参数")
15 | public class NotifySubscribeParam {
16 |
17 | /** 应用ID */
18 | @Schema(description = "应用ID")
19 | private String appId;
20 | /** 消息类型 */
21 | @Schema(description = "消息类型")
22 | private String notifyType;
23 | /** 是否订阅 */
24 | @Schema(description = "是否订阅")
25 | private boolean subscribe;
26 | }
27 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/param/constant/MerchantNotifyConstQuery.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.param.constant;
2 |
3 | import io.swagger.v3.oas.annotations.media.Schema;
4 | import lombok.Data;
5 | import lombok.experimental.Accessors;
6 |
7 | /**
8 | * 商户订阅消息类型
9 | * @author xxm
10 | * @since 2024/8/5
11 | */
12 | @Data
13 | @Accessors(chain = true)
14 | @Schema(title = "商户订阅消息类型")
15 | public class MerchantNotifyConstQuery {
16 | /** 编码 */
17 | @Schema(description = "编码")
18 | private String code;
19 |
20 | /** 名称 */
21 | @Schema(description = "名称")
22 | private String name;
23 | }
24 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/param/constant/MethodConstQuery.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.param.constant;
2 |
3 | import cn.bootx.platform.core.annotation.QueryParam;
4 | import io.swagger.v3.oas.annotations.media.Schema;
5 | import lombok.Data;
6 | import lombok.experimental.Accessors;
7 |
8 | /**
9 | * 支付方式
10 | * @author xxm
11 | * @since 2024/7/14
12 | */
13 | @QueryParam(type = QueryParam.CompareTypeEnum.LIKE)
14 | @Data
15 | @Accessors(chain = true)
16 | @Schema(title = "支付方式")
17 | public class MethodConstQuery {
18 | /** 编码 */
19 | @Schema(description = "编码")
20 | private String code;
21 |
22 | /** 名称 */
23 | @Schema(description = "名称")
24 | private String name;
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/param/report/TradeReportQuery.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.param.report;
2 |
3 | import io.swagger.v3.oas.annotations.media.Schema;
4 | import lombok.Data;
5 | import lombok.experimental.Accessors;
6 |
7 | import java.time.LocalDate;
8 |
9 | /**
10 | * 交易报表查询参数
11 | * @author xxm
12 | * @since 2024/11/17
13 | */
14 | @Data
15 | @Accessors(chain = true)
16 | @Schema(title = "交易报表查询参数")
17 | public class TradeReportQuery {
18 |
19 | /** 开始日期 */
20 | @Schema(description = "开始日期")
21 | private LocalDate startDate;
22 |
23 | /** 结束日期 */
24 | @Schema(description = "结束日期")
25 | private LocalDate endDate;
26 | }
27 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/result/gateway/GatewayPayUrlResult.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.result.gateway;
2 |
3 | import io.swagger.v3.oas.annotations.media.Schema;
4 | import lombok.Data;
5 | import lombok.experimental.Accessors;
6 |
7 | /**
8 | * 网关支付响应参数
9 | * @author xxm
10 | * @since 2024/11/26
11 | */
12 | @Data
13 | @Accessors(chain = true)
14 | @Schema(title = "网关支付响应参数")
15 | public class GatewayPayUrlResult {
16 |
17 | @Schema(description = "收银台链接")
18 | private String url;
19 |
20 | @Schema(description = "收银台发起信息")
21 | private String payBody;
22 | }
23 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/result/record/flow/TradeFlowAmountResult.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.result.record.flow;
2 |
3 | import io.swagger.v3.oas.annotations.media.Schema;
4 | import lombok.Data;
5 | import lombok.experimental.Accessors;
6 |
7 | import java.math.BigDecimal;
8 |
9 | /**
10 | * 各类型流水汇总金额
11 | * @author xxm
12 | * @since 2024/8/19
13 | */
14 | @Data
15 | @Accessors(chain = true)
16 | @Schema(title = "各类型流水汇总金额")
17 | public class TradeFlowAmountResult {
18 | @Schema(description = "收入金额")
19 | private BigDecimal incomeAmount;
20 | @Schema(description = "退款金额")
21 | private BigDecimal refundAmount;
22 | @Schema(description = "转账金额")
23 | private BigDecimal transferAmount;
24 | }
25 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/result/report/MerchantReportResult.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.result.report;
2 |
3 | import io.swagger.v3.oas.annotations.media.Schema;
4 | import lombok.Data;
5 | import lombok.experimental.Accessors;
6 |
7 | /**
8 | * 首页商户数量统计信息
9 | * @author xxm
10 | * @since 2024/11/17
11 | */
12 | @Data
13 | @Accessors(chain = true)
14 | @Schema(title = "首页商户数量统计信息")
15 | public class MerchantReportResult {
16 |
17 | @Schema(description = "普通商户数量")
18 | private Integer normalCount;
19 |
20 | @Schema(description = "特约商户数量")
21 | private Integer partnerCount;
22 |
23 | @Schema(description = "普通商户应用数量")
24 | private Integer normalAppCount;
25 |
26 | @Schema(description = "特约商户应用数量")
27 | private Integer partnerAppCount;
28 | }
29 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/service/report/IndexMerchantReportService.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.service.report;
2 |
3 | import lombok.RequiredArgsConstructor;
4 | import lombok.extern.slf4j.Slf4j;
5 | import org.springframework.stereotype.Service;
6 |
7 | /**
8 | * 首页商户报表服务
9 | * @author xxm
10 | * @since 2024/11/17
11 | */
12 | @Slf4j
13 | @Service
14 | @RequiredArgsConstructor
15 | public class IndexMerchantReportService {
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/strategy/AbsGatewayPayStrategy.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.strategy;
2 |
3 | import org.dromara.daxpay.core.param.gateway.GatewayCashierPayParam;
4 | import org.dromara.daxpay.core.param.trade.pay.PayParam;
5 |
6 | /**
7 | * 抽象网关支付策略
8 | * @author xxm
9 | * @since 2024/12/2
10 | */
11 | public abstract class AbsGatewayPayStrategy implements PaymentStrategy{
12 |
13 | /**
14 | * 支付参数处理
15 | */
16 | public void handlePayParam(GatewayCashierPayParam cashierPayParam, PayParam payParam) {
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/strategy/AbsSyncPayOrderStrategy.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.strategy;
2 |
3 | import org.dromara.daxpay.service.bo.sync.PaySyncResultBo;
4 | import org.dromara.daxpay.service.entity.order.pay.PayOrder;
5 | import lombok.Getter;
6 | import lombok.Setter;
7 |
8 | /**
9 | * 支付同步抽象类
10 | * @author xxm
11 | * @since 2023/7/14
12 | */
13 | @Getter
14 | @Setter
15 | public abstract class AbsSyncPayOrderStrategy implements PaymentStrategy{
16 |
17 | /** 支付订单 */
18 | private PayOrder order = null;
19 |
20 |
21 | /**
22 | * 异步支付单与支付网关进行状态比对后的结果
23 | */
24 | public abstract PaySyncResultBo doSync();
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/strategy/AbsSyncRefundOrderStrategy.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.strategy;
2 |
3 | import org.dromara.daxpay.service.bo.sync.RefundSyncResultBo;
4 | import org.dromara.daxpay.service.entity.order.refund.RefundOrder;
5 | import lombok.Getter;
6 | import lombok.Setter;
7 |
8 | /**
9 | * 支付退款订单同步策略
10 | * @author xxm
11 | * @since 2024/1/25
12 | */
13 | @Getter
14 | @Setter
15 | public abstract class AbsSyncRefundOrderStrategy implements PaymentStrategy{
16 |
17 | private RefundOrder refundOrder;
18 |
19 | /**
20 | * 同步前处理, 主要是预防请求过于迅速, 支付网关没有处理完退款请求, 导致返回的状态不正确
21 | */
22 | public void doBeforeHandler(){}
23 | /**
24 | * 异步支付单与支付网关进行状态比对后的结果
25 | */
26 | public abstract RefundSyncResultBo doSync();
27 | }
28 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/java/org/dromara/daxpay/service/strategy/PaymentStrategy.java:
--------------------------------------------------------------------------------
1 | package org.dromara.daxpay.service.strategy;
2 |
3 |
4 | import org.dromara.daxpay.core.enums.ChannelEnum;
5 |
6 | /**
7 | * 支付相关策略标识接口
8 | * @author xxm
9 | * @since 2023/12/27
10 | */
11 | public interface PaymentStrategy {
12 |
13 | /**
14 | * 策略标识, 可以自行进行扩展
15 | * @see ChannelEnum
16 | */
17 | String getChannel();
18 | }
19 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports:
--------------------------------------------------------------------------------
1 | org.dromara.daxpay.service.DaxpayPayServiceApp
2 |
--------------------------------------------------------------------------------
/daxpay-open/daxpay-open-service/src/main/resources/template/对账单模板.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dromara/dax-pay/62b5c515932d6f267ee1aa402a94bfd754213304/daxpay-open/daxpay-open-service/src/main/resources/template/对账单模板.xlsx
--------------------------------------------------------------------------------
/lombok.config:
--------------------------------------------------------------------------------
1 | # 将字段上的注解拷贝到对应构造参数上, 如果要新增别的注解, 需要在下方重新进行定义,
2 | lombok.copyableAnnotations += org.springframework.context.annotation.Lazy
3 | lombok.copyableAnnotations += org.springframework.beans.factory.annotation.Qualifier
4 | # 默认开启实体类的链式API 会导致一些反射相关类库出问题, 如 easyExcel
5 | #lombok.accessors.chain = true
6 |
--------------------------------------------------------------------------------