<?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="com.foreverwin.mesnac.common.mapper.CustomReportMapper">

    <resultMap type="com.foreverwin.mesnac.common.model.CustomReportMainmodel" id="CustomReportMainmodelResult">
        <result property="handle"    column="HANDLE"    />
        <result property="site"    column="SITE"    />
        <result property="reportId"    column="REPORT_ID"    />
        <result property="reportTitle"    column="REPORT_TITLE"    />
        <result property="reportDesc"    column="REPORT_DESC"    />
        <result property="conditionSqlConfig"    column="CONDITION_SQL_CONFIG"    />
        <result property="displayType"    column="DISPLAY_TYPE"    />
        <result property="timeRefresh"    column="TIME_REFRESH"    />
        <result property="backgroundColor"    column="BACKGROUND_COLOR"    />
        <result property="fontColor"    column="FONT_COLOR"    />
        <result property="pageSize"    column="PAGE_SIZE"    />
        <result property="modifyDateTime"    column="MODIFY_DATE_TIME"    />
        <result property="modifyUser"    column="MODIFY_USER"    />
    </resultMap>

    <select id="selectQuerySentence" resultMap="CustomReportMainmodelResult">
        SELECT CONDITION_SQL_CONFIG
        FROM Z_CUSTOM_REPORT_MAINMODEL
        WHERE SITE=#{site} AND REPORT_ID=#{reportId}
    </select>


    <select id="executeSqlQuery" resultType="java.util.Map">
      ${sql}
    </select>

</mapper>