<?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.fuzamei.mapperInterface.AttachmentMapper"> 
	
	<select id="queryIfHasTheSameAttachmentId" resultType="int">
		select count(*) from attachment where attachment_id=#{attachmentId}
	</select>
	
	<select id="queryIfHasTheSameAttachmentIdS" resultType="int">
		select count(*) from attachment where attachment_id in
		<foreach collection="set" item="item" open="(" close=")" separator=",">
			#{item}
		</foreach>
	</select>
	
</mapper>
