09-15-netty优化,恢复用户列表权限,暂留部门列表权限
This commit is contained in:
@ -59,7 +59,7 @@ public class SysUserController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 获取用户列表
|
* 获取用户列表
|
||||||
*/
|
*/
|
||||||
// @SaCheckPermission("system:user:list")
|
@SaCheckPermission("system:user:list")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo<SysUserVo> list(SysUserBo user, PageQuery pageQuery) {
|
public TableDataInfo<SysUserVo> list(SysUserBo user, PageQuery pageQuery) {
|
||||||
return userService.selectPageUserList(user, pageQuery);
|
return userService.selectPageUserList(user, pageQuery);
|
||||||
|
|||||||
@ -98,7 +98,7 @@ public class ChatGroupController {
|
|||||||
|
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* 查看与自己有关聊天房间 不论单群
|
* 查看与自己有关聊天房间列表 不论单群
|
||||||
*/
|
*/
|
||||||
// @SaCheckPermission("chatGroup:list:getList")
|
// @SaCheckPermission("chatGroup:list:getList")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
@ -115,6 +115,7 @@ public class ChatGroupController {
|
|||||||
if (!list.isEmpty()) {
|
if (!list.isEmpty()) {
|
||||||
for (ChatGroup chatGroup : list) {
|
for (ChatGroup chatGroup : list) {
|
||||||
setValue(chatGroup, userId);
|
setValue(chatGroup, userId);
|
||||||
|
//过滤搜索
|
||||||
if (searchObject != null && searchObject.getName() != null && !searchObject.getName().isEmpty()) {
|
if (searchObject != null && searchObject.getName() != null && !searchObject.getName().isEmpty()) {
|
||||||
if (chatGroup.getName().contains(searchObject.getName())) {
|
if (chatGroup.getName().contains(searchObject.getName())) {
|
||||||
searchTemp.add(chatGroup);
|
searchTemp.add(chatGroup);
|
||||||
@ -180,7 +181,9 @@ public class ChatGroupController {
|
|||||||
* 将房间进行返回前的处理
|
* 将房间进行返回前的处理
|
||||||
*/
|
*/
|
||||||
private void setValue(ChatGroup byId, Long userId){
|
private void setValue(ChatGroup byId, Long userId){
|
||||||
if (byId.getType().equals("0")){
|
|
||||||
|
switch (byId.getType()) {
|
||||||
|
case "0" -> {
|
||||||
//单聊 要获取对方头像 对方的名称作为聊天昵称
|
//单聊 要获取对方头像 对方的名称作为聊天昵称
|
||||||
String members = byId.getMembers();
|
String members = byId.getMembers();
|
||||||
List<Long> list = JSONObject.parseArray(members, Long.class);
|
List<Long> list = JSONObject.parseArray(members, Long.class);
|
||||||
@ -190,24 +193,12 @@ public class ChatGroupController {
|
|||||||
if (sysUserVo != null) {
|
if (sysUserVo != null) {
|
||||||
byId.setName(sysUserVo.getNickName());
|
byId.setName(sysUserVo.getNickName());
|
||||||
byId.setAvatar(sysUserVo.getAvatar());
|
byId.setAvatar(sysUserVo.getAvatar());
|
||||||
}else{
|
} else {
|
||||||
byId.setName("此用户已注销");
|
byId.setName("此用户已注销");
|
||||||
byId.setAvatar(null);
|
byId.setAvatar(null);
|
||||||
}
|
}
|
||||||
}else if (byId.getType().equals("2")){
|
}
|
||||||
//消息通知
|
case "1" -> {
|
||||||
byId.setName("系统消息");
|
|
||||||
byId.setAvatar(null);
|
|
||||||
} else if (byId.getType().equals("3")) {
|
|
||||||
byId.setName("考勤消息");
|
|
||||||
byId.setAvatar( null);
|
|
||||||
}else if (byId.getType().equals("4")){
|
|
||||||
byId.setName("安全消息");
|
|
||||||
byId.setAvatar( null);
|
|
||||||
}else if (byId.getType().equals("5")){
|
|
||||||
byId.setName("质量消息");
|
|
||||||
byId.setAvatar( null);
|
|
||||||
} else {
|
|
||||||
//群聊 则只需要将群主头像赋值给群聊头像
|
//群聊 则只需要将群主头像赋值给群聊头像
|
||||||
SysUserVo sysUserVo = sysUserService.selectUserById(byId.getOwerId());
|
SysUserVo sysUserVo = sysUserService.selectUserById(byId.getOwerId());
|
||||||
if (sysUserVo != null) {
|
if (sysUserVo != null) {
|
||||||
@ -216,6 +207,27 @@ public class ChatGroupController {
|
|||||||
byId.setAvatar(null);
|
byId.setAvatar(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
case "2" -> {
|
||||||
|
//消息通知
|
||||||
|
byId.setName("系统消息");
|
||||||
|
byId.setAvatar(null);
|
||||||
|
}
|
||||||
|
case "3" -> {
|
||||||
|
byId.setName("考勤消息");
|
||||||
|
byId.setAvatar(null);
|
||||||
|
}
|
||||||
|
case "4" -> {
|
||||||
|
byId.setName("安全消息");
|
||||||
|
byId.setAvatar(null);
|
||||||
|
}
|
||||||
|
case "5" -> {
|
||||||
|
byId.setName("质量消息");
|
||||||
|
byId.setAvatar(null);
|
||||||
|
}
|
||||||
|
default -> {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
LambdaQueryWrapper<ChatHistory> historyLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<ChatHistory> historyLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
historyLambdaQueryWrapper.eq(ChatHistory::getGeterId, byId.getId());
|
historyLambdaQueryWrapper.eq(ChatHistory::getGeterId, byId.getId());
|
||||||
|
|||||||
Reference in New Issue
Block a user