| 1 | |
package com.ctrip.framework.apollo.portal.repository; |
| 2 | |
|
| 3 | |
import com.ctrip.framework.apollo.portal.entity.po.UserRole; |
| 4 | |
|
| 5 | |
import org.springframework.data.repository.PagingAndSortingRepository; |
| 6 | |
|
| 7 | |
import java.util.Collection; |
| 8 | |
import java.util.List; |
| 9 | |
import java.util.Set; |
| 10 | |
|
| 11 | |
|
| 12 | |
|
| 13 | |
|
| 14 | |
public interface UserRoleRepository extends PagingAndSortingRepository<UserRole, Long> { |
| 15 | |
|
| 16 | |
|
| 17 | |
|
| 18 | |
|
| 19 | |
|
| 20 | |
List<UserRole> findByUserId(String userId); |
| 21 | |
|
| 22 | |
|
| 23 | |
|
| 24 | |
|
| 25 | |
|
| 26 | |
|
| 27 | |
List<UserRole> findByRoleId(long roleId); |
| 28 | |
|
| 29 | |
|
| 30 | |
|
| 31 | |
|
| 32 | |
|
| 33 | |
|
| 34 | |
|
| 35 | |
List<UserRole> findByUserIdInAndRoleId(Collection<String> userId, long roleId); |
| 36 | |
} |