Search in sources :

Example 1 with UserRole

use of com.goodskill.entity.UserRole in project goodsKill by techa03.

the class UserRoleServiceImpl method list.

@Override
public List<UserRole> list(Integer id) {
    UserRole query = new UserRole();
    query.setUserId(id);
    return super.list(new QueryWrapper<>(query));
}
Also used : UserRole(com.goodskill.entity.UserRole)

Example 2 with UserRole

use of com.goodskill.entity.UserRole in project goodsKill by techa03.

the class UserAccountServiceImplTest method findPermissions.

@Test
public void findPermissions() {
    when(baseMapper.selectList(any())).thenReturn(Lists.newArrayList(new User()));
    when(userRoleMapper.selectList(any())).thenReturn(Lists.newArrayList(new UserRole()));
    when(roleMapper.selectById(any())).thenReturn(new Role());
    when(rolePermissionMapper.selectList(any())).thenReturn(Lists.newArrayList(new RolePermission()));
    assertNotNull(userAccountService.findPermissions("1"));
}
Also used : Role(com.goodskill.entity.Role) UserRole(com.goodskill.entity.UserRole) User(com.goodskill.entity.User) UserRole(com.goodskill.entity.UserRole) RolePermission(com.goodskill.entity.RolePermission) Test(org.junit.jupiter.api.Test)

Aggregations

UserRole (com.goodskill.entity.UserRole)2 Role (com.goodskill.entity.Role)1 RolePermission (com.goodskill.entity.RolePermission)1 User (com.goodskill.entity.User)1 Test (org.junit.jupiter.api.Test)1