Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
njgzx
dataease
Commits
7f637899
Unverified
提交
7f637899
authored
11月 30, 2021
作者:
王嘉豪
提交者:
GitHub
11月 30, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1322 from dataease/pr@dev@refactor_auth-model
refactor: 增加权限模型字段优化查询条件
上级
2cd38021
700fe805
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
137 行增加
和
5 行删除
+137
-5
VAuthModel.java
...end/src/main/java/io/dataease/base/domain/VAuthModel.java
+3
-0
VAuthModelExample.java
.../main/java/io/dataease/base/domain/VAuthModelExample.java
+70
-0
VAuthModelMapper.xml
...rc/main/java/io/dataease/base/mapper/VAuthModelMapper.xml
+18
-4
ExtVAuthModelMapper.java
...java/io/dataease/base/mapper/ext/ExtVAuthModelMapper.java
+1
-1
ExtVAuthModelMapper.xml
.../java/io/dataease/base/mapper/ext/ExtVAuthModelMapper.xml
+42
-0
VAuthModelRequest.java
...aease/controller/request/authModel/VAuthModelRequest.java
+3
-0
V28__de1.5.sql
backend/src/main/resources/db/migration/V28__de1.5.sql
+0
-0
没有找到文件。
backend/src/main/java/io/dataease/base/domain/VAuthModel.java
浏览文件 @
7f637899
...
@@ -23,5 +23,7 @@ public class VAuthModel implements Serializable {
...
@@ -23,5 +23,7 @@ public class VAuthModel implements Serializable {
private
Long
mode
;
private
Long
mode
;
private
String
dataSourceId
;
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
}
}
\ No newline at end of file
backend/src/main/java/io/dataease/base/domain/VAuthModelExample.java
浏览文件 @
7f637899
...
@@ -713,6 +713,76 @@ public class VAuthModelExample {
...
@@ -713,6 +713,76 @@ public class VAuthModelExample {
addCriterion
(
"`mode` not between"
,
value1
,
value2
,
"mode"
);
addCriterion
(
"`mode` not between"
,
value1
,
value2
,
"mode"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andDataSourceIdIsNull
()
{
addCriterion
(
"data_source_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDataSourceIdIsNotNull
()
{
addCriterion
(
"data_source_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDataSourceIdEqualTo
(
String
value
)
{
addCriterion
(
"data_source_id ="
,
value
,
"dataSourceId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDataSourceIdNotEqualTo
(
String
value
)
{
addCriterion
(
"data_source_id <>"
,
value
,
"dataSourceId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDataSourceIdGreaterThan
(
String
value
)
{
addCriterion
(
"data_source_id >"
,
value
,
"dataSourceId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDataSourceIdGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"data_source_id >="
,
value
,
"dataSourceId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDataSourceIdLessThan
(
String
value
)
{
addCriterion
(
"data_source_id <"
,
value
,
"dataSourceId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDataSourceIdLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"data_source_id <="
,
value
,
"dataSourceId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDataSourceIdLike
(
String
value
)
{
addCriterion
(
"data_source_id like"
,
value
,
"dataSourceId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDataSourceIdNotLike
(
String
value
)
{
addCriterion
(
"data_source_id not like"
,
value
,
"dataSourceId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDataSourceIdIn
(
List
<
String
>
values
)
{
addCriterion
(
"data_source_id in"
,
values
,
"dataSourceId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDataSourceIdNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"data_source_id not in"
,
values
,
"dataSourceId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDataSourceIdBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"data_source_id between"
,
value1
,
value2
,
"dataSourceId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDataSourceIdNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"data_source_id not between"
,
value1
,
value2
,
"dataSourceId"
);
return
(
Criteria
)
this
;
}
}
}
public
static
class
Criteria
extends
GeneratedCriteria
{
public
static
class
Criteria
extends
GeneratedCriteria
{
...
...
backend/src/main/java/io/dataease/base/mapper/VAuthModelMapper.xml
浏览文件 @
7f637899
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
<result
column=
"create_by"
jdbcType=
"VARCHAR"
property=
"createBy"
/>
<result
column=
"create_by"
jdbcType=
"VARCHAR"
property=
"createBy"
/>
<result
column=
"level"
jdbcType=
"BIGINT"
property=
"level"
/>
<result
column=
"level"
jdbcType=
"BIGINT"
property=
"level"
/>
<result
column=
"mode"
jdbcType=
"BIGINT"
property=
"mode"
/>
<result
column=
"mode"
jdbcType=
"BIGINT"
property=
"mode"
/>
<result
column=
"data_source_id"
jdbcType=
"VARCHAR"
property=
"dataSourceId"
/>
</resultMap>
</resultMap>
<resultMap
extends=
"BaseResultMap"
id=
"ResultMapWithBLOBs"
type=
"io.dataease.base.domain.VAuthModelWithBLOBs"
>
<resultMap
extends=
"BaseResultMap"
id=
"ResultMapWithBLOBs"
type=
"io.dataease.base.domain.VAuthModelWithBLOBs"
>
<result
column=
"name"
jdbcType=
"LONGVARCHAR"
property=
"name"
/>
<result
column=
"name"
jdbcType=
"LONGVARCHAR"
property=
"name"
/>
...
@@ -76,7 +77,7 @@
...
@@ -76,7 +77,7 @@
</sql>
</sql>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id, pid, node_type, model_type, model_inner_type, auth_type, create_by, `level`,
id, pid, node_type, model_type, model_inner_type, auth_type, create_by, `level`,
`mode`
`mode`
, data_source_id
</sql>
</sql>
<sql
id=
"Blob_Column_List"
>
<sql
id=
"Blob_Column_List"
>
`name`, `label`
`name`, `label`
...
@@ -121,11 +122,13 @@
...
@@ -121,11 +122,13 @@
insert into v_auth_model (id, pid, node_type,
insert into v_auth_model (id, pid, node_type,
model_type, model_inner_type, auth_type,
model_type, model_inner_type, auth_type,
create_by, `level`, `mode`,
create_by, `level`, `mode`,
`name`, `label`)
data_source_id, `name`, `label`
)
values (#{id,jdbcType=VARCHAR}, #{pid,jdbcType=VARCHAR}, #{nodeType,jdbcType=VARCHAR},
values (#{id,jdbcType=VARCHAR}, #{pid,jdbcType=VARCHAR}, #{nodeType,jdbcType=VARCHAR},
#{modelType,jdbcType=VARCHAR}, #{modelInnerType,jdbcType=VARCHAR}, #{authType,jdbcType=VARCHAR},
#{modelType,jdbcType=VARCHAR}, #{modelInnerType,jdbcType=VARCHAR}, #{authType,jdbcType=VARCHAR},
#{createBy,jdbcType=VARCHAR}, #{level,jdbcType=BIGINT}, #{mode,jdbcType=BIGINT},
#{createBy,jdbcType=VARCHAR}, #{level,jdbcType=BIGINT}, #{mode,jdbcType=BIGINT},
#{name,jdbcType=LONGVARCHAR}, #{label,jdbcType=LONGVARCHAR})
#{dataSourceId,jdbcType=VARCHAR}, #{name,jdbcType=LONGVARCHAR}, #{label,jdbcType=LONGVARCHAR}
)
</insert>
</insert>
<insert
id=
"insertSelective"
parameterType=
"io.dataease.base.domain.VAuthModelWithBLOBs"
>
<insert
id=
"insertSelective"
parameterType=
"io.dataease.base.domain.VAuthModelWithBLOBs"
>
insert into v_auth_model
insert into v_auth_model
...
@@ -157,6 +160,9 @@
...
@@ -157,6 +160,9 @@
<if
test=
"mode != null"
>
<if
test=
"mode != null"
>
`mode`,
`mode`,
</if>
</if>
<if
test=
"dataSourceId != null"
>
data_source_id,
</if>
<if
test=
"name != null"
>
<if
test=
"name != null"
>
`name`,
`name`,
</if>
</if>
...
@@ -192,6 +198,9 @@
...
@@ -192,6 +198,9 @@
<if
test=
"mode != null"
>
<if
test=
"mode != null"
>
#{mode,jdbcType=BIGINT},
#{mode,jdbcType=BIGINT},
</if>
</if>
<if
test=
"dataSourceId != null"
>
#{dataSourceId,jdbcType=VARCHAR},
</if>
<if
test=
"name != null"
>
<if
test=
"name != null"
>
#{name,jdbcType=LONGVARCHAR},
#{name,jdbcType=LONGVARCHAR},
</if>
</if>
...
@@ -236,6 +245,9 @@
...
@@ -236,6 +245,9 @@
<if
test=
"record.mode != null"
>
<if
test=
"record.mode != null"
>
`mode` = #{record.mode,jdbcType=BIGINT},
`mode` = #{record.mode,jdbcType=BIGINT},
</if>
</if>
<if
test=
"record.dataSourceId != null"
>
data_source_id = #{record.dataSourceId,jdbcType=VARCHAR},
</if>
<if
test=
"record.name != null"
>
<if
test=
"record.name != null"
>
`name` = #{record.name,jdbcType=LONGVARCHAR},
`name` = #{record.name,jdbcType=LONGVARCHAR},
</if>
</if>
...
@@ -258,6 +270,7 @@
...
@@ -258,6 +270,7 @@
create_by = #{record.createBy,jdbcType=VARCHAR},
create_by = #{record.createBy,jdbcType=VARCHAR},
`level` = #{record.level,jdbcType=BIGINT},
`level` = #{record.level,jdbcType=BIGINT},
`mode` = #{record.mode,jdbcType=BIGINT},
`mode` = #{record.mode,jdbcType=BIGINT},
data_source_id = #{record.dataSourceId,jdbcType=VARCHAR},
`name` = #{record.name,jdbcType=LONGVARCHAR},
`name` = #{record.name,jdbcType=LONGVARCHAR},
`label` = #{record.label,jdbcType=LONGVARCHAR}
`label` = #{record.label,jdbcType=LONGVARCHAR}
<if
test=
"_parameter != null"
>
<if
test=
"_parameter != null"
>
...
@@ -274,7 +287,8 @@
...
@@ -274,7 +287,8 @@
auth_type = #{record.authType,jdbcType=VARCHAR},
auth_type = #{record.authType,jdbcType=VARCHAR},
create_by = #{record.createBy,jdbcType=VARCHAR},
create_by = #{record.createBy,jdbcType=VARCHAR},
`level` = #{record.level,jdbcType=BIGINT},
`level` = #{record.level,jdbcType=BIGINT},
`mode` = #{record.mode,jdbcType=BIGINT}
`mode` = #{record.mode,jdbcType=BIGINT},
data_source_id = #{record.dataSourceId,jdbcType=VARCHAR}
<if
test=
"_parameter != null"
>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</if>
...
...
backend/src/main/java/io/dataease/base/mapper/ext/ExtVAuthModelMapper.java
浏览文件 @
7f637899
...
@@ -8,6 +8,6 @@ import java.util.List;
...
@@ -8,6 +8,6 @@ import java.util.List;
public
interface
ExtVAuthModelMapper
{
public
interface
ExtVAuthModelMapper
{
List
<
VAuthModelDTO
>
queryAuthModel
(
@Param
(
"re
quest
"
)
VAuthModelRequest
request
);
List
<
VAuthModelDTO
>
queryAuthModel
(
@Param
(
"re
cord
"
)
VAuthModelRequest
request
);
}
}
backend/src/main/java/io/dataease/base/mapper/ext/ExtVAuthModelMapper.xml
浏览文件 @
7f637899
...
@@ -55,6 +55,48 @@
...
@@ -55,6 +55,48 @@
) authInfo ON v_auth_model.id = authInfo.auth_source
) authInfo ON v_auth_model.id = authInfo.auth_source
WHERE
WHERE
FIND_IN_SET( v_auth_model.id, cids )
FIND_IN_SET( v_auth_model.id, cids )
<if
test=
"record.id != null"
>
and v_auth_model.id = #{record.id,jdbcType=VARCHAR}
</if>
<if
test=
"record.pid != null"
>
and v_auth_model.pid = #{record.pid,jdbcType=VARCHAR}
</if>
<if
test=
"record.nodeType != null"
>
and v_auth_model.node_type = #{record.nodeType,jdbcType=VARCHAR}
</if>
<if
test=
"record.modelType != null"
>
and v_auth_model.model_type = #{record.modelType,jdbcType=VARCHAR}
</if>
<if
test=
"record.modelInnerType != null"
>
and v_auth_model.model_inner_type = #{record.modelInnerType,jdbcType=VARCHAR}
</if>
<if
test=
"record.authType != null"
>
and v_auth_model.auth_type = #{record.authType,jdbcType=VARCHAR}
</if>
<if
test=
"record.createBy != null"
>
and v_auth_model.create_by = #{record.createBy,jdbcType=VARCHAR}
</if>
<if
test=
"record.level != null"
>
and v_auth_model.`level` = #{record.level,jdbcType=BIGINT}
</if>
<if
test=
"record.mode != null"
>
and v_auth_model.`mode` = #{record.mode,jdbcType=BIGINT}
</if>
<if
test=
"record.dataSourceId != null"
>
and v_auth_model.data_source_id = #{record.dataSourceId,jdbcType=VARCHAR}
</if>
<if
test=
"record.name != null"
>
and v_auth_model.`name` = #{record.name,jdbcType=LONGVARCHAR}
</if>
<if
test=
"record.label != null"
>
and v_auth_model.`label` = #{record.label,jdbcType=LONGVARCHAR}
</if>
<if
test=
"record.modelInnerTypeArray != null and record.modelInnerTypeArray.size() > 0"
>
v_auth_model.model_inner_type in
<foreach
collection=
"modelInnerTypeArray"
item=
"item"
separator=
","
open=
"("
close=
")"
>
#{item}
</foreach>
</if>
ORDER BY v_auth_model.node_type desc, CONVERT(v_auth_model.label using gbk) asc
ORDER BY v_auth_model.node_type desc, CONVERT(v_auth_model.label using gbk) asc
</select>
</select>
...
...
backend/src/main/java/io/dataease/controller/request/authModel/VAuthModelRequest.java
浏览文件 @
7f637899
...
@@ -3,6 +3,8 @@ package io.dataease.controller.request.authModel;
...
@@ -3,6 +3,8 @@ package io.dataease.controller.request.authModel;
import
io.dataease.dto.authModel.VAuthModelDTO
;
import
io.dataease.dto.authModel.VAuthModelDTO
;
import
lombok.Data
;
import
lombok.Data
;
import
java.util.List
;
/**
/**
* Author: wangjiahao
* Author: wangjiahao
* Date: 2021/11/24
* Date: 2021/11/24
...
@@ -15,5 +17,6 @@ public class VAuthModelRequest extends VAuthModelDTO {
...
@@ -15,5 +17,6 @@ public class VAuthModelRequest extends VAuthModelDTO {
private
String
privileges
;
private
String
privileges
;
private
Integer
datasetMode
;
private
Integer
datasetMode
;
private
boolean
clearEmptyDir
;
private
boolean
clearEmptyDir
;
private
List
<
String
>
modelInnerTypeArray
;
}
}
backend/src/main/resources/db/migration/V28__de1.5.sql
浏览文件 @
7f637899
This source diff could not be displayed because it is too large. You can
view the blob
instead.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论