package com.weiwojc.service;
|
|
import com.weiwojc.model.dto.UserLoginDTO;
|
import com.weiwojc.model.dto.UserRegisterDTO;
|
import com.weiwojc.model.entity.User;
|
|
public interface UserService {
|
/**
|
* 用户注册
|
*/
|
User register(UserRegisterDTO registerDTO);
|
|
/**
|
* 用户登录
|
*/
|
String login(UserLoginDTO loginDTO);
|
|
/**
|
* 获取用户信息
|
*/
|
User getUserInfo(Long userId);
|
|
/**
|
* 更新最后登录时间
|
*/
|
void updateLastLogin(Long userId);
|
|
/**
|
* 检查用户是否被锁定
|
*/
|
boolean isUserLocked(Long userId);
|
|
/**
|
* 增加登录失败次数
|
*/
|
void incrementLoginAttempts(String username);
|
|
/**
|
* 重置登录失败次数
|
*/
|
void resetLoginAttempts(String username);
|
}
|