package com.fs.store.mapper;

import com.fs.store.domain.FsIllnessLibrary;
import com.fs.store.vo.FsIllnessLibraryVO;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 中医疾病Mapper接口
 *
 * @author fs
 * @date 2023-09-04
 */
public interface FsIllnessLibraryMapper
{
    /**
     * 查询中医疾病
     *
     * @param illnessId 中医疾病主键
     * @return 中医疾病
     */
    public FsIllnessLibrary selectFsIllnessLibraryByIllnessId(Long illnessId);

    /**
     * 查询中医疾病列表
     *
     * @param fsIllnessLibrary 中医疾病
     * @return 中医疾病集合
     */
    public List<FsIllnessLibrary> selectFsIllnessLibraryList(FsIllnessLibrary fsIllnessLibrary);

    /**
     * 新增中医疾病
     *
     * @param fsIllnessLibrary 中医疾病
     * @return 结果
     */
    public int insertFsIllnessLibrary(FsIllnessLibrary fsIllnessLibrary);

    /**
     * 修改中医疾病
     *
     * @param fsIllnessLibrary 中医疾病
     * @return 结果
     */
    public int updateFsIllnessLibrary(FsIllnessLibrary fsIllnessLibrary);

    /**
     * 删除中医疾病
     *
     * @param illnessId 中医疾病主键
     * @return 结果
     */
    public int deleteFsIllnessLibraryByIllnessId(Long illnessId);

    /**
     * 批量删除中医疾病
     *
     * @param illnessIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteFsIllnessLibraryByIllnessIds(Long[] illnessIds);

    @Select("select * from fs_illness_library WHERE illness_name  LIKE CONCAT('%', #{name}, '%')")
    List<FsIllnessLibraryVO> selectFsIllnessLibraryVOByIllnessName(String name);

}
