- 零零碎碎的

- 退货申请,物流信息
This commit is contained in:
sin
2019-04-27 16:31:49 +08:00
parent 6e92e7162c
commit 6e91c41cca
17 changed files with 220 additions and 81 deletions

View File

@@ -50,7 +50,7 @@
<!--
查询 - 最新的物流信息
-->
<select id="selectLatest" resultType="cn.iocoder.mall.order.biz.dataobject.OrderLogisticsDetailDO">
<select id="selectLast" resultType="cn.iocoder.mall.order.biz.dataobject.OrderLogisticsDetailDO">
SELECT
<include refid="FIELDS"/>
FROM order_logistics_detail
@@ -61,4 +61,17 @@
ORDER BY create_time DESC
LIMIT 0, 1
</select>
<!--
查询 - 根据 last 根据物理id
-->
<select id="selectLastByLogisticsId"
resultType="cn.iocoder.mall.order.biz.dataobject.OrderLogisticsDetailDO">
SELECT
<include refid="FIELDS"/>
FROM order_logistics_detail
WHERE order_logistics_id = #{orderLogisticsId}
ORDER BY create_time DESC
LIMIT 1
</select>
</mapper>

View File

@@ -66,4 +66,15 @@
#{id}
</foreach>
</select>
<!--
查询 - 根据 ids
-->
<select id="selectById" resultType="cn.iocoder.mall.order.biz.dataobject.OrderLogisticsDO">
SELECT
<include refid="FIELDS" />
FROM `order_logistics`
WHERE `id` = #{id}
LIMIT 1
</select>
</mapper>

View File

@@ -8,6 +8,7 @@
order_id,
order_no,
order_logistics_id,
refund_price,
reason,
`describe`,
approval_time,
@@ -26,13 +27,13 @@
<insert id="insert" parameterType="OrderReturnDO" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
INSERT INTO `order_return` (
service_number, order_id, order_no, order_logistics_id,
reason, `describe`,
refund_price, reason, `describe`,
approval_time, logistics_time, receiver_time, closing_time,
service_type, status,
create_time, update_time)
VALUES (
#{serviceNumber}, #{orderId}, #{orderNo}, #{orderLogisticsId},
#{reason}, #{describe},
${refundPrice}, #{reason}, #{describe},
#{approvalTime}, #{logisticsTime}, #{receiverTime}, #{closingTime},
#{serviceType}, #{status}, #{createTime}, #{updateTime})
</insert>
@@ -45,6 +46,9 @@
<if test="orderLogisticsId != null">
, order_logistics_id = #{orderLogisticsId}
</if>
<if test="refundPrice != null">
, refund_price = #{refundPrice}
</if>
<if test="reason != null">
, reason = #{reason}
</if>