Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[๐Ÿ’ก FEAT] OrderSheet ์„œ๋น„์Šค ๊ตฌํ˜„ #145

Open
3 of 5 tasks
happyjamy opened this issue Jan 6, 2024 · 1 comment
Open
3 of 5 tasks
Assignees
Labels
โญ๏ธ Feat ์ƒˆ๋กœ์šด ๊ธฐ๋Šฅ

Comments

@happyjamy
Copy link
Collaborator

happyjamy commented Jan 6, 2024

โœจ ๊ตฌํ˜„ ํ•  ๊ธฐ๋Šฅ

OrderSheet ์„œ๋น„์Šค ๊ตฌํ˜„
OrderSheet ๊ด€๋ จ Ordered Product ์„œ๋น„์Šค ๊ตฌํ˜„

๐Ÿ“ข ๊ตฌํ˜„ ๋ฐฉ์‹

OrderSheet ์„œ๋น„์Šค ๊ตฌํ˜„

๐Ÿ“‘ ๊ธฐ๋Šฅ ๋ช…์„ธ

  • OrderSheet ์ƒ์„ฑ
  • OrderSheet ID ๋กœ ์กฐํšŒ
  • OrderSheet ์‚ญ์ œ๋Š” cron ์œผ๋กœ ๊ตฌํ˜„
  • Ordered Product ์ƒ์„ฑ
  • Ordered Product ์‚ญ์ œ๋Š” cron ์œผ๋กœ ๊ตฌํ˜„

๐Ÿ“• ๋ž˜ํผ๋Ÿฐ์Šค

@happyjamy happyjamy added the โญ๏ธ Feat ์ƒˆ๋กœ์šด ๊ธฐ๋Šฅ label Jan 6, 2024
@happyjamy happyjamy self-assigned this Jan 6, 2024
tidavid1 added a commit that referenced this issue Jan 10, 2024
* [RENAME] Order ๋„๋ฉ”์ธ ํŒจํ‚ค์ง€ ์žฌ๋ถ„๋ฆฌ

* [FIX] Order ๋„๋ฉ”์ธ ํŒจํ‚ค์ง€ ์žฌ๋ถ„๋ฆฌ์— ๋”ฐ๋ฅธ import ์ˆ˜์ •

* [FEAT] OrderedProduct ์ƒ์„ฑ์ž ๋‚ด๋ถ€ ๊ฒ€์‚ฌ๋ฅผ ์œ„ํ•œ validate ๋กœ์ง ์ถ”๊ฐ€

* [FEAT] ํฌ์ธํŠธ history ์ €์žฅ์„ ์œ„ํ•œ id ์ถ”๊ฐ€

* [FEAT] OrderedProduct ์ƒ์„ฑํ•˜๋Š” ๋กœ์ง ๊ตฌํ˜„

* [FIX] ๋นŒ๋“œ ์˜ค๋ฅ˜ ๋ฌธ์ œ ํ•ด๊ฒฐ

---------

Co-authored-by: KyungMin Lee <[email protected]>
@JIN-076
Copy link
Collaborator

JIN-076 commented Jan 13, 2024

OrderService์— ์‚ฌ์šฉ๋  PointService ๋ฉ”์„œ๋“œ ๊ด€๋ จํ•ด์„œ ๊ฐ„๋‹จํ•˜๊ฒŒ ์„ค๋ช… ๋‚จ๊น๋‹ˆ๋‹ค! ๊ตฌํ˜„ํ•˜๋ฉด์„œ ์‚ฌ์šฉํ•˜์‹ค ๋•Œ ์ฐธ๊ณ ํ•˜๋ฉด ํŽธํ•  ๋“ฏ ํ•ฉ๋‹ˆ๋‹ค!๐Ÿ™†๐Ÿปโ€โ™€๏ธ

  1. orderId๊ฐ€ ๋งŒ๋“ค์–ด์ง„ ํ›„ (Order๊ฐ€ ์ƒ์„ฑ๋œ ํ›„) ํ•ด๋‹น ์ฃผ๋ฌธ์— ๋Œ€ํ•œ ํฌ์ธํŠธ ์ ๋ฆฝ ์ด๋ ฅ ์ €์žฅ ๋ฉ”์„œ๋“œ
Long pointService.accumulatePoint(PointRequest request) // ๋ฐ˜ํ™˜ํƒ€์ž…: pointId
Integer pointDetailService.saveAccumulationHistory(AcmPointDetailRequest request) // ๋ฐ˜ํ™˜ํƒ€์ž…: ์ตœ์ข… ์ ๋ฆฝ์•ก

PointRequest : userId, orderId
AcmPointDetailRequest: userId, orderId, orderedProductIds (List ํƒ€์ž…)

  1. orderId๊ฐ€ ๋งŒ๋“ค์–ด์ง„ ํ›„ ํ•ด๋‹น ์ฃผ๋ฌธ์— ๋Œ€ํ•œ ํฌ์ธํŠธ ์‚ฌ์šฉ ์ด๋ ฅ ์ €์žฅ ๋ฉ”์„œ๋“œ
Long pointService.usePoint(UsePointRequest request) // ๋ฐ˜ํ™˜ํƒ€์ž…: pointId
Integer pointDetailService.saveUseHistory(PointDetailRequest request) // ๋ฐ˜ํ™˜ํƒ€์ž…: ์ตœ์ข… ์‚ฌ์šฉ์•ก

UsePointRequest : userId, orderId, pointAmount (์‚ฌ์šฉํ•œ ํฌ์ธํŠธ ๊ธˆ์•ก)
PointDetailRequest : userId, pointId (pointService ๋ฐ˜ํ™˜๊ฐ’)

  • ์ด ๋ถ€๋ถ„์ด ์•ฝ๊ฐ„ ๊ณ ๋ฏผ์ด ๋˜๋Š”๊ฒŒ, ํฌ์ธํŠธ ์‚ฌ์šฉ ์ด๋ ฅ์€ orderId๊ฐ€ ๋งŒ๋“ค์–ด์ง€๊ณ  ์ด๋ฃจ์–ด์ง€๋‚˜์š”? ordeId ๋ฅผ ๋ฐ›๋„๋ก ๊ตฌํ˜„ํ•œ ๊ฒŒ ๋ฌธ์ œ๊ฐ€ ๋˜์ง€ ์•Š์„์ง€ ๊ณ ๋ฏผ์ด ๋ฉ๋‹ˆ๋‹ค! ์ˆ˜์ •ํ•ด์•ผ ํ•  ๋ถ€๋ถ„ ์žˆ์œผ๋ฉด ์•Œ๋ ค์ฃผ์„ธ์š”!๐Ÿ™‹๐Ÿปโ€โ™€๏ธ
  1. ์กด์žฌํ•˜๋Š” ์ฃผ๋ฌธ orderId์— ๋Œ€ํ•œ ์‚ฌ์šฉ ํฌ์ธํŠธ ์ทจ์†Œ ์ด๋ ฅ ์ €์žฅ ๋ฉ”์„œ๋“œ (๋ถ€๋ถ„์ทจ์†Œ ๋ฐ˜์˜)
Long pointService.cancelUsedPoint(PointRequest request) // ๋ฐ˜ํ™˜ํƒ€์ž…: pointId
Integer pointDetailService.saveUseCancelHistory(UseCacelPointDetailRequest request) // ๋ฐ˜ํ™˜ํƒ€์ž…: ์ตœ์ข… ์‚ฌ์šฉ ์ทจ์†Œ์•ก

PointRequest : userId, orderId
UseCacelPointDetailRequest : pointId (pointService ๋ฐ˜ํ™˜๊ฐ’), userId, orderedProductIds (List ํƒ€์ž…)

์ผ๋‹จ ์ œ๊ฐ€ ์ƒ๊ฐํ•˜๊ธฐ์—๋Š” ์ด ์ •๋„ ๋ฉ”์„œ๋“œ๋“ค์ด ํ•„์š”ํ•  ๊ฒƒ์œผ๋กœ ๋ณด์ด๋Š”๋ฐ, ์‚ฌ์šฉํ•ด์•ผ ํ•  ๋ฉ”์„œ๋“œ๋“ค์ด ์—ฌ๋Ÿฌ ๊ฐœ๋‹ค๋ณด๋‹ˆ, pointService ๋ฉ”์„œ๋“œ์™€ pointDetailService ๋กœ์ง์„ ํ•œ ๋ฒˆ์— ์‚ฌ์šฉํ•ด์„œ ๋ฐ˜ํ™˜ํ•˜๋„๋ก Facade ํŒจํ„ด์„ ์ ์šฉํ•œ ๋ณ„๋„์˜ ํด๋ž˜์Šค๋ฅผ ํ•˜๋‚˜ ๋‘๋Š” ๊ฒƒ๋„ ๊ดœ์ฐฎ์„ ๊ฒƒ ๊ฐ™๋‹ค๋Š” ์ƒ๊ฐ๋„ ๋“œ๋„ค์š”? ๊ตฌํ˜„ํ•˜๋ฉด์„œ ์ˆ˜์ •ํ•ด์•ผ ํ•˜๋Š” ๋ถ€๋ถ„ ์žˆ์œผ๋ฉด ๋น ๋ฅด๊ฒŒ ์ˆ˜์ •ํ• ๊ฒŒ์š”!๐Ÿ‘๐Ÿป

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
โญ๏ธ Feat ์ƒˆ๋กœ์šด ๊ธฐ๋Šฅ
Development

No branches or pull requests

2 participants