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
18144407
Commit
18144407
authored
Sep 04, 2019
by
trumansdo
Browse files
应用codestyle
千万千万要用vscode打开前端项目,或者关闭eslint,移除它 Signed-off-by:
trumansdo
<
1012243881@qq.com
>
parent
9b3d96a6
Changes
178
Hide whitespace changes
Inline
Side-by-side
plus-admin/admin-console/src/main/java/com/ibeetl/admin/console/web/FunctionController.java
View file @
18144407
...
...
@@ -34,194 +34,180 @@ import com.ibeetl.admin.core.web.JsonResult;
import
com.ibeetl.admin.core.web.dto.FunctionNodeView
;
/**
* 描述:
功能点管理
* 描述: 功能点管理
*
* @author : lijiazhi
*/
@Controller
public
class
FunctionController
{
private
final
Log
log
=
LogFactory
.
getLog
(
this
.
getClass
());
private
static
final
String
MODEL
=
"/admin/function"
;
@Autowired
CorePlatformService
platformService
;
@Autowired
private
FunctionConsoleService
functionConsoleService
;
/*页面*/
@GetMapping
(
MODEL
+
"/index.do"
)
@Function
(
"function"
)
public
ModelAndView
index
()
{
ModelAndView
view
=
new
ModelAndView
(
"/admin/function/index.html"
);
view
.
addObject
(
"search"
,
FunctionQuery
.
class
.
getName
());
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
(
Integer
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"
)
@Function
(
"function.add"
)
@ResponseBody
public
JsonResult
<
CoreFunction
>
addFunction
(
@Validated
(
ValidateConfig
.
ADD
.
class
)
CoreFunction
function
)
{
String
code
=
function
.
getCode
();
CoreFunction
dbFunction
=
functionConsoleService
.
getFunction
(
code
);
if
(
dbFunction
!=
null
){
throw
new
FormFieldException
(
CoreFunction
.
class
.
getName
(),
"code"
,
"已经存在"
);
}
if
(
function
.
getParentId
()==
null
){
function
.
setParentId
(
0
l
);
}
function
.
setCreateTime
(
new
Date
());
functionConsoleService
.
saveFunction
(
function
);
return
JsonResult
.
success
(
function
);
}
@RequestMapping
(
MODEL
+
"/update.json"
)
@Function
(
"function.update"
)
@ResponseBody
public
JsonResult
<?>
updateFunction
(
@Validated
(
ValidateConfig
.
UPDATE
.
class
)
CoreFunction
function
)
{
CoreFunction
dbFunction
=
functionConsoleService
.
getFunction
(
function
.
getCode
());
if
(
dbFunction
!=
null
&&!
dbFunction
.
getId
().
equals
(
function
.
getId
())){
throw
new
FormFieldException
(
CoreFunction
.
class
.
getName
(),
"code"
,
"已经存在"
);
}
if
(
function
.
getParentId
()==
null
){
function
.
setParentId
(
0
l
);
}
// function.setCreateTime(dbFunction.getCreateTime());
functionConsoleService
.
updateFunction
(
function
);
return
JsonResult
.
success
();
private
final
Log
log
=
LogFactory
.
getLog
(
this
.
getClass
());
private
static
final
String
MODEL
=
"/admin/function"
;
@Autowired
CorePlatformService
platformService
;
@Autowired
private
FunctionConsoleService
functionConsoleService
;
/*页面*/
@GetMapping
(
MODEL
+
"/index.do"
)
@Function
(
"function"
)
public
ModelAndView
index
()
{
ModelAndView
view
=
new
ModelAndView
(
"/admin/function/index.html"
);
view
.
addObject
(
"search"
,
FunctionQuery
.
class
.
getName
());
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
(
Integer
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"
)
@Function
(
"function.add"
)
@ResponseBody
public
JsonResult
<
CoreFunction
>
addFunction
(
@Validated
(
ValidateConfig
.
ADD
.
class
)
CoreFunction
function
)
{
String
code
=
function
.
getCode
();
CoreFunction
dbFunction
=
functionConsoleService
.
getFunction
(
code
);
if
(
dbFunction
!=
null
)
{
throw
new
FormFieldException
(
CoreFunction
.
class
.
getName
(),
"code"
,
"已经存在"
);
}
@RequestMapping
(
MODEL
+
"/view.json"
)
@Function
(
"function.query"
)
@ResponseBody
public
JsonResult
<
CoreFunction
>
getFunction
(
Long
id
)
{
CoreFunction
function
=
functionConsoleService
.
getFunction
(
id
);
if
(
function
.
hasParent
()){
CoreFunction
parent
=
functionConsoleService
.
getFunction
(
function
.
getParentId
());
function
.
set
(
"parentName"
,
parent
.
getName
());
}
else
{
function
.
set
(
"parentName"
,
""
);
}
functionConsoleService
.
queryEntityAfter
(
function
);
return
JsonResult
.
success
(
function
);
if
(
function
.
getParentId
()
==
null
)
{
function
.
setParentId
(
0
l
);
}
@RequestMapping
(
MODEL
+
"/delete.json"
)
@Function
(
"function.delete"
)
@ResponseBody
public
JsonResult
deleteFunction
(
Long
id
)
{
Core
Function
fun
=
function
ConsoleService
.
queryById
(
id
);
if
(
fun
==
null
)
{
throw
new
PlatformException
(
"删除失败,没有找到Function "
+
id
+
"!"
);
}
//删除功能和所有子功能
functionConsoleService
.
deleteFunction
(
id
);
return
new
JsonResult
().
success
(
);
function
.
setCreateTime
(
new
Date
());
functionConsoleService
.
saveFunction
(
function
);
return
JsonResult
.
success
(
function
);
}
@RequestMapping
(
MODEL
+
"/update.json"
)
@
Function
(
"
function
.update"
)
@ResponseBody
public
JsonResult
<?>
updateFunction
(
@Validated
(
ValidateConfig
.
UPDATE
.
class
)
CoreFunction
function
)
{
CoreFunction
dbFunction
=
functionConsoleService
.
getFunction
(
function
.
getCode
());
if
(
dbFunction
!=
null
&&
!
dbFunction
.
getId
().
equals
(
function
.
getId
()))
{
throw
new
FormFieldException
(
CoreFunction
.
class
.
getName
(),
"code"
,
"已经存在"
);
}
/**
* 字典列表 分页
*
* @param condtion
* @return
*/
@RequestMapping
(
MODEL
+
"/list.json"
)
@Function
(
"function.query"
)
@ResponseBody
public
JsonResult
<
PageQuery
<
CoreFunction
>>
list
(
FunctionQuery
condtion
)
{
PageQuery
page
=
condtion
.
getPageQuery
();
functionConsoleService
.
queryByCondtion
(
page
);
return
JsonResult
.
success
(
page
);
if
(
function
.
getParentId
()
==
null
)
{
function
.
setParentId
(
0
l
);
}
@PostMapping
(
MODEL
+
"/list/condition.json"
)
@Function
(
"function.query"
)
@ResponseBody
public
JsonResult
<
List
<
Map
<
String
,
Object
>>>
listCondtion
()
{
List
<
Map
<
String
,
Object
>>
list
=
AnnotationUtil
.
getInstance
().
getAnnotations
(
Query
.
class
,
FunctionQuery
.
class
);
return
JsonResult
.
success
(
list
);
// function.setCreateTime(dbFunction.getCreateTime());
functionConsoleService
.
updateFunction
(
function
);
return
JsonResult
.
success
();
}
@RequestMapping
(
MODEL
+
"/view.json"
)
@Function
(
"function.query"
)
@ResponseBody
public
JsonResult
<
CoreFunction
>
getFunction
(
Long
id
)
{
CoreFunction
function
=
functionConsoleService
.
getFunction
(
id
);
if
(
function
.
hasParent
())
{
CoreFunction
parent
=
functionConsoleService
.
getFunction
(
function
.
getParentId
());
function
.
set
(
"parentName"
,
parent
.
getName
());
}
else
{
function
.
set
(
"parentName"
,
""
);
}
private
List
<
Long
>
findChildFunctionIds
(
Long
funtionId
)
{
FunctionItem
funItem
=
platformService
.
buildFunction
().
findChild
(
funtionId
);
List
<
Long
>
children
=
funItem
.
findAllChildrenId
();
children
.
add
(
funtionId
);
return
children
;
functionConsoleService
.
queryEntityAfter
(
function
);
return
JsonResult
.
success
(
function
);
}
@RequestMapping
(
MODEL
+
"/delete.json"
)
@Function
(
"function.delete"
)
@ResponseBody
public
JsonResult
deleteFunction
(
Long
id
)
{
CoreFunction
fun
=
functionConsoleService
.
queryById
(
id
);
if
(
fun
==
null
)
{
throw
new
PlatformException
(
"删除失败,没有找到Function "
+
id
+
"!"
);
}
// 删除功能和所有子功能
functionConsoleService
.
deleteFunction
(
id
);
return
new
JsonResult
().
success
();
}
/**
* 字典列表 分页
*
* @param condtion
* @return
*/
@RequestMapping
(
MODEL
+
"/list.json"
)
@Function
(
"function.query"
)
@ResponseBody
public
JsonResult
<
PageQuery
<
CoreFunction
>>
list
(
FunctionQuery
condtion
)
{
PageQuery
page
=
condtion
.
getPageQuery
();
functionConsoleService
.
queryByCondtion
(
page
);
return
JsonResult
.
success
(
page
);
}
@PostMapping
(
MODEL
+
"/list/condition.json"
)
@Function
(
"function.query"
)
@ResponseBody
public
JsonResult
<
List
<
Map
<
String
,
Object
>>>
listCondtion
()
{
List
<
Map
<
String
,
Object
>>
list
=
AnnotationUtil
.
getInstance
().
getAnnotations
(
Query
.
class
,
FunctionQuery
.
class
);
return
JsonResult
.
success
(
list
);
}
private
List
<
Long
>
findChildFunctionIds
(
Long
funtionId
)
{
FunctionItem
funItem
=
platformService
.
buildFunction
().
findChild
(
funtionId
);
List
<
Long
>
children
=
funItem
.
findAllChildrenId
();
children
.
add
(
funtionId
);
return
children
;
}
@RequestMapping
(
MODEL
+
"/batchDel.json"
)
@Function
(
"function.delete"
)
@ResponseBody
public
JsonResult
batchDel
(
String
ids
)
{
List
<
Long
>
dels
=
ConvertUtil
.
str2longs
(
ids
);
functionConsoleService
.
batchDeleteFunction
(
dels
);
return
new
JsonResult
().
success
();
}
@PostMapping
(
MODEL
+
"/tree.json"
)
@Function
(
"function.query"
)
@ResponseBody
public
JsonResult
<
List
<
FunctionNodeView
>>
tree
()
{
FunctionItem
root
=
this
.
platformService
.
buildFunction
();
List
<
FunctionNodeView
>
tree
=
buildFunctionTree
(
root
);
return
JsonResult
.
success
(
tree
);
}
@RequestMapping
(
MODEL
+
"/batchDel.json"
)
@Function
(
"function.delete"
)
@ResponseBody
public
JsonResult
batchDel
(
String
ids
)
{
List
<
Long
>
dels
=
ConvertUtil
.
str2longs
(
ids
);
functionConsoleService
.
batchDeleteFunction
(
dels
);
return
new
JsonResult
().
success
();
private
List
<
FunctionNodeView
>
buildFunctionTree
(
FunctionItem
node
)
{
List
<
FunctionItem
>
list
=
node
.
getChildren
();
if
(
list
.
size
()
==
0
)
{
return
Collections
.
EMPTY_LIST
;
}
@PostMapping
(
MODEL
+
"/tree.json"
)
@Function
(
"function.query"
)
@ResponseBody
public
JsonResult
<
List
<
FunctionNodeView
>
>
tree
()
{
FunctionItem
root
=
this
.
platformService
.
buildFunction
();
List
<
FunctionNodeView
>
tree
=
buildFunctionTree
(
root
);
return
JsonResult
.
success
(
tree
);
List
<
FunctionNodeView
>
views
=
new
ArrayList
<
FunctionNodeView
>(
list
.
size
());
for
(
FunctionItem
item
:
list
)
{
FunctionNodeView
view
=
new
FunctionNodeView
();
view
.
setCode
(
item
.
getData
().
getCode
());
view
.
setName
(
item
.
getData
().
getName
());
view
.
setId
(
item
.
getData
().
getId
());
view
.
setAccessUrl
(
item
.
getData
().
getAccessUrl
());
List
<
FunctionNodeView
>
children
=
this
.
buildFunctionTree
(
item
);
view
.
setChildren
(
children
);
views
.
add
(
view
);
}
private
List
<
FunctionNodeView
>
buildFunctionTree
(
FunctionItem
node
){
List
<
FunctionItem
>
list
=
node
.
getChildren
();
if
(
list
.
size
()==
0
){
return
Collections
.
EMPTY_LIST
;
}
List
<
FunctionNodeView
>
views
=
new
ArrayList
<
FunctionNodeView
>(
list
.
size
());
for
(
FunctionItem
item
:
list
){
FunctionNodeView
view
=
new
FunctionNodeView
();
view
.
setCode
(
item
.
getData
().
getCode
());
view
.
setName
(
item
.
getData
().
getName
());
view
.
setId
(
item
.
getData
().
getId
());
view
.
setAccessUrl
(
item
.
getData
().
getAccessUrl
());
List
<
FunctionNodeView
>
children
=
this
.
buildFunctionTree
(
item
);
view
.
setChildren
(
children
);
views
.
add
(
view
);
}
return
views
;
}
return
views
;
}
}
plus-admin/admin-console/src/main/java/com/ibeetl/admin/console/web/MenuController.java
View file @
18144407
...
...
@@ -28,148 +28,142 @@ import com.ibeetl.admin.core.util.AnnotationUtil;
import
com.ibeetl.admin.core.util.ConvertUtil
;
import
com.ibeetl.admin.core.web.JsonResult
;
/**
* @author lijiazhi
*/
/** @author lijiazhi */
@Controller
public
class
MenuController
{
private
static
final
String
MODEL
=
"/admin/menu"
;
private
final
Log
log
=
LogFactory
.
getLog
(
this
.
getClass
());
@Autowired
MenuConsoleService
menuService
;
@Autowired
CorePlatformService
platformService
;
/*页面*/
@GetMapping
(
MODEL
+
"/index.do"
)
@Function
(
"menu"
)
public
ModelAndView
index
()
{
ModelAndView
view
=
new
ModelAndView
(
"/admin/menu/index.html"
);
view
.
addObject
(
"search"
,
MenuQuery
.
class
.
getName
());
return
view
;
}
@GetMapping
(
MODEL
+
"/add.do"
)
@Function
(
"menu.add"
)
public
ModelAndView
add
()
{
ModelAndView
view
=
new
ModelAndView
(
"/admin/menu/add.html"
);
return
view
;
}
@GetMapping
(
MODEL
+
"/edit.do"
)
@Function
(
"menu.edit"
)
public
ModelAndView
edit
(
Integer
id
)
{
ModelAndView
view
=
new
ModelAndView
(
"/admin/menu/edit.html"
);
CoreMenu
menu
=
menuService
.
queryById
(
id
);
view
.
addObject
(
"menu"
,
menu
);
return
view
;
}
/*Json*/
/**
* 查询
* @param menu
* @return
*/
@PostMapping
(
MODEL
+
"/list/condition.json"
)
@Function
(
"menu.query"
)
@ResponseBody
public
JsonResult
condition
()
{
List
<
Map
<
String
,
Object
>>
list
=
AnnotationUtil
.
getInstance
().
getAnnotations
(
Query
.
class
,
MenuQuery
.
class
);
return
JsonResult
.
success
(
list
);
}
@PostMapping
(
MODEL
+
"/list.json"
)
@Function
(
"menu.query"
)
@ResponseBody
public
JsonResult
<
PageQuery
>
list
(
MenuQuery
condtion
)
{
PageQuery
page
=
condtion
.
getPageQuery
();
menuService
.
queryByCondtion
(
page
);
return
JsonResult
.
success
(
page
);
}
/**
* 添加
* @param menu
* @return
*/
@PostMapping
(
MODEL
+
"/save.json"
)
@Function
(
"menu.save"
)
@ResponseBody
public
JsonResult
save
(
@Validated
CoreMenu
menu
)
{
menu
.
setCreateTime
(
new
Date
());
Long
id
=
menuService
.
saveMenu
(
menu
);
return
JsonResult
.
success
(
id
);
}
/**
* 更新
* @param fun
* @return
*/
@PostMapping
(
MODEL
+
"/update.json"
)
@Function
(
"menu.update"
)
@ResponseBody
public
JsonResult
update
(
CoreMenu
fun
)
{
menuService
.
updateMenu
(
fun
);
return
new
JsonResult
().
success
();
}
/**
* 根据id查询菜单信息
* @param id 菜单Id
* @return
*/
@PostMapping
(
MODEL
+
"/view.json"
)
@Function
(
"menu.query"
)
@ResponseBody
public
JsonResult
<
CoreMenu
>
view
(
Long
id
)
{
CoreMenu
fun
=
menuService
.
queryById
(
id
);
MenuItem
root
=
this
.
platformService
.
buildMenu
();
MenuItem
child
=
root
.
findChild
(
fun
.
getId
());
CoreMenu
parent
=
child
.
getParent
().
getData
();
fun
.
set
(
"parentMenuName"
,
parent
.
getName
());
return
JsonResult
.
success
(
fun
);
}
/**
* 删除
* @param id 菜单id
* @return
*/
@PostMapping
(
MODEL
+
"/delete.json"
)
@Function
(
"menu.delete"
)
@ResponseBody
public
JsonResult
delete
(
Long
id
)
{
menuService
.
deleteMenu
(
id
);
return
new
JsonResult
().
success
();
}
/**
* 批量删除
* @param ids 菜单id集合
* @return
*/
@PostMapping
(
MODEL
+
"/batchDel.json"
)
@Function
(
"menu.delete"
)
@ResponseBody
public
JsonResult
delete
(
String
ids
)
{
List
<
Long
>
dels
=
ConvertUtil
.
str2longs
(
ids
);
menuService
.
batchDeleteMenuId
(
dels
);
return
new
JsonResult
().
success
();
}
private
static
final
String
MODEL
=
"/admin/menu"
;
private
final
Log
log
=
LogFactory
.
getLog
(
this
.
getClass
());
@Autowired
MenuConsoleService
menuService
;
@Autowired
CorePlatformService
platformService
;
/*页面*/
@GetMapping
(
MODEL
+
"/index.do"
)
@Function
(
"menu"
)
public
ModelAndView
index
()
{
ModelAndView
view
=
new
ModelAndView
(
"/admin/menu/index.html"
);
view
.
addObject
(
"search"
,
MenuQuery
.
class
.
getName
());
return
view
;
}
@GetMapping
(
MODEL
+
"/add.do"
)
@Function
(
"menu.add"
)
public
ModelAndView
add
()
{
ModelAndView
view
=
new
ModelAndView
(
"/admin/menu/add.html"
);
return
view
;
}
@GetMapping
(
MODEL
+
"/edit.do"
)
@Function
(
"menu.edit"
)
public
ModelAndView
edit
(
Integer
id
)
{
ModelAndView
view
=
new
ModelAndView
(
"/admin/menu/edit.html"
);
CoreMenu
menu
=
menuService
.
queryById
(
id
);
view
.
addObject
(
"menu"
,
menu
);
return
view
;
}
/*Json*/
/**
* 查询
*
* @param menu
* @return
*/
@PostMapping
(
MODEL
+
"/list/condition.json"
)
@Function
(
"menu.query"
)
@ResponseBody
public
JsonResult
condition
()
{
List
<
Map
<
String
,
Object
>>
list
=
AnnotationUtil
.
getInstance
().
getAnnotations
(
Query
.
class
,
MenuQuery
.
class
);
return
JsonResult
.
success
(
list
);
}
@PostMapping
(
MODEL
+
"/list.json"
)
@Function
(
"menu.query"
)
@ResponseBody
public
JsonResult
<
PageQuery
>
list
(
MenuQuery
condtion
)
{
PageQuery
page
=
condtion
.
getPageQuery
();
menuService
.
queryByCondtion
(
page
);
return
JsonResult
.
success
(
page
);
}
/**
* 添加
*
* @param menu
* @return
*/
@PostMapping
(
MODEL
+
"/save.json"
)
@Function
(
"menu.save"
)
@ResponseBody
public
JsonResult
save
(
@Validated
CoreMenu
menu
)
{
menu
.
setCreateTime
(
new
Date
());
Long
id
=
menuService
.
saveMenu
(
menu
);
return
JsonResult
.
success
(
id
);
}
/**
* 更新
*
* @param fun
* @return
*/
@PostMapping
(
MODEL
+
"/update.json"
)
@Function
(
"menu.update"
)
@ResponseBody
public
JsonResult
update
(
CoreMenu
fun
)
{
menuService
.
updateMenu
(
fun
);
return
new
JsonResult
().
success
();
}
/**
* 根据id查询菜单信息
*
* @param id 菜单Id
* @return
*/
@PostMapping
(
MODEL
+
"/view.json"
)
@Function
(
"menu.query"
)
@ResponseBody
public
JsonResult
<
CoreMenu
>
view
(
Long
id
)
{
CoreMenu
fun
=
menuService
.
queryById
(
id
);
MenuItem
root
=
this
.
platformService
.
buildMenu
();
MenuItem
child
=
root
.
findChild
(
fun
.
getId
());
CoreMenu
parent
=
child
.
getParent
().
getData
();
fun
.
set
(
"parentMenuName"
,
parent
.
getName
());
return
JsonResult
.
success
(
fun
);
}
/**
* 删除
*
* @param id 菜单id
* @return
*/
@PostMapping
(
MODEL
+
"/delete.json"
)
@Function
(
"menu.delete"
)
@ResponseBody
public
JsonResult
delete
(
Long
id
)
{
menuService
.
deleteMenu
(
id
);
return
new
JsonResult
().
success
();
}
/**
* 批量删除
*
* @param ids 菜单id集合
* @return
*/
@PostMapping
(
MODEL
+
"/batchDel.json"
)
@Function
(
"menu.delete"
)
@ResponseBody
public
JsonResult
delete
(
String
ids
)
{
List
<
Long
>
dels
=
ConvertUtil
.
str2longs
(
ids
);
menuService
.
batchDeleteMenuId
(
dels
);
return
new
JsonResult
().
success
();
}
}
plus-admin/admin-console/src/main/java/com/ibeetl/admin/console/web/OrgConsoleController.java
View file @
18144407
...
...
@@ -33,149 +33,143 @@ import com.ibeetl.admin.core.web.JsonResult;
/**
* 描述: 组织机构 controller
*
* @author : xiandafu
*/
@Controller
public
class
OrgConsoleController
{
private
final
Log
log
=
LogFactory
.
getLog
(
this
.
getClass
());
private
static
final
String
MODEL
=
"/admin/org"
;
@Autowired
private
OrgConsoleService
orgConsoleService
;
@Autowired
UserConsoleService
userConsoleService
;
@Autowired
CorePlatformService
platformService
;
/*页面*/
@GetMapping
(
MODEL
+
"/index.do"
)
@Function
(
"org.query"
)
public
ModelAndView
index
()
{
ModelAndView
view
=
new
ModelAndView
(
"/admin/org/index.html"
);
view
.
addObject
(
"search"
,
OrgQuery
.
class
.
getName
());
return
view
;
private
final
Log
log
=
LogFactory
.
getLog
(
this
.
getClass
());
private
static
final
String
MODEL
=
"/admin/org"
;
@Autowired
private
OrgConsoleService
orgConsoleService
;
@Autowired
UserConsoleService
userConsoleService
;
@Autowired
CorePlatformService
platformService
;
/*页面*/
@GetMapping
(
MODEL
+
"/index.do"
)
@Function
(
"org.query"
)
public
ModelAndView
index
()
{
ModelAndView
view
=
new
ModelAndView
(
"/admin/org/index.html"
);
view
.
addObject
(
"search"
,
OrgQuery
.
class
.
getName
());
return
view
;
}
@GetMapping
(
MODEL
+
"/edit.do"
)
@Function
(
"org.edit"
)
public
ModelAndView
edit
(
String
id
)
{
ModelAndView
view
=
new
ModelAndView
(
"/admin/org/edit.html"
);
CoreOrg
org
=
orgConsoleService
.
queryById
(
id
);
view
.
addObject
(
"org"
,
org
);
return
view
;
}
@GetMapping
(
MODEL
+
"/user/list.do"
)
@Function
(
"org.query"
)
public
ModelAndView
getUsers
(
Long
orgId
)
{
ModelAndView
view
=
new
ModelAndView
(
"/admin/org/orgUser.html"
);
CoreOrg
org
=
orgConsoleService
.
queryById
(
orgId
);
view
.
addObject
(
"org"
,
org
);
view
.
addObject
(
"search"
,
OrgUserQuery
.
class
.
getName
());
return
view
;
}
/**
* 组织机构列表 分页
*
* @param condtion 查询条件
* @return
*/
@PostMapping
(
MODEL
+
"/list.json"
)
@Function
(
"org.query"
)
@ResponseBody
public
JsonResult
<
PageQuery
<
CoreOrg
>>
list
(
OrgQuery
condtion
)
{
PageQuery
page
=
condtion
.
getPageQuery
();
orgConsoleService
.
queryByCondtion
(
page
);
return
JsonResult
.
success
(
page
);
}
/**
* 获取列表查询条件
*
* @return
*/
@PostMapping
(
MODEL
+
"/list/condition.json"
)
@Function
(
"org.query"
)
@ResponseBody
public
JsonResult
<
List
<
Map
<
String
,
Object
>>>
listCondtion
()
{
List
<
Map
<
String
,
Object
>>
list
=
AnnotationUtil
.
getInstance
().
getAnnotations
(
Query
.
class
,
OrgQuery
.
class
);
return
JsonResult
.
success
(
list
);
}
/**
* 保存数据
*
* @param org
* @return
*/
@PostMapping
(
MODEL
+
"/save.json"
)
@Function
(
"org.save"
)
@ResponseBody
public
JsonResult
<
Long
>
save
(
@Validated
(
ValidateConfig
.
ADD
.
class
)
CoreOrg
org
,
BindingResult
result
)
{
if
(
result
.
hasErrors
())
{
return
JsonResult
.
failMessage
(
result
.
toString
());
}
@GetMapping
(
MODEL
+
"/edit.do"
)
@Function
(
"org.edit"
)
public
ModelAndView
edit
(
String
id
)
{
ModelAndView
view
=
new
ModelAndView
(
"/admin/org/edit.html"
);
CoreOrg
org
=
orgConsoleService
.
queryById
(
id
);
view
.
addObject
(
"org"
,
org
);
return
view
;
}
@GetMapping
(
MODEL
+
"/user/list.do"
)
@Function
(
"org.query"
)
public
ModelAndView
getUsers
(
Long
orgId
)
{
ModelAndView
view
=
new
ModelAndView
(
"/admin/org/orgUser.html"
);
CoreOrg
org
=
orgConsoleService
.
queryById
(
orgId
);
view
.
addObject
(
"org"
,
org
);
view
.
addObject
(
"search"
,
OrgUserQuery
.
class
.
getName
());
return
view
;
}
/**
* 组织机构列表 分页
* @param condtion 查询条件
* @return
*/
@PostMapping
(
MODEL
+
"/list.json"
)
@Function
(
"org.query"
)
@ResponseBody
public
JsonResult
<
PageQuery
<
CoreOrg
>>
list
(
OrgQuery
condtion
)
{
PageQuery
page
=
condtion
.
getPageQuery
();
orgConsoleService
.
queryByCondtion
(
page
);
return
JsonResult
.
success
(
page
);
}
/**
* 获取列表查询条件
* @return
*/
@PostMapping
(
MODEL
+
"/list/condition.json"
)
@Function
(
"org.query"
)
@ResponseBody
public
JsonResult
<
List
<
Map
<
String
,
Object
>>>
listCondtion
()
{
List
<
Map
<
String
,
Object
>>
list
=
AnnotationUtil
.
getInstance
().
getAnnotations
(
Query
.
class
,
OrgQuery
.
class
);
return
JsonResult
.
success
(
list
);
}
/**
* 保存数据
* @param org
* @return
*/
@PostMapping
(
MODEL
+
"/save.json"
)
@Function
(
"org.save"
)
@ResponseBody
public
JsonResult
<
Long
>
save
(
@Validated
(
ValidateConfig
.
ADD
.
class
)
CoreOrg
org
,
BindingResult
result
)
{
if
(
result
.
hasErrors
())
{
return
JsonResult
.
failMessage
(
result
.
toString
());
}
org
.
setCreateTime
(
new
Date
());
orgConsoleService
.
save
(
org
);
platformService
.
clearOrgCache
();
return
JsonResult
.
success
(
org
.
getId
());
}
/**
* 更新数据
* @param org
* @return
*/
@PostMapping
(
MODEL
+
"/update.json"
)
@Function
(
"org.update"
)
@ResponseBody
public
JsonResult
<
String
>
update
(
@Validated
(
ValidateConfig
.
UPDATE
.
class
)
CoreOrg
org
)
{
boolean
success
=
orgConsoleService
.
updateTemplate
(
org
);
if
(
success
)
{
platformService
.
clearOrgCache
();
return
JsonResult
.
successMessage
(
"保存成功"
);
}
else
{
return
JsonResult
.
failMessage
(
"保存失败"
);
}
}
/**
* 删除组织机构
* @param ids 组织id,多个用“,”隔开
* @return
*/
@PostMapping
(
MODEL
+
"/delete.json"
)
@Function
(
"org.delete"
)
@ResponseBody
public
JsonResult
delete
(
String
ids
)
{
if
(
ids
.
endsWith
(
","
))
{
ids
=
StringUtils
.
substringBeforeLast
(
ids
,
","
);
}
List
<
Long
>
idList
=
ConvertUtil
.
str2longs
(
ids
);
orgConsoleService
.
deleteById
(
idList
);
this
.
platformService
.
clearOrgCache
();
return
new
JsonResult
().
success
();
org
.
setCreateTime
(
new
Date
());
orgConsoleService
.
save
(
org
);
platformService
.
clearOrgCache
();
return
JsonResult
.
success
(
org
.
getId
());
}
/**
* 更新数据
*
* @param org
* @return
*/
@PostMapping
(
MODEL
+
"/update.json"
)
@Function
(
"org.update"
)
@ResponseBody
public
JsonResult
<
String
>
update
(
@Validated
(
ValidateConfig
.
UPDATE
.
class
)
CoreOrg
org
)
{
boolean
success
=
orgConsoleService
.
updateTemplate
(
org
);
if
(
success
)
{
platformService
.
clearOrgCache
();
return
JsonResult
.
successMessage
(
"保存成功"
);
}
else
{
return
JsonResult
.
failMessage
(
"保存失败"
);
}
@PostMapping
(
MODEL
+
"/user/list.json"
)
@Function
(
"org.query"
)
@ResponseBody
public
JsonResult
<
PageQuery
<
CoreUser
>>
getUsers
(
OrgUserQuery
userQuery
)
{
PageQuery
<
CoreUser
>
page
=
userQuery
.
getPageQuery
();
orgConsoleService
.
queryUserByCondition
(
page
);
return
JsonResult
.
success
(
page
);
}
/**
* 删除组织机构
*
* @param ids 组织id,多个用“,”隔开
* @return
*/
@PostMapping
(
MODEL
+
"/delete.json"
)
@Function
(
"org.delete"
)
@ResponseBody
public
JsonResult
delete
(
String
ids
)
{
if
(
ids
.
endsWith
(
","
))
{
ids
=
StringUtils
.
substringBeforeLast
(
ids
,
","
);
}
List
<
Long
>
idList
=
ConvertUtil
.
str2longs
(
ids
);
orgConsoleService
.
deleteById
(
idList
);
this
.
platformService
.
clearOrgCache
();
return
new
JsonResult
().
success
();
}
@PostMapping
(
MODEL
+
"/user/list.json"
)
@Function
(
"org.query"
)
@ResponseBody
public
JsonResult
<
PageQuery
<
CoreUser
>>
getUsers
(
OrgUserQuery
userQuery
)
{
PageQuery
<
CoreUser
>
page
=
userQuery
.
getPageQuery
();
orgConsoleService
.
queryUserByCondition
(
page
);
return
JsonResult
.
success
(
page
);
}
}
plus-admin/admin-console/src/main/java/com/ibeetl/admin/console/web/RoleConsoleController.java
View file @
18144407
...
...
@@ -35,295 +35,287 @@ import com.ibeetl.admin.core.util.ConvertUtil;
import
com.ibeetl.admin.core.util.ValidateConfig
;
import
com.ibeetl.admin.core.web.JsonResult
;
/**
* 角色
*/
/** 角色 */
@Controller
public
class
RoleConsoleController
{
private
final
Log
log
=
LogFactory
.
getLog
(
this
.
getClass
());
private
static
final
String
MODEL
=
"/admin/role"
;
@Autowired
private
RoleConsoleService
roleConsoleService
;
@Autowired
private
FunctionConsoleService
functionConsoleService
;
@Autowired
CorePlatformService
platformService
;
@Autowired
private
OrgConsoleService
orgConsoleService
;
/* 页面 */
@GetMapping
(
MODEL
+
"/index.do"
)
@Function
(
"role"
)
public
ModelAndView
index
()
{
ModelAndView
view
=
new
ModelAndView
(
"/admin/role/index.html"
);
view
.
addObject
(
"search"
,
RoleQuery
.
class
.
getName
());
return
view
;
}
@GetMapping
(
MODEL
+
"/edit.do"
)
@Function
(
"role.edit"
)
public
ModelAndView
edit
(
String
id
)
{
ModelAndView
view
=
new
ModelAndView
(
"/admin/role/edit.html"
);
CoreRole
role
=
roleConsoleService
.
queryById
(
id
);
view
.
addObject
(
"role"
,
role
);
return
view
;
}
@GetMapping
(
MODEL
+
"/add.do"
)
@Function
(
"role.add"
)
public
ModelAndView
add
()
{
ModelAndView
view
=
new
ModelAndView
(
"/admin/role/add.html"
);
return
view
;
private
final
Log
log
=
LogFactory
.
getLog
(
this
.
getClass
());
private
static
final
String
MODEL
=
"/admin/role"
;
@Autowired
private
RoleConsoleService
roleConsoleService
;
@Autowired
private
FunctionConsoleService
functionConsoleService
;
@Autowired
CorePlatformService
platformService
;
@Autowired
private
OrgConsoleService
orgConsoleService
;
/* 页面 */
@GetMapping
(
MODEL
+
"/index.do"
)
@Function
(
"role"
)
public
ModelAndView
index
()
{
ModelAndView
view
=
new
ModelAndView
(
"/admin/role/index.html"
);
view
.
addObject
(
"search"
,
RoleQuery
.
class
.
getName
());
return
view
;
}
@GetMapping
(
MODEL
+
"/edit.do"
)
@Function
(
"role.edit"
)
public
ModelAndView
edit
(
String
id
)
{
ModelAndView
view
=
new
ModelAndView
(
"/admin/role/edit.html"
);
CoreRole
role
=
roleConsoleService
.
queryById
(
id
);
view
.
addObject
(
"role"
,
role
);
return
view
;
}
@GetMapping
(
MODEL
+
"/add.do"
)
@Function
(
"role.add"
)
public
ModelAndView
add
()
{
ModelAndView
view
=
new
ModelAndView
(
"/admin/role/add.html"
);
return
view
;
}
@GetMapping
(
MODEL
+
"/user/list.do"
)
@Function
(
"role.user.query"
)
public
ModelAndView
users
(
Long
roleId
)
{
CoreRole
role
=
roleConsoleService
.
queryById
(
roleId
);
ModelAndView
view
=
new
ModelAndView
(
"/admin/role/roleUser.html"
);
view
.
addObject
(
"role"
,
role
);
view
.
addObject
(
"search"
,
RoleUserQuery
.
class
.
getName
());
return
view
;
}
@GetMapping
(
MODEL
+
"/function.do"
)
@Function
(
"role.function.query"
)
public
ModelAndView
functions
()
{
ModelAndView
view
=
new
ModelAndView
(
"/admin/role/function.html"
);
return
view
;
}
@GetMapping
(
MODEL
+
"/data.do"
)
@Function
(
"role.function.query"
)
public
ModelAndView
data
()
{
ModelAndView
view
=
new
ModelAndView
(
"/admin/role/data.html"
);
return
view
;
}
/**
* 列表页、 分页数据
*
* @param condtion
* @return
*/
@PostMapping
(
MODEL
+
"/list.json"
)
@Function
(
"role.query"
)
@ResponseBody
public
JsonResult
<
PageQuery
>
list
(
RoleQuery
condtion
)
{
PageQuery
page
=
condtion
.
getPageQuery
();
roleConsoleService
.
queryByCondtion
(
page
);
return
JsonResult
.
success
(
page
);
}
@GetMapping
(
MODEL
+
"/all.json"
)
@Function
(
"role.query"
)
@ResponseBody
public
JsonResult
<
List
<
CoreRole
>>
all
()
{
List
<
CoreRole
>
list
=
roleConsoleService
.
queryAllPermissionList
();
return
JsonResult
.
success
(
list
);
}
/**
* 获取列表查询条件
*
* @return
*/
@PostMapping
(
MODEL
+
"/list/condition.json"
)
@Function
(
"role.query"
)
@ResponseBody
public
JsonResult
<
List
<
Map
<
String
,
Object
>>>
listCondtion
()
{
List
<
Map
<
String
,
Object
>>
list
=
AnnotationUtil
.
getInstance
().
getAnnotations
(
Query
.
class
,
RoleQuery
.
class
);
return
JsonResult
.
success
(
list
);
}
/**
* 保存
*
* @return
*/
@PostMapping
(
MODEL
+
"/add.json"
)
@Function
(
"role.add"
)
@ResponseBody
public
JsonResult
addRole
(
@Validated
(
ValidateConfig
.
ADD
.
class
)
CoreRole
role
)
{
CoreRole
role1
=
roleConsoleService
.
queryByCode
(
role
.
getCode
());
if
(
role1
!=
null
)
{
return
JsonResult
.
failMessage
(
"用户编号已存在"
);
}
@GetMapping
(
MODEL
+
"/user/list.do"
)
@Function
(
"role.user.query"
)
public
ModelAndView
users
(
Long
roleId
)
{
CoreRole
role
=
roleConsoleService
.
queryById
(
roleId
);
ModelAndView
view
=
new
ModelAndView
(
"/admin/role/roleUser.html"
);
view
.
addObject
(
"role"
,
role
);
view
.
addObject
(
"search"
,
RoleUserQuery
.
class
.
getName
());
return
view
;
JsonResult
result
=
new
JsonResult
();
role
.
setCreateTime
(
new
Date
());
roleConsoleService
.
save
(
role
);
platformService
.
clearFunctionCache
();
return
result
.
success
();
}
/**
* 更新
*
* @param role
* @return
*/
@PostMapping
(
MODEL
+
"/update.json"
)
@Function
(
"role.edit"
)
@ResponseBody
public
JsonResult
<
String
>
update
(
@Validated
(
ValidateConfig
.
UPDATE
.
class
)
CoreRole
role
)
{
boolean
success
=
roleConsoleService
.
update
(
role
);
if
(
success
)
{
platformService
.
clearFunctionCache
();
return
new
JsonResult
().
success
();
}
else
{
return
JsonResult
.
failMessage
(
"保存失败"
);
}
@GetMapping
(
MODEL
+
"/function.do"
)
@Function
(
"role.function.query"
)
public
ModelAndView
functions
()
{
ModelAndView
view
=
new
ModelAndView
(
"/admin/role/function.html"
);
return
view
;
}
@GetMapping
(
MODEL
+
"/data.do"
)
@Function
(
"role.function.query"
)
public
ModelAndView
data
()
{
ModelAndView
view
=
new
ModelAndView
(
"/admin/role/data.html"
);
return
view
;
}
/**
* 查询角色信息
*
* @param id
* @return
*/
@GetMapping
(
MODEL
+
"/view.json"
)
@Function
(
"role.query"
)
@ResponseBody
public
JsonResult
<
CoreRole
>
queryInfo
(
Long
id
)
{
CoreRole
role
=
roleConsoleService
.
queryById
(
id
);
return
JsonResult
.
success
(
role
);
}
/**
* (批量)删除
*
* @param ids 角色id
* @return
*/
@PostMapping
(
MODEL
+
"/delete.json"
)
@Function
(
"role.delete"
)
@ResponseBody
public
JsonResult
delete
(
String
ids
)
{
if
(
ids
.
endsWith
(
","
))
{
ids
=
StringUtils
.
substringBeforeLast
(
ids
,
","
);
}
/**
* 列表页、 分页数据
*
* @param condtion
* @return
*/
@PostMapping
(
MODEL
+
"/list.json"
)
@Function
(
"role.query"
)
@ResponseBody
public
JsonResult
<
PageQuery
>
list
(
RoleQuery
condtion
)
{
PageQuery
page
=
condtion
.
getPageQuery
();
roleConsoleService
.
queryByCondtion
(
page
);
return
JsonResult
.
success
(
page
);
List
<
Long
>
idList
=
ConvertUtil
.
str2longs
(
ids
);
roleConsoleService
.
deleteById
(
idList
);
return
new
JsonResult
().
success
();
}
/**
* 查询角色下授权用户列表
*
* @param queryCondtion 查询条件
* @return
*/
@PostMapping
(
MODEL
+
"/user/list.json"
)
@Function
(
"role.user.query"
)
@ResponseBody
public
JsonResult
<
PageQuery
<
CoreUser
>>
userList
(
RoleUserQuery
query
)
{
PageQuery
page
=
query
.
getPageQuery
();
PageQuery
<
CoreUser
>
pageQuery
=
roleConsoleService
.
queryRoleUser
(
page
);
return
JsonResult
.
success
(
page
);
}
// /**
// * 给角色添加用户
// * @param userRole 角色用户关系
// * @return
// */
// @PostMapping(MODEL + "/user/save.json")
// @Function("role.user.save")
// @ResponseBody
// public JsonResult saveRoleUser(CoreUserRole userRole) {
// userRole.setCreateTime(new Date());
// userRoleConsoleService.saveSysUserRole(userRole);
// platformService.clearFunctionCache();
// return JsonResult.success();
// }
//
//
// /**
// * 用户授权删除
// * @param ids 记录id
// * @return
// */
// @GetMapping(MODEL + "/user/delete.json")
// @Function("role.user.delete")
// @ResponseBody
// public Object deleteRoleUser(String ids) {
// List<Long> dels = ConvertUtil.str2longs(ids);
// userRoleConsoleService.deleteUserRoles(dels);
// platformService.clearFunctionCache();
// return JsonResult.success();
// }
@PostMapping
(
MODEL
+
"/function/ids.json"
)
@Function
(
"role.function.query"
)
@ResponseBody
public
JsonResult
<
List
<
Long
>>
getFunctionIdByRole
(
Long
roleId
)
{
List
<
Long
>
list
=
functionConsoleService
.
getFunctionByRole
(
roleId
);
return
JsonResult
.
success
(
list
);
}
@GetMapping
(
MODEL
+
"/function/queryFunction.json"
)
@Function
(
"role.function.query"
)
@ResponseBody
public
JsonResult
<
List
<
RoleDataAccessFunction
>>
getQueryFunctionByRole
(
Long
roleId
)
{
List
<
RoleDataAccessFunction
>
list
=
functionConsoleService
.
getQueryFunctionByRole
(
roleId
);
return
JsonResult
.
success
(
list
);
}
@PostMapping
(
MODEL
+
"/function/update.json"
)
@Function
(
"role.function.edit"
)
@ResponseBody
public
JsonResult
updateFunction
(
Long
roleId
,
String
ids
)
{
List
<
Long
>
all
=
ConvertUtil
.
str2longs
(
ids
);
List
<
Long
>
addIds
=
new
ArrayList
<
Long
>();
List
<
Long
>
delIds
=
new
ArrayList
<
Long
>();
List
<
Long
>
dbs
=
functionConsoleService
.
getFunctionByRole
(
roleId
);
Iterator
<
Long
>
it
=
all
.
iterator
();
for
(
Long
id
:
all
)
{
if
(!
dbs
.
contains
(
id
))
{
addIds
.
add
(
id
);
}
}
@GetMapping
(
MODEL
+
"/all.json"
)
@Function
(
"role.query"
)
@ResponseBody
public
JsonResult
<
List
<
CoreRole
>>
all
()
{
List
<
CoreRole
>
list
=
roleConsoleService
.
queryAllPermissionList
();
return
JsonResult
.
success
(
list
);
for
(
Long
id
:
dbs
)
{
if
(!
all
.
contains
(
id
))
{
delIds
.
add
(
id
);
}
}
/**
* 获取列表查询条件
*
* @return
*/
@PostMapping
(
MODEL
+
"/list/condition.json"
)
@Function
(
"role.query"
)
@ResponseBody
public
JsonResult
<
List
<
Map
<
String
,
Object
>>>
listCondtion
()
{
List
<
Map
<
String
,
Object
>>
list
=
AnnotationUtil
.
getInstance
().
getAnnotations
(
Query
.
class
,
RoleQuery
.
class
);
return
JsonResult
.
success
(
list
);
}
/**
* 保存
*
* @return
*/
@PostMapping
(
MODEL
+
"/add.json"
)
@Function
(
"role.add"
)
@ResponseBody
public
JsonResult
addRole
(
@Validated
(
ValidateConfig
.
ADD
.
class
)
CoreRole
role
)
{
CoreRole
role1
=
roleConsoleService
.
queryByCode
(
role
.
getCode
());
if
(
role1
!=
null
)
{
return
JsonResult
.
failMessage
(
"用户编号已存在"
);
}
JsonResult
result
=
new
JsonResult
();
role
.
setCreateTime
(
new
Date
());
roleConsoleService
.
save
(
role
);
platformService
.
clearFunctionCache
();
return
result
.
success
();
}
/**
* 更新
*
* @param role
* @return
*/
@PostMapping
(
MODEL
+
"/update.json"
)
@Function
(
"role.edit"
)
@ResponseBody
public
JsonResult
<
String
>
update
(
@Validated
(
ValidateConfig
.
UPDATE
.
class
)
CoreRole
role
)
{
boolean
success
=
roleConsoleService
.
update
(
role
);
if
(
success
)
{
platformService
.
clearFunctionCache
();
return
new
JsonResult
().
success
();
}
else
{
return
JsonResult
.
failMessage
(
"保存失败"
);
}
}
/**
* 查询角色信息
*
* @param id
* @return
*/
@GetMapping
(
MODEL
+
"/view.json"
)
@Function
(
"role.query"
)
@ResponseBody
public
JsonResult
<
CoreRole
>
queryInfo
(
Long
id
)
{
CoreRole
role
=
roleConsoleService
.
queryById
(
id
);
return
JsonResult
.
success
(
role
);
}
/**
* (批量)删除
*
* @param ids
* 角色id
* @return
*/
@PostMapping
(
MODEL
+
"/delete.json"
)
@Function
(
"role.delete"
)
@ResponseBody
public
JsonResult
delete
(
String
ids
)
{
if
(
ids
.
endsWith
(
","
))
{
ids
=
StringUtils
.
substringBeforeLast
(
ids
,
","
);
}
List
<
Long
>
idList
=
ConvertUtil
.
str2longs
(
ids
);
roleConsoleService
.
deleteById
(
idList
);
return
new
JsonResult
().
success
();
}
/**
* 查询角色下授权用户列表
*
* @param queryCondtion
* 查询条件
* @return
*/
@PostMapping
(
MODEL
+
"/user/list.json"
)
@Function
(
"role.user.query"
)
@ResponseBody
public
JsonResult
<
PageQuery
<
CoreUser
>>
userList
(
RoleUserQuery
query
)
{
PageQuery
page
=
query
.
getPageQuery
();
PageQuery
<
CoreUser
>
pageQuery
=
roleConsoleService
.
queryRoleUser
(
page
);
return
JsonResult
.
success
(
page
);
}
// /**
// * 给角色添加用户
// * @param userRole 角色用户关系
// * @return
// */
// @PostMapping(MODEL + "/user/save.json")
// @Function("role.user.save")
// @ResponseBody
// public JsonResult saveRoleUser(CoreUserRole userRole) {
// userRole.setCreateTime(new Date());
// userRoleConsoleService.saveSysUserRole(userRole);
// platformService.clearFunctionCache();
// return JsonResult.success();
// }
//
//
// /**
// * 用户授权删除
// * @param ids 记录id
// * @return
// */
// @GetMapping(MODEL + "/user/delete.json")
// @Function("role.user.delete")
// @ResponseBody
// public Object deleteRoleUser(String ids) {
// List<Long> dels = ConvertUtil.str2longs(ids);
// userRoleConsoleService.deleteUserRoles(dels);
// platformService.clearFunctionCache();
// return JsonResult.success();
// }
@PostMapping
(
MODEL
+
"/function/ids.json"
)
@Function
(
"role.function.query"
)
@ResponseBody
public
JsonResult
<
List
<
Long
>>
getFunctionIdByRole
(
Long
roleId
)
{
List
<
Long
>
list
=
functionConsoleService
.
getFunctionByRole
(
roleId
);
return
JsonResult
.
success
(
list
);
}
@GetMapping
(
MODEL
+
"/function/queryFunction.json"
)
@Function
(
"role.function.query"
)
@ResponseBody
public
JsonResult
<
List
<
RoleDataAccessFunction
>>
getQueryFunctionByRole
(
Long
roleId
)
{
List
<
RoleDataAccessFunction
>
list
=
functionConsoleService
.
getQueryFunctionByRole
(
roleId
);
return
JsonResult
.
success
(
list
);
}
@PostMapping
(
MODEL
+
"/function/update.json"
)
@Function
(
"role.function.edit"
)
@ResponseBody
public
JsonResult
updateFunction
(
Long
roleId
,
String
ids
)
{
List
<
Long
>
all
=
ConvertUtil
.
str2longs
(
ids
);
List
<
Long
>
addIds
=
new
ArrayList
<
Long
>();
List
<
Long
>
delIds
=
new
ArrayList
<
Long
>();
List
<
Long
>
dbs
=
functionConsoleService
.
getFunctionByRole
(
roleId
);
Iterator
<
Long
>
it
=
all
.
iterator
();
for
(
Long
id:
all
)
{
if
(!
dbs
.
contains
(
id
))
{
addIds
.
add
(
id
);
}
}
for
(
Long
id:
dbs
)
{
if
(!
all
.
contains
(
id
))
{
delIds
.
add
(
id
);
}
}
functionConsoleService
.
updateSysRoleFunction
(
roleId
,
addIds
,
delIds
);
return
JsonResult
.
success
();
}
@PostMapping
(
MODEL
+
"/function/updateDataAccess.json"
)
@Function
(
"role.function.updateDataAccess"
)
@ResponseBody
public
JsonResult
updateFunctionDataAccess
(
Long
roleId
,
Long
fnId
,
Integer
accessType
)
{
RoleDataAccessFunction
data
=
new
RoleDataAccessFunction
();
data
.
setRoleId
(
roleId
);
data
.
setId
(
fnId
);
data
.
setDataAccessType
(
accessType
);
functionConsoleService
.
updateFunctionAccessByRole
(
Arrays
.
asList
(
data
));
return
JsonResult
.
success
();
}
/*后端模板渲染*/
@PostMapping
(
MODEL
+
"/function/dataAccess.do"
)
@Function
(
"role.function.updateDataAccess"
)
public
ModelAndView
datapage
(
Long
roleId
)
{
List
<
RoleDataAccessFunction
>
list
=
functionConsoleService
.
getQueryFunctionByRole
(
roleId
);
ModelAndView
view
=
new
ModelAndView
(
"/admin/role/dataConfigPart.html"
);
view
.
addObject
(
"list"
,
list
);
return
view
;
}
functionConsoleService
.
updateSysRoleFunction
(
roleId
,
addIds
,
delIds
);
return
JsonResult
.
success
();
}
@PostMapping
(
MODEL
+
"/function/updateDataAccess.json"
)
@Function
(
"role.function.updateDataAccess"
)
@ResponseBody
public
JsonResult
updateFunctionDataAccess
(
Long
roleId
,
Long
fnId
,
Integer
accessType
)
{
RoleDataAccessFunction
data
=
new
RoleDataAccessFunction
();
data
.
setRoleId
(
roleId
);
data
.
setId
(
fnId
);
data
.
setDataAccessType
(
accessType
);
functionConsoleService
.
updateFunctionAccessByRole
(
Arrays
.
asList
(
data
));
return
JsonResult
.
success
();
}
/*后端模板渲染*/
@PostMapping
(
MODEL
+
"/function/dataAccess.do"
)
@Function
(
"role.function.updateDataAccess"
)
public
ModelAndView
datapage
(
Long
roleId
)
{
List
<
RoleDataAccessFunction
>
list
=
functionConsoleService
.
getQueryFunctionByRole
(
roleId
);
ModelAndView
view
=
new
ModelAndView
(
"/admin/role/dataConfigPart.html"
);
view
.
addObject
(
"list"
,
list
);
return
view
;
}
}
plus-admin/admin-console/src/main/java/com/ibeetl/admin/console/web/UserConsoleController.java
View file @
18144407
...
...
@@ -52,261 +52,248 @@ import com.ibeetl.admin.core.web.JsonResult;
*/
@Controller
public
class
UserConsoleController
{
private
final
Log
log
=
LogFactory
.
getLog
(
this
.
getClass
());
private
static
final
String
MODEL
=
"/admin/user"
;
@Autowired
UserConsoleService
userConsoleService
;
@Autowired
CorePlatformService
platformService
;
@Autowired
RoleConsoleService
roleConsoleService
;
@Autowired
OrgConsoleService
orgConsoleService
;
@Autowired
FileService
fileService
;
/* 页面 */
@GetMapping
(
MODEL
+
"/index.do"
)
@Function
(
"user"
)
public
ModelAndView
index
()
{
ModelAndView
view
=
new
ModelAndView
(
"/admin/user/index.html"
);
view
.
addObject
(
"search"
,
UserQuery
.
class
.
getName
());
return
view
;
}
@GetMapping
(
MODEL
+
"/edit.do"
)
@Function
(
"user.edit"
)
public
ModelAndView
edit
(
String
id
)
{
ModelAndView
view
=
new
ModelAndView
(
"/admin/user/edit.html"
);
CoreUser
user
=
userConsoleService
.
queryById
(
id
);
view
.
addObject
(
"user"
,
user
);
return
view
;
private
final
Log
log
=
LogFactory
.
getLog
(
this
.
getClass
());
private
static
final
String
MODEL
=
"/admin/user"
;
@Autowired
UserConsoleService
userConsoleService
;
@Autowired
CorePlatformService
platformService
;
@Autowired
RoleConsoleService
roleConsoleService
;
@Autowired
OrgConsoleService
orgConsoleService
;
@Autowired
FileService
fileService
;
/* 页面 */
@GetMapping
(
MODEL
+
"/index.do"
)
@Function
(
"user"
)
public
ModelAndView
index
()
{
ModelAndView
view
=
new
ModelAndView
(
"/admin/user/index.html"
);
view
.
addObject
(
"search"
,
UserQuery
.
class
.
getName
());
return
view
;
}
@GetMapping
(
MODEL
+
"/edit.do"
)
@Function
(
"user.edit"
)
public
ModelAndView
edit
(
String
id
)
{
ModelAndView
view
=
new
ModelAndView
(
"/admin/user/edit.html"
);
CoreUser
user
=
userConsoleService
.
queryById
(
id
);
view
.
addObject
(
"user"
,
user
);
return
view
;
}
@GetMapping
(
MODEL
+
"/add.do"
)
@Function
(
"user.add"
)
public
ModelAndView
add
()
{
ModelAndView
view
=
new
ModelAndView
(
"/admin/user/add.html"
);
return
view
;
}
@GetMapping
(
MODEL
+
"/changePassword.do"
)
@Function
(
"user.add"
)
public
ModelAndView
changePassword
(
Long
id
)
{
CoreUser
user
=
userConsoleService
.
queryById
(
id
);
ModelAndView
view
=
new
ModelAndView
(
"/admin/user/changePassword.html"
);
view
.
addObject
(
"user"
,
user
);
return
view
;
}
@GetMapping
(
MODEL
+
"/role/list.do"
)
@Function
(
"user.role"
)
public
ModelAndView
userRoleIndex
(
Long
id
)
{
CoreUser
user
=
userConsoleService
.
queryById
(
id
);
ModelAndView
view
=
new
ModelAndView
(
"/admin/user/userRole.html"
);
view
.
addObject
(
"search"
,
UserRoleQuery
.
class
.
getName
());
view
.
addObject
(
"user"
,
user
);
return
view
;
}
@GetMapping
(
MODEL
+
"/role/add.do"
)
@Function
(
"user.role"
)
public
ModelAndView
userRoleAdd
(
Long
id
)
{
CoreUser
user
=
userConsoleService
.
queryById
(
id
);
ModelAndView
view
=
new
ModelAndView
(
"/admin/user/userRoleAdd.html"
);
view
.
addObject
(
"user"
,
user
);
return
view
;
}
/* Json */
@PostMapping
(
MODEL
+
"/delete.json"
)
@Function
(
"user.delete"
)
@ResponseBody
public
JsonResult
delete
(
String
ids
)
{
List
<
Long
>
dels
=
ConvertUtil
.
str2longs
(
ids
);
userConsoleService
.
batchDelSysUser
(
dels
);
return
JsonResult
.
success
();
}
@PostMapping
(
MODEL
+
"/update.json"
)
@Function
(
"user.update"
)
@ResponseBody
public
JsonResult
update
(
@Validated
(
ValidateConfig
.
UPDATE
.
class
)
CoreUser
user
)
{
boolean
success
=
userConsoleService
.
updateTemplate
(
user
);
if
(
success
)
{
this
.
platformService
.
clearFunctionCache
();
return
JsonResult
.
success
();
}
else
{
return
JsonResult
.
failMessage
(
"保存失败!"
);
}
@GetMapping
(
MODEL
+
"/add.do"
)
@Function
(
"user.add"
)
public
ModelAndView
add
()
{
ModelAndView
view
=
new
ModelAndView
(
"/admin/user/add.html"
);
return
view
;
}
@PostMapping
(
MODEL
+
"/add.json"
)
@Function
(
"user.add"
)
@ResponseBody
public
JsonResult
<
Long
>
add
(
@Validated
(
ValidateConfig
.
ADD
.
class
)
CoreUser
user
)
{
if
(!
platformService
.
isAllowUserName
(
user
.
getCode
()))
{
return
JsonResult
.
failMessage
(
"不允许的注册名字 "
+
user
.
getCode
());
}
@GetMapping
(
MODEL
+
"/changePassword.do"
)
@Function
(
"user.add"
)
public
ModelAndView
changePassword
(
Long
id
)
{
CoreUser
user
=
userConsoleService
.
queryById
(
id
);
ModelAndView
view
=
new
ModelAndView
(
"/admin/user/changePassword.html"
);
view
.
addObject
(
"user"
,
user
);
return
view
;
}
@GetMapping
(
MODEL
+
"/role/list.do"
)
@Function
(
"user.role"
)
public
ModelAndView
userRoleIndex
(
Long
id
)
{
CoreUser
user
=
userConsoleService
.
queryById
(
id
);
ModelAndView
view
=
new
ModelAndView
(
"/admin/user/userRole.html"
);
view
.
addObject
(
"search"
,
UserRoleQuery
.
class
.
getName
());
view
.
addObject
(
"user"
,
user
);
return
view
;
user
.
setCreateTime
(
new
Date
());
userConsoleService
.
saveUser
(
user
);
return
JsonResult
.
success
(
user
.
getId
());
}
@PostMapping
(
MODEL
+
"/view.json"
)
@ResponseBody
@Function
(
"user.query"
)
public
JsonResult
<
CoreUser
>
view
(
Long
id
)
{
CoreUser
user
=
userConsoleService
.
queryById
(
id
);
return
JsonResult
.
success
(
user
);
}
@PostMapping
(
MODEL
+
"/list.json"
)
@Function
(
"user.query"
)
@ResponseBody
public
JsonResult
<
PageQuery
<
CoreUser
>>
index
(
UserQuery
condtion
)
{
PageQuery
<
CoreUser
>
page
=
condtion
.
getPageQuery
();
userConsoleService
.
queryByCondtion
(
page
);
return
JsonResult
.
success
(
page
);
}
@PostMapping
(
MODEL
+
"/list/condition.json"
)
@Function
(
"user.query"
)
@ResponseBody
public
JsonResult
<
List
<
Map
<
String
,
Object
>>>
indexCondtion
()
{
List
<
Map
<
String
,
Object
>>
list
=
AnnotationUtil
.
getInstance
().
getAnnotations
(
Query
.
class
,
UserQuery
.
class
);
return
JsonResult
.
success
(
list
);
}
@PostMapping
(
MODEL
+
"/disable.json"
)
@Function
(
"user.disable"
)
@ResponseBody
public
JsonResult
disableUser
(
String
ids
)
{
List
<
Long
>
dels
=
ConvertUtil
.
str2longs
(
ids
);
userConsoleService
.
batchUpdateUserState
(
dels
,
GeneralStateEnum
.
DISABLE
);
for
(
Long
id
:
dels
)
{
CoreUser
user
=
userConsoleService
.
queryById
(
id
);
this
.
platformService
.
restUserSession
(
user
.
getCode
());
}
@GetMapping
(
MODEL
+
"/role/add.do"
)
@Function
(
"user.role"
)
public
ModelAndView
userRoleAdd
(
Long
id
)
{
CoreUser
user
=
userConsoleService
.
queryById
(
id
);
ModelAndView
view
=
new
ModelAndView
(
"/admin/user/userRoleAdd.html"
);
view
.
addObject
(
"user"
,
user
);
return
view
;
}
/* Json */
@PostMapping
(
MODEL
+
"/delete.json"
)
@Function
(
"user.delete"
)
@ResponseBody
public
JsonResult
delete
(
String
ids
)
{
List
<
Long
>
dels
=
ConvertUtil
.
str2longs
(
ids
);
userConsoleService
.
batchDelSysUser
(
dels
);
return
JsonResult
.
success
();
}
@PostMapping
(
MODEL
+
"/update.json"
)
@Function
(
"user.update"
)
@ResponseBody
public
JsonResult
update
(
@Validated
(
ValidateConfig
.
UPDATE
.
class
)
CoreUser
user
)
{
boolean
success
=
userConsoleService
.
updateTemplate
(
user
);
if
(
success
)
{
this
.
platformService
.
clearFunctionCache
();
return
JsonResult
.
success
();
}
else
{
return
JsonResult
.
failMessage
(
"保存失败!"
);
}
}
@PostMapping
(
MODEL
+
"/add.json"
)
@Function
(
"user.add"
)
@ResponseBody
public
JsonResult
<
Long
>
add
(
@Validated
(
ValidateConfig
.
ADD
.
class
)
CoreUser
user
)
{
if
(!
platformService
.
isAllowUserName
(
user
.
getCode
()))
{
return
JsonResult
.
failMessage
(
"不允许的注册名字 "
+
user
.
getCode
());
}
user
.
setCreateTime
(
new
Date
());
userConsoleService
.
saveUser
(
user
);
return
JsonResult
.
success
(
user
.
getId
());
}
@PostMapping
(
MODEL
+
"/view.json"
)
@ResponseBody
@Function
(
"user.query"
)
public
JsonResult
<
CoreUser
>
view
(
Long
id
)
{
CoreUser
user
=
userConsoleService
.
queryById
(
id
);
return
JsonResult
.
success
(
user
);
}
@PostMapping
(
MODEL
+
"/list.json"
)
@Function
(
"user.query"
)
@ResponseBody
public
JsonResult
<
PageQuery
<
CoreUser
>>
index
(
UserQuery
condtion
)
{
PageQuery
<
CoreUser
>
page
=
condtion
.
getPageQuery
();
userConsoleService
.
queryByCondtion
(
page
);
return
JsonResult
.
success
(
page
);
return
JsonResult
.
success
();
}
/**
* 启用用户操作
*
* @return
*/
@PostMapping
(
MODEL
+
"/enable.json"
)
@Function
(
"user.enable"
)
@ResponseBody
public
JsonResult
enableUser
(
String
ids
)
{
List
<
Long
>
enables
=
ConvertUtil
.
str2longs
(
ids
);
userConsoleService
.
batchUpdateUserState
(
enables
,
GeneralStateEnum
.
ENABLE
);
return
JsonResult
.
success
();
}
/**
* 管理员重置用户密码
*
* @return
*/
@PostMapping
(
MODEL
+
"/changePassword.json"
)
@Function
(
"user.reset"
)
@ResponseBody
public
JsonResult
changePassword
(
Long
id
,
String
password
)
{
userConsoleService
.
resetPassword
(
id
,
password
);
return
new
JsonResult
().
success
();
}
/**
* 用户所有授权角色列表
*
* @param id 用户id
* @return
*/
@PostMapping
(
MODEL
+
"/role/list.json"
)
@Function
(
"user.role"
)
@ResponseBody
public
JsonResult
<
List
<
CoreUserRole
>>
getRoleList
(
UserRoleQuery
roleQuery
)
{
List
<
CoreUserRole
>
list
=
userConsoleService
.
getUserRoles
(
roleQuery
);
return
JsonResult
.
success
(
list
);
}
/**
* 用户添加授权角色页
*
* @return
*/
@PostMapping
(
MODEL
+
"/role/add.json"
)
@Function
(
"user.role"
)
@ResponseBody
public
JsonResult
saveUserRole
(
@Validated
CoreUserRole
userRole
)
{
userRole
.
setCreateTime
(
new
Date
());
this
.
userConsoleService
.
saveUserRole
(
userRole
);
this
.
platformService
.
clearFunctionCache
();
return
JsonResult
.
success
(
userRole
.
getId
());
}
/**
* 删除用户角色授权
*
* @return
*/
@PostMapping
(
MODEL
+
"/role/delete.json"
)
@Function
(
"user.role"
)
@ResponseBody
public
JsonResult
delUserRole
(
String
ids
)
{
List
<
Long
>
dels
=
ConvertUtil
.
str2longs
(
ids
);
userConsoleService
.
deleteUserRoles
(
dels
);
this
.
platformService
.
clearFunctionCache
();
return
JsonResult
.
success
();
}
@PostMapping
(
MODEL
+
"/excel/export.json"
)
@Function
(
"user.export"
)
@ResponseBody
public
JsonResult
<
String
>
export
(
HttpServletResponse
response
,
UserQuery
condtion
)
{
String
excelTemplate
=
"excelTemplates/admin/user/user_collection_template.xls"
;
PageQuery
<
CoreUser
>
page
=
condtion
.
getPageQuery
();
// 取出全部符合条件的
page
.
setPageSize
(
Integer
.
MAX_VALUE
);
page
.
setPageNumber
(
1
);
page
.
setTotalRow
(
Integer
.
MAX_VALUE
);
List
<
UserExcelExportData
>
users
=
userConsoleService
.
queryExcel
(
page
);
try
(
InputStream
is
=
Thread
.
currentThread
().
getContextClassLoader
().
getResourceAsStream
(
excelTemplate
))
{
if
(
is
==
null
)
{
throw
new
PlatformException
(
"模板资源不存在:"
+
excelTemplate
);
}
FileItem
item
=
fileService
.
createFileTemp
(
"user_collection.xls"
);
OutputStream
os
=
item
.
openOutpuStream
();
Context
context
=
new
Context
();
context
.
putVar
(
"users"
,
users
);
JxlsHelper
.
getInstance
().
processTemplate
(
is
,
os
,
context
);
// 下载参考FileSystemContorller
return
JsonResult
.
success
(
item
.
getPath
());
}
catch
(
IOException
e
)
{
throw
new
PlatformException
(
e
.
getMessage
());
}
@PostMapping
(
MODEL
+
"/list/condition.json"
)
@Function
(
"user.query"
)
@ResponseBody
public
JsonResult
<
List
<
Map
<
String
,
Object
>>>
indexCondtion
()
{
List
<
Map
<
String
,
Object
>>
list
=
AnnotationUtil
.
getInstance
().
getAnnotations
(
Query
.
class
,
UserQuery
.
class
);
return
JsonResult
.
success
(
list
);
}
@PostMapping
(
MODEL
+
"/disable.json"
)
@Function
(
"user.disable"
)
@ResponseBody
public
JsonResult
disableUser
(
String
ids
)
{
List
<
Long
>
dels
=
ConvertUtil
.
str2longs
(
ids
);
userConsoleService
.
batchUpdateUserState
(
dels
,
GeneralStateEnum
.
DISABLE
);
for
(
Long
id
:
dels
)
{
CoreUser
user
=
userConsoleService
.
queryById
(
id
);
this
.
platformService
.
restUserSession
(
user
.
getCode
());
}
return
JsonResult
.
success
();
}
/**
* 启用用户操作
*
* @return
*/
@PostMapping
(
MODEL
+
"/enable.json"
)
@Function
(
"user.enable"
)
@ResponseBody
public
JsonResult
enableUser
(
String
ids
)
{
List
<
Long
>
enables
=
ConvertUtil
.
str2longs
(
ids
);
userConsoleService
.
batchUpdateUserState
(
enables
,
GeneralStateEnum
.
ENABLE
);
return
JsonResult
.
success
();
}
/**
* 管理员重置用户密码
*
* @return
*/
@PostMapping
(
MODEL
+
"/changePassword.json"
)
@Function
(
"user.reset"
)
@ResponseBody
public
JsonResult
changePassword
(
Long
id
,
String
password
)
{
userConsoleService
.
resetPassword
(
id
,
password
);
return
new
JsonResult
().
success
();
}
/**
* 用户所有授权角色列表
*
* @param id 用户id
* @return
*/
@PostMapping
(
MODEL
+
"/role/list.json"
)
@Function
(
"user.role"
)
@ResponseBody
public
JsonResult
<
List
<
CoreUserRole
>>
getRoleList
(
UserRoleQuery
roleQuery
)
{
List
<
CoreUserRole
>
list
=
userConsoleService
.
getUserRoles
(
roleQuery
);
return
JsonResult
.
success
(
list
);
}
/**
* 用户添加授权角色页
*
* @return
*/
@PostMapping
(
MODEL
+
"/role/add.json"
)
@Function
(
"user.role"
)
@ResponseBody
public
JsonResult
saveUserRole
(
@Validated
CoreUserRole
userRole
)
{
userRole
.
setCreateTime
(
new
Date
());
this
.
userConsoleService
.
saveUserRole
(
userRole
);
this
.
platformService
.
clearFunctionCache
();
return
JsonResult
.
success
(
userRole
.
getId
());
}
/**
* 删除用户角色授权
*
* @return
*/
@PostMapping
(
MODEL
+
"/role/delete.json"
)
@Function
(
"user.role"
)
@ResponseBody
public
JsonResult
delUserRole
(
String
ids
)
{
List
<
Long
>
dels
=
ConvertUtil
.
str2longs
(
ids
);
userConsoleService
.
deleteUserRoles
(
dels
);
this
.
platformService
.
clearFunctionCache
();
return
JsonResult
.
success
();
}
@PostMapping
(
MODEL
+
"/excel/export.json"
)
@Function
(
"user.export"
)
@ResponseBody
public
JsonResult
<
String
>
export
(
HttpServletResponse
response
,
UserQuery
condtion
)
{
String
excelTemplate
=
"excelTemplates/admin/user/user_collection_template.xls"
;
PageQuery
<
CoreUser
>
page
=
condtion
.
getPageQuery
();
//取出全部符合条件的
page
.
setPageSize
(
Integer
.
MAX_VALUE
);
page
.
setPageNumber
(
1
);
page
.
setTotalRow
(
Integer
.
MAX_VALUE
);
List
<
UserExcelExportData
>
users
=
userConsoleService
.
queryExcel
(
page
);
try
(
InputStream
is
=
Thread
.
currentThread
().
getContextClassLoader
().
getResourceAsStream
(
excelTemplate
))
{
if
(
is
==
null
)
{
throw
new
PlatformException
(
"模板资源不存在:"
+
excelTemplate
);
}
FileItem
item
=
fileService
.
createFileTemp
(
"user_collection.xls"
);
OutputStream
os
=
item
.
openOutpuStream
();
Context
context
=
new
Context
();
context
.
putVar
(
"users"
,
users
);
JxlsHelper
.
getInstance
().
processTemplate
(
is
,
os
,
context
);
//下载参考FileSystemContorller
return
JsonResult
.
success
(
item
.
getPath
());
}
catch
(
IOException
e
)
{
throw
new
PlatformException
(
e
.
getMessage
());
}
}
}
}
plus-admin/admin-console/src/main/java/com/ibeetl/admin/console/web/dto/DictExcelImportData.java
View file @
18144407
...
...
@@ -4,28 +4,26 @@ import com.ibeetl.admin.core.entity.CoreDict;
/**
* 字典数据导入,参考 dict_mapping.xml
* @author xiandafu
*
* @author xiandafu
*/
public
class
DictExcelImportData
extends
CoreDict
{
private
Integer
excelId
;
private
Integer
parentExcelId
;
private
Integer
excelId
;
private
Integer
parentExcelId
;
public
Integer
getExcelId
()
{
return
excelId
;
}
public
Integer
getExcelId
()
{
return
excelId
;
}
public
void
setExcelId
(
Integer
excelId
)
{
this
.
excelId
=
excelId
;
}
public
void
setExcelId
(
Integer
excelId
)
{
this
.
excelId
=
excelId
;
}
public
Integer
getParentExcelId
()
{
return
parentExcelId
;
}
public
Integer
getParentExcelId
()
{
return
parentExcelId
;
}
public
void
setParentExcelId
(
Integer
parentExcelId
)
{
this
.
parentExcelId
=
parentExcelId
;
}
public
void
setParentExcelId
(
Integer
parentExcelId
)
{
this
.
parentExcelId
=
parentExcelId
;
}
}
plus-admin/admin-console/src/main/java/com/ibeetl/admin/console/web/dto/RoleDataAccessFunction.java
View file @
18144407
...
...
@@ -3,23 +3,22 @@ package com.ibeetl.admin.console.web.dto;
import
com.ibeetl.admin.core.entity.CoreFunction
;
public
class
RoleDataAccessFunction
extends
CoreFunction
{
private
Integer
dataAccessType
;
private
Long
roleId
;
private
Integer
dataAccessType
;
private
Long
roleId
;
public
Integer
getDataAccessType
()
{
return
dataAccessType
;
}
public
Integer
getDataAccessType
()
{
return
dataAccessType
;
}
public
void
setDataAccessType
(
Integer
dataAccessType
)
{
this
.
dataAccessType
=
dataAccessType
;
}
public
void
setDataAccessType
(
Integer
dataAccessType
)
{
this
.
dataAccessType
=
dataAccessType
;
}
public
Long
getRoleId
()
{
return
roleId
;
}
public
Long
getRoleId
()
{
return
roleId
;
}
public
void
setRoleId
(
Long
roleId
)
{
this
.
roleId
=
roleId
;
}
public
void
setRoleId
(
Long
roleId
)
{
this
.
roleId
=
roleId
;
}
}
plus-admin/admin-console/src/main/java/com/ibeetl/admin/console/web/dto/UserExcelExportData.java
View file @
18144407
...
...
@@ -7,58 +7,71 @@ import com.ibeetl.admin.core.annotation.Dict;
/**
* excel导出需要的模板数据
* @author xiandafu
*
* @author xiandafu
*/
public
class
UserExcelExportData
{
protected
Long
id
;
private
String
code
;
private
String
name
;
private
String
orgText
;
private
String
password
;
private
String
stateText
;
private
String
jobType1Text
;
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getOrgText
()
{
return
orgText
;
}
public
void
setOrgText
(
String
orgText
)
{
this
.
orgText
=
orgText
;
}
public
String
getPassword
()
{
return
password
;
}
public
void
setPassword
(
String
password
)
{
this
.
password
=
password
;
}
public
String
getStateText
()
{
return
stateText
;
}
public
void
setStateText
(
String
stateText
)
{
this
.
stateText
=
stateText
;
}
public
String
getJobType1Text
()
{
return
jobType1Text
;
}
public
void
setJobType1Text
(
String
jobType1Text
)
{
this
.
jobType1Text
=
jobType1Text
;
}
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
class
UserExcelExportData
{
protected
Long
id
;
private
String
code
;
private
String
name
;
private
String
orgText
;
private
String
password
;
private
String
stateText
;
private
String
jobType1Text
;
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getOrgText
()
{
return
orgText
;
}
public
void
setOrgText
(
String
orgText
)
{
this
.
orgText
=
orgText
;
}
public
String
getPassword
()
{
return
password
;
}
public
void
setPassword
(
String
password
)
{
this
.
password
=
password
;
}
public
String
getStateText
()
{
return
stateText
;
}
public
void
setStateText
(
String
stateText
)
{
this
.
stateText
=
stateText
;
}
public
String
getJobType1Text
()
{
return
jobType1Text
;
}
public
void
setJobType1Text
(
String
jobType1Text
)
{
this
.
jobType1Text
=
jobType1Text
;
}
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
}
plus-admin/admin-console/src/main/java/com/ibeetl/admin/console/web/query/AuditQuery.java
View file @
18144407
...
...
@@ -8,68 +8,75 @@ import com.ibeetl.admin.core.annotation.Query;
import
com.ibeetl.admin.core.util.Tool
;
import
com.ibeetl.admin.core.web.query.PageParam
;
/**
* 审计查询条件
*/
/** 审计查询条件 */
public
class
AuditQuery
extends
PageParam
{
@Query
(
name
=
"功能名称"
,
display
=
true
,
fuzzy
=
true
)
private
String
functionName
;
@Query
(
name
=
"功能编号"
,
display
=
true
,
fuzzy
=
true
)
private
String
functionCode
;
@Query
(
name
=
"用户名称"
,
display
=
true
,
fuzzy
=
true
)
private
String
userName
;
@Query
(
name
=
"创建日期"
,
display
=
true
,
type
=
Query
.
TYPE_DATE_BETWEEN
)
private
String
createDateRange
;
private
Date
createDateMin
;
private
Date
createDateMax
;
public
String
getFunctionCode
()
{
return
functionCode
;
}
public
void
setFunctionCode
(
String
functionCode
)
{
this
.
functionCode
=
functionCode
;
}
public
String
getUserName
()
{
return
userName
;
}
public
void
setUserName
(
String
userName
)
{
this
.
userName
=
userName
;
}
public
String
getCreateDateRange
()
{
return
createDateRange
;
}
public
void
setCreateDateRange
(
String
createDateRange
)
{
this
.
createDateRange
=
createDateRange
;
if
(
StringUtils
.
isEmpty
(
createDateRange
))
{
return
;
}
Date
[]
ds
=
Tool
.
parseDataRange
(
createDateRange
);
this
.
createDateMin
=
ds
[
0
];
this
.
createDateMax
=
ds
[
1
];
}
public
Date
getCreateDateMin
()
{
return
createDateMin
;
}
public
void
setCreateDateMin
(
Date
createDateMin
)
{
this
.
createDateMin
=
createDateMin
;
}
public
Date
getCreateDateMax
()
{
return
createDateMax
;
}
public
void
setCreateDateMax
(
Date
createDateMax
)
{
this
.
createDateMax
=
createDateMax
;
@Query
(
name
=
"功能名称"
,
display
=
true
,
fuzzy
=
true
)
private
String
functionName
;
@Query
(
name
=
"功能编号"
,
display
=
true
,
fuzzy
=
true
)
private
String
functionCode
;
@Query
(
name
=
"用户名称"
,
display
=
true
,
fuzzy
=
true
)
private
String
userName
;
@Query
(
name
=
"创建日期"
,
display
=
true
,
type
=
Query
.
TYPE_DATE_BETWEEN
)
private
String
createDateRange
;
private
Date
createDateMin
;
private
Date
createDateMax
;
public
String
getFunctionCode
()
{
return
functionCode
;
}
public
void
setFunctionCode
(
String
functionCode
)
{
this
.
functionCode
=
functionCode
;
}
public
String
getUserName
()
{
return
userName
;
}
public
void
setUserName
(
String
userName
)
{
this
.
userName
=
userName
;
}
public
String
getCreateDateRange
()
{
return
createDateRange
;
}
public
void
setCreateDateRange
(
String
createDateRange
)
{
this
.
createDateRange
=
createDateRange
;
if
(
StringUtils
.
isEmpty
(
createDateRange
))
{
return
;
}
public
String
getFunctionName
()
{
return
functionName
;
}
public
void
setFunctionName
(
String
functionName
)
{
this
.
functionName
=
functionName
;
}
Date
[]
ds
=
Tool
.
parseDataRange
(
createDateRange
);
this
.
createDateMin
=
ds
[
0
];
this
.
createDateMax
=
ds
[
1
];
}
public
Date
getCreateDateMin
()
{
return
createDateMin
;
}
public
void
setCreateDateMin
(
Date
createDateMin
)
{
this
.
createDateMin
=
createDateMin
;
}
public
Date
getCreateDateMax
()
{
return
createDateMax
;
}
public
void
setCreateDateMax
(
Date
createDateMax
)
{
this
.
createDateMax
=
createDateMax
;
}
public
String
getFunctionName
()
{
return
functionName
;
}
public
void
setFunctionName
(
String
functionName
)
{
this
.
functionName
=
functionName
;
}
}
plus-admin/admin-console/src/main/java/com/ibeetl/admin/console/web/query/CmsBlogQuery.java
View file @
18144407
...
...
@@ -4,17 +4,16 @@ import com.ibeetl.admin.core.annotation.Query;
import
com.ibeetl.admin.core.util.enums.CoreDictType
;
import
com.ibeetl.admin.core.web.query.PageParam
;
import
java.util.Date
;
/**
*CmsBlog查询
*/
/** CmsBlog查询 */
public
class
CmsBlogQuery
extends
PageParam
{
@Query
(
name
=
"id"
,
display
=
true
)
private
Integer
id
;
public
Integer
getId
(){
return
id
;
}
public
void
setId
(
Integer
id
){
this
.
id
=
id
;
}
@Query
(
name
=
"id"
,
display
=
true
)
private
Integer
id
;
public
Integer
getId
()
{
return
id
;
}
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
}
plus-admin/admin-console/src/main/java/com/ibeetl/admin/console/web/query/CoreDictQuery.java
View file @
18144407
...
...
@@ -4,41 +4,49 @@ import com.ibeetl.admin.core.annotation.Query;
import
com.ibeetl.admin.core.util.enums.CoreDictType
;
import
com.ibeetl.admin.core.web.query.PageParam
;
import
java.util.Date
;
/**
*CoreDict查询
*/
/** CoreDict查询 */
public
class
CoreDictQuery
extends
PageParam
{
@Query
(
name
=
"字典值"
,
display
=
true
)
private
String
value
;
@Query
(
name
=
"字典名称"
,
display
=
true
)
private
String
name
;
@Query
(
name
=
"字典类型名称"
,
display
=
true
)
private
String
typeName
;
@Query
(
name
=
"父字典"
,
display
=
true
)
private
String
parent
;
public
String
getValue
(){
return
value
;
}
public
void
setValue
(
String
value
){
this
.
value
=
value
;
}
public
String
getName
(){
return
name
;
}
public
void
setName
(
String
name
){
this
.
name
=
name
;
}
public
String
getTypeName
(){
return
typeName
;
}
public
void
setTypeName
(
String
typeName
){
this
.
typeName
=
typeName
;
}
public
String
getParent
(){
return
parent
;
}
public
void
setParent
(
String
parent
){
this
.
parent
=
parent
;
}
@Query
(
name
=
"字典值"
,
display
=
true
)
private
String
value
;
@Query
(
name
=
"字典名称"
,
display
=
true
)
private
String
name
;
@Query
(
name
=
"字典类型名称"
,
display
=
true
)
private
String
typeName
;
@Query
(
name
=
"父字典"
,
display
=
true
)
private
String
parent
;
public
String
getValue
()
{
return
value
;
}
public
void
setValue
(
String
value
)
{
this
.
value
=
value
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getTypeName
()
{
return
typeName
;
}
public
void
setTypeName
(
String
typeName
)
{
this
.
typeName
=
typeName
;
}
public
String
getParent
()
{
return
parent
;
}
public
void
setParent
(
String
parent
)
{
this
.
parent
=
parent
;
}
}
plus-admin/admin-console/src/main/java/com/ibeetl/admin/console/web/query/CoreFunctionQuery.java
View file @
18144407
...
...
@@ -3,33 +3,38 @@ package com.ibeetl.admin.console.web.query;
import
com.ibeetl.admin.core.annotation.Query
;
import
com.ibeetl.admin.core.util.enums.CoreDictType
;
import
com.ibeetl.admin.core.web.query.PageParam
;
/**
*功能查询
*/
/** 功能查询 */
public
class
CoreFunctionQuery
extends
PageParam
{
@Query
(
name
=
"名称"
,
display
=
true
)
private
String
name
;
@Query
(
name
=
"访问路径"
,
display
=
true
)
private
String
accessUrl
;
@Query
(
name
=
"功能点类型"
,
display
=
true
)
private
String
type
;
public
String
getName
(){
return
name
;
}
public
void
setName
(
String
name
){
this
.
name
=
name
;
}
public
String
getAccessUrl
(){
return
accessUrl
;
}
public
void
setAccessUrl
(
String
accessUrl
){
this
.
accessUrl
=
accessUrl
;
}
public
String
getType
(){
return
type
;
}
public
void
setType
(
String
type
){
this
.
type
=
type
;
}
@Query
(
name
=
"名称"
,
display
=
true
)
private
String
name
;
@Query
(
name
=
"访问路径"
,
display
=
true
)
private
String
accessUrl
;
@Query
(
name
=
"功能点类型"
,
display
=
true
)
private
String
type
;
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getAccessUrl
()
{
return
accessUrl
;
}
public
void
setAccessUrl
(
String
accessUrl
)
{
this
.
accessUrl
=
accessUrl
;
}
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
}
plus-admin/admin-console/src/main/java/com/ibeetl/admin/console/web/query/FunctionQuery.java
View file @
18144407
...
...
@@ -5,64 +5,70 @@ import java.util.List;
import
com.ibeetl.admin.core.annotation.Query
;
import
com.ibeetl.admin.core.web.query.PageParam
;
/**
* 功能表单查询条件
*/
/** 功能表单查询条件 */
public
class
FunctionQuery
extends
PageParam
{
@Query
(
name
=
"代码"
,
display
=
true
,
fuzzy
=
true
)
private
String
code
;
@Query
(
name
=
"名称"
,
display
=
true
,
fuzzy
=
true
)
private
String
name
;
@Query
(
name
=
"访问地址"
,
fuzzy
=
true
)
private
String
accessUrl
;
@Query
(
name
=
"上一级功能"
,
display
=
true
,
type
=
Query
.
TYPE_CONTROL
,
control
=
"fun"
)
private
Long
parentFunctionId
;
private
Long
functionId
;
//查询子类
private
List
<
Long
>
functionIds
;
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getAccessUrl
()
{
return
accessUrl
;
}
public
void
setAccessUrl
(
String
accessUrl
)
{
this
.
accessUrl
=
accessUrl
;
}
public
List
<
Long
>
getFunctionIds
()
{
return
functionIds
;
}
public
void
setFunctionIds
(
List
<
Long
>
functionIds
)
{
this
.
functionIds
=
functionIds
;
}
public
Long
getFunctionId
()
{
return
functionId
;
}
public
void
setFunctionId
(
Long
functionId
)
{
this
.
functionId
=
functionId
;
}
public
Long
getParentFunctionId
()
{
return
parentFunctionId
;
}
public
void
setParentFunctionId
(
Long
parentFunctionId
)
{
this
.
parentFunctionId
=
parentFunctionId
;
}
@Query
(
name
=
"代码"
,
display
=
true
,
fuzzy
=
true
)
private
String
code
;
@Query
(
name
=
"名称"
,
display
=
true
,
fuzzy
=
true
)
private
String
name
;
@Query
(
name
=
"访问地址"
,
fuzzy
=
true
)
private
String
accessUrl
;
@Query
(
name
=
"上一级功能"
,
display
=
true
,
type
=
Query
.
TYPE_CONTROL
,
control
=
"fun"
)
private
Long
parentFunctionId
;
private
Long
functionId
;
// 查询子类
private
List
<
Long
>
functionIds
;
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getAccessUrl
()
{
return
accessUrl
;
}
public
void
setAccessUrl
(
String
accessUrl
)
{
this
.
accessUrl
=
accessUrl
;
}
public
List
<
Long
>
getFunctionIds
()
{
return
functionIds
;
}
public
void
setFunctionIds
(
List
<
Long
>
functionIds
)
{
this
.
functionIds
=
functionIds
;
}
public
Long
getFunctionId
()
{
return
functionId
;
}
public
void
setFunctionId
(
Long
functionId
)
{
this
.
functionId
=
functionId
;
}
public
Long
getParentFunctionId
()
{
return
parentFunctionId
;
}
public
void
setParentFunctionId
(
Long
parentFunctionId
)
{
this
.
parentFunctionId
=
parentFunctionId
;
}
}
plus-admin/admin-console/src/main/java/com/ibeetl/admin/console/web/query/MenuQuery.java
View file @
18144407
...
...
@@ -3,47 +3,50 @@ package com.ibeetl.admin.console.web.query;
import
com.ibeetl.admin.core.annotation.Query
;
import
com.ibeetl.admin.core.web.query.PageParam
;
/**
* 菜单查询条件
*/
/** 菜单查询条件 */
public
class
MenuQuery
extends
PageParam
{
@Query
(
name
=
"代码"
,
display
=
true
,
fuzzy
=
true
)
private
String
code
;
@Query
(
name
=
"名称"
,
display
=
true
,
fuzzy
=
true
)
private
String
name
;
@Query
(
name
=
"菜单入口地址"
,
display
=
true
,
fuzzy
=
true
)
private
String
url
;
@Query
(
name
=
"上一级菜单"
,
display
=
true
,
type
=
Query
.
TYPE_CONTROL
,
control
=
"menu"
)
private
Long
parentMenuId
;
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getUrl
()
{
return
url
;
}
public
void
setUrl
(
String
url
)
{
this
.
url
=
url
;
}
public
Long
getParentMenuId
()
{
return
parentMenuId
;
}
public
void
setParentMenuId
(
Long
parentMenuId
)
{
this
.
parentMenuId
=
parentMenuId
;
}
@Query
(
name
=
"代码"
,
display
=
true
,
fuzzy
=
true
)
private
String
code
;
@Query
(
name
=
"名称"
,
display
=
true
,
fuzzy
=
true
)
private
String
name
;
@Query
(
name
=
"菜单入口地址"
,
display
=
true
,
fuzzy
=
true
)
private
String
url
;
@Query
(
name
=
"上一级菜单"
,
display
=
true
,
type
=
Query
.
TYPE_CONTROL
,
control
=
"menu"
)
private
Long
parentMenuId
;
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getUrl
()
{
return
url
;
}
public
void
setUrl
(
String
url
)
{
this
.
url
=
url
;
}
public
Long
getParentMenuId
()
{
return
parentMenuId
;
}
public
void
setParentMenuId
(
Long
parentMenuId
)
{
this
.
parentMenuId
=
parentMenuId
;
}
}
plus-admin/admin-console/src/main/java/com/ibeetl/admin/console/web/query/OrgQuery.java
View file @
18144407
...
...
@@ -4,50 +4,50 @@ import com.ibeetl.admin.core.annotation.Query;
import
com.ibeetl.admin.core.util.enums.CoreDictType
;
import
com.ibeetl.admin.core.web.query.PageParam
;
/**
* 字典表单查询条件
*/
/** 字典表单查询条件 */
public
class
OrgQuery
extends
PageParam
{
@Query
(
name
=
"机构编号"
,
display
=
true
)
private
String
code
;
@Query
(
name
=
"机构名称"
,
display
=
true
)
private
String
name
;
@Query
(
name
=
"机构类型"
,
display
=
true
,
type
=
Query
.
TYPE_DICT
,
dict
=
CoreDictType
.
ORG_TYPE
)
private
String
type
;
@Query
(
name
=
"上一级机构"
,
display
=
true
,
type
=
Query
.
TYPE_CONTROL
,
control
=
"org"
)
private
String
parentOrgId
;
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
public
String
getParentOrgId
()
{
return
parentOrgId
;
}
public
void
setParentOrgId
(
String
parentOrgId
)
{
this
.
parentOrgId
=
parentOrgId
;
}
@Query
(
name
=
"机构编号"
,
display
=
true
)
private
String
code
;
@Query
(
name
=
"机构名称"
,
display
=
true
)
private
String
name
;
@Query
(
name
=
"机构类型"
,
display
=
true
,
type
=
Query
.
TYPE_DICT
,
dict
=
CoreDictType
.
ORG_TYPE
)
private
String
type
;
@Query
(
name
=
"上一级机构"
,
display
=
true
,
type
=
Query
.
TYPE_CONTROL
,
control
=
"org"
)
private
String
parentOrgId
;
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
public
String
getParentOrgId
()
{
return
parentOrgId
;
}
public
void
setParentOrgId
(
String
parentOrgId
)
{
this
.
parentOrgId
=
parentOrgId
;
}
}
plus-admin/admin-console/src/main/java/com/ibeetl/admin/console/web/query/OrgTreeQuery.java
View file @
18144407
...
...
@@ -4,26 +4,24 @@ import java.util.List;
import
com.ibeetl.admin.core.web.query.PageParam
;
/**
* 描述: 带有组织树相关的查询
*/
/** 描述: 带有组织树相关的查询 */
public
class
OrgTreeQuery
extends
PageParam
{
protected
Long
orgId
;
//组织id
protected
List
<
Long
>
orgIds
;
protected
Long
orgId
;
//
组织id
protected
List
<
Long
>
orgIds
;
public
Long
getOrgId
()
{
return
orgId
;
}
public
Long
getOrgId
()
{
return
orgId
;
}
public
void
setOrgId
(
Long
orgId
)
{
this
.
orgId
=
orgId
;
}
public
void
setOrgId
(
Long
orgId
)
{
this
.
orgId
=
orgId
;
}
public
List
<
Long
>
getOrgIds
()
{
return
orgIds
;
}
public
List
<
Long
>
getOrgIds
()
{
return
orgIds
;
}
public
void
setOrgIds
(
List
<
Long
>
orgIds
)
{
this
.
orgIds
=
orgIds
;
}
public
void
setOrgIds
(
List
<
Long
>
orgIds
)
{
this
.
orgIds
=
orgIds
;
}
}
plus-admin/admin-console/src/main/java/com/ibeetl/admin/console/web/query/OrgUserQuery.java
View file @
18144407
...
...
@@ -9,63 +9,68 @@ import com.ibeetl.admin.core.web.query.PageParam;
public
class
OrgUserQuery
extends
PageParam
{
@Query
(
name
=
"账号"
,
display
=
true
,
fuzzy
=
true
)
private
String
code
;
@Query
(
name
=
"名称"
,
display
=
true
,
fuzzy
=
true
)
private
String
name
;
@Query
(
name
=
"状态"
,
display
=
true
,
type
=
Query
.
TYPE_DICT
,
dict
=
CoreDictType
.
USER_STATE
)
private
String
state
;
@Query
(
name
=
"职务"
,
display
=
true
,
type
=
Query
.
TYPE_DICT
,
dict
=
"job_type"
,
group
=
"job_type"
)
private
String
jobType0
;
@Query
(
name
=
"职务明细"
,
display
=
true
,
type
=
Query
.
TYPE_DICT
,
dict
=
""
,
group
=
"job_type"
)
private
String
jobType1
;
private
Long
orgId
;
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
Long
getOrgId
()
{
return
orgId
;
}
public
void
setOrgId
(
Long
orgId
)
{
this
.
orgId
=
orgId
;
}
public
String
getState
()
{
return
state
;
}
public
void
setState
(
String
state
)
{
this
.
state
=
state
;
}
public
String
getJobType0
()
{
return
jobType0
;
}
public
void
setJobType0
(
String
jobType0
)
{
this
.
jobType0
=
jobType0
;
}
public
String
getJobType1
()
{
return
jobType1
;
}
public
void
setJobType1
(
String
jobType1
)
{
this
.
jobType1
=
jobType1
;
}
@Query
(
name
=
"账号"
,
display
=
true
,
fuzzy
=
true
)
private
String
code
;
@Query
(
name
=
"名称"
,
display
=
true
,
fuzzy
=
true
)
private
String
name
;
@Query
(
name
=
"状态"
,
display
=
true
,
type
=
Query
.
TYPE_DICT
,
dict
=
CoreDictType
.
USER_STATE
)
private
String
state
;
@Query
(
name
=
"职务"
,
display
=
true
,
type
=
Query
.
TYPE_DICT
,
dict
=
"job_type"
,
group
=
"job_type"
)
private
String
jobType0
;
@Query
(
name
=
"职务明细"
,
display
=
true
,
type
=
Query
.
TYPE_DICT
,
dict
=
""
,
group
=
"job_type"
)
private
String
jobType1
;
private
Long
orgId
;
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
Long
getOrgId
()
{
return
orgId
;
}
public
void
setOrgId
(
Long
orgId
)
{
this
.
orgId
=
orgId
;
}
public
String
getState
()
{
return
state
;
}
public
void
setState
(
String
state
)
{
this
.
state
=
state
;
}
public
String
getJobType0
()
{
return
jobType0
;
}
public
void
setJobType0
(
String
jobType0
)
{
this
.
jobType0
=
jobType0
;
}
public
String
getJobType1
()
{
return
jobType1
;
}
public
void
setJobType1
(
String
jobType1
)
{
this
.
jobType1
=
jobType1
;
}
}
plus-admin/admin-console/src/main/java/com/ibeetl/admin/console/web/query/RoleQuery.java
View file @
18144407
...
...
@@ -4,44 +4,38 @@ import com.ibeetl.admin.core.annotation.Query;
import
com.ibeetl.admin.core.util.enums.CoreDictType
;
import
com.ibeetl.admin.core.web.query.PageParam
;
/**
* 描述: 角色查询条件
*
*/
/** 描述: 角色查询条件 */
public
class
RoleQuery
extends
PageParam
{
@Query
(
name
=
"编码"
,
display
=
true
)
private
String
code
;
@Query
(
name
=
"名称"
,
display
=
true
)
private
String
name
;
@Query
(
name
=
"业务角色类型"
,
type
=
Query
.
TYPE_DICT
,
dict
=
CoreDictType
.
ROLE_TYPE
)
private
String
type
;
@Query
(
name
=
"编码"
,
display
=
true
)
private
String
code
;
@Query
(
name
=
"名称"
,
display
=
true
)
private
String
name
;
public
String
getCode
()
{
return
code
;
}
@Query
(
name
=
"业务角色类型"
,
type
=
Query
.
TYPE_DICT
,
dict
=
CoreDictType
.
ROLE_TYPE
)
private
String
type
;
public
void
setCode
(
String
c
ode
)
{
this
.
code
=
code
;
}
public
String
getC
ode
(
)
{
return
code
;
}
public
String
getName
(
)
{
return
nam
e
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
cod
e
;
}
public
void
setName
(
String
n
ame
)
{
this
.
name
=
name
;
}
public
String
getN
ame
(
)
{
return
name
;
}
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
}
plus-admin/admin-console/src/main/java/com/ibeetl/admin/console/web/query/RoleUserQuery.java
View file @
18144407
...
...
@@ -4,43 +4,37 @@ import com.ibeetl.admin.core.annotation.Query;
import
com.ibeetl.admin.core.util.enums.CoreDictType
;
import
com.ibeetl.admin.core.web.query.PageParam
;
/**
* 描述: 角色李的用户列表
*/
/** 描述: 角色李的用户列表 */
public
class
RoleUserQuery
extends
PageParam
{
@Query
(
name
=
"编码"
,
display
=
true
)
private
String
userCode
;
@Query
(
name
=
"名称"
,
display
=
true
)
private
String
userName
;
private
Long
roleId
;
@Query
(
name
=
"编码"
,
display
=
true
)
private
String
userCode
;
public
String
getUserCode
()
{
return
userCode
;
}
@Query
(
name
=
"名称"
,
display
=
true
)
private
String
userName
;
public
void
setUserCode
(
String
userCode
)
{
this
.
userCode
=
userCode
;
}
private
Long
roleId
;
public
String
getUser
Nam
e
()
{
return
user
Nam
e
;
}
public
String
getUser
Cod
e
()
{
return
user
Cod
e
;
}
public
void
setUser
Nam
e
(
String
user
Nam
e
)
{
this
.
user
Nam
e
=
user
Nam
e
;
}
public
void
setUser
Cod
e
(
String
user
Cod
e
)
{
this
.
user
Cod
e
=
user
Cod
e
;
}
public
Lo
ng
get
RoleId
()
{
return
roleId
;
}
public
Stri
ng
get
UserName
()
{
return
userName
;
}
public
void
setRoleId
(
Long
roleId
)
{
this
.
roleId
=
roleId
;
}
public
void
setUserName
(
String
userName
)
{
this
.
userName
=
userName
;
}
public
Long
getRoleId
()
{
return
roleId
;
}
public
void
setRoleId
(
Long
roleId
)
{
this
.
roleId
=
roleId
;
}
}
plus-admin/admin-console/src/main/java/com/ibeetl/admin/console/web/query/UserQuery.java
View file @
18144407
...
...
@@ -11,99 +11,113 @@ import com.ibeetl.admin.core.web.query.PageParam;
public
class
UserQuery
extends
PageParam
{
@Query
(
name
=
"账号"
,
display
=
true
,
fuzzy
=
true
)
private
String
code
;
@Query
(
name
=
"名称"
,
display
=
true
,
fuzzy
=
true
)
private
String
name
;
@Query
(
name
=
"部门"
,
display
=
true
,
type
=
Query
.
TYPE_CONTROL
,
control
=
"org"
)
private
Long
orgId
;
@Query
(
name
=
"状态"
,
display
=
true
,
type
=
Query
.
TYPE_DICT
,
dict
=
CoreDictType
.
USER_STATE
)
private
String
state
;
@Query
(
name
=
"职务"
,
display
=
true
,
type
=
Query
.
TYPE_DICT
,
dict
=
"job_type"
,
group
=
"job_type"
)
private
String
jobType0
;
@Query
(
name
=
"职务明细"
,
display
=
true
,
type
=
Query
.
TYPE_DICT
,
dict
=
""
,
group
=
"job_type"
)
private
String
jobType1
;
@Query
(
name
=
"创建日期"
,
display
=
true
,
type
=
Query
.
TYPE_DATE_BETWEEN
)
private
String
createDateRange
;
private
Date
createDateMin
;
private
Date
createDateMax
;
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
Long
getOrgId
()
{
return
orgId
;
}
public
void
setOrgId
(
Long
orgId
)
{
this
.
orgId
=
orgId
;
}
public
String
getState
()
{
return
state
;
}
public
void
setState
(
String
state
)
{
this
.
state
=
state
;
}
public
String
getJobType0
()
{
return
jobType0
;
}
public
void
setJobType0
(
String
jobType0
)
{
this
.
jobType0
=
jobType0
;
}
public
String
getJobType1
()
{
return
jobType1
;
}
public
void
setJobType1
(
String
jobType1
)
{
this
.
jobType1
=
jobType1
;
@Query
(
name
=
"账号"
,
display
=
true
,
fuzzy
=
true
)
private
String
code
;
@Query
(
name
=
"名称"
,
display
=
true
,
fuzzy
=
true
)
private
String
name
;
@Query
(
name
=
"部门"
,
display
=
true
,
type
=
Query
.
TYPE_CONTROL
,
control
=
"org"
)
private
Long
orgId
;
@Query
(
name
=
"状态"
,
display
=
true
,
type
=
Query
.
TYPE_DICT
,
dict
=
CoreDictType
.
USER_STATE
)
private
String
state
;
@Query
(
name
=
"职务"
,
display
=
true
,
type
=
Query
.
TYPE_DICT
,
dict
=
"job_type"
,
group
=
"job_type"
)
private
String
jobType0
;
@Query
(
name
=
"职务明细"
,
display
=
true
,
type
=
Query
.
TYPE_DICT
,
dict
=
""
,
group
=
"job_type"
)
private
String
jobType1
;
@Query
(
name
=
"创建日期"
,
display
=
true
,
type
=
Query
.
TYPE_DATE_BETWEEN
)
private
String
createDateRange
;
private
Date
createDateMin
;
private
Date
createDateMax
;
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
Long
getOrgId
()
{
return
orgId
;
}
public
void
setOrgId
(
Long
orgId
)
{
this
.
orgId
=
orgId
;
}
public
String
getState
()
{
return
state
;
}
public
void
setState
(
String
state
)
{
this
.
state
=
state
;
}
public
String
getJobType0
()
{
return
jobType0
;
}
public
void
setJobType0
(
String
jobType0
)
{
this
.
jobType0
=
jobType0
;
}
public
String
getJobType1
()
{
return
jobType1
;
}
public
void
setJobType1
(
String
jobType1
)
{
this
.
jobType1
=
jobType1
;
}
public
String
getCreateDateRange
()
{
return
createDateRange
;
}
public
void
setCreateDateRange
(
String
createDateRange
)
{
this
.
createDateRange
=
createDateRange
;
if
(
StringUtils
.
isEmpty
(
createDateRange
))
{
return
;
}
public
String
getCreateDateRange
()
{
return
createDateRange
;
}
public
void
setCreateDateRange
(
String
createDateRange
)
{
this
.
createDateRange
=
createDateRange
;
if
(
StringUtils
.
isEmpty
(
createDateRange
))
{
return
;
}
Date
[]
ds
=
Tool
.
parseDataRange
(
createDateRange
);
this
.
createDateMin
=
ds
[
0
];
this
.
createDateMax
=
ds
[
1
];
}
public
Date
getCreateDateMin
()
{
return
createDateMin
;
}
public
void
setCreateDateMin
(
Date
createDateMin
)
{
this
.
createDateMin
=
createDateMin
;
}
public
Date
getCreateDateMax
()
{
return
createDateMax
;
}
public
void
setCreateDateMax
(
Date
createDateMax
)
{
this
.
createDateMax
=
createDateMax
;
}
// public String getJobSubType() {
// return jobSubType;
// }
// public void setJobSubType(String jobSubType) {
// this.jobSubType = jobSubType;
// }
//
Date
[]
ds
=
Tool
.
parseDataRange
(
createDateRange
);
this
.
createDateMin
=
ds
[
0
];
this
.
createDateMax
=
ds
[
1
];
}
public
Date
getCreateDateMin
()
{
return
createDateMin
;
}
public
void
setCreateDateMin
(
Date
createDateMin
)
{
this
.
createDateMin
=
createDateMin
;
}
public
Date
getCreateDateMax
()
{
return
createDateMax
;
}
public
void
setCreateDateMax
(
Date
createDateMax
)
{
this
.
createDateMax
=
createDateMax
;
}
// public String getJobSubType() {
// return jobSubType;
// }
// public void setJobSubType(String jobSubType) {
// this.jobSubType = jobSubType;
// }
//
}
Prev
1
2
3
4
5
6
…
9
Next
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