Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Y
yudao-cloud
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
hblj
yudao-cloud
Commits
10807b0c
提交
10807b0c
authored
4月 05, 2019
作者:
sin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
- 添加发货功能
上级
8b111763
隐藏空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
229 行增加
和
117 行删除
+229
-117
AdminsOrderController.java
.../application/controller/admins/AdminsOrderController.java
+14
-7
OrderConvertAPP.java
...coder/mall/order/application/convert/OrderConvertAPP.java
+6
-6
OrderDeliveryConvert.java
.../mall/order/application/convert/OrderDeliveryConvert.java
+20
-0
OrderDeliverPO.java
.../cn/iocoder/mall/order/application/po/OrderDeliverPO.java
+89
-0
OrderDeliveryDTO.java
.../java/cn/iocoder/mall/order/api/dto/OrderDeliveryDTO.java
+8
-50
OrderLogisticsConvert.java
...iocoder/mall/order/biz/convert/OrderLogisticsConvert.java
+4
-0
OrderItemMapper.java
...n/java/cn/iocoder/mall/order/biz/dao/OrderItemMapper.java
+3
-3
OrderServiceImpl.java
...a/cn/iocoder/mall/order/biz/service/OrderServiceImpl.java
+38
-4
OrderItemMapper.xml
...ervice-impl/src/main/resources/mapper/OrderItemMapper.xml
+40
-37
OrderLogisticsMapper.xml
...e-impl/src/main/resources/mapper/OrderLogisticsMapper.xml
+5
-2
OrderMapper.xml
...er-service-impl/src/main/resources/mapper/OrderMapper.xml
+2
-8
没有找到文件。
order/order-application/src/main/java/cn/iocoder/mall/order/application/controller/admins/AdminsOrderController.java
浏览文件 @
10807b0c
...
...
@@ -7,12 +7,13 @@ import cn.iocoder.mall.order.api.bo.OrderPageBO;
import
cn.iocoder.mall.order.api.bo.OrderRecipientBO
;
import
cn.iocoder.mall.order.api.dto.*
;
import
cn.iocoder.mall.order.application.convert.OrderConvertAPP
;
import
cn.iocoder.mall.order.application.vo.OrderItemUpdateVO
;
import
cn.iocoder.mall.order.application.vo.OrderLogisticsVO
;
import
cn.iocoder.mall.order.application.vo.OrderPageQueryVO
;
import
cn.iocoder.mall.order.application.convert.OrderDeliveryConvert
;
import
cn.iocoder.mall.order.application.po.OrderDeliverPO
;
import
cn.iocoder.mall.order.application.po.OrderItemUpdatePO
;
import
cn.iocoder.mall.order.application.po.OrderLogisticsPO
;
import
cn.iocoder.mall.order.application.po.OrderPageQueryPO
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -35,7 +36,7 @@ public class AdminsOrderController {
@GetMapping
(
"page"
)
@ApiOperation
(
"订单列表"
)
public
CommonResult
<
OrderPageBO
>
getOrderPage
(
@Validated
OrderPageQuery
V
O
orderPageQueryVO
)
{
public
CommonResult
<
OrderPageBO
>
getOrderPage
(
@Validated
OrderPageQuery
P
O
orderPageQueryVO
)
{
OrderQueryDTO
orderQueryDTO
=
OrderConvertAPP
.
INSTANCE
.
convertPageBO
(
orderPageQueryVO
);
return
orderService
.
getOrderPage
(
orderQueryDTO
);
}
...
...
@@ -52,6 +53,12 @@ public class AdminsOrderController {
return
orderService
.
getOrderRecipientBO
(
orderId
);
}
@PostMapping
(
"order_deliver"
)
@ApiOperation
(
"订单发货"
)
public
CommonResult
<
OrderRecipientBO
>
orderDeliver
(
@RequestBody
@Validated
OrderDeliverPO
orderDeliverPO
)
{
return
orderService
.
orderDelivery
(
OrderDeliveryConvert
.
INSTANCE
.
convert
(
orderDeliverPO
));
}
@PutMapping
(
"update_remark"
)
@ApiOperation
(
"更新-更新订单备注"
)
public
CommonResult
updateRemark
(
@RequestParam
(
"orderId"
)
Integer
orderId
,
...
...
@@ -78,14 +85,14 @@ public class AdminsOrderController {
@PutMapping
(
"order_item/update"
)
@ApiOperation
(
"更新-订单item"
)
public
CommonResult
updateOrderItem
(
@RequestBody
@Validated
OrderItemUpdate
V
O
orderItemUpdateVO
)
{
public
CommonResult
updateOrderItem
(
@RequestBody
@Validated
OrderItemUpdate
P
O
orderItemUpdateVO
)
{
OrderItemUpdateDTO
dto
=
OrderConvertAPP
.
INSTANCE
.
convertPageBO
(
orderItemUpdateVO
);
return
orderService
.
updateOrderItem
(
dto
);
}
@PutMapping
(
"logistics/update"
)
@ApiOperation
(
"更新-订单物流"
)
public
CommonResult
updateLogistics
(
@RequestBody
@Validated
OrderLogistics
V
O
orderLogisticsVO
)
{
public
CommonResult
updateLogistics
(
@RequestBody
@Validated
OrderLogistics
P
O
orderLogisticsVO
)
{
OrderLogisticsUpdateDTO
dto
=
OrderConvertAPP
.
INSTANCE
.
convertPageBO
(
orderLogisticsVO
);
return
orderService
.
updateLogistics
(
dto
);
}
...
...
order/order-application/src/main/java/cn/iocoder/mall/order/application/convert/OrderConvertAPP.java
浏览文件 @
10807b0c
...
...
@@ -3,9 +3,9 @@ package cn.iocoder.mall.order.application.convert;
import
cn.iocoder.mall.order.api.dto.OrderItemUpdateDTO
;
import
cn.iocoder.mall.order.api.dto.OrderLogisticsUpdateDTO
;
import
cn.iocoder.mall.order.api.dto.OrderQueryDTO
;
import
cn.iocoder.mall.order.application.
vo.OrderItemUpdateV
O
;
import
cn.iocoder.mall.order.application.
vo.OrderLogisticsV
O
;
import
cn.iocoder.mall.order.application.
vo.OrderPageQueryV
O
;
import
cn.iocoder.mall.order.application.
po.OrderItemUpdateP
O
;
import
cn.iocoder.mall.order.application.
po.OrderPageQueryP
O
;
import
cn.iocoder.mall.order.application.
po.OrderLogisticsP
O
;
import
org.mapstruct.Mapper
;
import
org.mapstruct.Mappings
;
import
org.mapstruct.factory.Mappers
;
...
...
@@ -24,11 +24,11 @@ public interface OrderConvertAPP {
OrderConvertAPP
INSTANCE
=
Mappers
.
getMapper
(
OrderConvertAPP
.
class
);
@Mappings
({})
OrderQueryDTO
convertPageBO
(
OrderPageQuery
V
O
orderPageQueryVO
);
OrderQueryDTO
convertPageBO
(
OrderPageQuery
P
O
orderPageQueryVO
);
@Mappings
({})
OrderLogisticsUpdateDTO
convertPageBO
(
OrderLogistics
V
O
orderLogisticsVO
);
OrderLogisticsUpdateDTO
convertPageBO
(
OrderLogistics
P
O
orderLogisticsVO
);
@Mappings
({})
OrderItemUpdateDTO
convertPageBO
(
OrderItemUpdate
V
O
orderItemUpdateVO
);
OrderItemUpdateDTO
convertPageBO
(
OrderItemUpdate
P
O
orderItemUpdateVO
);
}
order/order-application/src/main/java/cn/iocoder/mall/order/application/convert/OrderDeliveryConvert.java
0 → 100644
浏览文件 @
10807b0c
package
cn
.
iocoder
.
mall
.
order
.
application
.
convert
;
import
cn.iocoder.mall.order.api.dto.OrderDeliveryDTO
;
import
cn.iocoder.mall.order.application.po.OrderDeliverPO
;
import
org.mapstruct.Mapper
;
import
org.mapstruct.Mappings
;
import
org.mapstruct.factory.Mappers
;
/**
* @author Sin
* @time 2019-04-05 17:00
*/
@Mapper
public
interface
OrderDeliveryConvert
{
OrderDeliveryConvert
INSTANCE
=
Mappers
.
getMapper
(
OrderDeliveryConvert
.
class
);
@Mappings
({})
OrderDeliveryDTO
convert
(
OrderDeliverPO
orderDeliverPO
);
}
order/order-application/src/main/java/cn/iocoder/mall/order/application/po/OrderDeliverPO.java
0 → 100644
浏览文件 @
10807b0c
package
cn
.
iocoder
.
mall
.
order
.
application
.
po
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* 订单发货
*
* @author Sin
* @time 2019-04-05 16:55
*/
@ApiModel
(
description
=
"订单发货PO"
)
public
class
OrderDeliverPO
implements
Serializable
{
/**
* 订单编号
*/
@ApiModelProperty
(
"订单id"
)
@NotNull
(
message
=
"orderId不能为空"
)
private
Integer
orderId
;
/**
* 物流 (字典)
*/
@ApiModelProperty
(
"物流商家"
)
@NotNull
(
message
=
"必须选择商家"
)
private
Integer
logistics
;
/**
* 物流编号
*/
@ApiModelProperty
(
"物流单号"
)
@NotNull
(
message
=
"没有物流单号"
)
private
String
logisticsNo
;
/**
* 订单 items
*/
@ApiModelProperty
(
"订单items"
)
@NotNull
(
message
=
"没有选择发货的商品"
)
private
List
<
Integer
>
orderItemIds
;
@Override
public
String
toString
()
{
return
"OrderDeliverPO{"
+
"orderId="
+
orderId
+
", logistics="
+
logistics
+
", logisticsNo='"
+
logisticsNo
+
'\''
+
", orderItemIds="
+
orderItemIds
+
'}'
;
}
public
Integer
getOrderId
()
{
return
orderId
;
}
public
OrderDeliverPO
setOrderId
(
Integer
orderId
)
{
this
.
orderId
=
orderId
;
return
this
;
}
public
Integer
getLogistics
()
{
return
logistics
;
}
public
OrderDeliverPO
setLogistics
(
Integer
logistics
)
{
this
.
logistics
=
logistics
;
return
this
;
}
public
String
getLogisticsNo
()
{
return
logisticsNo
;
}
public
OrderDeliverPO
setLogisticsNo
(
String
logisticsNo
)
{
this
.
logisticsNo
=
logisticsNo
;
return
this
;
}
public
List
<
Integer
>
getOrderItemIds
()
{
return
orderItemIds
;
}
public
OrderDeliverPO
setOrderItemIds
(
List
<
Integer
>
orderItemIds
)
{
this
.
orderItemIds
=
orderItemIds
;
return
this
;
}
}
order/order-service-api/src/main/java/cn/iocoder/mall/order/api/dto/OrderDeliveryDTO.java
浏览文件 @
10807b0c
...
...
@@ -12,21 +12,9 @@ import java.util.List;
public
class
OrderDeliveryDTO
implements
Serializable
{
/**
*
收件区域编号
*
订单id
*/
private
String
areaNo
;
/**
* 收件人名称
*/
private
String
name
;
/**
* 收件手机号
*/
private
String
mobile
;
/**
* 收件详细地址
*/
private
String
address
;
private
Integer
orderId
;
/**
* 物流 (字典)
*/
...
...
@@ -46,50 +34,20 @@ public class OrderDeliveryDTO implements Serializable {
@Override
public
String
toString
()
{
return
"OrderDeliverGoodsDTO{"
+
"areaNo='"
+
areaNo
+
'\''
+
", name='"
+
name
+
'\''
+
", mobile='"
+
mobile
+
'\''
+
", address='"
+
address
+
'\''
+
return
"OrderDeliveryDTO{"
+
"orderId="
+
orderId
+
", logistics="
+
logistics
+
", logisticsNo='"
+
logisticsNo
+
'\''
+
", orderItemIds="
+
orderItemIds
+
'}'
;
}
public
String
getAreaNo
()
{
return
areaNo
;
}
public
OrderDeliveryDTO
setAreaNo
(
String
areaNo
)
{
this
.
areaNo
=
areaNo
;
return
this
;
}
public
String
getName
()
{
return
name
;
}
public
OrderDeliveryDTO
setName
(
String
name
)
{
this
.
name
=
name
;
return
this
;
}
public
String
getMobile
()
{
return
mobile
;
}
public
OrderDeliveryDTO
setMobile
(
String
mobile
)
{
this
.
mobile
=
mobile
;
return
this
;
}
public
String
getAddress
()
{
return
address
;
public
Integer
getOrderId
()
{
return
orderId
;
}
public
OrderDeliveryDTO
set
Address
(
String
address
)
{
this
.
address
=
address
;
public
OrderDeliveryDTO
set
OrderId
(
Integer
orderId
)
{
this
.
orderId
=
orderId
;
return
this
;
}
...
...
order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/convert/OrderLogisticsConvert.java
浏览文件 @
10807b0c
...
...
@@ -5,6 +5,7 @@ import cn.iocoder.mall.order.api.dto.OrderCreateDTO;
import
cn.iocoder.mall.order.api.dto.OrderDeliveryDTO
;
import
cn.iocoder.mall.order.api.dto.OrderLogisticsUpdateDTO
;
import
cn.iocoder.mall.order.biz.dataobject.OrderLogisticsDO
;
import
cn.iocoder.mall.order.biz.dataobject.OrderRecipientDO
;
import
org.mapstruct.Mapper
;
import
org.mapstruct.Mappings
;
import
org.mapstruct.factory.Mappers
;
...
...
@@ -28,6 +29,9 @@ public interface OrderLogisticsConvert {
@Mappings
({})
OrderLogisticsDO
convert
(
OrderLogisticsUpdateDTO
orderLogisticsDTO
);
@Mappings
({})
OrderLogisticsDO
convert
(
OrderRecipientDO
orderRecipientDO
);
@Mappings
({})
List
<
OrderLogisticsBO
>
convertOrderLogisticsBO
(
List
<
OrderLogisticsDO
>
orderLogisticsDOList
);
}
order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/dao/OrderItemMapper.java
浏览文件 @
10807b0c
...
...
@@ -29,7 +29,7 @@ public interface OrderItemMapper {
*
* @param orderItemDO
*/
void
updateById
(
OrderItemDO
orderItemDO
);
void
updateById
(
@Param
(
"orderItemDO"
)
OrderItemDO
orderItemDO
);
/**
* 更新 - 根据 orderId
...
...
@@ -45,7 +45,7 @@ public interface OrderItemMapper {
*/
void
updateByIds
(
@Param
(
"ids"
)
List
<
Integer
>
ids
,
OrderItemDO
orderItemDO
@Param
(
"orderItemDO"
)
OrderItemDO
orderItemDO
);
/**
...
...
@@ -54,7 +54,7 @@ public interface OrderItemMapper {
* @param ids
* @return
*/
List
<
OrderItemDO
>
selectByIds
(
Collection
<
Integer
>
ids
);
List
<
OrderItemDO
>
selectByIds
(
@Param
(
"ids"
)
Collection
<
Integer
>
ids
);
/**
* 查询 - 根据 orderIds 和 status
...
...
order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/service/OrderServiceImpl.java
浏览文件 @
10807b0c
...
...
@@ -295,21 +295,55 @@ public class OrderServiceImpl implements OrderService {
@Transactional
public
CommonResult
orderDelivery
(
OrderDeliveryDTO
orderDelivery
)
{
List
<
Integer
>
orderItemIds
=
orderDelivery
.
getOrderItemIds
();
List
<
OrderItemDO
>
orderItemDOList
=
orderItemMapper
.
selectByIds
(
orderItemIds
);
if
(
orderItemDOList
.
size
()
!=
orderItemIds
.
size
())
{
// 获取所有订单 items
List
<
OrderItemDO
>
allOrderItems
=
orderItemMapper
.
selectByOrderIdAndDeleted
(
orderDelivery
.
getOrderId
(),
DeletedStatusEnum
.
DELETED_NO
.
getValue
());
// 当前需要发货订单,检查 id 和 status
List
<
OrderItemDO
>
needDeliveryOrderItems
=
allOrderItems
.
stream
()
.
filter
(
orderItemDO
->
orderItemIds
.
contains
(
orderItemDO
.
getId
())
&&
OrderStatusEnum
.
WAIT_SHIPMENT
.
getValue
()
==
orderItemDO
.
getStatus
())
.
collect
(
Collectors
.
toList
());
List
<
OrderItemDO
>
deliveredOrderItems
=
allOrderItems
.
stream
()
.
filter
(
orderItemDO
->
OrderStatusEnum
.
WAIT_SHIPMENT
.
getValue
()
==
orderItemDO
.
getStatus
())
.
collect
(
Collectors
.
toList
());
// 发货订单,检查
if
(
needDeliveryOrderItems
.
size
()
!=
orderItemIds
.
size
())
{
return
ServiceExceptionUtil
.
error
(
OrderErrorCodeEnum
.
ORDER_DELIVERY_INCORRECT_DATA
.
getCode
());
}
OrderRecipientDO
orderRecipientDO
=
orderRecipientMapper
.
selectByOrderId
(
orderDelivery
.
getOrderId
());
OrderLogisticsDO
orderLogisticsDO
=
OrderLogisticsConvert
.
INSTANCE
.
convert
(
orderRecipientDO
);
// 保存物流信息
OrderLogisticsDO
orderLogisticsDO
=
OrderLogisticsConvert
.
INSTANCE
.
convert
(
orderDelivery
);
orderLogisticsDO
.
setLogisticsNo
(
orderDelivery
.
getLogisticsNo
())
.
setLogistics
(
orderDelivery
.
getLogistics
())
.
setCreateTime
(
new
Date
())
.
setUpdateTime
(
null
);
orderLogisticsMapper
.
insert
(
orderLogisticsDO
);
// 关联订单item 和 物流信息
orderItemMapper
.
updateByIds
(
orderItemIds
,
new
OrderItemDO
().
setOrderLogisticsId
(
orderLogisticsDO
.
getId
()));
orderItemMapper
.
updateByIds
(
orderItemIds
,
new
OrderItemDO
()
.
setOrderLogisticsId
(
orderLogisticsDO
.
getId
())
.
setStatus
(
OrderStatusEnum
.
ALREADY_SHIPMENT
.
getValue
())
);
// 子订单是否全部发货,如果发完,就更新 order
if
(
deliveredOrderItems
.
size
()
<=
0
)
{
orderMapper
.
updateById
(
new
OrderDO
()
.
setId
(
orderDelivery
.
getOrderId
())
.
setStatus
(
OrderStatusEnum
.
ALREADY_SHIPMENT
.
getValue
())
);
}
return
CommonResult
.
success
(
null
);
}
...
...
order/order-service-impl/src/main/resources/mapper/OrderItemMapper.xml
浏览文件 @
10807b0c
...
...
@@ -29,61 +29,64 @@
-->
<sql
id=
"updateFieldSql"
>
<set>
<if
test=
"orderId != null"
>
, order_id = #{orderId}
<if
test=
"orderI
temDO.orderI
d != null"
>
, order_id = #{orderI
temDO.orderI
d}
</if>
<if
test=
"orderNo != null"
>
, order_no = #{orderNo}
<if
test=
"order
ItemDO.order
No != null"
>
, order_no = #{order
ItemDO.order
No}
</if>
<if
test=
"
sku
Id != null"
>
,
sku_id = #{sku
Id}
<if
test=
"
orderItemDO.orderLogistics
Id != null"
>
,
order_logistics_id = #{orderItemDO.orderLogistics
Id}
</if>
<if
test=
"
skuName
!= null"
>
, sku_
name = #{skuName
}
<if
test=
"
orderItemDO.skuId
!= null"
>
, sku_
id = #{orderItemDO.skuId
}
</if>
<if
test=
"
skuImag
e != null"
>
, sku_
image = #{skuImag
e}
<if
test=
"
orderItemDO.skuNam
e != null"
>
, sku_
name = #{orderItemDO.skuNam
e}
</if>
<if
test=
"
quantity
!= null"
>
,
quantity = #{quantity
}
<if
test=
"
orderItemDO.skuImage
!= null"
>
,
sku_image = #{orderItemDO.skuImage
}
</if>
<if
test=
"
price
!= null"
>
,
price = #{price
}
<if
test=
"
orderItemDO.quantity
!= null"
>
,
quantity = #{orderItemDO.quantity
}
</if>
<if
test=
"payAmount != null"
>
, pay_amount = #{payAmount}
<if
test=
"orderItemDO.price != null"
>
, price = #{orderItemDO.price}
</if>
<if
test=
"orderItemDO.payAmount != null"
>
, pay_amount = #{orderItemDO.payAmount}
</if>
<if
test=
"paymentTime != null"
>
, payment_time = #{paymentTime}
<if
test=
"
orderItemDO.
paymentTime != null"
>
, payment_time = #{
orderItemDO.
paymentTime}
</if>
<if
test=
"deliveryTime != null"
>
, delivery_time = #{deliveryTime}
<if
test=
"
orderItemDO.
deliveryTime != null"
>
, delivery_time = #{
orderItemDO.
deliveryTime}
</if>
<if
test=
"receiverTime != null"
>
, receiver_time = #{receiverTime}
<if
test=
"
orderItemDO.
receiverTime != null"
>
, receiver_time = #{
orderItemDO.
receiverTime}
</if>
<if
test=
"closingTime != null"
>
, closing_time = #{closingTime}
<if
test=
"
orderItemDO.
closingTime != null"
>
, closing_time = #{
orderItemDO.
closingTime}
</if>
<if
test=
"hasReturnExchange != null"
>
, has_return_exchange = #{hasReturnExchange}
<if
test=
"
orderItemDO.
hasReturnExchange != null"
>
, has_return_exchange = #{
orderItemDO.
hasReturnExchange}
</if>
<if
test=
"status != null"
>
, status = #{status}
<if
test=
"
orderItemDO.
status != null"
>
, status = #{
orderItemDO.
status}
</if>
<if
test=
"deliveryType != null"
>
, delivery_type = #{deliveryType}
<if
test=
"
orderItemDO.
deliveryType != null"
>
, delivery_type = #{
orderItemDO.
deliveryType}
</if>
<if
test=
"deleted != null"
>
, `deleted` = #{deleted}
<if
test=
"
orderItemDO.
deleted != null"
>
, `deleted` = #{
orderItemDO.
deleted}
</if>
<if
test=
"createTime != null"
>
, create_time = #{createTime}
<if
test=
"
orderItemDO.
createTime != null"
>
, create_time = #{
orderItemDO.
createTime}
</if>
<if
test=
"updateTime != null"
>
, update_time = #{updateTime}
<if
test=
"
orderItemDO.
updateTime != null"
>
, update_time = #{
orderItemDO.
updateTime}
</if>
</set>
</sql>
...
...
@@ -94,7 +97,7 @@
<update
id=
"updateById"
parameterType=
"OrderDO"
>
UPDATE `order_item`
<include
refid=
"updateFieldSql"
/>
WHERE id = #{id}
WHERE id = #{
orderItemDO.
id}
</update>
<!--
...
...
order/order-service-impl/src/main/resources/mapper/OrderLogisticsMapper.xml
浏览文件 @
10807b0c
...
...
@@ -11,10 +11,10 @@
-->
<insert
id=
"insert"
parameterType=
"OrderLogisticsDO"
useGeneratedKeys=
"true"
keyColumn=
"id"
keyProperty=
"id"
>
INSERT INTO `order_logistics` (
area_no, `name`, mobile, address, logistics_no, create_time, update_time
area_no, `name`, mobile, address, logistics
, logistics
_no, create_time, update_time
) VALUES (
#{areaNo}, #{name}, #{mobile}, #{address},
#{logisticsNo}, #{createTime}, #{updateTime}
#{logistics
}, #{logistics
No}, #{createTime}, #{updateTime}
)
</insert>
...
...
@@ -35,6 +35,9 @@
<if
test=
"address != null"
>
, address = #{address}
</if>
<if
test=
"logistics != null"
>
, logistics = #{logistics}
</if>
<if
test=
"logisticsNo != null"
>
, logistics_no = #{logisticsNo}
</if>
...
...
order/order-service-impl/src/main/resources/mapper/OrderMapper.xml
浏览文件 @
10807b0c
...
...
@@ -14,12 +14,12 @@
-->
<insert
id=
"insert"
parameterType=
"OrderDO"
useGeneratedKeys=
"true"
keyColumn=
"id"
keyProperty=
"id"
>
INSERT INTO `order` (
user_id, order_
logistics_id, order_
no, price, payment_time,
user_id, order_no, price, payment_time,
delivery_time, receiver_time, closing_time,
has_return_exchange, status, remark,
create_time, update_time, `deleted`
) VALUES (
#{
orderLogisticsId}, #{
userId}, #{orderNo}, #{price}, #{paymentTime},
#{userId}, #{orderNo}, #{price}, #{paymentTime},
#{deliveryTime}, #{receiverTime}, #{closingTime},
#{hasReturnExchange}, #{status}, #{remark},
#{createTime}, #{updateTime}, #{deleted}
...
...
@@ -31,9 +31,6 @@
-->
<sql
id=
"updateFieldSql"
>
<set>
<if
test=
"orderLogisticsId != null"
>
, order_logistics_id = #{orderLogisticsId}
</if>
<if
test=
"orderNo != null"
>
, order_no = #{orderNo}
</if>
...
...
@@ -110,9 +107,6 @@
<if
test=
"orderNo != null"
>
AND `order_no` = #{orderNo}
</if>
<if
test=
"orderLogisticsId != null"
>
AND `order_logistics_id` = #{orderLogisticsId}
</if>
<if
test=
"hasReturnExchange != null"
>
AND `has_return_exchange` = #{hasReturnExchange}
</if>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论