添加用户注册接口
This commit is contained in:
parent
6d2fb4c999
commit
6146f7c95b
|
@ -0,0 +1,32 @@
|
||||||
|
package com.example.takeawaysystemserver.model.dto;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Ethereal
|
||||||
|
* @date 2024/7/11
|
||||||
|
* @description 用户注册类DTO
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class UserRegisterDTO {
|
||||||
|
/**
|
||||||
|
* 用户名
|
||||||
|
*/
|
||||||
|
private String username;
|
||||||
|
/**
|
||||||
|
* 密码
|
||||||
|
*/
|
||||||
|
private String password;
|
||||||
|
/**
|
||||||
|
* 手机号
|
||||||
|
*/
|
||||||
|
private String phone;
|
||||||
|
/**
|
||||||
|
* 地址
|
||||||
|
*/
|
||||||
|
private String address;
|
||||||
|
}
|
|
@ -2,6 +2,8 @@ package com.example.takeawaysystemserver.service;
|
||||||
|
|
||||||
import com.example.takeawaysystemserver.entity.User;
|
import com.example.takeawaysystemserver.entity.User;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.example.takeawaysystemserver.model.dto.UserRegisterDTO;
|
||||||
|
import com.example.takeawaysystemserver.util.R;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author qiushengyu
|
* @author qiushengyu
|
||||||
|
@ -9,5 +11,10 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
* @createDate 2024-07-11 17:14:00
|
* @createDate 2024-07-11 17:14:00
|
||||||
*/
|
*/
|
||||||
public interface UserService extends IService<User> {
|
public interface UserService extends IService<User> {
|
||||||
|
/**
|
||||||
|
* 用户注册
|
||||||
|
* @param userRegisterDTO 注册类DTO
|
||||||
|
* @return 注册信息
|
||||||
|
*/
|
||||||
|
R<String> register(UserRegisterDTO userRegisterDTO);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,8 +2,10 @@ package com.example.takeawaysystemserver.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.example.takeawaysystemserver.entity.User;
|
import com.example.takeawaysystemserver.entity.User;
|
||||||
|
import com.example.takeawaysystemserver.model.dto.UserRegisterDTO;
|
||||||
import com.example.takeawaysystemserver.service.UserService;
|
import com.example.takeawaysystemserver.service.UserService;
|
||||||
import com.example.takeawaysystemserver.mapper.UserMapper;
|
import com.example.takeawaysystemserver.mapper.UserMapper;
|
||||||
|
import com.example.takeawaysystemserver.util.R;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -15,6 +17,10 @@ import org.springframework.stereotype.Service;
|
||||||
public class UserServiceImpl extends ServiceImpl<UserMapper, User>
|
public class UserServiceImpl extends ServiceImpl<UserMapper, User>
|
||||||
implements UserService{
|
implements UserService{
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<String> register(UserRegisterDTO userRegisterDTO) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue