- 添加退货,换货原因,以及 enum 声明

This commit is contained in:
sin 2019-03-20 21:42:15 +08:00
parent 2ee7004f6e
commit 8df0b3fa6c
6 changed files with 192 additions and 1 deletions

View File

@ -0,0 +1,40 @@
package cn.iocoder.mall.order.constants;
/**
* 订单换货原因
*
* @author Sin
* @time 2019-03-20 21:17
*/
public enum OrderExchangeReasonEnum {
REASON_000(0, "其他"),
REASON_001(1, "尺码不合适"),
REASON_002(2, "质量问题"),
REASON_003(3, "不喜欢"),
;
private Integer value;
private String name;
OrderExchangeReasonEnum(Integer value, String name) {
this.value = value;
this.name = name;
}
@Override
public String toString() {
return "OrderCommonReasonEnum{" +
"value=" + value +
", name=" + name +
'}';
}
public Integer getValue() {
return value;
}
public String getName() {
return name;
}}

View File

@ -0,0 +1,52 @@
package cn.iocoder.mall.order.constants;
/**
* 订单退货原因
*
* @author Sin
* @time 2019-03-20 21:17
*/
public enum OrderReturnReasonEnum {
///
/// 未发货情况
REASON_000(0, "其他"),
REASON_001(1, "拍错/勿拍/多拍"),
REASON_002(2, "缺货"),
///
/// 已发货情况
REASON_020(20, "七天无理由"),
REASON_021(21, "质量问题"),
REASON_022(22, "不想要了"),
;
// TODO: 2019-03-20 Sin 已发货情况 补全需要对照一下 淘宝
private Integer value;
private String name;
OrderReturnReasonEnum(Integer value, String name) {
this.value = value;
this.name = name;
}
@Override
public String toString() {
return "OrderCommonReasonEnum{" +
"value=" + value +
", name=" + name +
'}';
}
public Integer getValue() {
return value;
}
public String getName() {
return name;
}}

View File

@ -0,0 +1,7 @@
/**
* 定义常量以及枚举信息
*
* @author Sin
* @time 2019-03-20 21:16
*/
package cn.iocoder.mall.order.constants;

View File

@ -41,6 +41,22 @@ public class OrderExchangeDO extends BaseDO {
*/ */
private Integer receiverOrderLogisticsId; private Integer receiverOrderLogisticsId;
///
/// 原因
/**
* 原因 (关联字典)
*
* {@link cn.iocoder.mall.order.constants.OrderExchangeReasonEnum}
*/
private Integer orderReasonId;
/**
* 原因如果选择其他原因保存在这
*
* {@link cn.iocoder.mall.order.constants.OrderExchangeReasonEnum#REASON_000}
*/
private String reason;
/// ///
/// 时间信息 /// 时间信息
@ -89,6 +105,8 @@ public class OrderExchangeDO extends BaseDO {
", exchangeSkuId='" + exchangeSkuId + '\'' + ", exchangeSkuId='" + exchangeSkuId + '\'' +
", exchangeOrderLogisticsId=" + exchangeOrderLogisticsId + ", exchangeOrderLogisticsId=" + exchangeOrderLogisticsId +
", receiverOrderLogisticsId=" + receiverOrderLogisticsId + ", receiverOrderLogisticsId=" + receiverOrderLogisticsId +
", orderReasonId=" + orderReasonId +
", reason='" + reason + '\'' +
", createTime=" + createTime + ", createTime=" + createTime +
", paymentTime=" + paymentTime + ", paymentTime=" + paymentTime +
", deliveryTime=" + deliveryTime + ", deliveryTime=" + deliveryTime +
@ -161,10 +179,30 @@ public class OrderExchangeDO extends BaseDO {
return this; return this;
} }
public Integer getOrderReasonId() {
return orderReasonId;
}
public OrderExchangeDO setOrderReasonId(Integer orderReasonId) {
this.orderReasonId = orderReasonId;
return this;
}
public String getReason() {
return reason;
}
public OrderExchangeDO setReason(String reason) {
this.reason = reason;
return this;
}
@Override
public Date getCreateTime() { public Date getCreateTime() {
return createTime; return createTime;
} }
@Override
public OrderExchangeDO setCreateTime(Date createTime) { public OrderExchangeDO setCreateTime(Date createTime) {
this.createTime = createTime; this.createTime = createTime;
return this; return this;

View File

@ -33,6 +33,22 @@ public class OrderReturnDO extends BaseDO {
*/ */
private String skuId; private String skuId;
///
/// 退货原因
/**
* 退货原因(字典值)
*
* {@link cn.iocoder.mall.order.constants.OrderReturnReasonEnum}
*/
private Integer orderReasonId;
/**
* 原因如果选择其他原因保存在这
*
* {@link cn.iocoder.mall.order.constants.OrderReturnReasonEnum#REASON_000}
*/
private String reason;
/// ///
/// 时间信息 /// 时间信息
@ -86,6 +102,8 @@ public class OrderReturnDO extends BaseDO {
", orderNo='" + orderNo + '\'' + ", orderNo='" + orderNo + '\'' +
", orderItemId=" + orderItemId + ", orderItemId=" + orderItemId +
", skuId='" + skuId + '\'' + ", skuId='" + skuId + '\'' +
", orderReasonId=" + orderReasonId +
", reason='" + reason + '\'' +
", createTime=" + createTime + ", createTime=" + createTime +
", approvalTime=" + approvalTime + ", approvalTime=" + approvalTime +
", logisticsTime=" + logisticsTime + ", logisticsTime=" + logisticsTime +
@ -141,10 +159,30 @@ public class OrderReturnDO extends BaseDO {
return this; return this;
} }
public Integer getOrderReasonId() {
return orderReasonId;
}
public OrderReturnDO setOrderReasonId(Integer orderReasonId) {
this.orderReasonId = orderReasonId;
return this;
}
public String getReason() {
return reason;
}
public OrderReturnDO setReason(String reason) {
this.reason = reason;
return this;
}
@Override
public Date getCreateTime() { public Date getCreateTime() {
return createTime; return createTime;
} }
@Override
public OrderReturnDO setCreateTime(Date createTime) { public OrderReturnDO setCreateTime(Date createTime) {
this.createTime = createTime; this.createTime = createTime;
return this; return this;

View File

@ -2,4 +2,20 @@
## 订单 ## 订单
TODO TODO
**退货**
1. 商家未发货,退货原因
- 拍错/勿拍/多拍
- 缺货
2. 商家已发货,退货原因
- 七天无理由
- 质量问题
- 不想要了
- 其他