Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
attendance-performance-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
attendance-performance-platform
Commits
468eee28
Commit
468eee28
authored
Apr 11, 2023
by
dll
Browse files
Options
Browse Files
Download
Plain Diff
提交
parents
959b666f
ef1b9707
Changes
32
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
4117 additions
and
2381 deletions
+4117
-2381
attendance-performance-manager-ui/admin/src/assets/utils/table.js
...ce-performance-manager-ui/admin/src/assets/utils/table.js
+28
-0
attendance-performance-manager-ui/admin/src/components/Header.vue
...ce-performance-manager-ui/admin/src/components/Header.vue
+0
-1
attendance-performance-manager-ui/admin/src/store.js
attendance-performance-manager-ui/admin/src/store.js
+0
-2
attendance-performance-manager-ui/admin/src/views/attendance/leave/record/drawershow.vue
...ui/admin/src/views/attendance/leave/record/drawershow.vue
+1
-1
attendance-performance-manager-ui/admin/src/views/attendance/leave/record/list.vue
...nager-ui/admin/src/views/attendance/leave/record/list.vue
+1
-2
attendance-performance-manager-ui/admin/src/views/dept/list.vue
...ance-performance-manager-ui/admin/src/views/dept/list.vue
+1
-0
attendance-performance-manager-ui/admin/src/views/job/list.vue
...dance-performance-manager-ui/admin/src/views/job/list.vue
+5
-3
attendance-performance-manager-ui/admin/src/views/staff/care/list.vue
...erformance-manager-ui/admin/src/views/staff/care/list.vue
+1
-1
attendance-performance-manager-ui/admin/src/views/staff/drawershow.vue
...rformance-manager-ui/admin/src/views/staff/drawershow.vue
+1
-1
attendance-performance-manager-ui/admin/src/views/staff/list.vue
...nce-performance-manager-ui/admin/src/views/staff/list.vue
+23
-3
attendance-performance-manager-ui/admin/src/views/system/menu/dialogshow.vue
...nce-manager-ui/admin/src/views/system/menu/dialogshow.vue
+143
-163
attendance-performance-manager-ui/admin/src/views/system/menu/list.vue
...rformance-manager-ui/admin/src/views/system/menu/list.vue
+138
-219
attendance-performance-manager/src/main/java/com/mortals/xhx/base/framework/interceptor/AuthTokenServiceImpl.java
.../xhx/base/framework/interceptor/AuthTokenServiceImpl.java
+2
-2
attendance-performance-manager/src/main/java/com/mortals/xhx/base/login/web/LoginController.java
.../java/com/mortals/xhx/base/login/web/LoginController.java
+1
-6
attendance-performance-manager/src/main/java/com/mortals/xhx/base/system/menu/dao/MenuDao.java
...in/java/com/mortals/xhx/base/system/menu/dao/MenuDao.java
+18
-19
attendance-performance-manager/src/main/java/com/mortals/xhx/base/system/menu/dao/ibatis/MenuDaoImpl.java
.../mortals/xhx/base/system/menu/dao/ibatis/MenuDaoImpl.java
+13
-17
attendance-performance-manager/src/main/java/com/mortals/xhx/base/system/menu/model/MenuEntity.java
...va/com/mortals/xhx/base/system/menu/model/MenuEntity.java
+374
-432
attendance-performance-manager/src/main/java/com/mortals/xhx/base/system/menu/model/MenuQuery.java
...ava/com/mortals/xhx/base/system/menu/model/MenuQuery.java
+1987
-905
attendance-performance-manager/src/main/java/com/mortals/xhx/base/system/menu/model/MenuTreeSelect.java
...om/mortals/xhx/base/system/menu/model/MenuTreeSelect.java
+41
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/base/system/menu/model/vo/MenuVo.java
...ava/com/mortals/xhx/base/system/menu/model/vo/MenuVo.java
+23
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/base/system/menu/service/MenuService.java
...com/mortals/xhx/base/system/menu/service/MenuService.java
+48
-16
attendance-performance-manager/src/main/java/com/mortals/xhx/base/system/menu/service/impl/MenuServiceImpl.java
...ls/xhx/base/system/menu/service/impl/MenuServiceImpl.java
+193
-18
attendance-performance-manager/src/main/java/com/mortals/xhx/base/system/menu/web/MenuController.java
.../com/mortals/xhx/base/system/menu/web/MenuController.java
+102
-27
attendance-performance-manager/src/main/java/com/mortals/xhx/common/code/SatusEnum.java
.../src/main/java/com/mortals/xhx/common/code/SatusEnum.java
+66
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/daemon/task/SyncUserTaskImpl.java
...in/java/com/mortals/xhx/daemon/task/SyncUserTaskImpl.java
+0
-7
attendance-performance-manager/src/main/java/com/mortals/xhx/module/staff/model/StaffEntity.java
.../java/com/mortals/xhx/module/staff/model/StaffEntity.java
+1
-1
attendance-performance-manager/src/main/java/com/mortals/xhx/module/staff/service/impl/StaffRegularServiceImpl.java
...hx/module/staff/service/impl/StaffRegularServiceImpl.java
+19
-1
attendance-performance-manager/src/main/java/com/mortals/xhx/module/staff/service/impl/StaffServiceImpl.java
...rtals/xhx/module/staff/service/impl/StaffServiceImpl.java
+10
-9
attendance-performance-manager/src/main/java/com/mortals/xhx/module/staff/web/StaffController.java
...ava/com/mortals/xhx/module/staff/web/StaffController.java
+9
-0
attendance-performance-manager/src/main/resources/sqlmap/base/system/menu.xml
...ce-manager/src/main/resources/sqlmap/base/system/menu.xml
+866
-524
common-lib/src/main/java/com/mortals/xhx/feign/user/IUserFeign.java
.../src/main/java/com/mortals/xhx/feign/user/IUserFeign.java
+1
-1
db/base.sql
db/base.sql
+1
-0
No files found.
attendance-performance-manager-ui/admin/src/assets/utils/table.js
View file @
468eee28
...
@@ -103,6 +103,33 @@ const find = (list, key, val) => {
...
@@ -103,6 +103,33 @@ const find = (list, key, val) => {
}
}
}
}
/**
* 构造树型结构数据
* @param {*} data 数据源
* @param {*} id id字段 默认 'id'
* @param {*} parentId 父节点字段 默认 'parentId'
* @param {*} children 孩子节点字段 默认 'children'
* @param {*} rootId 根Id 默认 0
*/
function
handleTree
(
data
,
id
,
parentId
,
children
,
rootId
)
{
id
=
id
||
'
id
'
parentId
=
parentId
||
'
parentId
'
children
=
children
||
'
children
'
rootId
=
rootId
||
Math
.
min
.
apply
(
Math
,
data
.
map
(
item
=>
{
return
item
[
parentId
]
}))
||
0
//对源数据深度克隆
const
cloneData
=
JSON
.
parse
(
JSON
.
stringify
(
data
))
//循环所有项
const
treeData
=
cloneData
.
filter
(
father
=>
{
let
branchArr
=
cloneData
.
filter
(
child
=>
{
//返回每一项的子级数组
return
father
[
id
]
===
child
[
parentId
]
});
branchArr
.
length
>
0
?
father
.
children
=
branchArr
:
''
;
//返回第一层
return
father
[
parentId
]
===
rootId
;
});
return
treeData
!=
''
?
treeData
:
data
;
};
export
{
export
{
formatter
,
formatter
,
...
@@ -110,4 +137,5 @@ export {
...
@@ -110,4 +137,5 @@ export {
formatterDate
,
formatterDate
,
formatterDateOnly
,
formatterDateOnly
,
find
,
find
,
handleTree
};
};
attendance-performance-manager-ui/admin/src/components/Header.vue
View file @
468eee28
...
@@ -73,7 +73,6 @@ export default {
...
@@ -73,7 +73,6 @@ export default {
this
.
$router
.
push
({
path
})
this
.
$router
.
push
({
path
})
let
thirdArr
=
this
.
headBar
.
children
.
find
(
item
=>
item
.
path
===
path
)
let
thirdArr
=
this
.
headBar
.
children
.
find
(
item
=>
item
.
path
===
path
)
let
arr
=
[]
let
arr
=
[]
console
.
log
(
thirdArr
,
'
ssssss
'
)
if
(
thirdArr
.
children
.
length
===
0
){
if
(
thirdArr
.
children
.
length
===
0
){
arr
.
push
(
arr
.
push
(
{
{
...
...
attendance-performance-manager-ui/admin/src/store.js
View file @
468eee28
...
@@ -14,9 +14,7 @@ try {
...
@@ -14,9 +14,7 @@ try {
userData
=
JSON
.
parse
(
window
.
sessionStorage
.
userData
||
'
{}
'
);
userData
=
JSON
.
parse
(
window
.
sessionStorage
.
userData
||
'
{}
'
);
currentParentName
=
window
.
sessionStorage
.
currentParentName
||
''
currentParentName
=
window
.
sessionStorage
.
currentParentName
||
''
headBar
=
JSON
.
parse
(
window
.
sessionStorage
.
headBar
||
'
{}
'
)
headBar
=
JSON
.
parse
(
window
.
sessionStorage
.
headBar
||
'
{}
'
)
CurrentThirdArr
=
JSON
.
parse
(
window
.
sessionStorage
.
CurrentThirdArr
||
'
{}
'
)
CurrentThirdArr
=
JSON
.
parse
(
window
.
sessionStorage
.
CurrentThirdArr
||
'
{}
'
)
ThirdPath
=
window
.
sessionStorage
.
ThirdPath
||
''
ThirdPath
=
window
.
sessionStorage
.
ThirdPath
||
''
CurrentSecondPath
=
window
.
sessionStorage
.
CurrentSecondPath
||
''
CurrentSecondPath
=
window
.
sessionStorage
.
CurrentSecondPath
||
''
}
catch
(
error
)
{
}
catch
(
error
)
{
...
...
attendance-performance-manager-ui/admin/src/views/attendance/leave/record/drawershow.vue
View file @
468eee28
attendance-performance-manager-ui/admin/src/views/attendance/leave/record/list.vue
View file @
468eee28
<
template
>
<
template
>
<div
class=
"page"
>
<div
class=
"page"
>
<LayoutTable
:data=
"tableData"
:config=
"tableConfig"
>
<LayoutTable
:data=
"tableData"
:config=
"tableConfig"
></LayoutTable>
</LayoutTable>
<drawer-show
ref=
"drawerform"
@
ok=
"getData"
/>
<drawer-show
ref=
"drawerform"
@
ok=
"getData"
/>
...
...
attendance-performance-manager-ui/admin/src/views/dept/list.vue
View file @
468eee28
...
@@ -49,6 +49,7 @@
...
@@ -49,6 +49,7 @@
// fuzzy: true
// fuzzy: true
// },
// },
// ],
// ],
showType
:
'
treetable
'
,
isshowTabPane
:
true
,
isshowTabPane
:
true
,
columns
:
[
columns
:
[
{
type
:
"
selection
"
,
width
:
60
},
{
type
:
"
selection
"
,
width
:
60
},
...
...
attendance-performance-manager-ui/admin/src/views/job/list.vue
View file @
468eee28
...
@@ -50,6 +50,7 @@
...
@@ -50,6 +50,7 @@
},
},
mixins
:
[
table
,
tree
],
mixins
:
[
table
,
tree
],
created
()
{
created
()
{
this
.
getpositions
()
},
},
computed
:{
computed
:{
thirdList
(){
thirdList
(){
...
@@ -75,7 +76,9 @@
...
@@ -75,7 +76,9 @@
},
},
// 获取全部职位
// 获取全部职位
getpositions
(){
getpositions
(){
this
.
$post
(
"
/job/treeselect
"
,
{}).
then
(({
data
})
=>
{
this
.
areaData
=
data
.
result
})
},
},
handleClick
(
key
){
handleClick
(
key
){
this
.
$store
.
commit
(
'
setThirdPath
'
,
key
)
this
.
$store
.
commit
(
'
setThirdPath
'
,
key
)
...
@@ -131,8 +134,7 @@
...
@@ -131,8 +134,7 @@
}
}
}
}
]
]
},
}
areaData
:[]
}
}
}
}
};
};
...
...
attendance-performance-manager-ui/admin/src/views/staff/care/list.vue
View file @
468eee28
...
@@ -170,7 +170,7 @@ export default {
...
@@ -170,7 +170,7 @@ export default {
},
{
type
:
"
excel
"
}).
then
(()
=>
this
.
isExport
=
false
).
catch
(
error
=>
{
},
{
type
:
"
excel
"
}).
then
(()
=>
this
.
isExport
=
false
).
catch
(
error
=>
{
this
.
isExport
=
false
;
this
.
isExport
=
false
;
this
.
$message
.
error
(
error
.
message
);
this
.
$message
.
error
(
error
.
message
);
})
;
})
},
},
/** 重写新增方法 */
/** 重写新增方法 */
toAdd
(
row
)
{
toAdd
(
row
)
{
...
...
attendance-performance-manager-ui/admin/src/views/staff/drawershow.vue
View file @
468eee28
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
<Field
label=
"所属部门"
prop=
"deptName"
v-model=
"form.deptName"
placeholder=
"请选择所属部门"
@
focus=
"ishowBumen = true"
/>
<Field
label=
"所属部门"
prop=
"deptName"
v-model=
"form.deptName"
placeholder=
"请选择所属部门"
@
focus=
"ishowBumen = true"
/>
<Field
label=
"职位"
prop=
"positionId"
v-model=
"form.positionId"
type=
"select"
placeholder=
"请选择职位"
/>
<Field
label=
"职位"
prop=
"positionId"
v-model=
"form.positionId"
:enumData=
"dict.politicalstatus"
type=
"select"
placeholder=
"请选择职位"
/>
<Field
label=
"工号"
prop=
"workNum"
v-model=
"form.workNum"
placeholder=
"请输入工号"
/>
<Field
label=
"工号"
prop=
"workNum"
v-model=
"form.workNum"
placeholder=
"请输入工号"
/>
...
...
attendance-performance-manager-ui/admin/src/views/staff/list.vue
View file @
468eee28
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
<el-row>
<el-row>
<LayoutTable
notDel
:data=
"tableData"
:config=
"tableConfig"
>
<LayoutTable
notDel
:data=
"tableData"
:config=
"tableConfig"
>
<el-button
type=
"primary"
<el-button
type=
"primary"
@
click=
"doExport"
:disabled=
"isExport"
size=
"mini"
slot=
"table-head-left2"
>
导出
</el-button>
size=
"mini"
slot=
"table-head-left2"
>
导出
</el-button>
<el-dropdown
class=
"moreControll"
slot=
"table-head-left2"
style=
"margin-left:20px"
>
<el-dropdown
class=
"moreControll"
slot=
"table-head-left2"
style=
"margin-left:20px"
>
<el-button
type=
"primary"
size=
"mini"
>
<el-button
type=
"primary"
size=
"mini"
>
...
@@ -167,6 +167,16 @@
...
@@ -167,6 +167,16 @@
this
.
currentNode
=
node
;
this
.
currentNode
=
node
;
this
.
query
=
{
deptId
:
node
.
id
};
this
.
query
=
{
deptId
:
node
.
id
};
this
.
getData
();
this
.
getData
();
},
doExport
(){
this
.
isExport
=
true
;
this
.
$download
(
"
/staff/list/exportExcel
"
,
{
"
idList
"
:
this
.
selection
,
'
name
'
:
this
.
$route
.
query
[
'
name
'
],
},
{
type
:
"
excel
"
}).
then
(()
=>
this
.
isExport
=
false
).
catch
(
error
=>
{
this
.
isExport
=
false
;
this
.
$message
.
error
(
error
.
message
);
})
}
}
},
},
data
()
{
data
()
{
...
@@ -189,8 +199,14 @@
...
@@ -189,8 +199,14 @@
{
{
name
:
"
name
"
,
name
:
"
name
"
,
type
:
"
text
"
,
type
:
"
text
"
,
label
:
"
员工姓名
或手机号
"
,
label
:
"
员工姓名
"
,
fuzzy
:
true
fuzzy
:
true
},
{
name
:
'
phoneNumber
'
,
type
:
'
text
'
,
label
:
'
手机号
'
,
fuzzy
:
true
}
}
],
],
columns
:
[
columns
:
[
...
@@ -218,7 +234,8 @@
...
@@ -218,7 +234,8 @@
},
},
activeName
:
'
first
'
,
activeName
:
'
first
'
,
isshowHome
:
false
,
isshowHome
:
false
,
personData
:[]
personData
:[],
isExport
:
false
}
}
},
},
computed
:{
computed
:{
...
@@ -247,6 +264,9 @@
...
@@ -247,6 +264,9 @@
</
style
>
</
style
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.page
{
min-width
:
1400px
;
}
.totalNum
{
.totalNum
{
background
:
rgba
(
64
,
158
,
255
,
0
.2
);
background
:
rgba
(
64
,
158
,
255
,
0
.2
);
padding
:
15px
;
padding
:
15px
;
...
...
attendance-performance-manager-ui/admin/src/views/system/menu/dialogshow.vue
View file @
468eee28
// 添加,编辑设备
<
template
>
<
template
>
<!-- 弹出框表单 -->
<!-- 弹出框表单 -->
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"35%"
append-to-body
>
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"90%"
append-to-body
>
<el-form
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"120px"
>
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"110px"
label-position=
"right"
>
<el-row>
<el-row>
<Field
<el-col
:span=
"24"
v-if=
"form.parentId !== 0"
>
:span=
"22"
<el-form-item
label=
"上级节点"
prop=
"parentId"
>
label=
"ID"
<treeselect
prop=
"id"
v-model=
"form.id"
v-if=
"pageInfo.type !== 'add'"
disabled
/>
<Field
:span=
"22"
label=
"名称"
prop=
"name"
v-model=
"form.name"
/>
<Field
:span=
"22"
label=
"权限类型"
prop=
"authType"
v-model=
"form.authType"
:enumData=
"dict.authType"
type=
"select"
/>
<Field
:span=
"22"
label=
"父级菜单"
prop=
"parentId"
v-model=
"form.parentId"
v-model=
"form.parentId"
:enumData=
"menu"
:options=
"menuOptions"
type=
"select"
:normalizer=
"normalizer"
/>
placeholder=
"选择上级菜单信息"
<Field
:span=
"22"
label=
"访问地址"
prop=
"url"
v-model=
"form.url"
/>
<Field
:span=
"22"
label=
"状态"
prop=
"status"
v-model=
"form.status"
:enumData=
"dict.status"
type=
"radio"
/>
/>
</el-form-item>
</el-col>
<Field
<!--
<Field
label=
"ID"
prop=
"id"
v-model=
"form.id"
v-if=
'pageInfo.type !== "add"'
disabled
/>
-->
:span=
"22"
<Field
label=
"名称"
prop=
"name"
v-model=
"form.name"
/>
label=
"图标"
<Field
label=
"权限类型"
prop=
"authType"
v-model=
"form.authType"
:enumData=
'dict.authType'
type=
'select'
/>
placeholder=
"请输入图标名称"
<Field
label=
"访问地址"
prop=
"url"
v-model=
"form.url"
/>
prop=
"imgPath"
<Field
label=
"状态"
prop=
"status"
v-model=
"form.status"
:enumData=
'dict.status'
type=
'radio'
/>
v-model=
"form.imgPath"
<Field
class=
"radio-group-container"
label=
"图标"
prop=
"imgPath"
:span=
'24'
>
/>
<el-radio-group
v-model=
"form.imgPath"
class=
'form-el-radio-group'
>
<!--
<Field
v-else
:span=
"22"
label=
"图标"
prop=
"imgPath"
>
<el-radio-button
style=
"width: 180px"
label=
""
>
不需要图标
</el-radio-button>
<el-radio-group
v-model=
"form.imgPath"
class=
"form-el-radio-group"
>
<el-radio-button
style=
"width: 180px"
v-for=
'(icon, index) in icons'
:key=
'index'
:label=
"icon"
>
<el-radio-button
label=
""
>
不需要图标
</el-radio-button>
<i
:class=
"'el-icon-'+icon"
style=
"font-size: 20px"
></i>
<el-radio-button
{{
icon
}}
v-for=
"(icon, index) in icons"
:key=
"index"
:label=
"icon"
>
<i
:class=
"'el-icon-' + icon"
></i>
{{
icon
}}
</el-radio-button>
</el-radio-button>
</el-radio-group>
</el-radio-group>
</Field>
-->
</Field>
</el-row>
</el-row>
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
type=
"primary"
v-if=
"pageInfo.type !== 'view'"
@
click=
"submitForm"
>
确 定
</el-button
>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</div>
</el-dialog>
</el-dialog>
...
@@ -81,55 +39,81 @@
...
@@ -81,55 +39,81 @@
<
script
>
<
script
>
import
form
from
"
@/assets/mixins/formdialog
"
;
import
form
from
"
@/assets/mixins/formdialog
"
;
import
dialogShow
from
"
./dialogshow
"
;
import
Treeselect
from
"
@riophae/vue-treeselect
"
;
import
"
@riophae/vue-treeselect/dist/vue-treeselect.css
"
;
import
axios
from
'
axios
'
export
default
{
export
default
{
mixins
:
[
form
],
mixins
:
[
form
],
components
:
{
components
:
{
dialogShow
,
Treeselect
,
},
},
computed
:
{
data
()
{
menu
()
{
return
{
let
menu
=
{
0
:
"
无
"
};
fileContent
:
""
,
this
.
$store
.
state
.
userData
.
barList
.
forEach
((
item
)
=>
{
icons
:
[
menu
[
item
.
id
+
""
]
=
item
.
name
;
'
info
'
,
'
error
'
,
'
success
'
,
'
warning
'
,
'
question
'
,
});
'
tickets
'
,
'
document
'
,
'
goods
'
,
'
sold-out
'
,
'
news
'
,
return
menu
;
'
message
'
,
'
date
'
,
'
printer
'
,
'
time
'
,
'
bell
'
,
'
mobile-phone
'
,
'
service
'
,
'
view
'
,
'
menu
'
,
'
star-on
'
,
'
location
'
,
'
phone
'
,
'
picture
'
,
'
delete
'
,
'
search
'
,
'
edit
'
,
'
rank
'
,
'
refresh
'
,
'
share
'
,
'
setting
'
,
'
upload
'
,
'
upload2
'
,
'
download
'
,
'
loading
'
,
],
menuOptions
:
[],
// 遮罩层
loading
:
true
,
// 弹出层标题
title
:
"
菜单信息
"
,
// 是否显示弹出层
open
:
false
,
toString
:[
"
status
"
,
"
linkType
"
,
"
commMenu
"
,
"
menuType
"
,
"
authType
"
,
],
// 表单校验
rules
:
{
}
}
};
},
},
created
()
{
methods
:
{
axios
.
get
(
'
/icon.txt
'
)
afterSubmit
()
{
.
then
(
response
=>
{
this
.
$store
.
dispatch
(
"
login
"
);
this
.
fileContent
=
response
.
data
this
.
$router
.
go
(
-
1
);
this
.
icons
=
this
.
fileContent
.
split
(
'
\n
'
)
})
},
},
methods
:
{
/** 编辑 */
/** 编辑 */
edit
(
row
)
{
edit
(
row
,
menuOptions
)
{
this
.
reset
()
;
this
.
reset
()
this
.
query
=
{
id
:
row
.
id
};
this
.
query
=
{
id
:
row
.
id
};
this
.
urls
.
currUrl
=
this
.
pageInfo
.
editUrl
;
this
.
urls
.
currUrl
=
this
.
pageInfo
.
editUrl
;
;
this
.
getData
();
this
.
getData
();
this
.
pageInfo
.
type
=
"
edit
"
;
this
.
menuOptions
=
menuOptions
;
this
.
title
=
"
修改菜单
"
;
this
.
title
=
"
修改菜单
信息
"
;
},
},
/** 新增 */
/** 新增 */
add
(
row
)
{
add
(
row
,
menuOptions
)
{
this
.
reset
()
;
this
.
reset
()
this
.
query
=
{
id
:
row
.
id
};
this
.
query
=
{
id
:
row
.
id
};
this
.
urls
.
currUrl
=
this
.
pageInfo
.
addUrl
;
this
.
urls
.
currUrl
=
this
.
pageInfo
.
addUrl
;
this
.
getData
();
this
.
getData
();
this
.
pageInfo
.
type
=
"
add
"
;
if
(
row
.
id
){
this
.
open
=
true
;
this
.
form
.
parentId
=
row
.
id
this
.
title
=
"
新增菜单
"
;
}
this
.
menuOptions
=
menuOptions
;
this
.
title
=
"
新增菜单信息
"
;
},
},
/** 查看*/
/** 查看*/
view
(
row
)
{
view
(
row
,
menuOptions
)
{
this
.
reset
();
this
.
query
=
{
id
:
row
.
id
};
this
.
query
=
{
id
:
row
.
id
};
this
.
urls
.
currUrl
=
this
.
pageInfo
.
viewUrl
;
this
.
urls
.
currUrl
=
this
.
pageInfo
.
viewUrl
;
;
this
.
getData
();
this
.
getData
();
this
.
pageInfo
.
type
=
"
view
"
;
this
.
menuOptions
=
menuOptions
;
this
.
open
=
true
;
this
.
title
=
"
菜单信息详细
"
;
this
.
title
=
"
菜单详细
"
;
},
},
/**取消按钮 */
/**取消按钮 */
cancel
()
{
cancel
()
{
...
@@ -139,14 +123,42 @@ export default {
...
@@ -139,14 +123,42 @@ export default {
afterRender
(
data
)
{
afterRender
(
data
)
{
this
.
open
=
true
;
this
.
open
=
true
;
},
},
afterSubmit
(
data
)
{
afterSubmit
(
data
)
{
this
.
open
=
false
;
this
.
open
=
false
;
this
.
$emit
(
"
ok
"
);
this
.
$emit
(
"
ok
"
);
},
},
/** 转换菜单信息数据结构 */
normalizer
(
node
)
{
if
(
node
.
children
&&
!
node
.
children
.
length
)
{
delete
node
.
children
;
}
return
{
id
:
node
.
id
,
label
:
node
.
name
,
children
:
node
.
children
,
};
},
// 表单重置
// 表单重置
reset
()
{
reset
()
{
// this.form={}
this
.
form
=
{
name
:
null
,
url
:
null
,
ancestors
:
null
,
parentId
:
null
,
orderId
:
null
,
status
:
1
,
linkType
:
0
,
groupId
:
1
,
groupName
:
null
,
imgPath
:
null
,
buttonImgPath
:
null
,
imgCommPath
:
null
,
commMenu
:
0
,
menuType
:
0
,
authType
:
3
,
createUserName
:
null
,
};
this
.
resetForm
(
"
form
"
);
this
.
resetForm
(
"
form
"
);
},
},
resetForm
(
refName
)
{
resetForm
(
refName
)
{
...
@@ -155,74 +167,42 @@ export default {
...
@@ -155,74 +167,42 @@ export default {
}
}
},
},
},
},
data
()
{
return
{
// 遮罩层
loading
:
true
,
// 弹出层标题
title
:
"
菜单
"
,
// 是否显示弹出层
open
:
false
,
toString
:
[
"
parentId
"
,
"
authType
"
,
"
status
"
],
icons
:
[
"
info
"
,
"
error
"
,
"
success
"
,
"
warning
"
,
"
question
"
,
"
tickets
"
,
"
document
"
,
"
goods
"
,
"
sold-out
"
,
"
news
"
,
"
message
"
,
"
date
"
,
"
printer
"
,
"
time
"
,
"
bell
"
,
"
mobile-phone
"
,
"
service
"
,
"
view
"
,
"
menu
"
,
"
star-on
"
,
"
location
"
,
"
phone
"
,
"
picture
"
,
"
delete
"
,
"
search
"
,
"
edit
"
,
"
rank
"
,
"
refresh
"
,
"
share
"
,
"
setting
"
,
"
upload
"
,
"
upload2
"
,
"
download
"
,
"
loading
"
,
"
reading
"
,
],
rules
:
{
name
:
[{
required
:
true
,
message
:
"
请输入名称
"
,
trigger
:
"
blur
"
}],
},
};
},
};
};
</
script
>
</
script
>
<
style
lang=
"less"
>
<
style
lang=
"scss"
>
.el-select {
.ml-row
{
width: 100%;
margin-bottom
:
5px
;
}
.el-date-editor.el-input {
width: 100%;
}
.form-el-radio-group.label {
width: 160px;
}
}
.el-radio-button__inner
{
.el-radio-button__inner
{
border: 0;
// width: 82px;
height
:
36px
;
border-radius
:
4px
0px
0px
4px
;
border
:
1px
solid
rgba
(
0
,
0
,
0
,
0
)
!
important
;
border-radius
:
2px
!
important
;
background-color
:
rgba
(
0
,
0
,
0
,
0
);
font-size
:
14px
;
font-weight
:
400
;
color
:
#606677
;
line-height
:
14px
;
outline
:
none
;
box-shadow
:
none
;
}
}
</
style
>
.el-radio-button__orig-radio
:checked
+
.el-radio-button__inner
{
background
:
rgba
(
0
,
0
,
0
,
0
);
border
:
1px
solid
#3E7BFA
!
important
;
color
:
#3E7BFA
;
line-height
:
14px
;
outline
:
none
;
box-shadow
:
none
;
}
.ml-top-button
{
border-color
:
#ffffff
;
background
:
rgba
(
0
,
0
,
0
,
0
);
font-size
:
16px
;
margin
:
0
10px
0
10px
;
}
</
style
>
attendance-performance-manager-ui/admin/src/views/system/menu/list.vue
View file @
468eee28
This diff is collapsed.
Click to expand it.
attendance-performance-manager/src/main/java/com/mortals/xhx/base/framework/interceptor/AuthTokenServiceImpl.java
View file @
468eee28
...
@@ -56,8 +56,8 @@ public class AuthTokenServiceImpl implements IAuthTokenService {
...
@@ -56,8 +56,8 @@ public class AuthTokenServiceImpl implements IAuthTokenService {
@Value
(
"${token.database:0}"
)
@Value
(
"${token.database:0}"
)
private
Integer
portalDb
;
private
Integer
portalDb
;
@Autowired
//
@Autowired
private
IUserFeign
userFeign
;
//
private IUserFeign userFeign;
protected
static
final
Long
SECOND
=
1
l
;
protected
static
final
Long
SECOND
=
1
l
;
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/base/login/web/LoginController.java
View file @
468eee28
...
@@ -21,11 +21,7 @@ import com.mortals.xhx.base.system.user.model.UserEntity;
...
@@ -21,11 +21,7 @@ import com.mortals.xhx.base.system.user.model.UserEntity;
import
com.mortals.xhx.base.system.user.service.UserService
;
import
com.mortals.xhx.base.system.user.service.UserService
;
import
com.mortals.xhx.base.system.valid.service.ValidCodeService
;
import
com.mortals.xhx.base.system.valid.service.ValidCodeService
;
import
com.mortals.xhx.common.key.RedisKey
;
import
com.mortals.xhx.common.key.RedisKey
;
import
com.mortals.xhx.common.pdu.user.UserPdu
;
import
com.mortals.xhx.feign.user.IUserFeign
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.logging.Log
;
import
org.apache.commons.logging.LogFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
...
@@ -59,8 +55,7 @@ public class LoginController extends BaseCRUDJsonBodyMappingController<UserServi
...
@@ -59,8 +55,7 @@ public class LoginController extends BaseCRUDJsonBodyMappingController<UserServi
private
ICacheService
cacheService
;
private
ICacheService
cacheService
;
@Autowired
@Autowired
private
IAuthTokenService
authTokenService
;
private
IAuthTokenService
authTokenService
;
@Autowired
private
IUserFeign
userFeign
;
@RequestMapping
(
"login"
)
@RequestMapping
(
"login"
)
public
String
login
(
@RequestBody
LoginForm
loginForm
)
throws
Exception
{
public
String
login
(
@RequestBody
LoginForm
loginForm
)
throws
Exception
{
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/base/system/menu/dao/MenuDao.java
View file @
468eee28
/**
* 文件:MenuDao.java
* 版本:1.0.0
* 日期:
* Copyright ®
* All right reserved.
*/
package
com.mortals.xhx.base.system.menu.dao
;
package
com.mortals.xhx.base.system.menu.dao
;
import
com.mortals.framework.dao.ICRUDDao
;
import
com.mortals.framework.dao.ICRUDDao
;
import
com.mortals.xhx.base.system.menu.model.MenuEntity
;
import
com.mortals.xhx.base.system.menu.model.MenuEntity
;
import
java.util.List
;
/**
/**
* <p>Title: 菜单信息</p>
* 菜单信息Dao
* <p>Description: MenuDao DAO接口 </p>
* 菜单信息 DAO接口
* <p>Copyright: Copyright ® </p>
*
* <p>Company: </p>
* @author zxfei
* @author
* @date 2023-04-10
* @version 1.0.0
*/
*/
public
interface
MenuDao
extends
ICRUDDao
<
MenuEntity
,
Long
>
{
public
interface
MenuDao
extends
ICRUDDao
<
MenuEntity
,
Long
>{
/**
* 查询子节点
*
* @param
* @return
*/
List
<
MenuEntity
>
selectChildrenMenuById
(
String
menuId
);
}
}
attendance-performance-manager/src/main/java/com/mortals/xhx/base/system/menu/dao/ibatis/MenuDaoImpl.java
View file @
468eee28
/**
* 文件:MenuDaoImpl.java
* 版本:1.0.0
* 日期:
* Copyright ®
* All right reserved.
*/
package
com.mortals.xhx.base.system.menu.dao.ibatis
;
package
com.mortals.xhx.base.system.menu.dao.ibatis
;
import
com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis
;
import
com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis
;
import
com.mortals.xhx.base.system.menu.dao.MenuDao
;
import
com.mortals.xhx.base.system.menu.dao.MenuDao
;
import
com.mortals.xhx.base.system.menu.model.MenuEntity
;
import
com.mortals.xhx.base.system.menu.model.MenuEntity
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
/**
/**
* <p>Title: 菜单信息</p>
* 菜单信息DaoImpl DAO接口
* <p>Description: MenuDaoImpl DAO接口 </p>
*
* <p>Copyright: Copyright ® </p>
* @author zxfei
* <p>Company: </p>
* @date 2023-04-10
* @author
*/
* @version 1.0.0
*/
@Repository
(
"menuDao"
)
@Repository
(
"menuDao"
)
public
class
MenuDaoImpl
extends
BaseCRUDDaoMybatis
<
MenuEntity
,
Long
>
implements
MenuDao
{
public
class
MenuDaoImpl
extends
BaseCRUDDaoMybatis
<
MenuEntity
,
Long
>
implements
MenuDao
{
@Override
public
List
<
MenuEntity
>
selectChildrenMenuById
(
String
menuId
)
{
return
getSqlSession
().
selectList
(
getSqlId
(
"selectChildrenMenuById"
),
menuId
);
}
}
}
attendance-performance-manager/src/main/java/com/mortals/xhx/base/system/menu/model/MenuEntity.java
View file @
468eee28
This diff is collapsed.
Click to expand it.
attendance-performance-manager/src/main/java/com/mortals/xhx/base/system/menu/model/MenuQuery.java
View file @
468eee28
This diff is collapsed.
Click to expand it.
attendance-performance-manager/src/main/java/com/mortals/xhx/base/system/menu/model/MenuTreeSelect.java
0 → 100644
View file @
468eee28
package
com.mortals.xhx.base.system.menu.model
;
import
com.fasterxml.jackson.annotation.JsonInclude
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
* 菜单信息前端映射树结构实体类
*
* @author zxfei
* @date 2023-04-10
*/
@Data
public
class
MenuTreeSelect
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 节点ID
*/
private
Long
id
;
/**
* 节点名称
*/
private
String
label
;
/**
* 子节点
*/
@JsonInclude
(
JsonInclude
.
Include
.
NON_EMPTY
)
private
List
<
MenuTreeSelect
>
children
;
public
MenuTreeSelect
(
MenuEntity
entity
)
{
this
.
id
=
entity
.
getId
();
this
.
label
=
entity
.
getName
();
this
.
children
=
entity
.
getChildList
().
stream
().
map
(
MenuTreeSelect:
:
new
).
collect
(
Collectors
.
toList
());
}
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/base/system/menu/model/vo/MenuVo.java
0 → 100644
View file @
468eee28
package
com.mortals.xhx.base.system.menu.model.vo
;
import
com.mortals.framework.model.BaseEntityLong
;
import
com.mortals.xhx.base.system.menu.model.MenuEntity
;
import
lombok.Data
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* 菜单信息视图对象
*
* @author zxfei
* @date 2023-04-10
*/
@Data
public
class
MenuVo
extends
BaseEntityLong
{
/** 子菜单信息 */
private
List
<
MenuEntity
>
childList
=
new
ArrayList
<>();
private
Integer
type
;
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/base/system/menu/service/MenuService.java
View file @
468eee28
/**
* 文件:MenuService.java
* 版本:1.0.0
* 日期:
* Copyright ®
* All right reserved.
*/
package
com.mortals.xhx.base.system.menu.service
;
package
com.mortals.xhx.base.system.menu.service
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.service.ICRUDService
;
import
com.mortals.framework.service.ICRUDService
;
import
com.mortals.framework.service.IUser
;
import
com.mortals.framework.service.IUser
;
import
com.mortals.xhx.base.system.menu.model.MenuEntity
;
import
com.mortals.xhx.base.system.menu.model.MenuEntity
;
import
com.mortals.xhx.base.system.menu.model.MenuTreeSelect
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Set
;
import
java.util.Set
;
/**
/**
*
<p>Title: 菜单信息</p>
*
MenuService
* <p>
Description: MenuService service接口 </p>
* <p>
*
<p>Copyright: Copyright ® </p>
*
菜单信息 service接口
*
<p>Company: </p>
*
* @author
* @author
zxfei
* @
version 1.0.
0
* @
date 2023-04-1
0
*/
*/
public
interface
MenuService
extends
ICRUDService
<
MenuEntity
,
Long
>
{
public
interface
MenuService
extends
ICRUDService
<
MenuEntity
,
Long
>
{
/**
/**
* 获取所有可用菜单
* 获取所有可用菜单
*
*
...
@@ -56,8 +49,47 @@ public interface MenuService extends ICRUDService<MenuEntity,Long> {
...
@@ -56,8 +49,47 @@ public interface MenuService extends ICRUDService<MenuEntity,Long> {
/**
/**
* 更新排列顺序
* 更新排列顺序
*
* @param id
* @param id
* @param type
* @param type
*/
*/
void
upOrDown
(
Long
id
,
Integer
type
);
void
upOrDown
(
Long
id
,
Integer
type
);
/**
* 是否存在菜单信息节点
*
* @param menuId 菜单信息ID
* @return 结果
*/
boolean
hasChildByMenuId
(
Long
menuId
);
/**
* 查询菜单信息数据
*
* @param menu 菜单信息
* @return 菜单信息集合
*/
List
<
MenuEntity
>
selectMenuList
(
MenuEntity
menu
);
/**
* 构建前端所需要下拉树结构
*
* @param menuList 菜单信息列表
* @return 下拉树结构列表
*/
List
<
MenuTreeSelect
>
buildMenuTreeSelect
(
List
<
MenuEntity
>
menuList
);
/**
* 根据父id查询子节点
*
* @param parentId
* @param context
* @return
*/
List
<
MenuTreeSelect
>
getListByParentId
(
Long
parentId
,
Context
context
);
Set
<
Long
>
getPathSetById
(
Long
id
,
Context
context
);
}
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/base/system/menu/service/impl/MenuServiceImpl.java
View file @
468eee28
/**
* 文件:MenuServiceImpl.java
* 版本:1.0.0
* 日期:
* Copyright ®
* All right reserved.
*/
package
com.mortals.xhx.base.system.menu.service.impl
;
package
com.mortals.xhx.base.system.menu.service.impl
;
import
com.mortals.framework.common.code.YesNo
;
import
com.mortals.framework.common.code.YesNo
;
...
@@ -18,23 +10,22 @@ import com.mortals.framework.util.StringUtils;
...
@@ -18,23 +10,22 @@ import com.mortals.framework.util.StringUtils;
import
com.mortals.xhx.base.system.menu.dao.MenuDao
;
import
com.mortals.xhx.base.system.menu.dao.MenuDao
;
import
com.mortals.xhx.base.system.menu.model.MenuEntity
;
import
com.mortals.xhx.base.system.menu.model.MenuEntity
;
import
com.mortals.xhx.base.system.menu.model.MenuQuery
;
import
com.mortals.xhx.base.system.menu.model.MenuQuery
;
import
com.mortals.xhx.base.system.menu.model.MenuTreeSelect
;
import
com.mortals.xhx.base.system.menu.service.MenuService
;
import
com.mortals.xhx.base.system.menu.service.MenuService
;
import
com.mortals.xhx.common.code.SatusEnum
;
import
com.mortals.xhx.common.code.YesNoEnum
;
import
com.mortals.xhx.common.code.YesNoEnum
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
/**
/**
* <p>Title: 菜单信息</p>
* MenuService
* <p>Description: MenuServiceImpl service接口 </p>
* 菜单信息 service实现
* <p>Copyright: Copyright ® </p>
*
* <p>Company: </p>
* @author zxfei
*
* @date 2023-04-10
* @author
*/
* @version 1.0.0
*/
@Service
(
"menuService"
)
@Service
(
"menuService"
)
public
class
MenuServiceImpl
extends
AbstractCRUDServiceImpl
<
MenuDao
,
MenuEntity
,
Long
>
implements
MenuService
{
public
class
MenuServiceImpl
extends
AbstractCRUDServiceImpl
<
MenuDao
,
MenuEntity
,
Long
>
implements
MenuService
{
...
@@ -168,8 +159,10 @@ public class MenuServiceImpl extends AbstractCRUDServiceImpl<MenuDao, MenuEntity
...
@@ -168,8 +159,10 @@ public class MenuServiceImpl extends AbstractCRUDServiceImpl<MenuDao, MenuEntity
}
}
@Override
@Override
protected
void
saveBefore
(
MenuEntity
entity
,
Context
context
)
throws
AppException
{
protected
void
saveBefore
(
MenuEntity
entity
,
Context
context
)
throws
AppException
{
MenuQuery
query
=
new
MenuQuery
();
MenuQuery
query
=
new
MenuQuery
();
query
.
setParentId
(
entity
.
getParentId
());
query
.
setParentId
(
entity
.
getParentId
());
Comparator
<
Integer
>
comparator
=
Comparator
.
comparing
(
Integer:
:
intValue
);
Comparator
<
Integer
>
comparator
=
Comparator
.
comparing
(
Integer:
:
intValue
);
...
@@ -178,6 +171,188 @@ public class MenuServiceImpl extends AbstractCRUDServiceImpl<MenuDao, MenuEntity
...
@@ -178,6 +171,188 @@ public class MenuServiceImpl extends AbstractCRUDServiceImpl<MenuDao, MenuEntity
e
=
e
+
1
;
e
=
e
+
1
;
entity
.
setOrderId
(
e
);
entity
.
setOrderId
(
e
);
});
});
MenuEntity
parentMenuEntity
=
this
.
get
(
entity
.
getParentId
());
if
(!
ObjectUtils
.
isEmpty
(
parentMenuEntity
)
&&
SatusEnum
.
DISENABLE
.
getValue
()
==
parentMenuEntity
.
getStatus
())
{
throw
new
AppException
(
"菜单信息停用,不允许新增"
);
}
if
(!
ObjectUtils
.
isEmpty
(
parentMenuEntity
))
{
entity
.
setAncestors
(
parentMenuEntity
.
getAncestors
()
+
","
+
entity
.
getParentId
());
}
super
.
saveBefore
(
entity
,
context
);
super
.
saveBefore
(
entity
,
context
);
}
}
@Override
protected
void
updateBefore
(
MenuEntity
entity
,
Context
context
)
throws
AppException
{
MenuEntity
newParentEntity
=
this
.
get
(
entity
.
getParentId
());
MenuEntity
oldEntity
=
this
.
get
(
entity
.
getId
());
if
(!
ObjectUtils
.
isEmpty
(
newParentEntity
)
&&
!
ObjectUtils
.
isEmpty
(
oldEntity
))
{
String
newAncestors
=
newParentEntity
.
getAncestors
()
+
","
+
newParentEntity
.
getId
();
String
oldAncestors
=
oldEntity
.
getAncestors
();
entity
.
setAncestors
(
newAncestors
);
updateMenuChildren
(
entity
.
getId
(),
newAncestors
,
oldAncestors
,
context
);
}
super
.
updateBefore
(
entity
,
context
);
}
@Override
protected
void
updateAfter
(
MenuEntity
entity
,
Context
context
)
throws
AppException
{
if
(
SatusEnum
.
ENABLE
.
getValue
()
==
entity
.
getStatus
())
{
entity
=
this
.
get
(
entity
.
getId
());
updateParentMenuStatus
(
entity
,
context
);
}
super
.
updateAfter
(
entity
,
context
);
}
/**
* 修改该菜单信息的父级菜单信息状态
*
* @param menu 当前菜单信息
*/
private
void
updateParentMenuStatus
(
MenuEntity
menu
,
Context
context
)
{
MenuEntity
menuEntity
=
this
.
get
(
menu
.
getParentId
());
if
(!
ObjectUtils
.
isEmpty
(
menuEntity
)){
menuEntity
.
setStatus
(
SatusEnum
.
ENABLE
.
getValue
());
menuEntity
.
setUpdateTime
(
new
Date
());
menuEntity
.
setUpdateUser
(
context
.
getUser
().
getLoginName
());
MenuEntity
condition
=
new
MenuEntity
();
condition
.
setId
(
menuEntity
.
getId
());
this
.
updateBatch
(
menuEntity
,
condition
,
context
);
}
}
/**
* 修改子元素关系
*
* @param menuId 被修改的菜单信息ID
* @param newAncestors 新的父ID集合
* @param oldAncestors 旧的父ID集合
*/
public
void
updateMenuChildren
(
Long
menuId
,
String
newAncestors
,
String
oldAncestors
,
Context
context
)
{
List
<
MenuEntity
>
children
=
getDao
().
selectChildrenMenuById
(
menuId
.
toString
());
for
(
MenuEntity
child
:
children
)
{
child
.
setAncestors
(
child
.
getAncestors
().
replace
(
oldAncestors
,
newAncestors
));
}
if
(
children
.
size
()
>
0
)
{
this
.
updateAfter
(
children
,
context
);
}
}
@Override
protected
void
removeBefore
(
Long
[]
ids
,
Context
context
)
throws
AppException
{
//有子节点 禁止删除
if
(
hasChildByMenuId
(
ids
[
0
]))
{
throw
new
AppException
(
"存在下级菜单信息,不允许删除"
);
}
super
.
removeBefore
(
ids
,
context
);
}
@Override
public
boolean
hasChildByMenuId
(
Long
menuId
)
{
List
<
MenuEntity
>
list
=
this
.
find
(
new
MenuQuery
().
parentId
(
menuId
));
return
list
.
size
()
>
0
?
true
:
false
;
}
@Override
public
List
<
MenuEntity
>
selectMenuList
(
MenuEntity
menu
)
{
return
this
.
find
(
new
MenuQuery
());
}
@Override
public
List
<
MenuTreeSelect
>
buildMenuTreeSelect
(
List
<
MenuEntity
>
list
)
{
List
<
MenuEntity
>
returnList
=
new
ArrayList
<>();
List
<
Long
>
tempList
=
list
.
stream
().
map
(
MenuEntity:
:
getId
).
collect
(
Collectors
.
toList
());
for
(
Iterator
<
MenuEntity
>
iterator
=
list
.
iterator
();
iterator
.
hasNext
();
)
{
MenuEntity
menuEntity
=
iterator
.
next
();
if
(!
tempList
.
contains
(
menuEntity
.
getParentId
()))
{
recursionFn
(
list
,
menuEntity
);
returnList
.
add
(
menuEntity
);
}
}
if
(
returnList
.
isEmpty
())
{
returnList
=
list
;
}
return
returnList
.
stream
().
map
(
MenuTreeSelect:
:
new
).
collect
(
Collectors
.
toList
());
}
/**
* 递归列表
*/
private
void
recursionFn
(
List
<
MenuEntity
>
list
,
MenuEntity
t
)
{
// 得到子节点列表
List
<
MenuEntity
>
childList
=
getChildList
(
list
,
t
);
t
.
setChildList
(
childList
);
for
(
MenuEntity
tChild
:
childList
)
{
if
(
hasChild
(
list
,
tChild
))
{
recursionFn
(
list
,
tChild
);
}
}
}
/**
* 判断是否有子节点
*/
private
boolean
hasChild
(
List
<
MenuEntity
>
list
,
MenuEntity
t
)
{
return
getChildList
(
list
,
t
).
size
()
>
0
?
true
:
false
;
}
/**
* 得到子节点列表
*/
private
List
<
MenuEntity
>
getChildList
(
List
<
MenuEntity
>
list
,
MenuEntity
t
)
{
return
list
.
stream
().
map
(
item
->{
if
(!
ObjectUtils
.
isEmpty
(
item
.
getParentId
())
&&
item
.
getParentId
()
==
t
.
getId
())
{
return
item
;
}
return
null
;
}).
filter
(
f
->
f
!=
null
).
collect
(
Collectors
.
toList
());
}
@Override
public
List
<
MenuTreeSelect
>
getListByParentId
(
Long
parentId
,
Context
context
)
{
if
(
ObjectUtils
.
isEmpty
(
parentId
))
{
parentId
=
0L
;
}
//只做一层
List
<
MenuTreeSelect
>
collect
=
this
.
find
(
new
MenuQuery
().
parentId
(
parentId
),
context
).
stream
().
map
(
item
->
new
MenuTreeSelect
(
item
)
).
collect
(
Collectors
.
toList
());
if
(
"0"
.
equals
(
parentId
))
{
return
collect
;
}
return
collect
;
}
@Override
public
Set
<
Long
>
getPathSetById
(
Long
id
,
Context
context
)
{
Set
<
Long
>
idSet
=
new
HashSet
<>();
//idSet.add(id);
MenuEntity
menuEntity
=
this
.
get
(
id
,
context
);
if
(!
ObjectUtils
.
isEmpty
(
menuEntity
)){
return
extracted
(
context
,
idSet
,
menuEntity
);
}
return
idSet
;
}
private
Set
<
Long
>
extracted
(
Context
context
,
Set
<
Long
>
idSet
,
MenuEntity
menuEntity
)
{
MenuEntity
parentMenu
=
this
.
get
(
menuEntity
.
getParentId
(),
context
);
if
(!
ObjectUtils
.
isEmpty
(
parentMenu
)){
idSet
.
add
(
parentMenu
.
getId
());
return
extracted
(
context
,
idSet
,
parentMenu
);
}
return
idSet
;
}
}
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/base/system/menu/web/MenuController.java
View file @
468eee28
package
com.mortals.xhx.base.system.menu.web
;
package
com.mortals.xhx.base.system.menu.web
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.model.OrderCol
;
import
com.mortals.framework.model.OrderCol
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.xhx.base.system.menu.model.MenuQuery
;
import
org.springframework.web.bind.annotation.*
;
import
com.mortals.framework.web.BaseCRUDJsonMappingController
;
import
com.mortals.xhx.base.system.menu.model.MenuEntity
;
import
com.mortals.xhx.base.system.menu.model.MenuEntity
;
import
com.mortals.xhx.base.system.menu.model.MenuQuery
;
import
com.mortals.xhx.base.system.menu.model.MenuTreeSelect
;
import
com.mortals.xhx.base.system.menu.service.MenuService
;
import
com.mortals.xhx.base.system.menu.service.MenuService
;
import
com.mortals.xhx.common.code.DataSatus
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.common.code.MenuAuthType
;
import
com.mortals.xhx.common.code.*
;
import
com.mortals.xhx.common.code.MenuComm
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
com.mortals.xhx.common.code.MenuLinkType
;
import
org.springframework.web.bind.annotation.*
;
import
com.mortals.xhx.common.code.MenuType
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
static
com
.
mortals
.
framework
.
ap
.
SysConstains
.
RESULT_KEY
;
/**
/**
* 菜单信息
*
*
* 菜单信息
* @author: zxfei
*
* @date: 2021/11/30 10:02
* @author zxfei
*/
* @date 2023-04-10
*/
@RestController
@RestController
@RequestMapping
(
"menu"
)
@RequestMapping
(
"menu"
)
public
class
MenuController
extends
BaseCRUDJsonBodyMappingController
<
MenuService
,
MenuEntity
,
Long
>
{
public
class
MenuController
extends
BaseCRUDJsonBodyMappingController
<
MenuService
,
MenuEntity
,
Long
>
{
public
MenuController
()
{
@Autowired
super
.
setModuleDesc
(
"菜单信息"
);
private
ParamService
paramService
;
}
@Override
@Override
...
@@ -110,4 +101,88 @@ public class MenuController extends BaseCRUDJsonBodyMappingController<MenuServic
...
@@ -110,4 +101,88 @@ public class MenuController extends BaseCRUDJsonBodyMappingController<MenuServic
}
}
return
ret
.
toJSONString
();
return
ret
.
toJSONString
();
}
}
@PostMapping
(
"list/exclude"
)
public
String
excludeList
(
@RequestBody
MenuEntity
query
)
{
Map
<
String
,
Object
>
model
=
new
HashMap
<>();
JSONObject
ret
=
new
JSONObject
();
String
busiDesc
=
"查询"
+
this
.
getModuleDesc
();
int
code
=
VALUE_RESULT_SUCCESS
;
try
{
//查询所有菜单 排除当前菜单路径
Set
<
Long
>
idSet
=
new
HashSet
<>();
idSet
.
add
(
query
.
getId
());
//Set<Long> idSets = this.service.getPathSetById(query.getId(), getContext());
List
<
MenuEntity
>
collect
=
this
.
service
.
find
(
new
MenuQuery
()).
stream
().
map
(
item
->
{
if
(
idSet
.
contains
(
item
.
getId
()))
return
null
;
//if(idSets.contains(item.getId())) return null;
//ArrayUtils.contains()
// if(ObjectUtils.isEmpty(item.getAncestors())){
// return null;
// }
// if (item.getId().intValue() == id || ArrayUtils.contains(StringUtils.split(item.getAncestors(), ","), id + "")) {
// return null;
// }
return
item
;
}).
filter
(
f
->
f
!=
null
).
collect
(
Collectors
.
toList
());
model
.
put
(
"data"
,
collect
);
recordSysLog
(
request
,
busiDesc
+
" 【成功】"
);
}
catch
(
Exception
e
)
{
code
=
VALUE_RESULT_FAILURE
;
this
.
doException
(
request
,
busiDesc
,
model
,
e
);
}
ret
.
put
(
KEY_RESULT_DATA
,
model
);
ret
.
put
(
KEY_RESULT_CODE
,
code
);
return
ret
.
toJSONString
();
}
/**
* 获取站点下拉树列表
*/
@PostMapping
(
"treeselect"
)
public
String
treeselect
(
MenuEntity
query
)
{
Map
<
String
,
Object
>
model
=
new
HashMap
<>();
JSONObject
ret
=
new
JSONObject
();
String
busiDesc
=
"查询"
+
this
.
getModuleDesc
();
int
code
=
VALUE_RESULT_SUCCESS
;
try
{
List
<
MenuEntity
>
list
=
this
.
service
.
find
(
new
MenuQuery
());
List
<
MenuTreeSelect
>
treeSelects
=
this
.
service
.
buildMenuTreeSelect
(
list
);
model
.
put
(
"result"
,
treeSelects
);
recordSysLog
(
request
,
busiDesc
+
" 【成功】"
);
}
catch
(
Exception
e
)
{
code
=
VALUE_RESULT_FAILURE
;
this
.
doException
(
request
,
busiDesc
,
model
,
e
);
}
ret
.
put
(
KEY_RESULT_DATA
,
model
);
ret
.
put
(
KEY_RESULT_CODE
,
code
);
return
ret
.
toJSONString
();
}
/**
* 根据parentId查询子信息
*/
@GetMapping
(
value
=
"getListByParentId"
)
public
String
getListByParentId
(
Long
parentId
)
{
JSONObject
ret
=
new
JSONObject
();
Map
<
String
,
Object
>
model
=
new
HashMap
<>();
String
busiDesc
=
"查询"
+
this
.
getModuleDesc
()+
"子节点"
;
try
{
List
<
MenuTreeSelect
>
treeList
=
this
.
service
.
getListByParentId
(
parentId
,
getContext
());
model
.
put
(
RESULT_KEY
,
treeList
);
ret
.
put
(
KEY_RESULT_CODE
,
VALUE_RESULT_SUCCESS
);
ret
.
put
(
KEY_RESULT_DATA
,
model
);
recordSysLog
(
request
,
busiDesc
+
"【成功】"
);
}
catch
(
Exception
e
)
{
log
.
error
(
"根据parentId查询子信息错误"
,
e
);
this
.
doException
(
request
,
busiDesc
,
model
,
e
);
ret
.
put
(
KEY_RESULT_CODE
,
VALUE_RESULT_FAILURE
);
ret
.
put
(
KEY_RESULT_MSG
,
e
.
getMessage
());
}
return
ret
.
toJSONString
();
}
}
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/common/code/SatusEnum.java
0 → 100644
View file @
468eee28
package
com.mortals.xhx.common.code
;
import
java.util.LinkedHashMap
;
import
java.util.Map
;
/**
* 状态
* @author
*
*/
public
enum
SatusEnum
{
DISENABLE
(
0
,
"禁用"
),
ENABLE
(
1
,
"启用"
);
private
int
value
;
private
String
desc
;
SatusEnum
(
int
value
,
String
desc
)
{
this
.
value
=
value
;
this
.
desc
=
desc
;
}
public
int
getValue
()
{
return
this
.
value
;
}
public
String
getDesc
()
{
return
desc
;
}
public
static
SatusEnum
getByValue
(
int
value
)
{
for
(
SatusEnum
examStatus
:
SatusEnum
.
values
())
{
if
(
examStatus
.
getValue
()
==
value
)
{
return
examStatus
;
}
}
return
null
;
}
/**
* 获取Map集合
* @param eItem 不包含项
* @return
*/
public
static
Map
<
String
,
String
>
getEnumMap
(
int
...
eItem
)
{
Map
<
String
,
String
>
resultMap
=
new
LinkedHashMap
<
String
,
String
>();
for
(
SatusEnum
item
:
SatusEnum
.
values
())
{
try
{
boolean
hasE
=
false
;
for
(
int
e
:
eItem
){
if
(
item
.
getValue
()==
e
){
hasE
=
true
;
break
;
}
}
if
(!
hasE
){
resultMap
.
put
(
item
.
getValue
()+
""
,
item
.
getDesc
());
}
}
catch
(
Exception
ex
){
}
}
return
resultMap
;
}
}
attendance-performance-manager/src/main/java/com/mortals/xhx/daemon/task/SyncUserTaskImpl.java
View file @
468eee28
...
@@ -10,7 +10,6 @@ import com.mortals.xhx.busiz.rsp.DeptHikData;
...
@@ -10,7 +10,6 @@ import com.mortals.xhx.busiz.rsp.DeptHikData;
import
com.mortals.xhx.busiz.rsp.ListDept
;
import
com.mortals.xhx.busiz.rsp.ListDept
;
import
com.mortals.xhx.busiz.rsp.ListItem
;
import
com.mortals.xhx.busiz.rsp.ListItem
;
import
com.mortals.xhx.busiz.rsp.PersonHikData
;
import
com.mortals.xhx.busiz.rsp.PersonHikData
;
import
com.mortals.xhx.feign.user.IUserFeign
;
import
com.mortals.xhx.module.dept.dao.ibatis.DeptDaoImpl
;
import
com.mortals.xhx.module.dept.dao.ibatis.DeptDaoImpl
;
import
com.mortals.xhx.module.dept.model.DeptEntity
;
import
com.mortals.xhx.module.dept.model.DeptEntity
;
import
com.mortals.xhx.module.staff.dao.ibatis.StaffDaoImpl
;
import
com.mortals.xhx.module.staff.dao.ibatis.StaffDaoImpl
;
...
@@ -30,12 +29,6 @@ import java.util.Objects;
...
@@ -30,12 +29,6 @@ import java.util.Objects;
@Service
(
"SyncUserTask"
)
@Service
(
"SyncUserTask"
)
public
class
SyncUserTaskImpl
implements
ITaskExcuteService
{
public
class
SyncUserTaskImpl
implements
ITaskExcuteService
{
@Autowired
private
UserService
userService
;
@Autowired
private
IUserFeign
userFeign
;
@Autowired
@Autowired
private
JsonUtils
jsonUtils
;
private
JsonUtils
jsonUtils
;
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/staff/model/StaffEntity.java
View file @
468eee28
...
@@ -483,6 +483,6 @@ public class StaffEntity extends StaffVo {
...
@@ -483,6 +483,6 @@ public class StaffEntity extends StaffVo {
this
.
remarkId
=
""
;
this
.
remarkId
=
""
;
this
.
source
=
1
;
this
.
source
=
2
;
}
}
}
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/module/staff/service/impl/StaffRegularServiceImpl.java
View file @
468eee28
package
com.mortals.xhx.module.staff.service.impl
;
package
com.mortals.xhx.module.staff.service.impl
;
import
com.mortals.xhx.module.staff.model.StaffEntity
;
import
com.mortals.xhx.module.staff.service.StaffService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.exception.AppException
;
...
@@ -6,6 +9,9 @@ import com.mortals.framework.model.Context;
...
@@ -6,6 +9,9 @@ import com.mortals.framework.model.Context;
import
com.mortals.xhx.module.staff.dao.StaffRegularDao
;
import
com.mortals.xhx.module.staff.dao.StaffRegularDao
;
import
com.mortals.xhx.module.staff.model.StaffRegularEntity
;
import
com.mortals.xhx.module.staff.model.StaffRegularEntity
;
import
com.mortals.xhx.module.staff.service.StaffRegularService
;
import
com.mortals.xhx.module.staff.service.StaffRegularService
;
import
java.util.List
;
/**
/**
* StaffRegularService
* StaffRegularService
* 员工转正信息 service实现
* 员工转正信息 service实现
...
@@ -15,5 +21,17 @@ import com.mortals.xhx.module.staff.service.StaffRegularService;
...
@@ -15,5 +21,17 @@ import com.mortals.xhx.module.staff.service.StaffRegularService;
*/
*/
@Service
(
"staffRegularService"
)
@Service
(
"staffRegularService"
)
public
class
StaffRegularServiceImpl
extends
AbstractCRUDServiceImpl
<
StaffRegularDao
,
StaffRegularEntity
,
Long
>
implements
StaffRegularService
{
public
class
StaffRegularServiceImpl
extends
AbstractCRUDServiceImpl
<
StaffRegularDao
,
StaffRegularEntity
,
Long
>
implements
StaffRegularService
{
@Autowired
private
StaffService
staffService
;
private
void
test
(){
StaffEntity
cache
=
staffService
.
getCache
(
"1"
);
List
<
StaffEntity
>
cacheList
=
staffService
.
getCacheList
();
StaffEntity
work001
=
staffService
.
getExtCache
(
"work001"
);
}
}
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/module/staff/service/impl/StaffServiceImpl.java
View file @
468eee28
package
com.mortals.xhx.module.staff.service.impl
;
package
com.mortals.xhx.module.staff.service.impl
;
import
com.mortals.framework.service.impl.AbstractCRUDCacheServiceImpl
;
import
com.mortals.framework.service.impl.AbstractCRUDCacheServiceImpl
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
...
@@ -8,19 +7,21 @@ import com.mortals.framework.model.Context;
...
@@ -8,19 +7,21 @@ import com.mortals.framework.model.Context;
import
com.mortals.xhx.module.staff.dao.StaffDao
;
import
com.mortals.xhx.module.staff.dao.StaffDao
;
import
com.mortals.xhx.module.staff.model.StaffEntity
;
import
com.mortals.xhx.module.staff.model.StaffEntity
;
import
com.mortals.xhx.module.staff.service.StaffService
;
import
com.mortals.xhx.module.staff.service.StaffService
;
/**
/**
* StaffService
* StaffService
* 员工基本信息 service实现
* 员工基本信息 service实现
*
*
* @author zxfei
* @author zxfei
* @date 2023-04-07
* @date 2023-04-07
*/
*/
@Service
(
"staffService"
)
@Service
(
"staffService"
)
public
class
StaffServiceImpl
extends
AbstractCRUDCacheServiceImpl
<
StaffDao
,
StaffEntity
,
Long
>
implements
StaffService
{
public
class
StaffServiceImpl
extends
AbstractCRUDCacheServiceImpl
<
StaffDao
,
StaffEntity
,
Long
>
implements
StaffService
{
@Override
@Override
protected
String
getExtKey
(
StaffEntity
data
)
{
protected
String
getExtKey
(
StaffEntity
data
)
{
//工号作为redis 扩展key
//工号作为redis 扩展key
return
data
.
getWorkNum
();
return
data
.
getWorkNum
();
}
}
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/staff/web/StaffController.java
View file @
468eee28
...
@@ -6,6 +6,7 @@ import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
...
@@ -6,6 +6,7 @@ import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.module.staff.model.StaffEntity
;
import
com.mortals.xhx.module.staff.model.StaffEntity
;
import
com.mortals.xhx.module.staff.model.vo.HolidayListVo
;
import
com.mortals.xhx.module.staff.model.vo.HolidayListVo
;
import
com.mortals.xhx.module.staff.model.vo.StaffVo
;
import
com.mortals.xhx.module.staff.service.StaffService
;
import
com.mortals.xhx.module.staff.service.StaffService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
@@ -50,6 +51,12 @@ public class StaffController extends BaseCRUDJsonBodyMappingController<StaffServ
...
@@ -50,6 +51,12 @@ public class StaffController extends BaseCRUDJsonBodyMappingController<StaffServ
@Override
@Override
protected
int
doListAfter
(
StaffEntity
query
,
Map
<
String
,
Object
>
model
,
Context
context
)
throws
AppException
{
protected
int
doListAfter
(
StaffEntity
query
,
Map
<
String
,
Object
>
model
,
Context
context
)
throws
AppException
{
//
model
.
put
(
"stat"
,
new
StaffVo
());
return
super
.
doListAfter
(
query
,
model
,
context
);
return
super
.
doListAfter
(
query
,
model
,
context
);
}
}
...
@@ -82,4 +89,6 @@ public class StaffController extends BaseCRUDJsonBodyMappingController<StaffServ
...
@@ -82,4 +89,6 @@ public class StaffController extends BaseCRUDJsonBodyMappingController<StaffServ
return
super
.
infoAfter
(
id
,
model
,
entity
,
context
);
return
super
.
infoAfter
(
id
,
model
,
entity
,
context
);
}
}
}
}
\ No newline at end of file
attendance-performance-manager/src/main/resources/sqlmap/base/system/menu.xml
View file @
468eee28
This diff is collapsed.
Click to expand it.
common-lib/src/main/java/com/mortals/xhx/feign/user/IUserFeign.java
View file @
468eee28
...
@@ -18,7 +18,7 @@ import java.util.List;
...
@@ -18,7 +18,7 @@ import java.util.List;
* @author zxfei
* @author zxfei
* @date 2022-07-06
* @date 2022-07-06
*/
*/
@FeignClient
(
name
=
"portal-manager"
,
path
=
"/zwfw"
,
fallbackFactory
=
UserFeignFallbackFactory
.
class
)
//
@FeignClient(name = "portal-manager", path = "/zwfw", fallbackFactory = UserFeignFallbackFactory.class)
public
interface
IUserFeign
extends
IFeign
{
public
interface
IUserFeign
extends
IFeign
{
...
...
db/base.sql
View file @
468eee28
...
@@ -29,6 +29,7 @@ CREATE TABLE `mortals_xhx_menu` (
...
@@ -29,6 +29,7 @@ CREATE TABLE `mortals_xhx_menu` (
`name`
varchar
(
50
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
DEFAULT
NULL
COMMENT
'菜单名称'
,
`name`
varchar
(
50
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
DEFAULT
NULL
COMMENT
'菜单名称'
,
`url`
varchar
(
256
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
DEFAULT
NULL
COMMENT
'连接地址'
,
`url`
varchar
(
256
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
DEFAULT
NULL
COMMENT
'连接地址'
,
`parentId`
bigint
(
20
)
NULL
DEFAULT
NULL
COMMENT
'父菜单ID,一级菜单的该字段值为-1'
,
`parentId`
bigint
(
20
)
NULL
DEFAULT
NULL
COMMENT
'父菜单ID,一级菜单的该字段值为-1'
,
`ancestors`
varchar
(
255
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
DEFAULT
''
,
`orderId`
int
(
11
)
NULL
DEFAULT
NULL
COMMENT
'排序编号'
,
`orderId`
int
(
11
)
NULL
DEFAULT
NULL
COMMENT
'排序编号'
,
`status`
tinyint
(
2
)
NULL
DEFAULT
1
COMMENT
'菜单状态,0:禁用,1:启用,默认1'
,
`status`
tinyint
(
2
)
NULL
DEFAULT
1
COMMENT
'菜单状态,0:禁用,1:启用,默认1'
,
`linkType`
tinyint
(
2
)
NULL
DEFAULT
0
COMMENT
'链接方式,0:普通,1:弹出,2:脚本(JavaScript),默认0'
,
`linkType`
tinyint
(
2
)
NULL
DEFAULT
0
COMMENT
'链接方式,0:普通,1:弹出,2:脚本(JavaScript),默认0'
,
...
...
Write
Preview
Markdown
is supported
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