You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

541 lines
20 KiB

4 months ago
<?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.dongjian.dashboard.back.dao.auto.BasicUserMapper">
<resultMap id="BaseResultMap" type="com.dongjian.dashboard.back.model.BasicUser">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="user_type" jdbcType="INTEGER" property="userType" />
<result column="company_id" jdbcType="BIGINT" property="companyId" />
<result column="username" jdbcType="VARCHAR" property="username" />
<result column="login_name" jdbcType="VARCHAR" property="loginName" />
<result column="password" jdbcType="VARCHAR" property="password" />
<result column="salt" jdbcType="VARCHAR" property="salt" />
<result column="email" jdbcType="VARCHAR" property="email" />
<result column="mfa_secret" jdbcType="VARCHAR" property="mfaSecret" />
<result column="mfa_bind" jdbcType="INTEGER" property="mfaBind" />
<result column="mobile_number" jdbcType="VARCHAR" property="mobileNumber" />
<result column="last_login_time" jdbcType="BIGINT" property="lastLoginTime" />
<result column="flag" jdbcType="INTEGER" property="flag" />
<result column="expire_time" jdbcType="BIGINT" property="expireTime" />
<result column="create_time" jdbcType="BIGINT" property="createTime" />
<result column="creator_id" jdbcType="BIGINT" property="creatorId" />
<result column="modify_time" jdbcType="BIGINT" property="modifyTime" />
<result column="modifier_id" jdbcType="BIGINT" property="modifierId" />
<result column="super_role" jdbcType="INTEGER" property="superRole" />
4 months ago
<result column="create_platform" jdbcType="INTEGER" property="createPlatform" />
<result column="last_name" jdbcType="VARCHAR" property="lastName" />
<result column="first_name" jdbcType="VARCHAR" property="firstName" />
4 months ago
</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, user_type, company_id, username, login_name, `password`, salt, email, mfa_secret,
mfa_bind, mobile_number, last_login_time, flag, expire_time, create_time, creator_id,
modify_time, modifier_id, super_role, create_platform, last_name, first_name
4 months ago
</sql>
<select id="selectByExample" parameterType="com.dongjian.dashboard.back.model.BasicUserExample" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
'true' as QUERYID,
<include refid="Base_Column_List" />
from basic_user
<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">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from basic_user
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from basic_user
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.dongjian.dashboard.back.model.BasicUserExample">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from basic_user
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.dongjian.dashboard.back.model.BasicUser">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into basic_user (user_type, company_id, username,
login_name, `password`, salt,
email, mfa_secret, mfa_bind,
mobile_number, last_login_time, flag,
expire_time, create_time, creator_id,
4 months ago
modify_time, modifier_id, super_role,
create_platform, last_name, first_name
)
4 months ago
values (#{userType,jdbcType=INTEGER}, #{companyId,jdbcType=BIGINT}, #{username,jdbcType=VARCHAR},
#{loginName,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, #{salt,jdbcType=VARCHAR},
#{email,jdbcType=VARCHAR}, #{mfaSecret,jdbcType=VARCHAR}, #{mfaBind,jdbcType=INTEGER},
#{mobileNumber,jdbcType=VARCHAR}, #{lastLoginTime,jdbcType=BIGINT}, #{flag,jdbcType=INTEGER},
#{expireTime,jdbcType=BIGINT}, #{createTime,jdbcType=BIGINT}, #{creatorId,jdbcType=BIGINT},
4 months ago
#{modifyTime,jdbcType=BIGINT}, #{modifierId,jdbcType=BIGINT}, #{superRole,jdbcType=INTEGER},
#{createPlatform,jdbcType=INTEGER}, #{lastName,jdbcType=VARCHAR}, #{firstName,jdbcType=VARCHAR}
)
4 months ago
</insert>
<insert id="insertSelective" parameterType="com.dongjian.dashboard.back.model.BasicUser">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into basic_user
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userType != null">
user_type,
</if>
<if test="companyId != null">
company_id,
</if>
<if test="username != null">
username,
</if>
<if test="loginName != null">
login_name,
</if>
<if test="password != null">
`password`,
</if>
<if test="salt != null">
salt,
</if>
<if test="email != null">
email,
</if>
<if test="mfaSecret != null">
mfa_secret,
</if>
<if test="mfaBind != null">
mfa_bind,
</if>
<if test="mobileNumber != null">
mobile_number,
</if>
<if test="lastLoginTime != null">
last_login_time,
</if>
<if test="flag != null">
flag,
</if>
<if test="expireTime != null">
expire_time,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="creatorId != null">
creator_id,
</if>
<if test="modifyTime != null">
modify_time,
</if>
<if test="modifierId != null">
modifier_id,
</if>
<if test="superRole != null">
super_role,
</if>
4 months ago
<if test="createPlatform != null">
create_platform,
</if>
<if test="lastName != null">
last_name,
</if>
<if test="firstName != null">
first_name,
</if>
4 months ago
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userType != null">
#{userType,jdbcType=INTEGER},
</if>
<if test="companyId != null">
#{companyId,jdbcType=BIGINT},
</if>
<if test="username != null">
#{username,jdbcType=VARCHAR},
</if>
<if test="loginName != null">
#{loginName,jdbcType=VARCHAR},
</if>
<if test="password != null">
#{password,jdbcType=VARCHAR},
</if>
<if test="salt != null">
#{salt,jdbcType=VARCHAR},
</if>
<if test="email != null">
#{email,jdbcType=VARCHAR},
</if>
<if test="mfaSecret != null">
#{mfaSecret,jdbcType=VARCHAR},
</if>
<if test="mfaBind != null">
#{mfaBind,jdbcType=INTEGER},
</if>
<if test="mobileNumber != null">
#{mobileNumber,jdbcType=VARCHAR},
</if>
<if test="lastLoginTime != null">
#{lastLoginTime,jdbcType=BIGINT},
</if>
<if test="flag != null">
#{flag,jdbcType=INTEGER},
</if>
<if test="expireTime != null">
#{expireTime,jdbcType=BIGINT},
</if>
<if test="createTime != null">
#{createTime,jdbcType=BIGINT},
</if>
<if test="creatorId != null">
#{creatorId,jdbcType=BIGINT},
</if>
<if test="modifyTime != null">
#{modifyTime,jdbcType=BIGINT},
</if>
<if test="modifierId != null">
#{modifierId,jdbcType=BIGINT},
</if>
<if test="superRole != null">
#{superRole,jdbcType=INTEGER},
</if>
4 months ago
<if test="createPlatform != null">
#{createPlatform,jdbcType=INTEGER},
</if>
<if test="lastName != null">
#{lastName,jdbcType=VARCHAR},
</if>
<if test="firstName != null">
#{firstName,jdbcType=VARCHAR},
</if>
4 months ago
</trim>
</insert>
<select id="countByExample" parameterType="com.dongjian.dashboard.back.model.BasicUserExample" resultType="java.lang.Long">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from basic_user
<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 basic_user
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.userType != null">
user_type = #{record.userType,jdbcType=INTEGER},
</if>
<if test="record.companyId != null">
company_id = #{record.companyId,jdbcType=BIGINT},
</if>
<if test="record.username != null">
username = #{record.username,jdbcType=VARCHAR},
</if>
<if test="record.loginName != null">
login_name = #{record.loginName,jdbcType=VARCHAR},
</if>
<if test="record.password != null">
`password` = #{record.password,jdbcType=VARCHAR},
</if>
<if test="record.salt != null">
salt = #{record.salt,jdbcType=VARCHAR},
</if>
<if test="record.email != null">
email = #{record.email,jdbcType=VARCHAR},
</if>
<if test="record.mfaSecret != null">
mfa_secret = #{record.mfaSecret,jdbcType=VARCHAR},
</if>
<if test="record.mfaBind != null">
mfa_bind = #{record.mfaBind,jdbcType=INTEGER},
</if>
<if test="record.mobileNumber != null">
mobile_number = #{record.mobileNumber,jdbcType=VARCHAR},
</if>
<if test="record.lastLoginTime != null">
last_login_time = #{record.lastLoginTime,jdbcType=BIGINT},
</if>
<if test="record.flag != null">
flag = #{record.flag,jdbcType=INTEGER},
</if>
<if test="record.expireTime != null">
expire_time = #{record.expireTime,jdbcType=BIGINT},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=BIGINT},
</if>
<if test="record.creatorId != null">
creator_id = #{record.creatorId,jdbcType=BIGINT},
</if>
<if test="record.modifyTime != null">
modify_time = #{record.modifyTime,jdbcType=BIGINT},
</if>
<if test="record.modifierId != null">
modifier_id = #{record.modifierId,jdbcType=BIGINT},
</if>
<if test="record.superRole != null">
super_role = #{record.superRole,jdbcType=INTEGER},
</if>
4 months ago
<if test="record.createPlatform != null">
create_platform = #{record.createPlatform,jdbcType=INTEGER},
</if>
<if test="record.lastName != null">
last_name = #{record.lastName,jdbcType=VARCHAR},
</if>
<if test="record.firstName != null">
first_name = #{record.firstName,jdbcType=VARCHAR},
</if>
4 months ago
</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 basic_user
set id = #{record.id,jdbcType=BIGINT},
user_type = #{record.userType,jdbcType=INTEGER},
company_id = #{record.companyId,jdbcType=BIGINT},
username = #{record.username,jdbcType=VARCHAR},
login_name = #{record.loginName,jdbcType=VARCHAR},
`password` = #{record.password,jdbcType=VARCHAR},
salt = #{record.salt,jdbcType=VARCHAR},
email = #{record.email,jdbcType=VARCHAR},
mfa_secret = #{record.mfaSecret,jdbcType=VARCHAR},
mfa_bind = #{record.mfaBind,jdbcType=INTEGER},
mobile_number = #{record.mobileNumber,jdbcType=VARCHAR},
last_login_time = #{record.lastLoginTime,jdbcType=BIGINT},
flag = #{record.flag,jdbcType=INTEGER},
expire_time = #{record.expireTime,jdbcType=BIGINT},
create_time = #{record.createTime,jdbcType=BIGINT},
creator_id = #{record.creatorId,jdbcType=BIGINT},
modify_time = #{record.modifyTime,jdbcType=BIGINT},
modifier_id = #{record.modifierId,jdbcType=BIGINT},
4 months ago
super_role = #{record.superRole,jdbcType=INTEGER},
create_platform = #{record.createPlatform,jdbcType=INTEGER},
last_name = #{record.lastName,jdbcType=VARCHAR},
first_name = #{record.firstName,jdbcType=VARCHAR}
4 months ago
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.dongjian.dashboard.back.model.BasicUser">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update basic_user
<set>
<if test="userType != null">
user_type = #{userType,jdbcType=INTEGER},
</if>
<if test="companyId != null">
company_id = #{companyId,jdbcType=BIGINT},
</if>
<if test="username != null">
username = #{username,jdbcType=VARCHAR},
</if>
<if test="loginName != null">
login_name = #{loginName,jdbcType=VARCHAR},
</if>
<if test="password != null">
`password` = #{password,jdbcType=VARCHAR},
</if>
<if test="salt != null">
salt = #{salt,jdbcType=VARCHAR},
</if>
<if test="email != null">
email = #{email,jdbcType=VARCHAR},
</if>
<if test="mfaSecret != null">
mfa_secret = #{mfaSecret,jdbcType=VARCHAR},
</if>
<if test="mfaBind != null">
mfa_bind = #{mfaBind,jdbcType=INTEGER},
</if>
<if test="mobileNumber != null">
mobile_number = #{mobileNumber,jdbcType=VARCHAR},
</if>
<if test="lastLoginTime != null">
last_login_time = #{lastLoginTime,jdbcType=BIGINT},
</if>
<if test="flag != null">
flag = #{flag,jdbcType=INTEGER},
</if>
<if test="expireTime != null">
expire_time = #{expireTime,jdbcType=BIGINT},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=BIGINT},
</if>
<if test="creatorId != null">
creator_id = #{creatorId,jdbcType=BIGINT},
</if>
<if test="modifyTime != null">
modify_time = #{modifyTime,jdbcType=BIGINT},
</if>
<if test="modifierId != null">
modifier_id = #{modifierId,jdbcType=BIGINT},
</if>
<if test="superRole != null">
super_role = #{superRole,jdbcType=INTEGER},
</if>
4 months ago
<if test="createPlatform != null">
create_platform = #{createPlatform,jdbcType=INTEGER},
</if>
<if test="lastName != null">
last_name = #{lastName,jdbcType=VARCHAR},
</if>
<if test="firstName != null">
first_name = #{firstName,jdbcType=VARCHAR},
</if>
4 months ago
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.dongjian.dashboard.back.model.BasicUser">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update basic_user
set user_type = #{userType,jdbcType=INTEGER},
company_id = #{companyId,jdbcType=BIGINT},
username = #{username,jdbcType=VARCHAR},
login_name = #{loginName,jdbcType=VARCHAR},
`password` = #{password,jdbcType=VARCHAR},
salt = #{salt,jdbcType=VARCHAR},
email = #{email,jdbcType=VARCHAR},
mfa_secret = #{mfaSecret,jdbcType=VARCHAR},
mfa_bind = #{mfaBind,jdbcType=INTEGER},
mobile_number = #{mobileNumber,jdbcType=VARCHAR},
last_login_time = #{lastLoginTime,jdbcType=BIGINT},
flag = #{flag,jdbcType=INTEGER},
expire_time = #{expireTime,jdbcType=BIGINT},
create_time = #{createTime,jdbcType=BIGINT},
creator_id = #{creatorId,jdbcType=BIGINT},
modify_time = #{modifyTime,jdbcType=BIGINT},
modifier_id = #{modifierId,jdbcType=BIGINT},
4 months ago
super_role = #{superRole,jdbcType=INTEGER},
create_platform = #{createPlatform,jdbcType=INTEGER},
last_name = #{lastName,jdbcType=VARCHAR},
first_name = #{firstName,jdbcType=VARCHAR}
4 months ago
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>