XcCarChargeAuditMapper.xml 12.2 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.XcCarChargeAuditMapper">
  <resultMap id="BaseResultMap" type="com.zteits.park.domain.XcCarChargeAudit">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="car_number" jdbcType="VARCHAR" property="carNumber" />
    <result column="car_number_color" jdbcType="VARCHAR" property="carNumberColor" />
    <result column="car_image" jdbcType="VARCHAR" property="carImage" />
    <result column="charge_parking_type" jdbcType="TINYINT" property="chargeParkingType" />
    <result column="audit_status" jdbcType="TINYINT" property="auditStatus" />
    <result column="audit_time" jdbcType="TIMESTAMP" property="auditTime" />
    <result column="auditor" jdbcType="VARCHAR" property="auditor" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
    <result column="create_op" jdbcType="BIGINT" property="createOp" />
    <result column="data_state" jdbcType="INTEGER" property="dataState" />
  </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, car_number, car_number_color, car_image, charge_parking_type, audit_status, audit_time, 
    auditor, remark, create_time, create_op, data_state
  </sql>
  <select id="selectByExample" parameterType="com.zteits.park.domain.XcCarChargeAuditExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from xc_car_charge_audit
    <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 xc_car_charge_audit
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from xc_car_charge_audit
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <delete id="deleteByExample" parameterType="com.zteits.park.domain.XcCarChargeAuditExample">
    delete from xc_car_charge_audit
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.zteits.park.domain.XcCarChargeAudit">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into xc_car_charge_audit (car_number, car_number_color, car_image, 
      charge_parking_type, audit_status, audit_time, 
      auditor, remark, create_time, 
      create_op, data_state)
    values (#{carNumber,jdbcType=VARCHAR}, #{carNumberColor,jdbcType=VARCHAR}, #{carImage,jdbcType=VARCHAR}, 
      #{chargeParkingType,jdbcType=TINYINT}, #{auditStatus,jdbcType=TINYINT}, #{auditTime,jdbcType=TIMESTAMP}, 
      #{auditor,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
      #{createOp,jdbcType=BIGINT}, #{dataState,jdbcType=INTEGER})
  </insert>
  <insert id="insertSelective" parameterType="com.zteits.park.domain.XcCarChargeAudit">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into xc_car_charge_audit
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="carNumber != null">
        car_number,
      </if>
      <if test="carNumberColor != null">
        car_number_color,
      </if>
      <if test="carImage != null">
        car_image,
      </if>
      <if test="chargeParkingType != null">
        charge_parking_type,
      </if>
      <if test="auditStatus != null">
        audit_status,
      </if>
      <if test="auditTime != null">
        audit_time,
      </if>
      <if test="auditor != null">
        auditor,
      </if>
      <if test="remark != null">
        remark,
      </if>
      <if test="createTime != null">
        create_time,
      </if>
      <if test="createOp != null">
        create_op,
      </if>
      <if test="dataState != null">
        data_state,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="carNumber != null">
        #{carNumber,jdbcType=VARCHAR},
      </if>
      <if test="carNumberColor != null">
        #{carNumberColor,jdbcType=VARCHAR},
      </if>
      <if test="carImage != null">
        #{carImage,jdbcType=VARCHAR},
      </if>
      <if test="chargeParkingType != null">
        #{chargeParkingType,jdbcType=TINYINT},
      </if>
      <if test="auditStatus != null">
        #{auditStatus,jdbcType=TINYINT},
      </if>
      <if test="auditTime != null">
        #{auditTime,jdbcType=TIMESTAMP},
      </if>
      <if test="auditor != null">
        #{auditor,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="createOp != null">
        #{createOp,jdbcType=BIGINT},
      </if>
      <if test="dataState != null">
        #{dataState,jdbcType=INTEGER},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.zteits.park.domain.XcCarChargeAuditExample" resultType="java.lang.Long">
    select count(*) from xc_car_charge_audit
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update xc_car_charge_audit
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=BIGINT},
      </if>
      <if test="record.carNumber != null">
        car_number = #{record.carNumber,jdbcType=VARCHAR},
      </if>
      <if test="record.carNumberColor != null">
        car_number_color = #{record.carNumberColor,jdbcType=VARCHAR},
      </if>
      <if test="record.carImage != null">
        car_image = #{record.carImage,jdbcType=VARCHAR},
      </if>
      <if test="record.chargeParkingType != null">
        charge_parking_type = #{record.chargeParkingType,jdbcType=TINYINT},
      </if>
      <if test="record.auditStatus != null">
        audit_status = #{record.auditStatus,jdbcType=TINYINT},
      </if>
      <if test="record.auditTime != null">
        audit_time = #{record.auditTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.auditor != null">
        auditor = #{record.auditor,jdbcType=VARCHAR},
      </if>
      <if test="record.remark != null">
        remark = #{record.remark,jdbcType=VARCHAR},
      </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.dataState != null">
        data_state = #{record.dataState,jdbcType=INTEGER},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    update xc_car_charge_audit
    set id = #{record.id,jdbcType=BIGINT},
      car_number = #{record.carNumber,jdbcType=VARCHAR},
      car_number_color = #{record.carNumberColor,jdbcType=VARCHAR},
      car_image = #{record.carImage,jdbcType=VARCHAR},
      charge_parking_type = #{record.chargeParkingType,jdbcType=TINYINT},
      audit_status = #{record.auditStatus,jdbcType=TINYINT},
      audit_time = #{record.auditTime,jdbcType=TIMESTAMP},
      auditor = #{record.auditor,jdbcType=VARCHAR},
      remark = #{record.remark,jdbcType=VARCHAR},
      create_time = #{record.createTime,jdbcType=TIMESTAMP},
      create_op = #{record.createOp,jdbcType=BIGINT},
      data_state = #{record.dataState,jdbcType=INTEGER}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.zteits.park.domain.XcCarChargeAudit">
    update xc_car_charge_audit
    <set>
      <if test="carNumber != null">
        car_number = #{carNumber,jdbcType=VARCHAR},
      </if>
      <if test="carNumberColor != null">
        car_number_color = #{carNumberColor,jdbcType=VARCHAR},
      </if>
      <if test="carImage != null">
        car_image = #{carImage,jdbcType=VARCHAR},
      </if>
      <if test="chargeParkingType != null">
        charge_parking_type = #{chargeParkingType,jdbcType=TINYINT},
      </if>
      <if test="auditStatus != null">
        audit_status = #{auditStatus,jdbcType=TINYINT},
      </if>
      <if test="auditTime != null">
        audit_time = #{auditTime,jdbcType=TIMESTAMP},
      </if>
      <if test="auditor != null">
        auditor = #{auditor,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        remark = #{remark,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="createOp != null">
        create_op = #{createOp,jdbcType=BIGINT},
      </if>
      <if test="dataState != null">
        data_state = #{dataState,jdbcType=INTEGER},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.zteits.park.domain.XcCarChargeAudit">
    update xc_car_charge_audit
    set car_number = #{carNumber,jdbcType=VARCHAR},
      car_number_color = #{carNumberColor,jdbcType=VARCHAR},
      car_image = #{carImage,jdbcType=VARCHAR},
      charge_parking_type = #{chargeParkingType,jdbcType=TINYINT},
      audit_status = #{auditStatus,jdbcType=TINYINT},
      audit_time = #{auditTime,jdbcType=TIMESTAMP},
      auditor = #{auditor,jdbcType=VARCHAR},
      remark = #{remark,jdbcType=VARCHAR},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      create_op = #{createOp,jdbcType=BIGINT},
      data_state = #{dataState,jdbcType=INTEGER}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>