<?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.inkasso.factoring.system.permission.dao.PermissionDAO">

	<select id="getByResourceIds" resultType="com.inkasso.factoring.system.permission.model.dto.PermissionDTO">


        select
            a.*
        from kfb_sys_permission a
		JOIN kfb_sys_resource_permission b on a.id = b.permission_id
		where b.resource_id in (
        <foreach collection="list" item="obj" separator=",">
		    #{obj}
		</foreach>
        )
	</select>
</mapper>