2025-03-21 19:10:18 +08:00
|
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
|
|
<!DOCTYPE mapper
|
|
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
<mapper namespace="org.asinkj.amz.mapper.BizShipmentPlanMapper">
|
2025-05-10 14:29:20 +08:00
|
|
|
|
<update id="updateByFbaShipmentId">
|
|
|
|
|
<foreach collection="list" item="item" index="index" separator=";">
|
|
|
|
|
UPDATE biz_shipment_plan
|
|
|
|
|
<set>
|
|
|
|
|
<if test="item.boxQuantity != null">
|
|
|
|
|
box_quantity = #{item.boxQuantity},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="item.boxQuantity != null">
|
|
|
|
|
box_size = #{item.boxSize},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="item.boxQuantity != null">
|
|
|
|
|
vendor_weight = #{item.vendorWeight},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="item.boxQuantity != null">
|
|
|
|
|
set_total = #{item.setTotal},
|
|
|
|
|
</if>
|
|
|
|
|
</set>
|
|
|
|
|
WHERE shipment_id = #{item.shipmentId}
|
|
|
|
|
</foreach>
|
|
|
|
|
</update>
|
2025-03-21 19:10:18 +08:00
|
|
|
|
|
|
|
|
|
<select id="selectExistingShipmentIds" resultType="java.lang.String">
|
2025-05-10 14:29:20 +08:00
|
|
|
|
SELECT shipment_id
|
2025-03-21 19:10:18 +08:00
|
|
|
|
FROM biz_shipment_plan
|
|
|
|
|
WHERE del_flag = '0'
|
2025-05-10 14:29:20 +08:00
|
|
|
|
WHERE shipment_id IN
|
2025-03-21 19:10:18 +08:00
|
|
|
|
<foreach item="id" collection="batchIds" open="(" separator="," close=")">
|
|
|
|
|
#{id}
|
|
|
|
|
</foreach>
|
|
|
|
|
</select>
|
2025-06-20 18:07:55 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<resultMap id="shipmentPlanMap" type="org.asinkj.amz.domain.BizShipmentPlan">
|
|
|
|
|
<id property="id" column="id"/>
|
|
|
|
|
<result property="shipmentId" column="shipment_id"/>
|
|
|
|
|
<result property="shipmentName" column="shipment_name"/>
|
|
|
|
|
<result property="isClosed" column="is_closed"/>
|
|
|
|
|
<result property="shipmentStatus" column="shipment_status"/>
|
|
|
|
|
<result property="destination" column="destination"/>
|
|
|
|
|
<result property="shippingMode" column="shipping_mode"/>
|
|
|
|
|
<result property="shippingSolution" column="shipping_solution"/>
|
|
|
|
|
<result property="gmtModified" column="gmt_modified"/>
|
|
|
|
|
<result property="gmtCreate" column="gmt_create"/>
|
|
|
|
|
<result property="receivingTime" column="receiving_time"/>
|
|
|
|
|
<result property="staShipmentDate" column="sta_shipment_date"/>
|
|
|
|
|
<result property="staDeliveryStartDate" column="sta_delivery_start_date"/>
|
|
|
|
|
<result property="staDeliveryEndDate" column="sta_delivery_end_date"/>
|
|
|
|
|
<result property="shipFromAddress" column="ship_from_address"/>
|
|
|
|
|
<result property="shipToAddress" column="ship_to_address"/>
|
|
|
|
|
<result property="referenceId" column="reference_id"/>
|
|
|
|
|
<result property="staInboundPlanId" column="sta_inbound_plan_id"/>
|
|
|
|
|
<result property="isSta" column="is_sta"/>
|
|
|
|
|
<result property="delFlag" column="del_flag"/>
|
|
|
|
|
<result property="createBy" column="create_by"/>
|
|
|
|
|
<result property="createTime" column="create_time"/>
|
|
|
|
|
<result property="updateBy" column="update_by"/>
|
|
|
|
|
<result property="updateTime" column="update_time"/>
|
|
|
|
|
<result property="createDept" column="create_dept"/>
|
|
|
|
|
<result property="tenantId" column="tenant_id"/>
|
|
|
|
|
<result property="shipmentUniqueId" column="shipment_unique_id"/>
|
|
|
|
|
<result property="inboundPlanId" column="inbound_plan_id"/>
|
|
|
|
|
<result property="fbaStatus" column="fba_status"/>
|
|
|
|
|
<result property="boxQuantity" column="box_quantity"/>
|
|
|
|
|
<result property="boxSize" column="box_size"/>
|
|
|
|
|
<result property="vendorWeight" column="vendor_weight"/>
|
|
|
|
|
<result property="setTotal" column="set_total"/>
|
|
|
|
|
<result property="channelId" column="channel_id"/>
|
|
|
|
|
<result property="channelName" column="channel_name"/>
|
|
|
|
|
<!--<result property="shippedTime" column="shipped_time"/>-->
|
|
|
|
|
<!--<result property="workingTime" column="working_time"/>-->
|
|
|
|
|
<!--<result property="closedTime" column="closed_time"/>-->
|
|
|
|
|
|
|
|
|
|
<!-- 如果有其他字段,请在此继续添加 -->
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<!-- 查询发货单与 shipment 的关系映射 -->
|
|
|
|
|
<resultMap id="orderShipmentRelationMap" type="org.asinkj.amz.domain.OrderShipmentRelation">
|
|
|
|
|
<result property="sendOrderId" column="send_order_id"/>
|
|
|
|
|
<result property="shipmentId" column="shipment_plan_id"/>
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<!-- 关系查询(仅获取ID) -->
|
|
|
|
|
<select id="findOrderShipmentRelations" resultMap="orderShipmentRelationMap">
|
|
|
|
|
SELECT
|
|
|
|
|
send_order_id,
|
|
|
|
|
shipment_plan_id
|
|
|
|
|
FROM biz_send_shipment_rel
|
|
|
|
|
WHERE send_order_id IN
|
|
|
|
|
<foreach item="id" collection="sendOrderIds" open="(" separator="," close=")">
|
|
|
|
|
#{id}
|
|
|
|
|
</foreach>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<!-- 根据ID批量查询 shipment -->
|
|
|
|
|
<select id="findByIds" resultMap="shipmentPlanMap">
|
|
|
|
|
SELECT
|
|
|
|
|
id,
|
|
|
|
|
shipment_id,
|
|
|
|
|
shipment_name,
|
|
|
|
|
is_closed,
|
|
|
|
|
shipment_status,
|
|
|
|
|
destination,
|
|
|
|
|
shipping_mode,
|
|
|
|
|
shipping_solution,
|
|
|
|
|
gmt_modified,
|
|
|
|
|
gmt_create,
|
|
|
|
|
receiving_time,
|
|
|
|
|
sta_shipment_date,
|
|
|
|
|
sta_delivery_start_date,
|
|
|
|
|
sta_delivery_end_date,
|
|
|
|
|
ship_from_address,
|
|
|
|
|
ship_to_address,
|
|
|
|
|
reference_id,
|
|
|
|
|
sta_inbound_plan_id,
|
|
|
|
|
is_sta,
|
|
|
|
|
del_flag,
|
|
|
|
|
create_by,
|
|
|
|
|
create_time,
|
|
|
|
|
update_by,
|
|
|
|
|
update_time,
|
|
|
|
|
create_dept,
|
|
|
|
|
tenant_id,
|
|
|
|
|
shipment_unique_id,
|
|
|
|
|
inbound_plan_id,
|
|
|
|
|
fba_status,
|
|
|
|
|
box_quantity,
|
|
|
|
|
box_size,
|
|
|
|
|
vendor_weight,
|
|
|
|
|
set_total,
|
|
|
|
|
channel_id,
|
|
|
|
|
channel_name,
|
|
|
|
|
shipped_time,
|
|
|
|
|
working_time,
|
|
|
|
|
closed_time
|
|
|
|
|
FROM biz_shipment_plan
|
|
|
|
|
WHERE id IN
|
|
|
|
|
<foreach item="id" collection="ids" open="(" separator="," close=")">
|
|
|
|
|
#{id}
|
|
|
|
|
</foreach>
|
|
|
|
|
</select>
|
2025-07-02 14:32:57 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<delete id="deleteBySendOrderShipmentPlan">
|
|
|
|
|
DELETE FROM biz_send_shipment_rel
|
|
|
|
|
WHERE send_order_id = #{sendOrderId} and shipment_plan_id = #{shipmentPlanId}
|
|
|
|
|
</delete>
|
2025-03-21 19:10:18 +08:00
|
|
|
|
</mapper>
|