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
25057190
Commit
25057190
authored
Feb 22, 2018
by
李家智
Browse files
Merge branch 'master' of
https://gitee.com/xiandafu/springboot-plus
parents
1e54317f
71275d77
Changes
12
Hide whitespace changes
Inline
Side-by-side
admin-console/src/main/java/com/ibeetl/admin/console/web/CmsBlogController.java
View file @
25057190
...
...
@@ -40,7 +40,6 @@ 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
());
...
...
@@ -49,7 +48,6 @@ public class CmsBlogController{
@GetMapping
(
MODEL
+
"/edit.do"
)
@Function
(
"cmsBlog.edit"
)
@ResponseBody
public
ModelAndView
edit
(
Long
id
)
{
ModelAndView
view
=
new
ModelAndView
(
"/admin/cmsBlog/edit.html"
);
CmsBlog
cmsBlog
=
cmsBlogService
.
queryById
(
id
);
...
...
@@ -59,7 +57,6 @@ public class CmsBlogController{
@GetMapping
(
MODEL
+
"/add.do"
)
@Function
(
"cmsBlog.add"
)
@ResponseBody
public
ModelAndView
add
()
{
ModelAndView
view
=
new
ModelAndView
(
"/admin/cmsBlog/add.html"
);
return
view
;
...
...
admin-console/src/main/java/com/ibeetl/admin/console/web/DictConsoleController.java
View file @
25057190
...
...
@@ -39,7 +39,6 @@ public class DictConsoleController{
@GetMapping
(
MODEL
+
"/index.do"
)
@Function
(
"dict.query"
)
@ResponseBody
public
ModelAndView
index
()
{
ModelAndView
view
=
new
ModelAndView
(
"/admin/dict/index.html"
)
;
view
.
addObject
(
"search"
,
CoreDictQuery
.
class
.
getName
());
...
...
@@ -48,7 +47,6 @@ public class DictConsoleController{
@GetMapping
(
MODEL
+
"/edit.do"
)
@Function
(
"dict.edit"
)
@ResponseBody
public
ModelAndView
edit
(
String
id
)
{
ModelAndView
view
=
new
ModelAndView
(
"/admin/dict/edit.html"
);
CoreDict
dict
=
dictService
.
queryById
(
id
);
...
...
@@ -58,7 +56,6 @@ public class DictConsoleController{
@GetMapping
(
MODEL
+
"/add.do"
)
@Function
(
"dict.add"
)
@ResponseBody
public
ModelAndView
add
()
{
ModelAndView
view
=
new
ModelAndView
(
"/admin/dict/add.html"
);
return
view
;
...
...
admin-console/src/main/java/com/ibeetl/admin/console/web/FunctionController.java
View file @
25057190
...
...
@@ -6,6 +6,7 @@ import com.ibeetl.admin.console.web.query.FunctionQuery;
import
com.ibeetl.admin.core.annotation.Function
;
import
com.ibeetl.admin.core.annotation.Query
;
import
com.ibeetl.admin.core.entity.CoreFunction
;
import
com.ibeetl.admin.core.entity.CoreOrg
;
import
com.ibeetl.admin.core.rbac.tree.FunctionItem
;
import
com.ibeetl.admin.core.service.CorePlatformService
;
import
com.ibeetl.admin.core.util.AnnotationUtil
;
...
...
@@ -60,6 +61,21 @@ public class FunctionController {
return
view
;
}
@GetMapping
(
MODEL
+
"/add.do"
)
@Function
(
"function.add"
)
public
ModelAndView
add
()
{
ModelAndView
view
=
new
ModelAndView
(
"/admin/function/add.html"
);
return
view
;
}
@GetMapping
(
MODEL
+
"/edit.do"
)
@Function
(
"function.edit"
)
public
ModelAndView
edit
(
String
id
)
{
ModelAndView
view
=
new
ModelAndView
(
"/admin/function/edit.html"
);
CoreFunction
function
=
functionConsoleService
.
queryById
(
id
);
view
.
addObject
(
"function"
,
function
);
return
view
;
}
/*Json*/
@RequestMapping
(
MODEL
+
"/add.json"
)
...
...
@@ -85,7 +101,6 @@ public class FunctionController {
@Function
(
"function.update"
)
@ResponseBody
public
JsonResult
<?>
updateFunction
(
@Validated
(
ValidateConfig
.
UPDATE
.
class
)
CoreFunction
function
)
{
String
code
=
function
.
getCode
();
CoreFunction
dbFunction
=
functionConsoleService
.
getFunction
(
function
.
getCode
());
if
(
dbFunction
!=
null
&&!
dbFunction
.
getId
().
equals
(
function
.
getId
())){
throw
new
FormFieldException
(
CoreFunction
.
class
.
getName
(),
"code"
,
"已经存在"
);
...
...
@@ -94,8 +109,9 @@ public class FunctionController {
if
(
function
.
getParentId
()==
null
){
function
.
setParentId
(
0
l
);
}
// function.setCreateTime(dbFunction.getCreateTime());
functionConsoleService
.
updateFunction
(
function
);
return
JsonResult
.
success
();
return
JsonResult
.
success
();
}
@RequestMapping
(
MODEL
+
"/view.json"
)
...
...
admin-console/src/main/java/com/ibeetl/admin/console/web/OrgConsoleController.java
View file @
25057190
...
...
@@ -55,7 +55,6 @@ public class OrgConsoleController {
@GetMapping
(
MODEL
+
"/index.do"
)
@Function
(
"org.query"
)
@ResponseBody
public
ModelAndView
index
()
{
ModelAndView
view
=
new
ModelAndView
(
"/admin/org/index.html"
);
view
.
addObject
(
"search"
,
OrgQuery
.
class
.
getName
());
...
...
@@ -64,7 +63,6 @@ public class OrgConsoleController {
@GetMapping
(
MODEL
+
"/edit.do"
)
@Function
(
"org.edit"
)
@ResponseBody
public
ModelAndView
edit
(
String
id
)
{
ModelAndView
view
=
new
ModelAndView
(
"/admin/org/edit.html"
);
CoreOrg
org
=
orgConsoleService
.
queryById
(
id
);
...
...
@@ -75,7 +73,6 @@ public class OrgConsoleController {
@GetMapping
(
MODEL
+
"/user/list.do"
)
@Function
(
"org.query"
)
@ResponseBody
public
ModelAndView
getUsers
(
Long
orgId
)
{
ModelAndView
view
=
new
ModelAndView
(
"/admin/org/orgUser.html"
);
CoreOrg
org
=
orgConsoleService
.
queryById
(
orgId
);
...
...
admin-console/src/main/java/com/ibeetl/admin/console/web/RoleConsoleController.java
View file @
25057190
...
...
@@ -63,8 +63,7 @@ public class RoleConsoleController {
/* 页面 */
@GetMapping
(
MODEL
+
"/index.do"
)
@Function
(
"role.edit"
)
@ResponseBody
@Function
(
"role"
)
public
ModelAndView
index
()
{
ModelAndView
view
=
new
ModelAndView
(
"/admin/role/index.html"
);
view
.
addObject
(
"search"
,
RoleQuery
.
class
.
getName
());
...
...
@@ -73,7 +72,6 @@ public class RoleConsoleController {
@GetMapping
(
MODEL
+
"/edit.do"
)
@Function
(
"role.edit"
)
@ResponseBody
public
ModelAndView
edit
(
String
id
)
{
ModelAndView
view
=
new
ModelAndView
(
"/admin/role/edit.html"
);
CoreRole
role
=
roleConsoleService
.
queryById
(
id
);
...
...
@@ -83,7 +81,6 @@ public class RoleConsoleController {
@GetMapping
(
MODEL
+
"/add.do"
)
@Function
(
"role.add"
)
@ResponseBody
public
ModelAndView
add
()
{
ModelAndView
view
=
new
ModelAndView
(
"/admin/role/add.html"
);
return
view
;
...
...
@@ -91,7 +88,6 @@ public class RoleConsoleController {
@GetMapping
(
MODEL
+
"/user/list.do"
)
@Function
(
"role.user.query"
)
@ResponseBody
public
ModelAndView
users
(
Long
roleId
)
{
CoreRole
role
=
roleConsoleService
.
queryById
(
roleId
);
ModelAndView
view
=
new
ModelAndView
(
"/admin/role/roleUser.html"
);
...
...
@@ -102,14 +98,12 @@ public class RoleConsoleController {
@GetMapping
(
MODEL
+
"/function.do"
)
@Function
(
"role.function.query"
)
@ResponseBody
public
ModelAndView
functions
()
{
ModelAndView
view
=
new
ModelAndView
(
"/admin/role/function.html"
);
return
view
;
}
@GetMapping
(
MODEL
+
"/data.do"
)
@Function
(
"role.function.query"
)
@ResponseBody
public
ModelAndView
data
()
{
ModelAndView
view
=
new
ModelAndView
(
"/admin/role/data.html"
);
return
view
;
...
...
admin-console/src/main/java/com/ibeetl/admin/console/web/UserConsoleController.java
View file @
25057190
...
...
@@ -58,8 +58,7 @@ public class UserConsoleController {
/* 页面 */
@GetMapping
(
MODEL
+
"/index.do"
)
@Function
(
"user.edit"
)
@ResponseBody
@Function
(
"user"
)
public
ModelAndView
index
()
{
ModelAndView
view
=
new
ModelAndView
(
"/admin/user/index.html"
);
view
.
addObject
(
"search"
,
UserQuery
.
class
.
getName
());
...
...
@@ -68,7 +67,6 @@ public class UserConsoleController {
@GetMapping
(
MODEL
+
"/edit.do"
)
@Function
(
"user.edit"
)
@ResponseBody
public
ModelAndView
edit
(
String
id
)
{
ModelAndView
view
=
new
ModelAndView
(
"/admin/user/edit.html"
);
CoreUser
user
=
userConsoleService
.
queryById
(
id
);
...
...
@@ -78,7 +76,6 @@ public class UserConsoleController {
@GetMapping
(
MODEL
+
"/add.do"
)
@Function
(
"user.add"
)
@ResponseBody
public
ModelAndView
add
()
{
ModelAndView
view
=
new
ModelAndView
(
"/admin/user/add.html"
);
return
view
;
...
...
@@ -86,7 +83,6 @@ public class UserConsoleController {
@GetMapping
(
MODEL
+
"/changePassword.do"
)
@Function
(
"user.add"
)
@ResponseBody
public
ModelAndView
changePassword
(
Long
id
)
{
CoreUser
user
=
userConsoleService
.
queryById
(
id
);
ModelAndView
view
=
new
ModelAndView
(
"/admin/user/changePassword.html"
);
...
...
@@ -96,7 +92,6 @@ public class UserConsoleController {
@GetMapping
(
MODEL
+
"/role/list.do"
)
@Function
(
"user.role"
)
@ResponseBody
public
ModelAndView
userRoleIndex
(
Long
id
)
{
CoreUser
user
=
userConsoleService
.
queryById
(
id
);
ModelAndView
view
=
new
ModelAndView
(
"/admin/user/userRole.html"
);
...
...
@@ -107,7 +102,6 @@ public class UserConsoleController {
@GetMapping
(
MODEL
+
"/role/add.do"
)
@Function
(
"user.role"
)
@ResponseBody
public
ModelAndView
userRoleAdd
(
Long
id
)
{
CoreUser
user
=
userConsoleService
.
queryById
(
id
);
ModelAndView
view
=
new
ModelAndView
(
"/admin/user/userRoleAdd.html"
);
...
...
admin-console/src/main/resources/static/js/admin/function/add.js
0 → 100644
View file @
25057190
layui
.
define
([
'
form
'
,
'
laydate
'
,
'
table
'
,
'
functionApi
'
],
function
(
exports
)
{
var
form
=
layui
.
form
;
var
functionApi
=
layui
.
functionApi
;
var
index
=
layui
.
index
;
var
view
=
{
init
:
function
(){
Lib
.
initGenrealForm
(
$
(
"
#addForm
"
),
form
);
this
.
initSubmit
();
},
initSubmit
:
function
(){
$
(
"
#saveFunction
"
).
click
(
function
(){
functionApi
.
addFunction
(
function
(){
Common
.
info
(
"
添加成功
"
);
Lib
.
closeFrame
();
});
parent
.
window
.
dataReload
();
});
$
(
"
#saveFunction-cancel
"
).
click
(
function
(){
Lib
.
closeFrame
();
});
}
}
exports
(
'
add
'
,
view
);
});
\ No newline at end of file
admin-console/src/main/resources/static/js/admin/function/edit.js
0 → 100644
View file @
25057190
layui
.
define
([
'
form
'
,
'
laydate
'
,
'
table
'
,
'
functionApi
'
],
function
(
exports
)
{
var
form
=
layui
.
form
;
var
functionApi
=
layui
.
functionApi
;
var
index
=
layui
.
index
;
var
view
=
{
init
:
function
(){
Lib
.
initGenrealForm
(
$
(
"
#updateForm
"
),
form
);
this
.
initSubmit
();
},
initSubmit
:
function
(){
$
(
"
#saveFunction
"
).
click
(
function
(){
functionApi
.
updateFunction
(
function
(){
Common
.
info
(
"
更新成功
"
);
Lib
.
closeFrame
();
});
parent
.
window
.
dataReload
();
});
$
(
"
#saveFunction-cancel
"
).
click
(
function
(){
Lib
.
closeFrame
();
});
}
}
exports
(
'
edit
'
,
view
);
});
\ No newline at end of file
admin-console/src/main/resources/templates/admin/function/add.html
0 → 100644
View file @
25057190
<!--# layout("/common/layout.html",{"jsBase":"/js/admin/function/"}){ -->
<form
class=
"layui-form layui-form-pane"
id=
"addForm"
action=
"/admin/function/add.json"
>
<div
class=
"layui-row"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
功能名
</label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
name=
"name"
autocomplete=
"off"
placeholder=
"请输入名称"
class=
"layui-input"
value=
""
>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
功能代码
</label>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
name=
"code"
lay-verify=
"required"
placeholder=
"请输入"
autocomplete=
"off"
class=
"layui-input"
value=
""
>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
功能地址
</label>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
name=
"accessUrl"
lay-verify=
"required"
placeholder=
"请输入"
autocomplete=
"off"
class=
"layui-input"
value=
""
>
</div>
</div>
</div>
<div
class=
"layui-row"
>
<div
class=
"layui-col-xs4"
>
<div
class=
"layui-form-item"
>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
所在父功能
</label>
<layui:functionInput
style=
'layui-input-inline'
name=
"parentId"
id=
"parentFunctionId"
value=
""
></layui:functionInput>
</div>
</div>
</div>
<div
class=
"layui-col-xs4"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
功能类型
</label>
<layui:simpleDictSelect
style=
'layui-input-inline'
type=
"function_type"
id=
"type"
name=
"type"
value=
""
/>
</div>
</div>
</div>
<layui:submitButtons
id=
"saveFunction"
/>
</form>
<!--#} -->
<script>
layui
.
use
([
'
add
'
],
function
(){
var
functionAdd
=
layui
.
add
functionAdd
.
init
();
});
</script>
admin-console/src/main/resources/templates/admin/function/edit.html
0 → 100644
View file @
25057190
<!--# layout("/common/layout.html",{"jsBase":"/js/admin/function/"}){ -->
<form
class=
"layui-form layui-form-pane"
id=
"updateForm"
action=
"/admin/function/update.json"
>
<div
class=
"layui-row"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
功能名
</label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
name=
"name"
autocomplete=
"off"
placeholder=
"请输入标题"
class=
"layui-input"
value=
"${function.name}"
>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
功能代码
</label>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
name=
"code"
readonly
lay-verify=
"required"
placeholder=
"请输入"
autocomplete=
"off"
class=
"layui-input"
value=
"${function.code}"
>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
功能地址
</label>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
name=
"accessUrl"
lay-verify=
"required"
placeholder=
"请输入"
autocomplete=
"off"
class=
"layui-input"
value=
"${function.accessUrl}"
>
</div>
</div>
</div>
<div
class=
"layui-row"
>
<div
class=
"layui-col-xs4"
>
<div
class=
"layui-form-item"
>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
所在父功能
</label>
<layui:functionInput
style=
'layui-input-inline'
name=
"parentId"
id=
"parentFunctionId"
value=
"${function.parentId}"
></layui:functionInput>
</div>
</div>
</div>
<div
class=
"layui-col-xs4"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
功能类型
</label>
<layui:simpleDictSelect
style=
'layui-input-inline'
type=
"function_type"
id=
"type"
name=
"type"
value=
"${function.type}"
/>
</div>
</div>
</div>
<layui:submitButtons
id=
"saveFunction"
/>
<input
type=
"hidden"
name=
"id"
value=
${function.id}
/>
</form>
<!--#} -->
<script>
layui
.
use
([
'
edit
'
],
function
(){
var
functionEdit
=
layui
.
edit
functionEdit
.
init
();
});
</script>
admin-console/src/main/resources/templates/admin/org/edit.html
View file @
25057190
...
...
@@ -12,7 +12,7 @@
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
机构代码
</label>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
name=
"code"
disabled
lay-verify=
"required"
<input
type=
"text"
name=
"code"
readonly
lay-verify=
"required"
placeholder=
"请输入"
autocomplete=
"off"
class=
"layui-input"
value=
"${org.code}"
>
</div>
...
...
admin-core/src/main/java/com/ibeetl/admin/core/entity/CoreFunction.java
View file @
25057190
...
...
@@ -6,6 +6,7 @@ import javax.validation.constraints.NotNull;
import
org.beetl.sql.core.annotatoin.AutoID
;
import
org.beetl.sql.core.annotatoin.SeqID
;
import
org.beetl.sql.core.annotatoin.UpdateIgnore
;
import
com.ibeetl.admin.core.annotation.Dict
;
import
com.ibeetl.admin.core.util.ValidateConfig
;
...
...
@@ -20,6 +21,7 @@ public class CoreFunction extends BaseEntity {
protected
Long
id
;
//创建时间
@UpdateIgnore
protected
Date
createTime
;
private
String
accessUrl
;
@NotBlank
...
...
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