TpCCarBreakAuditRecordMapper.xml 12.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.TpCCarBreakAuditRecordMapper">
  <resultMap id="BaseResultMap" type="com.zteits.park.domain.TpCCarBreakAuditRecord">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="break_id" jdbcType="BIGINT" property="breakId" />
    <result column="audit_type" jdbcType="INTEGER" property="auditType" />
    <result column="audit_remark" jdbcType="VARCHAR" property="auditRemark" />
    <result column="audit_op_id" jdbcType="BIGINT" property="auditOpId" />
    <result column="audit_op_name" jdbcType="VARCHAR" property="auditOpName" />
    <result column="data_state" jdbcType="INTEGER" property="dataState" />
    <result column="create_emp_id" jdbcType="VARCHAR" property="createEmpId" />
    <result column="create_emp_name" jdbcType="VARCHAR" property="createEmpName" />
    <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
    <result column="org_id" jdbcType="BIGINT" property="orgId" />
    <result column="org_name" jdbcType="VARCHAR" property="orgName" />
  </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, break_id, audit_type, audit_remark, audit_op_id, audit_op_name, data_state, create_emp_id, 
    create_emp_name, create_date, org_id, org_name
  </sql>
  <select id="selectByExample" parameterType="com.zteits.park.domain.TpCCarBreakAuditRecordExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from tp_c_car_break_audit_record
    <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_c_car_break_audit_record
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from tp_c_car_break_audit_record
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <delete id="deleteByExample" parameterType="com.zteits.park.domain.TpCCarBreakAuditRecordExample">
    delete from tp_c_car_break_audit_record
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.zteits.park.domain.TpCCarBreakAuditRecord">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into tp_c_car_break_audit_record (break_id, audit_type, audit_remark, 
      audit_op_id, audit_op_name, data_state, 
      create_emp_id, create_emp_name, create_date, 
      org_id, org_name)
    values (#{breakId,jdbcType=BIGINT}, #{auditType,jdbcType=INTEGER}, #{auditRemark,jdbcType=VARCHAR}, 
      #{auditOpId,jdbcType=BIGINT}, #{auditOpName,jdbcType=VARCHAR}, #{dataState,jdbcType=INTEGER}, 
      #{createEmpId,jdbcType=VARCHAR}, #{createEmpName,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}, 
      #{orgId,jdbcType=BIGINT}, #{orgName,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.zteits.park.domain.TpCCarBreakAuditRecord">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into tp_c_car_break_audit_record
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="breakId != null">
        break_id,
      </if>
      <if test="auditType != null">
        audit_type,
      </if>
      <if test="auditRemark != null">
        audit_remark,
      </if>
      <if test="auditOpId != null">
        audit_op_id,
      </if>
      <if test="auditOpName != null">
        audit_op_name,
      </if>
      <if test="dataState != null">
        data_state,
      </if>
      <if test="createEmpId != null">
        create_emp_id,
      </if>
      <if test="createEmpName != null">
        create_emp_name,
      </if>
      <if test="createDate != null">
        create_date,
      </if>
      <if test="orgId != null">
        org_id,
      </if>
      <if test="orgName != null">
        org_name,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="breakId != null">
        #{breakId,jdbcType=BIGINT},
      </if>
      <if test="auditType != null">
        #{auditType,jdbcType=INTEGER},
      </if>
      <if test="auditRemark != null">
        #{auditRemark,jdbcType=VARCHAR},
      </if>
      <if test="auditOpId != null">
        #{auditOpId,jdbcType=BIGINT},
      </if>
      <if test="auditOpName != null">
        #{auditOpName,jdbcType=VARCHAR},
      </if>
      <if test="dataState != null">
        #{dataState,jdbcType=INTEGER},
      </if>
      <if test="createEmpId != null">
        #{createEmpId,jdbcType=VARCHAR},
      </if>
      <if test="createEmpName != null">
        #{createEmpName,jdbcType=VARCHAR},
      </if>
      <if test="createDate != null">
        #{createDate,jdbcType=TIMESTAMP},
      </if>
      <if test="orgId != null">
        #{orgId,jdbcType=BIGINT},
      </if>
      <if test="orgName != null">
        #{orgName,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.zteits.park.domain.TpCCarBreakAuditRecordExample" resultType="java.lang.Long">
    select count(*) from tp_c_car_break_audit_record
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update tp_c_car_break_audit_record
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=BIGINT},
      </if>
      <if test="record.breakId != null">
        break_id = #{record.breakId,jdbcType=BIGINT},
      </if>
      <if test="record.auditType != null">
        audit_type = #{record.auditType,jdbcType=INTEGER},
      </if>
      <if test="record.auditRemark != null">
        audit_remark = #{record.auditRemark,jdbcType=VARCHAR},
      </if>
      <if test="record.auditOpId != null">
        audit_op_id = #{record.auditOpId,jdbcType=BIGINT},
      </if>
      <if test="record.auditOpName != null">
        audit_op_name = #{record.auditOpName,jdbcType=VARCHAR},
      </if>
      <if test="record.dataState != null">
        data_state = #{record.dataState,jdbcType=INTEGER},
      </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.createDate != null">
        create_date = #{record.createDate,jdbcType=TIMESTAMP},
      </if>
      <if test="record.orgId != null">
        org_id = #{record.orgId,jdbcType=BIGINT},
      </if>
      <if test="record.orgName != null">
        org_name = #{record.orgName,jdbcType=VARCHAR},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    update tp_c_car_break_audit_record
    set id = #{record.id,jdbcType=BIGINT},
      break_id = #{record.breakId,jdbcType=BIGINT},
      audit_type = #{record.auditType,jdbcType=INTEGER},
      audit_remark = #{record.auditRemark,jdbcType=VARCHAR},
      audit_op_id = #{record.auditOpId,jdbcType=BIGINT},
      audit_op_name = #{record.auditOpName,jdbcType=VARCHAR},
      data_state = #{record.dataState,jdbcType=INTEGER},
      create_emp_id = #{record.createEmpId,jdbcType=VARCHAR},
      create_emp_name = #{record.createEmpName,jdbcType=VARCHAR},
      create_date = #{record.createDate,jdbcType=TIMESTAMP},
      org_id = #{record.orgId,jdbcType=BIGINT},
      org_name = #{record.orgName,jdbcType=VARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.zteits.park.domain.TpCCarBreakAuditRecord">
    update tp_c_car_break_audit_record
    <set>
      <if test="breakId != null">
        break_id = #{breakId,jdbcType=BIGINT},
      </if>
      <if test="auditType != null">
        audit_type = #{auditType,jdbcType=INTEGER},
      </if>
      <if test="auditRemark != null">
        audit_remark = #{auditRemark,jdbcType=VARCHAR},
      </if>
      <if test="auditOpId != null">
        audit_op_id = #{auditOpId,jdbcType=BIGINT},
      </if>
      <if test="auditOpName != null">
        audit_op_name = #{auditOpName,jdbcType=VARCHAR},
      </if>
      <if test="dataState != null">
        data_state = #{dataState,jdbcType=INTEGER},
      </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="createDate != null">
        create_date = #{createDate,jdbcType=TIMESTAMP},
      </if>
      <if test="orgId != null">
        org_id = #{orgId,jdbcType=BIGINT},
      </if>
      <if test="orgName != null">
        org_name = #{orgName,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.zteits.park.domain.TpCCarBreakAuditRecord">
    update tp_c_car_break_audit_record
    set break_id = #{breakId,jdbcType=BIGINT},
      audit_type = #{auditType,jdbcType=INTEGER},
      audit_remark = #{auditRemark,jdbcType=VARCHAR},
      audit_op_id = #{auditOpId,jdbcType=BIGINT},
      audit_op_name = #{auditOpName,jdbcType=VARCHAR},
      data_state = #{dataState,jdbcType=INTEGER},
      create_emp_id = #{createEmpId,jdbcType=VARCHAR},
      create_emp_name = #{createEmpName,jdbcType=VARCHAR},
      create_date = #{createDate,jdbcType=TIMESTAMP},
      org_id = #{orgId,jdbcType=BIGINT},
      org_name = #{orgName,jdbcType=VARCHAR}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>