package com.fs.hospital.mapper;

import java.util.List;
import com.fs.hospital.domain.HospitalConfig;
import com.fs.system.domain.SysConfig;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 参数配置Mapper接口
 *
 * @author fs
 * @date 2024-03-13
 */
public interface HospitalConfigMapper
{
    /**
     * 查询参数配置
     *
     * @param configId 参数配置主键
     * @return 参数配置
     */
    public HospitalConfig selectHospitalConfigByConfigId(Long configId);

    /**
     * 查询参数配置列表
     *
     * @param hospitalConfig 参数配置
     * @return 参数配置集合
     */
    public List<HospitalConfig> selectHospitalConfigList(HospitalConfig hospitalConfig);

    /**
     * 新增参数配置
     *
     * @param hospitalConfig 参数配置
     * @return 结果
     */
    public int insertHospitalConfig(HospitalConfig hospitalConfig);

    /**
     * 修改参数配置
     *
     * @param hospitalConfig 参数配置
     * @return 结果
     */
    public int updateHospitalConfig(HospitalConfig hospitalConfig);

    /**
     * 删除参数配置
     *
     * @param configId 参数配置主键
     * @return 结果
     */
    public int deleteHospitalConfigByConfigId(Long configId);

    /**
     * 批量删除参数配置
     *
     * @param configIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteHospitalConfigByConfigIds(Long[] configIds);


    @Select("select * from hospital_config where config_key = #{configKey} and hospital_id = #{hospitalId}")
    public HospitalConfig selectHospitalConfigByKey(@Param("configKey") String configKey, @Param("hospitalId")Long hospitalId);
}
