<?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.template.mapper.SmartFreezeRecordMapper">
    <resultMap type="com.template.model.vo.SmartFreezeRecordPageVo" id="smartFreezeRecordPageMap">
        <result property="id" column="id"/>
        <result property="userId" column="user_id"/>
        <result property="userName" column="user_name"/>
        <result property="cardNo" column="card_no"/>
        <result property="type" column="type"/>
    </resultMap>

    <select id="querySmartFreezeRecordPageList" resultType="com.template.model.vo.SmartFreezeRecordPageVo" resultMap="smartFreezeRecordPageMap">
        select sfr.id,su.card_no,su.name as user_name,sfr.user_id,sfr.type from smart_freeze_record sfr
        left join smart_user su on su.deleted = 0 and su.id = sfr.user_id
        where sfr.deleted = 0
        order by sfr.create_time desc
    </select>


</mapper>
