From f7e739ea7d8ad92f0d62df8c425c9992ccc4e66c Mon Sep 17 00:00:00 2001 From: wangliwen Date: Wed, 14 Dec 2022 10:48:01 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=85=B7=E5=A4=87=E5=AE=A1?= =?UTF-8?q?=E6=A0=B8=E6=9D=83=E9=99=90=E4=BA=BA=E5=91=98=E6=97=B6=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E8=BF=87=E6=BB=A4=E5=B7=B2=E5=8A=A0=E5=85=A5=E5=AE=A1?= =?UTF-8?q?=E6=A0=B8=E7=BB=84=E4=BA=BA=E5=91=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ActTaskController.java | 2 +- .../activiti/service/ActTaskService.java | 2 +- .../controller/SysAuditTeamController.java | 4 +- .../audit_team/dao/SysAuditTeamDao.java | 2 +- .../service/SysAuditTeamService.java | 2 +- .../service/impl/SysAuditTeamServiceImpl.java | 2 +- .../sys/controller/SysUserController.java | 5 ++- .../io/renren/modules/sys/dao/SysUserDao.java | 2 +- .../modules/sys/service/SysUserService.java | 2 +- .../sys/service/impl/SysUserServiceImpl.java | 4 +- .../main/resources/mapper/sys/SysUserDao.xml | 43 ++++++++++++++++++- 11 files changed, 56 insertions(+), 14 deletions(-) diff --git a/renren-admin/src/main/java/io/renren/modules/activiti/controller/ActTaskController.java b/renren-admin/src/main/java/io/renren/modules/activiti/controller/ActTaskController.java index b41f6968..e18b7c7e 100644 --- a/renren-admin/src/main/java/io/renren/modules/activiti/controller/ActTaskController.java +++ b/renren-admin/src/main/java/io/renren/modules/activiti/controller/ActTaskController.java @@ -195,7 +195,7 @@ public class ActTaskController { taskQuery.taskAssignee(SecurityUser.getUserId().toString()); taskQuery.active(); if (auditteam) { // 允许流程审核协作时 - List sysAuditTeamDTOS = sysAuditTeamService.selectByMemberOne(userId); + List sysAuditTeamDTOS = sysAuditTeamService.selectByMemberOne(Long.parseLong(userId)); List groupUserId = sysAuditTeamDTOS .stream() .map(index_ -> index_.getMember()) diff --git a/renren-admin/src/main/java/io/renren/modules/activiti/service/ActTaskService.java b/renren-admin/src/main/java/io/renren/modules/activiti/service/ActTaskService.java index c3dcdbd8..1c96b7a6 100644 --- a/renren-admin/src/main/java/io/renren/modules/activiti/service/ActTaskService.java +++ b/renren-admin/src/main/java/io/renren/modules/activiti/service/ActTaskService.java @@ -146,7 +146,7 @@ public class ActTaskService extends BaseServiceImpl { List groupUserId = new ArrayList<>(); List sysAuditTeamDTOS = new ArrayList<>(); if (auditteam) { - sysAuditTeamDTOS = sysAuditTeamService.selectByMemberOne(userId); + sysAuditTeamDTOS = sysAuditTeamService.selectByMemberOne(Long.parseLong(userId)); groupUserId = sysAuditTeamDTOS .stream() .map(index -> index.getMember()) diff --git a/renren-admin/src/main/java/io/renren/modules/audit_team/controller/SysAuditTeamController.java b/renren-admin/src/main/java/io/renren/modules/audit_team/controller/SysAuditTeamController.java index 30c2554f..e2ab36ed 100644 --- a/renren-admin/src/main/java/io/renren/modules/audit_team/controller/SysAuditTeamController.java +++ b/renren-admin/src/main/java/io/renren/modules/audit_team/controller/SysAuditTeamController.java @@ -81,6 +81,7 @@ public class SysAuditTeamController { dto.setIndex(CommonUtils.getPinYinHeadChar(dto.getName())); // 索引设置为名称拼音 dto.setMember(dto.getMember().stream().map(index -> { Optional sysUserDTO = Optional.ofNullable(sysUserService.get(Long.parseLong((String) index.get("id")))); + index.put("id", Long.parseLong((String) index.get("id"))); if (sysUserDTO.isPresent()) { index.put("name", sysUserDTO.get().getRealName()); index.put("dept_name", sysUserDTO.get().getDeptName()); @@ -100,7 +101,8 @@ public class SysAuditTeamController { ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); dto.setIndex(CommonUtils.getPinYinHeadChar(dto.getName())); // 索引设置为名称拼音 dto.setMember(dto.getMember().stream().map(index -> { - Optional sysUserDTO = Optional.ofNullable(sysUserService.get(Long.parseLong(index.get("id").toString()))); + Optional sysUserDTO = Optional.ofNullable(sysUserService.get(Long.parseLong((String) index.get("id")))); + index.put("id", Long.parseLong((String) index.get("id"))); if (sysUserDTO.isPresent()) { index.put("name", sysUserDTO.get().getRealName()); index.put("dept_name", sysUserDTO.get().getDeptName()); diff --git a/renren-admin/src/main/java/io/renren/modules/audit_team/dao/SysAuditTeamDao.java b/renren-admin/src/main/java/io/renren/modules/audit_team/dao/SysAuditTeamDao.java index 0bb304c2..f1e221dc 100644 --- a/renren-admin/src/main/java/io/renren/modules/audit_team/dao/SysAuditTeamDao.java +++ b/renren-admin/src/main/java/io/renren/modules/audit_team/dao/SysAuditTeamDao.java @@ -23,5 +23,5 @@ public interface SysAuditTeamDao extends BaseDao { * @param member * @return */ - List selectByMemberOne(@Param("member") String member); + List selectByMemberOne(@Param("member") Long member); } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/audit_team/service/SysAuditTeamService.java b/renren-admin/src/main/java/io/renren/modules/audit_team/service/SysAuditTeamService.java index 2cf6c23d..71f40eaa 100644 --- a/renren-admin/src/main/java/io/renren/modules/audit_team/service/SysAuditTeamService.java +++ b/renren-admin/src/main/java/io/renren/modules/audit_team/service/SysAuditTeamService.java @@ -13,5 +13,5 @@ import java.util.List; * @since 1.0 2022-12-12 */ public interface SysAuditTeamService extends CrudService { - List selectByMemberOne(String member); + List selectByMemberOne(Long member); } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/audit_team/service/impl/SysAuditTeamServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/audit_team/service/impl/SysAuditTeamServiceImpl.java index 3f1bd4ba..22cb20c1 100644 --- a/renren-admin/src/main/java/io/renren/modules/audit_team/service/impl/SysAuditTeamServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/audit_team/service/impl/SysAuditTeamServiceImpl.java @@ -38,7 +38,7 @@ public class SysAuditTeamServiceImpl extends CrudServiceImpl selectByMemberOne(String member) { + public List selectByMemberOne(Long member) { return baseDao.selectByMemberOne(member); } } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/sys/controller/SysUserController.java b/renren-admin/src/main/java/io/renren/modules/sys/controller/SysUserController.java index fc580934..1f62f822 100644 --- a/renren-admin/src/main/java/io/renren/modules/sys/controller/SysUserController.java +++ b/renren-admin/src/main/java/io/renren/modules/sys/controller/SysUserController.java @@ -255,6 +255,7 @@ public class SysUserController { //分页参数 long curPage = 1; long limit = 10; + boolean filterAuditTeam = Boolean.parseBoolean(params.getOrDefault("filter", "false").toString()); if (params.get(Constant.PAGE) != null) { curPage = Long.parseLong((String) params.get(Constant.PAGE)); @@ -277,9 +278,9 @@ public class SysUserController { } add(Long.parseLong(defaultAssigneeRoleId)); }}; - List temp = sysUserService.getUserByRoleList(roleId, (int) curPage, (int) limit); + List temp = sysUserService.getUserByRoleList(roleId, (int) curPage, (int) limit, filterAuditTeam); temp = temp.stream().map(index -> { - List sysAuditTeamDTOList = sysAuditTeamService.selectByMemberOne(index.get("id").toString()); + List sysAuditTeamDTOList = sysAuditTeamService.selectByMemberOne(Long.parseLong(index.get("id").toString())); index.put("inAuditTeam", !sysAuditTeamDTOList.isEmpty()); index.put("auditTeamName", sysAuditTeamDTOList.stream().findFirst().isPresent() ? sysAuditTeamDTOList.stream().findFirst().get().getName() : ""); return index; diff --git a/renren-admin/src/main/java/io/renren/modules/sys/dao/SysUserDao.java b/renren-admin/src/main/java/io/renren/modules/sys/dao/SysUserDao.java index c3eca517..509cb494 100644 --- a/renren-admin/src/main/java/io/renren/modules/sys/dao/SysUserDao.java +++ b/renren-admin/src/main/java/io/renren/modules/sys/dao/SysUserDao.java @@ -57,7 +57,7 @@ public interface SysUserDao extends BaseDao { Integer getApproverUnconfiguredRegionCount(); - List getUserByRoleList(@Param("roleIds") List roleIds, @Param("pageNum") int pageNum, @Param("pageSize") int pageSize); + List getUserByRoleList(@Param("roleIds") List roleIds, @Param("pageNum") int pageNum, @Param("pageSize") int pageSize, @Param("filter") boolean filter); Long getUserByRoleListCount(@Param("roleIds") List roleIds); } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/sys/service/SysUserService.java b/renren-admin/src/main/java/io/renren/modules/sys/service/SysUserService.java index d8bb0092..9dd3157d 100644 --- a/renren-admin/src/main/java/io/renren/modules/sys/service/SysUserService.java +++ b/renren-admin/src/main/java/io/renren/modules/sys/service/SysUserService.java @@ -72,7 +72,7 @@ public interface SysUserService extends BaseService { * @param roleIds * @return */ - List getUserByRoleList(List roleIds, int pageNum, int pageSize); + List getUserByRoleList(List roleIds, int pageNum, int pageSize, boolean filter); Long getUserByRoleListCount(List roleIds); } diff --git a/renren-admin/src/main/java/io/renren/modules/sys/service/impl/SysUserServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/sys/service/impl/SysUserServiceImpl.java index 930fbf69..cb85aff6 100644 --- a/renren-admin/src/main/java/io/renren/modules/sys/service/impl/SysUserServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/sys/service/impl/SysUserServiceImpl.java @@ -563,8 +563,8 @@ public class SysUserServiceImpl extends BaseServiceImpl getUserByRoleList(List roleIds, int pageNum, int pageSize) { - return baseDao.getUserByRoleList(roleIds, (pageNum - 1) * pageSize, pageSize); + public List getUserByRoleList(List roleIds, int pageNum, int pageSize, boolean filter) { + return baseDao.getUserByRoleList(roleIds, (pageNum - 1) * pageSize, pageSize, filter); } @Override diff --git a/renren-admin/src/main/resources/mapper/sys/SysUserDao.xml b/renren-admin/src/main/resources/mapper/sys/SysUserDao.xml index 23ba470e..808bcc08 100644 --- a/renren-admin/src/main/resources/mapper/sys/SysUserDao.xml +++ b/renren-admin/src/main/resources/mapper/sys/SysUserDao.xml @@ -199,8 +199,32 @@