From 8965a0da1956824bb6664620872156cdb979f0e2 Mon Sep 17 00:00:00 2001 From: leeedongjaee Date: Sat, 9 Aug 2025 14:24:29 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=E2=9C=A8=20feat:=20=EC=B1=84=ED=8C=85?= =?UTF-8?q?=EB=B0=A9=20=EB=A7=A4=EB=AC=BC=20=EA=B0=80=EA=B2=A9=20=EC=A0=95?= =?UTF-8?q?=EB=B3=B4=20=EB=8B=A8=EC=9C=84=20=ED=91=9C=EC=8B=9C=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/chat/mapper/ChatRoomMapper.xml | 31 ++++++++++++++----- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/src/main/resources/org/scoula/domain/chat/mapper/ChatRoomMapper.xml b/src/main/resources/org/scoula/domain/chat/mapper/ChatRoomMapper.xml index a7af1d70..a16d8828 100644 --- a/src/main/resources/org/scoula/domain/chat/mapper/ChatRoomMapper.xml +++ b/src/main/resources/org/scoula/domain/chat/mapper/ChatRoomMapper.xml @@ -98,18 +98,35 @@ WHEN 'WOLSE' THEN '월세' ELSE h.lease_type END, ' - ', - FORMAT(h.deposit_price, 0), '만원', - CASE WHEN h.monthly_rent > 0 - THEN CONCAT(' / ', FORMAT(h.monthly_rent, 0), '만원') + CASE + WHEN h.deposit_price >= 10000 THEN + CONCAT(FORMAT(h.deposit_price DIV 10000, 0), '억', + CASE WHEN h.deposit_price % 10000 > 0 + THEN CONCAT(' ', FORMAT(h.deposit_price % 10000, 0), '만원') + ELSE '원' END) + ELSE + CONCAT(FORMAT(h.deposit_price, 0), '만원') + END, + CASE WHEN h.monthly_rent > 0 THEN + CONCAT(' / ', + CASE + WHEN h.monthly_rent >= 10000 THEN + CONCAT(FORMAT(h.monthly_rent DIV 10000, 0), '억', + CASE WHEN h.monthly_rent % 10000 > 0 + THEN CONCAT(' ', FORMAT(h.monthly_rent % 10000, 0), '만원') + ELSE '원' END) + ELSE + CONCAT(FORMAT(h.monthly_rent, 0), '만원') + END) ELSE '' END) AS property_title, (SELECT hi.image_url FROM home_image hi WHERE hi.home_id = c.home_id - LIMIT 1) AS property_image_url, - h.deposit_price AS property_price, - h.lease_type AS property_type + LIMIT 1) AS property_image_url, + h.deposit_price AS property_price, + h.lease_type AS property_type FROM chatroom c - JOIN home h ON c.home_id = h.home_id + JOIN home h ON c.home_id = h.home_id WHERE c.chatroom_id = #{chatRoomId} AND (c.owner_id = #{userId} OR c.buyer_id = #{userId}) From 9a4aceef6ee5ae1bd64eb000418ffafb9ca1ecc1 Mon Sep 17 00:00:00 2001 From: leeedongjaee Date: Sat, 9 Aug 2025 14:39:07 +0900 Subject: [PATCH 2/2] =?UTF-8?q?=E2=9C=A8=20feat:=20=EC=B1=84=ED=8C=85?= =?UTF-8?q?=EB=B0=A9=20=EB=A7=A4=EB=AC=BC=20=EA=B0=80=EA=B2=A9=20=EC=A0=95?= =?UTF-8?q?=EB=B3=B4=20=EB=8B=A8=EC=9C=84=20=ED=91=9C=EC=8B=9C=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/chat/mapper/ChatRoomMapper.xml | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/resources/org/scoula/domain/chat/mapper/ChatRoomMapper.xml b/src/main/resources/org/scoula/domain/chat/mapper/ChatRoomMapper.xml index a16d8828..db337dd4 100644 --- a/src/main/resources/org/scoula/domain/chat/mapper/ChatRoomMapper.xml +++ b/src/main/resources/org/scoula/domain/chat/mapper/ChatRoomMapper.xml @@ -99,24 +99,24 @@ ELSE h.lease_type END, ' - ', CASE - WHEN h.deposit_price >= 10000 THEN - CONCAT(FORMAT(h.deposit_price DIV 10000, 0), '억', - CASE WHEN h.deposit_price % 10000 > 0 - THEN CONCAT(' ', FORMAT(h.deposit_price % 10000, 0), '만원') + WHEN h.deposit_price >= 100000000 THEN + CONCAT(FORMAT(h.deposit_price DIV 100000000, 0), '억', + CASE WHEN (h.deposit_price % 100000000) >= 10000 + THEN CONCAT(' ', FORMAT((h.deposit_price % 100000000) DIV 10000, 0), '만원') ELSE '원' END) ELSE - CONCAT(FORMAT(h.deposit_price, 0), '만원') + CONCAT(FORMAT(h.deposit_price DIV 10000, 0), '만원') END, CASE WHEN h.monthly_rent > 0 THEN CONCAT(' / ', CASE - WHEN h.monthly_rent >= 10000 THEN - CONCAT(FORMAT(h.monthly_rent DIV 10000, 0), '억', - CASE WHEN h.monthly_rent % 10000 > 0 - THEN CONCAT(' ', FORMAT(h.monthly_rent % 10000, 0), '만원') + WHEN h.monthly_rent >= 100000000 THEN + CONCAT(FORMAT(h.monthly_rent DIV 100000000, 0), '억', + CASE WHEN (h.monthly_rent % 100000000) >= 10000 + THEN CONCAT(' ', FORMAT((h.monthly_rent % 100000000) DIV 10000, 0), '만원') ELSE '원' END) ELSE - CONCAT(FORMAT(h.monthly_rent, 0), '만원') + CONCAT(FORMAT(h.monthly_rent DIV 10000, 0), '만원') END) ELSE '' END) AS property_title, (SELECT hi.image_url