Files
DataManagerSystem/src/backend/service/interfaces/UserService.java

34 lines
840 B
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package backend.service.interfaces;
import backend.model.User;
import java.util.*;
/**
* 用户服务接口
* 定义了用户相关的业务操作方法
*/
public interface UserService {
/**
* 根据用户ID获取用户信息
* @param id 用户ID
* @return 用户对象如果未找到则返回null
*/
User getUserInfo(int id);
/**
* 列出所有用户信息
* @param requesterId 请求者用户ID用于权限验证
* @return 用户列表
*/
List<User> listAllUsers(int requesterId);
/**
* 更新用户角色权限
* @param targetId 目标用户ID
* @param newRole 新的角色权限
* @param adminId 管理员用户ID
* @return 操作是否成功
*/
boolean updateUserRole(int targetId, String newRole, int adminId);//用户权限
}