All Downloads are FREE. Search and download functionalities are using the official Maven repository.

mybatis.cas.sqlmap.SysOptitemMapper.xml Maven / Gradle / Ivy

There is a newer version: 1.3.2
Show newest version
<?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="net.wicp.tams.cas.dao.SysOptitemMapper">
  <resultMap id="BaseResultMap" type="net.wicp.tams.cas.bean.models.SysOptitem">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <constructor>
      <idArg column="id" javaType="java.lang.Long" jdbcType="BIGINT" />
      <arg column="item_code" javaType="java.lang.String" jdbcType="VARCHAR" />
      <arg column="parent_id" javaType="java.lang.Long" jdbcType="BIGINT" />
      <arg column="parent_id_old" javaType="java.lang.Long" jdbcType="BIGINT" />
      <arg column="group_code" javaType="java.lang.String" jdbcType="VARCHAR" />
      <arg column="name_zh" javaType="java.lang.String" jdbcType="VARCHAR" />
      <arg column="name_en" javaType="java.lang.String" jdbcType="VARCHAR" />
      <arg column="order_no" javaType="java.lang.Integer" jdbcType="INTEGER" />
      <arg column="field1" javaType="java.lang.String" jdbcType="VARCHAR" />
      <arg column="field2" javaType="java.lang.String" jdbcType="VARCHAR" />
      <arg column="field3" javaType="java.lang.String" jdbcType="VARCHAR" />
      <arg column="field4" javaType="java.lang.String" jdbcType="VARCHAR" />
      <arg column="remark" javaType="java.lang.String" jdbcType="VARCHAR" />
      <arg column="status" javaType="java.lang.String" jdbcType="VARCHAR" />
      <arg column="status_parent" javaType="java.lang.String" jdbcType="VARCHAR" />
      <arg column="create_time" javaType="java.util.Date" jdbcType="TIMESTAMP" />
    </constructor>
  </resultMap>
  <sql id="Example_Where_Clause">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <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">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <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">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    id, item_code, parent_id, parent_id_old, group_code, name_zh, name_en, order_no, 
    field1, field2, field3, field4, remark, status, status_parent, create_time
  </sql>
  <select id="selectByExample" parameterType="net.wicp.tams.cas.bean.models.SysOptitemExample" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from sys_optitem
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
  <delete id="deleteByExample" parameterType="net.wicp.tams.cas.bean.models.SysOptitemExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from sys_optitem
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insertSelective" parameterType="net.wicp.tams.cas.bean.models.SysOptitem">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into sys_optitem
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="itemCode != null">
        item_code,
      </if>
      <if test="parentId != null">
        parent_id,
      </if>
      <if test="parentIdOld != null">
        parent_id_old,
      </if>
      <if test="groupCode != null">
        group_code,
      </if>
      <if test="nameZh != null">
        name_zh,
      </if>
      <if test="nameEn != null">
        name_en,
      </if>
      <if test="orderNo != null">
        order_no,
      </if>
      <if test="field1 != null">
        field1,
      </if>
      <if test="field2 != null">
        field2,
      </if>
      <if test="field3 != null">
        field3,
      </if>
      <if test="field4 != null">
        field4,
      </if>
      <if test="remark != null">
        remark,
      </if>
      <if test="status != null">
        status,
      </if>
      <if test="statusParent != null">
        status_parent,
      </if>
      <if test="createTime != null">
        create_time,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=BIGINT},
      </if>
      <if test="itemCode != null">
        #{itemCode,jdbcType=VARCHAR},
      </if>
      <if test="parentId != null">
        #{parentId,jdbcType=BIGINT},
      </if>
      <if test="parentIdOld != null">
        #{parentIdOld,jdbcType=BIGINT},
      </if>
      <if test="groupCode != null">
        #{groupCode,jdbcType=VARCHAR},
      </if>
      <if test="nameZh != null">
        #{nameZh,jdbcType=VARCHAR},
      </if>
      <if test="nameEn != null">
        #{nameEn,jdbcType=VARCHAR},
      </if>
      <if test="orderNo != null">
        #{orderNo,jdbcType=INTEGER},
      </if>
      <if test="field1 != null">
        #{field1,jdbcType=VARCHAR},
      </if>
      <if test="field2 != null">
        #{field2,jdbcType=VARCHAR},
      </if>
      <if test="field3 != null">
        #{field3,jdbcType=VARCHAR},
      </if>
      <if test="field4 != null">
        #{field4,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="status != null">
        #{status,jdbcType=VARCHAR},
      </if>
      <if test="statusParent != null">
        #{statusParent,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="net.wicp.tams.cas.bean.models.SysOptitemExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select count(*) from sys_optitem
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update sys_optitem
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=BIGINT},
      </if>
      <if test="record.itemCode != null">
        item_code = #{record.itemCode,jdbcType=VARCHAR},
      </if>
      <if test="record.parentId != null">
        parent_id = #{record.parentId,jdbcType=BIGINT},
      </if>
      <if test="record.parentIdOld != null">
        parent_id_old = #{record.parentIdOld,jdbcType=BIGINT},
      </if>
      <if test="record.groupCode != null">
        group_code = #{record.groupCode,jdbcType=VARCHAR},
      </if>
      <if test="record.nameZh != null">
        name_zh = #{record.nameZh,jdbcType=VARCHAR},
      </if>
      <if test="record.nameEn != null">
        name_en = #{record.nameEn,jdbcType=VARCHAR},
      </if>
      <if test="record.orderNo != null">
        order_no = #{record.orderNo,jdbcType=INTEGER},
      </if>
      <if test="record.field1 != null">
        field1 = #{record.field1,jdbcType=VARCHAR},
      </if>
      <if test="record.field2 != null">
        field2 = #{record.field2,jdbcType=VARCHAR},
      </if>
      <if test="record.field3 != null">
        field3 = #{record.field3,jdbcType=VARCHAR},
      </if>
      <if test="record.field4 != null">
        field4 = #{record.field4,jdbcType=VARCHAR},
      </if>
      <if test="record.remark != null">
        remark = #{record.remark,jdbcType=VARCHAR},
      </if>
      <if test="record.status != null">
        status = #{record.status,jdbcType=VARCHAR},
      </if>
      <if test="record.statusParent != null">
        status_parent = #{record.statusParent,jdbcType=VARCHAR},
      </if>
      <if test="record.createTime != null">
        create_time = #{record.createTime,jdbcType=TIMESTAMP},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update sys_optitem
    set id = #{record.id,jdbcType=BIGINT},
      item_code = #{record.itemCode,jdbcType=VARCHAR},
      parent_id = #{record.parentId,jdbcType=BIGINT},
      parent_id_old = #{record.parentIdOld,jdbcType=BIGINT},
      group_code = #{record.groupCode,jdbcType=VARCHAR},
      name_zh = #{record.nameZh,jdbcType=VARCHAR},
      name_en = #{record.nameEn,jdbcType=VARCHAR},
      order_no = #{record.orderNo,jdbcType=INTEGER},
      field1 = #{record.field1,jdbcType=VARCHAR},
      field2 = #{record.field2,jdbcType=VARCHAR},
      field3 = #{record.field3,jdbcType=VARCHAR},
      field4 = #{record.field4,jdbcType=VARCHAR},
      remark = #{record.remark,jdbcType=VARCHAR},
      status = #{record.status,jdbcType=VARCHAR},
      status_parent = #{record.statusParent,jdbcType=VARCHAR},
      create_time = #{record.createTime,jdbcType=TIMESTAMP}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="net.wicp.tams.cas.bean.models.SysOptitem">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update sys_optitem
    <set>
      <if test="itemCode != null">
        item_code = #{itemCode,jdbcType=VARCHAR},
      </if>
      <if test="parentId != null">
        parent_id = #{parentId,jdbcType=BIGINT},
      </if>
      <if test="parentIdOld != null">
        parent_id_old = #{parentIdOld,jdbcType=BIGINT},
      </if>
      <if test="groupCode != null">
        group_code = #{groupCode,jdbcType=VARCHAR},
      </if>
      <if test="nameZh != null">
        name_zh = #{nameZh,jdbcType=VARCHAR},
      </if>
      <if test="nameEn != null">
        name_en = #{nameEn,jdbcType=VARCHAR},
      </if>
      <if test="orderNo != null">
        order_no = #{orderNo,jdbcType=INTEGER},
      </if>
      <if test="field1 != null">
        field1 = #{field1,jdbcType=VARCHAR},
      </if>
      <if test="field2 != null">
        field2 = #{field2,jdbcType=VARCHAR},
      </if>
      <if test="field3 != null">
        field3 = #{field3,jdbcType=VARCHAR},
      </if>
      <if test="field4 != null">
        field4 = #{field4,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        remark = #{remark,jdbcType=VARCHAR},
      </if>
      <if test="status != null">
        status = #{status,jdbcType=VARCHAR},
      </if>
      <if test="statusParent != null">
        status_parent = #{statusParent,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy