<?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.report.mapper.PqReportMapper">

    <select id="getBoundReportIds" resultType="java.lang.String">
        select distinct Report_Template_Id from ad_plan where state = 1
    </select>

    <select id="listOptionsByPattern" resultType="com.njcn.gather.report.pojo.vo.PqReportVO$OptionVO">
        select
            id,
            name,
            version,
            concat(name, '_', version) as displayName
        from pq_report
        where state = 1
          and pattern = #{pattern}
        order by update_time desc
    </select>
</mapper>
