Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions src/main/java/com/newdeal/ledger/user/dto/UserDto.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,17 @@
import lombok.Data;
import lombok.NoArgsConstructor;

@AllArgsConstructor
@NoArgsConstructor
@Data
@NoArgsConstructor
@AllArgsConstructor
public class UserDto {
private String email;
private String password;
private String name;
private String phone;
private String address;
private String profileImage;
private Date createdAt;
private String role;
private String email;
private String uuid;
private String password;
private String name;
private String phone;
private String address;
private String profileImage;
private Date createdAt;
private String role;
}
6 changes: 3 additions & 3 deletions src/main/resources/db/data/afterMigrate.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ TRUNCATE TABLE tag;
TRUNCATE TABLE transaction;
SET foreign_key_checks = 1;

INSERT INTO ymember (email, password, name, phone, address, profile_image, created_at, role)
VALUES ('user1@example.com', 'password1', 'User One', '123-456-7890', '123 Main St', null, '2023-01-01', 'USER'),
('user2@example.com', 'password2', 'User Two', '234-567-8901', '234 Oak St', null, '2023-02-01', 'USER');
INSERT INTO ymember (email, uuid, password, name, phone, address, profile_image, created_at, role)
VALUES ('user1@example.com', '123e4567-e89b-12d3-a456-556642440000', 'password1', 'User One', '123-456-7890', '123 Main St', null, '2023-01-01', 'USER'),
('user2@example.com','123e4567-e89b-12d3-a456-556642440001', 'password2', 'User Two', '234-567-8901', '234 Oak St', null, '2023-02-01', 'USER');



Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- uuid 컬럼 추가
ALTER TABLE `ymember` ADD COLUMN `uuid` varchar(20) UNIQUE NOT NULL;
4 changes: 2 additions & 2 deletions src/main/resources/mybatis/mapper/user-mapper.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<mapper namespace="com.newdeal.ledger.user.mapper.UserMapper">

<insert id="save" parameterType="com.newdeal.ledger.user.dto.UserDto" >
INSERT INTO ymember (email, password, name, phone, address, profile_image)
VALUES (#{email}, #{password}, #{name}, #{phone}, #{address}, #{profileImage})
INSERT INTO ymember (email,uuid, password, name, phone, address, profile_image)
VALUES (#{email}, ${uuid}, #{password}, #{name}, #{phone}, #{address}, #{profileImage})
</insert>

<select id="existsByPhone" resultType="boolean" >
Expand Down