Skip to content

[FEAT/#362] 백오피스 푸시 알림 그룹 발송 및 문의 키워드 검색 구현#369

Merged
leesumin0526 merged 6 commits into
developfrom
feat/#362-sumin-backoffice
Jul 15, 2026
Merged

[FEAT/#362] 백오피스 푸시 알림 그룹 발송 및 문의 키워드 검색 구현#369
leesumin0526 merged 6 commits into
developfrom
feat/#362-sumin-backoffice

Conversation

@leesumin0526

@leesumin0526 leesumin0526 commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

#️⃣연관된 이슈

close #362

📝작업 내용

백오피스 푸시 알림 그룹 발송 및 문의 키워드 검색 구현


요약

POST /backoffice/notifications/push — 기존 단건 전송에서 그룹(전체/역할별)/개인 자유 메시지 발송으로 전면 교체
GET /backoffice/notifications — 발송 이력 조회 신규 구현
GET /backoffice/inquirieskeyword 파라미터 추가 (제목/본문 검색)


A. 신규 엔티티 · DTO · Repository

파일 변경 설명
PushTargetType.java 신규 ALL / STUDENT / UNION / PARTNER / INDIVIDUAL
BackofficePushLog.java 신규 푸시 발송 이력 엔티티 (targetType, recipientCount, sentAt 등)
BackofficePushLogRepository.java 신규 이력 전체 조회 및 keyword(title/body) 검색
BackofficePushSendRequestDTO.java 신규 자유 메시지 푸시 요청 DTO (기존 BackofficePushRequestDTO 대체)
BackofficePushLogResponseDTO.java 신규 발송 이력 응답 DTO

B. 백오피스 알림 서비스

파일 변경 설명
BackofficeNotificationService.java 수정 sendPush 시그니처 교체, getPushLogs 추가
BackofficeNotificationServiceImpl.java 수정 targetType별 수신자 분기(ALL/STUDENT/UNION/PARTNER/INDIVIDUAL) + BackofficePushLog 저장
BackofficeNotificationController.java 수정 POST /push DTO 교체, GET /backoffice/notifications 추가
BackofficePushRequestDTO.java 삭제 구 DTO 제거

C. 알림 공통 서비스

파일 변경 설명
NotificationCommandService.java 수정 createAndQueue(receiverId, title, body, deepLink) 자유 메시지 오버로드 추가
NotificationCommandServiceImpl.java 수정 자유 메시지 오버로드 구현 (NotificationType.BACKOFFICE 사용)
NotificationType.java 수정 BACKOFFICE 타입 추가
MemberRepository.java 수정 findByRole(UserRole) 추가

D. 문의 키워드 검색

파일 변경 설명
InquiryRepository.java 수정 findByStatusAndTitleContainingOrStatusAndContentContaining, findByTitleContainingOrContentContaining 추가
InquiryService.java 수정 getAllInquiries 시그니처에 keyword 추가
InquiryServiceImpl.java 수정 keyword + status 조합 분기 처리
BackofficeInquiryController.java 수정 GET /backoffice/inquirieskeyword 파라미터 추가

🔎코드 설명(스크린샷(선택))

프론트엔드 수정, 삭제가 필요한 부분들은 아래를 참고해 주세요
스크린샷 2026-07-04 오후 2 48 28

💬고민사항 및 리뷰 요구사항 (Optional)

고민사항 및 의견 받고 싶은 부분 있으면 적어두기

비고 (Optional)

참고했던 링크 등 참고 사항을 적어주세요. 코드 리뷰하는 사람이 참고해야 하는 내용을 자유로운 형식으로 적을 수 있습니다.

[FIX/#364] 도메인 변경 assu.shop → assu.site
@leesumin0526 leesumin0526 linked an issue Jul 4, 2026 that may be closed by this pull request
2 tasks
- PushTargetType(ALL/STUDENT/UNION/PARTNER/INDIVIDUAL) 기반 그룹 푸시 발송
- BackofficePushLog 엔티티 및 발송 이력 조회 API(GET /backoffice/notifications) 추가
- NotificationCommandService에 자유 메시지 오버로드(title/body/deepLink) 추가
- NotificationType에 BACKOFFICE 타입 추가
- MemberRepository에 역할별 조회(findByRole) 추가
- GET /backoffice/inquiries에 keyword 파라미터 추가 (제목/본문 검색)
- NotificationOutboxRepository: findByStatus, resetToPendingById 추가
- ErrorStatus: OUTBOX_NOT_FOUND, OUTBOX_NOT_FAILED 추가
- WebSocketConfig: allowedOrigin assu.shop → assu.site 변경
- .gitignore: .DS_Store, node_modules 추가
@leesumin0526
leesumin0526 force-pushed the feat/#362-sumin-backoffice branch from 81a2165 to 5b64403 Compare July 4, 2026 05:50
@leesumin0526 leesumin0526 self-assigned this Jul 4, 2026
@leesumin0526 leesumin0526 added the ✨ feature New feature or request label Jul 4, 2026

@kimyw1018 kimyw1018 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니당

main으로 pr올리셨습니당

@leesumin0526
leesumin0526 changed the base branch from main to develop July 6, 2026 12:58
Comment thread src/main/java/com/assu/server/domain/backoffice/entity/PushTargetType.java Outdated

@2ghrms 2ghrms left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다~~ 회의때 얘기할 것이 조금 있는 것 같으니 참고해주세용

Comment thread src/main/java/com/assu/server/domain/inquiry/repository/InquiryRepository.java Outdated
Comment thread src/main/java/com/assu/server/domain/inquiry/service/InquiryServiceImpl.java Outdated
Comment thread src/main/java/com/assu/server/domain/backoffice/entity/PushTargetType.java Outdated
Comment on lines +71 to +72
if (request.receiverId() == null) {
throw new DatabaseException(ErrorStatus.NO_SUCH_MEMBER);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

receiverId가 Null 일 경우는 NO_SUCH_MEMBER 말고 다른 errorStatus를 남기는게 좋을 것 같습니다.
NO_SUCH_MEMBER: DB조회를 했는데 해당 멤버가 없다. 의미라고 생각합니다.
하지만 이번 경우는 DB조회조차 안되었기 때문에 request 부분에 @NotNull을 붙여도 좋을 것 같아요

Comment thread src/main/java/com/assu/server/domain/inquiry/repository/InquiryRepository.java Outdated
- PushTargetType.UNION → ADMIN (유비쿼터스 언어 통일)
- NotificationBackofficeService 신규 분리 (백오피스 수동 발송 전용, REQUIRES_NEW 트랜잭션)
- BackofficeInquiryService 신규 분리 (getInquiries/getById/answer 백오피스 전용)
- InquiryRepository 키워드 검색 @query 교체 (OR 연산자 우선순위 버그 수정)
- MemberRepository.findAllIds/findIdsByRole 추가 (전체 조회 OOM 방지)
- PAGE 예외를 DatabaseException → GeneralException으로 교체
- retryOutbox 응답을 String 대신 BackofficeRetryOutboxResponseDTO로 변경
- sendPush 응답 String 제거
- ErrorStatus.RECEIVER_ID_REQUIRED 추가
- API 버전 v2.0 → v1.1
@leesumin0526
leesumin0526 merged commit cc11b2f into develop Jul 15, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT/#362] 백오피스 API (문의, 푸시)

4 participants