<?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.fdkankan.scene.mapper.IFolderSceneMapper">

    <select id="findByConditoin" resultType="com.fdkankan.scene.entity.FolderScene">
        SELECT b.*
        FROM t_folder a
        LEFT JOIN t_folder_scene b ON a.id = b.folder_id
        WHERE a.`tb_status` = 0 AND b.`tb_status` = 0
        <if test="sceneId != null">
            AND b.scene_id = #{sceneId}
        </if>
        <if test="folderType != null">
            AND a.folder_type = #{folderType}
        </if>
    </select>

</mapper>
