<?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.shkj.wms.mapper.SysThirdExceptionRequestMapper">

    <resultMap type="com.shkj.wms.domain.SysThirdExceptionRequest" id="SysThirdExceptionRequestResult">
            <result property="id" column="id"/>
            <result property="code" column="code"/>
            <result property="type" column="type"/>
            <result property="requestBody" column="request_body"/>
            <result property="responseBody" column="response_body"/>
            <result property="createTime" column="create_time"/>
            <result property="createBy" column="create_by"/>
            <result property="updateTime" column="update_time"/>
            <result property="updateBy" column="update_by"/>
    </resultMap>
        <select id="getOneByOrderNo" parameterType="string" resultType="com.shkj.wms.domain.SysThirdExceptionRequest">
            select * from sys_third_exception_request where  status='fail'
            and IFNULL(plan_time,NOW()) &lt;=NOW()
            order by create_time asc
            limit 1
        </select>
</mapper>