feat(登录): 实现用户登录功能及相关模块
- 添加LoginController处理登录请求 - 实现UserLoginService登录逻辑,包括角色和权限验证 - 新增LoginRequest和LoginUser DTO - 在UsersService中添加登录方法 - 添加RoleInitializer初始化系统角色 - 更新项目结构文档 - 临时禁用Spring Security配置
This commit is contained in:
@@ -11,6 +11,14 @@ import com.qf.backend.entity.Users;
|
||||
* 用户基本信息表 Mapper 接口
|
||||
*/
|
||||
public interface UsersMapper extends BaseMapper<Users> {
|
||||
/**
|
||||
* 登录
|
||||
* @param username 用户名
|
||||
* @param password 密码
|
||||
* @return 用户对象
|
||||
*/
|
||||
@Select("select * from users where username = #{username} and password = #{password}")
|
||||
Users login(String username, String password);
|
||||
/**
|
||||
* 根据用户名查询用户
|
||||
* @param username 用户名
|
||||
|
||||
Reference in New Issue
Block a user