<?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.ruoyi.project.business.mapper.system.SysAttachmentMapper">

    <select id="getIdsWithAttachmentsBusinessId" resultType="int">
        SELECT DISTINCT business_id
        FROM sys_attachment
        WHERE business_id IN
        <foreach collection="businessIds" item="businessId" open="(" close=")" separator=",">
            #{businessId}
        </foreach>
        AND module = #{module} AND category = #{category} AND func=#{func}
    </select>


</mapper>
