TBillingParkRuleRelMapper.xml 7.19 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.TBillingParkRuleRelMapper" >
  <resultMap id="BaseResultMap" type="com.zteits.bill.domain.TBillingParkRuleRel" >
    <id column="id" property="id" jdbcType="BIGINT" />
    <result column="pl_no" property="plNo" jdbcType="VARCHAR" />
    <result column="rule_collect_no" property="ruleCollectNo" jdbcType="VARCHAR" />
    <result column="data_state" property="dataState" jdbcType="INTEGER" />
    <result column="effect_time" property="effectTime" jdbcType="TIMESTAMP" />
    <result column="expire_time" property="expireTime" jdbcType="TIMESTAMP" />
    <result column="check_state" property="checkState" jdbcType="INTEGER" />
    <result column="create_op" property="createOp" jdbcType="BIGINT" />
    <result column="create_op_name" property="createOpName" jdbcType="VARCHAR" />
    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
    <result column="modify_op" property="modifyOp" jdbcType="BIGINT" />
    <result column="modify_op_name" property="modifyOpName" jdbcType="VARCHAR" />
    <result column="modify_time" property="modifyTime" jdbcType="TIMESTAMP" />
  </resultMap>
  <sql id="Base_Column_List" >
    id, pl_no, rule_collect_no, data_state, effect_time, expire_time, check_state, create_op, 
    create_op_name, create_time, modify_op, modify_op_name, modify_time
  </sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
    select 
    <include refid="Base_Column_List" />
    from t_billing_park_rule_rel
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
    delete from t_billing_park_rule_rel
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <insert id="insert" parameterType="com.zteits.bill.domain.TBillingParkRuleRel" >
    <selectKey resultType="java.lang.Long" keyProperty="id" order="AFTER" >
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into t_billing_park_rule_rel (pl_no, rule_collect_no, data_state, 
      effect_time, expire_time, check_state, 
      create_op, create_op_name, create_time, 
      modify_op, modify_op_name, modify_time
      )
    values (#{plNo,jdbcType=VARCHAR}, #{ruleCollectNo,jdbcType=VARCHAR}, #{dataState,jdbcType=INTEGER}, 
      #{effectTime,jdbcType=TIMESTAMP}, #{expireTime,jdbcType=TIMESTAMP}, #{checkState,jdbcType=INTEGER}, 
      #{createOp,jdbcType=BIGINT}, #{createOpName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
      #{modifyOp,jdbcType=BIGINT}, #{modifyOpName,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.zteits.bill.domain.TBillingParkRuleRel" >
    <selectKey resultType="java.lang.Long" keyProperty="id" order="AFTER" >
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into t_billing_park_rule_rel
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="plNo != null" >
        pl_no,
      </if>
      <if test="ruleCollectNo != null" >
        rule_collect_no,
      </if>
      <if test="dataState != null" >
        data_state,
      </if>
      <if test="effectTime != null" >
        effect_time,
      </if>
      <if test="expireTime != null" >
        expire_time,
      </if>
      <if test="checkState != null" >
        check_state,
      </if>
      <if test="createOp != null" >
        create_op,
      </if>
      <if test="createOpName != null" >
        create_op_name,
      </if>
      <if test="createTime != null" >
        create_time,
      </if>
      <if test="modifyOp != null" >
        modify_op,
      </if>
      <if test="modifyOpName != null" >
        modify_op_name,
      </if>
      <if test="modifyTime != null" >
        modify_time,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="plNo != null" >
        #{plNo,jdbcType=VARCHAR},
      </if>
      <if test="ruleCollectNo != null" >
        #{ruleCollectNo,jdbcType=VARCHAR},
      </if>
      <if test="dataState != null" >
        #{dataState,jdbcType=INTEGER},
      </if>
      <if test="effectTime != null" >
        #{effectTime,jdbcType=TIMESTAMP},
      </if>
      <if test="expireTime != null" >
        #{expireTime,jdbcType=TIMESTAMP},
      </if>
      <if test="checkState != null" >
        #{checkState,jdbcType=INTEGER},
      </if>
      <if test="createOp != null" >
        #{createOp,jdbcType=BIGINT},
      </if>
      <if test="createOpName != null" >
        #{createOpName,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null" >
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="modifyOp != null" >
        #{modifyOp,jdbcType=BIGINT},
      </if>
      <if test="modifyOpName != null" >
        #{modifyOpName,jdbcType=VARCHAR},
      </if>
      <if test="modifyTime != null" >
        #{modifyTime,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.zteits.bill.domain.TBillingParkRuleRel" >
    update t_billing_park_rule_rel
    <set >
      <if test="plNo != null" >
        pl_no = #{plNo,jdbcType=VARCHAR},
      </if>
      <if test="ruleCollectNo != null" >
        rule_collect_no = #{ruleCollectNo,jdbcType=VARCHAR},
      </if>
      <if test="dataState != null" >
        data_state = #{dataState,jdbcType=INTEGER},
      </if>
      <if test="effectTime != null" >
        effect_time = #{effectTime,jdbcType=TIMESTAMP},
      </if>
      <if test="expireTime != null" >
        expire_time = #{expireTime,jdbcType=TIMESTAMP},
      </if>
      <if test="checkState != null" >
        check_state = #{checkState,jdbcType=INTEGER},
      </if>
      <if test="createOp != null" >
        create_op = #{createOp,jdbcType=BIGINT},
      </if>
      <if test="createOpName != null" >
        create_op_name = #{createOpName,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null" >
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="modifyOp != null" >
        modify_op = #{modifyOp,jdbcType=BIGINT},
      </if>
      <if test="modifyOpName != null" >
        modify_op_name = #{modifyOpName,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.bill.domain.TBillingParkRuleRel" >
    update t_billing_park_rule_rel
    set pl_no = #{plNo,jdbcType=VARCHAR},
      rule_collect_no = #{ruleCollectNo,jdbcType=VARCHAR},
      data_state = #{dataState,jdbcType=INTEGER},
      effect_time = #{effectTime,jdbcType=TIMESTAMP},
      expire_time = #{expireTime,jdbcType=TIMESTAMP},
      check_state = #{checkState,jdbcType=INTEGER},
      create_op = #{createOp,jdbcType=BIGINT},
      create_op_name = #{createOpName,jdbcType=VARCHAR},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      modify_op = #{modifyOp,jdbcType=BIGINT},
      modify_op_name = #{modifyOpName,jdbcType=VARCHAR},
      modify_time = #{modifyTime,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>