itn 2023-10-19
문자 재전송 쿼리 성능개선
@479353e3a3f878887c5babda1f0a31edd48c1b83
src/main/resources/egovframework/sqlmap/let/msg/MjonMsgSent_SQL_mysql.xml
--- src/main/resources/egovframework/sqlmap/let/msg/MjonMsgSent_SQL_mysql.xml
+++ src/main/resources/egovframework/sqlmap/let/msg/MjonMsgSent_SQL_mysql.xml
@@ -267,6 +267,7 @@
 			, orderByCode					 AS orderByCode
 			, RESULT						 AS msgResult
 			, sendKind						 AS sendKind
+			, MSG_KIND						 AS msgKind
 		FROM
 			( SELECT
 				B.USER_ID
@@ -291,6 +292,7 @@
 				, A.RSLT_CODE
 				, A.RSLT_CODE2
 				, B.SEND_KIND as sendKind
+				, B.MSG_KIND
 				, CASE
 					WHEN B.MSG_TYPE = '6'
 						AND B.FILE_CNT > 0
@@ -413,10 +415,10 @@
 			</isNotEmpty>
 			<isNotEmpty property="msgSentType">
 				<isEqual property="msgSentType" compareValue="01" >
-					AND SUBSTR(SMS_TXT, 1, 8) != '(선거운동정보)'
+					AND MSG_KIND != 'C'
 				</isEqual>
 				<isEqual property="msgSentType" compareValue="02" >
-					AND SUBSTR(SMS_TXT, 1, 8) = '(선거운동정보)'
+					AND MSG_KIND = 'C'
 				</isEqual>
 			</isNotEmpty>
 		GROUP BY MSG_GROUP_ID
Add a comment
List