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

mybatis.cas.sqlmap.SysTenantRelaMapper.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.SysTenantRelaMapper">
  <resultMap id="BaseResultMap" type="net.wicp.tams.cas.bean.models.SysTenantRela">
    <!--
      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="tenant_main" javaType="java.lang.Long" jdbcType="BIGINT" />
      <arg column="tenant_rela" javaType="java.lang.Long" jdbcType="BIGINT" />
      <arg column="rela_type" javaType="java.lang.String" jdbcType="VARCHAR" />
      <arg column="status" javaType="java.lang.String" jdbcType="VARCHAR" />
      <arg column="status_time" javaType="java.util.Date" jdbcType="TIMESTAMP" />
      <arg column="operate_reason" javaType="java.lang.String" jdbcType="VARCHAR" />
    </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, tenant_main, tenant_rela, rela_type, status, status_time, operate_reason
  </sql>
  <select id="selectByExample" parameterType="net.wicp.tams.cas.bean.models.SysTenantRelaExample" 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_tenant_rela
    <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.SysTenantRelaExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from sys_tenant_rela
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insertSelective" parameterType="net.wicp.tams.cas.bean.models.SysTenantRela">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into sys_tenant_rela
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="tenantMain != null">
        tenant_main,
      </if>
      <if test="tenantRela != null">
        tenant_rela,
      </if>
      <if test="relaType != null">
        rela_type,
      </if>
      <if test="status != null">
        status,
      </if>
      <if test="statusTime != null">
        status_time,
      </if>
      <if test="operateReason != null">
        operate_reason,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=BIGINT},
      </if>
      <if test="tenantMain != null">
        #{tenantMain,jdbcType=BIGINT},
      </if>
      <if test="tenantRela != null">
        #{tenantRela,jdbcType=BIGINT},
      </if>
      <if test="relaType != null">
        #{relaType,jdbcType=VARCHAR},
      </if>
      <if test="status != null">
        #{status,jdbcType=VARCHAR},
      </if>
      <if test="statusTime != null">
        #{statusTime,jdbcType=TIMESTAMP},
      </if>
      <if test="operateReason != null">
        #{operateReason,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="net.wicp.tams.cas.bean.models.SysTenantRelaExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select count(*) from sys_tenant_rela
    <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_tenant_rela
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=BIGINT},
      </if>
      <if test="record.tenantMain != null">
        tenant_main = #{record.tenantMain,jdbcType=BIGINT},
      </if>
      <if test="record.tenantRela != null">
        tenant_rela = #{record.tenantRela,jdbcType=BIGINT},
      </if>
      <if test="record.relaType != null">
        rela_type = #{record.relaType,jdbcType=VARCHAR},
      </if>
      <if test="record.status != null">
        status = #{record.status,jdbcType=VARCHAR},
      </if>
      <if test="record.statusTime != null">
        status_time = #{record.statusTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.operateReason != null">
        operate_reason = #{record.operateReason,jdbcType=VARCHAR},
      </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_tenant_rela
    set id = #{record.id,jdbcType=BIGINT},
      tenant_main = #{record.tenantMain,jdbcType=BIGINT},
      tenant_rela = #{record.tenantRela,jdbcType=BIGINT},
      rela_type = #{record.relaType,jdbcType=VARCHAR},
      status = #{record.status,jdbcType=VARCHAR},
      status_time = #{record.statusTime,jdbcType=TIMESTAMP},
      operate_reason = #{record.operateReason,jdbcType=VARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="net.wicp.tams.cas.bean.models.SysTenantRela">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update sys_tenant_rela
    <set>
      <if test="tenantMain != null">
        tenant_main = #{tenantMain,jdbcType=BIGINT},
      </if>
      <if test="tenantRela != null">
        tenant_rela = #{tenantRela,jdbcType=BIGINT},
      </if>
      <if test="relaType != null">
        rela_type = #{relaType,jdbcType=VARCHAR},
      </if>
      <if test="status != null">
        status = #{status,jdbcType=VARCHAR},
      </if>
      <if test="statusTime != null">
        status_time = #{statusTime,jdbcType=TIMESTAMP},
      </if>
      <if test="operateReason != null">
        operate_reason = #{operateReason,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy