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

feat : 그룹 삭제 기능 추가 #405 #436

Merged
merged 8 commits into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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;
}
}

This file was deleted.

Loading
Loading