<?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="org.jeecg.modules.adweb.enquiry.mapper.AdwebEnquiryRecordMapper">

    <select id="getEnquiryRecord" parameterType="org.jeecg.modules.adweb.enquiry.entity.AdwebEnquiryRecord"
            resultType="org.jeecg.modules.adweb.enquiry.entity.AdwebEnquiryRecord">
        select t1.*, t2.realname
        from adweb_enquiry_record t1,
             sys_user t2
        where t1.uid = t2.id
          and t1.enquiry_id = #{enquiryId}
          and t1.`status` = 1
        ORDER BY t1.ctime desc;
    </select>

</mapper>