<?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.ruoyi.oa.mapper.OaReportDetailMapper">

    <resultMap type="com.ruoyi.oa.domain.OaReportDetail" id="OaReportDetailResult">
        <result property="detailId" column="detail_id"/>
        <result property="summaryId" column="summary_id"/>
        <result property="deviceCode" column="device_code"/>
        <result property="category" column="category"/>
        <result property="deviceDescription" column="device_description"/>
        <result property="reportDetail" column="report_detail"/>
        <result property="ossIds" column="oss_ids"/>
        <result property="createBy" column="create_by"/>
        <result property="createTime" column="create_time"/>
        <result property="updateBy" column="update_by"/>
        <result property="updateTime" column="update_time"/>
        <result property="delFlag" column="del_flag"/>
        <result property="remark" column="remark"/>
    </resultMap>
    <select id="selectVoByIdPlus" parameterType="Long" resultType="com.ruoyi.oa.domain.vo.OaReportDetailVo">
        select ord.detail_id,
               summary_id,
               device_code,
               category,
               device_description,
               report_detail,
               oss_ids,
               create_by,
               create_time,
               update_by,
               update_time,
               del_flag,
               remark,
               (
                   SELECT GROUP_CONCAT(so.url SEPARATOR ',')
                   FROM sys_oss so
                   WHERE FIND_IN_SET(so.oss_id, ord.oss_ids) > 0
               ) AS images
        from oa_report_detail ord
        where ord.detail_id = #{id}

    </select>


</mapper>
