- 前端:支付单列表
- 前端:退款单列表
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
package cn.iocoder.mall.pay.api;
|
||||
|
||||
import cn.iocoder.common.framework.vo.CommonResult;
|
||||
import cn.iocoder.mall.pay.api.bo.PayRefundPageBO;
|
||||
import cn.iocoder.mall.pay.api.bo.PayRefundSubmitBO;
|
||||
import cn.iocoder.mall.pay.api.dto.PayRefundPageDTO;
|
||||
import cn.iocoder.mall.pay.api.dto.PayRefundSubmitDTO;
|
||||
|
||||
public interface PayRefundService {
|
||||
@@ -20,4 +22,6 @@ public interface PayRefundService {
|
||||
*/
|
||||
CommonResult<Boolean> updateRefundSuccess(Integer payChannel, String params);
|
||||
|
||||
PayRefundPageBO getRefundPage(PayRefundPageDTO payRefundPageDTO);
|
||||
|
||||
}
|
||||
|
||||
@@ -2,10 +2,15 @@ package cn.iocoder.mall.pay.api;
|
||||
|
||||
import cn.iocoder.common.framework.vo.CommonResult;
|
||||
import cn.iocoder.mall.pay.api.bo.PayTransactionBO;
|
||||
import cn.iocoder.mall.pay.api.bo.PayTransactionPageBO;
|
||||
import cn.iocoder.mall.pay.api.bo.PayTransactionSubmitBO;
|
||||
import cn.iocoder.mall.pay.api.dto.PayTransactionCreateDTO;
|
||||
import cn.iocoder.mall.pay.api.dto.PayTransactionPageDTO;
|
||||
import cn.iocoder.mall.pay.api.dto.PayTransactionSubmitDTO;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
public interface PayTransactionService {
|
||||
|
||||
CommonResult<PayTransactionBO> getTransaction(Integer userId, String appId, String orderId);
|
||||
@@ -26,6 +31,10 @@ public interface PayTransactionService {
|
||||
*/
|
||||
CommonResult<Boolean> updateTransactionPaySuccess(Integer payChannel, String params);
|
||||
|
||||
List<PayTransactionBO> getTransactionList(Collection<Integer> ids);
|
||||
|
||||
PayTransactionPageBO getTransactionPage(PayTransactionPageDTO payTransactionPageDTO);
|
||||
|
||||
CommonResult cancelTransaction(); // TODO 1. params 2. result
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
package cn.iocoder.mall.pay.api.bo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 支付退款 BO
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class PayRefundBO {
|
||||
|
||||
/**
|
||||
* 编号,自增
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* 支付交易编号
|
||||
*/
|
||||
private Integer transactionId;
|
||||
/**
|
||||
* 生成传输给第三方的退款号
|
||||
*
|
||||
* 唯一索引
|
||||
*/
|
||||
private String refundCode;
|
||||
/**
|
||||
* 应用编号
|
||||
*
|
||||
* 不同业务线分配不同的 appId
|
||||
* 举个例子,
|
||||
* 1. 电商系统的订单,appId = 1024
|
||||
* 2. 活动系统的订单,appId = 2048
|
||||
*/
|
||||
private String appId;
|
||||
/**
|
||||
* 业务线的订单编号
|
||||
*
|
||||
* 1. 使用 String 的原因是,业务线可能使用 String 做为编号
|
||||
* 2. 每个 appId 下,orderId 唯一
|
||||
*/
|
||||
private String orderId;
|
||||
/**
|
||||
* 发起交易的 IP
|
||||
*/
|
||||
private String createIp;
|
||||
/**
|
||||
* 业务退款描述
|
||||
*/
|
||||
private String orderDescription;
|
||||
/**
|
||||
* 退款金额,单位:分。
|
||||
*
|
||||
* TODO 暂时不考虑货币类型。
|
||||
*/
|
||||
private Integer price;
|
||||
/**
|
||||
* 退款状态
|
||||
*
|
||||
* @see cn.iocoder.mall.pay.api.constant.PayRefundStatus
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 回调业务线完成时间
|
||||
*/
|
||||
private Date finishTime;
|
||||
/**
|
||||
* 异步通知地址
|
||||
*/
|
||||
private String notifyUrl;
|
||||
/**
|
||||
* 扩展内容
|
||||
*
|
||||
* 异步通知的时候填充回调的数据
|
||||
*/
|
||||
private String extensionData;
|
||||
/**
|
||||
* 退款渠道
|
||||
*/
|
||||
private Integer refundChannel;
|
||||
/**
|
||||
* 第三方退款成功的时间
|
||||
*/
|
||||
private Date refundTime;
|
||||
/**
|
||||
* 收到第三方系统通知的时间
|
||||
*
|
||||
* 一般情况下,即第三方系统的异步通知
|
||||
*/
|
||||
private Date notifyTime;
|
||||
/**
|
||||
* 第三方的流水号
|
||||
*/
|
||||
private String tradeNo;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package cn.iocoder.mall.pay.api.bo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 支付退款 Page BO
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class PayRefundPageBO implements Serializable {
|
||||
|
||||
/**
|
||||
* 支付退款数组
|
||||
*/
|
||||
private List<PayRefundBO> list;
|
||||
/**
|
||||
* 总量
|
||||
*/
|
||||
private Integer total;
|
||||
|
||||
}
|
||||
@@ -92,4 +92,11 @@ public class PayTransactionBO implements Serializable {
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
// ========== 退款相关 ==========
|
||||
|
||||
/**
|
||||
* 退款总金额
|
||||
*/
|
||||
private Integer refundTotal;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
package cn.iocoder.mall.pay.api.bo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 支付交易 Page BO
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class PayTransactionPageBO implements Serializable {
|
||||
|
||||
/**
|
||||
* 支付交易数组
|
||||
*/
|
||||
private List<PayTransactionBO> list;
|
||||
/**
|
||||
* 总量
|
||||
*/
|
||||
private Integer total;
|
||||
|
||||
}
|
||||
@@ -6,9 +6,9 @@ package cn.iocoder.mall.pay.api.constant;
|
||||
public enum PayChannelEnum {
|
||||
|
||||
WEIXIN_APP(100, "wx", "微信 App 支付"),
|
||||
WEIXIN_PUB(100, "wx", "微信 JS API 支付"),
|
||||
WEIXIN_PUB(101, "wxjs", "微信 JS API 支付"),
|
||||
|
||||
ALIPAY(200, "alipay", "微信支付"),
|
||||
ALIPAY(200, "alipay", "支付宝 App 支付"),
|
||||
|
||||
PINGXX(9999, "ping++", "ping++ 支付"),
|
||||
;
|
||||
@@ -44,4 +44,4 @@ public enum PayChannelEnum {
|
||||
return name;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
package cn.iocoder.mall.pay.api.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 支付退款分页 DTO
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class PayRefundPageDTO {
|
||||
|
||||
/**
|
||||
* 创建时间(开始)
|
||||
*/
|
||||
private Date createBeginTime;
|
||||
/**
|
||||
* 创建时间(结束)
|
||||
*/
|
||||
private Date createEndTime;
|
||||
/**
|
||||
* 完成时间(开始)
|
||||
*/
|
||||
private Date finishBeginTime;
|
||||
/**
|
||||
* 完成时间(结束)
|
||||
*/
|
||||
private Date finishEndTime;
|
||||
/**
|
||||
* 退款状态
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 支付渠道
|
||||
*/
|
||||
private Integer payChannel;
|
||||
|
||||
@NotNull(message = "页码不能为空")
|
||||
private Integer pageNo;
|
||||
@NotNull(message = "每页条数不能为空")
|
||||
private Integer pageSize;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package cn.iocoder.mall.pay.api.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 支付交易分页 DTO
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class PayTransactionPageDTO {
|
||||
|
||||
/**
|
||||
* 创建时间(开始)
|
||||
*/
|
||||
private Date createBeginTime;
|
||||
/**
|
||||
* 创建时间(结束)
|
||||
*/
|
||||
private Date createEndTime;
|
||||
/**
|
||||
* 支付时间(开始)
|
||||
*/
|
||||
private Date paymentBeginTime;
|
||||
/**
|
||||
* 支付时间(结束)
|
||||
*/
|
||||
private Date paymentEndTime;
|
||||
/**
|
||||
* 支付状态
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 是否有退款
|
||||
*/
|
||||
private Boolean hasRefund;
|
||||
/**
|
||||
* 支付渠道
|
||||
*/
|
||||
private Integer payChannel;
|
||||
/**
|
||||
* 商品标题
|
||||
*
|
||||
* 模糊匹配
|
||||
*/
|
||||
private String orderSubject;
|
||||
|
||||
@NotNull(message = "页码不能为空")
|
||||
private Integer pageNo;
|
||||
@NotNull(message = "每页条数不能为空")
|
||||
private Integer pageSize;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user