package com.yeshi.fanli.entity.bus.user;
|
|
import java.math.BigDecimal;
|
|
import javax.persistence.Entity;
|
import javax.persistence.GeneratedValue;
|
import javax.persistence.GenerationType;
|
import javax.persistence.Id;
|
import javax.persistence.JoinColumn;
|
import javax.persistence.ManyToOne;
|
import javax.persistence.Table;
|
import javax.persistence.Transient;
|
|
import com.google.gson.annotations.Expose;
|
import org.yeshi.utils.mybatis.Column;
|
|
@Entity
|
@Table(name = "yeshi_ec_order_item")
|
@org.yeshi.utils.mybatis.Table("yeshi_ec_order_item")
|
public class OrderItem {
|
// -1:退款 1已支付 2结算 3已到账 4售后
|
public final static int STATE_TUIKUAN = -1;
|
public final static int STATE_YIZHIFU = 1;
|
public final static int STATE_JIESUAN = 2;
|
public final static int STATE_DAOZHANG = 3;
|
public final static int STATE_SHOUHOU = 4;
|
|
@Column(name = "id")
|
@Id
|
@GeneratedValue(strategy = GenerationType.AUTO)
|
@Expose
|
private Long id;
|
|
public OrderItem(Long id) {
|
this.id = id;
|
}
|
|
@Column(name = "picture")
|
@Expose
|
private String picture;// 图片
|
|
@Column(name = "auctionId")
|
@Expose
|
private Long auctionId;// 商品ID
|
|
@Column(name = "title")
|
@Expose
|
private String title;// 商品名称
|
|
@Column(name = "orderId")
|
@Expose
|
private String orderId;// 订单号
|
|
@Column(name = "type")
|
private Integer type;// 订单类型
|
|
@Column(name = "state")
|
@Expose
|
private Integer state; // -1:退款 1已支付 2结算 3已到账 4售后
|
|
@Column(name = "payMoney")
|
@Expose
|
private BigDecimal payMoney;// 付款金额
|
|
@Column(name = "fanMoney")
|
@Expose
|
private BigDecimal fanMoney;// 返利金额
|
|
@Column(name = "createTime")
|
@Expose
|
private Long createTime;
|
|
@Column(name = "settlementTime")
|
private Long settlementTime;// 结算时间
|
|
@Column(name = "refundTime")
|
private Long refundTime;// 退款时间
|
|
@Column(name = "fanTime")
|
private Long fanTime;// 返利时间
|
|
@Column(name = "isGift")
|
private Boolean isGift;// 是否有分销提成 true:有
|
|
@Transient
|
@Expose
|
private String desc;
|
|
@Column(name = "uid")
|
@ManyToOne
|
@JoinColumn(name = "uid")
|
private UserInfo userInfo;
|
|
@Column(name = "oid")
|
@ManyToOne
|
@JoinColumn(name = "oid")
|
private Order order;
|
|
@Column(name = "version")
|
private Integer version;// 版本1.2.3之前为1 后为2
|
|
@Column(name = "pre_pay_money")
|
@javax.persistence.Column(name = "pre_pay_money")
|
private BigDecimal prePayMoney;
|
|
@Expose
|
@Transient
|
private String stateDesc;// 状态简介
|
|
public String getStateDesc() {
|
return stateDesc;
|
}
|
|
public void setStateDesc(String stateDesc) {
|
this.stateDesc = stateDesc;
|
}
|
|
public BigDecimal getPrePayMoney() {
|
return prePayMoney;
|
}
|
|
public void setPrePayMoney(BigDecimal prePayMoney) {
|
this.prePayMoney = prePayMoney;
|
}
|
|
public OrderItem() {
|
}
|
|
public Long getId() {
|
return id;
|
}
|
|
public void setId(Long id) {
|
this.id = id;
|
}
|
|
public Boolean getIsGift() {
|
return isGift;
|
}
|
|
public void setIsGift(Boolean isGift) {
|
this.isGift = isGift;
|
}
|
|
public String getPicture() {
|
return picture;
|
}
|
|
public void setPicture(String picture) {
|
this.picture = picture;
|
}
|
|
public Integer getVersion() {
|
return version;
|
}
|
|
public void setVersion(Integer version) {
|
this.version = version;
|
}
|
|
public void setDesc(String desc) {
|
this.desc = desc;
|
}
|
|
public String getTitle() {
|
return title;
|
}
|
|
public void setTitle(String title) {
|
this.title = title;
|
}
|
|
public String getOrderId() {
|
return orderId;
|
}
|
|
public void setOrderId(String orderId) {
|
this.orderId = orderId;
|
}
|
|
public Integer getType() {
|
return type;
|
}
|
|
public void setType(Integer type) {
|
this.type = type;
|
}
|
|
public Integer getState() {
|
return state;
|
}
|
|
public void setState(Integer state) {
|
this.state = state;
|
}
|
|
public BigDecimal getPayMoney() {
|
return payMoney;
|
}
|
|
public void setPayMoney(BigDecimal payMoney) {
|
this.payMoney = payMoney;
|
}
|
|
public BigDecimal getFanMoney() {
|
return fanMoney;
|
}
|
|
public void setFanMoney(BigDecimal fanMoney) {
|
this.fanMoney = fanMoney;
|
}
|
|
public Long getCreateTime() {
|
return createTime;
|
}
|
|
public void setCreateTime(Long createTime) {
|
this.createTime = createTime;
|
}
|
|
public UserInfo getUserInfo() {
|
return userInfo;
|
}
|
|
public void setUserInfo(UserInfo userInfo) {
|
this.userInfo = userInfo;
|
}
|
|
public Order getOrder() {
|
return order;
|
}
|
|
public void setOrder(Order order) {
|
this.order = order;
|
}
|
|
public Long getAuctionId() {
|
return auctionId;
|
}
|
|
public void setAuctionId(Long auctionId) {
|
this.auctionId = auctionId;
|
}
|
|
public Long getSettlementTime() {
|
return settlementTime;
|
}
|
|
public void setSettlementTime(Long settlementTime) {
|
this.settlementTime = settlementTime;
|
}
|
|
public Long getFanTime() {
|
return fanTime;
|
}
|
|
public void setFanTime(Long fanTime) {
|
this.fanTime = fanTime;
|
}
|
|
public Long getRefundTime() {
|
return refundTime;
|
}
|
|
public void setRefundTime(Long refundTime) {
|
this.refundTime = refundTime;
|
}
|
|
public String getDesc() {
|
return desc;
|
}
|
|
public void setDesc() {
|
if (state == -1) {
|
this.desc = "退款订单不返利";
|
this.stateDesc = "已退款";
|
} else if (state == 1) {
|
this.desc = "确认收货15天后即可到账";
|
this.stateDesc = "未到账";
|
} else if (state == 2) {
|
this.desc = "确认收货15天后即可到账";
|
this.stateDesc = "未到账";
|
} else if (state == 3) {
|
this.desc = "已自动转入你的余额";
|
this.stateDesc = "已到账";
|
} else if (state == 4) {
|
this.desc = "售后订单无返利";
|
this.stateDesc = "已售后";
|
}
|
}
|
|
}
|