@Service public class GroupServiceImpl extends Object implements GroupService
| Constructor and Description |
|---|
GroupServiceImpl(GroupDao groupDao,
UserDao userDao,
UserJoinRequestDao userJoinRequestDao) |
| Modifier and Type | Method and Description |
|---|---|
Long |
creatGroup(String groupName,
Long creatorId,
UserIdentityEnum userIdentity)
创建一个群组
|
Long |
deleteOneGroup(Long userId,
Long groupId)
解散一个群组
|
List<GroupEnt> |
findNameGroup(String groupNamePrefix,
Integer pageNum,
Integer pageSize)
模糊查询群组列表
|
UserEnt |
getOneGroupFriendInfo(Long userId,
Long friendId,
Long groupId)
查询群组中的某位用户的个人信息
|
UserGroupInfo |
getUserGroupInfo(Long userId,
Long groupId)
获取用户在某群组中的成员信息(一般用于检查用户是否在该群组中)
|
List<UserGroupInfo> |
listGroupLikePrefixNameAboutUser(Long userId,
String prefix,
Integer pageNum,
Integer pageSize)
查询符合前缀规则的用户已经加入的群组
|
List<UserGroupInfo> |
listUserGroupInformationAboutUser(Long userId,
Integer pageNum,
Integer pageSize)
获取用户加入的群组列表,分页显示
|
List<UserGroupInfo> |
listUserInfoInGroup(Long userId,
Long groupId,
Integer pageNum,
Integer pageSize)
获取某一群组内的成员信息
|
List<UserGroupInfo> |
listUserInfoInGroupWithoutPage(Long userId,
Long groupId)
获取某一群组内的成员信息
|
void |
updateGroupAuthWay(Long userId,
Long groupId,
GroupJoinAuthEnum authEnum)
用户修改群审批方式
|
String |
updateGroupName(Long userId,
Long groupId,
String newName)
修改群组名称
|
@Autowired public GroupServiceImpl(GroupDao groupDao, UserDao userDao, UserJoinRequestDao userJoinRequestDao)
@Transactional(rollbackFor=java.lang.Exception.class) public Long creatGroup(String groupName, Long creatorId, UserIdentityEnum userIdentity)
creatGroup in interface GroupServicegroupName - 群名称creatorId - 创建者IduserIdentity - 用户角色public List<UserGroupInfo> listUserGroupInformationAboutUser(Long userId, Integer pageNum, Integer pageSize)
listUserGroupInformationAboutUser in interface GroupServiceuserId - 用户IdpageNum - 页码pageSize - 页容量public List<UserGroupInfo> listUserInfoInGroup(Long userId, Long groupId, Integer pageNum, Integer pageSize)
listUserInfoInGroup in interface GroupServiceuserId - 用户IdgroupId - 群组IdpageNum - 页码号pageSize - 页容量public List<UserGroupInfo> listUserInfoInGroupWithoutPage(Long userId, Long groupId)
listUserInfoInGroupWithoutPage in interface GroupServiceuserId - 用户IdgroupId - 群组Id@Transactional(rollbackFor=java.lang.Exception.class) public String updateGroupName(Long userId, Long groupId, String newName)
updateGroupName in interface GroupServiceuserId - 用户IdgroupId - 群组IdnewName - 群组新名称@Transactional(rollbackFor=java.lang.Exception.class) public Long deleteOneGroup(Long userId, Long groupId)
deleteOneGroup in interface GroupServiceuserId - 用户IdgroupId - 群组Idpublic List<GroupEnt> findNameGroup(String groupNamePrefix, Integer pageNum, Integer pageSize)
findNameGroup in interface GroupServicegroupNamePrefix - 群名称前缀pageNum - 页码号pageSize - 页容量public UserGroupInfo getUserGroupInfo(Long userId, Long groupId)
getUserGroupInfo in interface GroupServiceuserId - 用户IdgroupId - 群组Id@Transactional(rollbackFor=java.lang.Exception.class) public void updateGroupAuthWay(Long userId, Long groupId, GroupJoinAuthEnum authEnum)
updateGroupAuthWay in interface GroupServiceuserId - 操作用户IdgroupId - 群组IdauthEnum - 默认审批方式public List<UserGroupInfo> listGroupLikePrefixNameAboutUser(Long userId, String prefix, Integer pageNum, Integer pageSize)
listGroupLikePrefixNameAboutUser in interface GroupServiceuserId - 用户Idprefix - 模糊查询前缀pageNum - 页码号pageSize - 页容量public UserEnt getOneGroupFriendInfo(Long userId, Long friendId, Long groupId)
getOneGroupFriendInfo in interface GroupServiceuserId - 用户IdfriendId - 群友IdgroupId - 群组IdCopyright © 2022. All rights reserved.