-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- 테스트 코드 아직 작성하지 않았습니다. - "이름, 생년월일" 을 통해 유저 아이디 찾기를 진행합니다. - "생년월일"이 아이디 찾기에서 사용되기 때문에, 회원가입시 "생년월일" 데이터를 필수적으로 넘겨야 하는 식으로 변경하였습니다.
- Loading branch information
Showing
31 changed files
with
138 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/main/java/com/airjnc/common/exception/BadRequestException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/main/java/com/airjnc/common/exception/DefaultException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/main/java/com/airjnc/common/exception/DuplicatedException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/main/java/com/airjnc/common/exception/NotFoundException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/main/java/com/airjnc/common/exception/UnauthorizedException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package com.airjnc.common.util; | ||
|
||
public interface CommonRegex { | ||
|
||
String localDate = "\\d{4}-\\d{2}-\\d{2}"; | ||
} |
5 changes: 0 additions & 5 deletions
5
src/main/java/com/airjnc/common/util/constant/SessionKey.java
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...irjnc/common/util/constant/ErrorCode.java → ...rjnc/common/util/enumerate/ErrorCode.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
src/main/java/com/airjnc/common/util/enumerate/SessionKey.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package com.airjnc.common.util.enumerate; | ||
|
||
public enum SessionKey { | ||
USER, | ||
} |
2 changes: 1 addition & 1 deletion
2
src/main/java/com/airjnc/common/util/factory/ErrorsFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
src/main/java/com/airjnc/user/dto/request/FindEmailDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.airjnc.user.dto.request; | ||
|
||
import com.airjnc.common.util.CommonRegex; | ||
import javax.validation.constraints.NotNull; | ||
import javax.validation.constraints.Pattern; | ||
import lombok.Getter; | ||
import lombok.RequiredArgsConstructor; | ||
|
||
@Getter | ||
@RequiredArgsConstructor | ||
public class FindEmailDTO { | ||
|
||
@NotNull | ||
private final String name; | ||
|
||
@Pattern(regexp = CommonRegex.localDate) | ||
private final String birthDate; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/main/java/com/airjnc/user/service/SessionUserStateService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.airjnc.user.util; | ||
|
||
public interface UserRegex { | ||
|
||
String password = "^(?=.*[0-9])(?=.*[a-z])(?=.*[@#!~$%^&-+=()])(?=\\S+$).{8,16}$"; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,32 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
<mapper namespace="com.airjnc.user.dao.mapper.UserMapper"> | ||
<select id="findById" resultType="UserEntity"> | ||
SELECT * | ||
FROM user | ||
WHERE id = #{id} | ||
AND deleted_at IS NULL; | ||
</select> | ||
<select id="findByEmail" resultType="UserEntity"> | ||
SELECT * | ||
FROM user | ||
WHERE email = #{email}; | ||
</select> | ||
<insert id="save" useGeneratedKeys="true" keyProperty="id"> | ||
INSERT INTO user (email, password, name, gender) | ||
VALUES (#{email}, #{password}, #{name}, #{gender}); | ||
</insert> | ||
<delete id="remove"> | ||
UPDATE user | ||
set deleted_at = now() | ||
WHERE id = #{id} | ||
AND deleted_at IS NULL | ||
</delete> | ||
<delete id="remove"> | ||
UPDATE user | ||
set deleted_at = now() | ||
WHERE id = #{id} | ||
AND deleted_at IS NULL | ||
</delete> | ||
<insert id="save" keyProperty="id" useGeneratedKeys="true"> | ||
INSERT INTO user (email, password, name, gender) | ||
VALUES (#{email}, #{password}, #{name}, #{gender}); | ||
</insert> | ||
<select id="getEmail" resultType="String"> | ||
SELECT email | ||
FROM user | ||
WHERE name = #{name} | ||
AND birthdate = ${birthDate}; | ||
</select> | ||
<select id="findById" resultType="UserEntity"> | ||
SELECT * | ||
FROM user | ||
WHERE id = #{id} | ||
AND deleted_at IS NULL; | ||
</select> | ||
<select id="findByEmail" resultType="UserEntity"> | ||
SELECT * | ||
FROM user | ||
WHERE email = #{email}; | ||
</select> | ||
</mapper> |
Oops, something went wrong.