Skip to content

Conversation

@kjhh2605
Copy link
Contributor

๐Ÿš€ ๊ด€๋ จ ์ด์Šˆ

๐Ÿ“ ์ž‘์—… ๋‚ด์šฉ

  • ๋กœ๊ทธ์ธ ํŽ˜์ด์ง€ UI ๊ตฌํ˜„
  • ๋กœ๊ทธ์ธ ํผ ์œ ํšจ์„ฑ ๊ฒ€์‚ฌ ์ถ”๊ฐ€

โœ”๏ธ ์ฒดํฌ ๋ฆฌ์ŠคํŠธ

  • Merge ํ•˜๋ ค๋Š” PR ๋ฐ Commit๋“ค์„ ๋กœ์ปฌ์—์„œ ์‹คํ–‰ํ–ˆ์„ ๋•Œ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•˜์ง€ ์•Š์•˜๋Š”๊ฐ€?

๐Ÿ“ธ ์Šคํฌ๋ฆฐ์ƒท

๐Ÿ’ฌ ๋ฆฌ๋ทฐ ์š”๊ตฌ์‚ฌํ•ญ(์„ ํƒ)

kjhh2605 and others added 2 commits November 3, 2025 13:52
โ€ฆg down long methods

โœจ Main Changes:
1. Created NutritionMapper utility class to eliminate duplicate nutrition field mapping
   - Centralized nutrition field mapping logic across ProductConverter, ReportConverter, and ProductService
   - Reduced code duplication from 5+ locations to a single utility class

2. Refactored ProductService to improve maintainability
   - Extracted findProductOrThrow() and findUserOrThrow() helper methods
   - Broke down addProduct() method by extracting image upload logic
   - Split saveNutritionInfo() into smaller, focused methods
   - Refactored saveIngredients() to reduce nesting and improve readability
   - Improved batch operations for ProductRawMaterial creation

3. Refactored ReportService to improve clarity
   - Extracted findReportRecordOrThrow() and validateReportIsInProgress() helpers
   - Broke down acceptReport() into smaller, single-responsibility methods
   - Separated nutrition report and image report processing logic

๐Ÿ“Š Impact:
- Reduced code duplication across 5+ files
- Improved method readability by breaking down 42+ line methods into smaller units
- Enhanced maintainability with clear separation of concerns
- Better error handling with consistent validation patterns

๐Ÿ”ง Technical Details:
- Added comprehensive JavaDoc comments for all new methods
- Maintained backward compatibility - no API changes
- Improved testability through better method granularity
@kjhh2605 kjhh2605 closed this Nov 11, 2025
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.

[Feat] ์ƒํ’ˆ ์ •๋ณด ์กฐํšŒ api

2 participants