From 1fb1373342c8390fc0e9cb982a312871466034b7 Mon Sep 17 00:00:00 2001 From: sin <2943460818@qq.com> Date: Fri, 22 Mar 2019 21:49:55 +0800 Subject: [PATCH] =?UTF-8?q?constants=20=E6=94=B9=E4=B8=BA=20constant=20?= =?UTF-8?q?=E4=BF=9D=E6=8C=81=E7=9B=AE=E5=BD=95=E7=BB=93=E6=9E=84=E4=B8=80?= =?UTF-8?q?=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{constants => constant}/MQConstants.java | 2 +- .../constant/OrderHasReturnExchangeEnum.java | 37 +++++++++++++++ .../OrderPayStatusEnum.java | 2 +- .../order/api/constant/OrderStatusEnum.java | 38 ++++++++++++++++ .../api/constants/OrderDeleteStatusEnum.java | 31 ------------- .../order/api/constants/OrderStatusEnum.java | 45 ------------------- 6 files changed, 77 insertions(+), 78 deletions(-) rename order/order-service-api/src/main/java/cn/iocoder/mall/order/api/{constants => constant}/MQConstants.java (83%) create mode 100644 order/order-service-api/src/main/java/cn/iocoder/mall/order/api/constant/OrderHasReturnExchangeEnum.java rename order/order-service-api/src/main/java/cn/iocoder/mall/order/api/{constants => constant}/OrderPayStatusEnum.java (92%) create mode 100644 order/order-service-api/src/main/java/cn/iocoder/mall/order/api/constant/OrderStatusEnum.java delete mode 100644 order/order-service-api/src/main/java/cn/iocoder/mall/order/api/constants/OrderDeleteStatusEnum.java delete mode 100644 order/order-service-api/src/main/java/cn/iocoder/mall/order/api/constants/OrderStatusEnum.java diff --git a/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/constants/MQConstants.java b/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/constant/MQConstants.java similarity index 83% rename from order/order-service-api/src/main/java/cn/iocoder/mall/order/api/constants/MQConstants.java rename to order/order-service-api/src/main/java/cn/iocoder/mall/order/api/constant/MQConstants.java index b19bc9dd4..d6a656fe1 100644 --- a/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/constants/MQConstants.java +++ b/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/constant/MQConstants.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.order.api.constants; +package cn.iocoder.mall.order.api.constant; /** * MQ 订阅消息 diff --git a/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/constant/OrderHasReturnExchangeEnum.java b/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/constant/OrderHasReturnExchangeEnum.java new file mode 100644 index 000000000..b7e03f5a4 --- /dev/null +++ b/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/constant/OrderHasReturnExchangeEnum.java @@ -0,0 +1,37 @@ +package cn.iocoder.mall.order.api.constant; + +/** + * 订单 - 是否退换货状态 + * + * @author Sin + * @time 2019-03-22 21:34 + */ +public enum OrderHasReturnExchangeEnum { + + NO(1, "没有"), + RETURN_GOODS(2, "退货"), + EXCHANGE_GOODS(2, "换货"), + RETURN_EXCHANGE_GOODS(2, "退换货"); + + /** + * 状态值 + */ + private Integer value; + /** + * 状态名 + */ + private String name; + + OrderHasReturnExchangeEnum(Integer value, String name) { + this.value = value; + this.name = name; + } + + public Integer getValue() { + return value; + } + + public String getName() { + return name; + } +} diff --git a/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/constants/OrderPayStatusEnum.java b/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/constant/OrderPayStatusEnum.java similarity index 92% rename from order/order-service-api/src/main/java/cn/iocoder/mall/order/api/constants/OrderPayStatusEnum.java rename to order/order-service-api/src/main/java/cn/iocoder/mall/order/api/constant/OrderPayStatusEnum.java index 852cd835f..d26bdf190 100644 --- a/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/constants/OrderPayStatusEnum.java +++ b/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/constant/OrderPayStatusEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.order.api.constants; +package cn.iocoder.mall.order.api.constant; /** * 订单状态 status diff --git a/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/constant/OrderStatusEnum.java b/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/constant/OrderStatusEnum.java new file mode 100644 index 000000000..7ec9170b8 --- /dev/null +++ b/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/constant/OrderStatusEnum.java @@ -0,0 +1,38 @@ +package cn.iocoder.mall.order.api.constant; + +/** + * 订单 - status + * + * @author Sin + * @time 2019-03-16 14:06 + */ +public enum OrderStatusEnum { + + WAITING_PAYMENT(1, "等待付款"), + WAIT_SHIPMENT(2, "等待发货"), + ALREADY_SHIPMENT(3, "已发货"), + COMPLETED(4, "已完成"), + CLOSED(5, "已关闭"); + + /** + * 状态值 + */ + private Integer value; + /** + * 状态名 + */ + private String name; + + OrderStatusEnum(int value, String name) { + this.value = value; + this.name = name; + } + + public int getValue() { + return value; + } + + public String getName() { + return name; + } +} diff --git a/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/constants/OrderDeleteStatusEnum.java b/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/constants/OrderDeleteStatusEnum.java deleted file mode 100644 index b75b7105f..000000000 --- a/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/constants/OrderDeleteStatusEnum.java +++ /dev/null @@ -1,31 +0,0 @@ -package cn.iocoder.mall.order.api.constants; - -/** - * 订单 deleteStatus - * - * @author Sin - * @time 2019-03-17 20:58 - */ -public enum OrderDeleteStatusEnum { - - DELETE_NO(0, "正常"), - DELETE_YES(1, "已删除") - ; - - private final int value; - - private final String name; - - OrderDeleteStatusEnum(int value, String name) { - this.value = value; - this.name = name; - } - - public int getValue() { - return value; - } - - public String getName() { - return name; - } -} diff --git a/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/constants/OrderStatusEnum.java b/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/constants/OrderStatusEnum.java deleted file mode 100644 index d52dca864..000000000 --- a/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/constants/OrderStatusEnum.java +++ /dev/null @@ -1,45 +0,0 @@ -package cn.iocoder.mall.order.api.constants; - -/** - * 订单 - status - * - * @author Sin - * @time 2019-03-16 14:06 - */ -public enum OrderStatusEnum { - - // 基本状态 - WAIT_SHIPMENT(0, "等待发货"), - ALREADY_SHIPMENT(1, "已发货"), - RECEIVED_GOODS(2, "已收货"), - CONFIRM_RECEIPT_GOODS(3, "确认收货"), // 确认收货,也就是交易成功! - - // 换货 - APPLY_EXCHANGE_GOODS(20, "申请换货"), - EXCHANGE_GOODS(21, "换货中"), - EXCHANGE_GOODS_SUCCESSFUL(22, "换货成功"), - - // 退货 - APPLY_RETURN_GOODS(40, "申请退货"), - RETURN_GOODS(41, "退货中"), - RETURN_GOODS_SUCCESSFUL(42, "退货成功"), - - ; - - private final int value; - - private final String name; - - OrderStatusEnum(int value, String name) { - this.value = value; - this.name = name; - } - - public int getValue() { - return value; - } - - public String getName() { - return name; - } -}