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

import com.baomidou.mybatisplus.extension.service.IService;

import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.modules.adweb.seo.entity.SeoPlanSubscription;
import org.jeecg.modules.adweb.subscribePlan.entity.SubscribePlan;

/**
 * @Description: seo套餐订购
 * @Author: jeecg-boot
 * @Date: 2024-10-15
 * @Version: V1.0
 */
public interface ISeoPlanSubscriptionService extends IService<SeoPlanSubscription> {

    /**
     * 绑定SEO套餐
     *
     * @param seoPlanSubscription
     * @param sysUser
     * @return
     */
    Result<?> addSeoPlanSubscription(SeoPlanSubscription seoPlanSubscription, LoginUser sysUser);

    /**
     * 新增套餐订阅记录
     *
     * @param seoPlanSubscription
     * @param marketPlan
     * @return
     */
    boolean addNewSubscription(SeoPlanSubscription seoPlanSubscription, SubscribePlan marketPlan);

    /** 获取正在使用中的SEO套餐，如果没有使用中的SEO和建站套餐，则查询过期的SEO和建站套餐 */
    SeoPlanSubscription getCurrentSeoAndSiteSubscription(Integer siteId);
}
