后端 + 前端:优惠劵列表
This commit is contained in:
@@ -81,7 +81,7 @@ public class CouponTemplateBO {
|
||||
* 生效日期类型
|
||||
*
|
||||
* 1-固定日期
|
||||
* 2-领取日期:领到券 {@link #fixedBeginTerm} 日开始 N 天内有效
|
||||
* 2-领取日期:领到券 {@link #fixedStartTerm} 日开始 N 天内有效
|
||||
*/
|
||||
private Integer dateType;
|
||||
/**
|
||||
@@ -97,7 +97,7 @@ public class CouponTemplateBO {
|
||||
*
|
||||
* 例如,0-当天;1-次天
|
||||
*/
|
||||
private Integer fixedBeginTerm;
|
||||
private Integer fixedStartTerm;
|
||||
/**
|
||||
* 领取日期-结束天数
|
||||
*/
|
||||
@@ -323,12 +323,12 @@ public class CouponTemplateBO {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getFixedBeginTerm() {
|
||||
return fixedBeginTerm;
|
||||
public Integer getFixedStartTerm() {
|
||||
return fixedStartTerm;
|
||||
}
|
||||
|
||||
public CouponTemplateBO setFixedBeginTerm(Integer fixedBeginTerm) {
|
||||
this.fixedBeginTerm = fixedBeginTerm;
|
||||
public CouponTemplateBO setFixedStartTerm(Integer fixedStartTerm) {
|
||||
this.fixedStartTerm = fixedStartTerm;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,33 @@
|
||||
package cn.iocoder.mall.promotion.api.bo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class CouponTemplatePageBO {
|
||||
|
||||
/**
|
||||
* 优惠劵(码)数组
|
||||
*/
|
||||
private List<CouponTemplateBO> list;
|
||||
/**
|
||||
* 总量
|
||||
*/
|
||||
private Integer total;
|
||||
|
||||
public CouponTemplatePageBO setList(List<CouponTemplateBO> list) {
|
||||
this.list = list;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CouponTemplatePageBO setTotal(Integer total) {
|
||||
this.total = total;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<CouponTemplateBO> getList() {
|
||||
return list;
|
||||
}
|
||||
|
||||
public Integer getTotal() {
|
||||
return total;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ public enum CouponTemplateStatusEnum {
|
||||
|
||||
ENABLE(1, "开启中"),
|
||||
DISABLE(2, "禁用中"),
|
||||
EXPIRE(3, "已过期"),
|
||||
// EXPIRE(3, "已过期"), TODO 芋艿,暂时不考虑过期的
|
||||
;
|
||||
|
||||
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CouponTemplateStatusEnum::getValue).toArray();
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
package cn.iocoder.mall.promotion.api.dto;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 优惠劵模板分页 DTO
|
||||
*/
|
||||
public class CouponTemplatePageDTO {
|
||||
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
private Integer type;
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
@@ -18,4 +24,62 @@ public class CouponTemplatePageDTO {
|
||||
*/
|
||||
private Integer preferentialType;
|
||||
|
||||
@NotNull(message = "页码不能为空")
|
||||
private Integer pageNo;
|
||||
@NotNull(message = "每页条数不能为空")
|
||||
private Integer pageSize;
|
||||
|
||||
public Integer getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public CouponTemplatePageDTO setType(Integer type) {
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public CouponTemplatePageDTO setTitle(String title) {
|
||||
this.title = title;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public CouponTemplatePageDTO setStatus(Integer status) {
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getPreferentialType() {
|
||||
return preferentialType;
|
||||
}
|
||||
|
||||
public CouponTemplatePageDTO setPreferentialType(Integer preferentialType) {
|
||||
this.preferentialType = preferentialType;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getPageNo() {
|
||||
return pageNo;
|
||||
}
|
||||
|
||||
public CouponTemplatePageDTO setPageNo(Integer pageNo) {
|
||||
this.pageNo = pageNo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getPageSize() {
|
||||
return pageSize;
|
||||
}
|
||||
|
||||
public CouponTemplatePageDTO setPageSize(Integer pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user