package com.fs.course.mapper;

import java.util.List;
import com.fs.course.domain.FsUserVipPackage;
import com.fs.course.vo.FsUserVipPackageListUVO;
import org.apache.ibatis.annotations.Select;

/**
 * 会员套餐Mapper接口
 *
 * @author fs
 * @date 2024-06-27
 */
public interface FsUserVipPackageMapper
{
    /**
     * 查询会员套餐
     *
     * @param packageId 会员套餐主键
     * @return 会员套餐
     */
    public FsUserVipPackage selectFsUserVipPackageByPackageId(Long packageId);

    /**
     * 查询会员套餐列表
     *
     * @param fsUserVipPackage 会员套餐
     * @return 会员套餐集合
     */
    public List<FsUserVipPackage> selectFsUserVipPackageList(FsUserVipPackage fsUserVipPackage);

    /**
     * 新增会员套餐
     *
     * @param fsUserVipPackage 会员套餐
     * @return 结果
     */
    public int insertFsUserVipPackage(FsUserVipPackage fsUserVipPackage);

    /**
     * 修改会员套餐
     *
     * @param fsUserVipPackage 会员套餐
     * @return 结果
     */
    public int updateFsUserVipPackage(FsUserVipPackage fsUserVipPackage);

    /**
     * 删除会员套餐
     *
     * @param packageId 会员套餐主键
     * @return 结果
     */
    public int deleteFsUserVipPackageByPackageId(Long packageId);

    /**
     * 批量删除会员套餐
     *
     * @param packageIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteFsUserVipPackageByPackageIds(Long[] packageIds);

    @Select("select * from fs_user_vip_package where status = 1 order by sort asc")
    List<FsUserVipPackageListUVO> selectFsUserVipPackageListUVO();
}
