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
30e90259
Commit
30e90259
authored
Feb 28, 2018
by
李家智
Browse files
bug fix
parent
28497287
Changes
68
Hide whitespace changes
Inline
Side-by-side
admin-console/src/main/java/com/ibeetl/admin/console/dao/DictConsoleDao.java
View file @
30e90259
...
...
@@ -14,5 +14,5 @@ import com.ibeetl.admin.core.entity.CoreDict;
@SqlResource
(
"console.dict"
)
public
interface
DictConsoleDao
extends
BaseMapper
<
CoreDict
>{
public
PageQuery
<
CoreDict
>
queryByCondition
(
PageQuery
query
);
public
void
batchDelCoreDictByIds
(
List
<
Stri
ng
>
ids
);
public
void
batchDelCoreDictByIds
(
List
<
Lo
ng
>
ids
);
}
\ No newline at end of file
admin-console/src/main/java/com/ibeetl/admin/console/service/DictConsoleService.java
View file @
30e90259
...
...
@@ -28,8 +28,9 @@ public class DictConsoleService extends BaseService<CoreDict>{
return
ret
;
}
public
void
batchDelCoreDict
(
List
<
Stri
ng
>
ids
){
public
void
batchDelCoreDict
(
List
<
Lo
ng
>
ids
){
try
{
//TODO,找到数据字典所有子类,设置删除标记
dictDao
.
batchDelCoreDictByIds
(
ids
);
}
catch
(
Exception
e
)
{
throw
new
PlatformException
(
"批量删除CoreDict失败"
,
e
);
...
...
admin-console/src/main/java/com/ibeetl/admin/console/service/UserConsoleService.java
View file @
30e90259
...
...
@@ -24,6 +24,7 @@ import com.ibeetl.admin.core.service.BaseService;
import
com.ibeetl.admin.core.service.CoreDictService
;
import
com.ibeetl.admin.core.service.CorePlatformService
;
import
com.ibeetl.admin.core.util.PlatformException
;
import
com.ibeetl.admin.core.util.enums.CoreDictType
;
import
com.ibeetl.admin.core.util.enums.DelFlagEnum
;
import
com.ibeetl.admin.core.util.enums.GeneralStateEnum
;
...
...
@@ -183,11 +184,11 @@ public class UserConsoleService extends BaseService<CoreUser> {
userItem
.
setCode
(
user
.
getCode
());
userItem
.
setId
(
user
.
getId
());
userItem
.
setName
(
user
.
getName
());
CoreDict
dict
=
dictService
.
findCoreDict
(
user
.
getState
());
CoreDict
dict
=
dictService
.
findCoreDict
(
CoreDictType
.
USER_STATE
,
user
.
getState
());
userItem
.
setStateText
(
dict
.
getName
());
if
(
StringUtils
.
isNotEmpty
(
user
.
getJobType1
())){
dict
=
dictService
.
findCoreDict
(
user
.
getJobType1
());
dict
=
dictService
.
findCoreDict
(
"job_type"
,
user
.
getJobType1
());
userItem
.
setJobType1Text
(
dict
.
getName
());
}
...
...
admin-console/src/main/java/com/ibeetl/admin/console/web/DictConsoleController.java
View file @
30e90259
...
...
@@ -20,6 +20,7 @@ import com.ibeetl.admin.console.service.DictConsoleService;
import
com.ibeetl.admin.console.web.query.CoreDictQuery
;
import
com.ibeetl.admin.core.annotation.Function
;
import
com.ibeetl.admin.core.entity.CoreDict
;
import
com.ibeetl.admin.core.util.ConvertUtil
;
import
com.ibeetl.admin.core.util.ValidateConfig
;
import
com.ibeetl.admin.core.web.JsonResult
;
...
...
@@ -47,7 +48,7 @@ public class DictConsoleController{
@GetMapping
(
MODEL
+
"/edit.do"
)
@Function
(
"dict.edit"
)
public
ModelAndView
edit
(
Stri
ng
id
)
{
public
ModelAndView
edit
(
Lo
ng
id
)
{
ModelAndView
view
=
new
ModelAndView
(
"/admin/dict/edit.html"
);
CoreDict
dict
=
dictService
.
queryById
(
id
);
view
.
addObject
(
"dict"
,
dict
);
...
...
@@ -104,16 +105,14 @@ public class DictConsoleController{
CoreDict
dict
=
dictService
.
queryById
(
id
);
return
JsonResult
.
success
(
dict
);
}
@PostMapping
(
MODEL
+
"/delete.json"
)
@Function
(
"dict.delete"
)
@ResponseBody
public
JsonResult
delete
(
String
ids
)
{
if
(
ids
.
endsWith
(
","
))
{
ids
=
StringUtils
.
substringBeforeLast
(
ids
,
","
);
}
List
<
String
>
idList
=
Arrays
.
asList
(
ids
.
split
(
","
));
dictService
.
batchDelCoreDict
(
idList
);
List
<
Long
>
dels
=
ConvertUtil
.
str2longs
(
ids
);
dictService
.
batchDelCoreDict
(
dels
);
return
new
JsonResult
().
success
();
}
...
...
admin-console/src/main/java/com/ibeetl/admin/console/web/RoleConsoleController.java
View file @
30e90259
...
...
@@ -32,7 +32,6 @@ import com.ibeetl.admin.core.entity.CoreUser;
import
com.ibeetl.admin.core.service.CorePlatformService
;
import
com.ibeetl.admin.core.util.AnnotationUtil
;
import
com.ibeetl.admin.core.util.ConvertUtil
;
import
com.ibeetl.admin.core.util.DictUtil
;
import
com.ibeetl.admin.core.util.ValidateConfig
;
import
com.ibeetl.admin.core.web.JsonResult
;
...
...
@@ -57,9 +56,6 @@ public class RoleConsoleController {
@Autowired
private
OrgConsoleService
orgConsoleService
;
@Autowired
DictUtil
dictUtil
;
/* 页面 */
@GetMapping
(
MODEL
+
"/index.do"
)
...
...
admin-console/src/main/java/com/ibeetl/admin/console/web/query/UserQuery.java
View file @
30e90259
...
...
@@ -21,10 +21,10 @@ public class UserQuery extends PageParam {
@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
T
ype"
)
@Query
(
name
=
"职务"
,
display
=
true
,
type
=
Query
.
TYPE_DICT
,
dict
=
"job_type"
,
group
=
"job
_t
ype"
)
private
String
jobType0
;
@Query
(
name
=
"职务明细"
,
display
=
true
,
type
=
Query
.
TYPE_DICT
,
dict
=
""
,
group
=
"job
T
ype"
)
@Query
(
name
=
"职务明细"
,
display
=
true
,
type
=
Query
.
TYPE_DICT
,
dict
=
""
,
group
=
"job
_t
ype"
)
private
String
jobType1
;
...
...
admin-console/src/main/resources/sql/console/dict.md
View file @
30e90259
...
...
@@ -22,7 +22,7 @@ queryByCondition
and t.PARENT like #"%"+parent+"%"#
@}
@pageIgnoreTag(){
order by
create_time
desc
order by
id
desc
@}
...
...
@@ -33,5 +33,5 @@ batchDelCoreDictByIds
*
批量逻辑删除
update core_dict set del_flag = 1 where
value
in( #join(ids)#)
update core_dict set del_flag = 1 where
id
in( #join(ids)#)
admin-console/src/main/resources/static/js/admin/audit/index.js
View file @
30e90259
...
...
@@ -9,7 +9,7 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
this
.
initTable
();
this
.
initSearchForm
();
window
.
dataReload
=
function
(){
Lib
.
doSearchForm
(
$
(
"
#auditSearchForm
"
),
auditTable
,
form
)
Lib
.
doSearchForm
(
$
(
"
#auditSearchForm
"
),
auditTable
)
}
...
...
admin-console/src/main/resources/static/js/admin/blog/add.js
deleted
100644 → 0
View file @
28497287
layui
.
define
([
'
form
'
,
'
laydate
'
,
'
table
'
,
'
blogApi
'
],
function
(
exports
)
{
var
form
=
layui
.
form
;
var
blogApi
=
layui
.
blogApi
;
var
index
=
layui
.
index
;
var
view
=
{
init
:
function
(){
Lib
.
initGenrealForm
(
$
(
"
#addForm
"
),
form
);
this
.
initSubmit
();
},
initSubmit
:
function
(){
$
(
"
#addButton
"
).
click
(
function
(){
blogApi
.
addBlog
(
function
(){
parent
.
window
.
dataReload
();
Common
.
info
(
"
添加成功
"
);
Lib
.
closeFrame
();
});
});
$
(
"
#addButton-cancel
"
).
click
(
function
(){
Lib
.
closeFrame
();
});
}
}
exports
(
'
add
'
,
view
);
});
\ No newline at end of file
admin-console/src/main/resources/static/js/admin/blog/blogApi.js
deleted
100644 → 0
View file @
28497287
/*访问后台的代码*/
layui
.
define
([],
function
(
exports
)
{
var
api
=
{
updateBlog
:
function
(
callback
){
Lib
.
submitForm
(
$
(
'
#updateForm
'
),{},
callback
)
},
addBlog
:
function
(
callback
){
Lib
.
submitForm
(
$
(
'
#addForm
'
),{},
callback
)
},
del
:
function
(
ids
,
callback
){
Common
.
post
(
"
/admin/blog/delete.json
"
,{
"
ids
"
:
ids
},
function
(){
callback
();
})
}
};
exports
(
'
blogApi
'
,
api
);
});
\ No newline at end of file
admin-console/src/main/resources/static/js/admin/blog/del.js
deleted
100644 → 0
View file @
28497287
layui
.
define
([
'
table
'
,
'
blogApi
'
],
function
(
exports
)
{
var
blogApi
=
layui
.
blogApi
;
var
table
=
layui
.
table
;
var
view
=
{
init
:
function
(){
},
delBatch
:
function
(){
var
data
=
Common
.
getMoreDataFromTable
(
table
,
"
blogTable
"
);
if
(
data
==
null
){
return
;
}
Common
.
openConfirm
(
"
确认要删除这些CmsBlog?
"
,
function
(){
var
ids
=
Common
.
concatBatchId
(
data
);
blogApi
.
del
(
ids
,
function
(){
Common
.
info
(
"
删除成功
"
);
dataReload
();
})
})
}
}
exports
(
'
del
'
,
view
);
});
\ No newline at end of file
admin-console/src/main/resources/static/js/admin/blog/edit.js
deleted
100644 → 0
View file @
28497287
layui
.
define
([
'
form
'
,
'
laydate
'
,
'
table
'
,
'
blogApi
'
],
function
(
exports
)
{
var
form
=
layui
.
form
;
var
blogApi
=
layui
.
blogApi
;
var
index
=
layui
.
index
;
var
view
=
{
init
:
function
(){
Lib
.
initGenrealForm
(
$
(
"
#updateForm
"
),
form
);
this
.
initSubmit
();
},
initSubmit
:
function
(){
$
(
"
#updateButton
"
).
click
(
function
(){
blogApi
.
updateBlog
(
function
(){
parent
.
window
.
dataReload
();
Common
.
info
(
"
更新成功
"
);
Lib
.
closeFrame
();
});
});
$
(
"
#updateButton-cancel
"
).
click
(
function
(){
Lib
.
closeFrame
();
});
}
}
exports
(
'
edit
'
,
view
);
});
\ No newline at end of file
admin-console/src/main/resources/static/js/admin/blog/index.js
deleted
100644 → 0
View file @
28497287
layui
.
define
([
'
form
'
,
'
laydate
'
,
'
table
'
],
function
(
exports
)
{
var
form
=
layui
.
form
;
var
laydate
=
layui
.
laydate
;
var
table
=
layui
.
table
;
var
blogTable
=
null
;
var
view
=
{
init
:
function
(){
this
.
initTable
();
this
.
initSearchForm
();
this
.
initToolBar
();
window
.
dataReload
=
function
(){
Lib
.
doSearchForm
(
$
(
"
#searchForm
"
),
roleTable
,
form
)
}
},
initTable
:
function
(){
blogTable
=
table
.
render
({
elem
:
'
#blogTable
'
,
height
:
Lib
.
getTableHeight
(
1
),
method
:
'
post
'
,
url
:
Common
.
CTX
+
'
/admin/blog/list.json
'
//数据接口
,
page
:
Lib
.
tablePage
//开启分页
,
limit
:
10
,
cols
:
[
[
//表头
{
type
:
'
checkbox
'
,
fixed
:
'
left
'
,
},
{
field
:
'
id
'
,
title
:
'
id
'
,
fixed
:
'
left
'
,
width
:
100
,
},
{
field
:
'
title
'
,
title
:
'
title
'
,
width
:
100
,
},
{
field
:
'
content
'
,
title
:
'
content
'
,
width
:
100
,
},
{
field
:
'
createTime
'
,
title
:
'
createTime
'
,
width
:
100
,
},
{
field
:
'
createUserId
'
,
title
:
'
createUserId
'
,
width
:
100
,
},
{
field
:
'
type
'
,
title
:
'
type
'
,
width
:
100
,
}
]
]
});
},
initSearchForm
:
function
(){
Lib
.
initSearchForm
(
$
(
"
#searchForm
"
),
blogTable
,
form
);
},
initToolBar
:
function
(){
toolbar
=
{
add
:
function
()
{
//获取选中数据
var
url
=
"
/admin/blog/add.do
"
;
Common
.
openDlg
(
url
,
"
CmsBlog管理>新增
"
);
},
edit
:
function
()
{
//获取选中数目
var
data
=
Common
.
getOneFromTable
(
table
,
"
blogTable
"
);
if
(
data
==
null
){
return
;
}
var
url
=
"
/admin/blog/edit.do?id=
"
+
data
.
id
;
Common
.
openDlg
(
url
,
"
CmsBlog管理>
"
+
data
.
CmsBlog
+
"
>编辑
"
);
},
del
:
function
()
{
layui
.
use
([
'
del
'
],
function
(){
var
delView
=
layui
.
del
delView
.
delBatch
();
});
}
};
$
(
'
.ext-toolbar
'
).
on
(
'
click
'
,
function
()
{
var
type
=
$
(
this
).
data
(
'
type
'
);
toolbar
[
type
]
?
toolbar
[
type
].
call
(
this
)
:
''
;
});
}
}
exports
(
'
index
'
,
view
);
});
\ No newline at end of file
admin-console/src/main/resources/static/js/admin/cmsBlog/add.js
deleted
100644 → 0
View file @
28497287
layui
.
define
([
'
form
'
,
'
laydate
'
,
'
table
'
,
'
cmsBlogApi
'
],
function
(
exports
)
{
var
form
=
layui
.
form
;
var
cmsBlogApi
=
layui
.
cmsBlogApi
;
var
index
=
layui
.
index
;
var
view
=
{
init
:
function
(){
Lib
.
initGenrealForm
(
$
(
"
#addForm
"
),
form
);
this
.
initSubmit
();
},
initSubmit
:
function
(){
$
(
"
#addButton
"
).
click
(
function
(){
cmsBlogApi
.
addCmsBlog
(
$
(
'
#addForm
'
),
function
(){
parent
.
window
.
dataReload
();
Common
.
info
(
"
添加成功
"
);
Lib
.
closeFrame
();
});
});
$
(
"
#addButton-cancel
"
).
click
(
function
(){
Lib
.
closeFrame
();
});
}
}
exports
(
'
add
'
,
view
);
});
\ No newline at end of file
admin-console/src/main/resources/static/js/admin/cmsBlog/cmsBlogApi.js
deleted
100644 → 0
View file @
28497287
/*访问后台的代码*/
layui
.
define
([],
function
(
exports
)
{
var
api
=
{
updateCmsBlog
:
function
(
form
,
callback
){
Lib
.
submitForm
(
"
/admin/cmsBlog/update.json
"
,
form
,{},
callback
)
},
addCmsBlog
:
function
(
form
,
callback
){
Lib
.
submitForm
(
"
/admin/cmsBlog/add.json
"
,
form
,{},
callback
)
},
del
:
function
(
ids
,
callback
){
Common
.
post
(
"
/admin/cmsBlog/delete.json
"
,{
"
ids
"
:
ids
},
function
(){
callback
();
})
}
};
exports
(
'
cmsBlogApi
'
,
api
);
});
\ No newline at end of file
admin-console/src/main/resources/static/js/admin/cmsBlog/del.js
deleted
100644 → 0
View file @
28497287
layui
.
define
([
'
table
'
,
'
cmsBlogApi
'
],
function
(
exports
)
{
var
cmsBlogApi
=
layui
.
cmsBlogApi
;
var
table
=
layui
.
table
;
var
view
=
{
init
:
function
(){
},
delBatch
:
function
(){
var
data
=
Common
.
getMoreDataFromTable
(
table
,
"
cmsBlogTable
"
);
if
(
data
==
null
){
return
;
}
Common
.
openConfirm
(
"
确认要删除这些CmsBlog?
"
,
function
(){
var
ids
=
Common
.
concatBatchId
(
data
,
"
id
"
);
cmsBlogApi
.
del
(
ids
,
function
(){
Common
.
info
(
"
删除成功
"
);
dataReload
();
})
})
}
}
exports
(
'
del
'
,
view
);
});
\ No newline at end of file
admin-console/src/main/resources/static/js/admin/cmsBlog/edit.js
deleted
100644 → 0
View file @
28497287
layui
.
define
([
'
form
'
,
'
laydate
'
,
'
table
'
,
'
cmsBlogApi
'
],
function
(
exports
)
{
var
form
=
layui
.
form
;
var
cmsBlogApi
=
layui
.
cmsBlogApi
;
var
index
=
layui
.
index
;
var
view
=
{
init
:
function
(){
Lib
.
initGenrealForm
(
$
(
"
#updateForm
"
),
form
);
this
.
initSubmit
();
},
initSubmit
:
function
(){
$
(
"
#updateButton
"
).
click
(
function
(){
cmsBlogApi
.
updateCmsBlog
(
$
(
'
#updateForm
'
),
function
(){
parent
.
window
.
dataReload
();
Common
.
info
(
"
更新成功
"
);
Lib
.
closeFrame
();
});
});
$
(
"
#updateButton-cancel
"
).
click
(
function
(){
Lib
.
closeFrame
();
});
}
}
exports
(
'
edit
'
,
view
);
});
\ No newline at end of file
admin-console/src/main/resources/static/js/admin/cmsBlog/index.js
deleted
100644 → 0
View file @
28497287
layui
.
define
([
'
form
'
,
'
laydate
'
,
'
table
'
],
function
(
exports
)
{
var
form
=
layui
.
form
;
var
laydate
=
layui
.
laydate
;
var
table
=
layui
.
table
;
var
cmsBlogTable
=
null
;
var
view
=
{
init
:
function
(){
this
.
initTable
();
this
.
initSearchForm
();
this
.
initToolBar
();
window
.
dataReload
=
function
(){
Lib
.
doSearchForm
(
$
(
"
#searchForm
"
),
cmsBlogTable
,
form
)
}
},
initTable
:
function
(){
cmsBlogTable
=
table
.
render
({
elem
:
'
#cmsBlogTable
'
,
height
:
Lib
.
getTableHeight
(
1
),
method
:
'
post
'
,
url
:
Common
.
CTX
+
'
/admin/cmsBlog/list.json
'
// 数据接口
,
page
:
Lib
.
tablePage
// 开启分页
,
limit
:
10
,
cols
:
[
[
// 表头
{
type
:
'
checkbox
'
,
fixed
:
'
left
'
,
},
{
field
:
'
id
'
,
title
:
'
id
'
,
fixed
:
'
left
'
,
width
:
100
,
},
{
field
:
'
title
'
,
title
:
'
title
'
,
width
:
100
,
},
{
field
:
'
content
'
,
title
:
'
content
'
,
width
:
100
,
},
{
field
:
'
createTime
'
,
title
:
'
createTime
'
,
width
:
100
,
},
{
field
:
'
createUserId
'
,
title
:
'
createUserId
'
,
width
:
100
,
},
{
field
:
'
type
'
,
title
:
'
type
'
,
width
:
100
,
}
]
]
});
},
initSearchForm
:
function
(){
Lib
.
initSearchForm
(
$
(
"
#searchForm
"
),
cmsBlogTable
,
form
);
},
initToolBar
:
function
(){
toolbar
=
{
add
:
function
()
{
// 获取选中数据
var
url
=
"
/admin/cmsBlog/add.do
"
;
Common
.
openDlg
(
url
,
"
CmsBlog管理>新增
"
);
},
edit
:
function
()
{
// 获取选中数目
var
data
=
Common
.
getOneFromTable
(
table
,
"
cmsBlogTable
"
);
if
(
data
==
null
){
return
;
}
var
url
=
"
/admin/cmsBlog/edit.do?id=
"
+
data
.
id
;
Common
.
openDlg
(
url
,
"
CmsBlog管理>
"
+
data
.
title
+
"
>编辑
"
);
},
del
:
function
()
{
layui
.
use
([
'
del
'
],
function
(){
var
delView
=
layui
.
del
delView
.
delBatch
();
});
}
};
$
(
'
.ext-toolbar
'
).
on
(
'
click
'
,
function
()
{
var
type
=
$
(
this
).
data
(
'
type
'
);
toolbar
[
type
]
?
toolbar
[
type
].
call
(
this
)
:
''
;
});
}
}
exports
(
'
index
'
,
view
);
});
\ No newline at end of file
admin-console/src/main/resources/static/js/admin/console/add.js
deleted
100644 → 0
View file @
28497287
layui
.
define
([
'
form
'
,
'
laydate
'
,
'
table
'
,
'
consoleApi
'
],
function
(
exports
)
{
var
form
=
layui
.
form
;
var
consoleApi
=
layui
.
consoleApi
;
var
index
=
layui
.
index
;
var
view
=
{
init
:
function
(){
Lib
.
initGenrealForm
(
$
(
"
#addForm
"
),
form
);
this
.
initSubmit
();
},
initSubmit
:
function
(){
$
(
"
#addButton
"
).
click
(
function
(){
consoleApi
.
addConsole
(
function
(){
parent
.
window
.
dataReload
();
Common
.
info
(
"
添加成功
"
);
Lib
.
closeFrame
();
});
});
$
(
"
#addButton-cancel
"
).
click
(
function
(){
Lib
.
closeFrame
();
});
}
}
exports
(
'
add
'
,
view
);
});
\ No newline at end of file
admin-console/src/main/resources/static/js/admin/console/consoleApi.js
deleted
100644 → 0
View file @
28497287
/*访问后台的代码*/
layui
.
define
([],
function
(
exports
)
{
var
api
=
{
updateConsole
:
function
(
callback
){
Lib
.
submitForm
(
$
(
'
#updateForm
'
),{},
callback
)
},
addConsole
:
function
(
callback
){
Lib
.
submitForm
(
$
(
'
#addForm
'
),{},
callback
)
},
del
:
function
(
ids
,
callback
){
Common
.
post
(
"
/admin/console/delete.json
"
,{
"
ids
"
:
ids
},
function
(){
callback
();
})
}
};
exports
(
'
consoleApi
'
,
api
);
});
\ No newline at end of file
Prev
1
2
3
4
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