Skip to content

Commit

Permalink
fix: service naming
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeongh00 committed Dec 6, 2023
1 parent d29e3e4 commit e66d19d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import com.koa.coremodule.fcm.domain.entity.Alarm;
import com.koa.coremodule.fcm.domain.entity.AlarmType;
import com.koa.coremodule.fcm.domain.entity.AlarmView;
import com.koa.coremodule.fcm.domain.service.AlarmFindService;
import com.koa.coremodule.fcm.domain.service.AlarmQueryService;
import com.koa.coremodule.fcm.domain.service.AlarmSaveService;
import com.koa.coremodule.member.domain.entity.Member;
import com.koa.coremodule.member.domain.utils.MemberUtils;
Expand All @@ -33,7 +33,7 @@ public class AlarmUseCase {
private final FirebaseMessaging firebaseMessaging;
private final MemberUtils memberUtils;
private final AlarmSaveService alarmSaveService;
private final AlarmFindService alarmFindService;
private final AlarmQueryService alarmQueryService;
private final NoticeQueryService noticeQueryService;

private final static String NOTICE_TITLE = "새로운 공지를 확인하세요";
Expand Down Expand Up @@ -163,8 +163,8 @@ public void sendReCommentNotification(SendNotificationRequest request) {
public List<AlarmLists> getAlarmLists() {

Member memberRequest = memberUtils.getAccessMember();
List<Alarm> alarmList = alarmFindService.findAll();
List<AlarmView> alarmViews = alarmFindService.findViews(memberRequest.getId());
List<Alarm> alarmList = alarmQueryService.findAll();
List<AlarmView> alarmViews = alarmQueryService.findViews(memberRequest.getId());
List<AlarmLists> result = new ArrayList<>();

for (Alarm a : alarmList) {
Expand Down Expand Up @@ -195,8 +195,8 @@ public List<AlarmLists> getAlarmLists() {
public void saveAlarmView(Long alarmId) {

Member memberRequest = memberUtils.getAccessMember();
Member member = alarmFindService.findMember(memberRequest.getId());
Alarm alarm = alarmFindService.findAlarmById(alarmId);
Member member = alarmQueryService.findMember(memberRequest.getId());
Alarm alarm = alarmQueryService.findAlarmById(alarmId);

AlarmView alarmView = AlarmView.builder().alarm(alarm).view(ViewType.VIEWED).member(member).build();
alarmSaveService.saveAlarmView(alarmView);
Expand All @@ -213,18 +213,18 @@ public void deleteAlarm(Long alarmId) {
}

private Member findMember(Long memberId) {
return alarmFindService.findMember(memberId);
return alarmQueryService.findMember(memberId);
}

private List<Member> findAllMember() {
return alarmFindService.findAllMember();
return alarmQueryService.findAllMember();
}

private Member findNoticeMember(Long noticeId) {
return alarmFindService.findNoticeMember(noticeId);
return alarmQueryService.findNoticeMember(noticeId);
}

private Member findCommentMember(Long memberId) {
return alarmFindService.findMember(memberId);
return alarmQueryService.findMember(memberId);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
@Service
@RequiredArgsConstructor
@Transactional
public class AlarmFindService {
public class AlarmQueryService {

private final MemberRepository memberRepository;
private final NoticeRepository noticeRepository;
Expand Down

0 comments on commit e66d19d

Please sign in to comment.