mirror of https://gitee.com/topiam/eiam
⚡ 优化代码
parent
59f1844d5b
commit
c4efe08aa9
|
@ -96,6 +96,7 @@ export default (props: { userId: string }) => {
|
||||||
<ProTable
|
<ProTable
|
||||||
columns={columns}
|
columns={columns}
|
||||||
search={false}
|
search={false}
|
||||||
|
rowKey={'id'}
|
||||||
request={getLoginAuditList}
|
request={getLoginAuditList}
|
||||||
params={{ userId: userId }}
|
params={{ userId: userId }}
|
||||||
pagination={{ pageSize: 10 }}
|
pagination={{ pageSize: 10 }}
|
||||||
|
|
|
@ -286,7 +286,7 @@ public class UserController {
|
||||||
@Operation(description = "查询用户登录审计列表")
|
@Operation(description = "查询用户登录审计列表")
|
||||||
@GetMapping(value = "/login_audit/list")
|
@GetMapping(value = "/login_audit/list")
|
||||||
@PreAuthorize(value = "authenticated and @sae.hasAuthority(T(cn.topiam.employee.support.security.userdetails.UserType).ADMIN)")
|
@PreAuthorize(value = "authenticated and @sae.hasAuthority(T(cn.topiam.employee.support.security.userdetails.UserType).ADMIN)")
|
||||||
public ApiRestResult<Page<UserLoginAuditListResult>> getUserLoginAuditList(@Parameter(description = "ID") @RequestParam(value = "userId", required = false) @NotBlank(message = "用户ID不能为空") Long id,
|
public ApiRestResult<Page<UserLoginAuditListResult>> getUserLoginAuditList(@Parameter(description = "ID") @RequestParam(value = "userId", required = false) @NotNull(message = "用户ID不能为空") Long id,
|
||||||
PageModel pageModel) {
|
PageModel pageModel) {
|
||||||
Page<UserLoginAuditListResult> list = userService.findUserLoginAuditList(id, pageModel);
|
Page<UserLoginAuditListResult> list = userService.findUserLoginAuditList(id, pageModel);
|
||||||
return ApiRestResult.ok(list);
|
return ApiRestResult.ok(list);
|
||||||
|
|
|
@ -266,6 +266,7 @@ public interface UserConverter {
|
||||||
//总记录数
|
//总记录数
|
||||||
auditEntityPage.forEach(audit -> {
|
auditEntityPage.forEach(audit -> {
|
||||||
UserLoginAuditListResult result = new UserLoginAuditListResult();
|
UserLoginAuditListResult result = new UserLoginAuditListResult();
|
||||||
|
result.setId(audit.getId().toString());
|
||||||
//单点登录
|
//单点登录
|
||||||
if (audit.getEventType().getCode().equals(PortalEventType.APP_SSO.getCode())) {
|
if (audit.getEventType().getCode().equals(PortalEventType.APP_SSO.getCode())) {
|
||||||
result.setAppName(getAppName(audit.getTargets().get(0).getId()));
|
result.setAppName(getAppName(audit.getTargets().get(0).getId()));
|
||||||
|
|
|
@ -35,6 +35,11 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
@Data
|
@Data
|
||||||
@Schema(description = "用户登录日志返回响应")
|
@Schema(description = "用户登录日志返回响应")
|
||||||
public class UserLoginAuditListResult {
|
public class UserLoginAuditListResult {
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
@Parameter(description = "ID")
|
||||||
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 应用名称
|
* 应用名称
|
||||||
|
|
Loading…
Reference in New Issue