package com.gkhy.labRiskManage.domain.account.repository.jpa; import com.gkhy.labRiskManage.domain.account.entity.RoleMenuBind; 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; @Repository public interface RoleMenuBindRepository extends JpaRepository { List findAllByRoleIdAndMenuItemIdIn(Long roleId,List menuItemIds); List findAllByMenuItemIdAndRoleIdIn(Long menuItemId,List roleIds); List findAllByRoleId(Long roleId); @Query(value = "select rb.roleId from RoleMenuBind rb where rb.menuItemId = :menuItemId") List findBindRoleListByMenuItemId(Long menuItemId); @Modifying Integer deleteByMenuItemId(Long menuItemId); @Modifying Integer deleteByMenuItemIdAndRoleIdIn(Long menuItemId,List roleIds); List findAllByRoleIdIn(List roleIds); }