TBillingPrepaymentMapper.xml 6.07 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.bill.mapper.TBillingPrepaymentMapper" >
  <resultMap id="BaseResultMap" type="com.zteits.bill.domain.TBillingPrepayment" >
    <id column="id" property="id" jdbcType="BIGINT" />
    <result column="pl_no" property="plNo" jdbcType="VARCHAR" />
    <result column="pl_name" property="plName" jdbcType="VARCHAR" />
    <result column="car_type" property="carType" jdbcType="INTEGER" />
    <result column="prepayment" property="prepayment" jdbcType="BIGINT" />
    <result column="effect_time" property="effectTime" jdbcType="TIMESTAMP" />
    <result column="expire_time" property="expireTime" jdbcType="TIMESTAMP" />
    <result column="create_op" property="createOp" jdbcType="INTEGER" />
    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
    <result column="modify_op" property="modifyOp" jdbcType="INTEGER" />
    <result column="modify_time" property="modifyTime" jdbcType="TIMESTAMP" />
  </resultMap>
  <sql id="Base_Column_List" >
    id, pl_no, pl_name, car_type, prepayment, effect_time, expire_time, create_op, create_time, 
    modify_op, modify_time
  </sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
    select 
    <include refid="Base_Column_List" />
    from t_billing_prepayment
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
    delete from t_billing_prepayment
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <insert id="insert" parameterType="com.zteits.bill.domain.TBillingPrepayment" >
    <selectKey resultType="java.lang.Long" keyProperty="id" order="AFTER" >
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into t_billing_prepayment (pl_no, pl_name, car_type, 
      prepayment, effect_time, expire_time, 
      create_op, create_time, modify_op, 
      modify_time)
    values (#{plNo,jdbcType=VARCHAR}, #{plName,jdbcType=VARCHAR}, #{carType,jdbcType=INTEGER}, 
      #{prepayment,jdbcType=BIGINT}, #{effectTime,jdbcType=TIMESTAMP}, #{expireTime,jdbcType=TIMESTAMP}, 
      #{createOp,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{modifyOp,jdbcType=INTEGER}, 
      #{modifyTime,jdbcType=TIMESTAMP})
  </insert>
  <insert id="insertSelective" parameterType="com.zteits.bill.domain.TBillingPrepayment" >
    <selectKey resultType="java.lang.Long" keyProperty="id" order="AFTER" >
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into t_billing_prepayment
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="plNo != null" >
        pl_no,
      </if>
      <if test="plName != null" >
        pl_name,
      </if>
      <if test="carType != null" >
        car_type,
      </if>
      <if test="prepayment != null" >
        prepayment,
      </if>
      <if test="effectTime != null" >
        effect_time,
      </if>
      <if test="expireTime != null" >
        expire_time,
      </if>
      <if test="createOp != null" >
        create_op,
      </if>
      <if test="createTime != null" >
        create_time,
      </if>
      <if test="modifyOp != null" >
        modify_op,
      </if>
      <if test="modifyTime != null" >
        modify_time,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="plNo != null" >
        #{plNo,jdbcType=VARCHAR},
      </if>
      <if test="plName != null" >
        #{plName,jdbcType=VARCHAR},
      </if>
      <if test="carType != null" >
        #{carType,jdbcType=INTEGER},
      </if>
      <if test="prepayment != null" >
        #{prepayment,jdbcType=BIGINT},
      </if>
      <if test="effectTime != null" >
        #{effectTime,jdbcType=TIMESTAMP},
      </if>
      <if test="expireTime != null" >
        #{expireTime,jdbcType=TIMESTAMP},
      </if>
      <if test="createOp != null" >
        #{createOp,jdbcType=INTEGER},
      </if>
      <if test="createTime != null" >
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="modifyOp != null" >
        #{modifyOp,jdbcType=INTEGER},
      </if>
      <if test="modifyTime != null" >
        #{modifyTime,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.zteits.bill.domain.TBillingPrepayment" >
    update t_billing_prepayment
    <set >
      <if test="plNo != null" >
        pl_no = #{plNo,jdbcType=VARCHAR},
      </if>
      <if test="plName != null" >
        pl_name = #{plName,jdbcType=VARCHAR},
      </if>
      <if test="carType != null" >
        car_type = #{carType,jdbcType=INTEGER},
      </if>
      <if test="prepayment != null" >
        prepayment = #{prepayment,jdbcType=BIGINT},
      </if>
      <if test="effectTime != null" >
        effect_time = #{effectTime,jdbcType=TIMESTAMP},
      </if>
      <if test="expireTime != null" >
        expire_time = #{expireTime,jdbcType=TIMESTAMP},
      </if>
      <if test="createOp != null" >
        create_op = #{createOp,jdbcType=INTEGER},
      </if>
      <if test="createTime != null" >
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="modifyOp != null" >
        modify_op = #{modifyOp,jdbcType=INTEGER},
      </if>
      <if test="modifyTime != null" >
        modify_time = #{modifyTime,jdbcType=TIMESTAMP},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.zteits.bill.domain.TBillingPrepayment" >
    update t_billing_prepayment
    set pl_no = #{plNo,jdbcType=VARCHAR},
      pl_name = #{plName,jdbcType=VARCHAR},
      car_type = #{carType,jdbcType=INTEGER},
      prepayment = #{prepayment,jdbcType=BIGINT},
      effect_time = #{effectTime,jdbcType=TIMESTAMP},
      expire_time = #{expireTime,jdbcType=TIMESTAMP},
      create_op = #{createOp,jdbcType=INTEGER},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      modify_op = #{modifyOp,jdbcType=INTEGER},
      modify_time = #{modifyTime,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>