package com.dashitech.businessdata.dao;

import com.dashitech.businessdata.entity.HospitalConfig;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * Created by xuweihua on 2021/5/8.
 */
public interface IHospitalConfigDAO  extends JpaRepository<HospitalConfig, String> {
    @SuppressWarnings("unchecked")
    HospitalConfig save(HospitalConfig hospitalConfig);

    @Query(value = "select * from itsm_system_hospital_config where _active = 1 and _key LIKE CONCAT(?1,'%') and hos_id = ?2",nativeQuery = true)
    List<HospitalConfig> getHospitalConfigList(String key,String hosid);

}
