Skip to content

Commit

Permalink
deploy: build 오류 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
minsu20 committed Jan 27, 2024
1 parent bba9edf commit 9f1b65e
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 108 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,5 @@

public interface AlarmHistoryCustomRepository {

List<GetAlarmHistoryResponse> findAlarmHistoriesByMemberId(Long memberId);

String findUnreadAlarmCount(Long memberId);
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
package com.moing.bo.backend.domain.history.domain.repository;

import com.moing.backend.domain.history.application.dto.response.GetAlarmHistoryResponse;
import com.moing.backend.domain.history.application.dto.response.QGetAlarmHistoryResponse;
import com.moing.bo.backend.domain.history.application.dto.response.GetAlarmHistoryResponse;
import com.moing.bo.backend.domain.history.application.dto.response.QGetAlarmHistoryResponse;
import com.querydsl.jpa.impl.JPAQueryFactory;
import jakarta.persistence.EntityManager;

import javax.persistence.EntityManager;
import java.util.List;

import static com.moing.backend.domain.history.domain.entity.QAlarmHistory.alarmHistory;
import static com.moing.bo.backend.domain.history.domain.entity.QAlarmHistory.alarmHistory;

public class AlarmHistoryCustomRepositoryImpl implements AlarmHistoryCustomRepository {

Expand All @@ -17,23 +15,6 @@ public AlarmHistoryCustomRepositoryImpl(EntityManager em) {
this.queryFactory = new JPAQueryFactory(em);
}

@Override
public List<GetAlarmHistoryResponse> findAlarmHistoriesByMemberId(Long memberId) {
return queryFactory.select(new QGetAlarmHistoryResponse(alarmHistory.id,
alarmHistory.type,
alarmHistory.path,
alarmHistory.idInfo,
alarmHistory.title,
alarmHistory.body,
alarmHistory.name,
alarmHistory.isRead,
alarmHistory.createdDate))
.from(alarmHistory)
.where(alarmHistory.receiverId.eq(memberId))
.orderBy(alarmHistory.createdDate.desc())
.fetch();
}

@Override
public String findUnreadAlarmCount(Long memberId) {
Long count = queryFactory.select(alarmHistory.count())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,6 @@ public class AlarmHistoryGetService {

private final AlarmHistoryRepository alarmHistoryRepository;

public List<GetAlarmHistoryResponse> getAlarmHistories(Long memberId) {
return alarmHistoryRepository.findAlarmHistoriesByMemberId(memberId);
}

public AlarmHistory getAlarmHistory(Long alarmHistoryId, Long memberId) {
return alarmHistoryRepository.findAlarmHistoryByIdAndReceiverId(alarmHistoryId, memberId).orElseThrow(NotFoundAlarmHistoryException::new);
}

public String getUnreadAlarmCount(Long memberId) {
return alarmHistoryRepository.findUnreadAlarmCount(memberId);
}
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.moing.bo.backend.domain.member.domain.service;

import com.moing.bo.backend.domain.member.domain.entity.Member;
import com.moing.bo.backend.domain.member.domain.repository.MemberRepository;
import com.moing.bo.backend.global.annotation.DomainService;
import jakarta.transaction.Transactional;
Expand All @@ -12,11 +11,4 @@
public class MemberGetService {
private final MemberRepository memberRepository;

public Member getMemberBySocialId(String socialId) {
return memberRepository.findNotDeletedBySocialId(socialId).orElseThrow(() -> new NotFoundBySocialIdException());
}

public Member getMemberByMemberId(Long memberId) {
return memberRepository.findNotDeletedByMemberId(memberId).orElseThrow(() -> new NotFoundBySocialIdException());
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Optional;

import static com.moing.bo.backend.domain.history.domain.entity.PagePath.HOME_PATH;
import static com.moing.bo.backend.global.config.fcm.constant.ApproveTeamMessage.APPROVE_TEAM_MESSAGE;
Expand All @@ -32,6 +33,7 @@ public void approveTeams(List<Long> teamIds) {
for (GetLeaderInfoResponse info : leaderInfos) {
String title = APPROVE_TEAM_MESSAGE.title(info.getLeaderName(), info.getTeamName());
String body = APPROVE_TEAM_MESSAGE.body();

saveAlarmHistoryUseCase.saveAlarmHistory(info.getLeaderId(), "", title, body, info.getTeamName(), AlarmType.APPROVE_TEAM, HOME_PATH.getValue());
fcmService.sendSingleDevice(new SingleRequest(info.getLeaderFcmToken(), title, body));
}
Expand Down

0 comments on commit 9f1b65e

Please sign in to comment.