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 a82beef5..fc580934 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 @@ -11,6 +11,8 @@ import io.renren.common.validator.ValidatorUtils; import io.renren.common.validator.group.AddGroup; import io.renren.common.validator.group.DefaultGroup; import io.renren.common.validator.group.UpdateGroup; +import io.renren.modules.audit_team.dto.SysAuditTeamDTO; +import io.renren.modules.audit_team.service.SysAuditTeamService; import io.renren.modules.security.password.PasswordUtils; import io.renren.modules.security.user.SecurityUser; import io.renren.modules.security.user.UserDetail; @@ -36,6 +38,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; /** * 用户管理 @@ -56,6 +59,8 @@ public class SysUserController { private SysDeptService sysDeptService; @Autowired private SysRoleService sysRoleService; + @Autowired + private SysAuditTeamService sysAuditTeamService; @Value("${big_date.assignee_role_name}") private String roleName0; // 具备审批的角色名称(普通) @@ -272,6 +277,13 @@ public class SysUserController { } add(Long.parseLong(defaultAssigneeRoleId)); }}; - return new Result>().ok(new PageData<>(sysUserService.getUserByRoleList(roleId, (int) curPage, (int) limit), sysUserService.getUserByRoleListCount(roleId))); + List temp = sysUserService.getUserByRoleList(roleId, (int) curPage, (int) limit); + temp = temp.stream().map(index -> { + List sysAuditTeamDTOList = sysAuditTeamService.selectByMemberOne(index.get("id").toString()); + index.put("inAuditTeam", !sysAuditTeamDTOList.isEmpty()); + index.put("auditTeamName", sysAuditTeamDTOList.stream().findFirst().isPresent() ? sysAuditTeamDTOList.stream().findFirst().get().getName() : ""); + return index; + }).collect(Collectors.toList()); + return new Result>().ok(new PageData<>(temp, sysUserService.getUserByRoleListCount(roleId))); } } \ No newline at end of file diff --git a/renren-admin/src/main/resources/mapper/sys/SysUserDao.xml b/renren-admin/src/main/resources/mapper/sys/SysUserDao.xml index 333dde6e..23ba470e 100644 --- a/renren-admin/src/main/resources/mapper/sys/SysUserDao.xml +++ b/renren-admin/src/main/resources/mapper/sys/SysUserDao.xml @@ -200,6 +200,7 @@