EnclosedTideChannelConfigMapper.xml 14.9 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.EnclosedTideChannelConfigMapper">
  <resultMap id="BaseResultMap" type="com.zteits.park.domain.EnclosedTideChannelConfig">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="config_no" jdbcType="VARCHAR" property="configNo" />
    <result column="channel_use_type" jdbcType="INTEGER" property="channelUseType" />
    <result column="pl_no" jdbcType="VARCHAR" property="plNo" />
    <result column="channel_number" jdbcType="VARCHAR" property="channelNumber" />
    <result column="channel_direction" jdbcType="INTEGER" property="channelDirection" />
    <result column="allow_pass_type" jdbcType="VARCHAR" property="allowPassType" />
    <result column="config_sort" jdbcType="INTEGER" property="configSort" />
    <result column="start_time" jdbcType="TIME" property="startTime" />
    <result column="end_time" jdbcType="TIME" property="endTime" />
    <result column="is_open" jdbcType="INTEGER" property="isOpen" />
    <result column="create_empid" jdbcType="VARCHAR" property="createEmpid" />
    <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
    <result column="modfiy_empid" jdbcType="VARCHAR" property="modfiyEmpid" />
    <result column="modfiy_date" jdbcType="TIMESTAMP" property="modfiyDate" />
    <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, config_no, channel_use_type, pl_no, channel_number, channel_direction, allow_pass_type, 
    config_sort, start_time, end_time, is_open, create_empid, create_date, modfiy_empid, 
    modfiy_date, data_state
  </sql>
  <select id="selectByExample" parameterType="com.zteits.park.domain.EnclosedTideChannelConfigExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from enclosed_tide_channel_config
    <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 enclosed_tide_channel_config
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from enclosed_tide_channel_config
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <delete id="deleteByExample" parameterType="com.zteits.park.domain.EnclosedTideChannelConfigExample">
    delete from enclosed_tide_channel_config
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.zteits.park.domain.EnclosedTideChannelConfig">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into enclosed_tide_channel_config (config_no, channel_use_type, pl_no, 
      channel_number, channel_direction, allow_pass_type, 
      config_sort, start_time, end_time, 
      is_open, create_empid, create_date, 
      modfiy_empid, modfiy_date, data_state
      )
    values (#{configNo,jdbcType=VARCHAR}, #{channelUseType,jdbcType=INTEGER}, #{plNo,jdbcType=VARCHAR}, 
      #{channelNumber,jdbcType=VARCHAR}, #{channelDirection,jdbcType=INTEGER}, #{allowPassType,jdbcType=VARCHAR}, 
      #{configSort,jdbcType=INTEGER}, #{startTime,jdbcType=TIME}, #{endTime,jdbcType=TIME}, 
      #{isOpen,jdbcType=INTEGER}, #{createEmpid,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}, 
      #{modfiyEmpid,jdbcType=VARCHAR}, #{modfiyDate,jdbcType=TIMESTAMP}, #{dataState,jdbcType=INTEGER}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.zteits.park.domain.EnclosedTideChannelConfig">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into enclosed_tide_channel_config
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="configNo != null">
        config_no,
      </if>
      <if test="channelUseType != null">
        channel_use_type,
      </if>
      <if test="plNo != null">
        pl_no,
      </if>
      <if test="channelNumber != null">
        channel_number,
      </if>
      <if test="channelDirection != null">
        channel_direction,
      </if>
      <if test="allowPassType != null">
        allow_pass_type,
      </if>
      <if test="configSort != null">
        config_sort,
      </if>
      <if test="startTime != null">
        start_time,
      </if>
      <if test="endTime != null">
        end_time,
      </if>
      <if test="isOpen != null">
        is_open,
      </if>
      <if test="createEmpid != null">
        create_empid,
      </if>
      <if test="createDate != null">
        create_date,
      </if>
      <if test="modfiyEmpid != null">
        modfiy_empid,
      </if>
      <if test="modfiyDate != null">
        modfiy_date,
      </if>
      <if test="dataState != null">
        data_state,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="configNo != null">
        #{configNo,jdbcType=VARCHAR},
      </if>
      <if test="channelUseType != null">
        #{channelUseType,jdbcType=INTEGER},
      </if>
      <if test="plNo != null">
        #{plNo,jdbcType=VARCHAR},
      </if>
      <if test="channelNumber != null">
        #{channelNumber,jdbcType=VARCHAR},
      </if>
      <if test="channelDirection != null">
        #{channelDirection,jdbcType=INTEGER},
      </if>
      <if test="allowPassType != null">
        #{allowPassType,jdbcType=VARCHAR},
      </if>
      <if test="configSort != null">
        #{configSort,jdbcType=INTEGER},
      </if>
      <if test="startTime != null">
        #{startTime,jdbcType=TIME},
      </if>
      <if test="endTime != null">
        #{endTime,jdbcType=TIME},
      </if>
      <if test="isOpen != null">
        #{isOpen,jdbcType=INTEGER},
      </if>
      <if test="createEmpid != null">
        #{createEmpid,jdbcType=VARCHAR},
      </if>
      <if test="createDate != null">
        #{createDate,jdbcType=TIMESTAMP},
      </if>
      <if test="modfiyEmpid != null">
        #{modfiyEmpid,jdbcType=VARCHAR},
      </if>
      <if test="modfiyDate != null">
        #{modfiyDate,jdbcType=TIMESTAMP},
      </if>
      <if test="dataState != null">
        #{dataState,jdbcType=INTEGER},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.zteits.park.domain.EnclosedTideChannelConfigExample" resultType="java.lang.Long">
    select count(*) from enclosed_tide_channel_config
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update enclosed_tide_channel_config
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=BIGINT},
      </if>
      <if test="record.configNo != null">
        config_no = #{record.configNo,jdbcType=VARCHAR},
      </if>
      <if test="record.channelUseType != null">
        channel_use_type = #{record.channelUseType,jdbcType=INTEGER},
      </if>
      <if test="record.plNo != null">
        pl_no = #{record.plNo,jdbcType=VARCHAR},
      </if>
      <if test="record.channelNumber != null">
        channel_number = #{record.channelNumber,jdbcType=VARCHAR},
      </if>
      <if test="record.channelDirection != null">
        channel_direction = #{record.channelDirection,jdbcType=INTEGER},
      </if>
      <if test="record.allowPassType != null">
        allow_pass_type = #{record.allowPassType,jdbcType=VARCHAR},
      </if>
      <if test="record.configSort != null">
        config_sort = #{record.configSort,jdbcType=INTEGER},
      </if>
      <if test="record.startTime != null">
        start_time = #{record.startTime,jdbcType=TIME},
      </if>
      <if test="record.endTime != null">
        end_time = #{record.endTime,jdbcType=TIME},
      </if>
      <if test="record.isOpen != null">
        is_open = #{record.isOpen,jdbcType=INTEGER},
      </if>
      <if test="record.createEmpid != null">
        create_empid = #{record.createEmpid,jdbcType=VARCHAR},
      </if>
      <if test="record.createDate != null">
        create_date = #{record.createDate,jdbcType=TIMESTAMP},
      </if>
      <if test="record.modfiyEmpid != null">
        modfiy_empid = #{record.modfiyEmpid,jdbcType=VARCHAR},
      </if>
      <if test="record.modfiyDate != null">
        modfiy_date = #{record.modfiyDate,jdbcType=TIMESTAMP},
      </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 enclosed_tide_channel_config
    set id = #{record.id,jdbcType=BIGINT},
      config_no = #{record.configNo,jdbcType=VARCHAR},
      channel_use_type = #{record.channelUseType,jdbcType=INTEGER},
      pl_no = #{record.plNo,jdbcType=VARCHAR},
      channel_number = #{record.channelNumber,jdbcType=VARCHAR},
      channel_direction = #{record.channelDirection,jdbcType=INTEGER},
      allow_pass_type = #{record.allowPassType,jdbcType=VARCHAR},
      config_sort = #{record.configSort,jdbcType=INTEGER},
      start_time = #{record.startTime,jdbcType=TIME},
      end_time = #{record.endTime,jdbcType=TIME},
      is_open = #{record.isOpen,jdbcType=INTEGER},
      create_empid = #{record.createEmpid,jdbcType=VARCHAR},
      create_date = #{record.createDate,jdbcType=TIMESTAMP},
      modfiy_empid = #{record.modfiyEmpid,jdbcType=VARCHAR},
      modfiy_date = #{record.modfiyDate,jdbcType=TIMESTAMP},
      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.EnclosedTideChannelConfig">
    update enclosed_tide_channel_config
    <set>
      <if test="configNo != null">
        config_no = #{configNo,jdbcType=VARCHAR},
      </if>
      <if test="channelUseType != null">
        channel_use_type = #{channelUseType,jdbcType=INTEGER},
      </if>
      <if test="plNo != null">
        pl_no = #{plNo,jdbcType=VARCHAR},
      </if>
      <if test="channelNumber != null">
        channel_number = #{channelNumber,jdbcType=VARCHAR},
      </if>
      <if test="channelDirection != null">
        channel_direction = #{channelDirection,jdbcType=INTEGER},
      </if>
      <if test="allowPassType != null">
        allow_pass_type = #{allowPassType,jdbcType=VARCHAR},
      </if>
      <if test="configSort != null">
        config_sort = #{configSort,jdbcType=INTEGER},
      </if>
      <if test="startTime != null">
        start_time = #{startTime,jdbcType=TIME},
      </if>
      <if test="endTime != null">
        end_time = #{endTime,jdbcType=TIME},
      </if>
      <if test="isOpen != null">
        is_open = #{isOpen,jdbcType=INTEGER},
      </if>
      <if test="createEmpid != null">
        create_empid = #{createEmpid,jdbcType=VARCHAR},
      </if>
      <if test="createDate != null">
        create_date = #{createDate,jdbcType=TIMESTAMP},
      </if>
      <if test="modfiyEmpid != null">
        modfiy_empid = #{modfiyEmpid,jdbcType=VARCHAR},
      </if>
      <if test="modfiyDate != null">
        modfiy_date = #{modfiyDate,jdbcType=TIMESTAMP},
      </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.EnclosedTideChannelConfig">
    update enclosed_tide_channel_config
    set config_no = #{configNo,jdbcType=VARCHAR},
      channel_use_type = #{channelUseType,jdbcType=INTEGER},
      pl_no = #{plNo,jdbcType=VARCHAR},
      channel_number = #{channelNumber,jdbcType=VARCHAR},
      channel_direction = #{channelDirection,jdbcType=INTEGER},
      allow_pass_type = #{allowPassType,jdbcType=VARCHAR},
      config_sort = #{configSort,jdbcType=INTEGER},
      start_time = #{startTime,jdbcType=TIME},
      end_time = #{endTime,jdbcType=TIME},
      is_open = #{isOpen,jdbcType=INTEGER},
      create_empid = #{createEmpid,jdbcType=VARCHAR},
      create_date = #{createDate,jdbcType=TIMESTAMP},
      modfiy_empid = #{modfiyEmpid,jdbcType=VARCHAR},
      modfiy_date = #{modfiyDate,jdbcType=TIMESTAMP},
      data_state = #{dataState,jdbcType=INTEGER}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>