<?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.zhushi.mapper.DkRecordMapper">

    <select id="queryConfigByUserId" resultType="com.ruoyi.zhushi.entity.DkAttendanceGroup">
        select DISTINCT t.* from dk_check_in_attendance_team_and_user  tu
        left join dk_check_in_attendance_team t on t.id = tu.attendance_team_id
        <where>
            <if test="userId != null and userId != ''">
                AND tu.user_id = #{userId}
            </if>
        </where>
    </select>

</mapper>
