<?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="cn.com.ctop.common.module.mapper.UReportMapper">

    <select id="queryUReportBy" resultType="com.alibaba.fastjson.JSONObject">
        SELECT
            id,
            name
        FROM
            ureport_file
        WHERE
            report_type = #{reportType}
    </select>

    <select id="queryUReportSubscriberByFileId" resultType="cn.com.ctop.common.module.entity.UReportSubscriber">
        SELECT
            file_id,
            file_name,
            user_id
        FROM
            ureport_file_bind_user
        WHERE
            file_id = #{fileId}
        and is_subscribe=1
    </select>

</mapper>