优化部门停用不显示
This commit is contained in:
@ -20,6 +20,9 @@ public class UserConstants
|
||||
/** 角色封禁状态 */
|
||||
public static final int ROLE_BLOCKED = 1;
|
||||
|
||||
/** 部门正常状态 */
|
||||
public static final int DEPT_NORMAL = 0;
|
||||
|
||||
/**
|
||||
* 用户名长度限制
|
||||
*/
|
||||
|
@ -48,11 +48,14 @@ public class DeptServiceImpl implements IDeptService
|
||||
|
||||
for (Dept dept : deptList)
|
||||
{
|
||||
Map<String, Object> deptMap = new HashMap<String, Object>();
|
||||
deptMap.put("id", dept.getDeptId());
|
||||
deptMap.put("pId", dept.getParentId());
|
||||
deptMap.put("name", dept.getDeptName());
|
||||
trees.add(deptMap);
|
||||
if (UserConstants.DEPT_NORMAL == dept.getStatus())
|
||||
{
|
||||
Map<String, Object> deptMap = new HashMap<String, Object>();
|
||||
deptMap.put("id", dept.getDeptId());
|
||||
deptMap.put("pId", dept.getParentId());
|
||||
deptMap.put("name", dept.getDeptName());
|
||||
trees.add(deptMap);
|
||||
}
|
||||
}
|
||||
return trees;
|
||||
}
|
||||
|
@ -162,6 +162,7 @@ public class UserServiceImpl implements IUserService
|
||||
* @param user 用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateUser(User user)
|
||||
{
|
||||
return userDao.updateUser(user);
|
||||
|
Reference in New Issue
Block a user