- 订单添加 发货方式

- 配送信息 增加配送方式
pull/1/head
sin 2019-04-05 16:20:52 +08:00
parent 21bb6fd1c4
commit 8680064f8e
9 changed files with 162 additions and 7 deletions

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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())

View File

@ -5,7 +5,7 @@
<sql id="FIELDS">
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
</sql>
<!--
@ -15,11 +15,11 @@
INSERT INTO `order_item` (
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
) VALUES (
#{orderId}, #{orderNo}, #{skuId}, #{quantity}, #{price},
#{paymentTime}, #{deliveryTime}, #{receiverTime}, #{closingTime},
#{hasReturnExchange}, #{status},
#{hasReturnExchange}, #{deliveryType}, #{status},
#{createTime}, #{updateTime}, #{deleted}
)
</insert>
@ -73,6 +73,9 @@
<if test="status != null">
, status = #{status}
</if>
<if test="deliveryType != null">
, delivery_type = #{deliveryType}
</if>
<if test="deleted != null">
, `deleted` = #{deleted}
</if>

View File

@ -3,7 +3,7 @@
<mapper namespace="cn.iocoder.mall.order.biz.dao.OrderRecipientMapper">
<sql id="FIELDS">
id, order_id, `area_no`, `name`, mobile, address,
id, order_id, `area_no`, `name`, mobile, address, `type`,
create_time, update_time
</sql>
@ -13,10 +13,10 @@
<insert id="insert" parameterType="OrderRecipientDO" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
INSERT INTO `order_recipient` (
order_id, `area_no`, `name`, mobile, address,
create_time, update_time
`type`, create_time, update_time
) VALUES (
#{orderId}, #{areaNo}, #{name}, #{mobile}, #{address},
#{createTime}, #{updateTime}
#{type}, #{createTime}, #{updateTime}
)
</insert>