Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
李苗
/
Vion-DevOps
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 8f122681
authored
Dec 05, 2024
by
HlQ
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[fix] 查询异常指标的 mall 列表 bug 修复
1 parent
259dc872
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
12 deletions
src/main/java/vion/service/impl/monitor/MallServiceImpl.java
src/main/java/vion/service/impl/monitor/MallServiceImpl.java
View file @
8f12268
...
...
@@ -105,8 +105,7 @@ public class MallServiceImpl extends MPJBaseServiceImpl<MallMapper, Mall> implem
var
eventRecWrapper
=
Wrappers
.<
EventRecord
>
query
()
.
select
(
"DISTINCT on (mall_uid,event_type) *"
)
.
in
(
"mall_uid"
,
mallUidList
)
.
ge
(
"create_time"
,
LocalDateTime
.
of
(
LocalDate
.
now
(),
LocalTime
.
MIN
))
.
orderByDesc
(
"mall_uid"
,
"event_type"
,
"create_time"
);
.
ge
(
"create_time"
,
LocalDateTime
.
of
(
LocalDate
.
now
(),
LocalTime
.
MIN
));
var
eventRecordList
=
eventRecordService
.
list
(
eventRecWrapper
);
var
mallUid2RecMap
=
eventRecordList
.
stream
().
collect
(
Collectors
.
groupingBy
(
EventRecord:
:
getMallUid
));
...
...
@@ -152,8 +151,7 @@ public class MallServiceImpl extends MPJBaseServiceImpl<MallMapper, Mall> implem
var
eventRecWrapper
=
Wrappers
.<
EventRecord
>
query
()
.
select
(
"DISTINCT on (mall_uid,event_type) *"
)
.
in
(
"mall_uid"
,
tmpMallUidList
)
.
ge
(
"create_time"
,
LocalDateTime
.
of
(
LocalDate
.
now
(),
LocalTime
.
MIN
))
.
orderByDesc
(
"mall_uid"
,
"event_type"
,
"create_time"
);
.
ge
(
"create_time"
,
LocalDateTime
.
of
(
LocalDate
.
now
(),
LocalTime
.
MIN
));
var
eventRecordList
=
eventRecordService
.
list
(
eventRecWrapper
);
var
mallUid2RecMap
=
eventRecordList
.
stream
().
collect
(
Collectors
.
groupingBy
(
EventRecord:
:
getMallUid
));
...
...
@@ -179,14 +177,15 @@ public class MallServiceImpl extends MPJBaseServiceImpl<MallMapper, Mall> implem
@Override
public
Page
<
MallVO
>
listErrorAttention
(
MallDTO
dto
)
{
var
eventRecWrapper
=
Wrappers
.<
EventRecord
>
query
()
.
select
(
"DISTINCT on (mall_uid,event_type) *"
)
.
ge
(
"create_time"
,
LocalDateTime
.
of
(
LocalDate
.
now
(),
LocalTime
.
MIN
))
.
eq
(
"agent_type"
,
dto
.
getAgentType
())
.
eq
(
"status"
,
0
)
.
in
(
CollUtil
.
isNotEmpty
(
dto
.
getEventUidList
()),
"event_uid"
,
dto
.
getEventUidList
())
.
orderByDesc
(
"mall_uid"
,
"event_type"
,
"create_time"
);
var
eventRecordList
=
eventRecordService
.
list
(
eventRecWrapper
);
var
eventRecWrapper
=
new
MPJLambdaWrapper
<>(
EventRecord
.
class
)
.
selectAll
()
.
from
(
from
->
from
.
select
(
"DISTINCT on (mall_uid,event_type) *"
)
.
ge
(
EventRecord:
:
getCreateTime
,
LocalDateTime
.
of
(
LocalDate
.
now
(),
LocalTime
.
MIN
))
.
eq
(
EventRecord:
:
getAgentType
,
dto
.
getAgentType
())
.
in
(
CollUtil
.
isNotEmpty
(
dto
.
getEventUidList
()),
EventRecord:
:
getEventUid
,
dto
.
getEventUidList
())
.
orderByAsc
(
EventRecord:
:
getMallUid
))
.
eq
(
EventRecord:
:
getStatus
,
0
);
var
eventRecordList
=
eventRecordService
.
selectJoinList
(
EventRecord
.
class
,
eventRecWrapper
);
var
mallUidList
=
eventRecordList
.
stream
().
map
(
EventRecord:
:
getMallUid
).
toList
();
if
(
CollUtil
.
isEmpty
(
mallUidList
))
{
return
new
Page
<>();
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment