-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
56 changed files
with
1,709 additions
and
495 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
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,2 @@ | ||
INSERT INTO member (member_id, email, name, picture) | ||
VALUES (UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), '[email protected]', '옥재욱', 'https://lh3.googleusercontent.com/a/ACg8ocJPZpvBzDi_TG3kMCt_eESIh1-GoXIJW9TyktH0e3NkPwg=s96-c'); |
File renamed without changes.
File renamed without changes.
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,67 @@ | ||
SET @time := NOW(); | ||
|
||
INSERT INTO dogam (member_id, waste_id, created_date) | ||
VALUES (UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1001, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1002, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1003, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1004, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1005, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1006, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1007, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1008, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1009, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1010, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1011, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1012, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1013, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1014, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1015, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1016, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1017, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1018, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1019, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1020, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1021, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1022, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1023, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1024, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1025, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1026, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1027, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1028, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1029, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1030, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1031, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1032, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1033, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1034, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1035, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1036, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1037, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1038, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1039, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1040, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1041, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1042, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1043, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1044, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1045, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1046, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1047, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1048, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1049, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1050, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1051, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1052, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1053, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1054, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1055, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1056, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1057, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1058, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1059, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1060, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1061, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1062, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1063, @time := DATE_ADD(@time, INTERVAL 1 SECOND)), | ||
(UNHEX(REPLACE('4c29cb26-d2f3-38d8-9d02-a9da30c7ad99', '-', '')), 1064, @time := DATE_ADD(@time, INTERVAL 1 SECOND)); |
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 |
---|---|---|
|
@@ -25,5 +25,5 @@ public enum Category { | |
CAUTION("주의"), | ||
PRO_FACILITY("전문시설"); | ||
|
||
final String tag; | ||
private final String tag; | ||
} |
6 changes: 4 additions & 2 deletions
6
domain/src/main/java/blisgo/domain/dictionary/vo/DogamId.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
package blisgo.infrastructure.internal.persistence.base; | ||
|
||
|
||
import blisgo.infrastructure.internal.persistence.common.JpaAuthor; | ||
import blisgo.infrastructure.internal.persistence.common.JpaPicture; | ||
import blisgo.domain.member.vo.MemberId; | ||
import lombok.NonNull; | ||
import org.springframework.data.domain.AuditorAware; | ||
import org.springframework.security.core.Authentication; | ||
|
@@ -11,29 +10,22 @@ | |
import org.springframework.security.oauth2.core.oidc.user.OidcUser; | ||
|
||
import java.util.Optional; | ||
import java.util.UUID; | ||
|
||
public class OidcAuditorAware implements AuditorAware<JpaAuthor> { | ||
public class OidcAuditorAware implements AuditorAware<UUID> { | ||
|
||
@NonNull | ||
@Override | ||
public Optional<JpaAuthor> getCurrentAuditor() { | ||
public Optional<UUID> getCurrentAuditor() { | ||
Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); | ||
|
||
if (authentication == null || !authentication.isAuthenticated()) { | ||
return Optional.of(JpaAuthor.of( | ||
"[email protected]", | ||
"관리자", | ||
JpaPicture.of("https://res.cloudinary.com/blisgo/image/upload/f_auto,q_auto/v1/manifest/admin") | ||
)); | ||
return Optional.of(UUID.randomUUID()); | ||
} | ||
|
||
OidcUser oidcUser = (OidcUser) authentication.getPrincipal(); | ||
OidcUserInfo oidcUserInfo = oidcUser.getUserInfo(); | ||
|
||
return Optional.of(JpaAuthor.of( | ||
oidcUserInfo.getEmail(), | ||
oidcUserInfo.getFullName(), | ||
JpaPicture.of(oidcUserInfo.getPicture()) | ||
)); | ||
return Optional.ofNullable(MemberId.of(oidcUserInfo.getEmail()).id()); | ||
} | ||
} |
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
15 changes: 1 addition & 14 deletions
15
...e/internal/src/main/java/blisgo/infrastructure/internal/persistence/common/JpaAuthor.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 |
---|---|---|
@@ -1,30 +1,17 @@ | ||
package blisgo.infrastructure.internal.persistence.common; | ||
|
||
import jakarta.persistence.AttributeOverride; | ||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Embeddable; | ||
import jakarta.persistence.Embedded; | ||
import lombok.AccessLevel; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import org.hibernate.annotations.Comment; | ||
|
||
@Getter | ||
@Embeddable | ||
@AllArgsConstructor(staticName = "of") | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@NoArgsConstructor(access = AccessLevel.PUBLIC) | ||
public class JpaAuthor { | ||
|
||
@Column(name = "author_email") | ||
@Comment("회원 이메일(FK)") | ||
private String email; | ||
|
||
@Column(name = "author_name") | ||
@Comment("작성자") | ||
private String name; | ||
|
||
@Embedded | ||
@AttributeOverride(name = "url", column = @Column(name = "author_picture")) | ||
private JpaPicture picture; | ||
} |
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
Oops, something went wrong.