Skip to content

[DABOM-503] 정책 수정 시 {"limitBytes":null}(데이터 무제한) 허용이 안되는 현상 수정 - #129

Merged
ChoiSeungeon merged 3 commits into
developfrom
fix/DABOM-503
Mar 18, 2026
Merged

ChoiSeungeon merged 3 commits into
developfrom
fix/DABOM-503

Conversation

@ChoiSeungeon

Copy link
Copy Markdown
Member

🍀 이슈 & 티켓 넘버


🎯 목적

정책 수정 시 {"limitBytes":null}(데이터 무제한) 허용이 안되어 데이터 무제한으로 변경이 안되던 현상을 수정하기 위함

📝 변경 사항

  • 월간 데이터 제한 정책 정규화 로직에서 {"limitBytes": null} 값을 무제한으로 처리하도록 수정
  • 정책 수정 시 limitBytesnull이어도 예외 없이 quota 변경이 가능하도록 서비스 로직 수정
  • 제한 해제 시 기존 quota 초과 차단 상태가 적절히 해제되도록 CustomerQuota 갱신 로직 추가
  • 알림 문구가 무제한 변경 케이스를 올바르게 표시하도록 수정

📂 변경 범위

도메인 controller service repository entity infra global
policy / customer [x] [x]

🖥️ 주요 코드 설명

// {"limitBytes": null} 인 경우 null을 그대로 반환해 무제한 정책으로 처리
private String normalizeMonthlyLimit(Map<String, Object> rules) {
    Object limitBytesObj = rules.get(LIMIT_BYTES);
    if (limitBytesObj == null) {
        return null;
    }
    return String.valueOf(toPositiveLong(limitBytesObj, LIMIT_BYTES));
}

💬 리뷰어에게

  • limitBytes=null이 "무제한" 의미로 전체 흐름에서 자연스럽게 처리되는지 중심으로 봐주시면 됩니다.

📋 체크리스트

기본

  • Merge 대상 브랜치가 올바른가?
  • ./gradlew build가 정상적으로 통과하는가?
  • Spotless / Checkstyle을 통과하는가? (./gradlew spotlessApply checkstyleMain)
  • 전체 변경사항이 500줄을 넘지 않는가?

코드 품질

  • 의존성 방향을 준수하는가? (Controller → Service → Repository → Entity)
  • Setter 없이 비즈니스 메서드로 상태를 변경하는가?
  • @Transactional은 Service에만 선언했는가?

테스트

  • 신규 비즈니스 로직에 대한 단위 테스트를 작성했는가?

📌 참고 사항

@github-actions
github-actions Bot requested a review from k0081915 March 18, 2026 12:49
@github-actions github-actions Bot added size/M PR size: M fix 버그 수정 labels Mar 18, 2026
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 Pull Request는 월간 데이터 사용량 제한 정책을 수정할 때 {"limitBytes": null} 값이 무제한을 의미하도록 시스템이 인식하지 못하던 문제를 해결합니다. 이제 사용자는 데이터 무제한 정책을 설정할 수 있으며, 시스템은 이러한 정책 변경에 따라 사용자의 할당량 초과 차단 상태를 정확하게 관리하고, 관련 알림 메시지도 올바르게 전달합니다. 이는 정책 관리의 유연성을 높이고 사용자 경험을 개선합니다.

Highlights

  • 데이터 무제한 정책 처리 개선: 월간 데이터 제한 정책에서 {"limitBytes": null} 값을 무제한으로 올바르게 처리하도록 로직이 개선되었습니다.
  • 정책 수정 시 유연성 확보: 정책 수정 시 limitBytes가 null인 경우에도 예외 없이 할당량 변경이 가능하도록 서비스 로직이 수정되었습니다.
  • 할당량 초과 차단 상태 갱신: 제한 해제 시 기존 할당량 초과 차단 상태가 적절히 해제되도록 CustomerQuota 엔티티에 갱신 로직이 추가되었습니다.
  • 알림 문구 정확성 향상: 데이터 무제한 변경 케이스에 맞춰 알림 문구가 정확하게 표시되도록 수정되었습니다.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

이번 PR은 정책 수정 시 limitBytesnull로 설정하여 데이터 사용량을 '무제한'으로 변경하는 기능을 구현한 것으로 보입니다. 전반적으로 null 값을 올바르게 처리하여 의도한 대로 동작하도록 수정한 점이 좋습니다. PolicyConstraintValueNormalizer에서 Map.of 대신 LinkedHashMap을 사용하여 null 값을 직렬화하고, 서비스 로직에서 null 값을 '무제한'으로 해석하여 알림 메시지까지 적절히 처리한 점을 확인했습니다.

코드 품질 향상을 위해 두 가지 제안 사항을 남겼습니다. 하나는 CustomerQuota 엔티티에서 null 안정성을 높이기 위한 제안이며, 다른 하나는 서비스 클래스에서 매직넘버를 상수로 추출하여 스타일 가이드를 준수하고 가독성을 높이는 것에 대한 제안입니다. 리뷰 코멘트를 확인해주세요.

Comment thread src/main/java/com/project/domain/customer/entity/CustomerQuota.java Outdated
Comment thread src/main/java/com/project/domain/policy/service/FamilyPolicyServiceImpl.java Outdated
@github-actions

Copy link
Copy Markdown

SonarQube Quality Summary (Community)

Quality Gate PASSED

Branch: fix/DABOM-503
Compared to: default branch

Issues

  • 🐞 Bugs: 7
  • 🔐 Vulnerabilities: 0
  • 📎 Code Smells: 93

Measures

  • Coverage: 0%
  • Duplication: 0%

🔗 Dashboard: https://sonarqube.swthewhite.store/dashboard?id=dabom-api-core&branch=fix/DABOM-503

Generated automatically by GitHub Actions.

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@github-actions github-actions Bot added the refactor 리팩토링 label Mar 18, 2026
@github-actions

Copy link
Copy Markdown

SonarQube Quality Summary (Community)

Quality Gate PASSED

Branch: fix/DABOM-503
Compared to: default branch

Issues

  • 🐞 Bugs: 7
  • 🔐 Vulnerabilities: 0
  • 📎 Code Smells: 93

Measures

  • Coverage: 0%
  • Duplication: 0%

🔗 Dashboard: https://sonarqube.swthewhite.store/dashboard?id=dabom-api-core&branch=fix/DABOM-503

Generated automatically by GitHub Actions.

@github-actions

Copy link
Copy Markdown

SonarQube Quality Summary (Community)

Quality Gate PASSED

Branch: fix/DABOM-503
Compared to: default branch

Issues

  • 🐞 Bugs: 7
  • 🔐 Vulnerabilities: 0
  • 📎 Code Smells: 93

Measures

  • Coverage: 0%
  • Duplication: 0%

🔗 Dashboard: https://sonarqube.swthewhite.store/dashboard?id=dabom-api-core&branch=fix/DABOM-503

Generated automatically by GitHub Actions.

@ChoiSeungeon
ChoiSeungeon merged commit 41fc9f2 into develop Mar 18, 2026
10 checks passed
@ChoiSeungeon
ChoiSeungeon deleted the fix/DABOM-503 branch March 18, 2026 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix 버그 수정 refactor 리팩토링 size/M PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DABOM-503] 데이터 할당량 정책 변경 무제한 안되는 현상 수정

2 participants