WMUTIL 优化
parent
e224af2898
commit
8366f4fcf6
|
@ -298,19 +298,20 @@ public class wmUtil {
|
||||||
}
|
}
|
||||||
try{
|
try{
|
||||||
TSUser user = ResourceUtil.getSessionUserName();
|
TSUser user = ResourceUtil.getSessionUserName();
|
||||||
|
System.out.println("user.getId()========"+user.getId());
|
||||||
String roles = "";
|
String roles = "";
|
||||||
if (user != null) {
|
if (user != null) {
|
||||||
List<TSRoleUser> rUsers = systemService.findByProperty(TSRoleUser.class, "TSUser.id", user.getId());
|
List<TSRoleUser> rUsers = systemService.findByProperty(TSRoleUser.class, "TSUser.id", user.getId());
|
||||||
for (TSRoleUser ru : rUsers) {
|
for (TSRoleUser ru : rUsers) {
|
||||||
|
|
||||||
TSRole role = ru.getTSRole();
|
TSRole role = ru.getTSRole();
|
||||||
roles += role.getRoleCode() + ",";
|
roles += role.getRoleCode() + ",";
|
||||||
|
System.out.println("role.getRoleCode()========"+role.getRoleCode());
|
||||||
}
|
}
|
||||||
if (roles.length() > 0) {
|
System.out.println("roles========"+roles);
|
||||||
roles = roles.substring(0, roles.length() - 1);
|
System.out.println("cusrole========"+cusrole);
|
||||||
}
|
if( StringUtil.strPos(roles,cusrole) ){
|
||||||
if(roles.equals(cusrole)){
|
|
||||||
cusCode = user.getUserName();
|
cusCode = user.getUserName();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}catch (Exception e) {
|
}catch (Exception e) {
|
||||||
|
|
Loading…
Reference in New Issue