ChargerAssessResultLogMapper.xml 12.8 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.ChargerAssessResultLogMapper">
  <resultMap id="BaseResultMap" type="com.zteits.park.domain.ChargerAssessResultLog">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="record_no" jdbcType="VARCHAR" property="recordNo" />
    <result column="op_type" jdbcType="INTEGER" property="opType" />
    <result column="op_remark" jdbcType="VARCHAR" property="opRemark" />
    <result column="org_id" jdbcType="BIGINT" property="orgId" />
    <result column="data_state" jdbcType="INTEGER" property="dataState" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
    <result column="create_emp_id" jdbcType="VARCHAR" property="createEmpId" />
    <result column="create_emp_name" jdbcType="VARCHAR" property="createEmpName" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
    <result column="modify_emp_id" jdbcType="VARCHAR" property="modifyEmpId" />
    <result column="modify_emp_name" jdbcType="VARCHAR" property="modifyEmpName" />
    <result column="modify_time" jdbcType="TIMESTAMP" property="modifyTime" />
  </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_no, op_type, op_remark, org_id, data_state, remark, create_emp_id, create_emp_name, 
    create_time, modify_emp_id, modify_emp_name, modify_time
  </sql>
  <select id="selectByExample" parameterType="com.zteits.park.domain.ChargerAssessResultLogExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from charger_assess_result_log
    <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 charger_assess_result_log
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from charger_assess_result_log
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <delete id="deleteByExample" parameterType="com.zteits.park.domain.ChargerAssessResultLogExample">
    delete from charger_assess_result_log
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.zteits.park.domain.ChargerAssessResultLog">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into charger_assess_result_log (record_no, op_type, op_remark, 
      org_id, data_state, remark, 
      create_emp_id, create_emp_name, create_time, 
      modify_emp_id, modify_emp_name, modify_time
      )
    values (#{recordNo,jdbcType=VARCHAR}, #{opType,jdbcType=INTEGER}, #{opRemark,jdbcType=VARCHAR}, 
      #{orgId,jdbcType=BIGINT}, #{dataState,jdbcType=INTEGER}, #{remark,jdbcType=VARCHAR}, 
      #{createEmpId,jdbcType=VARCHAR}, #{createEmpName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
      #{modifyEmpId,jdbcType=VARCHAR}, #{modifyEmpName,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.zteits.park.domain.ChargerAssessResultLog">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into charger_assess_result_log
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="recordNo != null">
        record_no,
      </if>
      <if test="opType != null">
        op_type,
      </if>
      <if test="opRemark != null">
        op_remark,
      </if>
      <if test="orgId != null">
        org_id,
      </if>
      <if test="dataState != null">
        data_state,
      </if>
      <if test="remark != null">
        remark,
      </if>
      <if test="createEmpId != null">
        create_emp_id,
      </if>
      <if test="createEmpName != null">
        create_emp_name,
      </if>
      <if test="createTime != null">
        create_time,
      </if>
      <if test="modifyEmpId != null">
        modify_emp_id,
      </if>
      <if test="modifyEmpName != null">
        modify_emp_name,
      </if>
      <if test="modifyTime != null">
        modify_time,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="recordNo != null">
        #{recordNo,jdbcType=VARCHAR},
      </if>
      <if test="opType != null">
        #{opType,jdbcType=INTEGER},
      </if>
      <if test="opRemark != null">
        #{opRemark,jdbcType=VARCHAR},
      </if>
      <if test="orgId != null">
        #{orgId,jdbcType=BIGINT},
      </if>
      <if test="dataState != null">
        #{dataState,jdbcType=INTEGER},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="createEmpId != null">
        #{createEmpId,jdbcType=VARCHAR},
      </if>
      <if test="createEmpName != null">
        #{createEmpName,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="modifyEmpId != null">
        #{modifyEmpId,jdbcType=VARCHAR},
      </if>
      <if test="modifyEmpName != null">
        #{modifyEmpName,jdbcType=VARCHAR},
      </if>
      <if test="modifyTime != null">
        #{modifyTime,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.zteits.park.domain.ChargerAssessResultLogExample" resultType="java.lang.Long">
    select count(*) from charger_assess_result_log
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update charger_assess_result_log
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=BIGINT},
      </if>
      <if test="record.recordNo != null">
        record_no = #{record.recordNo,jdbcType=VARCHAR},
      </if>
      <if test="record.opType != null">
        op_type = #{record.opType,jdbcType=INTEGER},
      </if>
      <if test="record.opRemark != null">
        op_remark = #{record.opRemark,jdbcType=VARCHAR},
      </if>
      <if test="record.orgId != null">
        org_id = #{record.orgId,jdbcType=BIGINT},
      </if>
      <if test="record.dataState != null">
        data_state = #{record.dataState,jdbcType=INTEGER},
      </if>
      <if test="record.remark != null">
        remark = #{record.remark,jdbcType=VARCHAR},
      </if>
      <if test="record.createEmpId != null">
        create_emp_id = #{record.createEmpId,jdbcType=VARCHAR},
      </if>
      <if test="record.createEmpName != null">
        create_emp_name = #{record.createEmpName,jdbcType=VARCHAR},
      </if>
      <if test="record.createTime != null">
        create_time = #{record.createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.modifyEmpId != null">
        modify_emp_id = #{record.modifyEmpId,jdbcType=VARCHAR},
      </if>
      <if test="record.modifyEmpName != null">
        modify_emp_name = #{record.modifyEmpName,jdbcType=VARCHAR},
      </if>
      <if test="record.modifyTime != null">
        modify_time = #{record.modifyTime,jdbcType=TIMESTAMP},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    update charger_assess_result_log
    set id = #{record.id,jdbcType=BIGINT},
      record_no = #{record.recordNo,jdbcType=VARCHAR},
      op_type = #{record.opType,jdbcType=INTEGER},
      op_remark = #{record.opRemark,jdbcType=VARCHAR},
      org_id = #{record.orgId,jdbcType=BIGINT},
      data_state = #{record.dataState,jdbcType=INTEGER},
      remark = #{record.remark,jdbcType=VARCHAR},
      create_emp_id = #{record.createEmpId,jdbcType=VARCHAR},
      create_emp_name = #{record.createEmpName,jdbcType=VARCHAR},
      create_time = #{record.createTime,jdbcType=TIMESTAMP},
      modify_emp_id = #{record.modifyEmpId,jdbcType=VARCHAR},
      modify_emp_name = #{record.modifyEmpName,jdbcType=VARCHAR},
      modify_time = #{record.modifyTime,jdbcType=TIMESTAMP}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.zteits.park.domain.ChargerAssessResultLog">
    update charger_assess_result_log
    <set>
      <if test="recordNo != null">
        record_no = #{recordNo,jdbcType=VARCHAR},
      </if>
      <if test="opType != null">
        op_type = #{opType,jdbcType=INTEGER},
      </if>
      <if test="opRemark != null">
        op_remark = #{opRemark,jdbcType=VARCHAR},
      </if>
      <if test="orgId != null">
        org_id = #{orgId,jdbcType=BIGINT},
      </if>
      <if test="dataState != null">
        data_state = #{dataState,jdbcType=INTEGER},
      </if>
      <if test="remark != null">
        remark = #{remark,jdbcType=VARCHAR},
      </if>
      <if test="createEmpId != null">
        create_emp_id = #{createEmpId,jdbcType=VARCHAR},
      </if>
      <if test="createEmpName != null">
        create_emp_name = #{createEmpName,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="modifyEmpId != null">
        modify_emp_id = #{modifyEmpId,jdbcType=VARCHAR},
      </if>
      <if test="modifyEmpName != null">
        modify_emp_name = #{modifyEmpName,jdbcType=VARCHAR},
      </if>
      <if test="modifyTime != null">
        modify_time = #{modifyTime,jdbcType=TIMESTAMP},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.zteits.park.domain.ChargerAssessResultLog">
    update charger_assess_result_log
    set record_no = #{recordNo,jdbcType=VARCHAR},
      op_type = #{opType,jdbcType=INTEGER},
      op_remark = #{opRemark,jdbcType=VARCHAR},
      org_id = #{orgId,jdbcType=BIGINT},
      data_state = #{dataState,jdbcType=INTEGER},
      remark = #{remark,jdbcType=VARCHAR},
      create_emp_id = #{createEmpId,jdbcType=VARCHAR},
      create_emp_name = #{createEmpName,jdbcType=VARCHAR},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      modify_emp_id = #{modifyEmpId,jdbcType=VARCHAR},
      modify_emp_name = #{modifyEmpName,jdbcType=VARCHAR},
      modify_time = #{modifyTime,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>