package com.yihu.jw.hospital.mapping.dao;

import com.yihu.jw.entity.hospital.mapping.HospitalDeptMappingDO;
import com.yihu.jw.entity.hospital.mapping.PatientMappingDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import javax.transaction.Transactional;

/**
 * Created by zdm on 2019/5/28.
 */
@Transactional
public interface HospitalDeptMappingDao extends PagingAndSortingRepository<HospitalDeptMappingDO, Integer>, JpaSpecificationExecutor<HospitalDeptMappingDO> {

    @Modifying
    @Query("delete from HospitalDeptMappingDO  where source=?1")
    void deleteBySource(String source);
}
