From ed8c6b9b6458ed8da0b90f05d48d7f84b8a6c6ed Mon Sep 17 00:00:00 2001 From: YunaiV <> Date: Sun, 31 Mar 2019 23:38:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8E=E7=AB=AF=EF=BC=9A=E5=92=8C=E8=80=81?= =?UTF-8?q?=E7=94=B0=E6=B2=9F=E9=80=9A=E4=BA=86=E4=B8=8B=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E4=BA=86=E4=BC=98=E6=83=A0=E7=A0=81=E7=9A=84=E5=AD=98?= =?UTF-8?q?=E5=82=A8=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../biz/dataobject/CouponCodeDO.java | 90 +++++++++++++++++++ .../promotion/biz/dataobject/CouponDO.java | 19 +--- .../biz/dataobject/CouponTemplateDO.java | 44 ++++----- 3 files changed, 115 insertions(+), 38 deletions(-) create mode 100644 promotion/promotion-service-impl/src/main/java/cn/iocoder/mall/promotion/biz/dataobject/CouponCodeDO.java diff --git a/promotion/promotion-service-impl/src/main/java/cn/iocoder/mall/promotion/biz/dataobject/CouponCodeDO.java b/promotion/promotion-service-impl/src/main/java/cn/iocoder/mall/promotion/biz/dataobject/CouponCodeDO.java new file mode 100644 index 000000000..b82e067be --- /dev/null +++ b/promotion/promotion-service-impl/src/main/java/cn/iocoder/mall/promotion/biz/dataobject/CouponCodeDO.java @@ -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; + } +} \ No newline at end of file diff --git a/promotion/promotion-service-impl/src/main/java/cn/iocoder/mall/promotion/biz/dataobject/CouponDO.java b/promotion/promotion-service-impl/src/main/java/cn/iocoder/mall/promotion/biz/dataobject/CouponDO.java index 3165477f0..9e62e5833 100644 --- a/promotion/promotion-service-impl/src/main/java/cn/iocoder/mall/promotion/biz/dataobject/CouponDO.java +++ b/promotion/promotion-service-impl/src/main/java/cn/iocoder/mall/promotion/biz/dataobject/CouponDO.java @@ -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; /** * 领取类型 * diff --git a/promotion/promotion-service-impl/src/main/java/cn/iocoder/mall/promotion/biz/dataobject/CouponTemplateDO.java b/promotion/promotion-service-impl/src/main/java/cn/iocoder/mall/promotion/biz/dataobject/CouponTemplateDO.java index 1932547dd..a141ff540 100644 --- a/promotion/promotion-service-impl/src/main/java/cn/iocoder/mall/promotion/biz/dataobject/CouponTemplateDO.java +++ b/promotion/promotion-service-impl/src/main/java/cn/iocoder/mall/promotion/biz/dataobject/CouponTemplateDO.java @@ -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; /**