From 087b1ca78ff9d106e1258489e3ee8abbd3858f0f Mon Sep 17 00:00:00 2001 From: Koi-tsk <337023856@qq.com> Date: Thu, 1 Sep 2022 17:10:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=81=9C=E7=94=A8=E8=B4=A6=E5=8F=B7=E4=B8=8D?= =?UTF-8?q?=E5=88=86=E9=85=8D=E5=AE=A1=E6=89=B9bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../processForm/listener/v3/ApplyDistrictListener.java | 4 ++-- .../renren/modules/processForm/listener/v3/CityListener.java | 4 ++-- .../processForm/listener/v3/OwnerDistrictListener.java | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) 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(); }