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
1d309092
Commit
1d309092
authored
May 21, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
每天早上定时添加考勤记录
parent
b57975e5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
attendance-performance-manager/src/main/java/com/mortals/xhx/common/utils/ControllerScanUtil.java
...java/com/mortals/xhx/common/utils/ControllerScanUtil.java
+5
-6
No files found.
attendance-performance-manager/src/main/java/com/mortals/xhx/common/utils/ControllerScanUtil.java
View file @
1d309092
package
com.mortals.xhx.common.utils
;
package
com.mortals.xhx.common.utils
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.core.util.StrUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.mortals.framework.annotation.UnAuth
;
import
com.mortals.framework.annotation.UnAuth
;
import
com.mortals.xhx.base.system.resource.model.ResourceEntity
;
import
com.mortals.xhx.base.system.resource.model.ResourceEntity
;
...
@@ -41,9 +42,7 @@ public class ControllerScanUtil {
...
@@ -41,9 +42,7 @@ public class ControllerScanUtil {
}
}
public
static
List
<
ResourceEntity
>
getAnnotationInfo
(
List
<
Class
<?>>
clsList
)
{
public
static
List
<
ResourceEntity
>
getAnnotationInfo
(
List
<
Class
<?>>
clsList
)
{
List
<
ResourceEntity
>
resourceArrayList
=
new
ArrayList
<>();
List
<
ResourceEntity
>
resourceArrayList
=
new
ArrayList
<>();
if
(
clsList
!=
null
&&
clsList
.
size
()
>
0
)
{
if
(
clsList
!=
null
&&
clsList
.
size
()
>
0
)
{
for
(
Class
<?>
cls
:
clsList
)
{
for
(
Class
<?>
cls
:
clsList
)
{
...
@@ -61,7 +60,6 @@ public class ControllerScanUtil {
...
@@ -61,7 +60,6 @@ public class ControllerScanUtil {
Method
substringMethod
=
null
;
Method
substringMethod
=
null
;
String
result
=
""
;
String
result
=
""
;
try
{
try
{
String
packName
=
cls
.
getPackage
().
getName
();
String
packName
=
cls
.
getPackage
().
getName
();
if
(
StrUtil
.
contains
(
packName
,
"system"
))
{
if
(
StrUtil
.
contains
(
packName
,
"system"
))
{
//系统管理-xx管理-
//系统管理-xx管理-
...
@@ -111,10 +109,11 @@ public class ControllerScanUtil {
...
@@ -111,10 +109,11 @@ public class ControllerScanUtil {
if
(
unAuth
)
{
if
(
unAuth
)
{
//判断下 是否含有list 如果不包含 则返回
//判断下 是否含有list 如果不包含 则返回
boolean
mExits2
=
method
.
isAnnotationPresent
(
PostMapping
.
class
);
boolean
mExits2
=
method
.
isAnnotationPresent
(
PostMapping
.
class
);
log
.
info
(
"mExits2 :{}"
,
mExits2
);
if
(
mExits2
)
{
if
(
mExits2
)
{
PostMapping
postMapping
=
method
.
getAnnotation
(
PostMapping
.
class
);
PostMapping
postMapping
=
method
.
getAnnotation
(
PostMapping
.
class
);
String
s
=
postMapping
.
value
()[
0
];
String
s
=
postMapping
.
value
()[
0
];
log
.
info
(
"unauth path :{}"
,
s
);
log
.
info
(
"unauth path :{}"
,
JSON
.
toJSONString
(
postMapping
)
);
if
(!
"list"
.
equalsIgnoreCase
(
s
)){
if
(!
"list"
.
equalsIgnoreCase
(
s
)){
continue
;
continue
;
}
}
...
@@ -202,11 +201,11 @@ public class ControllerScanUtil {
...
@@ -202,11 +201,11 @@ public class ControllerScanUtil {
}
}
}
}
resourceViewEntity
.
setUrl
(
UrlViewSet
.
stream
().
collect
(
Collectors
.
joining
(
","
)));
resourceViewEntity
.
setUrl
(
UrlViewSet
.
stream
().
collect
(
Collectors
.
joining
(
","
)));
System
.
out
.
println
(
JSONObject
.
toJSONString
(
resourceViewEntity
));
log
.
info
(
JSONObject
.
toJSONString
(
resourceViewEntity
));
resourceArrayList
.
add
(
resourceViewEntity
);
resourceArrayList
.
add
(
resourceViewEntity
);
resourceEditEntity
.
setUrl
(
UrlEditSet
.
stream
().
collect
(
Collectors
.
joining
(
","
)));
resourceEditEntity
.
setUrl
(
UrlEditSet
.
stream
().
collect
(
Collectors
.
joining
(
","
)));
System
.
out
.
println
(
JSONObject
.
toJSONString
(
resourceEditEntity
));
log
.
info
(
JSONObject
.
toJSONString
(
resourceEditEntity
));
resourceArrayList
.
add
(
resourceEditEntity
);
resourceArrayList
.
add
(
resourceEditEntity
);
}
}
...
...
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