generated from semicolondsm/Semicolon_Repository_Generator
-
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.
Merge branch 'main' into 342-fcm-setting-refector
- Loading branch information
Showing
194 changed files
with
3,901 additions
and
1,030 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
14 changes: 14 additions & 0 deletions
14
src/main/java/com/walkhub/walkhub/domain/auth/exception/PhoneNumberNotFoundException.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,14 @@ | ||
package com.walkhub.walkhub.domain.auth.exception; | ||
|
||
import com.walkhub.walkhub.global.error.exception.ErrorCode; | ||
import com.walkhub.walkhub.global.error.exception.WalkhubException; | ||
|
||
public class PhoneNumberNotFoundException extends WalkhubException { | ||
|
||
public static final WalkhubException EXCEPTION = | ||
new PhoneNumberNotFoundException(); | ||
|
||
private PhoneNumberNotFoundException() { | ||
super(ErrorCode.PHONE_NUMBER_NOT_FOUND); | ||
} | ||
} |
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
13 changes: 13 additions & 0 deletions
13
.../java/com/walkhub/walkhub/domain/auth/presentation/dto/request/CheckAccountIdRequest.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,13 @@ | ||
package com.walkhub.walkhub.domain.auth.presentation.dto.request; | ||
|
||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
import javax.validation.constraints.NotBlank; | ||
|
||
@Getter | ||
@NoArgsConstructor | ||
public class CheckAccountIdRequest { | ||
@NotBlank(message = "account_id는 Null, 공백, 띄어쓰기를 허용하지 않습니다.") | ||
private String accountId; | ||
} |
18 changes: 18 additions & 0 deletions
18
...n/java/com/walkhub/walkhub/domain/auth/presentation/dto/request/CheckAuthCodeRequest.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.walkhub.walkhub.domain.auth.presentation.dto.request; | ||
|
||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
import javax.validation.constraints.NotBlank; | ||
|
||
@Getter | ||
@NoArgsConstructor | ||
public class CheckAuthCodeRequest { | ||
|
||
@NotBlank(message = "phone_number는 Null, 공백, 띄어쓰기를 허용하지 않습니다.") | ||
private String phoneNumber; | ||
|
||
@NotBlank(message = "auth_code는 Null, 공백, 띄어쓰기를 허용하지 않습니다.") | ||
private String authCode; | ||
|
||
} |
8 changes: 4 additions & 4 deletions
8
...va/com/walkhub/walkhub/domain/auth/presentation/dto/response/UserAccessTokenResponse.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,17 +1,17 @@ | ||
package com.walkhub.walkhub.domain.auth.presentation.dto.response; | ||
|
||
import com.fasterxml.jackson.annotation.JsonFormat; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import org.springframework.format.annotation.DateTimeFormat; | ||
|
||
import java.time.LocalDateTime; | ||
import java.time.ZonedDateTime; | ||
|
||
@Getter | ||
@Builder | ||
public class UserAccessTokenResponse { | ||
|
||
private final String accessToken; | ||
|
||
@DateTimeFormat(pattern = "yyyy-MM-ddThh:mm:SS") | ||
private final LocalDateTime expiredAt; | ||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss") | ||
private final ZonedDateTime expiredAt; | ||
} |
17 changes: 10 additions & 7 deletions
17
...ain/java/com/walkhub/walkhub/domain/auth/presentation/dto/response/UserTokenResponse.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,22 +1,25 @@ | ||
package com.walkhub.walkhub.domain.auth.presentation.dto.response; | ||
|
||
import com.fasterxml.jackson.annotation.JsonFormat; | ||
import com.walkhub.walkhub.domain.user.domain.type.Sex; | ||
import com.walkhub.walkhub.global.enums.Authority; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import org.springframework.format.annotation.DateTimeFormat; | ||
|
||
import java.time.LocalDateTime; | ||
import java.math.BigDecimal; | ||
import java.time.ZonedDateTime; | ||
|
||
@Getter | ||
@Builder | ||
public class UserTokenResponse { | ||
|
||
private final String accessToken; | ||
|
||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss") | ||
private final ZonedDateTime expiredAt; | ||
private final String refreshToken; | ||
|
||
@DateTimeFormat(pattern = "yyyy-MM-ddThh:mm:SS") | ||
private final LocalDateTime expiredAt; | ||
|
||
private final Authority authority; | ||
private final BigDecimal height; | ||
private final Integer weight; | ||
private final Sex sex; | ||
|
||
} |
17 changes: 17 additions & 0 deletions
17
src/main/java/com/walkhub/walkhub/domain/auth/service/CheckAccountIdExistsService.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,17 @@ | ||
package com.walkhub.walkhub.domain.auth.service; | ||
|
||
import com.walkhub.walkhub.domain.auth.presentation.dto.request.CheckAccountIdRequest; | ||
import com.walkhub.walkhub.domain.user.facade.UserFacade; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.stereotype.Service; | ||
|
||
@RequiredArgsConstructor | ||
@Service | ||
public class CheckAccountIdExistsService { | ||
|
||
private final UserFacade userFacade; | ||
|
||
public void execute(CheckAccountIdRequest request) { | ||
userFacade.checkUserExists(request.getAccountId()); | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
src/main/java/com/walkhub/walkhub/domain/auth/service/CheckAuthCodeExistsService.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,26 @@ | ||
package com.walkhub.walkhub.domain.auth.service; | ||
|
||
import com.walkhub.walkhub.domain.auth.exception.PhoneNumberNotFoundException; | ||
import com.walkhub.walkhub.domain.auth.presentation.dto.request.CheckAuthCodeRequest; | ||
import com.walkhub.walkhub.domain.user.domain.UserAuthCode; | ||
import com.walkhub.walkhub.domain.user.domain.repository.UserAuthCodeRepository; | ||
import com.walkhub.walkhub.domain.user.exception.UserAuthCodeNotFoundException; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.stereotype.Service; | ||
|
||
@RequiredArgsConstructor | ||
@Service | ||
public class CheckAuthCodeExistsService { | ||
|
||
private final UserAuthCodeRepository userAuthCodeRepository; | ||
|
||
public void execute(CheckAuthCodeRequest request) { | ||
UserAuthCode authCode = userAuthCodeRepository.findById(request.getPhoneNumber()) | ||
.orElseThrow(() -> PhoneNumberNotFoundException.EXCEPTION); | ||
|
||
if (!authCode.getCode().equals(request.getAuthCode())) { | ||
throw UserAuthCodeNotFoundException.EXCEPTION; | ||
} | ||
} | ||
|
||
} |
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
6 changes: 4 additions & 2 deletions
6
src/main/java/com/walkhub/walkhub/domain/badge/domain/repository/CustomBadgeRepository.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,9 +1,11 @@ | ||
package com.walkhub.walkhub.domain.badge.domain.repository; | ||
|
||
import com.walkhub.walkhub.domain.badge.domain.repository.vo.ClaimBadgeVO; | ||
import com.walkhub.walkhub.domain.badge.domain.repository.vo.DefaultBadgeVO; | ||
import com.walkhub.walkhub.domain.badge.domain.repository.vo.MyBadgeVo; | ||
|
||
import java.util.List; | ||
|
||
public interface CustomBadgeRepository { | ||
List<ClaimBadgeVO> findAllByBadgeCollectionsNotIn(Long userId); | ||
List<DefaultBadgeVO> findAllByBadgeCollectionsNotIn(Long userId); | ||
List<MyBadgeVo> findAllByBadgeCollections(Long userId); | ||
} |
Oops, something went wrong.