TpEEmployeeAbnormalStaTailMapper.xml 14.3 KB
<?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.zteits.park.mapper.TpEEmployeeAbnormalStaTailMapper">
  <resultMap id="BaseResultMap" type="com.zteits.park.domain.TpEEmployeeAbnormalStaTail">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="record_id" jdbcType="BIGINT" property="recordId" />
    <result column="static_date" jdbcType="DATE" property="staticDate" />
    <result column="charger_code" jdbcType="VARCHAR" property="chargerCode" />
    <result column="charger_name" jdbcType="VARCHAR" property="chargerName" />
    <result column="earliest_time" jdbcType="TIMESTAMP" property="earliestTime" />
    <result column="thelatest_time" jdbcType="TIMESTAMP" property="thelatestTime" />
    <result column="total_points" jdbcType="INTEGER" property="totalPoints" />
    <result column="abnormal_times" jdbcType="INTEGER" property="abnormalTimes" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
    <result column="data_state" jdbcType="INTEGER" property="dataState" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
    <result column="create_op" jdbcType="BIGINT" property="createOp" />
    <result column="modify_time" jdbcType="TIMESTAMP" property="modifyTime" />
    <result column="modify_op" jdbcType="BIGINT" property="modifyOp" />
  </resultMap>
  <sql id="Example_Where_Clause">
    <where>
      <foreach collection="oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <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 close=")" collection="criterion.value" item="listItem" open="(" 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="(" prefixOverrides="and" suffix=")">
            <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 close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Base_Column_List">
    id, record_id, static_date, charger_code, charger_name, earliest_time, thelatest_time, 
    total_points, abnormal_times, remark, data_state, create_time, create_op, modify_time, 
    modify_op
  </sql>
  <select id="selectByExample" parameterType="com.zteits.park.domain.TpEEmployeeAbnormalStaTailExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from tp_e_employee_abnormal_sta_tail
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tp_e_employee_abnormal_sta_tail
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from tp_e_employee_abnormal_sta_tail
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <delete id="deleteByExample" parameterType="com.zteits.park.domain.TpEEmployeeAbnormalStaTailExample">
    delete from tp_e_employee_abnormal_sta_tail
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.zteits.park.domain.TpEEmployeeAbnormalStaTail">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into tp_e_employee_abnormal_sta_tail (record_id, static_date, charger_code, 
      charger_name, earliest_time, thelatest_time, 
      total_points, abnormal_times, remark, 
      data_state, create_time, create_op, 
      modify_time, modify_op)
    values (#{recordId,jdbcType=BIGINT}, #{staticDate,jdbcType=DATE}, #{chargerCode,jdbcType=VARCHAR}, 
      #{chargerName,jdbcType=VARCHAR}, #{earliestTime,jdbcType=TIMESTAMP}, #{thelatestTime,jdbcType=TIMESTAMP}, 
      #{totalPoints,jdbcType=INTEGER}, #{abnormalTimes,jdbcType=INTEGER}, #{remark,jdbcType=VARCHAR}, 
      #{dataState,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{createOp,jdbcType=BIGINT}, 
      #{modifyTime,jdbcType=TIMESTAMP}, #{modifyOp,jdbcType=BIGINT})
  </insert>
  <insert id="insertSelective" parameterType="com.zteits.park.domain.TpEEmployeeAbnormalStaTail">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into tp_e_employee_abnormal_sta_tail
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="recordId != null">
        record_id,
      </if>
      <if test="staticDate != null">
        static_date,
      </if>
      <if test="chargerCode != null">
        charger_code,
      </if>
      <if test="chargerName != null">
        charger_name,
      </if>
      <if test="earliestTime != null">
        earliest_time,
      </if>
      <if test="thelatestTime != null">
        thelatest_time,
      </if>
      <if test="totalPoints != null">
        total_points,
      </if>
      <if test="abnormalTimes != null">
        abnormal_times,
      </if>
      <if test="remark != null">
        remark,
      </if>
      <if test="dataState != null">
        data_state,
      </if>
      <if test="createTime != null">
        create_time,
      </if>
      <if test="createOp != null">
        create_op,
      </if>
      <if test="modifyTime != null">
        modify_time,
      </if>
      <if test="modifyOp != null">
        modify_op,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="recordId != null">
        #{recordId,jdbcType=BIGINT},
      </if>
      <if test="staticDate != null">
        #{staticDate,jdbcType=DATE},
      </if>
      <if test="chargerCode != null">
        #{chargerCode,jdbcType=VARCHAR},
      </if>
      <if test="chargerName != null">
        #{chargerName,jdbcType=VARCHAR},
      </if>
      <if test="earliestTime != null">
        #{earliestTime,jdbcType=TIMESTAMP},
      </if>
      <if test="thelatestTime != null">
        #{thelatestTime,jdbcType=TIMESTAMP},
      </if>
      <if test="totalPoints != null">
        #{totalPoints,jdbcType=INTEGER},
      </if>
      <if test="abnormalTimes != null">
        #{abnormalTimes,jdbcType=INTEGER},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="dataState != null">
        #{dataState,jdbcType=INTEGER},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="createOp != null">
        #{createOp,jdbcType=BIGINT},
      </if>
      <if test="modifyTime != null">
        #{modifyTime,jdbcType=TIMESTAMP},
      </if>
      <if test="modifyOp != null">
        #{modifyOp,jdbcType=BIGINT},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.zteits.park.domain.TpEEmployeeAbnormalStaTailExample" resultType="java.lang.Long">
    select count(*) from tp_e_employee_abnormal_sta_tail
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update tp_e_employee_abnormal_sta_tail
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=BIGINT},
      </if>
      <if test="record.recordId != null">
        record_id = #{record.recordId,jdbcType=BIGINT},
      </if>
      <if test="record.staticDate != null">
        static_date = #{record.staticDate,jdbcType=DATE},
      </if>
      <if test="record.chargerCode != null">
        charger_code = #{record.chargerCode,jdbcType=VARCHAR},
      </if>
      <if test="record.chargerName != null">
        charger_name = #{record.chargerName,jdbcType=VARCHAR},
      </if>
      <if test="record.earliestTime != null">
        earliest_time = #{record.earliestTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.thelatestTime != null">
        thelatest_time = #{record.thelatestTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.totalPoints != null">
        total_points = #{record.totalPoints,jdbcType=INTEGER},
      </if>
      <if test="record.abnormalTimes != null">
        abnormal_times = #{record.abnormalTimes,jdbcType=INTEGER},
      </if>
      <if test="record.remark != null">
        remark = #{record.remark,jdbcType=VARCHAR},
      </if>
      <if test="record.dataState != null">
        data_state = #{record.dataState,jdbcType=INTEGER},
      </if>
      <if test="record.createTime != null">
        create_time = #{record.createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.createOp != null">
        create_op = #{record.createOp,jdbcType=BIGINT},
      </if>
      <if test="record.modifyTime != null">
        modify_time = #{record.modifyTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.modifyOp != null">
        modify_op = #{record.modifyOp,jdbcType=BIGINT},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    update tp_e_employee_abnormal_sta_tail
    set id = #{record.id,jdbcType=BIGINT},
      record_id = #{record.recordId,jdbcType=BIGINT},
      static_date = #{record.staticDate,jdbcType=DATE},
      charger_code = #{record.chargerCode,jdbcType=VARCHAR},
      charger_name = #{record.chargerName,jdbcType=VARCHAR},
      earliest_time = #{record.earliestTime,jdbcType=TIMESTAMP},
      thelatest_time = #{record.thelatestTime,jdbcType=TIMESTAMP},
      total_points = #{record.totalPoints,jdbcType=INTEGER},
      abnormal_times = #{record.abnormalTimes,jdbcType=INTEGER},
      remark = #{record.remark,jdbcType=VARCHAR},
      data_state = #{record.dataState,jdbcType=INTEGER},
      create_time = #{record.createTime,jdbcType=TIMESTAMP},
      create_op = #{record.createOp,jdbcType=BIGINT},
      modify_time = #{record.modifyTime,jdbcType=TIMESTAMP},
      modify_op = #{record.modifyOp,jdbcType=BIGINT}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.zteits.park.domain.TpEEmployeeAbnormalStaTail">
    update tp_e_employee_abnormal_sta_tail
    <set>
      <if test="recordId != null">
        record_id = #{recordId,jdbcType=BIGINT},
      </if>
      <if test="staticDate != null">
        static_date = #{staticDate,jdbcType=DATE},
      </if>
      <if test="chargerCode != null">
        charger_code = #{chargerCode,jdbcType=VARCHAR},
      </if>
      <if test="chargerName != null">
        charger_name = #{chargerName,jdbcType=VARCHAR},
      </if>
      <if test="earliestTime != null">
        earliest_time = #{earliestTime,jdbcType=TIMESTAMP},
      </if>
      <if test="thelatestTime != null">
        thelatest_time = #{thelatestTime,jdbcType=TIMESTAMP},
      </if>
      <if test="totalPoints != null">
        total_points = #{totalPoints,jdbcType=INTEGER},
      </if>
      <if test="abnormalTimes != null">
        abnormal_times = #{abnormalTimes,jdbcType=INTEGER},
      </if>
      <if test="remark != null">
        remark = #{remark,jdbcType=VARCHAR},
      </if>
      <if test="dataState != null">
        data_state = #{dataState,jdbcType=INTEGER},
      </if>
      <if test="createTime != null">
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="createOp != null">
        create_op = #{createOp,jdbcType=BIGINT},
      </if>
      <if test="modifyTime != null">
        modify_time = #{modifyTime,jdbcType=TIMESTAMP},
      </if>
      <if test="modifyOp != null">
        modify_op = #{modifyOp,jdbcType=BIGINT},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.zteits.park.domain.TpEEmployeeAbnormalStaTail">
    update tp_e_employee_abnormal_sta_tail
    set record_id = #{recordId,jdbcType=BIGINT},
      static_date = #{staticDate,jdbcType=DATE},
      charger_code = #{chargerCode,jdbcType=VARCHAR},
      charger_name = #{chargerName,jdbcType=VARCHAR},
      earliest_time = #{earliestTime,jdbcType=TIMESTAMP},
      thelatest_time = #{thelatestTime,jdbcType=TIMESTAMP},
      total_points = #{totalPoints,jdbcType=INTEGER},
      abnormal_times = #{abnormalTimes,jdbcType=INTEGER},
      remark = #{remark,jdbcType=VARCHAR},
      data_state = #{dataState,jdbcType=INTEGER},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      create_op = #{createOp,jdbcType=BIGINT},
      modify_time = #{modifyTime,jdbcType=TIMESTAMP},
      modify_op = #{modifyOp,jdbcType=BIGINT}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>