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