feat(chat): 멤버가 최근에 대화한 캐릭터 목록
- ChatCharacterRepository.kt의 JPQL 정렬 절을 `ORDER BY MAX(COALESCE(m.createdAt, r.createdAt)) DESC`로 변경
This commit is contained in:
@@ -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(
|
||||||
|
|||||||
Reference in New Issue
Block a user