ShipmentDetailMapper.xml 761 Bytes
<?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="com.huaheng.pc.shipment.shipmentDetail.mapper.ShipmentDetailMapper">
    <select id="SelectFirstStatus" resultType="java.lang.Integer">
        SELECT firstStatus
        FROM shipment_header h
        INNER JOIN shipment_detail d ON h.id = d.shipmentId AND d.id IN (#{ids})
        GROUP BY h.id,firstStatus
    </select>

    <delete id="batchDelete">
        <bind name="i" value="(ids)"></bind>
        DELETE FROM shipment_detail WHERE id IN
        <foreach item="idItem" collection="ids" open="(" separator="," close=")">
            #{idItem}
        </foreach>
    </delete>

</mapper>