package com.czg.market.service;

import com.czg.market.vo.PpPackagePageReqVo;
import com.czg.market.vo.PpPackageVO;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.service.IService;
import com.czg.market.entity.PpPackage;

/**
 * 套餐推广套餐 服务层。
 *
 * @author gyj
 * @since 2025-12-18
 */
public interface PpPackageService extends IService<PpPackage> {

    /**
     * 获取套餐推广开关
     */
    Integer getPackagePromotionSwitch(Long shopId);

    /**
     * 更新套餐开关
     */
    boolean updatePackagePromotionSwitch(Integer status, Long shopId);

    /**
     * 插入套餐
     */
    void insertPackage(PpPackageVO packageVO);

    /**
     * 更新套餐
     */
    void updatePackage(PpPackageVO packageVO);

    /**
     * 删除套餐
     */
    boolean deletePackage(Long id);

    boolean updateOnlineStatus(Long id, Integer onlineStatus);

    /**
     * 获取套餐分页
     */
    Page<PpPackageVO> getPackagePage(PpPackagePageReqVo reqVo, boolean isAdmin);

    PpPackage getPackageById(Long id);

    PpPackageVO getPackageDetail(Long id, Long shopId);

    PpPackageVO convertPackageToVo(PpPackage ppPackage);

}
