Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
5a2c0822
Commit
5a2c0822
authored
Jul 17, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
5c039192
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
17 deletions
+19
-17
brg-queue-center/app/base/service/impl/utilsSve/utilsLogsSve.js
+19
-17
No files found.
brg-queue-center/app/base/service/impl/utilsSve/utilsLogsSve.js
View file @
5a2c0822
...
@@ -63,51 +63,52 @@ class UtilsLogsService extends AppServiceBase {
...
@@ -63,51 +63,52 @@ class UtilsLogsService extends AppServiceBase {
]
]
}
}
if
(
actionBody
.
opTitle
)
{
if
(
actionBody
.
opTitle
)
{
// params.query.bool.must.push({
// "query_string": {
// "default_field": "opTitle",
// "query": '\"' + actionBody.opTitle + '\"'
// }
// });
params
.
query
.
bool
.
must
.
push
({
params
.
query
.
bool
.
must
.
push
({
"query_string"
:
{
"wildcard"
:
{
"default_field"
:
"opTitle"
,
"opTitle"
:
"*"
+
actionBody
.
opTitle
+
"*"
"query"
:
'
\
"'
+
actionBody
.
opTitle
+
'
\
"'
}
}
});
});
}
}
if
(
actionBody
.
identifyCode
)
{
if
(
actionBody
.
identifyCode
)
{
params
.
query
.
bool
.
must
.
push
({
params
.
query
.
bool
.
must
.
push
({
"query_string"
:
{
"wildcard"
:
{
"default_field"
:
"identifyCode"
,
"identifyCode"
:
"*"
+
actionBody
.
identifyCode
+
"*"
"query"
:
'
\
"'
+
actionBody
.
identifyCode
+
'
\
"'
}
}
});
});
}
}
if
(
actionBody
.
messageBody
)
{
if
(
actionBody
.
messageBody
)
{
params
.
query
.
bool
.
must
.
push
({
params
.
query
.
bool
.
must
.
push
({
"query_string"
:
{
"wildcard"
:
{
"default_field"
:
"messageBody"
,
"messageBody"
:
"*"
+
actionBody
.
messageBody
+
"*"
"query"
:
'
\
"'
+
actionBody
.
messageBody
+
'
\
"'
}
}
});
});
}
}
if
(
actionBody
.
errorInfo
)
{
if
(
actionBody
.
errorInfo
)
{
params
.
query
.
bool
.
must
.
push
({
params
.
query
.
bool
.
must
.
push
({
"query_string"
:
{
"wildcard"
:
{
"default_field"
:
"errorInfo"
,
"errorInfo"
:
"*"
+
actionBody
.
errorInfo
+
"*"
"query"
:
'
\
"'
+
actionBody
.
errorInfo
+
'
\
"'
}
}
});
});
}
}
if
(
actionBody
.
requestId
)
{
if
(
actionBody
.
requestId
)
{
params
.
query
.
bool
.
must
.
push
({
params
.
query
.
bool
.
must
.
push
({
"query_string"
:
{
"wildcard"
:
{
"default_field"
:
"requestId"
,
"requestId"
:
"*"
+
actionBody
.
requestId
+
"*"
"query"
:
'
\
"'
+
actionBody
.
requestId
+
'
\
"'
}
}
});
});
}
}
var
resultData
=
null
;
var
resultData
=
null
;
try
{
try
{
resultData
=
await
this
.
esUtils
.
execPostEs
(
settings
.
queuedName
,
params
,
esIndexName
);
resultData
=
await
this
.
esUtils
.
execPostEs
(
settings
.
queuedName
,
params
,
esIndexName
);
var
sources
=
[];
var
sources
=
[];
var
data
=
{
var
data
=
{
"totalCount"
:
resultData
.
data
&&
resultData
.
data
.
hits
?
resultData
.
data
.
hits
.
total
:
0
,
"totalCount"
:
0
,
"pageSize"
:
pageSize
,
"pageSize"
:
pageSize
,
"currentPage"
:
from
===
0
?
from
:
(
from
-
1
),
"currentPage"
:
from
===
0
?
from
:
(
from
-
1
),
"list"
:
sources
"list"
:
sources
...
@@ -121,6 +122,7 @@ class UtilsLogsService extends AppServiceBase {
...
@@ -121,6 +122,7 @@ class UtilsLogsService extends AppServiceBase {
if
(
!
resultData
.
data
.
hits
.
hits
||
resultData
.
data
.
hits
.
hits
.
length
===
0
)
{
if
(
!
resultData
.
data
.
hits
.
hits
||
resultData
.
data
.
hits
.
hits
.
length
===
0
)
{
return
system
.
getResult
(
null
,
"data is empty!"
);
return
system
.
getResult
(
null
,
"data is empty!"
);
}
}
data
.
totalCount
=
typeof
resultData
.
data
.
hits
.
total
===
"object"
?
resultData
.
data
.
hits
.
total
.
value
:
resultData
.
data
.
hits
.
total
;
resultData
.
data
.
hits
.
hits
.
forEach
(
function
(
c
)
{
resultData
.
data
.
hits
.
hits
.
forEach
(
function
(
c
)
{
var
source
=
{
var
source
=
{
"opTitle"
:
c
.
_source
.
opTitle
,
"opTitle"
:
c
.
_source
.
opTitle
,
...
...
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