后端:和老田沟通了下,修改了优惠码的存储方式

This commit is contained in:
YunaiV 2019-03-31 23:38:05 +08:00
parent a6c3bf440f
commit ed8c6b9b64
3 changed files with 115 additions and 38 deletions

View File

@ -0,0 +1,90 @@
package cn.iocoder.mall.promotion.biz.dataobject;
import cn.iocoder.common.framework.dataobject.BaseDO;
import java.util.Date;
/**
* 优惠码
*/
public class CouponCodeDO extends BaseDO {
/**
* 编号
*/
private Integer id;
/**
* 模板编号 {@link CouponTemplateDO} id
*/
private Integer templateId;
/**
* 优惠码
*/
private Integer code;
/**
* 领取时间
*/
private Date takeTime;
/**
* 领取用户编号
*/
private Integer userId;
/**
* 领取的优惠劵编号
*/
private Integer couponId;
public Integer getId() {
return id;
}
public CouponCodeDO setId(Integer id) {
this.id = id;
return this;
}
public Integer getTemplateId() {
return templateId;
}
public CouponCodeDO setTemplateId(Integer templateId) {
this.templateId = templateId;
return this;
}
public Integer getCode() {
return code;
}
public CouponCodeDO setCode(Integer code) {
this.code = code;
return this;
}
public Date getTakeTime() {
return takeTime;
}
public CouponCodeDO setTakeTime(Date takeTime) {
this.takeTime = takeTime;
return this;
}
public Integer getUserId() {
return userId;
}
public CouponCodeDO setUserId(Integer userId) {
this.userId = userId;
return this;
}
public Integer getCouponId() {
return couponId;
}
public CouponCodeDO setCouponId(Integer couponId) {
this.couponId = couponId;
return this;
}
}

View File

@ -11,16 +11,9 @@ public class CouponDO extends BaseDO {
// ========== 基本信息 BEGIN ==========
/**
* 优惠劵编号
* 优惠劵编号
*/
private Integer id;
/**
* 类型
*
* 1-优惠劵
* 2-优惠码
*/
private Integer type;
/**
* 优惠劵分组编号{@link CouponTemplateDO} id
*/
@ -46,17 +39,9 @@ public class CouponDO extends BaseDO {
// ========== 领取情况 BEGIN ==========
/**
* 是否领取
*/
private Boolean taked;
/**
* 领取用户编号
* 用户编号
*/
private Integer userId;
/**
* 领取时间
*/
private Date takeTime;
/**
* 领取类型
*

View File

@ -31,6 +31,15 @@ public class CouponTemplateDO extends BaseDO {
* 2-优惠码
*/
private Integer type;
/**
* 码类型
*
* 1-一卡一码UNIQUE
* 2-通用码GENERAL
*
* 优惠码独有 @see CouponCodeDO
*/
private Integer codeType;
/**
* 优惠码状态
*
@ -56,27 +65,17 @@ public class CouponTemplateDO extends BaseDO {
* 删除时间
*/
private Date deleteTime;
/**
* 可领取的开始时间
*/
private Date beginTime;
/**
* 可领取的结束时间
*/
private Date endTime;
// ========== 基本信息 END ==========
// ========== 码信息 BEGIN ==========
/**
* 码类型
*
* 1-一卡一码UNIQUE
* 2-通用码GENERAL
*
* 优惠码独有
*/
private Integer codeType;
/**
* 优惠码
*
* 优惠码独有
*/
private String code;
// ========== 码信息 END ==========
// ========== 领取规则 BEGIN ==========
// /**
// * 是否限制领用者的等级
@ -119,12 +118,15 @@ public class CouponTemplateDO extends BaseDO {
/**
* 可用范围的类型
*
* 1-部分ALL全部商品可用
* 2-全部PART部分商品可用或指定商品可用
* 10-全部ALL所有可用
* 20-部分PART部分商品可用或指定商品可用
* 21-部分PART部分商品不可用或指定商品可用
* 30-部分PART部分分类可用或指定商品可用
* 31-部分PART部分分类不可用或指定商品可用
*/
private Integer rangeType;
/**
* 指定可用商品列表使用逗号分隔商品编号
* 指定商品 / 分类列表使用逗号分隔商品编号
*/
private String rangeValues;
/**