TpPInspectEqpPropertyMapper.xml 11.5 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.TpPInspectEqpPropertyMapper">
  <resultMap id="BaseResultMap" type="com.zteits.park.domain.TpPInspectEqpProperty">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="inspect_eqp_no" jdbcType="VARCHAR" property="inspectEqpNo" />
    <result column="inspect_eqp_property_no" jdbcType="VARCHAR" property="inspectEqpPropertyNo" />
    <result column="inspect_eqp_property_name" jdbcType="VARCHAR" property="inspectEqpPropertyName" />
    <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="VARCHAR" property="createOp" />
    <result column="modify_time" jdbcType="TIMESTAMP" property="modifyTime" />
    <result column="modify_op" jdbcType="VARCHAR" 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, inspect_eqp_no, inspect_eqp_property_no, inspect_eqp_property_name, remark, data_state, 
    create_time, create_op, modify_time, modify_op
  </sql>
  <select id="selectByExample" parameterType="com.zteits.park.domain.TpPInspectEqpPropertyExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from tp_p_inspect_eqp_property
    <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_p_inspect_eqp_property
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from tp_p_inspect_eqp_property
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <delete id="deleteByExample" parameterType="com.zteits.park.domain.TpPInspectEqpPropertyExample">
    delete from tp_p_inspect_eqp_property
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.zteits.park.domain.TpPInspectEqpProperty">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into tp_p_inspect_eqp_property (inspect_eqp_no, inspect_eqp_property_no, 
      inspect_eqp_property_name, remark, data_state, 
      create_time, create_op, modify_time, 
      modify_op)
    values (#{inspectEqpNo,jdbcType=VARCHAR}, #{inspectEqpPropertyNo,jdbcType=VARCHAR}, 
      #{inspectEqpPropertyName,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{dataState,jdbcType=INTEGER}, 
      #{createTime,jdbcType=TIMESTAMP}, #{createOp,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP}, 
      #{modifyOp,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.zteits.park.domain.TpPInspectEqpProperty">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into tp_p_inspect_eqp_property
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="inspectEqpNo != null">
        inspect_eqp_no,
      </if>
      <if test="inspectEqpPropertyNo != null">
        inspect_eqp_property_no,
      </if>
      <if test="inspectEqpPropertyName != null">
        inspect_eqp_property_name,
      </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="inspectEqpNo != null">
        #{inspectEqpNo,jdbcType=VARCHAR},
      </if>
      <if test="inspectEqpPropertyNo != null">
        #{inspectEqpPropertyNo,jdbcType=VARCHAR},
      </if>
      <if test="inspectEqpPropertyName != null">
        #{inspectEqpPropertyName,jdbcType=VARCHAR},
      </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=VARCHAR},
      </if>
      <if test="modifyTime != null">
        #{modifyTime,jdbcType=TIMESTAMP},
      </if>
      <if test="modifyOp != null">
        #{modifyOp,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.zteits.park.domain.TpPInspectEqpPropertyExample" resultType="java.lang.Long">
    select count(*) from tp_p_inspect_eqp_property
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update tp_p_inspect_eqp_property
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=BIGINT},
      </if>
      <if test="record.inspectEqpNo != null">
        inspect_eqp_no = #{record.inspectEqpNo,jdbcType=VARCHAR},
      </if>
      <if test="record.inspectEqpPropertyNo != null">
        inspect_eqp_property_no = #{record.inspectEqpPropertyNo,jdbcType=VARCHAR},
      </if>
      <if test="record.inspectEqpPropertyName != null">
        inspect_eqp_property_name = #{record.inspectEqpPropertyName,jdbcType=VARCHAR},
      </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=VARCHAR},
      </if>
      <if test="record.modifyTime != null">
        modify_time = #{record.modifyTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.modifyOp != null">
        modify_op = #{record.modifyOp,jdbcType=VARCHAR},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    update tp_p_inspect_eqp_property
    set id = #{record.id,jdbcType=BIGINT},
      inspect_eqp_no = #{record.inspectEqpNo,jdbcType=VARCHAR},
      inspect_eqp_property_no = #{record.inspectEqpPropertyNo,jdbcType=VARCHAR},
      inspect_eqp_property_name = #{record.inspectEqpPropertyName,jdbcType=VARCHAR},
      remark = #{record.remark,jdbcType=VARCHAR},
      data_state = #{record.dataState,jdbcType=INTEGER},
      create_time = #{record.createTime,jdbcType=TIMESTAMP},
      create_op = #{record.createOp,jdbcType=VARCHAR},
      modify_time = #{record.modifyTime,jdbcType=TIMESTAMP},
      modify_op = #{record.modifyOp,jdbcType=VARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.zteits.park.domain.TpPInspectEqpProperty">
    update tp_p_inspect_eqp_property
    <set>
      <if test="inspectEqpNo != null">
        inspect_eqp_no = #{inspectEqpNo,jdbcType=VARCHAR},
      </if>
      <if test="inspectEqpPropertyNo != null">
        inspect_eqp_property_no = #{inspectEqpPropertyNo,jdbcType=VARCHAR},
      </if>
      <if test="inspectEqpPropertyName != null">
        inspect_eqp_property_name = #{inspectEqpPropertyName,jdbcType=VARCHAR},
      </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=VARCHAR},
      </if>
      <if test="modifyTime != null">
        modify_time = #{modifyTime,jdbcType=TIMESTAMP},
      </if>
      <if test="modifyOp != null">
        modify_op = #{modifyOp,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.zteits.park.domain.TpPInspectEqpProperty">
    update tp_p_inspect_eqp_property
    set inspect_eqp_no = #{inspectEqpNo,jdbcType=VARCHAR},
      inspect_eqp_property_no = #{inspectEqpPropertyNo,jdbcType=VARCHAR},
      inspect_eqp_property_name = #{inspectEqpPropertyName,jdbcType=VARCHAR},
      remark = #{remark,jdbcType=VARCHAR},
      data_state = #{dataState,jdbcType=INTEGER},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      create_op = #{createOp,jdbcType=VARCHAR},
      modify_time = #{modifyTime,jdbcType=TIMESTAMP},
      modify_op = #{modifyOp,jdbcType=VARCHAR}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>