<?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.ruoyi.wgz.mapper.WgzDailyClockMapper">

    <resultMap type="com.ruoyi.wgz.domain.WgzDailyClock" id="WgzDailyClockResult">
        <result property="id" column="id"/>
        <result property="recruitId" column="recruit_id"/>
        <result property="userId" column="user_id"/>
        <result property="dilyTime" column="dily_time"/>
        <result property="dailyMark" column="daily_mark"/>
        <result property="pnchOsition" column="pnch_osition"/>
        <result property="finishToday" column="finish_today"/>
        <result property="unfinished" column="unfinished"/>
        <result property="workTomorrow" column="work_tomorrow"/>
        <result property="coordinate" column="coordinate"/>
        <result property="attachment" column="attachment"/>
        <result property="auditorUserId" column="auditor_user_id"/>
        <result property="auditorType" column="auditor_type"/>
        <result property="auditorOpinion" column="auditor_opinion"/>
        <result property="auditorTime" column="auditor_time"/>
        <result property="delFlag" column="del_flag"/>
        <result property="createBy" column="create_by"/>
        <result property="createTime" column="create_time"/>
        <result property="updateBy" column="update_by"/>
        <result property="updateTime" column="update_time"/>
        <result property="remark" column="remark"/>
    </resultMap>

    <select id="userDailyRecordListPage" resultType="com.ruoyi.wgz.bo.res.WgzAppUserDailyRecordRes">
        SELECT
            a.id,
            a.recruit_id,
            a.user_id,
            b.username,
            b.avatar_name,
            a.dily_time,
            a.finish_today,
            a.auditor_type
        FROM
            wgz_daily_clock a
                LEFT JOIN bgt_user b ON (a.user_id = b.user_id and b.del_flag = 0)
        WHERE
            a.del_flag = 0
        ORDER BY
            a.id DESC
    </select>


</mapper>
