linwe
2024-09-03 764d883b5ea3bdc06abbec548b6df0511e567978
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?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="org.springblade.modules.system.mapper.LogApiMapper">
 
    <!--自定义分页查询-->
    <select id="selectLogApiExtPage" resultType="org.springblade.modules.system.entity.LogApiExt">
        select * from blade_log_api where 1 = 1
        <if test="logApi.type!=null and logApi.type!=''">
            and type = #{logApi.type}
        </if>
        <if test="logApi.applicationId!=null and logApi.applicationId!=''">
            and application_id = #{logApi.type}
        </if>
        <if test="logApi.serviceId!=null and logApi.serviceId!=''">
            and service_id like concat('%',#{logApi.serviceId},'%')
        </if>
        <if test="logApi.serverHost!=null and logApi.serverHost!=''">
            and server_host like concat('%',#{logApi.serverHost},'%')
        </if>
        order by id desc,create_time desc
    </select>
 
    <!--删除接口日志信息-->
    <delete id="removeByTime">
        DELETE FROM blade_log_api WHERE create_time &lt; NOW() - INTERVAL 180 DAY;
    </delete>
 
</mapper>