Skip to content

Commit

Permalink
Merge pull request #439 from tukcomCD2024/ARCH-164-B-feat/group_updat…
Browse files Browse the repository at this point in the history
…e_v3

feat : 그룹 업데이트 기능 추가 #405
  • Loading branch information
seokho-1116 authored May 16, 2024
2 parents 028136d + 03e7ef2 commit 6b07b17
Show file tree
Hide file tree
Showing 58 changed files with 1,643 additions and 716 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import site.timecapsulearchive.core.domain.capsuleskin.entity.CapsuleSkin;
import site.timecapsulearchive.core.domain.capsuleskin.service.CapsuleSkinService;
import site.timecapsulearchive.core.domain.group.entity.Group;
import site.timecapsulearchive.core.domain.group.service.GroupService;
import site.timecapsulearchive.core.domain.group.service.query.GroupQueryService;
import site.timecapsulearchive.core.domain.member.entity.Member;
import site.timecapsulearchive.core.domain.member.service.MemberService;
import site.timecapsulearchive.core.global.geography.GeoTransformManager;
Expand All @@ -24,7 +24,7 @@ public class GroupCapsuleFacade {

private final MemberService memberService;
private final GroupCapsuleService groupCapsuleService;
private final GroupService groupService;
private final GroupQueryService groupQueryService;
private final ImageService imageService;
private final VideoService videoService;
private final GeoTransformManager geoTransformManager;
Expand All @@ -38,7 +38,7 @@ public void saveGroupCapsule(
final Long groupId
) {
final Member member = memberService.findMemberById(memberId);
final Group group = groupService.findGroupById(groupId);
final Group group = groupQueryService.findGroupById(groupId);
final CapsuleSkin capsuleSkin = capsuleSkinService.findCapsuleSkinById(dto.capsuleSkinId());

final Point point = geoTransformManager.changePoint4326To3857(dto.latitude(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,4 +166,14 @@ public Slice<MyGroupCapsuleDto> findMyGroupCapsuleSlice(

return new SliceImpl<>(groupCapsules, Pageable.ofSize(size), hasNext);
}

public boolean findGroupCapsuleExistByGroupId(Long groupId) {
Integer count = jpaQueryFactory
.selectOne()
.from(capsule)
.where(capsule.group.id.eq(groupId))
.fetchFirst();

return count != null;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
@RequiredArgsConstructor
public class CapsuleSkinMapper {

private final S3UrlGenerator s3UrlGenerator;
private final S3PreSignedUrlManager s3PreSignedUrlManager;

public CapsuleSkinsSliceResponse capsuleSkinSliceToResponse(
Expand Down Expand Up @@ -57,7 +56,7 @@ public CapsuleSkin createDtoToEntity(CapsuleSkinCreateDto dto, Member member) {
return CapsuleSkin.builder()
.skinName(dto.skinName())
.imageUrl(
s3UrlGenerator.generateFileName(member.getId(), dto.directory(), dto.imageUrl()))
S3UrlGenerator.generateFileName(member.getId(), dto.directory(), dto.imageUrl()))
.member(member)
.build();
}
Expand All @@ -73,7 +72,7 @@ public CapsuleSkinMessageDto createDtoToMessageDto(
.skinName(dto.skinName())
.imageUrl(
s3PreSignedUrlManager.getS3PreSignedUrlForGet(
s3UrlGenerator.generateFileName(memberId, dto.directory(), dto.imageUrl())
S3UrlGenerator.generateFileName(memberId, dto.directory(), dto.imageUrl())
))
.motionName(dto.motionName())
.retarget(dto.retarget())
Expand Down

This file was deleted.

Loading

0 comments on commit 6b07b17

Please sign in to comment.