<?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.ycwl.basic.profitsharing.mapper.ProfitSharingConfigMapper">
    <select id="list" resultType="com.ycwl.basic.profitsharing.dto.ProfitSharingConfigVO">
        SELECT c.*, s.name as scenic_name
        FROM profit_sharing_config c
        left join scenic s on c.scenic_id = s.id
        <where>
            <if test="scenicId != null">
                AND scenic_id = #{scenicId}
            </if>
        </where>
    </select>
</mapper>