Junjie
19 小时以前 7fdc76dde7cd00510347e3231c4f60a88b012107
1
2
3
4
5
6
7
8
9
10
11
<?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.zy.system.mapper.LogCleanupMapper">
 
    <delete id="deleteExpiredBatch">
        DELETE FROM ${table}
        WHERE ${timeColumn} IS NOT NULL
          AND ${timeColumn} &lt; DATE_SUB(NOW(), INTERVAL #{expireDays} DAY)
        LIMIT #{limit}
    </delete>
</mapper>