parent
21bb6fd1c4
commit
8680064f8e
|
@ -80,6 +80,15 @@ public class OrderItemBO implements Serializable {
|
||||||
* - 4、换货 + 退货
|
* - 4、换货 + 退货
|
||||||
*/
|
*/
|
||||||
private Integer hasReturnExchange;
|
private Integer hasReturnExchange;
|
||||||
|
/**
|
||||||
|
* 发货方式
|
||||||
|
*
|
||||||
|
* - 1 未选择
|
||||||
|
* - 2 在线下单
|
||||||
|
* - 3 自己联系快递
|
||||||
|
* - 4 无物流
|
||||||
|
*/
|
||||||
|
private Integer deliveryType;
|
||||||
/**
|
/**
|
||||||
* 状态
|
* 状态
|
||||||
*
|
*
|
||||||
|
@ -121,6 +130,7 @@ public class OrderItemBO implements Serializable {
|
||||||
", receiverTime=" + receiverTime +
|
", receiverTime=" + receiverTime +
|
||||||
", closingTime=" + closingTime +
|
", closingTime=" + closingTime +
|
||||||
", hasReturnExchange=" + hasReturnExchange +
|
", hasReturnExchange=" + hasReturnExchange +
|
||||||
|
", deliveryType=" + deliveryType +
|
||||||
", status=" + status +
|
", status=" + status +
|
||||||
", createTime=" + createTime +
|
", createTime=" + createTime +
|
||||||
", updateTime=" + updateTime +
|
", updateTime=" + updateTime +
|
||||||
|
@ -254,6 +264,15 @@ public class OrderItemBO implements Serializable {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Integer getDeliveryType() {
|
||||||
|
return deliveryType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public OrderItemBO setDeliveryType(Integer deliveryType) {
|
||||||
|
this.deliveryType = deliveryType;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public Integer getStatus() {
|
public Integer getStatus() {
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,10 @@ public class OrderRecipientBO extends BaseDO {
|
||||||
* 收件手机号
|
* 收件手机号
|
||||||
*/
|
*/
|
||||||
private String mobile;
|
private String mobile;
|
||||||
|
/**
|
||||||
|
* 手机方式
|
||||||
|
*/
|
||||||
|
private Integer type;
|
||||||
/**
|
/**
|
||||||
* 收件详细地址
|
* 收件详细地址
|
||||||
*/
|
*/
|
||||||
|
@ -43,6 +47,7 @@ public class OrderRecipientBO extends BaseDO {
|
||||||
", areaNo='" + areaNo + '\'' +
|
", areaNo='" + areaNo + '\'' +
|
||||||
", name='" + name + '\'' +
|
", name='" + name + '\'' +
|
||||||
", mobile='" + mobile + '\'' +
|
", mobile='" + mobile + '\'' +
|
||||||
|
", type=" + type +
|
||||||
", address='" + address + '\'' +
|
", address='" + address + '\'' +
|
||||||
'}';
|
'}';
|
||||||
}
|
}
|
||||||
|
@ -92,6 +97,15 @@ public class OrderRecipientBO extends BaseDO {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Integer getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public OrderRecipientBO setType(Integer type) {
|
||||||
|
this.type = type;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public String getAddress() {
|
public String getAddress() {
|
||||||
return address;
|
return address;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -85,6 +85,15 @@ public class OrderItemDO extends DeletableDO {
|
||||||
* - 4、换货 + 退货
|
* - 4、换货 + 退货
|
||||||
*/
|
*/
|
||||||
private Integer hasReturnExchange;
|
private Integer hasReturnExchange;
|
||||||
|
/**
|
||||||
|
* 发货方式
|
||||||
|
*
|
||||||
|
* - 1 未选择
|
||||||
|
* - 2 在线下单
|
||||||
|
* - 3 自己联系快递
|
||||||
|
* - 4 无物流
|
||||||
|
*/
|
||||||
|
private Integer deliveryType;
|
||||||
/**
|
/**
|
||||||
* 状态
|
* 状态
|
||||||
*
|
*
|
||||||
|
@ -114,6 +123,7 @@ public class OrderItemDO extends DeletableDO {
|
||||||
", receiverTime=" + receiverTime +
|
", receiverTime=" + receiverTime +
|
||||||
", closingTime=" + closingTime +
|
", closingTime=" + closingTime +
|
||||||
", hasReturnExchange=" + hasReturnExchange +
|
", hasReturnExchange=" + hasReturnExchange +
|
||||||
|
", deliveryType=" + deliveryType +
|
||||||
", status=" + status +
|
", status=" + status +
|
||||||
'}';
|
'}';
|
||||||
}
|
}
|
||||||
|
@ -253,6 +263,15 @@ public class OrderItemDO extends DeletableDO {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Integer getDeliveryType() {
|
||||||
|
return deliveryType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public OrderItemDO setDeliveryType(Integer deliveryType) {
|
||||||
|
this.deliveryType = deliveryType;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public Integer getStatus() {
|
public Integer getStatus() {
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@ package cn.iocoder.mall.order.biz.dataobject;
|
||||||
import cn.iocoder.common.framework.dataobject.BaseDO;
|
import cn.iocoder.common.framework.dataobject.BaseDO;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 订单收件人信息 order_recipient
|
* 订单收件人信息 order_recipient (配送信息)
|
||||||
*
|
*
|
||||||
* @author Sin
|
* @author Sin
|
||||||
* @time 2019-03-31 11:37
|
* @time 2019-03-31 11:37
|
||||||
|
@ -30,6 +30,12 @@ public class OrderRecipientDO extends BaseDO {
|
||||||
* 收件手机号
|
* 收件手机号
|
||||||
*/
|
*/
|
||||||
private String mobile;
|
private String mobile;
|
||||||
|
/**
|
||||||
|
* 配送类型
|
||||||
|
*
|
||||||
|
* - 1 快递
|
||||||
|
*/
|
||||||
|
private Integer type;
|
||||||
/**
|
/**
|
||||||
* 收件详细地址
|
* 收件详细地址
|
||||||
*/
|
*/
|
||||||
|
@ -43,6 +49,7 @@ public class OrderRecipientDO extends BaseDO {
|
||||||
", areaNo='" + areaNo + '\'' +
|
", areaNo='" + areaNo + '\'' +
|
||||||
", name='" + name + '\'' +
|
", name='" + name + '\'' +
|
||||||
", mobile='" + mobile + '\'' +
|
", mobile='" + mobile + '\'' +
|
||||||
|
", type=" + type +
|
||||||
", address='" + address + '\'' +
|
", address='" + address + '\'' +
|
||||||
'}';
|
'}';
|
||||||
}
|
}
|
||||||
|
@ -92,6 +99,15 @@ public class OrderRecipientDO extends BaseDO {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Integer getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public OrderRecipientDO setType(Integer type) {
|
||||||
|
this.type = type;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public String getAddress() {
|
public String getAddress() {
|
||||||
return address;
|
return address;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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.constant.OrderStatusEnum;
|
||||||
import cn.iocoder.mall.order.api.dto.*;
|
import cn.iocoder.mall.order.api.dto.*;
|
||||||
import cn.iocoder.mall.order.biz.OrderCommon;
|
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.OrderConvert;
|
||||||
import cn.iocoder.mall.order.biz.convert.OrderItemConvert;
|
import cn.iocoder.mall.order.biz.convert.OrderItemConvert;
|
||||||
import cn.iocoder.mall.order.biz.convert.OrderLogisticsConvert;
|
import cn.iocoder.mall.order.biz.convert.OrderLogisticsConvert;
|
||||||
|
@ -173,6 +175,7 @@ public class OrderServiceImpl implements OrderService {
|
||||||
// 收件人信息
|
// 收件人信息
|
||||||
orderRecipientDO
|
orderRecipientDO
|
||||||
.setOrderId(orderDO.getId())
|
.setOrderId(orderDO.getId())
|
||||||
|
.setType(OrderRecipientTypeEnum.EXPRESS.getValue())
|
||||||
.setCreateTime(new Date())
|
.setCreateTime(new Date())
|
||||||
.setUpdateTime(null);
|
.setUpdateTime(null);
|
||||||
|
|
||||||
|
@ -193,6 +196,7 @@ public class OrderServiceImpl implements OrderService {
|
||||||
.setReceiverTime(null)
|
.setReceiverTime(null)
|
||||||
.setClosingTime(null)
|
.setClosingTime(null)
|
||||||
.setHasReturnExchange(OrderStatusEnum.WAITING_PAYMENT.getValue())
|
.setHasReturnExchange(OrderStatusEnum.WAITING_PAYMENT.getValue())
|
||||||
|
.setDeliveryType(OrderDeliveryTypeEnum.NONE.getValue())
|
||||||
.setStatus(OrderStatusEnum.WAITING_PAYMENT.getValue())
|
.setStatus(OrderStatusEnum.WAITING_PAYMENT.getValue())
|
||||||
.setDeleted(DeletedStatusEnum.DELETED_NO.getValue())
|
.setDeleted(DeletedStatusEnum.DELETED_NO.getValue())
|
||||||
.setCreateTime(new Date())
|
.setCreateTime(new Date())
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<sql id="FIELDS">
|
<sql id="FIELDS">
|
||||||
id, order_id, order_no, sku_id, sku_name, sku_image, quantity, price, pay_amount,
|
id, order_id, order_no, sku_id, sku_name, sku_image, quantity, price, pay_amount,
|
||||||
payment_time, delivery_time, receiver_time, closing_time,
|
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>
|
</sql>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
|
@ -15,11 +15,11 @@
|
||||||
INSERT INTO `order_item` (
|
INSERT INTO `order_item` (
|
||||||
order_id, order_no, sku_id, sku_name, sku_image, quantity, price, pay_amount,
|
order_id, order_no, sku_id, sku_name, sku_image, quantity, price, pay_amount,
|
||||||
payment_time, delivery_time, receiver_time, closing_time,
|
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 (
|
) VALUES (
|
||||||
#{orderId}, #{orderNo}, #{skuId}, #{quantity}, #{price},
|
#{orderId}, #{orderNo}, #{skuId}, #{quantity}, #{price},
|
||||||
#{paymentTime}, #{deliveryTime}, #{receiverTime}, #{closingTime},
|
#{paymentTime}, #{deliveryTime}, #{receiverTime}, #{closingTime},
|
||||||
#{hasReturnExchange}, #{status},
|
#{hasReturnExchange}, #{deliveryType}, #{status},
|
||||||
#{createTime}, #{updateTime}, #{deleted}
|
#{createTime}, #{updateTime}, #{deleted}
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
@ -73,6 +73,9 @@
|
||||||
<if test="status != null">
|
<if test="status != null">
|
||||||
, status = #{status}
|
, status = #{status}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="deliveryType != null">
|
||||||
|
, delivery_type = #{deliveryType}
|
||||||
|
</if>
|
||||||
<if test="deleted != null">
|
<if test="deleted != null">
|
||||||
, `deleted` = #{deleted}
|
, `deleted` = #{deleted}
|
||||||
</if>
|
</if>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<mapper namespace="cn.iocoder.mall.order.biz.dao.OrderRecipientMapper">
|
<mapper namespace="cn.iocoder.mall.order.biz.dao.OrderRecipientMapper">
|
||||||
|
|
||||||
<sql id="FIELDS">
|
<sql id="FIELDS">
|
||||||
id, order_id, `area_no`, `name`, mobile, address,
|
id, order_id, `area_no`, `name`, mobile, address, `type`,
|
||||||
create_time, update_time
|
create_time, update_time
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
@ -13,10 +13,10 @@
|
||||||
<insert id="insert" parameterType="OrderRecipientDO" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
<insert id="insert" parameterType="OrderRecipientDO" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
||||||
INSERT INTO `order_recipient` (
|
INSERT INTO `order_recipient` (
|
||||||
order_id, `area_no`, `name`, mobile, address,
|
order_id, `area_no`, `name`, mobile, address,
|
||||||
create_time, update_time
|
`type`, create_time, update_time
|
||||||
) VALUES (
|
) VALUES (
|
||||||
#{orderId}, #{areaNo}, #{name}, #{mobile}, #{address},
|
#{orderId}, #{areaNo}, #{name}, #{mobile}, #{address},
|
||||||
#{createTime}, #{updateTime}
|
#{type}, #{createTime}, #{updateTime}
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue