Files
fad_oa/ruoyi-oa/src/main/resources/mapper/oa/OaReportDetailMapper.xml

68 lines
2.5 KiB
XML

<?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>
<select id="queryByProjectId" resultType="com.ruoyi.oa.domain.vo.OaReportDetailVo">
select ord.detail_id,
ord.summary_id,
ord.device_code,
ord.category,
ord.device_description,
ord.report_detail,
ord.oss_ids,
ord.create_by,
ord.create_time,
ord.update_by,
ord.update_time,
ord.del_flag,
ord.remark
from oa_report_detail ord
left join oa_report_summary ors on ors.summary_id = ord.summary_id
where project_id = #{projectId}
</select>
</mapper>