提交 ed8c6b9b authored 作者: YunaiV's avatar YunaiV

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

上级 a6c3bf44
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;
}
}
\ No newline at end of file
...@@ -11,16 +11,9 @@ public class CouponDO extends BaseDO { ...@@ -11,16 +11,9 @@ public class CouponDO extends BaseDO {
// ========== 基本信息 BEGIN ========== // ========== 基本信息 BEGIN ==========
/** /**
* 优惠劵(码)编号 * 优惠劵编号
*/ */
private Integer id; private Integer id;
/**
* 类型
*
* 1-优惠劵
* 2-优惠码
*/
private Integer type;
/** /**
* 优惠劵(码)分组编号,{@link CouponTemplateDO} 的 id * 优惠劵(码)分组编号,{@link CouponTemplateDO} 的 id
*/ */
...@@ -46,17 +39,9 @@ public class CouponDO extends BaseDO { ...@@ -46,17 +39,9 @@ public class CouponDO extends BaseDO {
// ========== 领取情况 BEGIN ========== // ========== 领取情况 BEGIN ==========
/** /**
* 是否领取 * 用户编号
*/
private Boolean taked;
/**
* 领取用户编号
*/ */
private Integer userId; private Integer userId;
/**
* 领取时间
*/
private Date takeTime;
/** /**
* 领取类型 * 领取类型
* *
......
...@@ -31,6 +31,15 @@ public class CouponTemplateDO extends BaseDO { ...@@ -31,6 +31,15 @@ public class CouponTemplateDO extends BaseDO {
* 2-优惠码 * 2-优惠码
*/ */
private Integer type; private Integer type;
/**
* 码类型
*
* 1-一卡一码(UNIQUE)
* 2-通用码(GENERAL)
*
* 【优惠码独有】 @see CouponCodeDO
*/
private Integer codeType;
/** /**
* 优惠码状态 * 优惠码状态
* *
...@@ -56,26 +65,16 @@ public class CouponTemplateDO extends BaseDO { ...@@ -56,26 +65,16 @@ public class CouponTemplateDO extends BaseDO {
* 删除时间 * 删除时间
*/ */
private Date deleteTime; private Date deleteTime;
// ========== 基本信息 END ==========
// ========== 码信息 BEGIN ==========
/** /**
* 码类型 * 可领取的开始时间
*
* 1-一卡一码(UNIQUE)
* 2-通用码(GENERAL)
*
* 【优惠码独有】
*/ */
private Integer codeType; private Date beginTime;
/** /**
* 优惠码 * 可领取的结束时间
*
* 【优惠码独有】
*/ */
private String code; private Date endTime;
// ========== 码信息 END ==========
// ========== 基本信息 END ==========
// ========== 领取规则 BEGIN ========== // ========== 领取规则 BEGIN ==========
// /** // /**
...@@ -119,12 +118,15 @@ public class CouponTemplateDO extends BaseDO { ...@@ -119,12 +118,15 @@ public class CouponTemplateDO extends BaseDO {
/** /**
* 可用范围的类型 * 可用范围的类型
* *
* 1-部分(ALL):全部商品可用 * 10-全部(ALL):所有可用
* 2-全部(PART):部分商品可用,或指定商品可用 * 20-部分(PART):部分商品可用,或指定商品可用
* 21-部分(PART):部分商品不可用,或指定商品可用
* 30-部分(PART):部分分类可用,或指定商品可用
* 31-部分(PART):部分分类不可用,或指定商品可用
*/ */
private Integer rangeType; private Integer rangeType;
/** /**
* 指定可用商品列表,使用逗号分隔商品编号 * 指定商品 / 分类列表,使用逗号分隔商品编号
*/ */
private String rangeValues; private String rangeValues;
/** /**
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论