liyong
16 小时以前 f02b5af51f2fcfaae5b04e4c12078ec0da578f7e
src/main/resources/mapper/staff/StaffJoinLeaveRecordMapper.xml
@@ -22,4 +22,13 @@
            AND staff_name LIKE CONCAT('%',#{staffJoinLeaveRecord.staffName},'%')
        </if>
    </select>
    <select id="staffOnJobList" resultType="com.ruoyi.staff.pojo.StaffJoinLeaveRecord">
        select *
        from (select *,
                     ROW_NUMBER() over (PARTITION BY staff_no ORDER BY create_time DESC ) as rn
              from staff_join_leave_record
              where staff_state = 1) t
        where rn = 1
    </select>
</mapper>