Fancy
2024-11-01 4a35dea2b0976e7fdb0e2b1a0d7d9b8ac2af0fe4
pms-parent/pms-global/src/main/resources/mapper/StaDeviceProductionLogPastMapper.xml
@@ -45,10 +45,15 @@
    </select>
    <!-- 将过往日志移动到 sta_device_production_log_past -->
    <insert id="insertIntoPastLogs">
        INSERT INTO sta_device_production_log_past SELECT * FROM sta_device_production_log WHERE DATE(out_time) != CURDATE();
    </insert>
    <delete id="deleteFromLogTable">
        DELETE FROM sta_device_production_log WHERE DATE(out_time) != CURDATE();
    </delete>
    <select id="countLastDayLogs" resultType="_long">
        SELECT COUNT(1) FROM sta_device_production_log WHERE DATE(out_time) != CURDATE();
    </select>
</mapper>