<?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.newfiber.api.pc.dao.EventsManage.EventTraceDao" > <resultMap id="BaseResultMap" type="com.newfiber.api.pc.model.EventsManage.EventTrace" > <id column="Serial" property="serial" jdbcType="BIGINT" /> <result column="Event_No" property="eventNo" jdbcType="VARCHAR" /> <result column="User_No" property="userNo" jdbcType="VARCHAR" /> <result column="Create_Time" property="createTime" jdbcType="TIMESTAMP" /> <result column="Data_State" property="dataState" jdbcType="INTEGER" /> </resultMap> <sql id="Example_Where_Clause" > <where > <foreach collection="oredCriteria" item="criteria" separator="or" > <if test="criteria.valid" > <trim prefix="(" suffix=")" prefixOverrides="and" > <foreach collection="criteria.criteria" item="criterion" > <choose > <when test="criterion.noValue" > and ${criterion.condition} </when> <when test="criterion.singleValue" > and ${criterion.condition} #{criterion.value} </when> <when test="criterion.betweenValue" > and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} </when> <when test="criterion.listValue" > and ${criterion.condition} <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," > #{listItem} </foreach> </when> </choose> </foreach> </trim> </if> </foreach> </where> </sql> <sql id="Update_By_Example_Where_Clause" > <where > <foreach collection="example.oredCriteria" item="criteria" separator="or" > <if test="criteria.valid" > <trim prefix="(" suffix=")" prefixOverrides="and" > <foreach collection="criteria.criteria" item="criterion" > <choose > <when test="criterion.noValue" > and ${criterion.condition} </when> <when test="criterion.singleValue" > and ${criterion.condition} #{criterion.value} </when> <when test="criterion.betweenValue" > and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} </when> <when test="criterion.listValue" > and ${criterion.condition} <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," > #{listItem} </foreach> </when> </choose> </foreach> </trim> </if> </foreach> </where> </sql> <sql id="Base_Column_List" > <if test="fields == null" > Serial, Event_No, User_No, Create_Time, Data_State </if> <if test="fields != null" > ${fields} </if> </sql> <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.newfiber.api.pc.model.EventsManage.EventTraceQuery" > select <if test="distinct" > distinct </if> <include refid="Base_Column_List" /> from event_trace <if test="_parameter != null" > <include refid="Example_Where_Clause" /> </if> <if test="orderByClause != null" > order by ${orderByClause} </if> <if test="startRow != null" > limit #{startRow} , #{pageSize} </if> </select> <delete id="deleteByExample" parameterType="com.newfiber.api.pc.model.EventsManage.EventTraceQuery" > delete from event_trace <if test="_parameter != null" > <include refid="Example_Where_Clause" /> </if> </delete> <insert id="insertSelective" parameterType="com.newfiber.api.pc.model.EventsManage.EventTrace" > insert into event_trace <trim prefix="(" suffix=")" suffixOverrides="," > <if test="serial != null" > Serial, </if> <if test="eventNo != null" > Event_No, </if> <if test="userNo != null" > User_No, </if> <if test="createTime != null" > Create_Time, </if> <if test="dataState != null" > Data_State, </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides="," > <if test="serial != null" > #{serial,jdbcType=BIGINT}, </if> <if test="eventNo != null" > #{eventNo,jdbcType=VARCHAR}, </if> <if test="userNo != null" > #{userNo,jdbcType=VARCHAR}, </if> <if test="createTime != null" > #{createTime,jdbcType=TIMESTAMP}, </if> <if test="dataState != null" > #{dataState,jdbcType=INTEGER}, </if> </trim> </insert> <select id="countByExample" parameterType="com.newfiber.api.pc.model.EventsManage.EventTraceQuery" resultType="java.lang.Integer" > select count(*) from event_trace <if test="_parameter != null" > <include refid="Example_Where_Clause" /> </if> </select> <update id="updateByExampleSelective" parameterType="map" > update event_trace <set > <if test="record.serial != null" > Serial = #{record.serial,jdbcType=BIGINT}, </if> <if test="record.eventNo != null" > Event_No = #{record.eventNo,jdbcType=VARCHAR}, </if> <if test="record.userNo != null" > User_No = #{record.userNo,jdbcType=VARCHAR}, </if> <if test="record.createTime != null" > Create_Time = #{record.createTime,jdbcType=TIMESTAMP}, </if> <if test="record.dataState != null" > Data_State = #{record.dataState,jdbcType=INTEGER}, </if> </set> <if test="_parameter != null" > <include refid="Update_By_Example_Where_Clause" /> </if> </update> </mapper>