mirror of
https://github.com/cna-bootcamp/phonebill.git
synced 2026-06-12 19:49:10 +00:00
회선번호 처리 개선 및 다양한 API 기능 강화
- user-service: 회원등록 API를 upsert 방식으로 변경 (기존 사용자 업데이트 지원) - user-service: userName 필드 응답 누락 문제 해결 (DB 데이터 업데이트) - kos-mock: Mock 데이터 생성 기간을 3개월에서 6개월로 확장 - product-service: 회선번호 대시 처리 지원 (010-1234-5678, 01012345678 모두 허용) - bill-service: 회선번호 대시 선택적 처리 지원 (유연한 입력 형식) - api-gateway: CORS 중복 헤더 제거 필터 추가 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -21,7 +21,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
* Mock 데이터 생성 및 조회 API 컨트롤러
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/v1/mock-datas")
|
||||
@RequestMapping("/api/v1/kos/mock-datas")
|
||||
@RequiredArgsConstructor
|
||||
@Tag(name = "Mock Data Management", description = "Mock 데이터 생성, 조회 및 관리 API")
|
||||
public class MockDataController {
|
||||
|
||||
@@ -60,7 +60,7 @@ public class MockDataCreateService {
|
||||
CustomerEntity customer = createCustomer(request, selectedProduct);
|
||||
customerRepository.save(customer);
|
||||
|
||||
// 4. 요금 정보 생성 (최근 3개월)
|
||||
// 4. 요금 정보 생성 (최근 6개월)
|
||||
List<BillEntity> bills = createBills(customer, selectedProduct);
|
||||
billRepository.saveAll(bills);
|
||||
|
||||
@@ -115,13 +115,13 @@ public class MockDataCreateService {
|
||||
}
|
||||
|
||||
/**
|
||||
* 요금 정보 생성 (최근 3개월)
|
||||
* 요금 정보 생성 (최근 6개월)
|
||||
*/
|
||||
private List<BillEntity> createBills(CustomerEntity customer, ProductEntity product) {
|
||||
List<BillEntity> bills = new ArrayList<>();
|
||||
Random random = new Random();
|
||||
|
||||
for (int month = 0; month < 3; month++) {
|
||||
for (int month = 0; month < 6; month++) {
|
||||
LocalDateTime billDate = LocalDateTime.now().minusMonths(month);
|
||||
String billingMonth = billDate.format(DateTimeFormatter.ofPattern("yyyyMM"));
|
||||
|
||||
@@ -241,7 +241,7 @@ public class MockDataCreateService {
|
||||
return null;
|
||||
}
|
||||
|
||||
// 최근 3개월 요금 정보 조회
|
||||
// 최근 6개월 요금 정보 조회
|
||||
List<BillEntity> bills = billRepository.findByLineNumberOrderByBillingMonthDesc(lineNumber);
|
||||
|
||||
if (bills.isEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user