<?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.njcn.gather.plan.mapper.AdPlanMapper">


    <select id="getReportIdByNameAndVersion" resultType="java.lang.String">
        SELECT id
        FROM pq_report
        WHERE name = #{name}
          AND version = #{version}
          and state = 1
    </select>

    <select id="getPqReportById" resultType="com.njcn.gather.report.pojo.po.PqReport">
        SELECT *
        FROM pq_report
        WHERE id = #{id}
          and state = 1
    </select>
    <select id="listAllReportTemplateName" resultType="java.lang.String">
        SELECT concat(name, '_', version) as name
        FROM pq_report
        WHERE state = 1
    </select>
</mapper>

