TpPFreeberthStatisticRuleMapper.xml 13.8 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.job.mapper.TpPFreeberthStatisticRuleMapper">
  <resultMap id="BaseResultMap" type="com.zteits.job.domain.TpPFreeberthStatisticRule">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="pl_no" jdbcType="VARCHAR" property="plNo" />
    <result column="statistic_rule_no" jdbcType="VARCHAR" property="statisticRuleNo" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
    <result column="data_state" jdbcType="INTEGER" property="dataState" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
    <result column="create_op" jdbcType="BIGINT" property="createOp" />
    <result column="modify_time" jdbcType="TIMESTAMP" property="modifyTime" />
    <result column="modify_op" jdbcType="BIGINT" property="modifyOp" />
    <result column="opt_flg" jdbcType="CHAR" property="optFlg" />
  </resultMap>
  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.zteits.job.domain.TpPFreeberthStatisticRule">
    <result column="statistic_rule_sql" jdbcType="LONGVARCHAR" property="statisticRuleSql" />
  </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, pl_no, statistic_rule_no, remark, data_state, create_time, create_op, modify_time, 
    modify_op, opt_flg
  </sql>
  <sql id="Blob_Column_List">
    statistic_rule_sql
  </sql>
  <select id="selectByExampleWithBLOBs" parameterType="com.zteits.job.domain.TpPFreeberthStatisticRuleExample" resultMap="ResultMapWithBLOBs">
    select
    <if test="distinct">
      distinct
    </if>
    'true' as QUERYID,
    <include refid="Base_Column_List" />
    ,
    <include refid="Blob_Column_List" />
    from tp_p_freeberth_statistic_rule
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByExample" parameterType="com.zteits.job.domain.TpPFreeberthStatisticRuleExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    'true' as QUERYID,
    <include refid="Base_Column_List" />
    from tp_p_freeberth_statistic_rule
    <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="ResultMapWithBLOBs">
    select 
    <include refid="Base_Column_List" />
    ,
    <include refid="Blob_Column_List" />
    from tp_p_freeberth_statistic_rule
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from tp_p_freeberth_statistic_rule
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <delete id="deleteByExample" parameterType="com.zteits.job.domain.TpPFreeberthStatisticRuleExample">
    delete from tp_p_freeberth_statistic_rule
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.zteits.job.domain.TpPFreeberthStatisticRule">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into tp_p_freeberth_statistic_rule (pl_no, statistic_rule_no, remark, 
      data_state, create_time, create_op, 
      modify_time, modify_op, opt_flg, 
      statistic_rule_sql)
    values (#{plNo,jdbcType=VARCHAR}, #{statisticRuleNo,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, 
      #{dataState,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{createOp,jdbcType=BIGINT}, 
      #{modifyTime,jdbcType=TIMESTAMP}, #{modifyOp,jdbcType=BIGINT}, #{optFlg,jdbcType=CHAR}, 
      #{statisticRuleSql,jdbcType=LONGVARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.zteits.job.domain.TpPFreeberthStatisticRule">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into tp_p_freeberth_statistic_rule
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="plNo != null">
        pl_no,
      </if>
      <if test="statisticRuleNo != null">
        statistic_rule_no,
      </if>
      <if test="remark != null">
        remark,
      </if>
      <if test="dataState != null">
        data_state,
      </if>
      <if test="createTime != null">
        create_time,
      </if>
      <if test="createOp != null">
        create_op,
      </if>
      <if test="modifyTime != null">
        modify_time,
      </if>
      <if test="modifyOp != null">
        modify_op,
      </if>
      <if test="optFlg != null">
        opt_flg,
      </if>
      <if test="statisticRuleSql != null">
        statistic_rule_sql,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="plNo != null">
        #{plNo,jdbcType=VARCHAR},
      </if>
      <if test="statisticRuleNo != null">
        #{statisticRuleNo,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="dataState != null">
        #{dataState,jdbcType=INTEGER},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="createOp != null">
        #{createOp,jdbcType=BIGINT},
      </if>
      <if test="modifyTime != null">
        #{modifyTime,jdbcType=TIMESTAMP},
      </if>
      <if test="modifyOp != null">
        #{modifyOp,jdbcType=BIGINT},
      </if>
      <if test="optFlg != null">
        #{optFlg,jdbcType=CHAR},
      </if>
      <if test="statisticRuleSql != null">
        #{statisticRuleSql,jdbcType=LONGVARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.zteits.job.domain.TpPFreeberthStatisticRuleExample" resultType="java.lang.Long">
    select count(*) from tp_p_freeberth_statistic_rule
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update tp_p_freeberth_statistic_rule
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=BIGINT},
      </if>
      <if test="record.plNo != null">
        pl_no = #{record.plNo,jdbcType=VARCHAR},
      </if>
      <if test="record.statisticRuleNo != null">
        statistic_rule_no = #{record.statisticRuleNo,jdbcType=VARCHAR},
      </if>
      <if test="record.remark != null">
        remark = #{record.remark,jdbcType=VARCHAR},
      </if>
      <if test="record.dataState != null">
        data_state = #{record.dataState,jdbcType=INTEGER},
      </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.modifyTime != null">
        modify_time = #{record.modifyTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.modifyOp != null">
        modify_op = #{record.modifyOp,jdbcType=BIGINT},
      </if>
      <if test="record.optFlg != null">
        opt_flg = #{record.optFlg,jdbcType=CHAR},
      </if>
      <if test="record.statisticRuleSql != null">
        statistic_rule_sql = #{record.statisticRuleSql,jdbcType=LONGVARCHAR},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExampleWithBLOBs" parameterType="map">
    update tp_p_freeberth_statistic_rule
    set id = #{record.id,jdbcType=BIGINT},
      pl_no = #{record.plNo,jdbcType=VARCHAR},
      statistic_rule_no = #{record.statisticRuleNo,jdbcType=VARCHAR},
      remark = #{record.remark,jdbcType=VARCHAR},
      data_state = #{record.dataState,jdbcType=INTEGER},
      create_time = #{record.createTime,jdbcType=TIMESTAMP},
      create_op = #{record.createOp,jdbcType=BIGINT},
      modify_time = #{record.modifyTime,jdbcType=TIMESTAMP},
      modify_op = #{record.modifyOp,jdbcType=BIGINT},
      opt_flg = #{record.optFlg,jdbcType=CHAR},
      statistic_rule_sql = #{record.statisticRuleSql,jdbcType=LONGVARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    update tp_p_freeberth_statistic_rule
    set id = #{record.id,jdbcType=BIGINT},
      pl_no = #{record.plNo,jdbcType=VARCHAR},
      statistic_rule_no = #{record.statisticRuleNo,jdbcType=VARCHAR},
      remark = #{record.remark,jdbcType=VARCHAR},
      data_state = #{record.dataState,jdbcType=INTEGER},
      create_time = #{record.createTime,jdbcType=TIMESTAMP},
      create_op = #{record.createOp,jdbcType=BIGINT},
      modify_time = #{record.modifyTime,jdbcType=TIMESTAMP},
      modify_op = #{record.modifyOp,jdbcType=BIGINT},
      opt_flg = #{record.optFlg,jdbcType=CHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.zteits.job.domain.TpPFreeberthStatisticRule">
    update tp_p_freeberth_statistic_rule
    <set>
      <if test="plNo != null">
        pl_no = #{plNo,jdbcType=VARCHAR},
      </if>
      <if test="statisticRuleNo != null">
        statistic_rule_no = #{statisticRuleNo,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        remark = #{remark,jdbcType=VARCHAR},
      </if>
      <if test="dataState != null">
        data_state = #{dataState,jdbcType=INTEGER},
      </if>
      <if test="createTime != null">
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="createOp != null">
        create_op = #{createOp,jdbcType=BIGINT},
      </if>
      <if test="modifyTime != null">
        modify_time = #{modifyTime,jdbcType=TIMESTAMP},
      </if>
      <if test="modifyOp != null">
        modify_op = #{modifyOp,jdbcType=BIGINT},
      </if>
      <if test="optFlg != null">
        opt_flg = #{optFlg,jdbcType=CHAR},
      </if>
      <if test="statisticRuleSql != null">
        statistic_rule_sql = #{statisticRuleSql,jdbcType=LONGVARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.zteits.job.domain.TpPFreeberthStatisticRule">
    update tp_p_freeberth_statistic_rule
    set pl_no = #{plNo,jdbcType=VARCHAR},
      statistic_rule_no = #{statisticRuleNo,jdbcType=VARCHAR},
      remark = #{remark,jdbcType=VARCHAR},
      data_state = #{dataState,jdbcType=INTEGER},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      create_op = #{createOp,jdbcType=BIGINT},
      modify_time = #{modifyTime,jdbcType=TIMESTAMP},
      modify_op = #{modifyOp,jdbcType=BIGINT},
      opt_flg = #{optFlg,jdbcType=CHAR},
      statistic_rule_sql = #{statisticRuleSql,jdbcType=LONGVARCHAR}
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.zteits.job.domain.TpPFreeberthStatisticRule">
    update tp_p_freeberth_statistic_rule
    set pl_no = #{plNo,jdbcType=VARCHAR},
      statistic_rule_no = #{statisticRuleNo,jdbcType=VARCHAR},
      remark = #{remark,jdbcType=VARCHAR},
      data_state = #{dataState,jdbcType=INTEGER},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      create_op = #{createOp,jdbcType=BIGINT},
      modify_time = #{modifyTime,jdbcType=TIMESTAMP},
      modify_op = #{modifyOp,jdbcType=BIGINT},
      opt_flg = #{optFlg,jdbcType=CHAR}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>