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
b57a3992
Commit
b57a3992
authored
Feb 24, 2018
by
李家智
Browse files
bug fix
parent
aea60716
Changes
15
Expand all
Hide whitespace changes
Inline
Side-by-side
admin-console/pom.xml
View file @
b57a3992
...
...
@@ -12,12 +12,7 @@
</parent>
<dependencies>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-tomcat
</artifactId>
<scope>
provided
</scope>
</dependency>
<dependency>
<groupId>
com.ibeetl
</groupId>
<artifactId>
admin-core
</artifactId>
...
...
admin-console/src/main/java/com/ibeetl/admin/console/entity/CmsBlog.java
View file @
b57a3992
...
...
@@ -17,7 +17,7 @@ import com.ibeetl.admin.core.entity.BaseEntity;
/*
*
* gen by Spring Boot2 Admin 2018-02-
17
* gen by Spring Boot2 Admin 2018-02-
24
*/
public
class
CmsBlog
extends
BaseEntity
{
...
...
admin-console/src/main/java/com/ibeetl/admin/console/web/CmsBlogController.java
View file @
b57a3992
...
...
@@ -40,6 +40,7 @@ public class CmsBlogController{
@GetMapping
(
MODEL
+
"/index.do"
)
@Function
(
"cmsBlog.query"
)
@ResponseBody
public
ModelAndView
index
()
{
ModelAndView
view
=
new
ModelAndView
(
"/admin/cmsBlog/index.html"
)
;
view
.
addObject
(
"search"
,
CmsBlogQuery
.
class
.
getName
());
...
...
@@ -48,7 +49,8 @@ public class CmsBlogController{
@GetMapping
(
MODEL
+
"/edit.do"
)
@Function
(
"cmsBlog.edit"
)
public
ModelAndView
edit
(
Long
id
)
{
@ResponseBody
public
ModelAndView
edit
(
Integer
id
)
{
ModelAndView
view
=
new
ModelAndView
(
"/admin/cmsBlog/edit.html"
);
CmsBlog
cmsBlog
=
cmsBlogService
.
queryById
(
id
);
view
.
addObject
(
"cmsBlog"
,
cmsBlog
);
...
...
@@ -57,6 +59,7 @@ public class CmsBlogController{
@GetMapping
(
MODEL
+
"/add.do"
)
@Function
(
"cmsBlog.add"
)
@ResponseBody
public
ModelAndView
add
()
{
ModelAndView
view
=
new
ModelAndView
(
"/admin/cmsBlog/add.html"
);
return
view
;
...
...
@@ -77,7 +80,7 @@ public class CmsBlogController{
@PostMapping
(
MODEL
+
"/add.json"
)
@Function
(
"cmsBlog.add"
)
@ResponseBody
public
JsonResult
add
CmsBlog
(
@Validated
(
ValidateConfig
.
ADD
.
class
)
CmsBlog
cmsBlog
)
public
JsonResult
add
(
@Validated
(
ValidateConfig
.
ADD
.
class
)
CmsBlog
cmsBlog
)
{
cmsBlogService
.
save
(
cmsBlog
);
return
new
JsonResult
().
success
();
...
...
@@ -100,8 +103,8 @@ public class CmsBlogController{
@GetMapping
(
MODEL
+
"/view.json"
)
@Function
(
"cmsBlog.query"
)
@ResponseBody
public
JsonResult
<
CmsBlog
>
queryInfo
(
Long
id
)
{
CmsBlog
cmsBlog
=
cmsBlogService
.
queryById
(
id
);
public
JsonResult
<
CmsBlog
>
queryInfo
(
Integer
id
)
{
CmsBlog
cmsBlog
=
cmsBlogService
.
queryById
(
id
);
return
JsonResult
.
success
(
cmsBlog
);
}
...
...
admin-console/src/main/java/com/ibeetl/admin/console/web/query/CmsBlogQuery.java
View file @
b57a3992
...
...
@@ -10,11 +10,19 @@ import java.util.Date;
public
class
CmsBlogQuery
extends
PageParam
{
@Query
(
name
=
"id"
,
display
=
true
)
private
Integer
id
;
@Query
(
name
=
"title"
,
display
=
true
)
private
String
title
;
public
Integer
getId
(){
return
id
;
}
public
void
setId
(
Integer
id
){
this
.
id
=
id
;
}
public
String
getTitle
(){
return
title
;
}
public
void
setTitle
(
String
title
){
this
.
title
=
title
;
}
}
admin-console/src/main/resources/sql/console/cmsBlog.md
View file @
b57a3992
...
...
@@ -13,6 +13,9 @@ queryByCondition
@if(!isEmpty(id)){
and t.id =#id#
@}
@if(!isEmpty(title)){
and t.title =#title#
@}
...
...
@@ -22,5 +25,5 @@ batchDelCmsBlogByIds
*
批量逻辑删除
update cms_blog set del_flag = 1 where id in( #join(ids)#)
update cms_blog set del_flag = 1 where id
in( #join(ids)#)
admin-console/src/main/resources/static/js/admin/cmsBlog/add.js
0 → 100644
View file @
b57a3992
layui
.
define
([
'
form
'
,
'
laydate
'
,
'
table
'
,
'
cmsBlogApi
'
],
function
(
exports
)
{
var
form
=
layui
.
form
;
var
cmsBlogApi
=
layui
.
cmsBlogApi
;
var
index
=
layui
.
index
;
var
view
=
{
init
:
function
(){
Lib
.
initGenrealForm
(
$
(
"
#addForm
"
),
form
);
this
.
initSubmit
();
},
initSubmit
:
function
(){
$
(
"
#addButton
"
).
click
(
function
(){
cmsBlogApi
.
addCmsBlog
(
$
(
'
#addForm
'
),
function
(){
parent
.
window
.
dataReload
();
Common
.
info
(
"
添加成功
"
);
Lib
.
closeFrame
();
});
});
$
(
"
#addButton-cancel
"
).
click
(
function
(){
Lib
.
closeFrame
();
});
}
}
exports
(
'
add
'
,
view
);
});
\ No newline at end of file
admin-console/src/main/resources/static/js/admin/cmsBlog/cmsBlogApi.js
0 → 100644
View file @
b57a3992
/*访问后台的代码*/
layui
.
define
([],
function
(
exports
)
{
var
api
=
{
updateCmsBlog
:
function
(
form
,
callback
){
Lib
.
submitForm
(
"
/admin/cmsBlog/update.json
"
,
form
,{},
callback
)
},
addCmsBlog
:
function
(
form
,
callback
){
Lib
.
submitForm
(
"
/admin/cmsBlog/add.json
"
,
form
,{},
callback
)
},
del
:
function
(
ids
,
callback
){
Common
.
post
(
"
/admin/cmsBlog/delete.json
"
,{
"
ids
"
:
ids
},
function
(){
callback
();
})
}
};
exports
(
'
cmsBlogApi
'
,
api
);
});
\ No newline at end of file
admin-console/src/main/resources/static/js/admin/cmsBlog/del.js
0 → 100644
View file @
b57a3992
layui
.
define
([
'
table
'
,
'
cmsBlogApi
'
],
function
(
exports
)
{
var
cmsBlogApi
=
layui
.
cmsBlogApi
;
var
table
=
layui
.
table
;
var
view
=
{
init
:
function
(){
},
delBatch
:
function
(){
var
data
=
Common
.
getMoreDataFromTable
(
table
,
"
cmsBlogTable
"
);
if
(
data
==
null
){
return
;
}
Common
.
openConfirm
(
"
确认要删除这些CmsBlog?
"
,
function
(){
var
ids
=
Common
.
concatBatchId
(
data
,
"
id
"
);
cmsBlogApi
.
del
(
ids
,
function
(){
Common
.
info
(
"
删除成功
"
);
dataReload
();
})
})
}
}
exports
(
'
del
'
,
view
);
});
\ No newline at end of file
admin-console/src/main/resources/static/js/admin/cmsBlog/edit.js
0 → 100644
View file @
b57a3992
layui
.
define
([
'
form
'
,
'
laydate
'
,
'
table
'
,
'
cmsBlogApi
'
],
function
(
exports
)
{
var
form
=
layui
.
form
;
var
cmsBlogApi
=
layui
.
cmsBlogApi
;
var
index
=
layui
.
index
;
var
view
=
{
init
:
function
(){
Lib
.
initGenrealForm
(
$
(
"
#updateForm
"
),
form
);
this
.
initSubmit
();
},
initSubmit
:
function
(){
$
(
"
#updateButton
"
).
click
(
function
(){
cmsBlogApi
.
updateCmsBlog
(
$
(
'
#updateForm
'
),
function
(){
parent
.
window
.
dataReload
();
Common
.
info
(
"
更新成功
"
);
Lib
.
closeFrame
();
});
});
$
(
"
#updateButton-cancel
"
).
click
(
function
(){
Lib
.
closeFrame
();
});
}
}
exports
(
'
edit
'
,
view
);
});
\ No newline at end of file
admin-console/src/main/resources/static/js/admin/cmsBlog/index.js
0 → 100644
View file @
b57a3992
layui
.
define
([
'
form
'
,
'
laydate
'
,
'
table
'
],
function
(
exports
)
{
var
form
=
layui
.
form
;
var
laydate
=
layui
.
laydate
;
var
table
=
layui
.
table
;
var
cmsBlogTable
=
null
;
var
view
=
{
init
:
function
(){
this
.
initTable
();
this
.
initSearchForm
();
this
.
initToolBar
();
window
.
dataReload
=
function
(){
Lib
.
doSearchForm
(
$
(
"
#searchForm
"
),
cmsBlogTable
,
form
)
}
},
initTable
:
function
(){
cmsBlogTable
=
table
.
render
({
elem
:
'
#cmsBlogTable
'
,
height
:
Lib
.
getTableHeight
(
1
),
method
:
'
post
'
,
url
:
Common
.
CTX
+
'
/admin/cmsBlog/list.json
'
// 数据接口
,
page
:
Lib
.
tablePage
// 开启分页
,
limit
:
10
,
cols
:
[
[
// 表头
{
type
:
'
checkbox
'
,
fixed
:
'
left
'
,
},
{
field
:
'
id
'
,
title
:
'
id
'
,
fixed
:
'
left
'
,
width
:
100
,
},
{
field
:
'
title
'
,
title
:
'
title
'
,
width
:
100
,
},
{
field
:
'
content
'
,
title
:
'
content
'
,
width
:
100
,
},
{
field
:
'
createTime
'
,
title
:
'
createTime
'
,
width
:
100
,
},
{
field
:
'
createUserId
'
,
title
:
'
createUserId
'
,
width
:
100
,
},
{
field
:
'
type
'
,
title
:
'
type
'
,
width
:
100
,
}
]
]
});
},
initSearchForm
:
function
(){
Lib
.
initSearchForm
(
$
(
"
#searchForm
"
),
cmsBlogTable
,
form
);
},
initToolBar
:
function
(){
toolbar
=
{
add
:
function
()
{
// 获取选中数据
var
url
=
"
/admin/cmsBlog/add.do
"
;
Common
.
openDlg
(
url
,
"
CmsBlog管理>新增
"
);
},
edit
:
function
()
{
// 获取选中数目
var
data
=
Common
.
getOneFromTable
(
table
,
"
cmsBlogTable
"
);
if
(
data
==
null
){
return
;
}
var
url
=
"
/admin/cmsBlog/edit.do?id=
"
+
data
.
id
;
Common
.
openDlg
(
url
,
"
CmsBlog管理>
"
+
data
.
\ No newline at end of file
admin-console/src/main/resources/templates/admin/cmsBlog/add.html
View file @
b57a3992
<!--# layout("/common/layout.html",{"jsBase":"/js/admin/cmsBlog/"}){ -->
<form
class=
"layui-form layui-form-pane"
id=
"addForm"
action=
"/admin/cmsBlog/save.json"
>
<form
class=
"layui-form layui-form-pane"
id=
"addForm"
>
<div
class=
"layui-row"
>
<div
class=
"layui-form-item"
>
...
...
@@ -71,5 +70,4 @@ layui.use(['add'], function(){
var
cmsBlogAdd
=
layui
.
add
cmsBlogAdd
.
init
();
});
</script>
admin-console/src/main/resources/templates/admin/cmsBlog/edit.html
View file @
b57a3992
<!--# layout("/common/layout.html",{"jsBase":"/js/admin/cmsBlog/"}){ -->
<form
class=
"layui-form layui-form-pane"
id=
"updateForm"
action=
"/admin/cmsBlog/update.json"
>
<form
class=
"layui-form layui-form-pane"
id=
"updateForm"
>
<div
class=
"layui-row"
>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
title
</label>
<div
class=
"layui-input-inline"
>
...
...
@@ -12,8 +10,6 @@
class=
"layui-input"
>
</div>
</div>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
content
</label>
<div
class=
"layui-input-inline"
>
...
...
@@ -21,13 +17,10 @@
class=
"layui-input"
>
</div>
</div>
</div>
</div>
<div
class=
"layui-row"
>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
createTime
</label>
<div
class=
"layui-input-inline"
>
...
...
@@ -35,8 +28,6 @@
class=
"layui-input"
>
</div>
</div>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
createUserId
</label>
<div
class=
"layui-input-inline"
>
...
...
@@ -44,13 +35,10 @@
class=
"layui-input"
>
</div>
</div>
</div>
</div>
<div
class=
"layui-row"
>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
type
</label>
<div
class=
"layui-input-inline"
>
...
...
@@ -58,9 +46,7 @@
class=
"layui-input"
>
</div>
</div>
</div>
</div>
<input
type=
"hidden"
name=
"id"
value=
${cmsBlog.id}
/>
...
...
@@ -69,8 +55,7 @@
<!--#} -->
<script>
layui
.
use
([
'
edit
'
],
function
(){
var
cmsBlogEdit
=
layui
.
edit
cmsBlogEdit
.
init
();
var
cmsBlogEdit
=
layui
.
edit
cmsBlogEdit
.
init
();
});
</script>
admin-core/src/main/resources/static/js/core/codeGen/codeApi.js
View file @
b57a3992
...
...
@@ -2,7 +2,9 @@
layui
.
define
([],
function
(
exports
)
{
var
api
=
{
gen
:
function
(
callback
){
Lib
.
submitForm
(
$
(
'
#updateForm
'
),{},
callback
)
var
form
=
$
(
'
#updateForm
'
);
var
formPara
=
form
.
serializeJson
();
Common
.
post
(
"
/core/codeGen/gen.json
"
,
formPara
,
callback
);
},
previewHtml
:
function
(
callback
){
var
form
=
$
(
'
#updateForm
'
);
...
...
admin-core/src/main/resources/templates/core/codeGen/edit.html
View file @
b57a3992
...
...
@@ -10,7 +10,7 @@
<button
class=
"layui-btn ext-toolbar"
data-type=
"cancel"
>
取消
</button>
</div>
<form
class=
"layui-form layui-form-pane"
id=
"updateForm"
action=
"/core/codeGen/gen.json"
>
>
<fieldset
class=
"layui-elem-field layui-field-title"
style=
"margin-top: 30px;"
>
<legend>
主健字段
</legend>
...
...
doc/starter-oracle.sql
0 → 100644
View file @
b57a3992
This diff is collapsed.
Click to expand it.
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