RefundOrder.java 3.9 KB
Newer Older
D
dingzhiwei 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
/*
 * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com).
 * <p>
 * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0;
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p>
 * http://www.gnu.org/licenses/lgpl.html
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.jeequan.jeepay.core.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.jeequan.jeepay.core.model.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * <p>
 * 退款订单表
 * </p>
 *
 * @author [mybatis plus generator]
 * @since 2021-04-27
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_refund_order")
terrfly's avatar
terrfly 已提交
40 41 42 43 44 45
public class RefundOrder extends BaseModel {

    public static final byte STATE_INIT = 0; //订单生成
    public static final byte STATE_ING = 1; //退款中
    public static final byte STATE_SUCCESS = 2; //退款成功
    public static final byte STATE_FAIL = 3; //退款失败
46
    public static final byte STATE_CLOSED = 4; //退款任务关闭
D
dingzhiwei 已提交
47 48 49 50 51 52 53 54

    public static final LambdaQueryWrapper<RefundOrder> gw(){
        return new LambdaQueryWrapper<>();
    }

    private static final long serialVersionUID=1L;

    /**
terrfly's avatar
terrfly 已提交
55
     * 退款订单号(支付系统生成订单号)
D
dingzhiwei 已提交
56 57 58 59 60
     */
    @TableId
    private String refundOrderId;

    /**
terrfly's avatar
terrfly 已提交
61
     * 支付订单号(与t_pay_order对应)
D
dingzhiwei 已提交
62 63 64 65
     */
    private String payOrderId;

    /**
terrfly's avatar
terrfly 已提交
66
     * 渠道支付单号(与t_pay_order channel_order_no对应)
D
dingzhiwei 已提交
67 68 69 70 71 72 73 74 75
     */
    private String channelPayOrderNo;

    /**
     * 商户号
     */
    private String mchNo;

    /**
terrfly's avatar
terrfly 已提交
76
     * 服务商号
D
dingzhiwei 已提交
77
     */
terrfly's avatar
terrfly 已提交
78
    private String isvNo;
D
dingzhiwei 已提交
79 80

    /**
terrfly's avatar
terrfly 已提交
81
     * 应用ID
D
dingzhiwei 已提交
82
     */
terrfly's avatar
terrfly 已提交
83
    private String appId;
D
dingzhiwei 已提交
84 85

    /**
terrfly's avatar
terrfly 已提交
86
     * 商户名称
D
dingzhiwei 已提交
87
     */
terrfly's avatar
terrfly 已提交
88 89 90 91 92 93 94 95 96 97 98
    private String mchName;

    /**
     * 类型: 1-普通商户, 2-特约商户(服务商模式)
     */
    private Byte mchType;

    /**
     * 商户退款单号(商户系统的订单号)
     */
    private String mchRefundNo;
D
dingzhiwei 已提交
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125

    /**
     * 支付方式代码
     */
    private String wayCode;

    /**
     * 支付接口代码
     */
    private String ifCode;

    /**
     * 支付金额,单位分
     */
    private Long payAmount;

    /**
     * 退款金额,单位分
     */
    private Long refundAmount;

    /**
     * 三位货币代码,人民币:cny
     */
    private String currency;

    /**
126
     * 退款状态:0-订单生成,1-退款中,2-退款成功,3-退款失败,4-退款任务关闭
D
dingzhiwei 已提交
127 128 129 130 131 132 133 134 135
     */
    private Byte state;

    /**
     * 客户端IP
     */
    private String clientIp;

    /**
terrfly's avatar
terrfly 已提交
136
     * 退款原因
D
dingzhiwei 已提交
137
     */
terrfly's avatar
terrfly 已提交
138
    private String refundReason;
D
dingzhiwei 已提交
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174

    /**
     * 渠道订单号
     */
    private String channelOrderNo;

    /**
     * 渠道错误码
     */
    private String channelErrCode;

    /**
     * 渠道错误描述
     */
    private String channelErrMsg;

    /**
     * 特定渠道发起时额外参数
     */
    private String channelExtra;

    /**
     * 通知地址
     */
    private String notifyUrl;

    /**
     * 扩展参数
     */
    private String extParam;

    /**
     * 订单退款成功时间
     */
    private Date successTime;

175 176 177 178 179
    /**
     * 退款失效时间(失效后系统更改为退款任务关闭状态)
     */
    private Date expiredTime;

D
dingzhiwei 已提交
180 181 182 183 184 185 186 187 188 189 190
    /**
     * 创建时间
     */
    private Date createdAt;

    /**
     * 更新时间
     */
    private Date updatedAt;

}