-
Notifications
You must be signed in to change notification settings - Fork 1
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
๐ป ๋ฐฐ์น ์๋น์ค ๊ตฌํ ๋ฐ ๋ฆฌํฉํ ๋ง #12
base: develop
Are you sure you want to change the base?
Conversation
AnneMayor
commented
Jan 14, 2022
•
edited
Loading
edited
- ์ค์๊ฐ ๊ฒฝ๋งค ์ฑํ ๋ฐฉ ์์ฑ ๋ฐ Sago ํต๊ณ ์ง๊ณ ๋ฐฐ์น ์๋น์ค ๊ตฌํ ์๋ฃ
- ์ค์๊ฐ ๊ฒฝ๋งค ์ฑํ ๋ฐฉ ์์ํ ๋ฆฌํฉํ ๋ง(ํด๋์ค ํ์ผ ์์น ๋ณ๊ฒฝ)
|
||
@Getter | ||
@Setter | ||
@RequiredArgsConstructor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ ์ PR์์๋ ๋ง์๋๋ ธ๋ ๋ถ๋ถ์ธ๋ฐ final ๋ฉค๋ฒ๋ณ์์ ๋ํด์๋ง ์์ฑ์๋ฅผ generateํด์ฃผ๋ annotation์ด์์. lombok๋ ํ๋ฒ ์ดํด๋ณด์๋ฉด ์ข์ ๊ฒ ๊ฐ์์
<select id="selectCountFromTables" parameterType="java.time.ZonedDateTime" resultType="com.dhmall.batch.statistics.SagoStatisticsDto"> | ||
SELECT auctions.total_day_auction_count, users.total_day_user_count, payments.total_day_payment_count | ||
FROM | ||
( SELECT count(*) total_day_auction_count FROM auctions WHERE created_at = #{createdAt}) auctions, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๊ฐ count query๋ฅผ ๋ณ๋์ ๋ฉ์๋๋ก ๋ถ๋ฆฌํ๋๊ฒ ์ข์ ๊ฒ ๊ฐ์์. selectCountFromTables
์ด ์ด๋ค ๋ฉ์๋์ธ์ง ์๊ธฐ ์ฝ์ง ์๊ณ ์ด๋ค ๋ฐ์ดํฐ๋ฅผ countํด์ค๋ ๊ฑด์ง๋ ํด๋น xmlํ์ผ์ query๋ฅผ ๋ณด์ง์์ผ๋ฉด ์ ์ ์๊ฒ ๊ฐ๋ฐ๋์ด์๋ ๊ฒ ๊ฐ์์~
createSagoStatisticsInfo(statisticsInfo); | ||
} | ||
|
||
public SagoStatisticsDto findCountFromTables() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ํด๋น ๋ฉ์๋๋ ๋ฌธ์ ๊ฐ ๋ง์ ์ฝ๋์ธ ๊ฒ ๊ฐ์์. xmlํ์ผ์ ๊ด๋ จ ๋ด์ฉ ๋ฆฌ๋ทฐ ๋๋ ธ์ด์ :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์๊ณ ๋ง์ผ์ จ์ต๋๋ค. ์์ ์ด ํ์ํ ๋ถ๋ถ์ด ์์ด๋ณด์ฌ์. ๋ฆฌ๋ทฐ ํ์ธ๋ถํ๋๋ฆฝ๋๋ค :)
mapper xml SQL๋ฌธ ์์ ํ์(delete ๊ตฌ๋ฌธ์ where ์ ์ถ๊ฐ ๋ฑ) |