Skip to content

feat(Order): 오픈시간, 공지 칼럼 추가#155

Merged
HyemIin merged 1 commit into
developfrom
feature/#154-Store공지사항및오픈시간추가
Jul 25, 2025

Hidden character warning

The head ref may contain hidden characters: "feature/#154-Store\uacf5\uc9c0\uc0ac\ud56d\ubc0f\uc624\ud508\uc2dc\uac04\ucd94\uac00"
Merged

feat(Order): 오픈시간, 공지 칼럼 추가#155
HyemIin merged 1 commit into
developfrom
feature/#154-Store공지사항및오픈시간추가

Conversation

@HyemIin

@HyemIin HyemIin commented Jul 25, 2025

Copy link
Copy Markdown
Member

작업 요약

Issue Link

문제점 및 어려움

해결 방안

Reference

Summary by CodeRabbit

  • 신규 기능
    • 매장 정보에 공지사항(notice)과 영업시간(openTime) 필드가 추가되었습니다.
    • 매장 생성, 조회, 수정 시 공지사항과 영업시간 정보를 입력 및 확인할 수 있습니다.

@HyemIin HyemIin self-assigned this Jul 25, 2025
@coderabbitai

coderabbitai Bot commented Jul 25, 2025

Copy link
Copy Markdown

Walkthrough

Store 엔터티에 noticeopenTime 필드가 추가되었습니다. 이 필드들은 생성, 조회, 수정 요청 및 응답 DTO와 서비스 계층, 엔터티 생성자 및 업데이트 메서드에 일관되게 반영되었습니다. 기존 메서드 시그니처 일부가 변경되었으며, 관련 데이터 흐름이 모두 확장되었습니다.

Changes

파일/경로 변경 요약
.../store/dto/StoreCreateRequest.java toEntity()에서 noticeopenTime의 기본값을 설정하도록 구현 변경
.../store/dto/StoreCreateResponse.java
.../store/dto/StoreReadDto.java
notice, openTime 필드 추가 및 엔터티에서 해당 값 매핑하도록 팩토리 메서드 수정
.../store/dto/StoreUpdateRequest.java notice, openTime 필드 추가
.../store/service/StoreServiceImpl.java updateStore()에서 store.updateInfo() 호출 시 notice, openTime 인자 추가
.../store/entity/Store.java notice, openTime 필드 및 생성자 파라미터 추가, updateInfo() 시그니처 및 구현 확장

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant Controller
    participant Service
    participant StoreEntity

    Client->>Controller: Store 생성/수정 요청 (notice, openTime 포함)
    Controller->>Service: StoreCreateRequest/StoreUpdateRequest 전달
    Service->>StoreEntity: 생성자/ updateInfo 호출 (notice, openTime 포함)
    StoreEntity-->>Service: Store 인스턴스 반환/업데이트
    Service-->>Controller: StoreCreateResponse/StoreReadDto 반환 (notice, openTime 포함)
    Controller-->>Client: 응답 반환 (notice, openTime 포함)
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/#154-Store공지사항및오픈시간추가

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions Bot requested a review from Jjiggu July 25, 2025 05:38

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (2)
nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/store/dto/StoreUpdateRequest.java (1)

16-17: openTime 필드의 데이터 타입을 검토해주세요.

openTime 필드가 시간 정보를 나타내는 것으로 보이는데 String 타입으로 정의되어 있습니다. 시간 형식의 일관성과 유효성 검증을 위해 다음을 고려해보세요:

  1. LocalTime 타입 사용을 검토
  2. String을 사용한다면 시간 형식에 대한 validation 추가 (예: @Pattern 어노테이션)
-private String openTime;
+@Pattern(regexp = "^([0-1][0-9]|2[0-3])[0-5][0-9][0-5][0-9]$", message = "시간 형식이 올바르지 않습니다 (HHMMSS)")
+private String openTime;
nowait-domain/domain-core-rdb/src/main/java/com/nowait/domaincorerdb/store/entity/Store.java (1)

84-84: 불필요한 빈 줄을 제거해주세요.

파일 끝에 추가된 빈 줄이 코드 스타일을 해칩니다.

-
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b3a8f3c and 235b4e6.

📒 Files selected for processing (6)
  • nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/store/dto/StoreCreateRequest.java (1 hunks)
  • nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/store/dto/StoreCreateResponse.java (2 hunks)
  • nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/store/dto/StoreReadDto.java (2 hunks)
  • nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/store/dto/StoreUpdateRequest.java (1 hunks)
  • nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/store/service/StoreServiceImpl.java (1 hunks)
  • nowait-domain/domain-core-rdb/src/main/java/com/nowait/domaincorerdb/store/entity/Store.java (2 hunks)
🔇 Additional comments (7)
nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/store/service/StoreServiceImpl.java (1)

82-88: 새로운 필드 전달이 올바르게 구현되었습니다.

noticeopenTime 필드가 요청 DTO에서 엔터티의 updateInfo 메서드로 올바르게 전달되고 있습니다. 기존 패턴과 일관성을 유지하고 있어 좋습니다.

nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/store/dto/StoreCreateResponse.java (2)

21-22: 새로운 필드 추가가 올바르게 구현되었습니다.

noticeopenTime 필드가 기존 패턴과 일관성 있게 추가되었습니다.


35-36: fromEntity 메서드가 올바르게 업데이트되었습니다.

새로운 필드들이 엔터티에서 응답 DTO로 올바르게 매핑되고 있습니다.

nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/store/dto/StoreReadDto.java (2)

22-23: 새로운 필드가 일관성 있게 추가되었습니다.

noticeopenTime 필드가 다른 DTO들과 일관된 패턴으로 추가되었습니다.


48-49: 엔터티 매핑이 올바르게 구현되었습니다.

fromEntity 메서드에서 새로운 필드들이 엔터티로부터 올바르게 매핑되고 있습니다.

nowait-domain/domain-core-rdb/src/main/java/com/nowait/domaincorerdb/store/entity/Store.java (2)

43-47: 새로운 필드 선언이 올바르게 추가되었습니다.

noticeopenTime 필드가 JPA 규칙에 맞게 정의되었으며, nullable=true와 적절한 길이 제한(200자)이 설정되어 있습니다.


69-75: updateInfo 메서드가 올바르게 확장되었습니다.

새로운 필드들에 대한 null 체크와 조건부 업데이트 로직이 기존 패턴과 일관되게 구현되었습니다.

Comment on lines +32 to +33
.notice("")
.openTime("00002359")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

기본값 설정에 대한 검토가 필요합니다.

하드코딩된 기본값들에 대해 몇 가지 우려사항이 있습니다:

  1. openTime의 기본값 "00002359"가 직관적이지 않습니다 (23:59를 의미하는 것으로 보임)
  2. 상수로 정의하여 의미를 명확하게 하는 것이 좋겠습니다

상수 클래스나 enum을 만들어 기본값을 관리하는 것을 제안합니다:

public class StoreDefaults {
    public static final String DEFAULT_NOTICE = "";
    public static final String DEFAULT_OPEN_TIME = "00002359"; // 00:00-23:59 (24시간 운영)
}

그리고 다음과 같이 사용:

-.notice("")
-.openTime("00002359")
+.notice(StoreDefaults.DEFAULT_NOTICE)
+.openTime(StoreDefaults.DEFAULT_OPEN_TIME)
🤖 Prompt for AI Agents
In
nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/store/dto/StoreCreateRequest.java
around lines 32 to 33, the hardcoded default value for openTime ("00002359") is
not intuitive and should be replaced with a named constant. Create a separate
constants class or enum, for example StoreDefaults, to define DEFAULT_NOTICE and
DEFAULT_OPEN_TIME with clear names and comments. Then replace the hardcoded
values in the code with these constants to improve readability and
maintainability.

Comment on lines 55 to 67
public Store(LocalDateTime createdAt, Long storeId, Long departmentId, String name, String location,
String description, Boolean isActive, Boolean deleted) {
String description,String notice,String openTime, Boolean isActive, Boolean deleted) {
super(createdAt);
this.storeId = storeId;
this.departmentId = departmentId;
this.name = name;
this.location = location;
this.description = description;
this.notice = notice;
this.openTime = openTime;
this.isActive = isActive;
this.deleted = deleted;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

생성자 매개변수 순서와 포맷팅을 개선해주세요.

생성자가 새로운 필드를 포함하도록 올바르게 업데이트되었지만, 몇 가지 개선이 필요합니다.

다음 diff를 적용하여 매개변수 포맷팅을 개선하고 순서를 논리적으로 정리해주세요:

-	public Store(LocalDateTime createdAt, Long storeId, Long departmentId, String name, String location,
-		String description,String notice,String openTime, Boolean isActive, Boolean deleted) {
+	public Store(LocalDateTime createdAt, Long storeId, Long departmentId, String name, String location,
+		String description, String notice, String openTime, Boolean isActive, Boolean deleted) {
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
public Store(LocalDateTime createdAt, Long storeId, Long departmentId, String name, String location,
String description, Boolean isActive, Boolean deleted) {
String description,String notice,String openTime, Boolean isActive, Boolean deleted) {
super(createdAt);
this.storeId = storeId;
this.departmentId = departmentId;
this.name = name;
this.location = location;
this.description = description;
this.notice = notice;
this.openTime = openTime;
this.isActive = isActive;
this.deleted = deleted;
}
public Store(LocalDateTime createdAt, Long storeId, Long departmentId, String name, String location,
String description, String notice, String openTime, Boolean isActive, Boolean deleted) {
super(createdAt);
this.storeId = storeId;
this.departmentId = departmentId;
this.name = name;
this.location = location;
this.description = description;
this.notice = notice;
this.openTime = openTime;
this.isActive = isActive;
this.deleted = deleted;
}
🤖 Prompt for AI Agents
In
nowait-domain/domain-core-rdb/src/main/java/com/nowait/domaincorerdb/store/entity/Store.java
between lines 55 and 67, the constructor parameters need reordering and
formatting for better readability and logical grouping. Adjust the parameter
order to group related fields together, such as placing all String fields
consecutively, and format the parameters with consistent spacing and line breaks
if necessary. Update the constructor signature and the corresponding assignments
inside the constructor accordingly to reflect this improved order and
formatting.

@HyemIin HyemIin merged commit 2eefa13 into develop Jul 25, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant