Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
doc_wei
Skyeye
提交
cc936577
S
Skyeye
项目概览
doc_wei
/
Skyeye
通知
1195
Star
154
Fork
127
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Skyeye
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
cc936577
编写于
9月 30, 2018
作者:
doc_wei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
数据库数据字典
上级
9b328116
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
416 addition
and
4 deletion
+416
-4
skyeye-dao/src/main/java/com/skyeye/authority/dao/SysDataBaseDao.java
...rc/main/java/com/skyeye/authority/dao/SysDataBaseDao.java
+16
-0
skyeye-service/src/main/java/com/skyeye/authority/service/SysDataBaseService.java
...java/com/skyeye/authority/service/SysDataBaseService.java
+14
-0
skyeye-service/src/main/java/com/skyeye/authority/service/impl/SysDataBaseServiceImpl.java
...skyeye/authority/service/impl/SysDataBaseServiceImpl.java
+90
-0
skyeye-web/src/main/java/com/skyeye/authority/controller/SysDataBaseController.java
...om/skyeye/authority/controller/SysDataBaseController.java
+67
-0
skyeye-web/src/main/resources/dbmapper/SysDataBaseMapper.xml
skyeye-web/src/main/resources/dbmapper/SysDataBaseMapper.xml
+59
-0
skyeye-web/src/main/resources/mapping/reqmapping.xml
skyeye-web/src/main/resources/mapping/reqmapping.xml
+13
-0
skyeye-web/src/main/resources/properties/db.properties
skyeye-web/src/main/resources/properties/db.properties
+5
-1
skyeye-web/src/main/webapp/js/sysdatabase/sysdatabaselist.js
skyeye-web/src/main/webapp/js/sysdatabase/sysdatabaselist.js
+87
-0
skyeye-web/src/main/webapp/js/sysevemenu/sysevemenulist.js
skyeye-web/src/main/webapp/js/sysevemenu/sysevemenulist.js
+1
-1
skyeye-web/src/main/webapp/js/syseverole/syseverolelist.js
skyeye-web/src/main/webapp/js/syseverole/syseverolelist.js
+1
-1
skyeye-web/src/main/webapp/js/syseveuser/syseveuserlist.js
skyeye-web/src/main/webapp/js/syseveuser/syseveuserlist.js
+1
-1
skyeye-web/src/main/webapp/tpl/sysdatabase/sysdatabaselist.html
...-web/src/main/webapp/tpl/sysdatabase/sysdatabaselist.html
+58
-0
skyeye-web/src/main/webapp/tpl/template/select-option.tpl
skyeye-web/src/main/webapp/tpl/template/select-option.tpl
+4
-0
未找到文件。
skyeye-dao/src/main/java/com/skyeye/authority/dao/SysDataBaseDao.java
0 → 100644
浏览文件 @
cc936577
package
com.skyeye.authority.dao
;
import
java.util.List
;
import
java.util.Map
;
import
com.github.miemiedev.mybatis.paginator.domain.PageBounds
;
public
interface
SysDataBaseDao
{
public
List
<
Map
<
String
,
Object
>>
querySysDataBaseList
(
Map
<
String
,
Object
>
map
,
PageBounds
pageBounds
)
throws
Exception
;
public
List
<
Map
<
String
,
Object
>>
querySysDataBaseSelectList
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
public
List
<
Map
<
String
,
Object
>>
querySysDataBaseDescSelectList
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
}
skyeye-service/src/main/java/com/skyeye/authority/service/SysDataBaseService.java
0 → 100644
浏览文件 @
cc936577
package
com.skyeye.authority.service
;
import
com.skyeye.common.object.InputObject
;
import
com.skyeye.common.object.OutputObject
;
public
interface
SysDataBaseService
{
public
void
querySysDataBaseList
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
public
void
querySysDataBaseSelectList
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
public
void
querySysDataBaseDescSelectList
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
}
skyeye-service/src/main/java/com/skyeye/authority/service/impl/SysDataBaseServiceImpl.java
0 → 100644
浏览文件 @
cc936577
package
com.skyeye.authority.service.impl
;
import
java.util.List
;
import
java.util.Map
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
com.github.miemiedev.mybatis.paginator.domain.PageBounds
;
import
com.github.miemiedev.mybatis.paginator.domain.PageList
;
import
com.skyeye.authority.dao.SysDataBaseDao
;
import
com.skyeye.authority.service.SysDataBaseService
;
import
com.skyeye.common.object.InputObject
;
import
com.skyeye.common.object.OutputObject
;
@Service
public
class
SysDataBaseServiceImpl
implements
SysDataBaseService
{
@Autowired
private
SysDataBaseDao
sysDataBaseDao
;
@Value
(
"${jdbc.database.name}"
)
private
String
dbName
;
/**
*
* @Title: querySysDataBaseList
* @Description: 获取数据库信息
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@Override
public
void
querySysDataBaseList
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
map
=
inputObject
.
getParams
();
map
.
put
(
"dbName"
,
dbName
);
List
<
Map
<
String
,
Object
>>
beans
=
sysDataBaseDao
.
querySysDataBaseList
(
map
,
new
PageBounds
(
Integer
.
parseInt
(
map
.
get
(
"page"
).
toString
()),
Integer
.
parseInt
(
map
.
get
(
"limit"
).
toString
())));
PageList
<
Map
<
String
,
Object
>>
beansPageList
=
(
PageList
<
Map
<
String
,
Object
>>)
beans
;
int
total
=
beansPageList
.
getPaginator
().
getTotalCount
();
outputObject
.
setBeans
(
beans
);
outputObject
.
settotal
(
total
);
}
/**
*
* @Title: querySysDataBaseList
* @Description: 获取数据库表名信息
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@Override
public
void
querySysDataBaseSelectList
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
map
=
inputObject
.
getParams
();
map
.
put
(
"dbName"
,
dbName
);
List
<
Map
<
String
,
Object
>>
beans
=
sysDataBaseDao
.
querySysDataBaseSelectList
(
map
);
outputObject
.
setBeans
(
beans
);
if
(!
beans
.
isEmpty
()){
outputObject
.
settotal
(
beans
.
size
());
}
}
/**
*
* @Title: querySysDataBaseList
* @Description: 获取数据库表备注信息
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@Override
public
void
querySysDataBaseDescSelectList
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
map
=
inputObject
.
getParams
();
map
.
put
(
"dbName"
,
dbName
);
List
<
Map
<
String
,
Object
>>
beans
=
sysDataBaseDao
.
querySysDataBaseDescSelectList
(
map
);
outputObject
.
setBeans
(
beans
);
if
(!
beans
.
isEmpty
()){
outputObject
.
settotal
(
beans
.
size
());
}
}
}
skyeye-web/src/main/java/com/skyeye/authority/controller/SysDataBaseController.java
0 → 100644
浏览文件 @
cc936577
package
com.skyeye.authority.controller
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
com.skyeye.authority.service.SysDataBaseService
;
import
com.skyeye.common.object.InputObject
;
import
com.skyeye.common.object.OutputObject
;
@Controller
public
class
SysDataBaseController
{
@Autowired
private
SysDataBaseService
sysDataBaseService
;
/**
*
* @Title: querySysDataBaseList
* @Description: 获取数据库信息
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@RequestMapping
(
"/post/SysDataBaseController/querySysDataBaseList"
)
@ResponseBody
public
void
querySysDataBaseList
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
sysDataBaseService
.
querySysDataBaseList
(
inputObject
,
outputObject
);
}
/**
*
* @Title: querySysDataBaseList
* @Description: 获取数据库表名信息
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@RequestMapping
(
"/post/SysDataBaseController/querySysDataBaseSelectList"
)
@ResponseBody
public
void
querySysDataBaseSelectList
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
sysDataBaseService
.
querySysDataBaseSelectList
(
inputObject
,
outputObject
);
}
/**
*
* @Title: querySysDataBaseList
* @Description: 获取数据库表备注信息
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@RequestMapping
(
"/post/SysDataBaseController/querySysDataBaseDescSelectList"
)
@ResponseBody
public
void
querySysDataBaseDescSelectList
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
sysDataBaseService
.
querySysDataBaseDescSelectList
(
inputObject
,
outputObject
);
}
}
skyeye-web/src/main/resources/dbmapper/SysDataBaseMapper.xml
0 → 100644
浏览文件 @
cc936577
<?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.skyeye.authority.dao.SysDataBaseDao"
>
<select
id=
"querySysDataBaseList"
parameterType=
"java.util.Map"
resultType=
"java.util.Map"
>
SELECT
a.TABLE_SCHEMA AS tableSchema,
a.TABLE_NAME AS tableName,
a.COLUMN_NAME AS columnName,
a.ORDINAL_POSITION AS ordinalPosition,
a.COLUMN_DEFAULT AS columnDefault,
a.IS_NULLABLE AS isNullable,
a.COLUMN_TYPE AS columnType,
a.COLUMN_COMMENT AS columnComment,
a.COLUMN_KEY AS columnKey,
a.EXTRA AS extra,
b.TABLE_COMMENT AS tableComment
FROM
information_schema.COLUMNS a
LEFT JOIN information_schema.TABLES b ON a.TABLE_NAME = b.TABLE_NAME
WHERE
a.TABLE_SCHEMA = #{dbName}
<if
test=
"tableDesc != '' and tableDesc != null"
>
AND b.TABLE_COMMENT = #{tableDesc}
</if>
<if
test=
"tableName != '' and tableName != null"
>
AND a.TABLE_NAME = #{tableName}
</if>
ORDER BY
b.TABLE_NAME
</select>
<select
id=
"querySysDataBaseSelectList"
parameterType=
"java.util.Map"
resultType=
"java.util.Map"
>
SELECT
a.TABLE_NAME AS id,
a.TABLE_NAME AS name
FROM
information_schema.COLUMNS a
WHERE
a.TABLE_SCHEMA = #{dbName}
GROUP BY
a.TABLE_NAME
</select>
<select
id=
"querySysDataBaseDescSelectList"
parameterType=
"java.util.Map"
resultType=
"java.util.Map"
>
SELECT
b.TABLE_COMMENT AS id,
b.TABLE_COMMENT AS name
FROM
information_schema. COLUMNS a
LEFT JOIN information_schema. TABLES b ON a.TABLE_NAME = b.TABLE_NAME
WHERE
a.TABLE_SCHEMA = #{dbName}
AND b.TABLE_COMMENT IS NOT NULL
AND b.TABLE_COMMENT != ''
GROUP BY b.TABLE_COMMENT
</select>
</mapper>
\ No newline at end of file
skyeye-web/src/main/resources/mapping/reqmapping.xml
浏览文件 @
cc936577
...
...
@@ -106,4 +106,17 @@
<property
id=
"roleIds"
name=
"roleIds"
ref=
"required"
var=
"角色ID串"
/>
</url>
<url
id=
"database001"
path=
"/post/SysDataBaseController/querySysDataBaseList"
val=
"获取数据库信息"
>
<property
id=
"limit"
name=
"limit"
ref=
"required"
var=
"分页参数,每页多少条数据"
/>
<property
id=
"page"
name=
"page"
ref=
"required"
var=
"分页参数,第几页"
/>
<property
id=
"tableName"
name=
"tableName"
ref=
""
var=
"表名"
/>
<property
id=
"tableDesc"
name=
"tableDesc"
ref=
""
var=
"表备注"
/>
</url>
<url
id=
"database002"
path=
"/post/SysDataBaseController/querySysDataBaseSelectList"
val=
"获取数据库表名信息"
>
</url>
<url
id=
"database003"
path=
"/post/SysDataBaseController/querySysDataBaseDescSelectList"
val=
"获取数据库表备注信息"
>
</url>
</controller>
\ No newline at end of file
skyeye-web/src/main/resources/properties/db.properties
浏览文件 @
cc936577
...
...
@@ -8,4 +8,8 @@ jdbc.maxActive=10
jdbc.minIdle
=
5
jdbc.poolPreparedStatements
=
true
jdbc.maxWait
=
60000
jdbc.maxPoolPreparedStatementPerConnectionSize
=
33
\ No newline at end of file
jdbc.maxPoolPreparedStatementPerConnectionSize
=
33
#数据库名称
jdbc.database.name
=
eve
skyeye-web/src/main/webapp/js/sysdatabase/sysdatabaselist.js
0 → 100644
浏览文件 @
cc936577
layui
.
config
({
base
:
basePath
,
version
:
skyeyeVersion
}).
define
([
'
table
'
,
'
jquery
'
,
'
winui
'
,
'
form
'
],
function
(
exports
)
{
winui
.
renderColor
();
var
$
=
layui
.
$
,
form
=
layui
.
form
,
table
=
layui
.
table
;
//搜索表单
form
.
render
();
form
.
on
(
'
submit(formSearch)
'
,
function
(
data
)
{
//表单验证
if
(
winui
.
verifyForm
(
data
.
elem
))
{
loadTable
();
}
return
false
;
});
initLoadTable
();
function
initLoadTable
(){
//表格渲染
table
.
render
({
id
:
'
messageTable
'
,
elem
:
'
#messageTable
'
,
method
:
'
post
'
,
url
:
reqBasePath
+
'
database001
'
,
where
:{
tableName
:
$
(
"
#tableName
"
).
val
(),
tableDesc
:
$
(
"
#tableDesc
"
).
val
()},
even
:
true
,
//隔行变色
page
:
true
,
limits
:
[
8
,
16
,
24
,
32
,
40
,
48
,
56
],
limit
:
8
,
cols
:
[[
{
title
:
'
序号
'
,
type
:
'
numbers
'
},
{
field
:
'
tableName
'
,
title
:
'
表名
'
,
width
:
180
},
{
field
:
'
tableComment
'
,
title
:
'
表备注
'
,
width
:
180
},
{
field
:
'
columnName
'
,
title
:
'
字段名
'
,
width
:
180
},
{
field
:
'
ordinalPosition
'
,
title
:
'
字段顺序
'
,
width
:
120
},
{
field
:
'
columnType
'
,
title
:
'
数据类型
'
,
width
:
120
},
{
field
:
'
columnDefault
'
,
title
:
'
字段默认值
'
,
width
:
120
},
{
field
:
'
isNullable
'
,
title
:
'
允许非空
'
,
width
:
180
},
{
field
:
'
extra
'
,
title
:
'
其他选项
'
,
width
:
180
},
{
field
:
'
columnKey
'
,
title
:
'
主键约束
'
,
width
:
180
},
{
field
:
'
columnComment
'
,
title
:
'
备注
'
,
width
:
180
}
]]
});
showGrid
({
id
:
"
tableName
"
,
url
:
reqBasePath
+
"
database002
"
,
params
:
{},
pagination
:
false
,
template
:
getFileContent
(
'
tpl/template/select-option.tpl
'
),
ajaxSendLoadBefore
:
function
(
hdb
){
},
ajaxSendAfter
:
function
(
json
){
showGrid
({
id
:
"
tableDesc
"
,
url
:
reqBasePath
+
"
database003
"
,
params
:
{},
pagination
:
false
,
template
:
getFileContent
(
'
tpl/template/select-option.tpl
'
),
ajaxSendLoadBefore
:
function
(
hdb
){
},
ajaxSendAfter
:
function
(
json
){
form
.
render
(
'
select
'
);
}
});
}
});
}
//刷新数据
$
(
"
body
"
).
on
(
"
click
"
,
"
#reloadTable
"
,
function
(){
loadTable
();
});
function
loadTable
(){
table
.
reload
(
"
messageTable
"
,
{
where
:{
tableName
:
$
(
"
#tableName
"
).
val
(),
tableDesc
:
$
(
"
#tableDesc
"
).
val
()}});
}
exports
(
'
sysdatabaselist
'
,
{});
});
skyeye-web/src/main/webapp/js/sysevemenu/sysevemenulist.js
浏览文件 @
cc936577
...
...
@@ -71,7 +71,7 @@ layui.config({
limits
:
[
8
,
16
,
24
,
32
,
40
,
48
,
56
],
limit
:
8
,
cols
:
[[
{
field
:
'
id
'
,
type
:
'
checkbox
'
},
{
title
:
'
序号
'
,
type
:
'
numbers
'
},
{
field
:
'
menuName
'
,
title
:
'
菜单名称
'
,
width
:
120
},
{
field
:
'
menuIcon
'
,
title
:
'
图标码
'
,
width
:
120
},
{
field
:
'
titleName
'
,
title
:
'
标题名称
'
,
width
:
120
},
...
...
skyeye-web/src/main/webapp/js/syseverole/syseverolelist.js
浏览文件 @
cc936577
...
...
@@ -22,7 +22,7 @@ layui.config({
limits
:
[
8
,
16
,
24
,
32
,
40
,
48
,
56
],
limit
:
8
,
cols
:
[[
{
field
:
'
id
'
,
type
:
'
checkbox
'
},
{
title
:
'
序号
'
,
type
:
'
numbers
'
},
{
field
:
'
roleName
'
,
title
:
'
角色名称
'
,
width
:
120
},
{
field
:
'
roleDesc
'
,
title
:
'
角色描述
'
,
width
:
520
},
{
field
:
'
parentName
'
,
title
:
'
父角色
'
,
width
:
150
},
...
...
skyeye-web/src/main/webapp/js/syseveuser/syseveuserlist.js
浏览文件 @
cc936577
...
...
@@ -22,7 +22,7 @@ layui.config({
limits
:
[
8
,
16
,
24
,
32
,
40
,
48
,
56
],
limit
:
8
,
cols
:
[[
{
field
:
'
id
'
,
type
:
'
checkbox
'
},
{
title
:
'
序号
'
,
type
:
'
numbers
'
},
{
field
:
'
userCode
'
,
title
:
'
账号
'
,
width
:
120
},
{
field
:
'
pwdNumEnc
'
,
title
:
'
加密次数
'
,
width
:
120
},
{
field
:
'
userName
'
,
title
:
'
用户名
'
,
width
:
120
},
...
...
skyeye-web/src/main/webapp/tpl/sysdatabase/sysdatabaselist.html
0 → 100644
浏览文件 @
cc936577
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"utf-8"
/>
<title></title>
<link
href=
"../../assets/lib/layui/css/layui.css"
rel=
"stylesheet"
/>
<link
href=
"../../assets/lib/font-awesome-4.7.0/css/font-awesome.css"
rel=
"stylesheet"
/>
<link
href=
"../../assets/lib/winui/css/winui.css"
rel=
"stylesheet"
/>
<link
href=
"../../assets/lib/layui/lay/modules/ztree/css/zTreeStyle/zTreeStyle.css"
rel=
"stylesheet"
/>
<link
href=
"../../assets/lib/layui/lay/modules/contextMenu/jquery.contextMenu.min.css"
rel=
"stylesheet"
/>
</head>
<body>
<div
class=
"txtcenter"
style=
"width:700px;margin:0 auto;padding-top:20px;"
>
<form
class=
"layui-form layui-form-pane"
action=
""
autocomplete=
"off"
>
<div
class=
"layui-form-item"
>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
表名
</label>
<div
class=
"layui-input-inline"
>
<select
id=
"tableName"
name=
"tableName"
></select>
</div>
<label
class=
"layui-form-label"
>
表备注
</label>
<div
class=
"layui-input-inline"
>
<select
id=
"tableDesc"
name=
"tableDesc"
></select>
</div>
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-input-block"
style=
"margin:0;"
>
<button
class=
"layui-btn"
lay-submit
lay-filter=
"formSearch"
>
搜索
</button>
</div>
</div>
</form>
</div>
<div
class=
"winui-toolbar"
>
<div
class=
"winui-tool"
>
<button
id=
"reloadTable"
class=
"winui-toolbtn"
><i
class=
"fa fa-refresh"
aria-hidden=
"true"
></i>
刷新数据
</button>
</div>
</div>
<div
class=
"layui-row"
>
<div
class=
"layui-col-xs12"
>
<div
style=
"margin:auto 10px;"
>
<table
id=
"messageTable"
lay-filter=
"messageTable"
></table>
</div>
</div>
</div>
<script
src=
"../../assets/lib/layui/layui.js"
></script>
<script
src=
"../../assets/lib/layui/custom.js"
></script>
<script
type=
"text/javascript"
src=
"../../assets/lib/layui/lay/modules/jquery.min.js"
></script>
<script
type=
"text/javascript"
src=
"../../assets/lib/layui/lay/modules/contextMenu/jquery.contextMenu.min.js"
></script>
<script
type=
"text/javascript"
src=
"../../assets/lib/layui/lay/modules/ztree/js/jquery.ztree.all.min.js"
></script>
<script
type=
"text/javascript"
>
layui
.
config
({
base
:
'
../../js/sysdatabase/
'
}).
use
(
'
sysdatabaselist
'
);
</script>
</body>
</html>
\ No newline at end of file
skyeye-web/src/main/webapp/tpl/template/select-option.tpl
0 → 100644
浏览文件 @
cc936577
<option
value=
""
>
全部
</option>
{
{
#
each
rows
}
}
<option
value=
"{
{
id
}
}"
>
{
{
name
}
}
</option>
{
{/
each
}
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录