V13
This commit is contained in:
@@ -66,4 +66,6 @@ public interface UserService extends IService<User> {
|
||||
void enSpeckIm(Long userId);
|
||||
|
||||
void logout(Long id);
|
||||
|
||||
void refreshImInfo(Long userId);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.ruoyi.cai.service.impl;
|
||||
|
||||
import cn.dev33.satoken.secure.BCrypt;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@@ -473,4 +474,13 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
||||
LoginHelper.logoutApp(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void refreshImInfo(Long userId) {
|
||||
User user = this.getById(userId);
|
||||
if(user == null){
|
||||
throw new ServiceException("用户不存在");
|
||||
}
|
||||
imManager.updateImInfo(user.getId(),user.getAvatar(),user.getNickname(),user.getGender());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user