Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
bb173504
提交
bb173504
authored
2月 24, 2021
作者:
fit2cloud-chenyw
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 增加用户管理dao层
上级
a3d5a9a5
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
577 行增加
和
0 行删除
+577
-0
SysUser.java
backend/src/main/java/io/dataease/base/domain/SysUser.java
+40
-0
SysUserExample.java
...src/main/java/io/dataease/base/domain/SysUserExample.java
+0
-0
SysUsersRolesExample.java
...in/java/io/dataease/base/domain/SysUsersRolesExample.java
+321
-0
SysUsersRolesKey.java
...c/main/java/io/dataease/base/domain/SysUsersRolesKey.java
+14
-0
SysUserMapper.java
.../src/main/java/io/dataease/base/mapper/SysUserMapper.java
+31
-0
SysUserMapper.xml
...d/src/main/java/io/dataease/base/mapper/SysUserMapper.xml
+0
-0
SysUsersRolesMapper.java
...ain/java/io/dataease/base/mapper/SysUsersRolesMapper.java
+25
-0
SysUsersRolesMapper.xml
...main/java/io/dataease/base/mapper/SysUsersRolesMapper.xml
+146
-0
没有找到文件。
backend/src/main/java/io/dataease/base/domain/SysUser.java
0 → 100644
浏览文件 @
bb173504
package
io
.
dataease
.
base
.
domain
;
import
java.io.Serializable
;
import
lombok.Data
;
@Data
public
class
SysUser
implements
Serializable
{
private
Long
userId
;
private
Long
deptId
;
private
String
username
;
private
String
nickName
;
private
String
gender
;
private
String
phone
;
private
String
email
;
private
String
password
;
private
Boolean
isAdmin
;
private
Long
enabled
;
private
String
createBy
;
private
String
updateBy
;
private
Long
pwdResetTime
;
private
Long
createTime
;
private
Long
updateTime
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
backend/src/main/java/io/dataease/base/domain/SysUserExample.java
0 → 100644
浏览文件 @
bb173504
差异被折叠。
点击展开。
backend/src/main/java/io/dataease/base/domain/SysUsersRolesExample.java
0 → 100644
浏览文件 @
bb173504
package
io
.
dataease
.
base
.
domain
;
import
java.util.ArrayList
;
import
java.util.List
;
public
class
SysUsersRolesExample
{
protected
String
orderByClause
;
protected
boolean
distinct
;
protected
List
<
Criteria
>
oredCriteria
;
public
SysUsersRolesExample
()
{
oredCriteria
=
new
ArrayList
<
Criteria
>();
}
public
void
setOrderByClause
(
String
orderByClause
)
{
this
.
orderByClause
=
orderByClause
;
}
public
String
getOrderByClause
()
{
return
orderByClause
;
}
public
void
setDistinct
(
boolean
distinct
)
{
this
.
distinct
=
distinct
;
}
public
boolean
isDistinct
()
{
return
distinct
;
}
public
List
<
Criteria
>
getOredCriteria
()
{
return
oredCriteria
;
}
public
void
or
(
Criteria
criteria
)
{
oredCriteria
.
add
(
criteria
);
}
public
Criteria
or
()
{
Criteria
criteria
=
createCriteriaInternal
();
oredCriteria
.
add
(
criteria
);
return
criteria
;
}
public
Criteria
createCriteria
()
{
Criteria
criteria
=
createCriteriaInternal
();
if
(
oredCriteria
.
size
()
==
0
)
{
oredCriteria
.
add
(
criteria
);
}
return
criteria
;
}
protected
Criteria
createCriteriaInternal
()
{
Criteria
criteria
=
new
Criteria
();
return
criteria
;
}
public
void
clear
()
{
oredCriteria
.
clear
();
orderByClause
=
null
;
distinct
=
false
;
}
protected
abstract
static
class
GeneratedCriteria
{
protected
List
<
Criterion
>
criteria
;
protected
GeneratedCriteria
()
{
super
();
criteria
=
new
ArrayList
<
Criterion
>();
}
public
boolean
isValid
()
{
return
criteria
.
size
()
>
0
;
}
public
List
<
Criterion
>
getAllCriteria
()
{
return
criteria
;
}
public
List
<
Criterion
>
getCriteria
()
{
return
criteria
;
}
protected
void
addCriterion
(
String
condition
)
{
if
(
condition
==
null
)
{
throw
new
RuntimeException
(
"Value for condition cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
));
}
protected
void
addCriterion
(
String
condition
,
Object
value
,
String
property
)
{
if
(
value
==
null
)
{
throw
new
RuntimeException
(
"Value for "
+
property
+
" cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
,
value
));
}
protected
void
addCriterion
(
String
condition
,
Object
value1
,
Object
value2
,
String
property
)
{
if
(
value1
==
null
||
value2
==
null
)
{
throw
new
RuntimeException
(
"Between values for "
+
property
+
" cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
,
value1
,
value2
));
}
public
Criteria
andUserIdIsNull
()
{
addCriterion
(
"user_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdIsNotNull
()
{
addCriterion
(
"user_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdEqualTo
(
Long
value
)
{
addCriterion
(
"user_id ="
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"user_id <>"
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdGreaterThan
(
Long
value
)
{
addCriterion
(
"user_id >"
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"user_id >="
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdLessThan
(
Long
value
)
{
addCriterion
(
"user_id <"
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"user_id <="
,
value
,
"userId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"user_id in"
,
values
,
"userId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"user_id not in"
,
values
,
"userId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"user_id between"
,
value1
,
value2
,
"userId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUserIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"user_id not between"
,
value1
,
value2
,
"userId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRoleIdIsNull
()
{
addCriterion
(
"role_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRoleIdIsNotNull
()
{
addCriterion
(
"role_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRoleIdEqualTo
(
Long
value
)
{
addCriterion
(
"role_id ="
,
value
,
"roleId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRoleIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"role_id <>"
,
value
,
"roleId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRoleIdGreaterThan
(
Long
value
)
{
addCriterion
(
"role_id >"
,
value
,
"roleId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRoleIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"role_id >="
,
value
,
"roleId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRoleIdLessThan
(
Long
value
)
{
addCriterion
(
"role_id <"
,
value
,
"roleId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRoleIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"role_id <="
,
value
,
"roleId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRoleIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"role_id in"
,
values
,
"roleId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRoleIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"role_id not in"
,
values
,
"roleId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRoleIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"role_id between"
,
value1
,
value2
,
"roleId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRoleIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"role_id not between"
,
value1
,
value2
,
"roleId"
);
return
(
Criteria
)
this
;
}
}
public
static
class
Criteria
extends
GeneratedCriteria
{
protected
Criteria
()
{
super
();
}
}
public
static
class
Criterion
{
private
String
condition
;
private
Object
value
;
private
Object
secondValue
;
private
boolean
noValue
;
private
boolean
singleValue
;
private
boolean
betweenValue
;
private
boolean
listValue
;
private
String
typeHandler
;
public
String
getCondition
()
{
return
condition
;
}
public
Object
getValue
()
{
return
value
;
}
public
Object
getSecondValue
()
{
return
secondValue
;
}
public
boolean
isNoValue
()
{
return
noValue
;
}
public
boolean
isSingleValue
()
{
return
singleValue
;
}
public
boolean
isBetweenValue
()
{
return
betweenValue
;
}
public
boolean
isListValue
()
{
return
listValue
;
}
public
String
getTypeHandler
()
{
return
typeHandler
;
}
protected
Criterion
(
String
condition
)
{
super
();
this
.
condition
=
condition
;
this
.
typeHandler
=
null
;
this
.
noValue
=
true
;
}
protected
Criterion
(
String
condition
,
Object
value
,
String
typeHandler
)
{
super
();
this
.
condition
=
condition
;
this
.
value
=
value
;
this
.
typeHandler
=
typeHandler
;
if
(
value
instanceof
List
<?>)
{
this
.
listValue
=
true
;
}
else
{
this
.
singleValue
=
true
;
}
}
protected
Criterion
(
String
condition
,
Object
value
)
{
this
(
condition
,
value
,
null
);
}
protected
Criterion
(
String
condition
,
Object
value
,
Object
secondValue
,
String
typeHandler
)
{
super
();
this
.
condition
=
condition
;
this
.
value
=
value
;
this
.
secondValue
=
secondValue
;
this
.
typeHandler
=
typeHandler
;
this
.
betweenValue
=
true
;
}
protected
Criterion
(
String
condition
,
Object
value
,
Object
secondValue
)
{
this
(
condition
,
value
,
secondValue
,
null
);
}
}
}
\ No newline at end of file
backend/src/main/java/io/dataease/base/domain/SysUsersRolesKey.java
0 → 100644
浏览文件 @
bb173504
package
io
.
dataease
.
base
.
domain
;
import
java.io.Serializable
;
import
lombok.Data
;
@Data
public
class
SysUsersRolesKey
implements
Serializable
{
private
Long
userId
;
private
Long
roleId
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
backend/src/main/java/io/dataease/base/mapper/SysUserMapper.java
0 → 100644
浏览文件 @
bb173504
package
io
.
dataease
.
base
.
mapper
;
import
io.dataease.base.domain.SysUser
;
import
io.dataease.base.domain.SysUserExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
public
interface
SysUserMapper
{
long
countByExample
(
SysUserExample
example
);
int
deleteByExample
(
SysUserExample
example
);
int
deleteByPrimaryKey
(
Long
userId
);
int
insert
(
SysUser
record
);
int
insertSelective
(
SysUser
record
);
List
<
SysUser
>
selectByExample
(
SysUserExample
example
);
SysUser
selectByPrimaryKey
(
Long
userId
);
int
updateByExampleSelective
(
@Param
(
"record"
)
SysUser
record
,
@Param
(
"example"
)
SysUserExample
example
);
int
updateByExample
(
@Param
(
"record"
)
SysUser
record
,
@Param
(
"example"
)
SysUserExample
example
);
int
updateByPrimaryKeySelective
(
SysUser
record
);
int
updateByPrimaryKey
(
SysUser
record
);
}
\ No newline at end of file
backend/src/main/java/io/dataease/base/mapper/SysUserMapper.xml
0 → 100644
浏览文件 @
bb173504
差异被折叠。
点击展开。
backend/src/main/java/io/dataease/base/mapper/SysUsersRolesMapper.java
0 → 100644
浏览文件 @
bb173504
package
io
.
dataease
.
base
.
mapper
;
import
io.dataease.base.domain.SysUsersRolesExample
;
import
io.dataease.base.domain.SysUsersRolesKey
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
public
interface
SysUsersRolesMapper
{
long
countByExample
(
SysUsersRolesExample
example
);
int
deleteByExample
(
SysUsersRolesExample
example
);
int
deleteByPrimaryKey
(
SysUsersRolesKey
key
);
int
insert
(
SysUsersRolesKey
record
);
int
insertSelective
(
SysUsersRolesKey
record
);
List
<
SysUsersRolesKey
>
selectByExample
(
SysUsersRolesExample
example
);
int
updateByExampleSelective
(
@Param
(
"record"
)
SysUsersRolesKey
record
,
@Param
(
"example"
)
SysUsersRolesExample
example
);
int
updateByExample
(
@Param
(
"record"
)
SysUsersRolesKey
record
,
@Param
(
"example"
)
SysUsersRolesExample
example
);
}
\ No newline at end of file
backend/src/main/java/io/dataease/base/mapper/SysUsersRolesMapper.xml
0 → 100644
浏览文件 @
bb173504
<?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.SysUsersRolesMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"io.dataease.base.domain.SysUsersRolesKey"
>
<id
column=
"user_id"
jdbcType=
"BIGINT"
property=
"userId"
/>
<id
column=
"role_id"
jdbcType=
"BIGINT"
property=
"roleId"
/>
</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"
>
user_id, role_id
</sql>
<select
id=
"selectByExample"
parameterType=
"io.dataease.base.domain.SysUsersRolesExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from sys_users_roles
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"io.dataease.base.domain.SysUsersRolesKey"
>
delete from sys_users_roles
where user_id = #{userId,jdbcType=BIGINT}
and role_id = #{roleId,jdbcType=BIGINT}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"io.dataease.base.domain.SysUsersRolesExample"
>
delete from sys_users_roles
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"io.dataease.base.domain.SysUsersRolesKey"
>
insert into sys_users_roles (user_id, role_id)
values (#{userId,jdbcType=BIGINT}, #{roleId,jdbcType=BIGINT})
</insert>
<insert
id=
"insertSelective"
parameterType=
"io.dataease.base.domain.SysUsersRolesKey"
>
insert into sys_users_roles
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"userId != null"
>
user_id,
</if>
<if
test=
"roleId != null"
>
role_id,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"userId != null"
>
#{userId,jdbcType=BIGINT},
</if>
<if
test=
"roleId != null"
>
#{roleId,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"io.dataease.base.domain.SysUsersRolesExample"
resultType=
"java.lang.Long"
>
select count(*) from sys_users_roles
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update sys_users_roles
<set>
<if
test=
"record.userId != null"
>
user_id = #{record.userId,jdbcType=BIGINT},
</if>
<if
test=
"record.roleId != null"
>
role_id = #{record.roleId,jdbcType=BIGINT},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update sys_users_roles
set user_id = #{record.userId,jdbcType=BIGINT},
role_id = #{record.roleId,jdbcType=BIGINT}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
</mapper>
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论