<?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 < NOW() - INTERVAL 180 DAY;
|
</delete>
|
|
</mapper>
|