You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

435 lines
23 KiB
XML

4 years ago
<?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.foreverwin.mesnac.common.mapper.HttpLogMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.foreverwin.mesnac.common.model.HttpLog">
<id column="HANDLE" property="handle" />
<result column="SITE" property="site" />
<result column="LOCAL_ADDR" property="localAddr" />
<result column="URL" property="url" />
<result column="METHOD" property="method" />
<result column="CLASS_METHOD" property="classMethod" />
<result column="PARAM_LIST" property="paramList" />
<result column="ERROR" property="error" />
<result column="RESULTS" property="results" />
4 years ago
<result column="RUN_TIME" property="runTime" />
<result column="CREATE_USER" property="createUser" />
4 years ago
<result column="CREATED_DATE_TIME" property="createdDateTime" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
HANDLE, SITE, LOCAL_ADDR, URL, METHOD, CLASS_METHOD, PARAM_LIST, ERROR, RESULTS, RUN_TIME, CREATE_USER, CREATED_DATE_TIME
4 years ago
</sql>
<!-- BaseMapper标准查询/修改/删除 -->
<select id="selectById" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include> FROM Z_HTTP_LOG WHERE HANDLE=#{handle}
</select>
<select id="selectByMap" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include>
FROM Z_HTTP_LOG
<if test="cm!=null and !cm.isEmpty">
<where>
<foreach collection="cm.keys" item="k" separator="AND">
<if test="cm[k] != null">
${k} = #{cm[${k}]}
</if>
</foreach>
</where>
</if>
</select>
<select id="selectBatchIds" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include>
FROM Z_HTTP_LOG WHERE HANDLE IN (
<foreach item="item" index="index" collection="coll" separator=",">#{item}
</foreach>)
</select>
<select id="selectOne" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include> FROM Z_HTTP_LOG
<where>
<if test="ew.entity.handle!=null">
HANDLE=#{ew.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.localAddr!=null"> AND LOCAL_ADDR=#{ew.entity.localAddr}</if>
<if test="ew.entity.url!=null"> AND URL=#{ew.entity.url}</if>
<if test="ew.entity.method!=null"> AND METHOD=#{ew.entity.method}</if>
<if test="ew.entity.classMethod!=null"> AND CLASS_METHOD=#{ew.entity.classMethod}</if>
<if test="ew.entity.paramList!=null"> AND PARAM_LIST=#{ew.entity.paramList}</if>
<if test="ew.entity.error!=null"> AND ERROR=#{ew.entity.error}</if>
<if test="ew.entity.results!=null"> AND RESULTS=#{ew.entity.results}</if>
4 years ago
<if test="ew.entity.runTime!=null"> AND RUN_TIME=#{ew.entity.runTime}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
4 years ago
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
</where>
</select>
<select id="selectCount" resultType="Integer">
SELECT COUNT(1) FROM Z_HTTP_LOG
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.localAddr!=null"> AND LOCAL_ADDR=#{ew.entity.localAddr}</if>
<if test="ew.entity.url!=null"> AND URL=#{ew.entity.url}</if>
<if test="ew.entity.method!=null"> AND METHOD=#{ew.entity.method}</if>
<if test="ew.entity.classMethod!=null"> AND CLASS_METHOD=#{ew.entity.classMethod}</if>
<if test="ew.entity.paramList!=null"> AND PARAM_LIST=#{ew.entity.paramList}</if>
<if test="ew.entity.error!=null"> AND ERROR=#{ew.entity.error}</if>
<if test="ew.entity.results!=null"> AND RESULTS=#{ew.entity.results}</if>
4 years ago
<if test="ew.entity.runTime!=null"> AND RUN_TIME=#{ew.entity.runTime}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
4 years ago
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectList" resultMap="BaseResultMap">
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_HTTP_LOG
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.localAddr!=null"> AND LOCAL_ADDR=#{ew.entity.localAddr}</if>
<if test="ew.entity.url!=null"> AND URL=#{ew.entity.url}</if>
<if test="ew.entity.method!=null"> AND METHOD=#{ew.entity.method}</if>
<if test="ew.entity.classMethod!=null"> AND CLASS_METHOD=#{ew.entity.classMethod}</if>
<if test="ew.entity.paramList!=null"> AND PARAM_LIST=#{ew.entity.paramList}</if>
<if test="ew.entity.error!=null"> AND ERROR=#{ew.entity.error}</if>
<if test="ew.entity.results!=null"> AND RESULTS=#{ew.entity.results}</if>
4 years ago
<if test="ew.entity.runTime!=null"> AND RUN_TIME=#{ew.entity.runTime}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
4 years ago
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectMaps" resultType="HashMap">
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_HTTP_LOG
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.localAddr!=null"> AND LOCAL_ADDR=#{ew.entity.localAddr}</if>
<if test="ew.entity.url!=null"> AND URL=#{ew.entity.url}</if>
<if test="ew.entity.method!=null"> AND METHOD=#{ew.entity.method}</if>
<if test="ew.entity.classMethod!=null"> AND CLASS_METHOD=#{ew.entity.classMethod}</if>
<if test="ew.entity.paramList!=null"> AND PARAM_LIST=#{ew.entity.paramList}</if>
<if test="ew.entity.error!=null"> AND ERROR=#{ew.entity.error}</if>
<if test="ew.entity.results!=null"> AND RESULTS=#{ew.entity.results}</if>
4 years ago
<if test="ew.entity.runTime!=null"> AND RUN_TIME=#{ew.entity.runTime}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
4 years ago
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectObjs" resultType="Object">
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_HTTP_LOG
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.localAddr!=null"> AND LOCAL_ADDR=#{ew.entity.localAddr}</if>
<if test="ew.entity.url!=null"> AND URL=#{ew.entity.url}</if>
<if test="ew.entity.method!=null"> AND METHOD=#{ew.entity.method}</if>
<if test="ew.entity.classMethod!=null"> AND CLASS_METHOD=#{ew.entity.classMethod}</if>
<if test="ew.entity.paramList!=null"> AND PARAM_LIST=#{ew.entity.paramList}</if>
<if test="ew.entity.error!=null"> AND ERROR=#{ew.entity.error}</if>
<if test="ew.entity.results!=null"> AND RESULTS=#{ew.entity.results}</if>
4 years ago
<if test="ew.entity.runTime!=null"> AND RUN_TIME=#{ew.entity.runTime}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
4 years ago
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectPage" resultMap="BaseResultMap">
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_HTTP_LOG
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.localAddr!=null"> AND LOCAL_ADDR=#{ew.entity.localAddr}</if>
<if test="ew.entity.url!=null"> AND URL=#{ew.entity.url}</if>
<if test="ew.entity.method!=null"> AND METHOD=#{ew.entity.method}</if>
<if test="ew.entity.classMethod!=null"> AND CLASS_METHOD=#{ew.entity.classMethod}</if>
<if test="ew.entity.paramList!=null"> AND PARAM_LIST=#{ew.entity.paramList}</if>
<if test="ew.entity.error!=null"> AND ERROR=#{ew.entity.error}</if>
<if test="ew.entity.results!=null"> AND RESULTS=#{ew.entity.results}</if>
4 years ago
<if test="ew.entity.runTime!=null"> AND RUN_TIME=#{ew.entity.runTime}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
4 years ago
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectMapsPage" resultType="HashMap">
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_HTTP_LOG
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.localAddr!=null"> AND LOCAL_ADDR=#{ew.entity.localAddr}</if>
<if test="ew.entity.url!=null"> AND URL=#{ew.entity.url}</if>
<if test="ew.entity.method!=null"> AND METHOD=#{ew.entity.method}</if>
<if test="ew.entity.classMethod!=null"> AND CLASS_METHOD=#{ew.entity.classMethod}</if>
<if test="ew.entity.paramList!=null"> AND PARAM_LIST=#{ew.entity.paramList}</if>
<if test="ew.entity.error!=null"> AND ERROR=#{ew.entity.error}</if>
<if test="ew.entity.results!=null"> AND RESULTS=#{ew.entity.results}</if>
4 years ago
<if test="ew.entity.runTime!=null"> AND RUN_TIME=#{ew.entity.runTime}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
4 years ago
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<insert id="insert" parameterType="com.foreverwin.mesnac.common.model.HttpLog">
INSERT INTO Z_HTTP_LOG
<trim prefix="(" suffix=")" suffixOverrides=",">
HANDLE,
<if test="site!=null">SITE,</if>
<if test="localAddr!=null">LOCAL_ADDR,</if>
<if test="url!=null">URL,</if>
<if test="method!=null">METHOD,</if>
<if test="classMethod!=null">CLASS_METHOD,</if>
<if test="paramList!=null">PARAM_LIST,</if>
<if test="error!=null">ERROR,</if>
<if test="results!=null">RESULTS,</if>
4 years ago
<if test="runTime!=null">RUN_TIME,</if>
<if test="createUser!=null">CREATE_USER,</if>
4 years ago
<if test="createdDateTime!=null">CREATED_DATE_TIME,</if>
</trim> VALUES
<trim prefix="(" suffix=")" suffixOverrides=",">
#{handle},
<if test="site!=null">#{site},</if>
<if test="localAddr!=null">#{localAddr},</if>
<if test="url!=null">#{url},</if>
<if test="method!=null">#{method},</if>
<if test="classMethod!=null">#{classMethod},</if>
<if test="paramList!=null">#{paramList},</if>
<if test="error!=null">#{error},</if>
<if test="results!=null">#{results},</if>
4 years ago
<if test="runTime!=null">#{runTime},</if>
<if test="createUser!=null">#{createUser},</if>
4 years ago
<if test="createdDateTime!=null">#{createdDateTime},</if>
</trim>
</insert>
<insert id="insertAllColumn" parameterType="com.foreverwin.mesnac.common.model.HttpLog">
INSERT INTO Z_HTTP_LOG
<trim prefix="(" suffix=")" suffixOverrides=",">
<include refid="Base_Column_List"></include>
</trim> VALUES
<trim prefix="(" suffix=")" suffixOverrides=",">
#{handle},
#{site},
#{localAddr},
#{url},
#{method},
#{classMethod},
#{paramList},
#{error},
#{results},
4 years ago
#{runTime},
#{createUser},
4 years ago
#{createdDateTime},
</trim>
</insert>
<update id="updateById">
UPDATE Z_HTTP_LOG <trim prefix="SET" suffixOverrides=",">
<if test="et.site!=null">SITE=#{et.site},</if>
<if test="et.localAddr!=null">LOCAL_ADDR=#{et.localAddr},</if>
<if test="et.url!=null">URL=#{et.url},</if>
<if test="et.method!=null">METHOD=#{et.method},</if>
<if test="et.classMethod!=null">CLASS_METHOD=#{et.classMethod},</if>
<if test="et.paramList!=null">PARAM_LIST=#{et.paramList},</if>
<if test="et.error!=null">ERROR=#{et.error},</if>
<if test="et.results!=null">RESULTS=#{et.results},</if>
4 years ago
<if test="et.runTime!=null">RUN_TIME=#{et.runTime},</if>
<if test="et.createUser!=null">CREATE_USER=#{et.createUser},</if>
4 years ago
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
</trim> WHERE HANDLE=#{et.handle} <if test="et instanceof java.util.Map"><if test="et.MP_OPTLOCK_VERSION_ORIGINAL!=null">and ${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}</if></if>
</update>
<update id="updateAllColumnById">
UPDATE Z_HTTP_LOG <trim prefix="SET" suffixOverrides=",">
SITE=#{et.site},
LOCAL_ADDR=#{et.localAddr},
URL=#{et.url},
METHOD=#{et.method},
CLASS_METHOD=#{et.classMethod},
PARAM_LIST=#{et.paramList},
ERROR=#{et.error},
RESULTS=#{et.results},
4 years ago
RUN_TIME=#{et.runTime},
CREATE_USER=#{et.createUser},
4 years ago
CREATED_DATE_TIME=#{et.createdDateTime},
</trim> WHERE HANDLE=#{et.handle} <if test="et instanceof java.util.Map"><if test="et.MP_OPTLOCK_VERSION_ORIGINAL!=null">and ${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}</if></if>
</update>
<update id="update">
UPDATE Z_HTTP_LOG <trim prefix="SET" suffixOverrides=",">
<if test="et.site!=null">SITE=#{et.site},</if>
<if test="et.localAddr!=null">LOCAL_ADDR=#{et.localAddr},</if>
<if test="et.url!=null">URL=#{et.url},</if>
<if test="et.method!=null">METHOD=#{et.method},</if>
<if test="et.classMethod!=null">CLASS_METHOD=#{et.classMethod},</if>
<if test="et.paramList!=null">PARAM_LIST=#{et.paramList},</if>
<if test="et.error!=null">ERROR=#{et.error},</if>
<if test="et.results!=null">RESULTS=#{et.results},</if>
4 years ago
<if test="et.runTime!=null">RUN_TIME=#{et.runTime},</if>
<if test="et.createUser!=null">CREATE_USER=#{et.createUser},</if>
4 years ago
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
</trim>
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
HANDLE=#{ew.entity.handle}
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.localAddr!=null"> AND LOCAL_ADDR=#{ew.entity.localAddr}</if>
<if test="ew.entity.url!=null"> AND URL=#{ew.entity.url}</if>
<if test="ew.entity.method!=null"> AND METHOD=#{ew.entity.method}</if>
<if test="ew.entity.classMethod!=null"> AND CLASS_METHOD=#{ew.entity.classMethod}</if>
<if test="ew.entity.paramList!=null"> AND PARAM_LIST=#{ew.entity.paramList}</if>
<if test="ew.entity.error!=null"> AND ERROR=#{ew.entity.error}</if>
<if test="ew.entity.results!=null"> AND RESULTS=#{ew.entity.results}</if>
4 years ago
<if test="ew.entity.runTime!=null"> AND RUN_TIME=#{ew.entity.runTime}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
4 years ago
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</update>
<delete id="deleteById">
DELETE FROM Z_HTTP_LOG WHERE HANDLE=#{handle}
</delete>
<delete id="deleteByMap">
DELETE FROM Z_HTTP_LOG
<if test="cm!=null and !cm.isEmpty">
<where>
<foreach collection="cm.keys" item="k" separator="AND">
<if test="cm[k] != null">
${k} = #{cm[${k}]}
</if>
</foreach>
</where>
</if>
</delete>
<delete id="delete">
DELETE FROM Z_HTTP_LOG
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.localAddr!=null"> AND LOCAL_ADDR=#{ew.entity.localAddr}</if>
<if test="ew.entity.url!=null"> AND URL=#{ew.entity.url}</if>
<if test="ew.entity.method!=null"> AND METHOD=#{ew.entity.method}</if>
<if test="ew.entity.classMethod!=null"> AND CLASS_METHOD=#{ew.entity.classMethod}</if>
<if test="ew.entity.paramList!=null"> AND PARAM_LIST=#{ew.entity.paramList}</if>
<if test="ew.entity.error!=null"> AND ERROR=#{ew.entity.error}</if>
<if test="ew.entity.results!=null"> AND RESULTS=#{ew.entity.results}</if>
4 years ago
<if test="ew.entity.runTime!=null"> AND RUN_TIME=#{ew.entity.runTime}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
4 years ago
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</delete>
<delete id="deleteBatchIds">
DELETE FROM Z_HTTP_LOG WHERE HANDLE IN (
<foreach item="item" index="index" collection="coll" separator=",">#{item}
</foreach>)
</delete>
<!-- BaseMapper标准查询/修改/删除 -->
</mapper>