@Test public void canOpterateGroupMemberTest() throws Exception { Assert.assertTrue(groupMemberService.canOpterateGroupMember(1L, 1L)); }
public boolean canOpterateGroupMember(Long userId, Long currentGroupId) throws SQLException { List<UserGroup> groups = userGroupDao.getUserGroupByUserId(userId); if (CollectionUtils.isNotEmpty(groups)) { return groups.stream().anyMatch(group -> group.getOpt_user() == OperateUserEnum.Allow.getType()); } return false; }
GroupMemberService { public boolean canOpterateGroupMember(Long userId, Long currentGroupId) throws SQLException { List<UserGroup> groups = userGroupDao.getUserGroupByUserId(userId); if (CollectionUtils.isNotEmpty(groups)) { return groups.stream().anyMatch(group -> group.getOpt_user() == OperateUserEnum.Allow.getType()); } return false; } }
GroupMemberService { public boolean canOpterateGroupMember(Long userId, Long currentGroupId) throws SQLException { List<UserGroup> groups = userGroupDao.getUserGroupByUserId(userId); if (CollectionUtils.isNotEmpty(groups)) { return groups.stream().anyMatch(group -> group.getOpt_user() == OperateUserEnum.Allow.getType()); } return false; }  }
GroupMemberService { public boolean canOpterateGroupMember(Long userId, Long currentGroupId) throws SQLException { List<UserGroup> groups = userGroupDao.getUserGroupByUserId(userId); if (CollectionUtils.isNotEmpty(groups)) { return groups.stream().anyMatch(group -> group.getOpt_user() == OperateUserEnum.Allow.getType()); } return false; }  ValidatorChain validatePermisionAdd(LoginUser user, UserGroup userGroup, Errors errors); ValidatorChain validatePermisionUpdateAndDelete(LoginUser user, UserGroup userGroup, Errors errors); boolean canOpterateGroupMember(Long userId, Long currentGroupId); boolean isUserInGroup(Long userId, Long groupId); ListResult<MemberView> findGroupMemberPageList(Paging<UserGroup> paging); }
GroupMemberService { public boolean canOpterateGroupMember(Long userId, Long currentGroupId) throws SQLException { List<UserGroup> groups = userGroupDao.getUserGroupByUserId(userId); if (CollectionUtils.isNotEmpty(groups)) { return groups.stream().anyMatch(group -> group.getOpt_user() == OperateUserEnum.Allow.getType()); } return false; }  ValidatorChain validatePermisionAdd(LoginUser user, UserGroup userGroup, Errors errors); ValidatorChain validatePermisionUpdateAndDelete(LoginUser user, UserGroup userGroup, Errors errors); boolean canOpterateGroupMember(Long userId, Long currentGroupId); boolean isUserInGroup(Long userId, Long groupId); ListResult<MemberView> findGroupMemberPageList(Paging<UserGroup> paging);  }