Merge branch 'dev'
This commit is contained in:
commit
6f3096556b
|
@ -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<PageData<Map>>().ok(new PageData<>(sysUserService.getUserByRoleList(roleId, (int) curPage, (int) limit), sysUserService.getUserByRoleListCount(roleId)));
|
||||
List<Map> temp = sysUserService.getUserByRoleList(roleId, (int) curPage, (int) limit);
|
||||
temp = temp.stream().map(index -> {
|
||||
List<SysAuditTeamDTO> 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<PageData<Map>>().ok(new PageData<>(temp, sysUserService.getUserByRoleListCount(roleId)));
|
||||
}
|
||||
}
|
|
@ -200,6 +200,7 @@
|
|||
|
||||
<select id="getUserByRoleList" resultType="java.util.Map">
|
||||
SELECT
|
||||
DISTINCT
|
||||
sys_user.id,
|
||||
sys_user.username,
|
||||
sys_user.real_name,
|
||||
|
@ -222,7 +223,7 @@
|
|||
</select>
|
||||
<select id="getUserByRoleListCount" resultType="java.lang.Long">
|
||||
SELECT
|
||||
COUNT( sys_user.id )
|
||||
COUNT(DISTINCT sys_user.id )
|
||||
FROM
|
||||
sys_role_user
|
||||
LEFT JOIN sys_user ON sys_user.id = sys_role_user.user_id
|
||||
|
|
Loading…
Reference in New Issue