优化代码

pull/65/head
awenes 1 year ago
parent 59f1844d5b
commit c4efe08aa9

@ -96,6 +96,7 @@ export default (props: { userId: string }) => {
<ProTable
columns={columns}
search={false}
rowKey={'id'}
request={getLoginAuditList}
params={{ userId: userId }}
pagination={{ pageSize: 10 }}

@ -286,7 +286,7 @@ public class UserController {
@Operation(description = "查询用户登录审计列表")
@GetMapping(value = "/login_audit/list")
@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) {
Page<UserLoginAuditListResult> list = userService.findUserLoginAuditList(id, pageModel);
return ApiRestResult.ok(list);

@ -266,6 +266,7 @@ public interface UserConverter {
//总记录数
auditEntityPage.forEach(audit -> {
UserLoginAuditListResult result = new UserLoginAuditListResult();
result.setId(audit.getId().toString());
//单点登录
if (audit.getEventType().getCode().equals(PortalEventType.APP_SSO.getCode())) {
result.setAppName(getAppName(audit.getTargets().get(0).getId()));

@ -35,6 +35,11 @@ import io.swagger.v3.oas.annotations.media.Schema;
@Data
@Schema(description = "用户登录日志返回响应")
public class UserLoginAuditListResult {
/**
* ID
*/
@Parameter(description = "ID")
private String id;
/**
*

Loading…
Cancel
Save