Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
33f43369
提交
33f43369
authored
5月 27, 2022
作者:
taojinlong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: 驱动插件操作日志
上级
0b04549d
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
17 行增加
和
20 行删除
+17
-20
DeLogAnnotationHandler.java
...ain/java/io/dataease/auth/aop/DeLogAnnotationHandler.java
+0
-1
DeLogUtils.java
...d/src/main/java/io/dataease/commons/utils/DeLogUtils.java
+8
-2
DriverMgmController.java
...o/dataease/controller/datasource/DriverMgmController.java
+0
-14
ExtSysLogMapper.xml
backend/src/main/java/io/dataease/ext/ExtSysLogMapper.xml
+2
-2
DriverService.java
...in/java/io/dataease/service/datasource/DriverService.java
+7
-1
没有找到文件。
backend/src/main/java/io/dataease/auth/aop/DeLogAnnotationHandler.java
浏览文件 @
33f43369
...
@@ -44,7 +44,6 @@ public class DeLogAnnotationHandler {
...
@@ -44,7 +44,6 @@ public class DeLogAnnotationHandler {
befores
.
add
(
SysLogConstants
.
OPERATE_TYPE
.
DELETE
.
getValue
());
befores
.
add
(
SysLogConstants
.
OPERATE_TYPE
.
DELETE
.
getValue
());
befores
.
add
(
SysLogConstants
.
OPERATE_TYPE
.
UNSHARE
.
getValue
());
befores
.
add
(
SysLogConstants
.
OPERATE_TYPE
.
UNSHARE
.
getValue
());
befores
.
add
(
SysLogConstants
.
OPERATE_TYPE
.
UNAUTHORIZE
.
getValue
());
befores
.
add
(
SysLogConstants
.
OPERATE_TYPE
.
UNAUTHORIZE
.
getValue
());
befores
.
add
(
SysLogConstants
.
OPERATE_TYPE
.
UPLOADFILE
.
getValue
());
}
}
private
SysLogDTO
exec
(
JoinPoint
point
,
DeLog
deLog
)
throws
Exception
{
private
SysLogDTO
exec
(
JoinPoint
point
,
DeLog
deLog
)
throws
Exception
{
...
...
backend/src/main/java/io/dataease/commons/utils/DeLogUtils.java
浏览文件 @
33f43369
...
@@ -66,8 +66,14 @@ public class DeLogUtils {
...
@@ -66,8 +66,14 @@ public class DeLogUtils {
items
.
add
(
folderItem
);
items
.
add
(
folderItem
);
sysLogDTO
.
setPositions
(
items
);
sysLogDTO
.
setPositions
(
items
);
}
else
{
}
else
{
List
<
FolderItem
>
parentsAndSelf
=
logManager
.
parentsAndSelf
(
positionId
.
toString
(),
sourcetype
);
if
(
sourcetype
==
SOURCE_TYPE
.
DRIVER_FILE
){
sysLogDTO
.
setPositions
(
parentsAndSelf
);
List
<
FolderItem
>
parentsAndSelf
=
logManager
.
parentsAndSelf
(
positionId
.
toString
(),
SOURCE_TYPE
.
DRIVER
);
sysLogDTO
.
setPositions
(
parentsAndSelf
);
}
else
{
List
<
FolderItem
>
parentsAndSelf
=
logManager
.
parentsAndSelf
(
positionId
.
toString
(),
sourcetype
);
sysLogDTO
.
setPositions
(
parentsAndSelf
);
}
}
}
}
}
...
...
backend/src/main/java/io/dataease/controller/datasource/DriverMgmController.java
浏览文件 @
33f43369
...
@@ -92,13 +92,6 @@ public class DriverMgmController {
...
@@ -92,13 +92,6 @@ public class DriverMgmController {
@RequiresPermissions
(
"datasource:read"
)
@RequiresPermissions
(
"datasource:read"
)
@ApiOperation
(
"删除驱动文件"
)
@ApiOperation
(
"删除驱动文件"
)
@PostMapping
(
"/deleteDriverFile"
)
@PostMapping
(
"/deleteDriverFile"
)
@DeLog
(
operatetype
=
SysLogConstants
.
OPERATE_TYPE
.
DELETE
,
sourcetype
=
SysLogConstants
.
SOURCE_TYPE
.
DRIVER_FILE
,
positionIndex
=
0
,
positionKey
=
"deDriverId"
,
value
=
"id"
)
public
void
deleteDriverFile
(
@RequestBody
DeDriverDetails
deDriverDetails
)
throws
Exception
{
public
void
deleteDriverFile
(
@RequestBody
DeDriverDetails
deDriverDetails
)
throws
Exception
{
driverService
.
deleteDriverFile
(
deDriverDetails
.
getId
());
driverService
.
deleteDriverFile
(
deDriverDetails
.
getId
());
}
}
...
@@ -106,13 +99,6 @@ public class DriverMgmController {
...
@@ -106,13 +99,6 @@ public class DriverMgmController {
@RequiresPermissions
(
"datasource:read"
)
@RequiresPermissions
(
"datasource:read"
)
@ApiOperation
(
"驱动文件上传"
)
@ApiOperation
(
"驱动文件上传"
)
@PostMapping
(
"file/upload"
)
@PostMapping
(
"file/upload"
)
@DeLog
(
operatetype
=
SysLogConstants
.
OPERATE_TYPE
.
UPLOADFILE
,
sourcetype
=
SysLogConstants
.
SOURCE_TYPE
.
DRIVER_FILE
,
positionIndex
=
0
,
positionKey
=
"deDriverId"
,
value
=
"id"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"file"
,
value
=
"文件"
,
required
=
true
,
dataType
=
"MultipartFile"
),
@ApiImplicitParam
(
name
=
"file"
,
value
=
"文件"
,
required
=
true
,
dataType
=
"MultipartFile"
),
@ApiImplicitParam
(
name
=
"id"
,
value
=
"驱动D"
,
required
=
true
,
dataType
=
"String"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"驱动D"
,
required
=
true
,
dataType
=
"String"
)
...
...
backend/src/main/java/io/dataease/ext/ExtSysLogMapper.xml
浏览文件 @
33f43369
...
@@ -143,8 +143,8 @@
...
@@ -143,8 +143,8 @@
</if>
</if>
<if
test=
"type == 10"
>
<if
test=
"type == 10"
>
id, name
id,
file_name as
name
from de_driver
from de_driver
_details
<where>
<where>
id in
id in
<foreach
collection=
"ids"
item=
"id"
index=
"index"
open=
"("
separator=
","
close=
")"
>
<foreach
collection=
"ids"
item=
"id"
index=
"index"
open=
"("
separator=
","
close=
")"
>
...
...
backend/src/main/java/io/dataease/service/datasource/DriverService.java
浏览文件 @
33f43369
package
io
.
dataease
.
service
.
datasource
;
package
io
.
dataease
.
service
.
datasource
;
import
com.google.gson.Gson
;
import
com.google.gson.Gson
;
import
io.dataease.commons.constants.SysLogConstants
;
import
io.dataease.commons.utils.BeanUtils
;
import
io.dataease.commons.utils.BeanUtils
;
import
io.dataease.commons.utils.DeFileUtils
;
import
io.dataease.commons.utils.DeFileUtils
;
import
io.dataease.commons.utils.DeLogUtils
;
import
io.dataease.dto.DriverDTO
;
import
io.dataease.dto.DriverDTO
;
import
io.dataease.dto.
datasource.SqlServerConfiguration
;
import
io.dataease.dto.
SysLogDTO
;
import
io.dataease.i18n.Translator
;
import
io.dataease.i18n.Translator
;
import
io.dataease.plugins.common.base.domain.Datasource
;
import
io.dataease.plugins.common.base.domain.Datasource
;
import
io.dataease.plugins.common.base.domain.DeDriver
;
import
io.dataease.plugins.common.base.domain.DeDriver
;
...
@@ -97,6 +99,8 @@ public class DriverService {
...
@@ -97,6 +99,8 @@ public class DriverService {
public
void
deleteDriverFile
(
String
driverFileId
)
{
public
void
deleteDriverFile
(
String
driverFileId
)
{
DeDriverDetails
deDriverDetails
=
deDriverDetailsMapper
.
selectByPrimaryKey
(
driverFileId
);
DeDriverDetails
deDriverDetails
=
deDriverDetailsMapper
.
selectByPrimaryKey
(
driverFileId
);
DeFileUtils
.
deleteFile
(
DRIVER_PATH
+
deDriverDetails
.
getDeDriverId
()
+
"/"
+
deDriverDetails
.
getFileName
());
DeFileUtils
.
deleteFile
(
DRIVER_PATH
+
deDriverDetails
.
getDeDriverId
()
+
"/"
+
deDriverDetails
.
getFileName
());
SysLogDTO
sysLogDTO
=
DeLogUtils
.
buildLog
(
SysLogConstants
.
OPERATE_TYPE
.
DELETE
,
SysLogConstants
.
SOURCE_TYPE
.
DRIVER_FILE
,
deDriverDetails
.
getId
(),
deDriverDetails
.
getDeDriverId
(),
null
,
null
);
DeLogUtils
.
save
(
sysLogDTO
);
deDriverDetailsMapper
.
deleteByPrimaryKey
(
driverFileId
);
deDriverDetailsMapper
.
deleteByPrimaryKey
(
driverFileId
);
}
}
...
@@ -123,6 +127,8 @@ public class DriverService {
...
@@ -123,6 +127,8 @@ public class DriverService {
deDriverDetails
.
setFileName
(
filename
);
deDriverDetails
.
setFileName
(
filename
);
deDriverDetails
.
setDriverClass
(
String
.
join
(
","
,
jdbcList
));
deDriverDetails
.
setDriverClass
(
String
.
join
(
","
,
jdbcList
));
deDriverDetailsMapper
.
insert
(
deDriverDetails
);
deDriverDetailsMapper
.
insert
(
deDriverDetails
);
SysLogDTO
sysLogDTO
=
DeLogUtils
.
buildLog
(
SysLogConstants
.
OPERATE_TYPE
.
UPLOADFILE
,
SysLogConstants
.
SOURCE_TYPE
.
DRIVER_FILE
,
deDriverDetails
.
getId
(),
driverId
,
null
,
null
);
DeLogUtils
.
save
(
sysLogDTO
);
return
deDriverDetails
;
return
deDriverDetails
;
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论