ReceiptDetailMapper.xml
606 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.receipt.receiptDetail.mapper.ReceiptDetailMapper">
<select id="SelectFirstStatus" resultType="java.lang.Integer">
SELECT h.firstStatus
FROM receipt_header h
INNER JOIN receipt_detail d ON h.id = d.receiptId AND d.id IN (#{ids})
GROUP BY h.id, h.firstStatus
</select>
<delete id="batchDelete">
DELETE FROM receipt_detail WHERE id in (#{ids})
</delete>
</mapper>