Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
谢明辉
/
fanxing3
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 594d01e3
authored
Dec 01, 2021
by
xmh
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
<refactor> 检索数据时日志不带条件
1 parent
a498f998
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
11 deletions
fanxing-query/src/main/java/com/viontech/fanxing/query/controller/web/BehaviorController.java
fanxing-query/src/main/java/com/viontech/fanxing/query/controller/web/FlowEventController.java
fanxing-query/src/main/java/com/viontech/fanxing/query/controller/web/TrafficController.java
fanxing-query/src/main/java/com/viontech/fanxing/query/controller/web/BehaviorController.java
View file @
594d01e
...
...
@@ -50,9 +50,7 @@ public class BehaviorController extends BehaviorBaseController {
@RequestParam
(
defaultValue
=
"event_time"
)
String
sortName
,
@RequestParam
(
defaultValue
=
"desc"
)
String
sortOrder
)
{
Assert
.
notNull
(
behaviorVo
.
getEventTime_gte
(),
"起始时间不能为空"
);
Assert
.
notNull
(
behaviorVo
.
getEventTime_lte
(),
"结束时间不能为空"
);
SimplePropertyPreFilter
simplePropertyPreFilter
=
new
SimplePropertyPreFilter
();
simplePropertyPreFilter
.
getExcludes
().
add
(
"model"
);
opsClientService
.
addLog
(
"事件数据检索,条件:"
+
JSON
.
toJSONString
(
behaviorVo
,
SerializeConfig
.
globalInstance
,
new
SerializeFilter
[]{
simplePropertyPreFilter
},
"yyyy-MM-dd HH:mm:ss"
,
JSON
.
DEFAULT_GENERATE_FEATURE
));
opsClientService
.
addLog
(
"事件数据检索"
);
BaseExample
baseExample
=
getExample
(
behaviorVo
,
EXAMPLE_TYPE_PAGE
);
if
(
isNotNull
(
sortOrder
)
&&
isNotNull
(
sortName
))
{
...
...
fanxing-query/src/main/java/com/viontech/fanxing/query/controller/web/FlowEventController.java
View file @
594d01e
...
...
@@ -68,9 +68,7 @@ public class FlowEventController extends FlowEventBaseController {
Assert
.
notNull
(
trafficFlowRequestVo
.
getEvent_dt__gte
(),
"起始时间不能为空"
);
Assert
.
notNull
(
trafficFlowRequestVo
.
getEvent_dt__lt
(),
"结束时间不能为空"
);
Assert
.
hasLength
(
trafficFlowRequestVo
.
getStatistic_type
(),
"统计方式不能为空"
);
SimplePropertyPreFilter
simplePropertyPreFilter
=
new
SimplePropertyPreFilter
();
simplePropertyPreFilter
.
getExcludes
().
add
(
"model"
);
opsClientService
.
addLog
(
"流量数据检索,条件:"
+
JSON
.
toJSONString
(
trafficFlowRequestVo
,
SerializeConfig
.
globalInstance
,
new
SerializeFilter
[]{
simplePropertyPreFilter
},
"yyyy-MM-dd HH:mm:ss"
,
JSON
.
DEFAULT_GENERATE_FEATURE
));
opsClientService
.
addLog
(
"流量数据检索"
);
Map
<
String
,
Object
>
result
=
statisticsResult
(
trafficFlowRequestVo
);
return
JsonMessageUtil
.
getSuccessJsonMsg
(
result
);
...
...
fanxing-query/src/main/java/com/viontech/fanxing/query/controller/web/TrafficController.java
View file @
594d01e
...
...
@@ -64,15 +64,11 @@ public class TrafficController extends TrafficBaseController {
}
else
{
throw
new
FanXingException
(
"参数有误"
);
}
opsClientService
.
addLog
(
dataType
+
"数据检索"
);
if
(
StringUtils
.
isEmpty
(
trafficVo
.
getEventCate
()))
{
trafficVo
.
setEventCate
(
"traffic"
);
}
SimplePropertyPreFilter
simplePropertyPreFilter
=
new
SimplePropertyPreFilter
();
simplePropertyPreFilter
.
getExcludes
().
add
(
"model"
);
opsClientService
.
addLog
(
dataType
+
"数据检索,条件:"
+
JSON
.
toJSONString
(
trafficVo
,
SerializeConfig
.
globalInstance
,
new
SerializeFilter
[]{
simplePropertyPreFilter
},
"yyyy-MM-dd HH:mm:ss"
,
JSON
.
DEFAULT_GENERATE_FEATURE
));
BaseExample
baseExample
=
getExample
(
trafficVo
,
EXAMPLE_TYPE_PAGE
);
if
(
isNotNull
(
sortOrder
)
&&
isNotNull
(
sortName
))
{
baseExample
.
setOrderByClause
(
baseExample
.
getTableAlias
()
+
"."
+
sortName
+
" "
+
sortOrder
);
...
...
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