237 lines
15 KiB
XML
237 lines
15 KiB
XML
<?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.zhwl.api.common.log.mapper.ZdyApiLogMapper">
|
|
|
|
<resultMap type="ZdyApiLog" id="ZdyApiLogResult">
|
|
<result property="id" column="id" />
|
|
<result property="name" column="name" />
|
|
<result property="sign" column="sign" />
|
|
<result property="url" column="url" />
|
|
<result property="signDeclaringType" column="sign_declaring_type" />
|
|
<result property="signName" column="sign_name" />
|
|
<result property="reqProtocol" column="req_protocol" />
|
|
<result property="reqScheme" column="req_scheme" />
|
|
<result property="reqServerName" column="req_server_name" />
|
|
<result property="reqServerPort" column="req_server_port" />
|
|
<result property="reqRemoteAddr" column="req_remote_addr" />
|
|
<result property="reqRemoteHost" column="req_remote_host" />
|
|
<result property="reqEncoding" column="req_encoding" />
|
|
<result property="reqContentLength" column="req_content_length" />
|
|
<result property="reqContentType" column="req_content_type" />
|
|
<result property="reqAuthType" column="req_auth_type" />
|
|
<result property="reqMethod" column="req_method" />
|
|
<result property="reqPathInfo" column="req_path_info" />
|
|
<result property="reqPathTrans" column="req_path_trans" />
|
|
<result property="reqQueryString" column="req_query_string" />
|
|
<result property="reqRemoteUser" column="req_remote_user" />
|
|
<result property="reqSessionId" column="req_session_id" />
|
|
<result property="reqUri" column="req_uri" />
|
|
<result property="reqPath" column="req_path" />
|
|
<result property="reqTime" column="req_time" />
|
|
<result property="reqMsg" column="req_msg" />
|
|
<result property="respTime" column="resp_time" />
|
|
<result property="respMsg" column="resp_msg" />
|
|
<result property="respStatus" column="resp_status" />
|
|
<result property="respErrorMsg" column="resp_error_msg" />
|
|
<result property="systemVersion" column="system_version" />
|
|
<result property="areaCode" column="area_code" />
|
|
<result property="ipAddr" column="ip_addr" />
|
|
<result property="macAddr" column="mac_addr" />
|
|
<result property="location" column="location" />
|
|
<result property="reqPattern" column="req_pattern" />
|
|
<result property="reqSource" column="req_source" />
|
|
<result property="remark" column="remark" />
|
|
</resultMap>
|
|
|
|
<sql id="selectZdyApiLogVo">
|
|
select id, name, sign, url, sign_declaring_type, sign_name, req_protocol, req_scheme, req_server_name, req_server_port, req_remote_addr, req_remote_host, req_encoding, req_content_length, req_content_type, req_auth_type, req_method, req_path_info, req_path_trans, req_query_string, req_remote_user, req_session_id, req_uri, req_path, req_time, req_msg, resp_time, resp_msg, resp_status, resp_error_msg, system_version, area_code, ip_addr, mac_addr, location, req_pattern, req_source, remark from zdy_api_log
|
|
</sql>
|
|
|
|
<select id="selectZdyApiLogList" parameterType="ZdyApiLog" resultMap="ZdyApiLogResult">
|
|
<include refid="selectZdyApiLogVo"/>
|
|
<where>
|
|
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
|
<if test="sign != null and sign != ''"> and sign = #{sign}</if>
|
|
<if test="url != null and url != ''"> and url = #{url}</if>
|
|
<if test="signDeclaringType != null and signDeclaringType != ''"> and sign_declaring_type = #{signDeclaringType}</if>
|
|
<if test="signName != null and signName != ''"> and sign_name like concat('%', #{signName}, '%')</if>
|
|
<if test="reqProtocol != null and reqProtocol != ''"> and req_protocol = #{reqProtocol}</if>
|
|
<if test="reqScheme != null and reqScheme != ''"> and req_scheme = #{reqScheme}</if>
|
|
<if test="reqServerName != null and reqServerName != ''"> and req_server_name like concat('%', #{reqServerName}, '%')</if>
|
|
<if test="reqServerPort != null and reqServerPort != ''"> and req_server_port = #{reqServerPort}</if>
|
|
<if test="reqRemoteAddr != null and reqRemoteAddr != ''"> and req_remote_addr = #{reqRemoteAddr}</if>
|
|
<if test="reqRemoteHost != null and reqRemoteHost != ''"> and req_remote_host = #{reqRemoteHost}</if>
|
|
<if test="reqEncoding != null and reqEncoding != ''"> and req_encoding = #{reqEncoding}</if>
|
|
<if test="reqContentLength != null and reqContentLength != ''"> and req_content_length = #{reqContentLength}</if>
|
|
<if test="reqContentType != null and reqContentType != ''"> and req_content_type = #{reqContentType}</if>
|
|
<if test="reqAuthType != null and reqAuthType != ''"> and req_auth_type = #{reqAuthType}</if>
|
|
<if test="reqMethod != null and reqMethod != ''"> and req_method = #{reqMethod}</if>
|
|
<if test="reqPathInfo != null and reqPathInfo != ''"> and req_path_info = #{reqPathInfo}</if>
|
|
<if test="reqPathTrans != null and reqPathTrans != ''"> and req_path_trans = #{reqPathTrans}</if>
|
|
<if test="reqQueryString != null and reqQueryString != ''"> and req_query_string = #{reqQueryString}</if>
|
|
<if test="reqRemoteUser != null and reqRemoteUser != ''"> and req_remote_user = #{reqRemoteUser}</if>
|
|
<if test="reqSessionId != null and reqSessionId != ''"> and req_session_id = #{reqSessionId}</if>
|
|
<if test="reqUri != null and reqUri != ''"> and req_uri = #{reqUri}</if>
|
|
<if test="reqPath != null and reqPath != ''"> and req_path = #{reqPath}</if>
|
|
<if test="reqTime != null "> and req_time = #{reqTime}</if>
|
|
<if test="reqMsg != null and reqMsg != ''"> and req_msg = #{reqMsg}</if>
|
|
<if test="respTime != null "> and resp_time = #{respTime}</if>
|
|
<if test="respMsg != null and respMsg != ''"> and resp_msg = #{respMsg}</if>
|
|
<if test="respStatus != null and respStatus != ''"> and resp_status = #{respStatus}</if>
|
|
<if test="respErrorMsg != null and respErrorMsg != ''"> and resp_error_msg = #{respErrorMsg}</if>
|
|
<if test="systemVersion != null and systemVersion != ''"> and system_version = #{systemVersion}</if>
|
|
<if test="areaCode != null and areaCode != ''"> and area_code = #{areaCode}</if>
|
|
<if test="ipAddr != null and ipAddr != ''"> and ip_addr = #{ipAddr}</if>
|
|
<if test="macAddr != null and macAddr != ''"> and mac_addr = #{macAddr}</if>
|
|
<if test="location != null and location != ''"> and location = #{location}</if>
|
|
<if test="reqPattern != null and reqPattern != ''"> and req_pattern = #{reqPattern}</if>
|
|
<if test="reqSource != null and reqSource != ''"> and req_source = #{reqSource}</if>
|
|
</where>
|
|
order by id desc
|
|
</select>
|
|
|
|
<select id="selectZdyApiLogById" parameterType="Long" resultMap="ZdyApiLogResult">
|
|
<include refid="selectZdyApiLogVo"/>
|
|
where id = #{id}
|
|
</select>
|
|
|
|
<insert id="insertZdyApiLog" parameterType="ZdyApiLog" useGeneratedKeys="true" keyProperty="id">
|
|
insert into zdy_api_log
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="name != null">name,</if>
|
|
<if test="sign != null">sign,</if>
|
|
<if test="url != null">url,</if>
|
|
<if test="signDeclaringType != null">sign_declaring_type,</if>
|
|
<if test="signName != null">sign_name,</if>
|
|
<if test="reqProtocol != null">req_protocol,</if>
|
|
<if test="reqScheme != null">req_scheme,</if>
|
|
<if test="reqServerName != null">req_server_name,</if>
|
|
<if test="reqServerPort != null">req_server_port,</if>
|
|
<if test="reqRemoteAddr != null">req_remote_addr,</if>
|
|
<if test="reqRemoteHost != null">req_remote_host,</if>
|
|
<if test="reqEncoding != null">req_encoding,</if>
|
|
<if test="reqContentLength != null">req_content_length,</if>
|
|
<if test="reqContentType != null">req_content_type,</if>
|
|
<if test="reqAuthType != null">req_auth_type,</if>
|
|
<if test="reqMethod != null">req_method,</if>
|
|
<if test="reqPathInfo != null">req_path_info,</if>
|
|
<if test="reqPathTrans != null">req_path_trans,</if>
|
|
<if test="reqQueryString != null">req_query_string,</if>
|
|
<if test="reqRemoteUser != null">req_remote_user,</if>
|
|
<if test="reqSessionId != null">req_session_id,</if>
|
|
<if test="reqUri != null">req_uri,</if>
|
|
<if test="reqPath != null">req_path,</if>
|
|
<if test="reqTime != null">req_time,</if>
|
|
<if test="reqMsg != null">req_msg,</if>
|
|
<if test="respTime != null">resp_time,</if>
|
|
<if test="respMsg != null">resp_msg,</if>
|
|
<if test="respStatus != null">resp_status,</if>
|
|
<if test="respErrorMsg != null">resp_error_msg,</if>
|
|
<if test="systemVersion != null">system_version,</if>
|
|
<if test="areaCode != null">area_code,</if>
|
|
<if test="ipAddr != null">ip_addr,</if>
|
|
<if test="macAddr != null">mac_addr,</if>
|
|
<if test="location != null">location,</if>
|
|
<if test="reqPattern != null">req_pattern,</if>
|
|
<if test="reqSource != null">req_source,</if>
|
|
<if test="remark != null">remark,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="name != null">#{name},</if>
|
|
<if test="sign != null">#{sign},</if>
|
|
<if test="url != null">#{url},</if>
|
|
<if test="signDeclaringType != null">#{signDeclaringType},</if>
|
|
<if test="signName != null">#{signName},</if>
|
|
<if test="reqProtocol != null">#{reqProtocol},</if>
|
|
<if test="reqScheme != null">#{reqScheme},</if>
|
|
<if test="reqServerName != null">#{reqServerName},</if>
|
|
<if test="reqServerPort != null">#{reqServerPort},</if>
|
|
<if test="reqRemoteAddr != null">#{reqRemoteAddr},</if>
|
|
<if test="reqRemoteHost != null">#{reqRemoteHost},</if>
|
|
<if test="reqEncoding != null">#{reqEncoding},</if>
|
|
<if test="reqContentLength != null">#{reqContentLength},</if>
|
|
<if test="reqContentType != null">#{reqContentType},</if>
|
|
<if test="reqAuthType != null">#{reqAuthType},</if>
|
|
<if test="reqMethod != null">#{reqMethod},</if>
|
|
<if test="reqPathInfo != null">#{reqPathInfo},</if>
|
|
<if test="reqPathTrans != null">#{reqPathTrans},</if>
|
|
<if test="reqQueryString != null">#{reqQueryString},</if>
|
|
<if test="reqRemoteUser != null">#{reqRemoteUser},</if>
|
|
<if test="reqSessionId != null">#{reqSessionId},</if>
|
|
<if test="reqUri != null">#{reqUri},</if>
|
|
<if test="reqPath != null">#{reqPath},</if>
|
|
<if test="reqTime != null">#{reqTime},</if>
|
|
<if test="reqMsg != null">#{reqMsg},</if>
|
|
<if test="respTime != null">#{respTime},</if>
|
|
<if test="respMsg != null">#{respMsg},</if>
|
|
<if test="respStatus != null">#{respStatus},</if>
|
|
<if test="respErrorMsg != null">#{respErrorMsg},</if>
|
|
<if test="systemVersion != null">#{systemVersion},</if>
|
|
<if test="areaCode != null">#{areaCode},</if>
|
|
<if test="ipAddr != null">#{ipAddr},</if>
|
|
<if test="macAddr != null">#{macAddr},</if>
|
|
<if test="location != null">#{location},</if>
|
|
<if test="reqPattern != null">#{reqPattern},</if>
|
|
<if test="reqSource != null">#{reqSource},</if>
|
|
<if test="remark != null">#{remark},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateZdyApiLog" parameterType="ZdyApiLog">
|
|
update zdy_api_log
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="name != null">name = #{name},</if>
|
|
<if test="sign != null">sign = #{sign},</if>
|
|
<if test="url != null">url = #{url},</if>
|
|
<if test="signDeclaringType != null">sign_declaring_type = #{signDeclaringType},</if>
|
|
<if test="signName != null">sign_name = #{signName},</if>
|
|
<if test="reqProtocol != null">req_protocol = #{reqProtocol},</if>
|
|
<if test="reqScheme != null">req_scheme = #{reqScheme},</if>
|
|
<if test="reqServerName != null">req_server_name = #{reqServerName},</if>
|
|
<if test="reqServerPort != null">req_server_port = #{reqServerPort},</if>
|
|
<if test="reqRemoteAddr != null">req_remote_addr = #{reqRemoteAddr},</if>
|
|
<if test="reqRemoteHost != null">req_remote_host = #{reqRemoteHost},</if>
|
|
<if test="reqEncoding != null">req_encoding = #{reqEncoding},</if>
|
|
<if test="reqContentLength != null">req_content_length = #{reqContentLength},</if>
|
|
<if test="reqContentType != null">req_content_type = #{reqContentType},</if>
|
|
<if test="reqAuthType != null">req_auth_type = #{reqAuthType},</if>
|
|
<if test="reqMethod != null">req_method = #{reqMethod},</if>
|
|
<if test="reqPathInfo != null">req_path_info = #{reqPathInfo},</if>
|
|
<if test="reqPathTrans != null">req_path_trans = #{reqPathTrans},</if>
|
|
<if test="reqQueryString != null">req_query_string = #{reqQueryString},</if>
|
|
<if test="reqRemoteUser != null">req_remote_user = #{reqRemoteUser},</if>
|
|
<if test="reqSessionId != null">req_session_id = #{reqSessionId},</if>
|
|
<if test="reqUri != null">req_uri = #{reqUri},</if>
|
|
<if test="reqPath != null">req_path = #{reqPath},</if>
|
|
<if test="reqTime != null">req_time = #{reqTime},</if>
|
|
<if test="reqMsg != null">req_msg = #{reqMsg},</if>
|
|
<if test="respTime != null">resp_time = #{respTime},</if>
|
|
<if test="respMsg != null">resp_msg = #{respMsg},</if>
|
|
<if test="respStatus != null">resp_status = #{respStatus},</if>
|
|
<if test="respErrorMsg != null">resp_error_msg = #{respErrorMsg},</if>
|
|
<if test="systemVersion != null">system_version = #{systemVersion},</if>
|
|
<if test="areaCode != null">area_code = #{areaCode},</if>
|
|
<if test="ipAddr != null">ip_addr = #{ipAddr},</if>
|
|
<if test="macAddr != null">mac_addr = #{macAddr},</if>
|
|
<if test="location != null">location = #{location},</if>
|
|
<if test="reqPattern != null">req_pattern = #{reqPattern},</if>
|
|
<if test="reqSource != null">req_source = #{reqSource},</if>
|
|
<if test="remark != null">remark = #{remark},</if>
|
|
</trim>
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<delete id="deleteZdyApiLogById" parameterType="Long">
|
|
delete from zdy_api_log where id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteZdyApiLogByIds" parameterType="String">
|
|
delete from zdy_api_log where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
</mapper>
|