package com.ssj.dao.sys.role.dao;

import com.ssj.bean.sys.role.domain.AdminOrg;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;


/** 
 * @author  ZhangCaibao 
 * @version 2018年2月11日 下午3:18:19 
 * 类说明 
 */
@Repository
public interface AdminOrgDao extends JpaRepository<AdminOrg, String>{

	
	@Query(nativeQuery = true, value = "select * from sys_admin_org  where admin_id = ?1 ")
	List<AdminOrg> findByAdminId(String adminId);
	
	
	@Query(nativeQuery = true, value = "delete from sys_admin_org  where admin_id =?1  ")
	@Modifying
	void deleteByAdminId(String adminId);
	
}
