支付系统的实体的初始化

pull/2/head
YunaiV 2021-10-14 09:05:09 +08:00
parent 5133cd0fdf
commit 711a074059
12 changed files with 518 additions and 0 deletions

View File

@ -0,0 +1,6 @@
/**
* POJO
*
* 使 MapStruct
*/
package cn.iocoder.yudao.adminserver.modules.pay.convert;

View File

@ -0,0 +1 @@
<http://www.iocoder.cn/Spring-Boot/MapStruct/?yudao>

View File

@ -0,0 +1,57 @@
package cn.iocoder.yudao.adminserver.modules.pay.dal.dataobject.merchant;
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
/**
* DO
*
* ~
*
* PayMerchantDO : PayAppDO = 1 : n
*
* @author
*/
@Data
public class PayAppDO extends BaseDO {
/**
*
*/
@TableId
private Long id;
/**
*
* 60cc81e0e4b06afc4d3f0cfq
*/
private String no;
/**
*
*/
private String name;
/**
*
*
* {@link CommonStatusEnum}
*/
private Integer status;
/**
*
*/
private String remark;
/**
*
* TODO
*/
private String secret;
/**
*
*
* {@link PayMerchantDO#getId()}
*/
private Long merchantId;
}

View File

@ -0,0 +1,55 @@
package cn.iocoder.yudao.adminserver.modules.pay.dal.dataobject.merchant;
import cn.iocoder.yudao.adminserver.modules.pay.enums.PayChannelCodeEnum;
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import lombok.Data;
/**
* DO
*
*
* PayAppDO : PayChannelDO = 1 : n
*
* @author
*/
@Data
public class PayChannelDO extends BaseDO {
/**
*
*/
private Long id;
/**
*
*
* {@link PayChannelCodeEnum}
*/
private String code;
/**
*
*
* {@link CommonStatusEnum}
*/
private Integer status;
/**
*
*/
private Double feeRate;
/**
*
*
* {@link PayMerchantDO#getId()}
*/
private Long merchantId;
/**
*
*
* {@link PayAppDO#getId()}
*/
private String appId;
// TODO 芋艿:不同渠道的配置。暂时考虑硬编码
}

View File

@ -0,0 +1,46 @@
package cn.iocoder.yudao.adminserver.modules.pay.dal.dataobject.merchant;
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
/**
* DO
*
*
* @author
*/
@Data
public class PayMerchantDO extends BaseDO {
/**
*
*/
@TableId
private Long id;
/**
*
* M233666999
*/
private String no;
/**
*
*/
private String name;
/**
*
*/
private String shortName;
/**
*
*
* {@link CommonStatusEnum}
*/
private Integer status;
/**
*
*/
private String remark;
}

View File

@ -0,0 +1,15 @@
package cn.iocoder.yudao.adminserver.modules.pay.dal.dataobject.order;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import lombok.Data;
/**
* 退
* 退
* TODO
*
* @author
*/
@Data
public class PayNotifyDO extends BaseDO {
}

View File

@ -0,0 +1,167 @@
package cn.iocoder.yudao.adminserver.modules.pay.dal.dataobject.order;
import cn.iocoder.yudao.adminserver.modules.pay.dal.dataobject.merchant.PayAppDO;
import cn.iocoder.yudao.adminserver.modules.pay.dal.dataobject.merchant.PayChannelDO;
import cn.iocoder.yudao.adminserver.modules.pay.dal.dataobject.merchant.PayMerchantDO;
import cn.iocoder.yudao.adminserver.modules.pay.enums.PayChannelCodeEnum;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import lombok.Data;
import java.util.Date;
/**
* DO
*
* @author
*/
@Data
public class PayOrderDO extends BaseDO {
/**
*
*/
private Long id;
/**
*
*
* P202110132239124200055
*/
private String no;
/**
*
*
* {@link PayMerchantDO#getId()}
*/
private Long merchantId;
/**
*
*
* {@link PayAppDO#getId()}
*/
private Long appId;
/**
*
*
* {@link PayChannelDO#getMerchantId()}
*/
private Long channelId;
/**
*
*
* {@link PayChannelCodeEnum}
*/
private String channelCode;
// ========== 商户相关字段 ==========
/**
*
* A PayMerchantDO TODO
*/
private String merchantOrderNo;
/**
*
*/
private String subject;
/**
*
*/
private String body;
/**
*
*/
private String merchantExtra;
/**
*
* TODO 0 1
*/
private Integer notifyStatus;
// ========== 订单相关字段 ==========
/**
*
*/
private Long amount;
/**
*
*
* {@link PayChannelDO#getFeeRate()}
*/
private Double channelFeeRate;
/**
*
*/
private Long channelFeeAmount;
/**
*
*
* TODO
*/
private Integer status;
/**
* IP
*/
private String clientIp;
/**
*
*/
private Date successTime;
/**
*
*/
private Date expiredTime;
/**
*
*
* https://www.pingxx.com/api/支付渠道%20extra%20参数说明.html
*/
private String channelExtra;
/**
*
*/
private String notifyUrl;
/**
*
*/
private String returnUrl;
// TODO 芋艿:可能要优化
/**
*
*/
private String errorCode;
/**
*
*/
private String errorMessage;
// ========== 退款相关字段 ==========
/**
* 退
*
* TODO 0 - 退1 - 退 2 - 退
*/
private Integer refundStatus;
/**
* 退
*/
private Integer refundTimes;
/**
* 退
*/
private Long refundAmount;
// ========== 渠道相关字段 ==========
/**
*
*
* openid
*/
private String channelUserId;
/**
*
*/
private String channelOrderNo;
}

View File

@ -0,0 +1,133 @@
package cn.iocoder.yudao.adminserver.modules.pay.dal.dataobject.order;
import cn.iocoder.yudao.adminserver.modules.pay.dal.dataobject.merchant.PayAppDO;
import cn.iocoder.yudao.adminserver.modules.pay.dal.dataobject.merchant.PayChannelDO;
import cn.iocoder.yudao.adminserver.modules.pay.dal.dataobject.merchant.PayMerchantDO;
import cn.iocoder.yudao.adminserver.modules.pay.enums.PayChannelCodeEnum;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import lombok.Data;
import java.util.Date;
/**
* 退 DO
* 退
*
* PayOrderDO : PayRefundDO = 1 : n
*
* @author
*/
@Data
public class PayRefundDO extends BaseDO {
/**
* 退
*/
private Long id;
/**
* 退
*
* R202109181134287570000
*/
private String no;
/**
*
*
* {@link PayMerchantDO#getId()}
*/
private Long merchantId;
/**
*
*
* {@link PayAppDO#getId()}
*/
private Long appId;
/**
*
*
* {@link PayChannelDO#getMerchantId()}
*/
private Long channelId;
/**
*
*
* {@link PayChannelCodeEnum}
*/
private String channelCode;
/**
*
*
* {@link PayOrderDO#getId()}
*/
private Long orderId;
// ========== 商户相关字段 ==========
/**
* 退
* A 退 PayMerchantDO TODO
*/
private String merchantRefundNo;
/**
*
*/
private String merchantExtra;
// ========== 退款相关字段 ==========
/**
* 退
*
* TODO
*/
private Integer status;
/**
* IP
*/
private String clientIp;
/**
* 退
*/
private Long amount;
/**
* 退
*/
private String reason;
/**
* 退
*/
private Date successTime;
/**
* 退
*/
private Date expiredTime;
/**
*
*
* https://www.pingxx.com/api/Refunds%20退款概述.html
*/
private String channelExtra;
/**
*
*/
private String notifyUrl;
// TODO 芋艿:可能要优化
/**
*
*/
private String errorCode;
/**
*
*/
private String errorMessage;
// ========== 渠道相关字段 ==========
/**
*
*/
private String channelOrderNo;
/**
* 退
*/
private String channelRefundNo;
}

View File

@ -0,0 +1 @@
package cn.iocoder.yudao.adminserver.modules.pay.dal.dataobject;

View File

@ -0,0 +1,28 @@
package cn.iocoder.yudao.adminserver.modules.pay.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
*
*
* @author
*/
@Getter
@AllArgsConstructor
public enum PayChannelCodeEnum {
wx_pub("wx_pub", "微信 JSAPI 支付");
/**
*
*
* https://www.pingxx.com/api/支付渠道属性值.html
*/
private String code;
/**
*
*/
private String name;
}

View File

@ -0,0 +1,7 @@
/**
* pay
* 退
*
* pay
*/
package cn.iocoder.yudao.adminserver.modules.pay;

View File

@ -3,6 +3,7 @@ package cn.iocoder.yudao.coreservice.modules.infra.dal.dataobject.logger;
import cn.iocoder.yudao.framework.common.enums.UserTypeEnum;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import cn.iocoder.yudao.coreservice.modules.infra.enums.logger.InfApiErrorLogProcessStatusEnum;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.*;
@ -25,6 +26,7 @@ public class InfApiErrorLogDO extends BaseDO {
/**
*
*/
@TableId
private Long id;
/**
*