package com.guwan.backend.service; import com.guwan.backend.dto.user.LoginDto; import com.guwan.backend.dto.user.RegisterDTO; import com.guwan.backend.dto.user.UserDTO; import com.guwan.backend.vo.user.EmailRegisterRequest; import com.guwan.backend.vo.user.LoginRequest; import com.guwan.backend.vo.user.PhoneRegisterRequest; import com.guwan.backend.vo.user.RegisterRequest; public interface UserService { /** * 用户注册 * @param registerDTO * @return */ UserDTO register(RegisterDTO registerDTO); /** * 登录 * @param request * @return */ UserDTO login(LoginDto request); UserDTO getCurrentUser(); Long getCurrentUserId(); UserDTO getUserById(Long id); UserDTO updateUserInfo(UserDTO userDTO); void changePassword(String oldPassword, String newPassword); void resetPassword(String email); public String refreshToken(String token); UserDTO registerByEmail(EmailRegisterRequest request); UserDTO registerByPhone(PhoneRegisterRequest request); void sendEmailCode(String email); void sendPhoneCode(String phone); }