Skip to content

๐Ÿ”จ Fix - ๊ฐ€๊ฒฉ ๊ณ„์‚ฐ API ์‘๋‹ต๊ฐ’ OCR ๊ฐ€๊ฒฉ, OnedayScan ๊ฐ€๊ฒฉ ์ถ”๊ฐ€#783

Merged
GiHwan2 merged 2 commits into
devfrom
Fix/#782
Aug 16, 2025
Merged

๐Ÿ”จ Fix - ๊ฐ€๊ฒฉ ๊ณ„์‚ฐ API ์‘๋‹ต๊ฐ’ OCR ๊ฐ€๊ฒฉ, OnedayScan ๊ฐ€๊ฒฉ ์ถ”๊ฐ€#783
GiHwan2 merged 2 commits into
devfrom
Fix/#782

Conversation

@GiHwan2

@GiHwan2 GiHwan2 commented Aug 16, 2025

Copy link
Copy Markdown
Contributor

Related issue ๐Ÿ› 

closed #782

์–ด๋–ค ๋ณ€๊ฒฝ์‚ฌํ•ญ์ด ์žˆ์—ˆ๋‚˜์š”?

  • ๐Ÿ”จ Fix: Feature change or bug fix

CheckPoint โœ…

PR์ด ๋‹ค์Œ ์š”๊ตฌ ์‚ฌํ•ญ์„ ์ถฉ์กฑํ•˜๋Š”์ง€ ํ™•์ธํ•˜์„ธ์š”.

  • PR ์ปจ๋ฒค์…˜์— ๋งž๊ฒŒ ์ž‘์„ฑํ–ˆ์Šต๋‹ˆ๋‹ค. (ํ•„์ˆ˜)
  • ์ฝ”๋“œ๊ฐ€ ์ •์ƒ์ ์œผ๋กœ ๋™์ž‘ํ•ฉ๋‹ˆ๋‹ค. (ํ•„์ˆ˜)
  • ์ฝ”๋“œ ๋ฆฌ๋ทฐ์–ด์—๊ฒŒ ๋ฆฌ๋ทฐ๋ฅผ ์š”์ฒญํ–ˆ์Šต๋‹ˆ๋‹ค. (ํ•„์ˆ˜)

Work Description โœ๏ธ

๊ฐ€๊ฒฉ ๊ณ„์‚ฐ API ์‘๋‹ต๊ฐ’์— OCR ๊ฐ€๊ฒฉ๊ณผ OnedayScan ๊ฐ€๊ฒฉ ์ •๋ณด๋ฅผ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค.

์ฃผ์š” ๋ณ€๊ฒฝ์‚ฌํ•ญ

  • EstimateUserOrderPriceResponseDto: estimated_ocr_price, estimated_one_day_scan_price ํ•„๋“œ ์ถ”๊ฐ€
  • Document ์—”ํ‹ฐํ‹ฐ: getEstimatedOcrPrice(), getEstimatedOneDayScanPrice() ๋ฉ”์„œ๋“œ ์ถ”๊ฐ€
  • DocumentService: ์ œ๋ณธ ์˜ต์…˜ ๊ฐ€๊ฒฉ ๊ณ„์‚ฐ ๋กœ์ง ์ˆ˜์ • (400ํŽ˜์ด์ง€๊นŒ์ง€ ๊ธฐ๋ณธ 3,000์›, ์ดํ›„ 300ํŽ˜์ด์ง€๋‹น 3,000์›)

๊ธฐ๋Šฅ ๊ฐœ์„ ์‚ฌํ•ญ

  • ๊ฐ€๊ฒฉ ๊ฒฌ์  API์—์„œ ์˜ˆ์ƒ OCR ๋น„์šฉ๊ณผ ๋‹น์ผ ์Šค์บ” ๋น„์šฉ์„ ๋ณ„๋„๋กœ ์ œ๊ณตํ•˜์—ฌ ์‚ฌ์šฉ์ž๊ฐ€ ์˜ต์…˜๋ณ„ ๋น„์šฉ์„ ๋” ๋ช…ํ™•ํ•˜๊ฒŒ ํŒŒ์•…ํ•  ์ˆ˜ ์žˆ๋„๋ก ๊ฐœ์„ 
  • ์ œ๋ณธ ์˜ต์…˜ ๊ฐ€๊ฒฉ ์ •์ฑ… ๋ณ€๊ฒฝ์œผ๋กœ ๋” ํ•ฉ๋ฆฌ์ ์ธ ์š”๊ธˆ ์ฒด๊ณ„ ์ ์šฉ

Uncompleted Tasks ๐Ÿ˜…

N/A

To Reviewers ๐Ÿ“ข

  • ๊ฐ€๊ฒฉ ๊ณ„์‚ฐ ๋กœ์ง์˜ ๋ณ€๊ฒฝ์‚ฌํ•ญ์„ ํ™•์ธํ•ด ์ฃผ์„ธ์š” (์ œ๋ณธ ์˜ต์…˜ ๊ฐ€๊ฒฉ ์ •์ฑ…)
  • ์ƒˆ๋กœ ์ถ”๊ฐ€๋œ ์˜ˆ์ƒ ๊ฐ€๊ฒฉ ํ•„๋“œ๋“ค์ด ์˜ฌ๋ฐ”๋ฅด๊ฒŒ ๊ณ„์‚ฐ๋˜๋Š”์ง€ ๊ฒ€ํ† ํ•ด ์ฃผ์„ธ์š”

Summary by CodeRabbit

  • ์‹ ๊ทœ ๊ธฐ๋Šฅ

    • ๊ฐ€๊ฒฉ ๊ฒฌ์  ์‘๋‹ต์— ์˜ˆ์ƒ OCR ๋น„์šฉ๊ณผ ๋‹น์ผ ์Šค์บ” ์˜ˆ์ƒ ๋น„์šฉ์„ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค. ๋ฌธ์„œ๋ณ„ ํ•ญ๋ชฉ๊ณผ ์ „์ฒด ํ•ฉ๊ณ„๊ฐ€ ํ•จ๊ป˜ ์ œ๊ณต๋ฉ๋‹ˆ๋‹ค.
    • SPRING ๋ณต๊ตฌ ์˜ต์…˜์˜ ๊ฐ€๊ฒฉ ๊ทœ์น™์„ ์กฐ์ •ํ–ˆ์Šต๋‹ˆ๋‹ค: ๊ธฐ๋ณธ ํฌํ•จ ๋ถ„๋Ÿ‰์„ 400ํŽ˜์ด์ง€๋กœ ํ™•๋Œ€ํ•˜๊ณ , ์ดˆ๊ณผ๋ถ„์€ 300ํŽ˜์ด์ง€๋‹น 3,000์› ๋‹จ์œ„๋กœ ๊ณ„์‚ฐ๋ฉ๋‹ˆ๋‹ค.
  • ๊ธฐํƒ€

    • ๋‚ด๋ถ€ ๊ณ„์‚ฐ ๋กœ์ง์„ ์ตœ์‹  ๊ทœ์น™์— ๋งž๊ฒŒ ์ •๋ฆฌํ•˜๊ณ  ์ฃผ์„์„ ์—…๋ฐ์ดํŠธํ–ˆ์Šต๋‹ˆ๋‹ค.

@coderabbitai

coderabbitai Bot commented Aug 16, 2025

Copy link
Copy Markdown

Walkthrough

๋ฌธ์„œ ๋„๋ฉ”์ธ์— ์ถ”์ • ๊ฐ€๊ฒฉ ๋ฉ”์„œ๋“œ 2๊ฐœ๊ฐ€ ์ถ”๊ฐ€๋˜๊ณ , ๋ณต๊ตฌ ์˜ต์…˜ ๊ฐ€๊ฒฉ ๊ณ„์‚ฐ ๋กœ์ง์˜ ๊ธฐ์ค€ยท๊ตฌ๊ฐ„์ด ๋ณ€๊ฒฝ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ์‘๋‹ต DTO์—๋Š” ๋ฌธ์„œ๋ณ„ยท์ดํ•ฉ ์ถ”์ • ๊ฐ€๊ฒฉ ํ•„๋“œ๊ฐ€ ์ถ”๊ฐ€๋˜๋ฉฐ, ๋นŒ๋”/์ง‘๊ณ„ ๋กœ์ง์ด ํ™•์žฅ๋˜์–ด ์ƒˆ ์ถ”์ • ๊ฐ’์„ ํฌํ•จํ•ฉ๋‹ˆ๋‹ค. ๊ณต๊ฐœ API ์‹œ๊ทธ๋‹ˆ์ฒ˜๋Š” ์œ ์ง€๋ฉ๋‹ˆ๋‹ค.

Changes

Cohort / File(s) Summary of changes
Domain: Document estimated prices
src/main/java/com/tookscan/tookscan/order/domain/Document.java
๋ฌด์กฐ๊ฑด์  ์ถ”์ • ๊ฐ€๊ฒฉ ๋ฉ”์„œ๋“œ 2๊ฐœ ์ถ”๊ฐ€: getEstimatedOcrPrice(), getEstimatedOneDayScanPrice(); ๊ธฐ์กด ๊ฒŒ์ดํŒ… ๋กœ์ง๊ณผ ๋ฌด๊ด€ํ•˜๊ฒŒ ํŽ˜์ด์ง€ ์ˆ˜ ๊ธฐ๋ฐ˜ ๊ณ„์‚ฐ.
Service: Recovery option pricing rule update
src/main/java/com/tookscan/tookscan/order/domain/service/DocumentService.java
SPRING ๋ณต๊ตฌ ์˜ต์…˜ ๊ฐ€๊ฒฉ ๊ทœ์น™ ๋ณ€๊ฒฝ: ๊ธฐ๋ณธ ์ปค๋ฒ„ ๋ฒ”์œ„ 300โ†’400ํŽ˜์ด์ง€, ์ถ”๊ฐ€ ๊ตฌ๊ฐ„ 100p/1,000์›โ†’300p/3,000์›, ๊ณ„์‚ฐ์‹ ๊ฐฑ์‹ ; ๊ณต๊ฐœ API ๋ณ€ํ™” ์—†์Œ.
API DTO: Estimated price fields and aggregation
src/main/java/com/tookscan/tookscan/order/presentation/dto/response/EstimateUserOrderPriceResponseDto.java
์ตœ์ƒ์œ„ ๋ฐ ๋ฌธ์„œ๋ณ„ ์ถ”์ • OCR/๋‹น์ผ์Šค์บ” ๊ฐ€๊ฒฉ ํ•„๋“œ ์ถ”๊ฐ€, JSON ํ”„๋กœํผํ‹ฐ ๋งคํ•‘ ๋ฐ NotNull ์ง€์ •, ๋นŒ๋”/์ƒ์„ฑ์ž ํ™•์žฅ, fromEntity ๋ฐ of(...)์—์„œ ํ•ฉ๊ณ„ ์ง‘๊ณ„ ๋กœ์ง ์ถ”๊ฐ€.

Sequence Diagram(s)

sequenceDiagram
  participant Client
  participant Controller
  participant Service
  participant Document
  participant DTO

  Client->>Controller: ๊ฒฌ์  ์š”์ฒญ
  Controller->>Service: ์ฃผ๋ฌธ/๋ฌธ์„œ ์กฐํšŒ ํ›„ ๊ฐ€๊ฒฉ ๊ณ„์‚ฐ
  loop ๊ฐ ๋ฌธ์„œ
    Service->>Document: getEstimatedOcrPrice(), getEstimatedOneDayScanPrice()
    Document-->>Service: ์ถ”์ • ๊ฐ€๊ฒฉ ๋ฐ˜ํ™˜
  end
  Service->>DTO: ๋ฌธ์„œ๋ณ„ ์ •๋ณด ๋งคํ•‘ ๋ฐ ์ถ”์ • ๊ฐ€๊ฒฉ ํ•ฉ๊ณ„ ์„ค์ •
  DTO-->>Controller: EstimateUserOrderPriceResponseDto
  Controller-->>Client: ์‘๋‹ต(JSON)
Loading
sequenceDiagram
  participant Service
  participant PricingRule

  Service->>PricingRule: SPRING ๋ณต๊ตฌ ์˜ต์…˜ ๊ณ„์‚ฐ(pageCount)
  alt pageCount <= 400
    PricingRule-->>Service: 3,000
  else pageCount > 400
    PricingRule-->>Service: 3,000 + ceil((pageCount-400)/300)*3,000
  end
Loading

Estimated code review effort

๐ŸŽฏ 3 (Moderate) | โฑ๏ธ ~25 minutes

Poem

ํ† ๋ผ ๋ฐœ๋ ํŠ•๊ธฐ๋ฉฐ ์ฝ”๋“œ์ˆฒ ๋‹ฌ๋ ค๊ฐ€,
ํŽ˜์ด์ง€ ์…ˆํ•˜๋ฉฐ OCR ๊ฟˆ์„ ๋”ํ•ด๋ด.
ํ•˜๋ฃจ ์Šค์บ” ๋ฐ”๋žŒ ํƒ€๊ณ  ์ˆซ์ž๋“ค์ด ์ถค์ถ”๋„ค,
400 ๋„˜์€ ๊ธธ์—” 300์”ฉ ์ฝฉ์ฝฉ์พ…!
์ƒˆ ๊ฒฌ์  ๋‹ด์€ ๋ฐ”๊ตฌ๋‹ˆ, ์‚์•ฝ ์‚์•ฝ JSON ๋ด„. ๐Ÿ‡๐Ÿ“„๐Ÿ’จ

Tip

๐Ÿ”Œ Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.


๐Ÿ“œ Recent review details

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

๐Ÿ’ก Knowledge Base configuration:

  • Jira integration is disabled
  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.

๐Ÿ“ฅ Commits

Reviewing files that changed from the base of the PR and between c82c00b and 9caff80.

๐Ÿ“’ Files selected for processing (3)
  • src/main/java/com/tookscan/tookscan/order/domain/Document.java (1 hunks)
  • src/main/java/com/tookscan/tookscan/order/domain/service/DocumentService.java (1 hunks)
  • src/main/java/com/tookscan/tookscan/order/presentation/dto/response/EstimateUserOrderPriceResponseDto.java (9 hunks)

Note

๐ŸŽ Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

๐Ÿชง 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.
    • 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.
  • 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 the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Join our Discord community for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

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

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • 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.

@GiHwan2 GiHwan2 self-assigned this Aug 16, 2025
@GiHwan2 GiHwan2 added the ๐Ÿ”จ Fix ๊ธฐ๋Šฅ ๋ณ€๊ฒฝ or ๋ฒ„๊ทธ ํ•ด๊ฒฐ label Aug 16, 2025
@GiHwan2 GiHwan2 merged commit e4b36f0 into dev Aug 16, 2025
3 checks passed
@GiHwan2 GiHwan2 deleted the Fix/#782 branch August 16, 2025 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

๐Ÿ”จ Fix ๊ธฐ๋Šฅ ๋ณ€๊ฒฝ or ๋ฒ„๊ทธ ํ•ด๊ฒฐ

Projects

None yet

Development

Successfully merging this pull request may close these issues.

๐Ÿ”จ Fix - ๊ฐ€๊ฒฉ ๊ณ„์‚ฐ API ์‘๋‹ต๊ฐ’ OCR ๊ฐ€๊ฒฉ, OnedayScan ๊ฐ€๊ฒฉ ์ถ”๊ฐ€

1 participant