diff --git a/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/bo/OrderItemBO.java b/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/bo/OrderItemBO.java index 6341f79bb..c6e390434 100644 --- a/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/bo/OrderItemBO.java +++ b/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/bo/OrderItemBO.java @@ -80,6 +80,15 @@ public class OrderItemBO implements Serializable { * - 4、换货 + 退货 */ private Integer hasReturnExchange; + /** + * 发货方式 + * + * - 1 未选择 + * - 2 在线下单 + * - 3 自己联系快递 + * - 4 无物流 + */ + private Integer deliveryType; /** * 状态 * @@ -121,6 +130,7 @@ public class OrderItemBO implements Serializable { ", receiverTime=" + receiverTime + ", closingTime=" + closingTime + ", hasReturnExchange=" + hasReturnExchange + + ", deliveryType=" + deliveryType + ", status=" + status + ", createTime=" + createTime + ", updateTime=" + updateTime + @@ -254,6 +264,15 @@ public class OrderItemBO implements Serializable { return this; } + public Integer getDeliveryType() { + return deliveryType; + } + + public OrderItemBO setDeliveryType(Integer deliveryType) { + this.deliveryType = deliveryType; + return this; + } + public Integer getStatus() { return status; } diff --git a/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/bo/OrderRecipientBO.java b/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/bo/OrderRecipientBO.java index eb0a6ba4c..e212b41e9 100644 --- a/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/bo/OrderRecipientBO.java +++ b/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/bo/OrderRecipientBO.java @@ -30,6 +30,10 @@ public class OrderRecipientBO extends BaseDO { * 收件手机号 */ private String mobile; + /** + * 手机方式 + */ + private Integer type; /** * 收件详细地址 */ @@ -43,6 +47,7 @@ public class OrderRecipientBO extends BaseDO { ", areaNo='" + areaNo + '\'' + ", name='" + name + '\'' + ", mobile='" + mobile + '\'' + + ", type=" + type + ", address='" + address + '\'' + '}'; } @@ -92,6 +97,15 @@ public class OrderRecipientBO extends BaseDO { return this; } + public Integer getType() { + return type; + } + + public OrderRecipientBO setType(Integer type) { + this.type = type; + return this; + } + public String getAddress() { return address; } diff --git a/order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/constants/OrderDeliveryTypeEnum.java b/order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/constants/OrderDeliveryTypeEnum.java new file mode 100644 index 000000000..8894047b0 --- /dev/null +++ b/order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/constants/OrderDeliveryTypeEnum.java @@ -0,0 +1,41 @@ +package cn.iocoder.mall.order.biz.constants; + +/** + * 发货类型/发货方式 + * + * @author Sin + * @time 2019-04-05 16:03 + */ +public enum OrderDeliveryTypeEnum { + + NONE(1, "未选择"), + ORDER_ONLINE(2, "快递"), + CONTACT_YOURSELF(3, "自己联系"), + NO_DELIVERY(4, "无物流信息"), + ; + + private Integer value; + + private String name; + + OrderDeliveryTypeEnum(Integer value, String name) { + this.value = value; + this.name = name; + } + + @Override + public String toString() { + return "OrderRecipientTypeEnum{" + + "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/biz/constants/OrderRecipientTypeEnum.java b/order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/constants/OrderRecipientTypeEnum.java new file mode 100644 index 000000000..5d813db2c --- /dev/null +++ b/order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/constants/OrderRecipientTypeEnum.java @@ -0,0 +1,39 @@ +package cn.iocoder.mall.order.biz.constants; + +/** + * 订单收件信息 type(配送信息) + * + * @author Sin + * @time 2019-04-05 16:03 + */ +public enum OrderRecipientTypeEnum { + + EXPRESS(1, "快递") + + ; + + private Integer value; + + private String name; + + OrderRecipientTypeEnum(Integer value, String name) { + this.value = value; + this.name = name; + } + + @Override + public String toString() { + return "OrderRecipientTypeEnum{" + + "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/biz/dataobject/OrderItemDO.java b/order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/dataobject/OrderItemDO.java index 043b1947d..704ed67c8 100644 --- a/order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/dataobject/OrderItemDO.java +++ b/order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/dataobject/OrderItemDO.java @@ -85,6 +85,15 @@ public class OrderItemDO extends DeletableDO { * - 4、换货 + 退货 */ private Integer hasReturnExchange; + /** + * 发货方式 + * + * - 1 未选择 + * - 2 在线下单 + * - 3 自己联系快递 + * - 4 无物流 + */ + private Integer deliveryType; /** * 状态 * @@ -114,6 +123,7 @@ public class OrderItemDO extends DeletableDO { ", receiverTime=" + receiverTime + ", closingTime=" + closingTime + ", hasReturnExchange=" + hasReturnExchange + + ", deliveryType=" + deliveryType + ", status=" + status + '}'; } @@ -253,6 +263,15 @@ public class OrderItemDO extends DeletableDO { return this; } + public Integer getDeliveryType() { + return deliveryType; + } + + public OrderItemDO setDeliveryType(Integer deliveryType) { + this.deliveryType = deliveryType; + return this; + } + public Integer getStatus() { return status; } diff --git a/order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/dataobject/OrderRecipientDO.java b/order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/dataobject/OrderRecipientDO.java index 27d27ada2..4b1ff1476 100644 --- a/order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/dataobject/OrderRecipientDO.java +++ b/order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/dataobject/OrderRecipientDO.java @@ -3,7 +3,7 @@ package cn.iocoder.mall.order.biz.dataobject; import cn.iocoder.common.framework.dataobject.BaseDO; /** - * 订单收件人信息 order_recipient + * 订单收件人信息 order_recipient (配送信息) * * @author Sin * @time 2019-03-31 11:37 @@ -30,6 +30,12 @@ public class OrderRecipientDO extends BaseDO { * 收件手机号 */ private String mobile; + /** + * 配送类型 + * + * - 1 快递 + */ + private Integer type; /** * 收件详细地址 */ @@ -43,6 +49,7 @@ public class OrderRecipientDO extends BaseDO { ", areaNo='" + areaNo + '\'' + ", name='" + name + '\'' + ", mobile='" + mobile + '\'' + + ", type=" + type + ", address='" + address + '\'' + '}'; } @@ -92,6 +99,15 @@ public class OrderRecipientDO extends BaseDO { return this; } + public Integer getType() { + return type; + } + + public OrderRecipientDO setType(Integer type) { + this.type = type; + return this; + } + public String getAddress() { return address; } diff --git a/order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/service/OrderServiceImpl.java b/order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/service/OrderServiceImpl.java index 76727b701..5d320185f 100644 --- a/order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/service/OrderServiceImpl.java +++ b/order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/service/OrderServiceImpl.java @@ -10,6 +10,8 @@ import cn.iocoder.mall.order.api.constant.OrderHasReturnExchangeEnum; import cn.iocoder.mall.order.api.constant.OrderStatusEnum; import cn.iocoder.mall.order.api.dto.*; import cn.iocoder.mall.order.biz.OrderCommon; +import cn.iocoder.mall.order.biz.constants.OrderDeliveryTypeEnum; +import cn.iocoder.mall.order.biz.constants.OrderRecipientTypeEnum; import cn.iocoder.mall.order.biz.convert.OrderConvert; import cn.iocoder.mall.order.biz.convert.OrderItemConvert; import cn.iocoder.mall.order.biz.convert.OrderLogisticsConvert; @@ -173,6 +175,7 @@ public class OrderServiceImpl implements OrderService { // 收件人信息 orderRecipientDO .setOrderId(orderDO.getId()) + .setType(OrderRecipientTypeEnum.EXPRESS.getValue()) .setCreateTime(new Date()) .setUpdateTime(null); @@ -193,6 +196,7 @@ public class OrderServiceImpl implements OrderService { .setReceiverTime(null) .setClosingTime(null) .setHasReturnExchange(OrderStatusEnum.WAITING_PAYMENT.getValue()) + .setDeliveryType(OrderDeliveryTypeEnum.NONE.getValue()) .setStatus(OrderStatusEnum.WAITING_PAYMENT.getValue()) .setDeleted(DeletedStatusEnum.DELETED_NO.getValue()) .setCreateTime(new Date()) diff --git a/order/order-service-impl/src/main/resources/mapper/OrderItemMapper.xml b/order/order-service-impl/src/main/resources/mapper/OrderItemMapper.xml index fcc19143d..fe369cfb1 100644 --- a/order/order-service-impl/src/main/resources/mapper/OrderItemMapper.xml +++ b/order/order-service-impl/src/main/resources/mapper/OrderItemMapper.xml @@ -5,7 +5,7 @@ id, order_id, order_no, sku_id, sku_name, sku_image, quantity, price, pay_amount, payment_time, delivery_time, receiver_time, closing_time, - has_return_exchange, status, create_time, update_time, deleted + has_return_exchange, delivery_type, status, create_time, update_time, deleted