ykmykm4608
@ykmykm46089813
Reviews Written
-
Average Rating
-
Posts
Q&A
JPQL ๋์ ์ฟผ๋ฆฌ ๋ถ๋ถ - > QUERYDSL ๋ง์ด๊ทธ๋ ์ด์ ํ ์ง๋ฌธ
ํน์ fetchjoin ์ ์ฉ ์๋๊ฑฐ ๊ฐ์๋ฐ ํ ํ์๊ฐ ์๋๊ฑธ๊น์? public List findTransactionList(Long accountId, String gubun, Integer page){ JPAQuery query = jpaQueryFactory.selectFrom(transaction); return query .leftJoin(transaction.withdrawAccount).leftJoin(transaction.depositAccount) .where(gubunCheck(gubun, accountId)) .limit(3).offset(page*3) .fetch(); } private BooleanExpression gubunCheck(String gubun, Long accountId){ if (!StringUtils.hasText(gubun)){ return transaction.withdrawAccount.id.eq(accountId).or(transaction.depositAccount.id.eq(accountId)); }else if(TransactionEnum.valueOf(gubun) == TransactionEnum.DEPOSIT){ return fetchjtransaction.depositAccount.id.eq((accountId)); }else if(TransactionEnum.valueOf(gubun) == TransactionEnum.WITHDRAW){ return transaction.withdrawAccount.id.eq(accountId); }else { return null; } }
- 0
- 2
- 495
Q&A
JPQL ๋์ ์ฟผ๋ฆฌ ๋ถ๋ถ - > QUERYDSL ๋ง์ด๊ทธ๋ ์ด์ ํ ์ง๋ฌธ
(์ฌ์ง) (์ฌ์ง)์ด๋ ๊ฒ ํ๋ ๋๋ค์,,? QAccout Qํด๋์ค๊ฐ ๋ง์๋ ๋ด ๋๋ค..,,QAccount withdrawAccount = QAccount.account; QAccount depositAccount = QAccount.account;
- 0
- 2
- 495
Q&A
๋งฅ ์ฌ์ฉ์๊ฐ ์๋ ์๋์ฐ ์ฌ์ฉ์ ๋ถ๋ค์ docker redis ์ค์น ์ด๋ป๊ฒ ํ์ จ๋์?
์ฒจ์ ํฐ๋ฏธ๋์์ mysql ์ค์นํ๋๊ฑฐ๋ถํฐ ์๋ตํ๊ณ ์ํฌ๋ฒค์น๋ก ํ์๋๋ฐ cmd๋ก๋ ๊ฐ๋ฅํ๊ฑฐ์๊พผ์ฌ ๊ฐ์ฌํฉ๋... (์ฌ์ง)
- 0
- 2
- 929




