<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="me.qwq.doghouse.dao.PostMapper">
    
    <select id="getParentIds" resultType="java.lang.Long">
        SELECT DISTINCT parent_id FROM post WHERE post_id IN
        <foreach collection="childrenIds" item="postId" open="(" separator="," close=")">
	    #{postId}
	    </foreach>
        ORDER BY parent_id ASC
    </select>
    
</mapper>
