All Downloads are FREE. Search and download functionalities are using the official Maven repository.

mappers.OperationLogEntityMapper.xml Maven / Gradle / Ivy

There is a newer version: 2.0.0
Show newest version
<?xml version="1.0" encoding="UTF-8"?>
<!--
    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements. See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership. The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License. You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
-->

<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.apache.inlong.manager.dao.mapper.OperationLogEntityMapper">
    <resultMap id="BaseResultMap" type="org.apache.inlong.manager.dao.entity.OperationLogEntity">
        <id column="id" jdbcType="INTEGER" property="id"/>
        <result column="authentication_type" jdbcType="VARCHAR" property="authenticationType"/>
        <result column="operation_type" jdbcType="VARCHAR" property="operationType"/>
        <result column="http_method" jdbcType="VARCHAR" property="httpMethod"/>
        <result column="invoke_method" jdbcType="VARCHAR" property="invokeMethod"/>
        <result column="operator" jdbcType="VARCHAR" property="operator"/>
        <result column="proxy" jdbcType="VARCHAR" property="proxy"/>
        <result column="request_url" jdbcType="VARCHAR" property="requestUrl"/>
        <result column="remote_address" jdbcType="VARCHAR" property="remoteAddress"/>
        <result column="cost_time" jdbcType="BIGINT" property="costTime"/>
        <result column="status" jdbcType="TINYINT" property="status"/>
        <result column="request_time" jdbcType="TIMESTAMP" property="requestTime"/>
        <result column="body" jdbcType="LONGVARCHAR" property="body"/>
        <result column="param" jdbcType="LONGVARCHAR" property="param"/>
        <result column="err_msg" jdbcType="LONGVARCHAR" property="errMsg"/>
    </resultMap>
    <sql id="Base_Column_List">
        id, authentication_type, operation_type, http_method, invoke_method, operator,
        proxy, request_url, remote_address, cost_time, status, request_time, body, param, err_msg
    </sql>

    <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List"/>
        from operation_log
        where id = #{id,jdbcType=INTEGER}
    </select>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
        delete
        from operation_log
        where id = #{id,jdbcType=INTEGER}
    </delete>
    <insert id="insert" parameterType="org.apache.inlong.manager.dao.entity.OperationLogEntity">
        insert into operation_log (id, authentication_type, operation_type,
                                   http_method, invoke_method, operator,
                                   proxy, request_url, remote_address,
                                   cost_time, status, request_time,
                                   body, param, err_msg)
        values (#{id,jdbcType=INTEGER}, #{authenticationType,jdbcType=VARCHAR}, #{operationType,jdbcType=VARCHAR},
                #{httpMethod,jdbcType=VARCHAR}, #{invokeMethod,jdbcType=VARCHAR}, #{operator,jdbcType=VARCHAR},
                #{proxy,jdbcType=VARCHAR}, #{requestUrl,jdbcType=VARCHAR}, #{remoteAddress,jdbcType=VARCHAR},
                #{costTime,jdbcType=BIGINT}, #{status,jdbcType=TINYINT}, #{requestTime,jdbcType=TIMESTAMP},
                #{body,jdbcType=LONGVARCHAR}, #{param,jdbcType=LONGVARCHAR}, #{errMsg,jdbcType=LONGVARCHAR})
    </insert>
    <insert id="insertBatch">
        insert into operation_log (id, authentication_type, operation_type,
        http_method, invoke_method, operator,
        proxy, request_url, remote_address,
        cost_time, status, request_time,
        body, param, err_msg
        )
        VALUES
        <foreach collection="list" item="log" separator=",">
            (
            #{log.id,jdbcType=INTEGER}, #{log.authenticationType,jdbcType=VARCHAR},
            #{log.operationType,jdbcType=VARCHAR},
            #{log.httpMethod,jdbcType=VARCHAR}, #{log.invokeMethod,jdbcType=VARCHAR},
            #{log.operator,jdbcType=VARCHAR},
            #{log.proxy,jdbcType=VARCHAR}, #{log.requestUrl,jdbcType=VARCHAR},
            #{log.remoteAddress,jdbcType=VARCHAR},
            #{log.costTime,jdbcType=BIGINT}, #{log.status,jdbcType=TINYINT},
            #{log.requestTime,jdbcType=TIMESTAMP},
            #{log.body,jdbcType=LONGVARCHAR}, #{log.param,jdbcType=LONGVARCHAR},
            #{log.errMsg,jdbcType=LONGVARCHAR}
            )
        </foreach>
    </insert>
    <insert id="insertSelective"
            parameterType="org.apache.inlong.manager.dao.entity.OperationLogEntity">
        insert into operation_log
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">
                id,
            </if>
            <if test="authenticationType != null">
                authentication_type,
            </if>
            <if test="operationType != null">
                operation_type,
            </if>
            <if test="httpMethod != null">
                http_method,
            </if>
            <if test="invokeMethod != null">
                invoke_method,
            </if>
            <if test="operator != null">
                operator,
            </if>
            <if test="proxy != null">
                proxy,
            </if>
            <if test="requestUrl != null">
                request_url,
            </if>
            <if test="remoteAddress != null">
                remote_address,
            </if>
            <if test="costTime != null">
                cost_time,
            </if>
            <if test="status != null">
                status,
            </if>
            <if test="requestTime != null">
                request_time,
            </if>
            <if test="body != null">
                body,
            </if>
            <if test="param != null">
                param,
            </if>
            <if test="errMsg != null">
                err_msg,
            </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="id != null">
                #{id,jdbcType=INTEGER},
            </if>
            <if test="authenticationType != null">
                #{authenticationType,jdbcType=VARCHAR},
            </if>
            <if test="operationType != null">
                #{operationType,jdbcType=VARCHAR},
            </if>
            <if test="httpMethod != null">
                #{httpMethod,jdbcType=VARCHAR},
            </if>
            <if test="invokeMethod != null">
                #{invokeMethod,jdbcType=VARCHAR},
            </if>
            <if test="operator != null">
                #{operator,jdbcType=VARCHAR},
            </if>
            <if test="proxy != null">
                #{proxy,jdbcType=VARCHAR},
            </if>
            <if test="requestUrl != null">
                #{requestUrl,jdbcType=VARCHAR},
            </if>
            <if test="remoteAddress != null">
                #{remoteAddress,jdbcType=VARCHAR},
            </if>
            <if test="costTime != null">
                #{costTime,jdbcType=BIGINT},
            </if>
            <if test="status != null">
                #{status,jdbcType=TINYINT},
            </if>
            <if test="requestTime != null">
                #{requestTime,jdbcType=TIMESTAMP},
            </if>
            <if test="body != null">
                #{body,jdbcType=LONGVARCHAR},
            </if>
            <if test="param != null">
                #{param,jdbcType=LONGVARCHAR},
            </if>
            <if test="errMsg != null">
                #{errMsg,jdbcType=LONGVARCHAR},
            </if>
        </trim>
    </insert>
    <update id="updateByPrimaryKeySelective"
            parameterType="org.apache.inlong.manager.dao.entity.OperationLogEntity">
        update operation_log
        <set>
            <if test="authenticationType != null">
                authentication_type = #{authenticationType,jdbcType=VARCHAR},
            </if>
            <if test="operationType != null">
                operation_type = #{operationType,jdbcType=VARCHAR},
            </if>
            <if test="httpMethod != null">
                http_method = #{httpMethod,jdbcType=VARCHAR},
            </if>
            <if test="invokeMethod != null">
                invoke_method = #{invokeMethod,jdbcType=VARCHAR},
            </if>
            <if test="operator != null">
                operator = #{operator,jdbcType=VARCHAR},
            </if>
            <if test="proxy != null">
                proxy = #{proxy,jdbcType=VARCHAR},
            </if>
            <if test="requestUrl != null">
                request_url = #{requestUrl,jdbcType=VARCHAR},
            </if>
            <if test="remoteAddress != null">
                remote_address = #{remoteAddress,jdbcType=VARCHAR},
            </if>
            <if test="costTime != null">
                cost_time = #{costTime,jdbcType=BIGINT},
            </if>
            <if test="status != null">
                status = #{status,jdbcType=TINYINT},
            </if>
            <if test="requestTime != null">
                request_time = #{requestTime,jdbcType=TIMESTAMP},
            </if>
            <if test="body != null">
                body = #{body,jdbcType=LONGVARCHAR},
            </if>
            <if test="param != null">
                param = #{param,jdbcType=LONGVARCHAR},
            </if>
            <if test="errMsg != null">
                err_msg = #{errMsg,jdbcType=LONGVARCHAR},
            </if>
        </set>
        where id = #{id,jdbcType=INTEGER}
    </update>
    <update id="updateByPrimaryKey"
            parameterType="org.apache.inlong.manager.dao.entity.OperationLogEntity">
        update operation_log
        set authentication_type = #{authenticationType,jdbcType=VARCHAR},
            operation_type      = #{operationType,jdbcType=VARCHAR},
            http_method         = #{httpMethod,jdbcType=VARCHAR},
            invoke_method       = #{invokeMethod,jdbcType=VARCHAR},
            operator            = #{operator,jdbcType=VARCHAR},
            proxy               = #{proxy,jdbcType=VARCHAR},
            request_url         = #{requestUrl,jdbcType=VARCHAR},
            remote_address      = #{remoteAddress,jdbcType=VARCHAR},
            cost_time           = #{costTime,jdbcType=BIGINT},
            status              = #{status,jdbcType=TINYINT},
            request_time        = #{requestTime,jdbcType=TIMESTAMP},
            body                = #{body,jdbcType=LONGVARCHAR},
            param               = #{param,jdbcType=LONGVARCHAR},
            err_msg             = #{errMsg,jdbcType=LONGVARCHAR}
        where id = #{id,jdbcType=INTEGER}
    </update>
</mapper>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy