Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
1f754ad7
Commit
1f754ad7
authored
Jan 04, 2022
by
tianbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
隐患bug修改
parent
2e7d6192
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
13 deletions
+25
-13
PermissionInterceptor.java
...s/boot/biz/common/interceptors/PermissionInterceptor.java
+1
-1
LatentDangerServiceImpl.java
...patrol/business/service/impl/LatentDangerServiceImpl.java
+10
-2
LatentDangerMapper.xml
...atrol/src/main/resources/db/mapper/LatentDangerMapper.xml
+14
-10
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/interceptors/PermissionInterceptor.java
View file @
1f754ad7
...
@@ -63,7 +63,7 @@ public class PermissionInterceptor implements Interceptor {
...
@@ -63,7 +63,7 @@ public class PermissionInterceptor implements Interceptor {
MetaObject
metaObject
=
SystemMetaObject
.
forObject
(
statementHandler
);
MetaObject
metaObject
=
SystemMetaObject
.
forObject
(
statementHandler
);
MappedStatement
mappedStatement
=
(
MappedStatement
)
metaObject
.
getValue
(
"delegate.mappedStatement"
);
MappedStatement
mappedStatement
=
(
MappedStatement
)
metaObject
.
getValue
(
"delegate.mappedStatement"
);
//
TODO
处理mybatis plus
// 处理mybatis plus
String
dataAuthRule
=
PermissionInterceptorContext
.
getDataAuthRule
();
String
dataAuthRule
=
PermissionInterceptorContext
.
getDataAuthRule
();
// 被拦截方法
// 被拦截方法
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/LatentDangerServiceImpl.java
View file @
1f754ad7
...
@@ -575,7 +575,10 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
...
@@ -575,7 +575,10 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
Date
endDate
=
new
Date
();
Date
endDate
=
new
Date
();
logger
.
info
(
"-------------------------工作流列表时间"
+
(
endDate
.
getTime
()
-
startDate
.
getTime
()));
logger
.
info
(
"-------------------------工作流列表时间"
+
(
endDate
.
getTime
()
-
startDate
.
getTime
()));
JSONArray
taskJsonList
=
respBody
.
getJSONArray
(
"data"
);
JSONArray
taskJsonList
=
respBody
.
getJSONArray
(
"data"
);
List
<
JSONObject
>
taskList
=
JSONObject
.
parseArray
(
taskJsonList
.
toJSONString
(),
JSONObject
.
class
);
List
<
JSONObject
>
taskList
=
Lists
.
newArrayList
();
if
(!
ValidationUtil
.
isEmpty
(
taskJsonList
))
{
taskList
=
JSONObject
.
parseArray
(
taskJsonList
.
toJSONString
(),
JSONObject
.
class
);
}
List
<
String
>
bussinessKeys
=
new
ArrayList
<>();
List
<
String
>
bussinessKeys
=
new
ArrayList
<>();
for
(
JSONObject
json
:
taskList
)
{
for
(
JSONObject
json
:
taskList
)
{
bussinessKeys
.
add
(
json
.
getString
(
"businessKey"
));
bussinessKeys
.
add
(
json
.
getString
(
"businessKey"
));
...
@@ -610,7 +613,12 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
...
@@ -610,7 +613,12 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
List
<
AgencyUserModel
>
users
=
remoteSecurityService
.
listUserByUserIds
(
toke
,
product
,
appKey
,
userIdsStr
);
List
<
AgencyUserModel
>
users
=
remoteSecurityService
.
listUserByUserIds
(
toke
,
product
,
appKey
,
userIdsStr
);
Map
<
String
,
AgencyUserModel
>
userMap
=
Maps
.
uniqueIndex
(
users
,
AgencyUserModel:
:
getUserId
);
Map
<
String
,
AgencyUserModel
>
userMap
=
Maps
.
uniqueIndex
(
users
,
AgencyUserModel:
:
getUserId
);
for
(
LatentDangerBo
bo
:
dangerList
)
{
for
(
LatentDangerBo
bo
:
dangerList
)
{
JSONObject
task
=
taskList
.
stream
().
filter
(
t
->
t
.
getString
(
"businessKey"
).
equals
(
bo
.
getBusinessKey
())).
collect
(
Collectors
.
toList
()).
get
(
0
);
List
<
JSONObject
>
filterTaskList
=
taskList
.
stream
().
filter
(
t
->
t
.
getString
(
"businessKey"
).
equals
(
bo
.
getBusinessKey
())).
collect
(
Collectors
.
toList
());
if
(
ValidationUtil
.
isEmpty
(
filterTaskList
))
{
continue
;
}
JSONObject
task
=
filterTaskList
.
get
(
0
);
LatentDangerListVo
vo
=
new
LatentDangerListVo
();
LatentDangerListVo
vo
=
new
LatentDangerListVo
();
vo
.
setTaskId
(
task
.
getString
(
"id"
));
vo
.
setTaskId
(
task
.
getString
(
"id"
));
vo
.
setDangerId
(
bo
.
getId
());
vo
.
setDangerId
(
bo
.
getId
());
...
...
amos-boot-system-patrol/src/main/resources/db/mapper/LatentDangerMapper.xml
View file @
1f754ad7
...
@@ -871,11 +871,13 @@
...
@@ -871,11 +871,13 @@
*
*
FROM
FROM
p_latent_danger pld
p_latent_danger pld
WHERE
WHERE 1=1
pld.business_key IN
<if
test=
"businessKeys != null and businessKeys.size > 0"
>
<foreach
collection =
"businessKeys"
item =
"businessKey"
index=
"index"
open =
"("
close =
")"
separator =
","
>
and pld.business_key IN
#{businessKey}
<foreach
collection =
"businessKeys"
item =
"businessKey"
index=
"index"
open =
"("
close =
")"
separator =
","
>
</foreach>
#{businessKey}
</foreach>
</if>
<if
test=
"latentDangerListParam.dangerLevel != null and latentDangerListParam.dangerLevel != -1"
>
<if
test=
"latentDangerListParam.dangerLevel != null and latentDangerListParam.dangerLevel != -1"
>
and pld.danger_level=#{latentDangerListParam.dangerLevel}
and pld.danger_level=#{latentDangerListParam.dangerLevel}
</if>
</if>
...
@@ -902,11 +904,13 @@
...
@@ -902,11 +904,13 @@
count(*)
count(*)
FROM
FROM
p_latent_danger pld
p_latent_danger pld
WHERE
WHERE 1=1
pld.business_key IN
<if
test=
"businessKeys != null and businessKeys.size > 0"
>
<foreach
collection =
"businessKeys"
item =
"businessKey"
index=
"index"
open =
"("
close =
")"
separator =
","
>
and pld.business_key IN
#{businessKey}
<foreach
collection =
"businessKeys"
item =
"businessKey"
index=
"index"
open =
"("
close =
")"
separator =
","
>
</foreach>
#{businessKey}
</foreach>
</if>
<if
test=
"latentDangerListParam.dangerLevel != null and latentDangerListParam.dangerLevel != -1"
>
<if
test=
"latentDangerListParam.dangerLevel != null and latentDangerListParam.dangerLevel != -1"
>
and pld.danger_level=#{latentDangerListParam.dangerLevel}
and pld.danger_level=#{latentDangerListParam.dangerLevel}
</if>
</if>
...
...
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