Skip to content

Commit

Permalink
Merge pull request #115 from Genti2024/feat/pictureratio
Browse files Browse the repository at this point in the history
Feat/pictureratio
  • Loading branch information
LeeJae-H authored Aug 9, 2024
2 parents 88b170e + bc206e2 commit 706d01d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ public List<ExampleWithPictureFindResponseDto> getAllResponseExamples() {

Collections.shuffle(examples);

Optional<ExampleWithPictureFindResponseDto> firstMatchingRatio_2_3 = examples.stream()
.filter(example -> PictureRatio.RATIO_2_3.equals(example.getPicture().getPictureRatio()))
Optional<ExampleWithPictureFindResponseDto> firstMatching_Ratio_GARO = examples.stream()
.filter(example -> PictureRatio.RATIO_GARO.equals(example.getPicture().getPictureRatio()))
.findFirst();

firstMatchingRatio_2_3.ifPresent(matchingExample -> {
firstMatching_Ratio_GARO.ifPresent(matchingExample -> {
examples.remove(matchingExample);
examples.add(0, matchingExample);
});
Expand Down
2 changes: 1 addition & 1 deletion genti-api/src/test/java/com/gt/genti/MatchTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public void oneRequestWithAdminStrategy() {
.prompt("밤에 한강공원에서 벤치에 앉은 사진이요")
.posePicture(new CommonPictureKeyUpdateRequestDto(savedPicturePose.getKey()))
.cameraAngle(CameraAngle.HIGH)
.pictureRatio(PictureRatio.RATIO_3_2)
.pictureRatio(PictureRatio.RATIO_GARO)
.shotCoverage(ShotCoverage.UPPER_BODY)
.facePictureList(
savedPictureUserfaceList.stream().map(d -> new CommonPictureKeyUpdateRequestDto(d.getKey())).toList())
Expand Down
2 changes: 1 addition & 1 deletion genti-api/src/test/java/com/gt/genti/TestUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public static UserRoleUpdateRequestDto getUserRoleUpdateRequestDto(UserRole user

public static PGREQSaveRequestDto getPGREQSaveRequestDto() {
return PGREQSaveRequestDto.builder()
.pictureRatio(PictureRatio.RATIO_2_3)
.pictureRatio(PictureRatio.RATIO_SERO)
.shotCoverage(ShotCoverage.KNEE_SHOT)
.posePicture(getCommonPictureKeyUpdateRequestDto(FileType.USER_UPLOADED_IMAGE))
.facePictureList(get3CommonPictureKeyUpdateRequestDtos(FileType.USER_UPLOADED_IMAGE))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
@Getter
@RequiredArgsConstructor
public enum PictureRatio implements ConvertableEnum {
RATIO_3_2("RATIO_3_2", "세로3:가로2"),
RATIO_SERO("RATIO_SERO", "세로3 : 가로2"),
NONE("NONE", "NONE"),
RATIO_2_3("RATIO_2_3", "세로2:가로3");
RATIO_GARO("RATIO_GARO", "세로2 : 가로3");
private final String stringValue;
private final String response;

Expand Down

0 comments on commit 706d01d

Please sign in to comment.