feat(chat): 멤버가 최근에 대화한 캐릭터 목록
- ChatCharacterRepository.kt의 JPQL 정렬 절을 `ORDER BY MAX(COALESCE(m.createdAt, r.createdAt)) DESC`로 변경
This commit is contained in:
parent
80a0543e10
commit
005bb0ea2e
|
@ -59,7 +59,7 @@ interface ChatCharacterRepository : JpaRepository<ChatCharacter, Long> {
|
||||||
AND pc.isActive = true
|
AND pc.isActive = true
|
||||||
AND r.isActive = true
|
AND r.isActive = true
|
||||||
GROUP BY c.id
|
GROUP BY c.id
|
||||||
ORDER BY COALESCE(MAX(m.createdAt), r.createdAt) DESC
|
ORDER BY MAX(COALESCE(m.createdAt, r.createdAt)) DESC
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
fun findRecentCharactersByMember(
|
fun findRecentCharactersByMember(
|
||||||
|
|
Loading…
Reference in New Issue