🔨 锁定用户列表.
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright (c) 2023 - present Dromara, All rights reserved.
|
||||
*
|
||||
* https://visor.dromara.org
|
||||
* https://visor.dromara.org.cn
|
||||
* https://visor.orionsec.cn
|
||||
*
|
||||
* Members:
|
||||
* Jiahang Li - ljh1553488six@139.com - author
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.dromara.visor.module.infra.entity.request.user;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* 用户解锁请求
|
||||
*
|
||||
* @author Jiahang Li
|
||||
* @version 1.0.0
|
||||
* @since 2023/7/17 12:19
|
||||
*/
|
||||
@Data
|
||||
@Schema(name = "UserUnlockRequest", description = "用户解锁请求")
|
||||
public class UserUnlockRequest {
|
||||
|
||||
@NotBlank
|
||||
@Schema(description = "用户名")
|
||||
private String username;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* Copyright (c) 2023 - present Dromara, All rights reserved.
|
||||
*
|
||||
* https://visor.dromara.org
|
||||
* https://visor.dromara.org.cn
|
||||
* https://visor.orionsec.cn
|
||||
*
|
||||
* Members:
|
||||
* Jiahang Li - ljh1553488six@139.com - author
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.dromara.visor.module.infra.entity.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 用户锁定 响应对象
|
||||
*
|
||||
* @author Jiahang Li
|
||||
* @version 1.0.0
|
||||
* @since 2023-7-13 18:42
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Schema(name = "UserLockedVO", description = "用户锁定 响应对象")
|
||||
public class UserLockedVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "用户名")
|
||||
private String username;
|
||||
|
||||
@Schema(description = "失效时间")
|
||||
private Long expireTime;
|
||||
|
||||
@Schema(description = "请求ip")
|
||||
private String address;
|
||||
|
||||
@Schema(description = "请求地址")
|
||||
private String location;
|
||||
|
||||
@Schema(description = "userAgent")
|
||||
private String userAgent;
|
||||
|
||||
@Schema(description = "登录时间")
|
||||
private Date loginTime;
|
||||
|
||||
}
|
||||
@@ -23,6 +23,8 @@
|
||||
package org.dromara.visor.module.infra.service;
|
||||
|
||||
import org.dromara.visor.module.infra.entity.request.user.UserSessionOfflineRequest;
|
||||
import org.dromara.visor.module.infra.entity.request.user.UserUnlockRequest;
|
||||
import org.dromara.visor.module.infra.entity.vo.UserLockedVO;
|
||||
import org.dromara.visor.module.infra.entity.vo.UserSessionVO;
|
||||
|
||||
import java.util.List;
|
||||
@@ -44,6 +46,27 @@ public interface SystemUserManagementService {
|
||||
*/
|
||||
Integer getUserSessionCount(Long userId);
|
||||
|
||||
/**
|
||||
* 获取锁定的用户列表
|
||||
*
|
||||
* @return list
|
||||
*/
|
||||
List<UserLockedVO> getLockedUserList();
|
||||
|
||||
/**
|
||||
* 解锁用户
|
||||
*
|
||||
* @param request request
|
||||
*/
|
||||
void unlockLockedUser(UserUnlockRequest request);
|
||||
|
||||
/**
|
||||
* 获取全部用户会话列表
|
||||
*
|
||||
* @return list
|
||||
*/
|
||||
List<UserSessionVO> getUsersSessionList();
|
||||
|
||||
/**
|
||||
* 获取用户会话列表
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user