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

mybatis.cas.sqlmap.SysPermissionsMapper.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.SysPermissionsMapper">
  <resultMap id="BaseResultMap" type="net.wicp.tams.cas.bean.models.SysPermissions">
    <!--
      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="name" javaType="java.lang.String" jdbcType="VARCHAR" />
      <arg column="opt_type" javaType="java.lang.String" jdbcType="VARCHAR" />
      <arg column="data_pattern" javaType="java.lang.String" jdbcType="VARCHAR" />
      <arg column="data_value" javaType="java.lang.String" jdbcType="VARCHAR" />
      <arg column="url_pattern" javaType="java.lang.String" jdbcType="VARCHAR" />
      <arg column="url_value" javaType="java.lang.String" jdbcType="VARCHAR" />
      <arg column="tenant_id" javaType="java.lang.Long" jdbcType="BIGINT" />
    </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, name, opt_type, data_pattern, data_value, url_pattern, url_value, tenant_id
  </sql>
  <select id="selectByExample" parameterType="net.wicp.tams.cas.bean.models.SysPermissionsExample" 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_permissions
    <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.SysPermissionsExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from sys_permissions
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insertSelective" parameterType="net.wicp.tams.cas.bean.models.SysPermissions">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into sys_permissions
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="name != null">
        name,
      </if>
      <if test="optType != null">
        opt_type,
      </if>
      <if test="dataPattern != null">
        data_pattern,
      </if>
      <if test="dataValue != null">
        data_value,
      </if>
      <if test="urlPattern != null">
        url_pattern,
      </if>
      <if test="urlValue != null">
        url_value,
      </if>
      <if test="tenantId != null">
        tenant_id,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=BIGINT},
      </if>
      <if test="name != null">
        #{name,jdbcType=VARCHAR},
      </if>
      <if test="optType != null">
        #{optType,jdbcType=VARCHAR},
      </if>
      <if test="dataPattern != null">
        #{dataPattern,jdbcType=VARCHAR},
      </if>
      <if test="dataValue != null">
        #{dataValue,jdbcType=VARCHAR},
      </if>
      <if test="urlPattern != null">
        #{urlPattern,jdbcType=VARCHAR},
      </if>
      <if test="urlValue != null">
        #{urlValue,jdbcType=VARCHAR},
      </if>
      <if test="tenantId != null">
        #{tenantId,jdbcType=BIGINT},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="net.wicp.tams.cas.bean.models.SysPermissionsExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select count(*) from sys_permissions
    <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_permissions
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=BIGINT},
      </if>
      <if test="record.name != null">
        name = #{record.name,jdbcType=VARCHAR},
      </if>
      <if test="record.optType != null">
        opt_type = #{record.optType,jdbcType=VARCHAR},
      </if>
      <if test="record.dataPattern != null">
        data_pattern = #{record.dataPattern,jdbcType=VARCHAR},
      </if>
      <if test="record.dataValue != null">
        data_value = #{record.dataValue,jdbcType=VARCHAR},
      </if>
      <if test="record.urlPattern != null">
        url_pattern = #{record.urlPattern,jdbcType=VARCHAR},
      </if>
      <if test="record.urlValue != null">
        url_value = #{record.urlValue,jdbcType=VARCHAR},
      </if>
      <if test="record.tenantId != null">
        tenant_id = #{record.tenantId,jdbcType=BIGINT},
      </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_permissions
    set id = #{record.id,jdbcType=BIGINT},
      name = #{record.name,jdbcType=VARCHAR},
      opt_type = #{record.optType,jdbcType=VARCHAR},
      data_pattern = #{record.dataPattern,jdbcType=VARCHAR},
      data_value = #{record.dataValue,jdbcType=VARCHAR},
      url_pattern = #{record.urlPattern,jdbcType=VARCHAR},
      url_value = #{record.urlValue,jdbcType=VARCHAR},
      tenant_id = #{record.tenantId,jdbcType=BIGINT}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="net.wicp.tams.cas.bean.models.SysPermissions">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update sys_permissions
    <set>
      <if test="name != null">
        name = #{name,jdbcType=VARCHAR},
      </if>
      <if test="optType != null">
        opt_type = #{optType,jdbcType=VARCHAR},
      </if>
      <if test="dataPattern != null">
        data_pattern = #{dataPattern,jdbcType=VARCHAR},
      </if>
      <if test="dataValue != null">
        data_value = #{dataValue,jdbcType=VARCHAR},
      </if>
      <if test="urlPattern != null">
        url_pattern = #{urlPattern,jdbcType=VARCHAR},
      </if>
      <if test="urlValue != null">
        url_value = #{urlValue,jdbcType=VARCHAR},
      </if>
      <if test="tenantId != null">
        tenant_id = #{tenantId,jdbcType=BIGINT},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy