郑永安
2023-06-19 7a6abd05683528032687c75e80e0bd2030a3e46c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
package com.gkhy.safePlatform.account.service;
 
import com.gkhy.safePlatform.account.entity.user.PermissionInfo;
import com.gkhy.safePlatform.account.entity.user.RoleInfo;
import com.gkhy.safePlatform.account.entity.user.UserInfo;
import com.gkhy.safePlatform.account.model.dto.req.AccountPwdChangeReqDTO;
import com.gkhy.safePlatform.account.model.dto.req.LoginReqDTO;
import com.gkhy.safePlatform.account.model.dto.resp.MenuRespDTO;
import com.gkhy.safePlatform.account.model.dto.resp.UserLoginRespDTO;
import com.gkhy.safePlatform.commons.co.ContextCacheUser;
import org.springframework.security.core.userdetails.UserDetails;
 
import java.util.List;
 
public interface AuthService {
 
 
    /**
    * @Description: 根据userId获取用户角色
    */
    RoleInfo getUserRoleByUserId(Long userId);
 
    /**
     * @Description: 根据userId和project获取用户菜单树
     */
    List<MenuRespDTO> getUserMenuTreeByUserIdAndProjectId(ContextCacheUser currentUser, Long projectId);
 
    /**
    * @Description: 登录
    */
    UserLoginRespDTO authLogin(LoginReqDTO loginParam);
 
 
    /**
    * @Description: 根据username获取permission
    */
    List<PermissionInfo> getUserPermissionByUserId(Long userId);
 
 
    /**
     * @Description: 根据username获取用户信息
     */
    UserInfo getUserInfoByUserId(Long userId);
 
 
    /**
    * @Description: 根据用户名登出用户
    */
    void authLogout(Long userId);
 
    /**
     * @Description: 根据userId获取用户信息
     */
 
    UserInfo getUserByUserId(Long userId);
 
    /**
    * @Description: 根据username获取用户信息
    */
    UserDetails getUserDetailsByUsername(String username);
 
 
    /**
    * @Description: 根据 uid 修改密码
    */
    void pwdChange(ContextCacheUser currentUser, AccountPwdChangeReqDTO reqDTO);
}