<?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="org.jeecg.modules.adweb.subscribePlan.mapper.SubscribePlanMapper">

    <select id="getSubscribePlanBySiteId"
            resultType="org.jeecg.modules.adweb.subscribePlan.entity.SubscribePlan">
        SELECT
            t1.id,t1.plan_name,specify_keyword,long_tail_keyword,external_links,article
        from
            subscribe_plan t1,
            seo_plan_subscription t2
        where
            t1.id = t2.plan_id
            and t1.status = 1
            and t2.status = 1
            and t2.site_id = #{siteId}
    </select>
</mapper>