| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- <?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.fs.proxy.mapper.ProxyOperLogMapper">
- <resultMap id="ProxyOperLogResult" type="com.fs.proxy.domain.ProxyOperLog">
- <id property="operId" column="oper_id"/>
- <result property="proxyId" column="proxy_id"/>
- <result property="proxyName" column="proxy_name"/>
- <result property="title" column="title"/>
- <result property="businessType" column="business_type"/>
- <result property="method" column="method"/>
- <result property="requestMethod" column="request_method"/>
- <result property="operatorType" column="operator_type"/>
- <result property="operName" column="oper_name"/>
- <result property="deptName" column="dept_name"/>
- <result property="operUrl" column="oper_url"/>
- <result property="operIp" column="oper_ip"/>
- <result property="operLocation" column="oper_location"/>
- <result property="operParam" column="oper_param"/>
- <result property="jsonResult" column="json_result"/>
- <result property="status" column="status"/>
- <result property="errorMsg" column="error_msg"/>
- <result property="operTime" column="oper_time"/>
- </resultMap>
- <insert id="insertProxyOperLog" useGeneratedKeys="true" keyProperty="operId">
- insert into proxy_oper_log(proxy_id, title, business_type, method, request_method,
- operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location,
- oper_param, json_result, status, error_msg, oper_time)
- values(#{proxyId}, #{title}, #{businessType}, #{method}, #{requestMethod},
- #{operatorType}, #{operName}, #{deptName}, #{operUrl}, #{operIp}, #{operLocation},
- #{operParam}, #{jsonResult}, #{status}, #{errorMsg}, #{operTime})
- </insert>
- <select id="selectProxyOperLogList" resultMap="ProxyOperLogResult">
- select ol.*, p.proxy_name as proxy_name
- from proxy_oper_log ol
- left join proxy p on p.proxy_id = ol.proxy_id
- <where>
- <if test="proxyId != null">and ol.proxy_id = #{proxyId}</if>
- <if test="title != null and title != ''">and ol.title like concat('%', #{title}, '%')</if>
- <if test="operName != null and operName != ''">and ol.oper_name like concat('%', #{operName}, '%')</if>
- <if test="status != null">and ol.status = #{status}</if>
- <if test="beginTime != null and beginTime != ''">and ol.oper_time >= #{beginTime}</if>
- <if test="endTime != null and endTime != ''">and ol.oper_time <= #{endTime}</if>
- </where>
- order by ol.oper_time desc
- </select>
- <select id="selectProxyOperLogById" resultMap="ProxyOperLogResult">
- select ol.*, p.proxy_name as proxy_name from proxy_oper_log ol
- left join proxy p on p.proxy_id = ol.proxy_id
- where ol.oper_id = #{operId}
- </select>
- <delete id="deleteProxyOperLogByIds">
- delete from proxy_oper_log where oper_id in
- <foreach collection="array" item="operId" open="(" separator="," close=")">#{operId}</foreach>
- </delete>
- <delete id="deleteProxyOperLogById">delete from proxy_oper_log where oper_id = #{operId}</delete>
- </mapper>
|