fix(character-main): 최근 대화 캐릭터 조회에서 roomId 대신 characterId 반환
This commit is contained in:
		| @@ -57,7 +57,7 @@ class ChatCharacterController( | |||||||
|             chatRoomService.listMyChatRooms(member, 0, 10) |             chatRoomService.listMyChatRooms(member, 0, 10) | ||||||
|                 .map { room -> |                 .map { room -> | ||||||
|                     RecentCharacter( |                     RecentCharacter( | ||||||
|                         roomId = room.chatRoomId, |                         characterId = room.characterId, | ||||||
|                         name = room.title, |                         name = room.title, | ||||||
|                         imageUrl = room.imageUrl |                         imageUrl = room.imageUrl | ||||||
|                     ) |                     ) | ||||||
|   | |||||||
| @@ -22,7 +22,7 @@ data class Character( | |||||||
| ) | ) | ||||||
|  |  | ||||||
| data class RecentCharacter( | data class RecentCharacter( | ||||||
|     val roomId: Long, |     val characterId: Long, | ||||||
|     val name: String, |     val name: String, | ||||||
|     val imageUrl: String |     val imageUrl: String | ||||||
| ) | ) | ||||||
|   | |||||||
| @@ -24,6 +24,7 @@ data class CreateChatRoomResponse( | |||||||
|  */ |  */ | ||||||
| data class ChatRoomListItemDto( | data class ChatRoomListItemDto( | ||||||
|     val chatRoomId: Long, |     val chatRoomId: Long, | ||||||
|  |     val characterId: Long, | ||||||
|     val title: String, |     val title: String, | ||||||
|     val imageUrl: String, |     val imageUrl: String, | ||||||
|     val opponentType: String, |     val opponentType: String, | ||||||
| @@ -61,6 +62,7 @@ data class ChatMessagesPageResponse( | |||||||
|  |  | ||||||
| data class ChatRoomListQueryDto( | data class ChatRoomListQueryDto( | ||||||
|     val chatRoomId: Long, |     val chatRoomId: Long, | ||||||
|  |     val characterId: Long, | ||||||
|     val title: String, |     val title: String, | ||||||
|     val imagePath: String?, |     val imagePath: String?, | ||||||
|     val characterType: CharacterType, |     val characterType: CharacterType, | ||||||
|   | |||||||
| @@ -39,6 +39,7 @@ interface ChatRoomRepository : JpaRepository<ChatRoom, Long> { | |||||||
|         value = """ |         value = """ | ||||||
|             SELECT new kr.co.vividnext.sodalive.chat.room.dto.ChatRoomListQueryDto( |             SELECT new kr.co.vividnext.sodalive.chat.room.dto.ChatRoomListQueryDto( | ||||||
|                 r.id, |                 r.id, | ||||||
|  |                 pc.character.id, | ||||||
|                 r.title, |                 r.title, | ||||||
|                 pc.character.imagePath, |                 pc.character.imagePath, | ||||||
|                 pc.character.characterType, |                 pc.character.characterType, | ||||||
| @@ -54,7 +55,7 @@ interface ChatRoomRepository : JpaRepository<ChatRoom, Long> { | |||||||
|               AND pc.isActive = true |               AND pc.isActive = true | ||||||
|               AND r.isActive = true |               AND r.isActive = true | ||||||
|               AND m.isActive = true |               AND m.isActive = true | ||||||
|             GROUP BY r.id, r.title, r.createdAt, pc.character.imagePath, pc.character.characterType |             GROUP BY r.id, r.title, r.createdAt, pc.character.id, pc.character.imagePath, pc.character.characterType | ||||||
|             ORDER BY MAX(m.createdAt) DESC |             ORDER BY MAX(m.createdAt) DESC | ||||||
|         """ |         """ | ||||||
|     ) |     ) | ||||||
|   | |||||||
| @@ -270,6 +270,7 @@ class ChatRoomService( | |||||||
|  |  | ||||||
|             ChatRoomListItemDto( |             ChatRoomListItemDto( | ||||||
|                 chatRoomId = q.chatRoomId, |                 chatRoomId = q.chatRoomId, | ||||||
|  |                 characterId = q.characterId, | ||||||
|                 title = q.title, |                 title = q.title, | ||||||
|                 imageUrl = imageUrl, |                 imageUrl = imageUrl, | ||||||
|                 opponentType = opponentType, |                 opponentType = opponentType, | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user