forked from github/dataease
276 lines
10 KiB
XML
276 lines
10 KiB
XML
![]() |
<?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="io.dataease.base.mapper.SysAuthMapper">
|
||
|
<resultMap id="BaseResultMap" type="io.dataease.base.domain.SysAuth">
|
||
|
<id column="id" jdbcType="VARCHAR" property="id" />
|
||
|
<result column="auth_source" jdbcType="VARCHAR" property="authSource" />
|
||
|
<result column="auth_source_type" jdbcType="VARCHAR" property="authSourceType" />
|
||
|
<result column="auth_target" jdbcType="VARCHAR" property="authTarget" />
|
||
|
<result column="auth_target_type" jdbcType="VARCHAR" property="authTargetType" />
|
||
|
<result column="auth_time" jdbcType="BIGINT" property="authTime" />
|
||
|
<result column="auth_details" jdbcType="VARCHAR" property="authDetails" />
|
||
|
<result column="auth_user" jdbcType="VARCHAR" property="authUser" />
|
||
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||
|
</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, auth_source, auth_source_type, auth_target, auth_target_type, auth_time, auth_details,
|
||
|
auth_user, update_time
|
||
|
</sql>
|
||
|
<select id="selectByExample" parameterType="io.dataease.base.domain.SysAuthExample" resultMap="BaseResultMap">
|
||
|
select
|
||
|
<if test="distinct">
|
||
|
distinct
|
||
|
</if>
|
||
|
<include refid="Base_Column_List" />
|
||
|
from sys_auth
|
||
|
<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.String" resultMap="BaseResultMap">
|
||
|
select
|
||
|
<include refid="Base_Column_List" />
|
||
|
from sys_auth
|
||
|
where id = #{id,jdbcType=VARCHAR}
|
||
|
</select>
|
||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||
|
delete from sys_auth
|
||
|
where id = #{id,jdbcType=VARCHAR}
|
||
|
</delete>
|
||
|
<delete id="deleteByExample" parameterType="io.dataease.base.domain.SysAuthExample">
|
||
|
delete from sys_auth
|
||
|
<if test="_parameter != null">
|
||
|
<include refid="Example_Where_Clause" />
|
||
|
</if>
|
||
|
</delete>
|
||
|
<insert id="insert" parameterType="io.dataease.base.domain.SysAuth">
|
||
|
insert into sys_auth (id, auth_source, auth_source_type,
|
||
|
auth_target, auth_target_type, auth_time,
|
||
|
auth_details, auth_user, update_time
|
||
|
)
|
||
|
values (#{id,jdbcType=VARCHAR}, #{authSource,jdbcType=VARCHAR}, #{authSourceType,jdbcType=VARCHAR},
|
||
|
#{authTarget,jdbcType=VARCHAR}, #{authTargetType,jdbcType=VARCHAR}, #{authTime,jdbcType=BIGINT},
|
||
|
#{authDetails,jdbcType=VARCHAR}, #{authUser,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}
|
||
|
)
|
||
|
</insert>
|
||
|
<insert id="insertSelective" parameterType="io.dataease.base.domain.SysAuth">
|
||
|
insert into sys_auth
|
||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
<if test="id != null">
|
||
|
id,
|
||
|
</if>
|
||
|
<if test="authSource != null">
|
||
|
auth_source,
|
||
|
</if>
|
||
|
<if test="authSourceType != null">
|
||
|
auth_source_type,
|
||
|
</if>
|
||
|
<if test="authTarget != null">
|
||
|
auth_target,
|
||
|
</if>
|
||
|
<if test="authTargetType != null">
|
||
|
auth_target_type,
|
||
|
</if>
|
||
|
<if test="authTime != null">
|
||
|
auth_time,
|
||
|
</if>
|
||
|
<if test="authDetails != null">
|
||
|
auth_details,
|
||
|
</if>
|
||
|
<if test="authUser != null">
|
||
|
auth_user,
|
||
|
</if>
|
||
|
<if test="updateTime != null">
|
||
|
update_time,
|
||
|
</if>
|
||
|
</trim>
|
||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||
|
<if test="id != null">
|
||
|
#{id,jdbcType=VARCHAR},
|
||
|
</if>
|
||
|
<if test="authSource != null">
|
||
|
#{authSource,jdbcType=VARCHAR},
|
||
|
</if>
|
||
|
<if test="authSourceType != null">
|
||
|
#{authSourceType,jdbcType=VARCHAR},
|
||
|
</if>
|
||
|
<if test="authTarget != null">
|
||
|
#{authTarget,jdbcType=VARCHAR},
|
||
|
</if>
|
||
|
<if test="authTargetType != null">
|
||
|
#{authTargetType,jdbcType=VARCHAR},
|
||
|
</if>
|
||
|
<if test="authTime != null">
|
||
|
#{authTime,jdbcType=BIGINT},
|
||
|
</if>
|
||
|
<if test="authDetails != null">
|
||
|
#{authDetails,jdbcType=VARCHAR},
|
||
|
</if>
|
||
|
<if test="authUser != null">
|
||
|
#{authUser,jdbcType=VARCHAR},
|
||
|
</if>
|
||
|
<if test="updateTime != null">
|
||
|
#{updateTime,jdbcType=TIMESTAMP},
|
||
|
</if>
|
||
|
</trim>
|
||
|
</insert>
|
||
|
<select id="countByExample" parameterType="io.dataease.base.domain.SysAuthExample" resultType="java.lang.Long">
|
||
|
select count(*) from sys_auth
|
||
|
<if test="_parameter != null">
|
||
|
<include refid="Example_Where_Clause" />
|
||
|
</if>
|
||
|
</select>
|
||
|
<update id="updateByExampleSelective" parameterType="map">
|
||
|
update sys_auth
|
||
|
<set>
|
||
|
<if test="record.id != null">
|
||
|
id = #{record.id,jdbcType=VARCHAR},
|
||
|
</if>
|
||
|
<if test="record.authSource != null">
|
||
|
auth_source = #{record.authSource,jdbcType=VARCHAR},
|
||
|
</if>
|
||
|
<if test="record.authSourceType != null">
|
||
|
auth_source_type = #{record.authSourceType,jdbcType=VARCHAR},
|
||
|
</if>
|
||
|
<if test="record.authTarget != null">
|
||
|
auth_target = #{record.authTarget,jdbcType=VARCHAR},
|
||
|
</if>
|
||
|
<if test="record.authTargetType != null">
|
||
|
auth_target_type = #{record.authTargetType,jdbcType=VARCHAR},
|
||
|
</if>
|
||
|
<if test="record.authTime != null">
|
||
|
auth_time = #{record.authTime,jdbcType=BIGINT},
|
||
|
</if>
|
||
|
<if test="record.authDetails != null">
|
||
|
auth_details = #{record.authDetails,jdbcType=VARCHAR},
|
||
|
</if>
|
||
|
<if test="record.authUser != null">
|
||
|
auth_user = #{record.authUser,jdbcType=VARCHAR},
|
||
|
</if>
|
||
|
<if test="record.updateTime != null">
|
||
|
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||
|
</if>
|
||
|
</set>
|
||
|
<if test="_parameter != null">
|
||
|
<include refid="Update_By_Example_Where_Clause" />
|
||
|
</if>
|
||
|
</update>
|
||
|
<update id="updateByExample" parameterType="map">
|
||
|
update sys_auth
|
||
|
set id = #{record.id,jdbcType=VARCHAR},
|
||
|
auth_source = #{record.authSource,jdbcType=VARCHAR},
|
||
|
auth_source_type = #{record.authSourceType,jdbcType=VARCHAR},
|
||
|
auth_target = #{record.authTarget,jdbcType=VARCHAR},
|
||
|
auth_target_type = #{record.authTargetType,jdbcType=VARCHAR},
|
||
|
auth_time = #{record.authTime,jdbcType=BIGINT},
|
||
|
auth_details = #{record.authDetails,jdbcType=VARCHAR},
|
||
|
auth_user = #{record.authUser,jdbcType=VARCHAR},
|
||
|
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
|
||
|
<if test="_parameter != null">
|
||
|
<include refid="Update_By_Example_Where_Clause" />
|
||
|
</if>
|
||
|
</update>
|
||
|
<update id="updateByPrimaryKeySelective" parameterType="io.dataease.base.domain.SysAuth">
|
||
|
update sys_auth
|
||
|
<set>
|
||
|
<if test="authSource != null">
|
||
|
auth_source = #{authSource,jdbcType=VARCHAR},
|
||
|
</if>
|
||
|
<if test="authSourceType != null">
|
||
|
auth_source_type = #{authSourceType,jdbcType=VARCHAR},
|
||
|
</if>
|
||
|
<if test="authTarget != null">
|
||
|
auth_target = #{authTarget,jdbcType=VARCHAR},
|
||
|
</if>
|
||
|
<if test="authTargetType != null">
|
||
|
auth_target_type = #{authTargetType,jdbcType=VARCHAR},
|
||
|
</if>
|
||
|
<if test="authTime != null">
|
||
|
auth_time = #{authTime,jdbcType=BIGINT},
|
||
|
</if>
|
||
|
<if test="authDetails != null">
|
||
|
auth_details = #{authDetails,jdbcType=VARCHAR},
|
||
|
</if>
|
||
|
<if test="authUser != null">
|
||
|
auth_user = #{authUser,jdbcType=VARCHAR},
|
||
|
</if>
|
||
|
<if test="updateTime != null">
|
||
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||
|
</if>
|
||
|
</set>
|
||
|
where id = #{id,jdbcType=VARCHAR}
|
||
|
</update>
|
||
|
<update id="updateByPrimaryKey" parameterType="io.dataease.base.domain.SysAuth">
|
||
|
update sys_auth
|
||
|
set auth_source = #{authSource,jdbcType=VARCHAR},
|
||
|
auth_source_type = #{authSourceType,jdbcType=VARCHAR},
|
||
|
auth_target = #{authTarget,jdbcType=VARCHAR},
|
||
|
auth_target_type = #{authTargetType,jdbcType=VARCHAR},
|
||
|
auth_time = #{authTime,jdbcType=BIGINT},
|
||
|
auth_details = #{authDetails,jdbcType=VARCHAR},
|
||
|
auth_user = #{authUser,jdbcType=VARCHAR},
|
||
|
update_time = #{updateTime,jdbcType=TIMESTAMP}
|
||
|
where id = #{id,jdbcType=VARCHAR}
|
||
|
</update>
|
||
|
</mapper>
|