diff --git a/order/order-service-impl/src/main/java/cn/iocoder/mall/order/constants/OrderExchangeReasonEnum.java b/order/order-service-impl/src/main/java/cn/iocoder/mall/order/constants/OrderExchangeReasonEnum.java new file mode 100644 index 000000000..a83879416 --- /dev/null +++ b/order/order-service-impl/src/main/java/cn/iocoder/mall/order/constants/OrderExchangeReasonEnum.java @@ -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; + }} diff --git a/order/order-service-impl/src/main/java/cn/iocoder/mall/order/constants/OrderReturnReasonEnum.java b/order/order-service-impl/src/main/java/cn/iocoder/mall/order/constants/OrderReturnReasonEnum.java new file mode 100644 index 000000000..6e6751892 --- /dev/null +++ b/order/order-service-impl/src/main/java/cn/iocoder/mall/order/constants/OrderReturnReasonEnum.java @@ -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; + }} diff --git a/order/order-service-impl/src/main/java/cn/iocoder/mall/order/constants/package-info.java b/order/order-service-impl/src/main/java/cn/iocoder/mall/order/constants/package-info.java new file mode 100644 index 000000000..5d683d051 --- /dev/null +++ b/order/order-service-impl/src/main/java/cn/iocoder/mall/order/constants/package-info.java @@ -0,0 +1,7 @@ +/** + * 定义常量,以及枚举信息 + * + * @author Sin + * @time 2019-03-20 21:16 + */ +package cn.iocoder.mall.order.constants; \ No newline at end of file diff --git a/order/order-service-impl/src/main/java/cn/iocoder/mall/order/dataobject/OrderExchangeDO.java b/order/order-service-impl/src/main/java/cn/iocoder/mall/order/dataobject/OrderExchangeDO.java index dfba3c91f..f01e392e6 100644 --- a/order/order-service-impl/src/main/java/cn/iocoder/mall/order/dataobject/OrderExchangeDO.java +++ b/order/order-service-impl/src/main/java/cn/iocoder/mall/order/dataobject/OrderExchangeDO.java @@ -41,6 +41,22 @@ public class OrderExchangeDO extends BaseDO { */ 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 + '\'' + ", exchangeOrderLogisticsId=" + exchangeOrderLogisticsId + ", receiverOrderLogisticsId=" + receiverOrderLogisticsId + + ", orderReasonId=" + orderReasonId + + ", reason='" + reason + '\'' + ", createTime=" + createTime + ", paymentTime=" + paymentTime + ", deliveryTime=" + deliveryTime + @@ -161,10 +179,30 @@ public class OrderExchangeDO extends BaseDO { 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() { return createTime; } + @Override public OrderExchangeDO setCreateTime(Date createTime) { this.createTime = createTime; return this; diff --git a/order/order-service-impl/src/main/java/cn/iocoder/mall/order/dataobject/OrderReturnDO.java b/order/order-service-impl/src/main/java/cn/iocoder/mall/order/dataobject/OrderReturnDO.java index c0df58fc3..3e6714d87 100644 --- a/order/order-service-impl/src/main/java/cn/iocoder/mall/order/dataobject/OrderReturnDO.java +++ b/order/order-service-impl/src/main/java/cn/iocoder/mall/order/dataobject/OrderReturnDO.java @@ -33,6 +33,22 @@ public class OrderReturnDO extends BaseDO { */ 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 + '\'' + ", orderItemId=" + orderItemId + ", skuId='" + skuId + '\'' + + ", orderReasonId=" + orderReasonId + + ", reason='" + reason + '\'' + ", createTime=" + createTime + ", approvalTime=" + approvalTime + ", logisticsTime=" + logisticsTime + @@ -141,10 +159,30 @@ public class OrderReturnDO extends BaseDO { 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() { return createTime; } + @Override public OrderReturnDO setCreateTime(Date createTime) { this.createTime = createTime; return this; diff --git a/order/order-service-impl/src/main/java/cn/iocoder/mall/order/dataobject/README.md b/order/order-service-impl/src/main/java/cn/iocoder/mall/order/dataobject/README.md index 9648f3929..f42e41382 100644 --- a/order/order-service-impl/src/main/java/cn/iocoder/mall/order/dataobject/README.md +++ b/order/order-service-impl/src/main/java/cn/iocoder/mall/order/dataobject/README.md @@ -2,4 +2,20 @@ ## 订单 -TODO \ No newline at end of file +TODO + + +**退货** + +1. 商家未发货,退货原因 + + - 拍错/勿拍/多拍 + - 缺货 + +2. 商家已发货,退货原因 + + - 七天无理由 + - 质量问题 + - 不想要了 + - 其他 + \ No newline at end of file