<?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="cn.com.ctop.crawler.modules.pangolin.mapper.PangolinChannelMapper">
    <select id="getListByUserId" resultType="cn.com.ctop.crawler.modules.pangolin.entity.PangolinChannel">
        select channel.*
from ctop_pangolin_channel channel
         left join ctop_bind_account_login login on login.account_name = channel.account_name
         where 1=1
         <if test="userId!=null">
             and login.user_id = #{userId}
         </if>
    </select>
</mapper>
