<?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.mosty.yjzl.mapper.TbYjxxDypzSjbqMapper">

    <!--根据ID删除-->
    <update id="deleteByIds">
        update tb_yjxx_dypz_sjbq set xt_scbz = '1' where id in
        <foreach collection="list" item="item" separator="," open="(" close=")">
            #{item}
        </foreach>
    </update>

    <select id="queryByDyid" resultType="com.mosty.base.model.entity.yjzl.TbYjxxDypzSjbq">
        select a.* from tb_yjxx_dypz_sjbq a
        where a.xt_scbz = '0' and a.xt_sjzt = '1'
        and a.dy_id in
        <foreach collection="list" item="item" index="index" open="(" close=")" separator=",">
            #{item}
        </foreach>
    </select>

    <!--根据业务ID删除明细-->
    <update id="deleteByDyid">
        delete from tb_yjxx_dypz_sjbq where dy_id = #{dyid}
    </update>

</mapper>
