<?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="egovframework.service.mapper.MainMapper">
  
	<select id="getPossiblePopupList" resultType="java.util.HashMap">
		SELECT POPUPID,
               IMG_ID,
               IMG_NAME,
               POST_FROM,
               POST_TO,
               REGDATE,
               TITLE,
               URL,
               USE_YN               
          FROM TB_WWW_POPUP
         WHERE TO_CHAR(SYSDATE, 'YYYYMMDD') BETWEEN POST_FROM AND POST_TO
           AND USE_YN = 'Y'
           AND DEL_YN = 'N'
         ORDER BY POPUPID DESC
<!--
		SELECT POPUPID,
               IMG_ID,
               IMG_NAME,
               POST_FROM,
               POST_TO,
               REGDATE,
               TITLE,
               URL,
               USE_YN               
          FROM TB_OP_WEB_POPUP
         WHERE TO_CHAR(SYSDATE, 'YYYYMMDD') BETWEEN POST_FROM AND POST_TO
           AND USE_YN = 'Y'
           AND DEL_YN = 'N'
         ORDER BY POPUPID DESC
-->
	</select>
	
	<select id="getPopupObject" parameterType="java.util.HashMap" resultType="java.util.HashMap">
		SELECT POPUPID,
			   TITLE,
			   URL,
			   POST_FROM,
			   POST_TO,
			   IMG_ID,
               IMG_NAME,
			   REGDATE,
			   USE_YN,
			   DEL_YN			   
		  FROM TB_WWW_POPUP
		 WHERE POPUPID =#{id}
	</select>
	
</mapper>