diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/listener/v3/ApplyDistrictListener.java b/renren-admin/src/main/java/io/renren/modules/processForm/listener/v3/ApplyDistrictListener.java index c1d7e60e..a89c9cec 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/listener/v3/ApplyDistrictListener.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/listener/v3/ApplyDistrictListener.java @@ -94,9 +94,9 @@ public class ApplyDistrictListener implements TaskListener, ExecutionListener, A SysRoleDTO roleDTO = sysRoleService.getByName(roleName); logger.error("roleDTOId:" + roleDTO.getId()); - List userList = sysUserDao.getList(ImmutableMap.of("role_id", roleDTO.getId(), "status", "1")); + List userList = sysUserDao.getList(ImmutableMap.of("role_id", roleDTO.getId())); Optional userEntityOptional = userList.stream().sorted(Comparator.comparing(SysUserEntity::getUpdateDate).reversed()).collect(Collectors.toList()).stream() - .filter(user -> Objects.equals(regionEntity.getId(), sysRegionService.getByLevel(sysDeptService.get(user.getDeptId()).getDistrict(), RegionLevelEnum.THREE).getId())).findFirst(); + .filter(user -> Objects.equals(regionEntity.getId(), sysRegionService.getByLevel(sysDeptService.get(user.getDeptId()).getDistrict(), RegionLevelEnum.THREE).getId()) && user.getStatus()==1).findFirst(); if (userEntityOptional.isPresent()) { userId = userEntityOptional.get().getId().toString(); } diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/listener/v3/CityListener.java b/renren-admin/src/main/java/io/renren/modules/processForm/listener/v3/CityListener.java index ae69fa42..ff0391ed 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/listener/v3/CityListener.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/listener/v3/CityListener.java @@ -95,9 +95,9 @@ public class CityListener implements TaskListener, ExecutionListener, ActivitiEv SysRoleDTO roleDTO = sysRoleService.getByName(roleName); logger.error("roleDTOId:" + roleDTO.getId()); - List userList = sysUserDao.getList(ImmutableMap.of("role_id", roleDTO.getId(), "status", "1")); + List userList = sysUserDao.getList(ImmutableMap.of("role_id", roleDTO.getId())); Optional userEntityOptional = userList.stream().sorted(Comparator.comparing(SysUserEntity::getUpdateDate).reversed()).collect(Collectors.toList()).stream() - .filter(user -> Objects.equals(regionEntity.getId(), sysRegionService.getByLevel(sysDeptService.get(user.getDeptId()).getDistrict(), RegionLevelEnum.TWO).getId())).findFirst(); + .filter(user -> Objects.equals(regionEntity.getId(), sysRegionService.getByLevel(sysDeptService.get(user.getDeptId()).getDistrict(), RegionLevelEnum.TWO).getId()) && user.getStatus()==1).findFirst(); if (userEntityOptional.isPresent()) { userId = userEntityOptional.get().getId().toString(); } diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/listener/v3/OwnerDistrictListener.java b/renren-admin/src/main/java/io/renren/modules/processForm/listener/v3/OwnerDistrictListener.java index ccb40225..145adfab 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/listener/v3/OwnerDistrictListener.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/listener/v3/OwnerDistrictListener.java @@ -91,9 +91,9 @@ public class OwnerDistrictListener implements TaskListener, ExecutionListener, A logger.error("regionEntityId:" + regionEntity.getId()); SysRoleDTO roleDTO = sysRoleService.getByName(roleName); logger.error("roleDTOId:" + roleDTO.getId()); - List userList = sysUserDao.getList(ImmutableMap.of("role_id", roleDTO.getId(), "status", "1")); + List userList = sysUserDao.getList(ImmutableMap.of("role_id", roleDTO.getId())); Optional userEntityOptional = userList.stream().sorted(Comparator.comparing(SysUserEntity::getUpdateDate).reversed()).collect(Collectors.toList()).stream() - .filter(user -> Objects.equals(regionEntity.getId(), sysRegionService.getByLevel(sysDeptService.get(user.getDeptId()).getDistrict(), RegionLevelEnum.THREE).getId())).findFirst(); + .filter(user -> Objects.equals(regionEntity.getId(), sysRegionService.getByLevel(sysDeptService.get(user.getDeptId()).getDistrict(), RegionLevelEnum.THREE).getId()) && user.getStatus()==1).findFirst(); if (userEntityOptional.isPresent()) { userId = userEntityOptional.get().getId().toString(); }