mirror of
https://gitee.com/bookshelfplus/bookshelfplus
synced 2025-09-22 01:30:40 +08:00
重新引入Redis;用户登录与管理员登录完成;引入NanoID代替UUID;调整Spring Boot idea中的启动参数;swagger页面描述信息完善;更新swagger,更新Api文档
This commit is contained in:
@@ -21,6 +21,14 @@ public class UserServiceImpl implements UserService {
|
||||
return userModel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserModel getUserById(Integer id) {
|
||||
UserDO userDO = userDOMapper.selectByPrimaryKey(id);
|
||||
UserModel userModel = convertFromDataObject(userDO);
|
||||
|
||||
return userModel;
|
||||
}
|
||||
|
||||
private UserModel convertFromDataObject(UserDO userDO) {
|
||||
if (userDO == null) {
|
||||
return null;
|
||||
|
@@ -10,4 +10,11 @@ public interface UserService {
|
||||
* @param encryptPwd
|
||||
*/
|
||||
UserModel userLogin(String username, String encryptPwd);
|
||||
|
||||
/**
|
||||
* 通过用户Id获取用户
|
||||
* @param id 用户Id
|
||||
* @return
|
||||
*/
|
||||
UserModel getUserById(Integer id);
|
||||
}
|
||||
|
Reference in New Issue
Block a user