<?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.subscription.mapper.SubscribePlanMapper">

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