|
|
|
@ -54,19 +54,6 @@ public class PowerWebServiceImpl implements PowerWebService {
|
|
|
|
|
Cache cache = CacheManager.getCacheInfo(token);
|
|
|
|
|
if(cache != null){
|
|
|
|
|
Power_UserVo user = (Power_UserVo) cache.getValue();
|
|
|
|
|
//获取用户id、查询出deptid,分割后作为结果查询deptcode
|
|
|
|
|
String [] temp;
|
|
|
|
|
String delimeter = ",";
|
|
|
|
|
Power_User power_user = powerUserService.selectByUserNameByTrue(user.getUserName());
|
|
|
|
|
List userDeptCodeList = new ArrayList();
|
|
|
|
|
temp = power_user.getDeptId().split(delimeter);
|
|
|
|
|
for (int i = 0; i <temp.length ; i++) {
|
|
|
|
|
//查询表获得deptcode
|
|
|
|
|
if(power_deptMapper!=null&&temp[i]!=null){
|
|
|
|
|
Power_Dept power_dept = power_deptMapper.selectByPrimaryKeyDeptId(Integer.valueOf(temp[i]));
|
|
|
|
|
userDeptCodeList.add(power_dept.getDeptCode());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//设置名字
|
|
|
|
|
user.setUserPosition(user.getName());
|
|
|
|
@ -83,7 +70,6 @@ public class PowerWebServiceImpl implements PowerWebService {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
BeanUtils.copyProperties(user,userWebServiceVo);
|
|
|
|
|
userWebServiceVo.setDeptCode(userDeptCodeList);
|
|
|
|
|
userWebServiceVo.setMenus(menus);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|