hongjli
2025-04-15 1acf9a48021d0af1d81fdf3ed8fcf8dffd020f6b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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);