Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Springboot Plus
Commits
7399d889
Commit
7399d889
authored
Jun 24, 2018
by
xiandafu
Browse files
刷新bug修复
parent
adc12f7b
Changes
4
Hide whitespace changes
Inline
Side-by-side
admin-core/src/main/java/com/ibeetl/admin/core/service/CoreCodeGenService.java
View file @
7399d889
...
...
@@ -37,6 +37,10 @@ public class CoreCodeGenService {
Log
log
=
LogFactory
.
getLog
(
CoreCodeGenService
.
class
);
public
void
refresh
()
{
sqlManager
.
refresh
();
}
public
List
<
Entity
>
getAllEntityInfo
(){
MetadataManager
meta
=
sqlManager
.
getMetaDataManager
();
Set
<
String
>
set
=
meta
.
allTable
();
...
...
admin-core/src/main/java/com/ibeetl/admin/core/web/CoreCodeGenController.java
View file @
7399d889
...
...
@@ -53,6 +53,14 @@ public class CoreCodeGenController {
return
view
;
}
@PostMapping
(
MODEL
+
"/refresh.json"
)
@ResponseBody
public
JsonResult
<
Boolean
>
refresh
()
{
codeGenService
.
refresh
();
return
JsonResult
.
success
();
}
@GetMapping
(
MODEL
+
"/tableDetail.do"
)
public
ModelAndView
tableDetail
(
String
table
)
{
...
...
admin-core/src/main/resources/static/js/core/codeGen/codeApi.js
View file @
7399d889
/*访问后台的代码*/
layui
.
define
([],
function
(
exports
)
{
var
api
=
{
refresh
:
function
(
callback
){
Common
.
post
(
"
/core/codeGen/refresh.json
"
,
{},
function
(
path
){
callback
();
});
},
gen
:
function
(
callback
){
Common
.
post
(
"
/core/codeGen/getPath.json
"
,
{},
function
(
path
){
Common
.
openPrompt
(
"
代码保存路径?
"
,
path
,
function
(
newPath
){
...
...
admin-core/src/main/resources/static/js/core/codeGen/index.js
View file @
7399d889
layui
.
define
([
'
form
'
,
'
laydate
'
,
'
table
'
],
function
(
exports
)
{
layui
.
define
([
'
form
'
,
'
laydate
'
,
'
table
'
,
'
codeApi
'
],
function
(
exports
)
{
var
form
=
layui
.
form
;
var
laydate
=
layui
.
laydate
;
var
table
=
layui
.
table
;
var
codeApi
=
layui
.
codeApi
;
var
codeTable
=
null
;
var
view
=
{
...
...
@@ -10,7 +11,7 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
this
.
initToolBar
();
},
initTable
:
function
(){
blog
Table
=
table
.
render
({
code
Table
=
table
.
render
({
elem
:
'
#codeTable
'
,
height
:
Lib
.
getTableHeight
(
1
),
method
:
'
post
'
,
...
...
@@ -52,7 +53,10 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
},
refresh
:
function
(){
codeTable
.
reload
();
codeApi
.
refresh
(
function
(){
codeTable
.
reload
();
})
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment