yl-backend/src/main/java/com/guwan/backend/service/UserService.java

29 lines
1013 B
Java
Raw Normal View History

2024-12-06 20:36:28 +08:00
package com.guwan.backend.service;
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 {
2024-12-07 14:43:43 +08:00
/**
* 用户注册
* @param registerDTO
* @return
*/
2024-12-06 20:36:28 +08:00
UserDTO register(RegisterDTO registerDTO);
UserDTO login(LoginRequest 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);
}