File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed
tang-commons/src/main/java/com/tang/commons/constants
java/com/tang/system/service/impl Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,11 @@ public class Status {
10
10
private Status () {
11
11
}
12
12
13
+ /**
14
+ * 正常
15
+ */
16
+ public static final String NORMAL = "0" ;
17
+
13
18
/**
14
19
* 已停用
15
20
*/
Original file line number Diff line number Diff line change 11
11
import org .springframework .stereotype .Service ;
12
12
import org .springframework .transaction .annotation .Transactional ;
13
13
14
+ import com .tang .commons .constants .Status ;
14
15
import com .tang .commons .domain .vo .MetaVo ;
15
16
import com .tang .commons .domain .vo .RouteVo ;
16
17
import com .tang .commons .enumeration .MenuType ;
@@ -128,7 +129,9 @@ public Set<String> getPermissionsByUserId(Long userId) {
128
129
public List <RouteVo > selectMenuListTreeByUserId (Long userId ) {
129
130
List <SysMenu > menuList ;
130
131
if (SecurityUtils .isAdmin ()) {
131
- menuList = menuMapper .selectMenuList (null );
132
+ var menu = new SysMenu ();
133
+ menu .setStatus (Status .NORMAL );
134
+ menuList = menuMapper .selectMenuList (menu );
132
135
} else {
133
136
menuList = menuMapper .selectMenuListByUserId (userId );
134
137
}
Original file line number Diff line number Diff line change 55
55
<include refid =" SysMenuVo" />
56
56
left join sys_user_role ur on rm.role_id = ur.role_id
57
57
where ur.user_id = #{userId}
58
+ and m.del_flag = '0'
59
+ and m.status = '0'
58
60
</select >
59
61
60
62
<select id =" selectMenuListByRoleId" resultMap =" SysMenuMap" >
You can’t perform that action at this time.
0 commit comments