package com.yeshi.fanli.dto;
|
|
import java.math.BigDecimal;
|
import java.util.Date;
|
|
import javax.persistence.Transient;
|
|
import com.google.gson.annotations.Expose;
|
import com.yeshi.fanli.entity.bus.user.Order;
|
import com.yeshi.fanli.entity.bus.user.UserInfo;
|
|
/**
|
* 红包
|
*
|
* @author Administrator
|
*
|
*/
|
public class HongBao {
|
// 状态编号 1-未到时间不可领取 2-可领取 3-已经领取 4-红包失效
|
public final static int STATE_BUKELINGQU = 1;
|
public final static int STATE_KELINGQU = 2;
|
public final static int STATE_YILINGQU = 3;
|
public final static int STATE_SHIXIAO = 4;
|
|
// 淘宝购物红包
|
public final static int TYPE_TAOBAO = 1;
|
// 京东购物红包
|
public final static int TYPE_JINGDONG = 2;
|
// 活动红包
|
public final static int TYPE_HUODONG = 3;
|
// 新人红包
|
public final static int TYPE_XINREN = 4;
|
|
public final static int TYPE_YAOQING = 5;
|
// 一级分销红包
|
public final static int TYPE_YIJI = 6;
|
// 二级分销红包
|
public final static int TYPE_ERJI = 7;
|
|
// 一级分享赚分销红包
|
public final static int TYPE_SHARE_YIJI = 21;
|
// 二级分享赚分销红包
|
public final static int TYPE_SHARE_ERJI = 22;
|
|
// 分享商品得来的红包
|
public final static int TYPE_SHARE_GOODS = 20;
|
|
@Expose
|
private Long id;
|
|
private UserInfo userInfo;
|
|
private Long auctionId;
|
|
private BigDecimal payMoney;
|
|
/**
|
* 分销红包对应的最上级红包
|
*/
|
|
private HongBao parent;
|
|
private BigDecimal money;
|
|
private String param;// type对应的参数
|
|
@Expose
|
private Integer type;// 1-淘宝订单 2-京东订单 3-活动红包 4-新人红包 5.邀请好友红包(布心街的) 6.一级分销红包
|
// 7.二级分销红包 20-分享商品订单
|
|
@Expose
|
private Integer state;// 状态编号 1-未到时间不可领取 2-可领取 3-已经领取 4-红包失效
|
|
@Expose
|
private Long createtime;// 红包创建时间
|
|
@Expose
|
|
private Long preGettime;// 预计领取的时间
|
|
@Expose
|
private Long getTime;// 领取的时间
|
|
@Expose
|
private String getIp;// 领取的ip
|
|
@Expose
|
private String beizhu;
|
|
@Expose
|
private String orderId; // yes订单ID
|
|
// 子订单的ID,只针对直接购买商品产生的红包有效
|
private Long orderItemId;
|
|
@Expose
|
private Order order;
|
|
/**
|
* 红包拥有者的rank
|
*/
|
private Integer urank;
|
|
public HongBao() {
|
|
}
|
|
public HongBao(Long id) {
|
this.id = id;
|
}
|
|
private Boolean hasChild;
|
|
private Integer version;
|
|
private Date balanceTime;
|
|
@Transient // 分享邀请金额总额
|
private BigDecimal ShareAndInviteMoney;
|
|
public HongBao(UserInfo userInfo, BigDecimal money, String param, int type, int state, long createtime,
|
long preGettime, long getTime, String getIp, String beizhu) {
|
this.userInfo = userInfo;
|
this.money = money;
|
this.param = param;
|
this.type = type;
|
this.state = state;
|
this.createtime = createtime;
|
this.preGettime = preGettime;
|
this.getTime = getTime;
|
this.getIp = getIp;
|
this.beizhu = beizhu;
|
this.urank = 0;
|
this.hasChild = false;
|
this.version = 2;
|
}
|
|
public Boolean getHasChild() {
|
return hasChild;
|
}
|
|
public void setHasChild(Boolean hasChild) {
|
this.hasChild = hasChild;
|
}
|
|
public Long getOrderItemId() {
|
return orderItemId;
|
}
|
|
public void setOrderItemId(Long orderItemId) {
|
this.orderItemId = orderItemId;
|
}
|
|
public String getOrderId() {
|
return orderId;
|
}
|
|
public void setOrderId(String orderId) {
|
this.orderId = orderId;
|
}
|
|
public HongBao getParent() {
|
return parent;
|
}
|
|
public void setParent(HongBao parent) {
|
this.parent = parent;
|
}
|
|
public Order getOrder() {
|
return order;
|
}
|
|
public void setOrder(Order order) {
|
this.order = order;
|
}
|
|
public Integer getUrank() {
|
return urank;
|
}
|
|
public Long getAuctionId() {
|
return auctionId;
|
}
|
|
public void setAuctionId(Long auctionId) {
|
this.auctionId = auctionId;
|
}
|
|
public BigDecimal getPayMoney() {
|
return payMoney;
|
}
|
|
public void setPayMoney(BigDecimal payMoney) {
|
this.payMoney = payMoney;
|
}
|
|
public void setUrank(Integer urank) {
|
this.urank = urank;
|
}
|
|
public String getParam() {
|
return param;
|
}
|
|
public void setParam(String param) {
|
this.param = param;
|
}
|
|
public Integer getType() {
|
return type;
|
}
|
|
public void setType(Integer type) {
|
this.type = type;
|
}
|
|
public Long getId() {
|
return id;
|
}
|
|
public void setId(Long id) {
|
this.id = id;
|
}
|
|
public UserInfo getUserInfo() {
|
return userInfo;
|
}
|
|
public void setUserInfo(UserInfo userInfo) {
|
this.userInfo = userInfo;
|
}
|
|
public BigDecimal getMoney() {
|
return money;
|
}
|
|
public void setMoney(BigDecimal money) {
|
this.money = money;
|
}
|
|
public Integer getState() {
|
return state;
|
}
|
|
public void setState(Integer state) {
|
this.state = state;
|
}
|
|
public Long getCreatetime() {
|
return createtime;
|
}
|
|
public void setCreatetime(Long createtime) {
|
this.createtime = createtime;
|
}
|
|
public Long getPreGettime() {
|
return preGettime;
|
}
|
|
public void setPreGettime(Long preGettime) {
|
this.preGettime = preGettime;
|
}
|
|
public Long getGetTime() {
|
return getTime;
|
}
|
|
public void setGetTime(Long getTime) {
|
this.getTime = getTime;
|
}
|
|
public String getGetIp() {
|
return getIp;
|
}
|
|
public void setGetIp(String getIp) {
|
this.getIp = getIp;
|
}
|
|
public String getBeizhu() {
|
return beizhu;
|
}
|
|
public void setBeizhu(String beizhu) {
|
this.beizhu = beizhu;
|
}
|
|
public Integer getVersion() {
|
return version;
|
}
|
|
public void setVersion(Integer version) {
|
this.version = version;
|
}
|
|
public Date getBalanceTime() {
|
return balanceTime;
|
}
|
|
public void setBalanceTime(Date balanceTime) {
|
this.balanceTime = balanceTime;
|
}
|
|
public BigDecimal getShareAndInviteMoney() {
|
return ShareAndInviteMoney;
|
}
|
|
public void setShareAndInviteMoney(BigDecimal shareAndInviteMoney) {
|
ShareAndInviteMoney = shareAndInviteMoney;
|
}
|
|
}
|