<?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.repair.mapper.RepairTransferRecordMapper">
    <resultMap type="com.repair.model.vo.TransferDetailVo" id="repairTransferDetailMap">
        <result property="id" column="id"/>
        <result property="userName" column="user_name"/>
        <result property="voice" column="voice"/>
        <result property="voiceLength" column="voice_length"/>
        <result property="remark" column="remark"/>
    </resultMap>
    <select id="queryTransferDetail" resultType="com.repair.model.vo.TransferDetailVo" resultMap="repairTransferDetailMap">
        SELECT rtr.id,rtr.voice_length,ru.user_name,rtr.voice,rtr.remark FROM repair_transfer_record rtr
        left join repair_user ru on ru.deleted = 0 and ru.id = rtr.user_id
        where rtr.deleted = 0 and rtr.approval_statu = 2 and rtr.record_id = #{recordId}
    </select>

</mapper>
