懒羊羊
2023-08-30 71e81ed1d12e4d69f53c8ad9e066650ad4186293
提交 | 用户 | 时间
71e81e 1 /**
2  * Copyright 2018-2020 stylefeng & fengshuonan (https://gitee.com/stylefeng)
3  * <p>
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  * <p>
8  * http://www.apache.org/licenses/LICENSE-2.0
9  * <p>
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 package cn.stylefeng.guns.sys.core.constant.factory;
17
18 import cn.stylefeng.guns.sys.modular.system.entity.Dict;
19 import cn.stylefeng.guns.sys.modular.system.entity.Menu;
20
21 import java.util.List;
22
23 /**
24  * 常量生产工厂的接口
25  *
26  * @author fengshuonan
27  * @date 2017-06-14 21:12
28  */
29 public interface IConstantFactory {
30
31     /**
32      * 根据用户id获取用户名称
33      *
34      * @author stylefeng
35      * @Date 2017/5/9 23:41
36      */
37     String getUserNameById(Long userId);
38
39     /**
40      * 根据用户id获取用户账号
41      *
42      * @author stylefeng
43      * @date 2017年5月16日21:55:371
44      */
45     String getUserAccountById(Long userId);
46
47     /**
48      * 通过角色ids获取角色名称
49      */
50     String getRoleName(String roleIds);
51
52     /**
53      * 通过角色id获取角色名称
54      */
55     String getSingleRoleName(Long roleId);
56
57     /**
58      * 通过角色id获取角色英文名称
59      */
60     String getSingleRoleTip(Long roleId);
61
62     /**
63      * 获取部门名称
64      */
65     String getDeptName(Long deptId);
66
67     /**
68      * 获取菜单的名称们(多个)
69      */
70     String getMenuNames(String menuIds);
71
72     /**
73      * 获取菜单名称
74      */
75     String getMenuName(Long menuId);
76
77     /**
78      * 获取菜单通过编号
79      */
80     Menu getMenuByCode(String code);
81
82     /**
83      * 获取菜单名称通过编号
84      */
85     String getMenuNameByCode(String code);
86
87     /**
88      * 获取菜单名称通过编号
89      */
90     Long getMenuIdByCode(String code);
91
92     /**
93      * 获取字典名称
94      */
95     String getDictName(Long dictId);
96
97     /**
98      * 获取通知标题
99      */
100     String getNoticeTitle(Long dictId);
101
102     /**
103      * 根据字典名称和字典中的值获取对应的名称
104      */
105     String getDictsByName(String name, String code);
106
107     /**
108      * 获取字典名称
109      */
110     String getDictNameByCode(String dictCode);
111
112     /**
113      * 获取性别名称
114      */
115     String getSexName(String sexCode);
116
117     /**
118      * 获取用户登录状态
119      */
120     String getStatusName(String status);
121
122     /**
123      * 获取菜单状态
124      */
125     String getMenuStatusName(String status);
126
127     /**
128      * 查询字典
129      */
130     List<Dict> findInDict(Long id);
131
132     /**
133      * 获取被缓存的对象(用户删除业务)
134      */
135     String getCacheObject(String para);
136
137     /**
138      * 获取子部门id
139      */
140     List<Long> getSubDeptId(Long deptId);
141
142     /**
143      * 获取所有父部门id
144      */
145     List<Long> getParentDeptIds(Long deptId);
146
147     /**
148      * 获取用户的职位名称
149      */
150     String getPositionName(Long userId);
151
152     /**
153      * 获取用户的职位ids
154      */
155     String getPositionIds(Long userId);
156
157 }