diff --git a/src/main/java/com/beside/startrail/sign/handler/SignWithdrawalHandler.java b/src/main/java/com/beside/startrail/sign/handler/SignWithdrawalHandler.java index d6b9133..c6974c1 100644 --- a/src/main/java/com/beside/startrail/sign/handler/SignWithdrawalHandler.java +++ b/src/main/java/com/beside/startrail/sign/handler/SignWithdrawalHandler.java @@ -12,6 +12,7 @@ import com.beside.startrail.relationship.repository.RelationshipRepository; import com.beside.startrail.relationship.service.RelationshipService; import com.beside.startrail.user.document.User; +import com.beside.startrail.user.model.AllowInformation; import com.beside.startrail.user.repository.UserRepository; import com.beside.startrail.user.service.UserService; import java.util.Optional; @@ -67,6 +68,9 @@ protected Mono signedTransactionalHandle(ServerRequest serverReq .map(user -> User.fromUseYn(user, YnType.N) ) + .map(user -> + User.fromAllowInformation(user, AllowInformation.builder().build()) + ) .map(UserService::create) .flatMap(userSaveCommand -> userSaveCommand.execute(userRepository) diff --git a/src/main/java/com/beside/startrail/user/document/User.java b/src/main/java/com/beside/startrail/user/document/User.java index 2fa110d..d4d19c6 100644 --- a/src/main/java/com/beside/startrail/user/document/User.java +++ b/src/main/java/com/beside/startrail/user/document/User.java @@ -41,6 +41,17 @@ public static User fromUseYn(User user, YnType useYn) { .build(); } + public static User fromAllowInformation(User user, AllowInformation allowInformation) { + return User.builder() + .userId(user.userId) + .sequence(user.sequence) + .userInformation(user.userInformation) + .allowInformation(allowInformation) + .useYn(user.useYn) + .withdrawlReason(user.getWithdrawlReason()) + .build(); + } + public static User fromReason(User user, String reason) { return User.builder() .userId(user.getUserId())