package com.fs.his.mapper;

import java.util.List;
import com.fs.his.domain.FsPackageCate;
import com.fs.his.param.FsPackageCateUParam;
import com.fs.his.vo.OptionsVO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 套餐包分类Mapper接口
 *
 * @author fs
 * @date 2024-05-08
 */
public interface FsPackageCateMapper
{
    /**
     * 查询套餐包分类
     *
     * @param cateId 套餐包分类主键
     * @return 套餐包分类
     */
    public FsPackageCate selectFsPackageCateByCateId(Long cateId);

    /**
     * 查询套餐包分类列表
     *
     * @param fsPackageCate 套餐包分类
     * @return 套餐包分类集合
     */
    public List<FsPackageCate> selectFsPackageCateList(FsPackageCateUParam fsPackageCate);

    /**
     * 新增套餐包分类
     *
     * @param fsPackageCate 套餐包分类
     * @return 结果
     */
    public int insertFsPackageCate(FsPackageCate fsPackageCate);

    /**
     * 修改套餐包分类
     *
     * @param fsPackageCate 套餐包分类
     * @return 结果
     */
    public int updateFsPackageCate(FsPackageCate fsPackageCate);

    /**
     * 删除套餐包分类
     *
     * @param cateId 套餐包分类主键
     * @return 结果
     */
    public int deleteFsPackageCateByCateId(Long cateId);

    /**
     * 批量删除套餐包分类
     *
     * @param cateIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteFsPackageCateByCateIds(Long[] cateIds);

    @Select("select cate_code dictValue,cate_name dictLabel FROM fs_package_cate where type=#{type}")
    List<OptionsVO> selectFsArticleCateByType(Integer type);
    @Select("select *  FROM fs_package_cate where type=#{type} and cate_code=#{cateCode}")
    FsPackageCate selectFsPackageCateByCateCode(@Param("cateCode") Long cateCode, @Param("type")Integer type);

    List<OptionsVO> selectCateList();
}
