Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RELEASE] release: 리팩토링 후 첫 릴리즈 배포 #56

Merged
merged 30 commits into from
Aug 4, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
61e9f7c
feat : add getMyFourCutFiles base codes (#43)
gmkim20713 Jul 20, 2024
6883c71
feat: update uribuilderfactory
CChuYong Jul 20, 2024
c7eac81
feat: add filter predicate for v1/photos
CChuYong Jul 22, 2024
ec8e601
chore: disable zipkin for default
CChuYong Jul 22, 2024
66c81e0
chore: add production application.yaml
CChuYong Jul 22, 2024
8b32eed
Merge pull request #46 from YAPP-Github/feature/#45
CChuYong Jul 22, 2024
5a14063
feat: change kakao auth code to access token
CChuYong Jul 24, 2024
820fd84
feat: add transactional to member
CChuYong Jul 24, 2024
af85ae5
feat: add transactional to photo
CChuYong Jul 24, 2024
d575dae
feat: add photogray brand
CChuYong Jul 24, 2024
d0612f2
feat: implement photogray brand
CChuYong Jul 24, 2024
8df0aee
refactor: move vendor logics to seperate classes
CChuYong Jul 24, 2024
55134f4
feat: add error handling
CChuYong Jul 24, 2024
5ea42f5
Merge pull request #49 from YAPP-Github/hotfix/#48
gmkim20713 Jul 24, 2024
0508c7f
Merge pull request #50 from YAPP-Github/feature/MAFOO-26
gmkim20713 Jul 24, 2024
17cf408
Merge branch 'dev' into feature/MAFOO-25
gmkim20713 Jul 24, 2024
77e2ded
Merge pull request #47 from YAPP-Github/feature/MAFOO-25
CChuYong Jul 25, 2024
0891ae3
feat: add MonoMansion vendor
CChuYong Jul 25, 2024
b4ee0d4
feat: add PhotoSignature vendor
CChuYong Jul 25, 2024
3632075
feat: accept any header
CChuYong Jul 25, 2024
4a46508
feat: add PicDot qr Vendor
CChuYong Jul 25, 2024
a16f704
Merge pull request #51 from YAPP-Github/feature/MAFOO-46
CChuYong Jul 25, 2024
4b20ec0
feat : create updateOwnerMemberId for photo entity
gmkim20713 Jul 27, 2024
a222963
feat : add photo entity ownerMemberId checkout and setting logic if null
gmkim20713 Jul 27, 2024
b54b3f4
refactor: add hasOwnerMemberId in photo service
gmkim20713 Jul 27, 2024
9f6833b
refactor: add hasOwnerMemberId in photo entity
gmkim20713 Jul 28, 2024
e5c460d
Merge pull request #52 from YAPP-Github/MAFOO-38
gmkim20713 Jul 28, 2024
22ee734
feat: add mafoo qr vendor
CChuYong Jul 29, 2024
00bd6e7
feat: update image url
CChuYong Jul 29, 2024
94f2f1c
Merge pull request #53 from YAPP-Github/feature/MAFOO-58
CChuYong Jul 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: add MonoMansion vendor
  • Loading branch information
CChuYong committed Jul 25, 2024
commit 0891ae3659daff8b7209a71faba0de42a695facf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ public enum BrandType {
DONT_LOOK_UP(Pattern.compile("https://x\\.dontlxxkup\\.kr/.*")),
MY_FOUR_CUT(Pattern.compile("https://firebasestorage\\.googleapis\\.com:443/v0/b/my4ccu\\.appspot\\.com/.*")),
PHOTOGRAY(Pattern.compile("https://pgshort\\.aprd\\.io/.*")),
MONOMANSION(Pattern.compile("https://monomansion\\.net/.*"))
;

private final Pattern urlPattern;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public class QrService {
private final HaruFilmQrVendor haruFilmQrVendor;
private final MyFourCutQrVendor myFourCutQrVendor;
private final PhotoGrayQrVendor photoGrayQrVendor;
private final MonoMansionQrVendor monoMansionQrVendor;


public Mono<FileDto> getFileFromQrUrl(String qrUrl) {
Expand All @@ -34,6 +35,7 @@ public Mono<FileDto> getFileFromQrUrl(String qrUrl) {
case DONT_LOOK_UP -> dontLookUpQrVendor;
case MY_FOUR_CUT -> myFourCutQrVendor;
case PHOTOGRAY -> photoGrayQrVendor;
case MONOMANSION -> monoMansionQrVendor;
};

return createFileDto(brandType, qrVendor.extractImageFromQrUrl(qrUrl));
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package kr.mafoo.photo.service.vendors;

import kr.mafoo.photo.exception.PhotoQrUrlExpiredException;
import kr.mafoo.photo.util.WebClientUtil;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;
import org.springframework.web.reactive.function.client.WebClient;
import org.springframework.web.util.UriComponentsBuilder;
import reactor.core.publisher.Mono;

@RequiredArgsConstructor
@Component
public class MonoMansionQrVendor implements QrVendor {
private final WebClient webClient;

@Override
public Mono<byte[]> extractImageFromQrUrl(String qrUrl) {
String qrCode = extractQrCodeFromUrl(qrUrl);
String imageUrl = String.format("https://monomansion.net/api/download.php?qrcode=%s&type=P", qrCode);
return WebClientUtil
.getBlob(webClient, imageUrl)
.onErrorMap(e -> new PhotoQrUrlExpiredException());
}

private String extractQrCodeFromUrl(String url) {
return UriComponentsBuilder
.fromUriString(url)
.build()
.getQueryParams()
.getFirst("qrcode");
}
}