maven
2 天以前 5da5bf5cb70a889645e156eff869ff276c5a573b
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>