zss
3 天以前 118afd697fe3197236dcf0ffd6cfd39bcec2d85f
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>