TBillingRuleCollectMapper.xml 7.18 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.TBillingRuleCollectMapper" >
  <resultMap id="BaseResultMap" type="com.zteits.bill.domain.TBillingRuleCollect" >
    <id column="id" property="id" jdbcType="INTEGER" />
    <result column="rule_collect_no" property="ruleCollectNo" jdbcType="VARCHAR" />
    <result column="rule_no" property="ruleNo" jdbcType="VARCHAR" />
    <result column="rule_collect_name" property="ruleCollectName" jdbcType="VARCHAR" />
    <result column="free_time_type" property="freeTimeType" jdbcType="INTEGER" />
    <result column="day_start_time" property="dayStartTime" jdbcType="TIME" />
    <result column="day_end_time" property="dayEndTime" jdbcType="TIME" />
    <result column="org_id" property="orgId" jdbcType="BIGINT" />
    <result column="data_state" property="dataState" jdbcType="INTEGER" />
    <result column="create_op" property="createOp" jdbcType="BIGINT" />
    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
    <result column="modify_op" property="modifyOp" jdbcType="BIGINT" />
    <result column="modify_time" property="modifyTime" jdbcType="TIMESTAMP" />
  </resultMap>
  <sql id="Base_Column_List" >
    id, rule_collect_no, rule_no, rule_collect_name, free_time_type, day_start_time, 
    day_end_time, org_id, data_state, create_op, create_time, modify_op, modify_time
  </sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
    select 
    <include refid="Base_Column_List" />
    from t_billing_rule_collect
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
    delete from t_billing_rule_collect
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.zteits.bill.domain.TBillingRuleCollect" >
    <selectKey resultType="java.lang.Integer" keyProperty="id" order="AFTER" >
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into t_billing_rule_collect (rule_collect_no, rule_no, rule_collect_name, 
      free_time_type, day_start_time, day_end_time, 
      org_id, data_state, create_op, 
      create_time, modify_op, modify_time
      )
    values (#{ruleCollectNo,jdbcType=VARCHAR}, #{ruleNo,jdbcType=VARCHAR}, #{ruleCollectName,jdbcType=VARCHAR}, 
      #{freeTimeType,jdbcType=INTEGER}, #{dayStartTime,jdbcType=TIME}, #{dayEndTime,jdbcType=TIME}, 
      #{orgId,jdbcType=BIGINT}, #{dataState,jdbcType=INTEGER}, #{createOp,jdbcType=BIGINT}, 
      #{createTime,jdbcType=TIMESTAMP}, #{modifyOp,jdbcType=BIGINT}, #{modifyTime,jdbcType=TIMESTAMP}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.zteits.bill.domain.TBillingRuleCollect" >
    <selectKey resultType="java.lang.Integer" keyProperty="id" order="AFTER" >
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into t_billing_rule_collect
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="ruleCollectNo != null" >
        rule_collect_no,
      </if>
      <if test="ruleNo != null" >
        rule_no,
      </if>
      <if test="ruleCollectName != null" >
        rule_collect_name,
      </if>
      <if test="freeTimeType != null" >
        free_time_type,
      </if>
      <if test="dayStartTime != null" >
        day_start_time,
      </if>
      <if test="dayEndTime != null" >
        day_end_time,
      </if>
      <if test="orgId != null" >
        org_id,
      </if>
      <if test="dataState != null" >
        data_state,
      </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="ruleCollectNo != null" >
        #{ruleCollectNo,jdbcType=VARCHAR},
      </if>
      <if test="ruleNo != null" >
        #{ruleNo,jdbcType=VARCHAR},
      </if>
      <if test="ruleCollectName != null" >
        #{ruleCollectName,jdbcType=VARCHAR},
      </if>
      <if test="freeTimeType != null" >
        #{freeTimeType,jdbcType=INTEGER},
      </if>
      <if test="dayStartTime != null" >
        #{dayStartTime,jdbcType=TIME},
      </if>
      <if test="dayEndTime != null" >
        #{dayEndTime,jdbcType=TIME},
      </if>
      <if test="orgId != null" >
        #{orgId,jdbcType=BIGINT},
      </if>
      <if test="dataState != null" >
        #{dataState,jdbcType=INTEGER},
      </if>
      <if test="createOp != null" >
        #{createOp,jdbcType=BIGINT},
      </if>
      <if test="createTime != null" >
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="modifyOp != null" >
        #{modifyOp,jdbcType=BIGINT},
      </if>
      <if test="modifyTime != null" >
        #{modifyTime,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.zteits.bill.domain.TBillingRuleCollect" >
    update t_billing_rule_collect
    <set >
      <if test="ruleCollectNo != null" >
        rule_collect_no = #{ruleCollectNo,jdbcType=VARCHAR},
      </if>
      <if test="ruleNo != null" >
        rule_no = #{ruleNo,jdbcType=VARCHAR},
      </if>
      <if test="ruleCollectName != null" >
        rule_collect_name = #{ruleCollectName,jdbcType=VARCHAR},
      </if>
      <if test="freeTimeType != null" >
        free_time_type = #{freeTimeType,jdbcType=INTEGER},
      </if>
      <if test="dayStartTime != null" >
        day_start_time = #{dayStartTime,jdbcType=TIME},
      </if>
      <if test="dayEndTime != null" >
        day_end_time = #{dayEndTime,jdbcType=TIME},
      </if>
      <if test="orgId != null" >
        org_id = #{orgId,jdbcType=BIGINT},
      </if>
      <if test="dataState != null" >
        data_state = #{dataState,jdbcType=INTEGER},
      </if>
      <if test="createOp != null" >
        create_op = #{createOp,jdbcType=BIGINT},
      </if>
      <if test="createTime != null" >
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="modifyOp != null" >
        modify_op = #{modifyOp,jdbcType=BIGINT},
      </if>
      <if test="modifyTime != null" >
        modify_time = #{modifyTime,jdbcType=TIMESTAMP},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.zteits.bill.domain.TBillingRuleCollect" >
    update t_billing_rule_collect
    set rule_collect_no = #{ruleCollectNo,jdbcType=VARCHAR},
      rule_no = #{ruleNo,jdbcType=VARCHAR},
      rule_collect_name = #{ruleCollectName,jdbcType=VARCHAR},
      free_time_type = #{freeTimeType,jdbcType=INTEGER},
      day_start_time = #{dayStartTime,jdbcType=TIME},
      day_end_time = #{dayEndTime,jdbcType=TIME},
      org_id = #{orgId,jdbcType=BIGINT},
      data_state = #{dataState,jdbcType=INTEGER},
      create_op = #{createOp,jdbcType=BIGINT},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      modify_op = #{modifyOp,jdbcType=BIGINT},
      modify_time = #{modifyTime,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>