额外参数
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.czg.order.entity;
|
||||
|
||||
import com.czg.order.enums.PaymentPayTypeEnum;
|
||||
import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
@@ -58,8 +59,14 @@ public class OrderPayment implements Serializable {
|
||||
private Long relatedId;
|
||||
|
||||
/**
|
||||
* 支付方式:order,refund, memberIn,memberRefund, free
|
||||
* {@link com.czg.order.enums.PaymentPayTypeEnum}
|
||||
* 订单来源类型
|
||||
* {@link com.czg.order.enums.PaymentPayTypeEnum.SourceType}
|
||||
*
|
||||
*/
|
||||
private String sourceType;
|
||||
/**
|
||||
* 支付类型
|
||||
* {@link com.czg.order.enums.PaymentPayTypeEnum.PayType}
|
||||
*/
|
||||
private String payType;
|
||||
|
||||
@@ -90,8 +97,10 @@ public class OrderPayment implements Serializable {
|
||||
* 支付相应结果 json
|
||||
*/
|
||||
private String respJson;
|
||||
|
||||
/**
|
||||
* 支付状态:success, fail, init
|
||||
* 支付状态
|
||||
* {@link com.czg.order.enums.PaymentPayTypeEnum.PayStatus}
|
||||
*/
|
||||
private String payStatus;
|
||||
|
||||
@@ -104,26 +113,28 @@ public class OrderPayment implements Serializable {
|
||||
public OrderPayment() {
|
||||
}
|
||||
|
||||
public OrderPayment(@NonNull Long shopId,@NonNull Long sourceId, @NotBlank String payType, @NotBlank String orderNo,
|
||||
public OrderPayment(@NonNull Long shopId,@NonNull Long sourceId, @NotBlank String sourceType,@NotBlank String payType, @NotBlank String orderNo,
|
||||
String authCode, @NonNull BigDecimal amount) {
|
||||
this.shopId = shopId;
|
||||
this.sourceId = sourceId;
|
||||
this.sourceType = sourceType;
|
||||
this.payType = payType;
|
||||
this.orderNo = orderNo;
|
||||
this.authCode = authCode;
|
||||
this.amount = amount;
|
||||
this.payStatus = "init";
|
||||
this.payStatus = PaymentPayTypeEnum.PayStatus.INIT;
|
||||
}
|
||||
|
||||
public OrderPayment(@NonNull Long shopId,@NonNull Long sourceId, @NotBlank String payType, @NotBlank String orderNo,
|
||||
public OrderPayment(@NonNull Long shopId,@NonNull Long sourceId, @NotBlank String sourceType,@NotBlank String payType, @NotBlank String orderNo,
|
||||
String authCode, @NonNull BigDecimal amount, Long relatedId) {
|
||||
this.shopId = shopId;
|
||||
this.sourceId = sourceId;
|
||||
this.sourceType = sourceType;
|
||||
this.payType = payType;
|
||||
this.orderNo = orderNo;
|
||||
this.authCode = authCode;
|
||||
this.amount = amount;
|
||||
this.relatedId = relatedId;
|
||||
this.payStatus = "init";
|
||||
this.payStatus = PaymentPayTypeEnum.PayStatus.INIT;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,35 +1,64 @@
|
||||
package com.czg.order.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 支付类型枚举
|
||||
* tb_order_payment
|
||||
*
|
||||
* @author ww
|
||||
*/
|
||||
@Getter
|
||||
public enum PaymentPayTypeEnum {
|
||||
ORDER("order", "订单支付"),
|
||||
FREE("free", "霸王餐"),
|
||||
MEMBER_IN("memberIn", "会员充值"),
|
||||
MEMBER_PAY("memberPay", "会员购买开通"),
|
||||
DISTRIBUTION("distribution", "分销员购买开通"),
|
||||
DISTRIBUTION_RECHARGE("distributionRecharge", "商家运营余额充值"),
|
||||
POINT("point", "积分商品购买"),
|
||||
WARE("ware", "拼团商品"),
|
||||
|
||||
|
||||
|
||||
REFUND("refund", "订单退款"),
|
||||
MEMBER_REFUND("memberRefund", "会员充值的退款"),
|
||||
;
|
||||
|
||||
private final String value;
|
||||
private final String msg;
|
||||
|
||||
PaymentPayTypeEnum(String value, String msg) {
|
||||
this.value = value;
|
||||
this.msg = msg;
|
||||
public interface PaymentPayTypeEnum {
|
||||
class SourceType {
|
||||
/**
|
||||
* 订单支付
|
||||
*/
|
||||
public static final String ORDER = "order";
|
||||
/**
|
||||
* 霸王餐
|
||||
*/
|
||||
public static final String FREE = "free";
|
||||
/**
|
||||
* 会员充值
|
||||
*/
|
||||
public static final String MEMBER_IN = "memberIn";
|
||||
/**
|
||||
* 会员购买开通
|
||||
*/
|
||||
public static final String MEMBER_PAY = "memberPay";
|
||||
/**
|
||||
* 分销员购买开通
|
||||
*/
|
||||
public static final String DISTRIBUTION = "distribution";
|
||||
/**
|
||||
* 商家运营余额充值
|
||||
*/
|
||||
public static final String DISTRIBUTION_RECHARGE = "distributionRecharge";
|
||||
/**
|
||||
* 积分商品购买
|
||||
*/
|
||||
public static final String POINT = "point";
|
||||
/**
|
||||
* 拼团商品购买
|
||||
*/
|
||||
public static final String WARE = "ware";
|
||||
}
|
||||
}
|
||||
|
||||
class PayType {
|
||||
//支付
|
||||
public static final String PAY = "pay";
|
||||
//退款
|
||||
public static final String REFUND = "refund";
|
||||
/**
|
||||
* 退款补偿 退款失败的情况 会触发补偿
|
||||
* {@link com.czg.task.OTimeTask#refundCompensate()}
|
||||
*/
|
||||
public static final String REFUND_COMPENSATE = "refundCompensate";
|
||||
}
|
||||
class PayStatus {
|
||||
//初始化
|
||||
public static final String INIT = "init";
|
||||
//支付成功
|
||||
public static final String SUCCESS = "success";
|
||||
//支付失败
|
||||
public static final String FAIL = "fail";
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@ import com.czg.order.entity.GbOrderDetail;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@@ -33,6 +34,15 @@ public class GbOrderDetailVO extends GbOrderDetail {
|
||||
* 要求成团人数
|
||||
*/
|
||||
private Integer groupPeopleNum;
|
||||
/**
|
||||
* 商品原价
|
||||
*/
|
||||
private BigDecimal wareOriginalPrice;
|
||||
|
||||
/**
|
||||
* 商品拼团价
|
||||
*/
|
||||
private BigDecimal wareGroupPrice;
|
||||
/**
|
||||
* 店铺地址
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user