<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="MobileKakaoTemplate">

    <select id="selectListKakaoTemplateOption" parameterType="hashmap" resultType="hashmap">
    SELECT MKT.MU_KAKAO_TEMPLATE_ID  AS "muKakaoTemplateId"
          ,MKT.TEMPLATE_CODE         AS "templateCode"
          ,MKT.TITLE                 AS "title"
      FROM MU_KAKAO_TEMPLATE AS MKT
     WHERE MKT.USE_YN = 'Y'
  ORDER BY TITLE ASC
	</select>

	<select id="selectKakaoTemplate" parameterType="hashmap" resultType="hashmap">
		SELECT MKT.MU_KAKAO_TEMPLATE_ID  AS "muKakaoTemplateId"
			  ,MKT.TEMPLATE_CODE         AS "templateCode"
			  ,MKT.TITLE                 AS "title"
			  ,MKT.CONTENT               AS "content"
		  FROM MU_KAKAO_TEMPLATE AS MKT
		 WHERE MKT.USE_YN  = 'Y'
		   AND MKT.TEMPLATE_CODE  = #{templateCode}
		 LIMIT 0, 1
	</select>
</mapper>