<?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.tofly.gpsboot.mapper.maintain.RepairrejectMapper">

    <resultMap id="repairrejectMap" type="com.tofly.pojo.maintain.Repairreject">
        <id property="id" column="ID"/>
        <result property="repairId" column="REPAIR_ID"/>
        <result property="rejectNote" column="REJECT_NOTE"/>
        <result property="rejectTime" column="REJECT_TIME"/>
        <result property="rejectUserId" column="REJECT_USER_ID"/>
        <association property="rejectTimeStr" column="REJECT_TIME" select="getTimeStr"/>
        <association property="rejectUserIdName" column="REJECT_USER_ID"
                     select="com.tofly.gpsboot.mapper.plan.HydrantrecordMapper.getRealName"/>
    </resultMap>

    <select id="getTimeStr" resultType="java.lang.String">
        select to_char(#{rejectTime}, 'yyyy-MM-dd hh24:mi:ss') as rejectTimeStr
        from dual
    </select>

</mapper>
