| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- ~
- ~ Copyright (c) 2018-2025, lengleng All rights reserved.
- ~
- ~ Redistribution and use in source and binary forms, with or without
- ~ modification, are permitted provided that the following conditions are met:
- ~
- ~ Redistributions of source code must retain the above copyright notice,
- ~ this list of conditions and the following disclaimer.
- ~ Redistributions in binary form must reproduce the above copyright
- ~ notice, this list of conditions and the following disclaimer in the
- ~ documentation and/or other materials provided with the distribution.
- ~ Neither the name of the pig4cloud.com developer nor the names of its
- ~ contributors may be used to endorse or promote products derived from
- ~ this software without specific prior written permission.
- ~ Author: lengleng (wangiegie@gmail.com)
- ~
- -->
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.pig4cloud.pigx.admin.mapper.SysLogMapper">
- <resultMap id="sysLogMap" type="com.pig4cloud.pigx.admin.api.entity.SysLog">
- <id property="id" column="id"/>
- <result property="type" column="type"/>
- <result property="title" column="title"/>
- <result property="serviceId" column="service_id"/>
- <result property="createBy" column="create_by"/>
- <result property="createTime" column="create_time"/>
- <result property="updateTime" column="update_time"/>
- <result property="remoteAddr" column="remote_addr"/>
- <result property="userAgent" column="user_agent"/>
- <result property="requestUri" column="request_uri"/>
- <result property="method" column="method"/>
- <result property="params" column="params"/>
- <result property="time" column="time"/>
- <result property="delFlag" column="del_flag"/>
- <result property="exception" column="exception"/>
- </resultMap>
- <!--sysLog简单分页查询-->
- <select id="getSysLogPage" resultMap="sysLogMap">
- SELECT
- id,
- type,
- title,
- service_id,
- create_by,
- create_time,
- update_time,
- remote_addr,
- user_agent,
- request_uri,
- method,
- params,
- time,
- del_flag,
- exception
- FROM sys_log
- <where>
- <if test="sysLog.id != null and sysLog.id.trim() != ''">
- AND id = #{sysLog.id}
- </if>
- <if test="sysLog.type != null and sysLog.type.trim() != ''">
- AND type = #{sysLog.type}
- </if>
- <if test="sysLog.title != null and sysLog.title.trim() != ''">
- AND title = #{sysLog.title}
- </if>
- <if test="sysLog.serviceId != null and sysLog.serviceId.trim() != ''">
- AND service_id = #{sysLog.serviceId}
- </if>
- <if test="sysLog.createBy != null and sysLog.createBy.trim() != ''">
- AND create_by = #{sysLog.createBy}
- </if>
- <if test="sysLog.createTime != null and sysLog.createTime.trim() != ''">
- AND create_time = #{sysLog.createTime}
- </if>
- <if test="sysLog.updateTime != null and sysLog.updateTime.trim() != ''">
- AND update_time = #{sysLog.updateTime}
- </if>
- <if test="sysLog.remoteAddr != null and sysLog.remoteAddr.trim() != ''">
- AND remote_addr LIKE CONCAT('%',#{sysLog.remoteAddr},'%')
- </if>
- <if test="sysLog.userAgent != null and sysLog.userAgent.trim() != ''">
- AND user_agent = #{sysLog.userAgent}
- </if>
- <if test="sysLog.requestUri != null and sysLog.requestUri.trim() != ''">
- AND request_uri LIKE CONCAT('%',#{sysLog.requestUri},'%')
- </if>
- <if test="sysLog.method != null and sysLog.method.trim() != ''">
- AND method = #{sysLog.method}
- </if>
- <if test="sysLog.params != null and sysLog.params.trim() != ''">
- AND params = #{sysLog.params}
- </if>
- <if test="sysLog.time != null and sysLog.time.trim() != ''">
- AND time = #{sysLog.time}
- </if>
- <if test="sysLog.delFlag != null and sysLog.delFlag.trim() != ''">
- AND del_flag = #{sysLog.delFlag}
- </if>
- <if test="sysLog.exception != null and sysLog.exception.trim() != ''">
- AND exception = #{sysLog.exception}
- </if>
- </where>
- </select>
- </mapper>
|