package org.jeecg.modules.adweb.seo.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.adweb.seo.entity.SeoPlanSubscription;

import java.util.Map;

/**
 * @Description: seo套餐订购
 * @Author: jeecg-boot
 * @Date: 2024-10-15
 * @Version: V1.0
 */
public interface SeoPlanSubscriptionMapper extends BaseMapper<SeoPlanSubscription> {
    /**
     * 根据站点code获取关键词达标标准
     *
     * @param siteCode 站点code
     * @return 达标标准
     */
    int getKeywordStandard(String siteCode);

    /**
     * 根据站点id，查询站点的营销方案
     *
     * @return:
     * @Author: luxiaoxiao
     * @Date: 2021/4/6
     */
    @Select("select t1.plan_name planName, t1.keyword_count keywordCount, t1.service_time serviceTime, t1.price price,t2.plan_id planId " +
            "from adweb_subscribe_plan t1 ,adweb_seo_plan_subscription t2 " +
            "where t1.id = t2.plan_id AND t2.site_id = #{siteId} AND t2.status = 1")
    Map<String, String> getSubscribePlanBySiteId(Integer siteId);
}
