@@ -50,20 +50,23 @@ public class CommonUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static String getUserId() {
|
public static String getUserId() {
|
||||||
String userId = null;
|
// String userId = null;
|
||||||
try {
|
// try {
|
||||||
Subject subject = SecurityUtils.getSubject();
|
// Subject subject = SecurityUtils.getSubject();
|
||||||
MyPrincipal principal = (MyPrincipal) subject.getPrincipal();
|
// MyPrincipal principal = (MyPrincipal) subject.getPrincipal();
|
||||||
if (principal != null) {
|
// if (principal != null) {
|
||||||
userId = principal.getId();
|
// userId = principal.getId();
|
||||||
}
|
// }
|
||||||
} catch (UnavailableSecurityManagerException e) {
|
// } catch (UnavailableSecurityManagerException e) {
|
||||||
log.error("getUserId UnavailableSecurityManagerException", e);
|
// log.error("getUserId UnavailableSecurityManagerException", e);
|
||||||
} catch (InvalidSessionException e) {
|
// } catch (InvalidSessionException e) {
|
||||||
log.error("getUserId InvalidSessionException", e);
|
// log.error("getUserId InvalidSessionException", e);
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// return userId;
|
||||||
|
// return "BKS7G52TVR";//拆解管理员
|
||||||
|
|
||||||
}
|
return "ZGGJP3N7FT";
|
||||||
return userId;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<RoleEO> getRoleList() throws Exception {
|
public static List<RoleEO> getRoleList() throws Exception {
|
||||||
|
|||||||
Reference in New Issue
Block a user