improvement: 기기 엑셀 내보내기 API 추가 (#241) #242

Merged
seonkyu.kim merged 1 commits from improvement/#241-device-export into develop 2026-02-25 08:19:57 +00:00
Owner

📋 작업 요약

  • 기기 목록 엑셀 내보내기 API(POST /v1/in/device/export) 추가
  • 목록 필터와 동일 조건(platform, push_agreed, marketing_agreed, is_active, keyword, tags)으로 전체 기기를 엑셀 추출
  • 14개 컬럼: Device ID, Device Token, 서비스명, 서비스코드, 플랫폼, 모델, OS/앱 버전, 푸시/광고 동의, 활성 상태, 태그, 등록일, 마지막 활동

Closes #241

🛠️ 작업 내용 (Changes)

  • SPMS.Application/DTOs/Device/DeviceExportRequestDto.cs — 새 파일, 목록 필터와 동일 파라미터 (page/size 제외)
  • SPMS.Domain/Interfaces/IDeviceRepository.cs — GetAllFilteredAsync 시그니처 추가
  • SPMS.Infrastructure/Persistence/Repositories/DeviceRepository.cs — GetAllFilteredAsync 구현 (Include(Service) + 필터 + 정렬)
  • SPMS.Application/Interfaces/IDeviceService.cs — ExportAsync 시그니처 추가
  • SPMS.Application/Services/DeviceService.cs — ClosedXML 기반 엑셀 생성 로직
  • SPMS.API/Controllers/DeviceController.cs — POST export [Authorize] 엔드포인트 추가

📢 리뷰어 참고 사항 (To Reviewers)

  • 기존 history/export, stats/export와 동일한 패턴 (byte[] → File 응답)
  • ClosedXML은 이미 SPMS.Application에 참조됨
  • DB 변경 없음, Migration 불필요

체크리스트 (Self Checklist)

  • 빌드(Build)가 성공적으로 수행되었는가?
  • 모든 단위 테스트(Unit Test)를 통과하였는가?
  • 불필요한 로그나 주석을 제거하였는가?
  • 컨벤션(Clean Architecture, Naming)을 준수하였는가?
  • 기밀 정보(비밀번호, 키 등)가 하드코딩 되어있지 않은가?

📸 스크린샷 / 테스트 로그 (Screenshots/Logs)

빌드했습니다.
    경고 0개
    오류 0개
## 📋 작업 요약 - 기기 목록 엑셀 내보내기 API(`POST /v1/in/device/export`) 추가 - 목록 필터와 동일 조건(platform, push_agreed, marketing_agreed, is_active, keyword, tags)으로 전체 기기를 엑셀 추출 - 14개 컬럼: Device ID, Device Token, 서비스명, 서비스코드, 플랫폼, 모델, OS/앱 버전, 푸시/광고 동의, 활성 상태, 태그, 등록일, 마지막 활동 ## 🔗 관련 이슈 (Related Issues) Closes #241 ## 🛠️ 작업 내용 (Changes) - [x] `SPMS.Application/DTOs/Device/DeviceExportRequestDto.cs` — 새 파일, 목록 필터와 동일 파라미터 (page/size 제외) - [x] `SPMS.Domain/Interfaces/IDeviceRepository.cs` — GetAllFilteredAsync 시그니처 추가 - [x] `SPMS.Infrastructure/Persistence/Repositories/DeviceRepository.cs` — GetAllFilteredAsync 구현 (Include(Service) + 필터 + 정렬) - [x] `SPMS.Application/Interfaces/IDeviceService.cs` — ExportAsync 시그니처 추가 - [x] `SPMS.Application/Services/DeviceService.cs` — ClosedXML 기반 엑셀 생성 로직 - [x] `SPMS.API/Controllers/DeviceController.cs` — POST export [Authorize] 엔드포인트 추가 ## 📢 리뷰어 참고 사항 (To Reviewers) - 기존 history/export, stats/export와 동일한 패턴 (byte[] → File 응답) - ClosedXML은 이미 SPMS.Application에 참조됨 - DB 변경 없음, Migration 불필요 ## ✅ 체크리스트 (Self Checklist) - [x] 빌드(Build)가 성공적으로 수행되었는가? - [x] 모든 단위 테스트(Unit Test)를 통과하였는가? - [x] 불필요한 로그나 주석을 제거하였는가? - [x] 컨벤션(Clean Architecture, Naming)을 준수하였는가? - [x] 기밀 정보(비밀번호, 키 등)가 하드코딩 되어있지 않은가? ## 📸 스크린샷 / 테스트 로그 (Screenshots/Logs) ``` 빌드했습니다. 경고 0개 오류 0개 ```
seonkyu.kim added 1 commit 2026-02-25 08:16:51 +00:00
- DeviceExportRequestDto: 목록 필터와 동일한 필터 파라미터 (page/size 제외)
- IDeviceRepository/DeviceRepository: GetAllFilteredAsync 추가 (전체 반환)
- DeviceService: ClosedXML 기반 엑셀 생성 (14개 컬럼)
- DeviceController: POST /v1/in/device/export [Authorize] 엔드포인트 추가

Closes #241
seonkyu.kim added the
Priority
Medium
Status
In Progress
Type
Improvement
labels 2026-02-25 08:17:13 +00:00
seonkyu.kim self-assigned this 2026-02-25 08:17:19 +00:00
seonkyu.kim added this to the Phase 3: 운영 기능 milestone 2026-02-25 08:17:26 +00:00
seonkyu.kim requested review from Owners 2026-02-25 08:17:36 +00:00
seonkyu.kim merged commit ef00ea130d into develop 2026-02-25 08:19:57 +00:00
seonkyu.kim deleted branch improvement/#241-device-export 2026-02-25 08:20:22 +00:00
seonkyu.kim added
Status
Done
and removed
Status
In Progress
labels 2026-02-25 08:20:29 +00:00
Sign in to join this conversation.
No description provided.