<?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.SmartScreenshotRecordMapper">
    <resultMap type="com.template.model.vo.ScreenshotRecordPageVo" id="screenshotRecordPageMap">
        <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="createTime" column="create_time"/>
    </resultMap>

    <select id="queryScreenshotRecordPageList" resultType="com.template.model.vo.ScreenshotRecordPageVo" resultMap="screenshotRecordPageMap">
        select ssr.id,ssr.user_id,su.name as user_name,su.card_no,ssr.create_time from smart_screenshot_record ssr
        left join smart_user su on su.deleted = 0 and su.id = ssr.user_id
        where ssr.deleted = 0
        order by ssr.create_time desc
    </select>
</mapper>
