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 3370b9ba
authored
Jul 16, 2021
by
xmh
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1
1 parent
5adeb0ca
Hide whitespace changes
Inline
Side-by-side
Showing
103 changed files
with
5845 additions
and
5056 deletions
fanxing-commons/pom.xml
fanxing-commons/src/main/java/com/viontech/fanxing/commons/config/ApplicationContextProvider.java
fanxing-commons/src/main/java/com/viontech/fanxing/commons/constant/RedisKeys.java
fanxing-commons/src/main/java/com/viontech/fanxing/commons/model/FlowData.java
fanxing-commons/src/main/java/com/viontech/fanxing/commons/model/FlowDataExample.java
fanxing-commons/src/main/java/com/viontech/fanxing/commons/model/FlowEvent.java
fanxing-commons/src/main/java/com/viontech/fanxing/commons/model/FlowEventExample.java
fanxing-commons/src/main/java/com/viontech/fanxing/commons/model/Traffic.java
fanxing-commons/src/main/java/com/viontech/fanxing/commons/model/TrafficExample.java
fanxing-commons/src/main/java/com/viontech/fanxing/commons/model/TrafficFace.java
fanxing-commons/src/main/java/com/viontech/fanxing/commons/model/TrafficFaceExample.java
fanxing-commons/src/main/java/com/viontech/fanxing/commons/vo/TrafficFaceVo.java
fanxing-commons/src/main/java/com/viontech/fanxing/commons/vobase/FlowDataVoBase.java
fanxing-commons/src/main/java/com/viontech/fanxing/commons/vobase/FlowEventVoBase.java
fanxing-commons/src/main/java/com/viontech/fanxing/commons/vobase/TrafficFaceVoBase.java
fanxing-commons/src/main/java/com/viontech/fanxing/commons/vobase/TrafficVoBase.java
fanxing-forward/pom.xml
fanxing-forward/src/main/java/com/viontech/fanxing/forward/ForwardApp.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/batch/configuration/BehaviorJobConfiguration.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/batch/configuration/ForwardJobConfiguration.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/batch/configuration/TrafficFlowJobConfiguration.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/batch/configuration/TrafficJobConfiguration.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/batch/dao/VionMapExecutionContextDao.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/batch/dao/VionMapJobExecutionDao.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/batch/dao/VionMapJobInstanceDao.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/batch/dao/VionMapJobRepositoryFactoryBean.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/batch/dao/VionMapStepExecutionDao.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/batch/listener/ExecutionContextClearListener.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/batch/listener/JobRestartListener.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/batch/listener/WorkQueueClearChunkListener.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/batch/processor/BehaviorProcessor.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/batch/processor/CompositeItemStreamProcessor.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/batch/processor/ForwardProcessor.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/batch/processor/TrafficFlowProcessor.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/batch/processor/TrafficProcessor.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/batch/reader/ConcurrencyReader.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/batch/reader/RedisHashDataReader.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/batch/reader/RedisPopReader.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/batch/writer/BehaviorWriter.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/batch/writer/ForwardWriter.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/batch/writer/TrafficFlowWriter.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/batch/writer/TrafficWriter.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/config/BatchConfiguration.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/controller/DataReceiveController.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/controller/base/BehaviorBaseController.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/controller/base/FlowDataBaseController.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/controller/base/FlowEventBaseController.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/controller/base/TrafficBaseController.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/controller/web/BehaviorController.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/controller/web/FlowDataController.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/controller/web/FlowEventController.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/controller/web/TrafficController.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/feign/OpsFeignClient.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/feign/TaskManagerFeignClient.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/mapper/BehaviorMapper.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/mapper/FlowDataMapper.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/mapper/FlowEventMapper.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/mapper/TrafficMapper.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/mapping/BehaviorMapper.xml
fanxing-forward/src/main/java/com/viontech/fanxing/forward/mapping/FlowDataMapper.xml
fanxing-forward/src/main/java/com/viontech/fanxing/forward/mapping/TrafficMapper.xml
fanxing-forward/src/main/java/com/viontech/fanxing/forward/model/ForwardContent.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/model/TrafficContent.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/model/TrafficFlowContent.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/runner/JobStartRunner.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/service/adapter/BehaviorService.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/service/adapter/FlowDataService.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/service/adapter/FlowEventService.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/service/adapter/TrafficService.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/service/impl/FlowDataServiceImpl.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/service/impl/FlowEventServiceImpl.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/service/impl/TrafficServiceImpl.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/util/CacheUtils.java
fanxing-forward/src/main/resources/application.yml
fanxing-forward/src/test/java/com/viontech/fanxing/forward/Test0.java
fanxing-ops/src/main/java/com/viontech/fanxing/ops/OpsApp.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/controller/base/ForwardBaseController.java → fanxing-ops/src/main/java/com/viontech/fanxing/ops/controller/base/ForwardBaseController.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/controller/base/ForwardConfigBaseController.java → fanxing-ops/src/main/java/com/viontech/fanxing/ops/controller/base/ForwardConfigBaseController.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/controller/web/ForwardConfigController.java → fanxing-ops/src/main/java/com/viontech/fanxing/ops/controller/web/ForwardConfigController.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/controller/web/ForwardController.java → fanxing-ops/src/main/java/com/viontech/fanxing/ops/controller/web/ForwardController.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/mapper/ForwardConfigMapper.java → fanxing-ops/src/main/java/com/viontech/fanxing/ops/mapper/ForwardConfigMapper.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/mapper/ForwardMapper.java → fanxing-ops/src/main/java/com/viontech/fanxing/ops/mapper/ForwardMapper.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/mapping/ForwardConfigMapper.xml → fanxing-ops/src/main/java/com/viontech/fanxing/ops/mapping/ForwardConfigMapper.xml
fanxing-forward/src/main/java/com/viontech/fanxing/forward/mapping/ForwardMapper.xml → fanxing-ops/src/main/java/com/viontech/fanxing/ops/mapping/ForwardMapper.xml
fanxing-forward/src/main/java/com/viontech/fanxing/forward/service/adapter/ForwardConfigService.java → fanxing-ops/src/main/java/com/viontech/fanxing/ops/service/adapter/ForwardConfigService.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/service/adapter/ForwardService.java → fanxing-ops/src/main/java/com/viontech/fanxing/ops/service/adapter/ForwardService.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/service/impl/ForwardConfigServiceImpl.java → fanxing-ops/src/main/java/com/viontech/fanxing/ops/service/impl/ForwardConfigServiceImpl.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/service/impl/ForwardServiceImpl.java → fanxing-ops/src/main/java/com/viontech/fanxing/ops/service/impl/ForwardServiceImpl.java
fanxing-query/src/main/java/com/viontech/fanxing/query/controller/base/FlowDataBaseController.java
fanxing-query/src/main/java/com/viontech/fanxing/query/controller/base/FlowEventBaseController.java
fanxing-query/src/main/java/com/viontech/fanxing/query/controller/base/TrafficBaseController.java
fanxing-query/src/main/java/com/viontech/fanxing/query/controller/base/TrafficFaceBaseController.java
fanxing-query/src/main/java/com/viontech/fanxing/query/controller/web/TrafficFaceController.java
fanxing-query/src/main/java/com/viontech/fanxing/query/mapper/TrafficFaceMapper.java
fanxing-query/src/main/java/com/viontech/fanxing/query/mapping/FlowDataMapper.xml
fanxing-query/src/main/java/com/viontech/fanxing/query/mapping/FlowEventMapper.xml
fanxing-forward/src/main/java/com/viontech/fanxing/forward/mapping/FlowEventMapper.xml → fanxing-query/src/main/java/com/viontech/fanxing/query/mapping/TrafficFaceMapper.xml
fanxing-query/src/main/java/com/viontech/fanxing/query/mapping/TrafficMapper.xml
fanxing-query/src/main/java/com/viontech/fanxing/query/service/adapter/TrafficFaceService.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/service/impl/BehaviorServiceImpl.java → fanxing-query/src/main/java/com/viontech/fanxing/query/service/impl/TrafficFaceServiceImpl.java
fanxing-task-scheduling/src/main/java/com/viontech/fanxing/task/scheduling/model/vaserver/VaServerInfo.java
fanxing-task-scheduling/src/main/java/com/viontech/fanxing/task/scheduling/runner/TaskRunner.java
fanxing-task-scheduling/src/main/java/com/viontech/fanxing/task/scheduling/service/VAServerService.java
fanxing-commons/pom.xml
View file @
3370b9b
...
@@ -56,6 +56,10 @@
...
@@ -56,6 +56,10 @@
<artifactId>
spring-cloud-starter-openfeign
</artifactId>
<artifactId>
spring-cloud-starter-openfeign
</artifactId>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-test
</artifactId>
</dependency>
<dependency>
<groupId>
com.viontech.keliu
</groupId>
<groupId>
com.viontech.keliu
</groupId>
<artifactId>
keliu-util
</artifactId>
<artifactId>
keliu-util
</artifactId>
<version>
6.0.10-SNAPSHOT
</version>
<version>
6.0.10-SNAPSHOT
</version>
...
...
fanxing-commons/src/main/java/com/viontech/fanxing/commons/config/ApplicationContextProvider.java
0 → 100644
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
commons
.
config
;
import
org.springframework.beans.BeansException
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.context.ApplicationContextAware
;
import
org.springframework.stereotype.Component
;
/**
* 不通过注入的方式取得bean
*
* @author 谢明辉
* @date 2019-5-20
*/
@Component
public
class
ApplicationContextProvider
implements
ApplicationContextAware
{
private
static
ApplicationContext
applicationContext
;
@Override
public
void
setApplicationContext
(
ApplicationContext
applicationContext
)
throws
BeansException
{
ApplicationContextProvider
.
applicationContext
=
applicationContext
;
}
/**
* 获取applicationContext
*/
public
static
ApplicationContext
getApplicationContext
()
{
return
applicationContext
;
}
/**
* 通过name获取 Bean.
*
* @param name
*/
public
static
Object
getBean
(
String
name
)
{
return
getApplicationContext
().
getBean
(
name
);
}
/**
* 通过class获取Bean.
*
* @param clazz
* @param <T>
*/
public
static
<
T
>
T
getBean
(
Class
<
T
>
clazz
)
{
return
getApplicationContext
().
getBean
(
clazz
);
}
/**
* 通过name,以及Clazz返回指定的Bean
*
* @param name
* @param clazz
* @param <T>
*/
public
static
<
T
>
T
getBean
(
String
name
,
Class
<
T
>
clazz
)
{
return
getApplicationContext
().
getBean
(
name
,
clazz
);
}
}
fanxing-commons/src/main/java/com/viontech/fanxing/commons/constant/RedisKeys.java
View file @
3370b9b
...
@@ -15,6 +15,12 @@ public class RedisKeys {
...
@@ -15,6 +15,12 @@ public class RedisKeys {
public
static
final
String
SCHEDULING_VASERVER_MAP
=
"scheduling:vaServerMap"
;
public
static
final
String
SCHEDULING_VASERVER_MAP
=
"scheduling:vaServerMap"
;
public
static
final
String
SCHEDULING_TASK_VASERVER_MAP
=
"scheduling:taskVAServerMap"
;
public
static
final
String
SCHEDULING_TASK_VASERVER_MAP
=
"scheduling:taskVAServerMap"
;
public
static
final
String
FORWARD_TRAFFIC_QUEUE
=
"forward:trafficQueue"
;
public
static
final
String
FORWARD_FLOW_QUEUE
=
"forward:flowQueue"
;
public
static
final
String
FORWARD_BEHAVIOR_QUEUE
=
"forward:behaviorQueue"
;
public
static
final
String
FORWARD_FORWARD_QUEUE
=
"forward:forwardQueue"
;
public
static
String
getVAServerKeepAliveKey
(
String
devId
)
{
public
static
String
getVAServerKeepAliveKey
(
String
devId
)
{
return
devId
==
null
?
"scheduling:keepalive"
:
"scheduling:keepalive"
+
":"
+
devId
;
return
devId
==
null
?
"scheduling:keepalive"
:
"scheduling:keepalive"
+
":"
+
devId
;
}
}
...
...
fanxing-commons/src/main/java/com/viontech/fanxing/commons/model/FlowData.java
View file @
3370b9b
...
@@ -8,7 +8,7 @@ public class FlowData extends BaseModel {
...
@@ -8,7 +8,7 @@ public class FlowData extends BaseModel {
private
String
unid
;
private
String
unid
;
private
String
e
ventId
;
private
Long
flowE
ventId
;
private
Long
taskId
;
private
Long
taskId
;
...
@@ -72,12 +72,12 @@ public class FlowData extends BaseModel {
...
@@ -72,12 +72,12 @@ public class FlowData extends BaseModel {
this
.
unid
=
unid
==
null
?
null
:
unid
.
trim
();
this
.
unid
=
unid
==
null
?
null
:
unid
.
trim
();
}
}
public
String
get
EventId
()
{
public
Long
getFlow
EventId
()
{
return
e
ventId
;
return
flowE
ventId
;
}
}
public
void
set
EventId
(
String
e
ventId
)
{
public
void
set
FlowEventId
(
Long
flowE
ventId
)
{
this
.
eventId
=
eventId
==
null
?
null
:
eventId
.
trim
()
;
this
.
flowEventId
=
flowEventId
;
}
}
public
Long
getTaskId
()
{
public
Long
getTaskId
()
{
...
...
fanxing-commons/src/main/java/com/viontech/fanxing/commons/model/FlowDataExample.java
View file @
3370b9b
...
@@ -219,73 +219,63 @@ public class FlowDataExample extends BaseExample {
...
@@ -219,73 +219,63 @@ public class FlowDataExample extends BaseExample {
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andEventIdIsNull
()
{
public
Criteria
and
Flow
EventIdIsNull
()
{
addCriterion
(
"`flowData`.event_id is null"
);
addCriterion
(
"`flowData`.
flow_
event_id is null"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andEventIdIsNotNull
()
{
public
Criteria
and
Flow
EventIdIsNotNull
()
{
addCriterion
(
"`flowData`.event_id is not null"
);
addCriterion
(
"`flowData`.
flow_
event_id is not null"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
EventIdEqualTo
(
Stri
ng
value
)
{
public
Criteria
and
FlowEventIdEqualTo
(
Lo
ng
value
)
{
addCriterion
(
"`flowData`.
event_id ="
,
value
,
"e
ventId"
);
addCriterion
(
"`flowData`.
flow_event_id ="
,
value
,
"flowE
ventId"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
EventIdNotEqualTo
(
Stri
ng
value
)
{
public
Criteria
and
FlowEventIdNotEqualTo
(
Lo
ng
value
)
{
addCriterion
(
"`flowData`.
event_id <>"
,
value
,
"e
ventId"
);
addCriterion
(
"`flowData`.
flow_event_id <>"
,
value
,
"flowE
ventId"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
EventIdGreaterThan
(
Stri
ng
value
)
{
public
Criteria
and
FlowEventIdGreaterThan
(
Lo
ng
value
)
{
addCriterion
(
"`flowData`.
event_id >"
,
value
,
"e
ventId"
);
addCriterion
(
"`flowData`.
flow_event_id >"
,
value
,
"flowE
ventId"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
EventIdGreaterThanOrEqualTo
(
Stri
ng
value
)
{
public
Criteria
and
FlowEventIdGreaterThanOrEqualTo
(
Lo
ng
value
)
{
addCriterion
(
"`flowData`.
event_id >="
,
value
,
"e
ventId"
);
addCriterion
(
"`flowData`.
flow_event_id >="
,
value
,
"flowE
ventId"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
EventIdLessThan
(
Stri
ng
value
)
{
public
Criteria
and
FlowEventIdLessThan
(
Lo
ng
value
)
{
addCriterion
(
"`flowData`.
event_id <"
,
value
,
"e
ventId"
);
addCriterion
(
"`flowData`.
flow_event_id <"
,
value
,
"flowE
ventId"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
EventIdLessThanOrEqualTo
(
Stri
ng
value
)
{
public
Criteria
and
FlowEventIdLessThanOrEqualTo
(
Lo
ng
value
)
{
addCriterion
(
"`flowData`.
event_id <="
,
value
,
"e
ventId"
);
addCriterion
(
"`flowData`.
flow_event_id <="
,
value
,
"flowE
ventId"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
EventIdLike
(
String
value
)
{
public
Criteria
and
FlowEventIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"`flowData`.
event_id like"
,
value
,
"e
ventId"
);
addCriterion
(
"`flowData`.
flow_event_id in"
,
values
,
"flowE
ventId"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
EventIdNotLike
(
String
value
)
{
public
Criteria
and
FlowEventIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"`flowData`.
event_id not like"
,
value
,
"e
ventId"
);
addCriterion
(
"`flowData`.
flow_event_id not in"
,
values
,
"flowE
ventId"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
EventIdIn
(
List
<
String
>
values
)
{
public
Criteria
and
FlowEventIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"`flowData`.
event_id in"
,
values
,
"e
ventId"
);
addCriterion
(
"`flowData`.
flow_event_id between"
,
value1
,
value2
,
"flowE
ventId"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andEventIdNotIn
(
List
<
String
>
values
)
{
public
Criteria
andFlowEventIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"`flowData`.event_id not in"
,
values
,
"eventId"
);
addCriterion
(
"`flowData`.flow_event_id not between"
,
value1
,
value2
,
"flowEventId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEventIdBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"`flowData`.event_id between"
,
value1
,
value2
,
"eventId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEventIdNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"`flowData`.event_id not between"
,
value1
,
value2
,
"eventId"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
...
@@ -1626,8 +1616,8 @@ public class FlowDataExample extends BaseExample {
...
@@ -1626,8 +1616,8 @@ public class FlowDataExample extends BaseExample {
return
(
ColumnContainer
)
this
;
return
(
ColumnContainer
)
this
;
}
}
public
ColumnContainer
hasEventIdColumn
()
{
public
ColumnContainer
has
Flow
EventIdColumn
()
{
addColumnStr
(
"`flowData`.
event_id as flowData
_event_id "
);
addColumnStr
(
"`flowData`.
flow_event_id as flowData_flow
_event_id "
);
return
(
ColumnContainer
)
this
;
return
(
ColumnContainer
)
this
;
}
}
...
...
fanxing-commons/src/main/java/com/viontech/fanxing/commons/model/FlowEvent.java
View file @
3370b9b
...
@@ -14,6 +14,8 @@ public class FlowEvent extends BaseModel {
...
@@ -14,6 +14,8 @@ public class FlowEvent extends BaseModel {
private
Date
eventTime
;
private
Date
eventTime
;
private
String
eventId
;
private
String
deviceCode
;
private
String
deviceCode
;
private
String
deviceName
;
private
String
deviceName
;
...
@@ -68,6 +70,14 @@ public class FlowEvent extends BaseModel {
...
@@ -68,6 +70,14 @@ public class FlowEvent extends BaseModel {
this
.
eventTime
=
eventTime
;
this
.
eventTime
=
eventTime
;
}
}
public
String
getEventId
()
{
return
eventId
;
}
public
void
setEventId
(
String
eventId
)
{
this
.
eventId
=
eventId
==
null
?
null
:
eventId
.
trim
();
}
public
String
getDeviceCode
()
{
public
String
getDeviceCode
()
{
return
deviceCode
;
return
deviceCode
;
}
}
...
...
fanxing-commons/src/main/java/com/viontech/fanxing/commons/model/FlowEventExample.java
View file @
3370b9b
...
@@ -409,6 +409,76 @@ public class FlowEventExample extends BaseExample {
...
@@ -409,6 +409,76 @@ public class FlowEventExample extends BaseExample {
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andEventIdIsNull
()
{
addCriterion
(
"`flowEvent`.event_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEventIdIsNotNull
()
{
addCriterion
(
"`flowEvent`.event_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEventIdEqualTo
(
String
value
)
{
addCriterion
(
"`flowEvent`.event_id ="
,
value
,
"eventId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEventIdNotEqualTo
(
String
value
)
{
addCriterion
(
"`flowEvent`.event_id <>"
,
value
,
"eventId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEventIdGreaterThan
(
String
value
)
{
addCriterion
(
"`flowEvent`.event_id >"
,
value
,
"eventId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEventIdGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"`flowEvent`.event_id >="
,
value
,
"eventId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEventIdLessThan
(
String
value
)
{
addCriterion
(
"`flowEvent`.event_id <"
,
value
,
"eventId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEventIdLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"`flowEvent`.event_id <="
,
value
,
"eventId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEventIdLike
(
String
value
)
{
addCriterion
(
"`flowEvent`.event_id like"
,
value
,
"eventId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEventIdNotLike
(
String
value
)
{
addCriterion
(
"`flowEvent`.event_id not like"
,
value
,
"eventId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEventIdIn
(
List
<
String
>
values
)
{
addCriterion
(
"`flowEvent`.event_id in"
,
values
,
"eventId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEventIdNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"`flowEvent`.event_id not in"
,
values
,
"eventId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEventIdBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"`flowEvent`.event_id between"
,
value1
,
value2
,
"eventId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEventIdNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"`flowEvent`.event_id not between"
,
value1
,
value2
,
"eventId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDeviceCodeIsNull
()
{
public
Criteria
andDeviceCodeIsNull
()
{
addCriterion
(
"`flowEvent`.device_code is null"
);
addCriterion
(
"`flowEvent`.device_code is null"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
...
@@ -861,6 +931,11 @@ public class FlowEventExample extends BaseExample {
...
@@ -861,6 +931,11 @@ public class FlowEventExample extends BaseExample {
return
(
ColumnContainer
)
this
;
return
(
ColumnContainer
)
this
;
}
}
public
ColumnContainer
hasEventIdColumn
()
{
addColumnStr
(
"`flowEvent`.event_id as flowEvent_event_id "
);
return
(
ColumnContainer
)
this
;
}
public
ColumnContainer
hasDeviceCodeColumn
()
{
public
ColumnContainer
hasDeviceCodeColumn
()
{
addColumnStr
(
"`flowEvent`.device_code as flowEvent_device_code "
);
addColumnStr
(
"`flowEvent`.device_code as flowEvent_device_code "
);
return
(
ColumnContainer
)
this
;
return
(
ColumnContainer
)
this
;
...
...
fanxing-commons/src/main/java/com/viontech/fanxing/commons/model/Traffic.java
View file @
3370b9b
...
@@ -14,7 +14,7 @@ public class Traffic extends BaseModel {
...
@@ -14,7 +14,7 @@ public class Traffic extends BaseModel {
private
String
eventType
;
private
String
eventType
;
private
Date
event
Time
;
private
Date
event
Dt
;
private
String
channelUnid
;
private
String
channelUnid
;
...
@@ -24,34 +24,34 @@ public class Traffic extends BaseModel {
...
@@ -24,34 +24,34 @@ public class Traffic extends BaseModel {
private
String
locationCode
;
private
String
locationCode
;
private
String
locationName
;
private
String
laneCode
;
private
String
laneCode
;
private
String
directionCode
;
private
String
directionCode
;
private
String
vehicleType
;
private
String
vehicleType
;
private
String
illegalCode
;
private
Integer
illegalState
;
private
String
vehicleColor
;
private
String
vehicleColor
;
private
String
vehicleLogo
;
private
String
vehicleLogo
;
private
String
annualInspectionMark
;
private
String
illegalCode
;
private
String
pendant
;
private
Integer
illegalState
;
private
S
tring
decoration
;
private
S
hort
featureAnnualInspectionMark
;
private
String
sunShield
;
private
Short
featurePendant
;
private
Short
featureDecoration
;
private
Short
featureSunShield
;
private
String
xcycleType
;
private
String
xcycleType
;
private
String
eventId
;
private
String
eventId
;
private
Date
shootTime
;
private
String
specialType
;
private
String
specialType
;
private
Integer
withHelmet
;
private
Integer
withHelmet
;
...
@@ -104,12 +104,12 @@ public class Traffic extends BaseModel {
...
@@ -104,12 +104,12 @@ public class Traffic extends BaseModel {
this
.
eventType
=
eventType
==
null
?
null
:
eventType
.
trim
();
this
.
eventType
=
eventType
==
null
?
null
:
eventType
.
trim
();
}
}
public
Date
getEvent
Time
()
{
public
Date
getEvent
Dt
()
{
return
event
Time
;
return
event
Dt
;
}
}
public
void
setEvent
Time
(
Date
eventTime
)
{
public
void
setEvent
Dt
(
Date
eventDt
)
{
this
.
event
Time
=
eventTime
;
this
.
event
Dt
=
eventDt
;
}
}
public
String
getChannelUnid
()
{
public
String
getChannelUnid
()
{
...
@@ -144,6 +144,14 @@ public class Traffic extends BaseModel {
...
@@ -144,6 +144,14 @@ public class Traffic extends BaseModel {
this
.
locationCode
=
locationCode
==
null
?
null
:
locationCode
.
trim
();
this
.
locationCode
=
locationCode
==
null
?
null
:
locationCode
.
trim
();
}
}
public
String
getLocationName
()
{
return
locationName
;
}
public
void
setLocationName
(
String
locationName
)
{
this
.
locationName
=
locationName
==
null
?
null
:
locationName
.
trim
();
}
public
String
getLaneCode
()
{
public
String
getLaneCode
()
{
return
laneCode
;
return
laneCode
;
}
}
...
@@ -168,22 +176,6 @@ public class Traffic extends BaseModel {
...
@@ -168,22 +176,6 @@ public class Traffic extends BaseModel {
this
.
vehicleType
=
vehicleType
==
null
?
null
:
vehicleType
.
trim
();
this
.
vehicleType
=
vehicleType
==
null
?
null
:
vehicleType
.
trim
();
}
}
public
String
getIllegalCode
()
{
return
illegalCode
;
}
public
void
setIllegalCode
(
String
illegalCode
)
{
this
.
illegalCode
=
illegalCode
==
null
?
null
:
illegalCode
.
trim
();
}
public
Integer
getIllegalState
()
{
return
illegalState
;
}
public
void
setIllegalState
(
Integer
illegalState
)
{
this
.
illegalState
=
illegalState
;
}
public
String
getVehicleColor
()
{
public
String
getVehicleColor
()
{
return
vehicleColor
;
return
vehicleColor
;
}
}
...
@@ -200,36 +192,52 @@ public class Traffic extends BaseModel {
...
@@ -200,36 +192,52 @@ public class Traffic extends BaseModel {
this
.
vehicleLogo
=
vehicleLogo
==
null
?
null
:
vehicleLogo
.
trim
();
this
.
vehicleLogo
=
vehicleLogo
==
null
?
null
:
vehicleLogo
.
trim
();
}
}
public
String
get
AnnualInspectionMark
()
{
public
String
get
IllegalCode
()
{
return
annualInspectionMark
;
return
illegalCode
;
}
}
public
void
set
AnnualInspectionMark
(
String
annualInspectionMark
)
{
public
void
set
IllegalCode
(
String
illegalCode
)
{
this
.
annualInspectionMark
=
annualInspectionMark
==
null
?
null
:
annualInspectionMark
.
trim
();
this
.
illegalCode
=
illegalCode
==
null
?
null
:
illegalCode
.
trim
();
}
}
public
String
getPendant
()
{
public
Integer
getIllegalState
()
{
return
pendant
;
return
illegalState
;
}
}
public
void
set
Pendant
(
String
pendant
)
{
public
void
set
IllegalState
(
Integer
illegalState
)
{
this
.
pendant
=
pendant
==
null
?
null
:
pendant
.
trim
()
;
this
.
illegalState
=
illegalState
;
}
}
public
S
tring
getDecoration
()
{
public
S
hort
getFeatureAnnualInspectionMark
()
{
return
decoration
;
return
featureAnnualInspectionMark
;
}
}
public
void
set
Decoration
(
String
decoration
)
{
public
void
set
FeatureAnnualInspectionMark
(
Short
featureAnnualInspectionMark
)
{
this
.
decoration
=
decoration
==
null
?
null
:
decoration
.
trim
()
;
this
.
featureAnnualInspectionMark
=
featureAnnualInspectionMark
;
}
}
public
S
tring
getSunShield
()
{
public
S
hort
getFeaturePendant
()
{
return
sunShield
;
return
featurePendant
;
}
}
public
void
setSunShield
(
String
sunShield
)
{
public
void
setFeaturePendant
(
Short
featurePendant
)
{
this
.
sunShield
=
sunShield
==
null
?
null
:
sunShield
.
trim
();
this
.
featurePendant
=
featurePendant
;
}
public
Short
getFeatureDecoration
()
{
return
featureDecoration
;
}
public
void
setFeatureDecoration
(
Short
featureDecoration
)
{
this
.
featureDecoration
=
featureDecoration
;
}
public
Short
getFeatureSunShield
()
{
return
featureSunShield
;
}
public
void
setFeatureSunShield
(
Short
featureSunShield
)
{
this
.
featureSunShield
=
featureSunShield
;
}
}
public
String
getXcycleType
()
{
public
String
getXcycleType
()
{
...
@@ -248,14 +256,6 @@ public class Traffic extends BaseModel {
...
@@ -248,14 +256,6 @@ public class Traffic extends BaseModel {
this
.
eventId
=
eventId
==
null
?
null
:
eventId
.
trim
();
this
.
eventId
=
eventId
==
null
?
null
:
eventId
.
trim
();
}
}
public
Date
getShootTime
()
{
return
shootTime
;
}
public
void
setShootTime
(
Date
shootTime
)
{
this
.
shootTime
=
shootTime
;
}
public
String
getSpecialType
()
{
public
String
getSpecialType
()
{
return
specialType
;
return
specialType
;
}
}
...
...
fanxing-commons/src/main/java/com/viontech/fanxing/commons/model/TrafficExample.java
View file @
3370b9b
...
@@ -419,63 +419,63 @@ public class TrafficExample extends BaseExample {
...
@@ -419,63 +419,63 @@ public class TrafficExample extends BaseExample {
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andEvent
Time
IsNull
()
{
public
Criteria
andEvent
Dt
IsNull
()
{
addCriterion
(
"`traffic`.event_
time
is null"
);
addCriterion
(
"`traffic`.event_
dt
is null"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andEvent
Time
IsNotNull
()
{
public
Criteria
andEvent
Dt
IsNotNull
()
{
addCriterion
(
"`traffic`.event_
time
is not null"
);
addCriterion
(
"`traffic`.event_
dt
is not null"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andEvent
Time
EqualTo
(
Date
value
)
{
public
Criteria
andEvent
Dt
EqualTo
(
Date
value
)
{
addCriterion
(
"`traffic`.event_
time ="
,
value
,
"eventTime
"
);
addCriterion
(
"`traffic`.event_
dt ="
,
value
,
"eventDt
"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andEvent
Time
NotEqualTo
(
Date
value
)
{
public
Criteria
andEvent
Dt
NotEqualTo
(
Date
value
)
{
addCriterion
(
"`traffic`.event_
time <>"
,
value
,
"eventTime
"
);
addCriterion
(
"`traffic`.event_
dt <>"
,
value
,
"eventDt
"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andEvent
Time
GreaterThan
(
Date
value
)
{
public
Criteria
andEvent
Dt
GreaterThan
(
Date
value
)
{
addCriterion
(
"`traffic`.event_
time >"
,
value
,
"eventTime
"
);
addCriterion
(
"`traffic`.event_
dt >"
,
value
,
"eventDt
"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andEvent
Time
GreaterThanOrEqualTo
(
Date
value
)
{
public
Criteria
andEvent
Dt
GreaterThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"`traffic`.event_
time >="
,
value
,
"eventTime
"
);
addCriterion
(
"`traffic`.event_
dt >="
,
value
,
"eventDt
"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andEvent
Time
LessThan
(
Date
value
)
{
public
Criteria
andEvent
Dt
LessThan
(
Date
value
)
{
addCriterion
(
"`traffic`.event_
time <"
,
value
,
"eventTime
"
);
addCriterion
(
"`traffic`.event_
dt <"
,
value
,
"eventDt
"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andEvent
Time
LessThanOrEqualTo
(
Date
value
)
{
public
Criteria
andEvent
Dt
LessThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"`traffic`.event_
time <="
,
value
,
"eventTime
"
);
addCriterion
(
"`traffic`.event_
dt <="
,
value
,
"eventDt
"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andEvent
Time
In
(
List
<
Date
>
values
)
{
public
Criteria
andEvent
Dt
In
(
List
<
Date
>
values
)
{
addCriterion
(
"`traffic`.event_
time in"
,
values
,
"eventTime
"
);
addCriterion
(
"`traffic`.event_
dt in"
,
values
,
"eventDt
"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andEvent
Time
NotIn
(
List
<
Date
>
values
)
{
public
Criteria
andEvent
Dt
NotIn
(
List
<
Date
>
values
)
{
addCriterion
(
"`traffic`.event_
time not in"
,
values
,
"eventTime
"
);
addCriterion
(
"`traffic`.event_
dt not in"
,
values
,
"eventDt
"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andEvent
Time
Between
(
Date
value1
,
Date
value2
)
{
public
Criteria
andEvent
Dt
Between
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"`traffic`.event_
time between"
,
value1
,
value2
,
"eventTime
"
);
addCriterion
(
"`traffic`.event_
dt between"
,
value1
,
value2
,
"eventDt
"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andEvent
Time
NotBetween
(
Date
value1
,
Date
value2
)
{
public
Criteria
andEvent
Dt
NotBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"`traffic`.event_
time not between"
,
value1
,
value2
,
"eventTime
"
);
addCriterion
(
"`traffic`.event_
dt not between"
,
value1
,
value2
,
"eventDt
"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
...
@@ -759,6 +759,76 @@ public class TrafficExample extends BaseExample {
...
@@ -759,6 +759,76 @@ public class TrafficExample extends BaseExample {
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andLocationNameIsNull
()
{
addCriterion
(
"`traffic`.location_name is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andLocationNameIsNotNull
()
{
addCriterion
(
"`traffic`.location_name is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andLocationNameEqualTo
(
String
value
)
{
addCriterion
(
"`traffic`.location_name ="
,
value
,
"locationName"
);
return
(
Criteria
)
this
;
}
public
Criteria
andLocationNameNotEqualTo
(
String
value
)
{
addCriterion
(
"`traffic`.location_name <>"
,
value
,
"locationName"
);
return
(
Criteria
)
this
;
}
public
Criteria
andLocationNameGreaterThan
(
String
value
)
{
addCriterion
(
"`traffic`.location_name >"
,
value
,
"locationName"
);
return
(
Criteria
)
this
;
}
public
Criteria
andLocationNameGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"`traffic`.location_name >="
,
value
,
"locationName"
);
return
(
Criteria
)
this
;
}
public
Criteria
andLocationNameLessThan
(
String
value
)
{
addCriterion
(
"`traffic`.location_name <"
,
value
,
"locationName"
);
return
(
Criteria
)
this
;
}
public
Criteria
andLocationNameLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"`traffic`.location_name <="
,
value
,
"locationName"
);
return
(
Criteria
)
this
;
}
public
Criteria
andLocationNameLike
(
String
value
)
{
addCriterion
(
"`traffic`.location_name like"
,
value
,
"locationName"
);
return
(
Criteria
)
this
;
}
public
Criteria
andLocationNameNotLike
(
String
value
)
{
addCriterion
(
"`traffic`.location_name not like"
,
value
,
"locationName"
);
return
(
Criteria
)
this
;
}
public
Criteria
andLocationNameIn
(
List
<
String
>
values
)
{
addCriterion
(
"`traffic`.location_name in"
,
values
,
"locationName"
);
return
(
Criteria
)
this
;
}
public
Criteria
andLocationNameNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"`traffic`.location_name not in"
,
values
,
"locationName"
);
return
(
Criteria
)
this
;
}
public
Criteria
andLocationNameBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"`traffic`.location_name between"
,
value1
,
value2
,
"locationName"
);
return
(
Criteria
)
this
;
}
public
Criteria
andLocationNameNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"`traffic`.location_name not between"
,
value1
,
value2
,
"locationName"
);
return
(
Criteria
)
this
;
}
public
Criteria
andLaneCodeIsNull
()
{
public
Criteria
andLaneCodeIsNull
()
{
addCriterion
(
"`traffic`.lane_code is null"
);
addCriterion
(
"`traffic`.lane_code is null"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
...
@@ -969,136 +1039,6 @@ public class TrafficExample extends BaseExample {
...
@@ -969,136 +1039,6 @@ public class TrafficExample extends BaseExample {
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andIllegalCodeIsNull
()
{
addCriterion
(
"`traffic`.illegal_code is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIllegalCodeIsNotNull
()
{
addCriterion
(
"`traffic`.illegal_code is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIllegalCodeEqualTo
(
String
value
)
{
addCriterion
(
"`traffic`.illegal_code ="
,
value
,
"illegalCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIllegalCodeNotEqualTo
(
String
value
)
{
addCriterion
(
"`traffic`.illegal_code <>"
,
value
,
"illegalCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIllegalCodeGreaterThan
(
String
value
)
{
addCriterion
(
"`traffic`.illegal_code >"
,
value
,
"illegalCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIllegalCodeGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"`traffic`.illegal_code >="
,
value
,
"illegalCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIllegalCodeLessThan
(
String
value
)
{
addCriterion
(
"`traffic`.illegal_code <"
,
value
,
"illegalCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIllegalCodeLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"`traffic`.illegal_code <="
,
value
,
"illegalCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIllegalCodeLike
(
String
value
)
{
addCriterion
(
"`traffic`.illegal_code like"
,
value
,
"illegalCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIllegalCodeNotLike
(
String
value
)
{
addCriterion
(
"`traffic`.illegal_code not like"
,
value
,
"illegalCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIllegalCodeIn
(
List
<
String
>
values
)
{
addCriterion
(
"`traffic`.illegal_code in"
,
values
,
"illegalCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIllegalCodeNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"`traffic`.illegal_code not in"
,
values
,
"illegalCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIllegalCodeBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"`traffic`.illegal_code between"
,
value1
,
value2
,
"illegalCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIllegalCodeNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"`traffic`.illegal_code not between"
,
value1
,
value2
,
"illegalCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIllegalStateIsNull
()
{
addCriterion
(
"`traffic`.illegal_state is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIllegalStateIsNotNull
()
{
addCriterion
(
"`traffic`.illegal_state is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIllegalStateEqualTo
(
Integer
value
)
{
addCriterion
(
"`traffic`.illegal_state ="
,
value
,
"illegalState"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIllegalStateNotEqualTo
(
Integer
value
)
{
addCriterion
(
"`traffic`.illegal_state <>"
,
value
,
"illegalState"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIllegalStateGreaterThan
(
Integer
value
)
{
addCriterion
(
"`traffic`.illegal_state >"
,
value
,
"illegalState"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIllegalStateGreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"`traffic`.illegal_state >="
,
value
,
"illegalState"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIllegalStateLessThan
(
Integer
value
)
{
addCriterion
(
"`traffic`.illegal_state <"
,
value
,
"illegalState"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIllegalStateLessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"`traffic`.illegal_state <="
,
value
,
"illegalState"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIllegalStateIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"`traffic`.illegal_state in"
,
values
,
"illegalState"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIllegalStateNotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"`traffic`.illegal_state not in"
,
values
,
"illegalState"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIllegalStateBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"`traffic`.illegal_state between"
,
value1
,
value2
,
"illegalState"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIllegalStateNotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"`traffic`.illegal_state not between"
,
value1
,
value2
,
"illegalState"
);
return
(
Criteria
)
this
;
}
public
Criteria
andVehicleColorIsNull
()
{
public
Criteria
andVehicleColorIsNull
()
{
addCriterion
(
"`traffic`.vehicle_color is null"
);
addCriterion
(
"`traffic`.vehicle_color is null"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
...
@@ -1239,283 +1179,373 @@ public class TrafficExample extends BaseExample {
...
@@ -1239,283 +1179,373 @@ public class TrafficExample extends BaseExample {
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andAnnualInspectionMarkIsNull
()
{
public
Criteria
andIllegalCodeIsNull
()
{
addCriterion
(
"`traffic`.annual_inspection_mark is null"
);
addCriterion
(
"`traffic`.illegal_code is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIllegalCodeIsNotNull
()
{
addCriterion
(
"`traffic`.illegal_code is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIllegalCodeEqualTo
(
String
value
)
{
addCriterion
(
"`traffic`.illegal_code ="
,
value
,
"illegalCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIllegalCodeNotEqualTo
(
String
value
)
{
addCriterion
(
"`traffic`.illegal_code <>"
,
value
,
"illegalCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIllegalCodeGreaterThan
(
String
value
)
{
addCriterion
(
"`traffic`.illegal_code >"
,
value
,
"illegalCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIllegalCodeGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"`traffic`.illegal_code >="
,
value
,
"illegalCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIllegalCodeLessThan
(
String
value
)
{
addCriterion
(
"`traffic`.illegal_code <"
,
value
,
"illegalCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIllegalCodeLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"`traffic`.illegal_code <="
,
value
,
"illegalCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIllegalCodeLike
(
String
value
)
{
addCriterion
(
"`traffic`.illegal_code like"
,
value
,
"illegalCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIllegalCodeNotLike
(
String
value
)
{
addCriterion
(
"`traffic`.illegal_code not like"
,
value
,
"illegalCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIllegalCodeIn
(
List
<
String
>
values
)
{
addCriterion
(
"`traffic`.illegal_code in"
,
values
,
"illegalCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIllegalCodeNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"`traffic`.illegal_code not in"
,
values
,
"illegalCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIllegalCodeBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"`traffic`.illegal_code between"
,
value1
,
value2
,
"illegalCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIllegalCodeNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"`traffic`.illegal_code not between"
,
value1
,
value2
,
"illegalCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIllegalStateIsNull
()
{
addCriterion
(
"`traffic`.illegal_state is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIllegalStateIsNotNull
()
{
addCriterion
(
"`traffic`.illegal_state is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIllegalStateEqualTo
(
Integer
value
)
{
addCriterion
(
"`traffic`.illegal_state ="
,
value
,
"illegalState"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
AnnualInspectionMarkIsNotNull
(
)
{
public
Criteria
and
IllegalStateNotEqualTo
(
Integer
value
)
{
addCriterion
(
"`traffic`.
annual_inspection_mark is not null
"
);
addCriterion
(
"`traffic`.
illegal_state <>"
,
value
,
"illegalState
"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
AnnualInspectionMarkEqualTo
(
String
value
)
{
public
Criteria
and
IllegalStateGreaterThan
(
Integer
value
)
{
addCriterion
(
"`traffic`.
annual_inspection_mark ="
,
value
,
"annualInspectionMark
"
);
addCriterion
(
"`traffic`.
illegal_state >"
,
value
,
"illegalState
"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
AnnualInspectionMarkNotEqualTo
(
String
value
)
{
public
Criteria
and
IllegalStateGreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"`traffic`.
annual_inspection_mark <>"
,
value
,
"annualInspectionMark
"
);
addCriterion
(
"`traffic`.
illegal_state >="
,
value
,
"illegalState
"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
AnnualInspectionMarkGreaterThan
(
String
value
)
{
public
Criteria
and
IllegalStateLessThan
(
Integer
value
)
{
addCriterion
(
"`traffic`.
annual_inspection_mark >"
,
value
,
"annualInspectionMark
"
);
addCriterion
(
"`traffic`.
illegal_state <"
,
value
,
"illegalState
"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andAnnualInspectionMarkGreaterThanOrEqualTo
(
String
value
)
{
public
Criteria
andIllegalStateLessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"`traffic`.annual_inspection_mark >="
,
value
,
"annualInspectionMark"
);
addCriterion
(
"`traffic`.illegal_state <="
,
value
,
"illegalState"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIllegalStateIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"`traffic`.illegal_state in"
,
values
,
"illegalState"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIllegalStateNotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"`traffic`.illegal_state not in"
,
values
,
"illegalState"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
AnnualInspectionMarkLessThan
(
String
value
)
{
public
Criteria
and
IllegalStateBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"`traffic`.
annual_inspection_mark <"
,
value
,
"annualInspectionMark
"
);
addCriterion
(
"`traffic`.
illegal_state between"
,
value1
,
value2
,
"illegalState
"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
AnnualInspectionMarkLessThanOrEqualTo
(
String
value
)
{
public
Criteria
and
IllegalStateNotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"`traffic`.
annual_inspection_mark <="
,
value
,
"annualInspectionMark
"
);
addCriterion
(
"`traffic`.
illegal_state not between"
,
value1
,
value2
,
"illegalState
"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
AnnualInspectionMarkLike
(
String
value
)
{
public
Criteria
and
FeatureAnnualInspectionMarkIsNull
(
)
{
addCriterion
(
"`traffic`.
annual_inspection_mark like"
,
value
,
"annualInspectionMark
"
);
addCriterion
(
"`traffic`.
feature_annual_inspection_mark is null
"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
AnnualInspectionMarkNotLike
(
String
value
)
{
public
Criteria
and
FeatureAnnualInspectionMarkIsNotNull
(
)
{
addCriterion
(
"`traffic`.
annual_inspection_mark not like"
,
value
,
"annualInspectionMark
"
);
addCriterion
(
"`traffic`.
feature_annual_inspection_mark is not null
"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
AnnualInspectionMarkIn
(
List
<
String
>
values
)
{
public
Criteria
and
FeatureAnnualInspectionMarkEqualTo
(
Short
value
)
{
addCriterion
(
"`traffic`.
annual_inspection_mark in"
,
values
,
"a
nnualInspectionMark"
);
addCriterion
(
"`traffic`.
feature_annual_inspection_mark ="
,
value
,
"featureA
nnualInspectionMark"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
AnnualInspectionMarkNotIn
(
List
<
String
>
values
)
{
public
Criteria
and
FeatureAnnualInspectionMarkNotEqualTo
(
Short
value
)
{
addCriterion
(
"`traffic`.
annual_inspection_mark not in"
,
values
,
"a
nnualInspectionMark"
);
addCriterion
(
"`traffic`.
feature_annual_inspection_mark <>"
,
value
,
"featureA
nnualInspectionMark"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
AnnualInspectionMarkBetween
(
String
value1
,
String
value2
)
{
public
Criteria
and
FeatureAnnualInspectionMarkGreaterThan
(
Short
value
)
{
addCriterion
(
"`traffic`.
annual_inspection_mark between"
,
value1
,
value2
,
"a
nnualInspectionMark"
);
addCriterion
(
"`traffic`.
feature_annual_inspection_mark >"
,
value
,
"featureA
nnualInspectionMark"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
AnnualInspectionMarkNotBetween
(
String
value1
,
String
value2
)
{
public
Criteria
and
FeatureAnnualInspectionMarkGreaterThanOrEqualTo
(
Short
value
)
{
addCriterion
(
"`traffic`.
annual_inspection_mark not between"
,
value1
,
value2
,
"a
nnualInspectionMark"
);
addCriterion
(
"`traffic`.
feature_annual_inspection_mark >="
,
value
,
"featureA
nnualInspectionMark"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
PendantIsNull
(
)
{
public
Criteria
and
FeatureAnnualInspectionMarkLessThan
(
Short
value
)
{
addCriterion
(
"`traffic`.
pendant is null
"
);
addCriterion
(
"`traffic`.
feature_annual_inspection_mark <"
,
value
,
"featureAnnualInspectionMark
"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
PendantIsNotNull
(
)
{
public
Criteria
and
FeatureAnnualInspectionMarkLessThanOrEqualTo
(
Short
value
)
{
addCriterion
(
"`traffic`.
pendant is not null
"
);
addCriterion
(
"`traffic`.
feature_annual_inspection_mark <="
,
value
,
"featureAnnualInspectionMark
"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
PendantEqualTo
(
String
value
)
{
public
Criteria
and
FeatureAnnualInspectionMarkIn
(
List
<
Short
>
values
)
{
addCriterion
(
"`traffic`.
pendant ="
,
value
,
"pendant
"
);
addCriterion
(
"`traffic`.
feature_annual_inspection_mark in"
,
values
,
"featureAnnualInspectionMark
"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
PendantNotEqualTo
(
String
value
)
{
public
Criteria
and
FeatureAnnualInspectionMarkNotIn
(
List
<
Short
>
values
)
{
addCriterion
(
"`traffic`.
pendant <>"
,
value
,
"pendant
"
);
addCriterion
(
"`traffic`.
feature_annual_inspection_mark not in"
,
values
,
"featureAnnualInspectionMark
"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
PendantGreaterThan
(
String
value
)
{
public
Criteria
and
FeatureAnnualInspectionMarkBetween
(
Short
value1
,
Short
value2
)
{
addCriterion
(
"`traffic`.
pendant >"
,
value
,
"pendant
"
);
addCriterion
(
"`traffic`.
feature_annual_inspection_mark between"
,
value1
,
value2
,
"featureAnnualInspectionMark
"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
PendantGreaterThanOrEqualTo
(
String
value
)
{
public
Criteria
and
FeatureAnnualInspectionMarkNotBetween
(
Short
value1
,
Short
value2
)
{
addCriterion
(
"`traffic`.
pendant >="
,
value
,
"pendant
"
);
addCriterion
(
"`traffic`.
feature_annual_inspection_mark not between"
,
value1
,
value2
,
"featureAnnualInspectionMark
"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
PendantLessThan
(
String
value
)
{
public
Criteria
and
FeaturePendantIsNull
(
)
{
addCriterion
(
"`traffic`.
pendant <"
,
value
,
"pendant
"
);
addCriterion
(
"`traffic`.
feature_pendant is null
"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
PendantLessThanOrEqualTo
(
String
value
)
{
public
Criteria
and
FeaturePendantIsNotNull
(
)
{
addCriterion
(
"`traffic`.
pendant <="
,
value
,
"pendant
"
);
addCriterion
(
"`traffic`.
feature_pendant is not null
"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
PendantLike
(
String
value
)
{
public
Criteria
and
FeaturePendantEqualTo
(
Short
value
)
{
addCriterion
(
"`traffic`.
pendant like"
,
value
,
"p
endant"
);
addCriterion
(
"`traffic`.
feature_pendant ="
,
value
,
"featureP
endant"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
PendantNotLike
(
String
value
)
{
public
Criteria
and
FeaturePendantNotEqualTo
(
Short
value
)
{
addCriterion
(
"`traffic`.
pendant not like"
,
value
,
"p
endant"
);
addCriterion
(
"`traffic`.
feature_pendant <>"
,
value
,
"featureP
endant"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
PendantIn
(
List
<
String
>
values
)
{
public
Criteria
and
FeaturePendantGreaterThan
(
Short
value
)
{
addCriterion
(
"`traffic`.
pendant in"
,
values
,
"p
endant"
);
addCriterion
(
"`traffic`.
feature_pendant >"
,
value
,
"featureP
endant"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
PendantNotIn
(
List
<
String
>
values
)
{
public
Criteria
and
FeaturePendantGreaterThanOrEqualTo
(
Short
value
)
{
addCriterion
(
"`traffic`.
pendant not in"
,
values
,
"p
endant"
);
addCriterion
(
"`traffic`.
feature_pendant >="
,
value
,
"featureP
endant"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
PendantBetween
(
String
value1
,
String
value2
)
{
public
Criteria
and
FeaturePendantLessThan
(
Short
value
)
{
addCriterion
(
"`traffic`.
pendant between"
,
value1
,
value2
,
"p
endant"
);
addCriterion
(
"`traffic`.
feature_pendant <"
,
value
,
"featureP
endant"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
PendantNotBetween
(
String
value1
,
String
value2
)
{
public
Criteria
and
FeaturePendantLessThanOrEqualTo
(
Short
value
)
{
addCriterion
(
"`traffic`.
pendant not between"
,
value1
,
value2
,
"p
endant"
);
addCriterion
(
"`traffic`.
feature_pendant <="
,
value
,
"featureP
endant"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
DecorationIsNull
(
)
{
public
Criteria
and
FeaturePendantIn
(
List
<
Short
>
values
)
{
addCriterion
(
"`traffic`.
decoration is null
"
);
addCriterion
(
"`traffic`.
feature_pendant in"
,
values
,
"featurePendant
"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
DecorationIsNotNull
(
)
{
public
Criteria
and
FeaturePendantNotIn
(
List
<
Short
>
values
)
{
addCriterion
(
"`traffic`.
decoration is not null
"
);
addCriterion
(
"`traffic`.
feature_pendant not in"
,
values
,
"featurePendant
"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
DecorationEqualTo
(
String
value
)
{
public
Criteria
and
FeaturePendantBetween
(
Short
value1
,
Short
value2
)
{
addCriterion
(
"`traffic`.
decoration ="
,
value
,
"decoration
"
);
addCriterion
(
"`traffic`.
feature_pendant between"
,
value1
,
value2
,
"featurePendant
"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
DecorationNotEqualTo
(
String
value
)
{
public
Criteria
and
FeaturePendantNotBetween
(
Short
value1
,
Short
value2
)
{
addCriterion
(
"`traffic`.
decoration <>"
,
value
,
"decoration
"
);
addCriterion
(
"`traffic`.
feature_pendant not between"
,
value1
,
value2
,
"featurePendant
"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
DecorationGreaterThan
(
String
value
)
{
public
Criteria
and
FeatureDecorationIsNull
(
)
{
addCriterion
(
"`traffic`.
decoration >"
,
value
,
"decoration
"
);
addCriterion
(
"`traffic`.
feature_decoration is null
"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
DecorationGreaterThanOrEqualTo
(
String
value
)
{
public
Criteria
and
FeatureDecorationIsNotNull
(
)
{
addCriterion
(
"`traffic`.
decoration >="
,
value
,
"decoration
"
);
addCriterion
(
"`traffic`.
feature_decoration is not null
"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
DecorationLessThan
(
String
value
)
{
public
Criteria
and
FeatureDecorationEqualTo
(
Short
value
)
{
addCriterion
(
"`traffic`.
decoration <"
,
value
,
"d
ecoration"
);
addCriterion
(
"`traffic`.
feature_decoration ="
,
value
,
"featureD
ecoration"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
DecorationLessThanOrEqualTo
(
String
value
)
{
public
Criteria
and
FeatureDecorationNotEqualTo
(
Short
value
)
{
addCriterion
(
"`traffic`.
decoration <="
,
value
,
"d
ecoration"
);
addCriterion
(
"`traffic`.
feature_decoration <>"
,
value
,
"featureD
ecoration"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
DecorationLike
(
String
value
)
{
public
Criteria
and
FeatureDecorationGreaterThan
(
Short
value
)
{
addCriterion
(
"`traffic`.
decoration like"
,
value
,
"d
ecoration"
);
addCriterion
(
"`traffic`.
feature_decoration >"
,
value
,
"featureD
ecoration"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
DecorationNotLike
(
String
value
)
{
public
Criteria
and
FeatureDecorationGreaterThanOrEqualTo
(
Short
value
)
{
addCriterion
(
"`traffic`.
decoration not like"
,
value
,
"d
ecoration"
);
addCriterion
(
"`traffic`.
feature_decoration >="
,
value
,
"featureD
ecoration"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
DecorationIn
(
List
<
String
>
values
)
{
public
Criteria
and
FeatureDecorationLessThan
(
Short
value
)
{
addCriterion
(
"`traffic`.
decoration in"
,
values
,
"d
ecoration"
);
addCriterion
(
"`traffic`.
feature_decoration <"
,
value
,
"featureD
ecoration"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
DecorationNotIn
(
List
<
String
>
values
)
{
public
Criteria
and
FeatureDecorationLessThanOrEqualTo
(
Short
value
)
{
addCriterion
(
"`traffic`.
decoration not in"
,
values
,
"d
ecoration"
);
addCriterion
(
"`traffic`.
feature_decoration <="
,
value
,
"featureD
ecoration"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
DecorationBetween
(
String
value1
,
String
value2
)
{
public
Criteria
and
FeatureDecorationIn
(
List
<
Short
>
values
)
{
addCriterion
(
"`traffic`.
decoration between"
,
value1
,
value2
,
"d
ecoration"
);
addCriterion
(
"`traffic`.
feature_decoration in"
,
values
,
"featureD
ecoration"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
DecorationNotBetween
(
String
value1
,
String
value2
)
{
public
Criteria
and
FeatureDecorationNotIn
(
List
<
Short
>
values
)
{
addCriterion
(
"`traffic`.
decoration not between"
,
value1
,
value2
,
"d
ecoration"
);
addCriterion
(
"`traffic`.
feature_decoration not in"
,
values
,
"featureD
ecoration"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
SunShieldIsNull
(
)
{
public
Criteria
and
FeatureDecorationBetween
(
Short
value1
,
Short
value2
)
{
addCriterion
(
"`traffic`.
sun_shield is null
"
);
addCriterion
(
"`traffic`.
feature_decoration between"
,
value1
,
value2
,
"featureDecoration
"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
SunShieldIsNotNull
(
)
{
public
Criteria
and
FeatureDecorationNotBetween
(
Short
value1
,
Short
value2
)
{
addCriterion
(
"`traffic`.
sun_shield is not null
"
);
addCriterion
(
"`traffic`.
feature_decoration not between"
,
value1
,
value2
,
"featureDecoration
"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
SunShieldEqualTo
(
String
value
)
{
public
Criteria
and
FeatureSunShieldIsNull
(
)
{
addCriterion
(
"`traffic`.
sun_shield ="
,
value
,
"sunShield
"
);
addCriterion
(
"`traffic`.
feature_sun_shield is null
"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
SunShieldNotEqualTo
(
String
value
)
{
public
Criteria
and
FeatureSunShieldIsNotNull
(
)
{
addCriterion
(
"`traffic`.
sun_shield <>"
,
value
,
"sunShield
"
);
addCriterion
(
"`traffic`.
feature_sun_shield is not null
"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
SunShieldGreaterThan
(
String
value
)
{
public
Criteria
and
FeatureSunShieldEqualTo
(
Short
value
)
{
addCriterion
(
"`traffic`.
sun_shield >"
,
value
,
"s
unShield"
);
addCriterion
(
"`traffic`.
feature_sun_shield ="
,
value
,
"featureS
unShield"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
SunShieldGreaterThanOrEqualTo
(
String
value
)
{
public
Criteria
and
FeatureSunShieldNotEqualTo
(
Short
value
)
{
addCriterion
(
"`traffic`.
sun_shield >="
,
value
,
"s
unShield"
);
addCriterion
(
"`traffic`.
feature_sun_shield <>"
,
value
,
"featureS
unShield"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
SunShieldLessThan
(
String
value
)
{
public
Criteria
and
FeatureSunShieldGreaterThan
(
Short
value
)
{
addCriterion
(
"`traffic`.
sun_shield <"
,
value
,
"s
unShield"
);
addCriterion
(
"`traffic`.
feature_sun_shield >"
,
value
,
"featureS
unShield"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
SunShieldLessThanOrEqualTo
(
String
value
)
{
public
Criteria
and
FeatureSunShieldGreaterThanOrEqualTo
(
Short
value
)
{
addCriterion
(
"`traffic`.
sun_shield <="
,
value
,
"s
unShield"
);
addCriterion
(
"`traffic`.
feature_sun_shield >="
,
value
,
"featureS
unShield"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
SunShieldLike
(
String
value
)
{
public
Criteria
and
FeatureSunShieldLessThan
(
Short
value
)
{
addCriterion
(
"`traffic`.
sun_shield like"
,
value
,
"s
unShield"
);
addCriterion
(
"`traffic`.
feature_sun_shield <"
,
value
,
"featureS
unShield"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
SunShieldNotLike
(
String
value
)
{
public
Criteria
and
FeatureSunShieldLessThanOrEqualTo
(
Short
value
)
{
addCriterion
(
"`traffic`.
sun_shield not like"
,
value
,
"s
unShield"
);
addCriterion
(
"`traffic`.
feature_sun_shield <="
,
value
,
"featureS
unShield"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
SunShieldIn
(
List
<
String
>
values
)
{
public
Criteria
and
FeatureSunShieldIn
(
List
<
Short
>
values
)
{
addCriterion
(
"`traffic`.
sun_shield in"
,
values
,
"s
unShield"
);
addCriterion
(
"`traffic`.
feature_sun_shield in"
,
values
,
"featureS
unShield"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
SunShieldNotIn
(
List
<
String
>
values
)
{
public
Criteria
and
FeatureSunShieldNotIn
(
List
<
Short
>
values
)
{
addCriterion
(
"`traffic`.
sun_shield not in"
,
values
,
"s
unShield"
);
addCriterion
(
"`traffic`.
feature_sun_shield not in"
,
values
,
"featureS
unShield"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
SunShieldBetween
(
String
value1
,
String
value2
)
{
public
Criteria
and
FeatureSunShieldBetween
(
Short
value1
,
Short
value2
)
{
addCriterion
(
"`traffic`.
sun_shield between"
,
value1
,
value2
,
"s
unShield"
);
addCriterion
(
"`traffic`.
feature_sun_shield between"
,
value1
,
value2
,
"featureS
unShield"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
SunShieldNotBetween
(
String
value1
,
String
value2
)
{
public
Criteria
and
FeatureSunShieldNotBetween
(
Short
value1
,
Short
value2
)
{
addCriterion
(
"`traffic`.
sun_shield not between"
,
value1
,
value2
,
"s
unShield"
);
addCriterion
(
"`traffic`.
feature_sun_shield not between"
,
value1
,
value2
,
"featureS
unShield"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
...
@@ -1659,66 +1689,6 @@ public class TrafficExample extends BaseExample {
...
@@ -1659,66 +1689,6 @@ public class TrafficExample extends BaseExample {
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andShootTimeIsNull
()
{
addCriterion
(
"`traffic`.shoot_time is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andShootTimeIsNotNull
()
{
addCriterion
(
"`traffic`.shoot_time is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andShootTimeEqualTo
(
Date
value
)
{
addCriterion
(
"`traffic`.shoot_time ="
,
value
,
"shootTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andShootTimeNotEqualTo
(
Date
value
)
{
addCriterion
(
"`traffic`.shoot_time <>"
,
value
,
"shootTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andShootTimeGreaterThan
(
Date
value
)
{
addCriterion
(
"`traffic`.shoot_time >"
,
value
,
"shootTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andShootTimeGreaterThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"`traffic`.shoot_time >="
,
value
,
"shootTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andShootTimeLessThan
(
Date
value
)
{
addCriterion
(
"`traffic`.shoot_time <"
,
value
,
"shootTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andShootTimeLessThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"`traffic`.shoot_time <="
,
value
,
"shootTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andShootTimeIn
(
List
<
Date
>
values
)
{
addCriterion
(
"`traffic`.shoot_time in"
,
values
,
"shootTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andShootTimeNotIn
(
List
<
Date
>
values
)
{
addCriterion
(
"`traffic`.shoot_time not in"
,
values
,
"shootTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andShootTimeBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"`traffic`.shoot_time between"
,
value1
,
value2
,
"shootTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andShootTimeNotBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"`traffic`.shoot_time not between"
,
value1
,
value2
,
"shootTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSpecialTypeIsNull
()
{
public
Criteria
andSpecialTypeIsNull
()
{
addCriterion
(
"`traffic`.special_type is null"
);
addCriterion
(
"`traffic`.special_type is null"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
...
@@ -2081,8 +2051,8 @@ public class TrafficExample extends BaseExample {
...
@@ -2081,8 +2051,8 @@ public class TrafficExample extends BaseExample {
return
(
ColumnContainer
)
this
;
return
(
ColumnContainer
)
this
;
}
}
public
ColumnContainer
hasEvent
Time
Column
()
{
public
ColumnContainer
hasEvent
Dt
Column
()
{
addColumnStr
(
"`traffic`.event_
time as traffic_event_time
"
);
addColumnStr
(
"`traffic`.event_
dt as traffic_event_dt
"
);
return
(
ColumnContainer
)
this
;
return
(
ColumnContainer
)
this
;
}
}
...
@@ -2106,6 +2076,11 @@ public class TrafficExample extends BaseExample {
...
@@ -2106,6 +2076,11 @@ public class TrafficExample extends BaseExample {
return
(
ColumnContainer
)
this
;
return
(
ColumnContainer
)
this
;
}
}
public
ColumnContainer
hasLocationNameColumn
()
{
addColumnStr
(
"`traffic`.location_name as traffic_location_name "
);
return
(
ColumnContainer
)
this
;
}
public
ColumnContainer
hasLaneCodeColumn
()
{
public
ColumnContainer
hasLaneCodeColumn
()
{
addColumnStr
(
"`traffic`.lane_code as traffic_lane_code "
);
addColumnStr
(
"`traffic`.lane_code as traffic_lane_code "
);
return
(
ColumnContainer
)
this
;
return
(
ColumnContainer
)
this
;
...
@@ -2121,43 +2096,43 @@ public class TrafficExample extends BaseExample {
...
@@ -2121,43 +2096,43 @@ public class TrafficExample extends BaseExample {
return
(
ColumnContainer
)
this
;
return
(
ColumnContainer
)
this
;
}
}
public
ColumnContainer
has
IllegalCode
Column
()
{
public
ColumnContainer
has
VehicleColor
Column
()
{
addColumnStr
(
"`traffic`.
illegal_code as traffic_illegal_code
"
);
addColumnStr
(
"`traffic`.
vehicle_color as traffic_vehicle_color
"
);
return
(
ColumnContainer
)
this
;
return
(
ColumnContainer
)
this
;
}
}
public
ColumnContainer
has
IllegalState
Column
()
{
public
ColumnContainer
has
VehicleLogo
Column
()
{
addColumnStr
(
"`traffic`.
illegal_state as traffic_illegal_state
"
);
addColumnStr
(
"`traffic`.
vehicle_logo as traffic_vehicle_logo
"
);
return
(
ColumnContainer
)
this
;
return
(
ColumnContainer
)
this
;
}
}
public
ColumnContainer
has
VehicleColor
Column
()
{
public
ColumnContainer
has
IllegalCode
Column
()
{
addColumnStr
(
"`traffic`.
vehicle_color as traffic_vehicle_color
"
);
addColumnStr
(
"`traffic`.
illegal_code as traffic_illegal_code
"
);
return
(
ColumnContainer
)
this
;
return
(
ColumnContainer
)
this
;
}
}
public
ColumnContainer
has
VehicleLogo
Column
()
{
public
ColumnContainer
has
IllegalState
Column
()
{
addColumnStr
(
"`traffic`.
vehicle_logo as traffic_vehicle_logo
"
);
addColumnStr
(
"`traffic`.
illegal_state as traffic_illegal_state
"
);
return
(
ColumnContainer
)
this
;
return
(
ColumnContainer
)
this
;
}
}
public
ColumnContainer
hasAnnualInspectionMarkColumn
()
{
public
ColumnContainer
has
Feature
AnnualInspectionMarkColumn
()
{
addColumnStr
(
"`traffic`.
annual_inspection_mark as traffic
_annual_inspection_mark "
);
addColumnStr
(
"`traffic`.
feature_annual_inspection_mark as traffic_feature
_annual_inspection_mark "
);
return
(
ColumnContainer
)
this
;
return
(
ColumnContainer
)
this
;
}
}
public
ColumnContainer
hasPendantColumn
()
{
public
ColumnContainer
has
Feature
PendantColumn
()
{
addColumnStr
(
"`traffic`.
pendant as traffic
_pendant "
);
addColumnStr
(
"`traffic`.
feature_pendant as traffic_feature
_pendant "
);
return
(
ColumnContainer
)
this
;
return
(
ColumnContainer
)
this
;
}
}
public
ColumnContainer
hasDecorationColumn
()
{
public
ColumnContainer
has
Feature
DecorationColumn
()
{
addColumnStr
(
"`traffic`.
decoration as traffic
_decoration "
);
addColumnStr
(
"`traffic`.
feature_decoration as traffic_feature
_decoration "
);
return
(
ColumnContainer
)
this
;
return
(
ColumnContainer
)
this
;
}
}
public
ColumnContainer
hasSunShieldColumn
()
{
public
ColumnContainer
has
Feature
SunShieldColumn
()
{
addColumnStr
(
"`traffic`.
sun_shield as traffic
_sun_shield "
);
addColumnStr
(
"`traffic`.
feature_sun_shield as traffic_feature
_sun_shield "
);
return
(
ColumnContainer
)
this
;
return
(
ColumnContainer
)
this
;
}
}
...
@@ -2171,11 +2146,6 @@ public class TrafficExample extends BaseExample {
...
@@ -2171,11 +2146,6 @@ public class TrafficExample extends BaseExample {
return
(
ColumnContainer
)
this
;
return
(
ColumnContainer
)
this
;
}
}
public
ColumnContainer
hasShootTimeColumn
()
{
addColumnStr
(
"`traffic`.shoot_time as traffic_shoot_time "
);
return
(
ColumnContainer
)
this
;
}
public
ColumnContainer
hasSpecialTypeColumn
()
{
public
ColumnContainer
hasSpecialTypeColumn
()
{
addColumnStr
(
"`traffic`.special_type as traffic_special_type "
);
addColumnStr
(
"`traffic`.special_type as traffic_special_type "
);
return
(
ColumnContainer
)
this
;
return
(
ColumnContainer
)
this
;
...
...
fanxing-commons/src/main/java/com/viontech/fanxing/commons/model/TrafficFace.java
0 → 100644
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
commons
.
model
;
import
com.viontech.fanxing.commons.base.BaseModel
;
public
class
TrafficFace
extends
BaseModel
{
private
Long
id
;
private
String
unid
;
private
Long
trafficId
;
private
Short
state
;
private
Short
sex
;
private
String
upperColor
;
private
String
lowerColor
;
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
String
getUnid
()
{
return
unid
;
}
public
void
setUnid
(
String
unid
)
{
this
.
unid
=
unid
==
null
?
null
:
unid
.
trim
();
}
public
Long
getTrafficId
()
{
return
trafficId
;
}
public
void
setTrafficId
(
Long
trafficId
)
{
this
.
trafficId
=
trafficId
;
}
public
Short
getState
()
{
return
state
;
}
public
void
setState
(
Short
state
)
{
this
.
state
=
state
;
}
public
Short
getSex
()
{
return
sex
;
}
public
void
setSex
(
Short
sex
)
{
this
.
sex
=
sex
;
}
public
String
getUpperColor
()
{
return
upperColor
;
}
public
void
setUpperColor
(
String
upperColor
)
{
this
.
upperColor
=
upperColor
==
null
?
null
:
upperColor
.
trim
();
}
public
String
getLowerColor
()
{
return
lowerColor
;
}
public
void
setLowerColor
(
String
lowerColor
)
{
this
.
lowerColor
=
lowerColor
==
null
?
null
:
lowerColor
.
trim
();
}
}
\ No newline at end of file
\ No newline at end of file
fanxing-commons/src/main/java/com/viontech/fanxing/commons/model/TrafficFaceExample.java
0 → 100644
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
commons
.
model
;
import
com.viontech.fanxing.commons.base.BaseExample
;
import
java.util.ArrayList
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.Set
;
public
class
TrafficFaceExample
extends
BaseExample
{
public
TrafficFaceExample
()
{
super
();
tableName
=
"d_traffic_face"
;
tableAlias
=
"trafficFace"
;
ignoreCase
=
false
;
}
public
Criteria
or
()
{
Criteria
criteria
=
createCriteriaInternal
();
oredCriteria
.
add
(
criteria
);
return
criteria
;
}
public
Criteria
createCriteria
()
{
Criteria
criteria
=
createCriteriaInternal
();
if
(
oredCriteria
.
size
()
==
0
)
{
oredCriteria
.
add
(
criteria
);
}
return
criteria
;
}
protected
Criteria
createCriteriaInternal
()
{
Criteria
criteria
=
new
Criteria
(
this
.
tableName
,
this
.
ignoreCase
);
return
criteria
;
}
public
ColumnContainer
createColumns
()
{
ColumnContainer
columnContainer
=
(
ColumnContainer
)
columnContainerMap
.
get
(
this
.
tableName
);
if
(
columnContainer
==
null
){
columnContainer
=
new
ColumnContainer
(
this
.
tableName
);
columnContainerMap
.
put
(
this
.
tableName
,
columnContainer
);
}
return
(
ColumnContainer
)
columnContainer
;
}
public
static
class
Criteria
extends
GeneratedCriteria
{
protected
Criteria
(
String
tableName
)
{
super
(
tableName
);
tableName
=
"d_traffic_face"
;
}
protected
Criteria
(
String
tableName
,
boolean
ignoreCase
)
{
this
(
tableName
);
this
.
ignoreCase
=
ignoreCase
;
}
public
boolean
isValid
()
{
return
criteria
.
size
()
>
0
;
}
public
List
<
Criterion
>
getAllCriteria
()
{
return
criteria
;
}
public
void
setAllCriteria
(
List
<
Criterion
>
criteria
)
{
this
.
criteria
=
criteria
;
}
protected
void
addCriterion
(
String
condition
)
{
if
(
condition
==
null
)
{
throw
new
RuntimeException
(
"Value for condition cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
));
}
protected
void
addCriterion
(
String
condition
,
Object
value
,
String
property
)
{
if
(
value
==
null
)
{
throw
new
RuntimeException
(
"Value for "
+
property
+
" cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
,
value
,
ignoreCase
));
}
protected
void
addCriterion
(
String
condition
,
Object
value1
,
Object
value2
,
String
property
)
{
if
(
value1
==
null
||
value2
==
null
)
{
throw
new
RuntimeException
(
"Between values for "
+
property
+
" cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
,
value1
,
value2
));
}
public
Criteria
andIdIsNull
()
{
addCriterion
(
"`trafficFace`.id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdIsNotNull
()
{
addCriterion
(
"`trafficFace`.id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdEqualTo
(
Long
value
)
{
addCriterion
(
"`trafficFace`.id ="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"`trafficFace`.id <>"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThan
(
Long
value
)
{
addCriterion
(
"`trafficFace`.id >"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"`trafficFace`.id >="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThan
(
Long
value
)
{
addCriterion
(
"`trafficFace`.id <"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"`trafficFace`.id <="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"`trafficFace`.id in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"`trafficFace`.id not in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"`trafficFace`.id between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"`trafficFace`.id not between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUnidIsNull
()
{
addCriterion
(
"`trafficFace`.unid is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUnidIsNotNull
()
{
addCriterion
(
"`trafficFace`.unid is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUnidEqualTo
(
String
value
)
{
addCriterion
(
"`trafficFace`.unid ="
,
value
,
"unid"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUnidNotEqualTo
(
String
value
)
{
addCriterion
(
"`trafficFace`.unid <>"
,
value
,
"unid"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUnidGreaterThan
(
String
value
)
{
addCriterion
(
"`trafficFace`.unid >"
,
value
,
"unid"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUnidGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"`trafficFace`.unid >="
,
value
,
"unid"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUnidLessThan
(
String
value
)
{
addCriterion
(
"`trafficFace`.unid <"
,
value
,
"unid"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUnidLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"`trafficFace`.unid <="
,
value
,
"unid"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUnidLike
(
String
value
)
{
addCriterion
(
"`trafficFace`.unid like"
,
value
,
"unid"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUnidNotLike
(
String
value
)
{
addCriterion
(
"`trafficFace`.unid not like"
,
value
,
"unid"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUnidIn
(
List
<
String
>
values
)
{
addCriterion
(
"`trafficFace`.unid in"
,
values
,
"unid"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUnidNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"`trafficFace`.unid not in"
,
values
,
"unid"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUnidBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"`trafficFace`.unid between"
,
value1
,
value2
,
"unid"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUnidNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"`trafficFace`.unid not between"
,
value1
,
value2
,
"unid"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTrafficIdIsNull
()
{
addCriterion
(
"`trafficFace`.traffic_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTrafficIdIsNotNull
()
{
addCriterion
(
"`trafficFace`.traffic_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTrafficIdEqualTo
(
Long
value
)
{
addCriterion
(
"`trafficFace`.traffic_id ="
,
value
,
"trafficId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTrafficIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"`trafficFace`.traffic_id <>"
,
value
,
"trafficId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTrafficIdGreaterThan
(
Long
value
)
{
addCriterion
(
"`trafficFace`.traffic_id >"
,
value
,
"trafficId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTrafficIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"`trafficFace`.traffic_id >="
,
value
,
"trafficId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTrafficIdLessThan
(
Long
value
)
{
addCriterion
(
"`trafficFace`.traffic_id <"
,
value
,
"trafficId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTrafficIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"`trafficFace`.traffic_id <="
,
value
,
"trafficId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTrafficIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"`trafficFace`.traffic_id in"
,
values
,
"trafficId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTrafficIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"`trafficFace`.traffic_id not in"
,
values
,
"trafficId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTrafficIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"`trafficFace`.traffic_id between"
,
value1
,
value2
,
"trafficId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTrafficIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"`trafficFace`.traffic_id not between"
,
value1
,
value2
,
"trafficId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStateIsNull
()
{
addCriterion
(
"`trafficFace`.`state` is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStateIsNotNull
()
{
addCriterion
(
"`trafficFace`.`state` is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStateEqualTo
(
Short
value
)
{
addCriterion
(
"`trafficFace`.`state` ="
,
value
,
"state"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStateNotEqualTo
(
Short
value
)
{
addCriterion
(
"`trafficFace`.`state` <>"
,
value
,
"state"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStateGreaterThan
(
Short
value
)
{
addCriterion
(
"`trafficFace`.`state` >"
,
value
,
"state"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStateGreaterThanOrEqualTo
(
Short
value
)
{
addCriterion
(
"`trafficFace`.`state` >="
,
value
,
"state"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStateLessThan
(
Short
value
)
{
addCriterion
(
"`trafficFace`.`state` <"
,
value
,
"state"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStateLessThanOrEqualTo
(
Short
value
)
{
addCriterion
(
"`trafficFace`.`state` <="
,
value
,
"state"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStateIn
(
List
<
Short
>
values
)
{
addCriterion
(
"`trafficFace`.`state` in"
,
values
,
"state"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStateNotIn
(
List
<
Short
>
values
)
{
addCriterion
(
"`trafficFace`.`state` not in"
,
values
,
"state"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStateBetween
(
Short
value1
,
Short
value2
)
{
addCriterion
(
"`trafficFace`.`state` between"
,
value1
,
value2
,
"state"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStateNotBetween
(
Short
value1
,
Short
value2
)
{
addCriterion
(
"`trafficFace`.`state` not between"
,
value1
,
value2
,
"state"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSexIsNull
()
{
addCriterion
(
"`trafficFace`.sex is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSexIsNotNull
()
{
addCriterion
(
"`trafficFace`.sex is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSexEqualTo
(
Short
value
)
{
addCriterion
(
"`trafficFace`.sex ="
,
value
,
"sex"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSexNotEqualTo
(
Short
value
)
{
addCriterion
(
"`trafficFace`.sex <>"
,
value
,
"sex"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSexGreaterThan
(
Short
value
)
{
addCriterion
(
"`trafficFace`.sex >"
,
value
,
"sex"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSexGreaterThanOrEqualTo
(
Short
value
)
{
addCriterion
(
"`trafficFace`.sex >="
,
value
,
"sex"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSexLessThan
(
Short
value
)
{
addCriterion
(
"`trafficFace`.sex <"
,
value
,
"sex"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSexLessThanOrEqualTo
(
Short
value
)
{
addCriterion
(
"`trafficFace`.sex <="
,
value
,
"sex"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSexIn
(
List
<
Short
>
values
)
{
addCriterion
(
"`trafficFace`.sex in"
,
values
,
"sex"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSexNotIn
(
List
<
Short
>
values
)
{
addCriterion
(
"`trafficFace`.sex not in"
,
values
,
"sex"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSexBetween
(
Short
value1
,
Short
value2
)
{
addCriterion
(
"`trafficFace`.sex between"
,
value1
,
value2
,
"sex"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSexNotBetween
(
Short
value1
,
Short
value2
)
{
addCriterion
(
"`trafficFace`.sex not between"
,
value1
,
value2
,
"sex"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpperColorIsNull
()
{
addCriterion
(
"`trafficFace`.upper_color is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpperColorIsNotNull
()
{
addCriterion
(
"`trafficFace`.upper_color is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpperColorEqualTo
(
String
value
)
{
addCriterion
(
"`trafficFace`.upper_color ="
,
value
,
"upperColor"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpperColorNotEqualTo
(
String
value
)
{
addCriterion
(
"`trafficFace`.upper_color <>"
,
value
,
"upperColor"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpperColorGreaterThan
(
String
value
)
{
addCriterion
(
"`trafficFace`.upper_color >"
,
value
,
"upperColor"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpperColorGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"`trafficFace`.upper_color >="
,
value
,
"upperColor"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpperColorLessThan
(
String
value
)
{
addCriterion
(
"`trafficFace`.upper_color <"
,
value
,
"upperColor"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpperColorLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"`trafficFace`.upper_color <="
,
value
,
"upperColor"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpperColorLike
(
String
value
)
{
addCriterion
(
"`trafficFace`.upper_color like"
,
value
,
"upperColor"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpperColorNotLike
(
String
value
)
{
addCriterion
(
"`trafficFace`.upper_color not like"
,
value
,
"upperColor"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpperColorIn
(
List
<
String
>
values
)
{
addCriterion
(
"`trafficFace`.upper_color in"
,
values
,
"upperColor"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpperColorNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"`trafficFace`.upper_color not in"
,
values
,
"upperColor"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpperColorBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"`trafficFace`.upper_color between"
,
value1
,
value2
,
"upperColor"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpperColorNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"`trafficFace`.upper_color not between"
,
value1
,
value2
,
"upperColor"
);
return
(
Criteria
)
this
;
}
public
Criteria
andLowerColorIsNull
()
{
addCriterion
(
"`trafficFace`.lower_color is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andLowerColorIsNotNull
()
{
addCriterion
(
"`trafficFace`.lower_color is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andLowerColorEqualTo
(
String
value
)
{
addCriterion
(
"`trafficFace`.lower_color ="
,
value
,
"lowerColor"
);
return
(
Criteria
)
this
;
}
public
Criteria
andLowerColorNotEqualTo
(
String
value
)
{
addCriterion
(
"`trafficFace`.lower_color <>"
,
value
,
"lowerColor"
);
return
(
Criteria
)
this
;
}
public
Criteria
andLowerColorGreaterThan
(
String
value
)
{
addCriterion
(
"`trafficFace`.lower_color >"
,
value
,
"lowerColor"
);
return
(
Criteria
)
this
;
}
public
Criteria
andLowerColorGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"`trafficFace`.lower_color >="
,
value
,
"lowerColor"
);
return
(
Criteria
)
this
;
}
public
Criteria
andLowerColorLessThan
(
String
value
)
{
addCriterion
(
"`trafficFace`.lower_color <"
,
value
,
"lowerColor"
);
return
(
Criteria
)
this
;
}
public
Criteria
andLowerColorLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"`trafficFace`.lower_color <="
,
value
,
"lowerColor"
);
return
(
Criteria
)
this
;
}
public
Criteria
andLowerColorLike
(
String
value
)
{
addCriterion
(
"`trafficFace`.lower_color like"
,
value
,
"lowerColor"
);
return
(
Criteria
)
this
;
}
public
Criteria
andLowerColorNotLike
(
String
value
)
{
addCriterion
(
"`trafficFace`.lower_color not like"
,
value
,
"lowerColor"
);
return
(
Criteria
)
this
;
}
public
Criteria
andLowerColorIn
(
List
<
String
>
values
)
{
addCriterion
(
"`trafficFace`.lower_color in"
,
values
,
"lowerColor"
);
return
(
Criteria
)
this
;
}
public
Criteria
andLowerColorNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"`trafficFace`.lower_color not in"
,
values
,
"lowerColor"
);
return
(
Criteria
)
this
;
}
public
Criteria
andLowerColorBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"`trafficFace`.lower_color between"
,
value1
,
value2
,
"lowerColor"
);
return
(
Criteria
)
this
;
}
public
Criteria
andLowerColorNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"`trafficFace`.lower_color not between"
,
value1
,
value2
,
"lowerColor"
);
return
(
Criteria
)
this
;
}
}
public
static
class
ColumnContainer
extends
ColumnContainerBase
{
protected
ColumnContainer
(
String
tableName
)
{
super
(
tableName
);
}
public
ColumnContainer
hasIdColumn
()
{
addColumnStr
(
"`trafficFace`.id as trafficFace_id "
);
return
(
ColumnContainer
)
this
;
}
public
ColumnContainer
hasUnidColumn
()
{
addColumnStr
(
"`trafficFace`.unid as trafficFace_unid "
);
return
(
ColumnContainer
)
this
;
}
public
ColumnContainer
hasTrafficIdColumn
()
{
addColumnStr
(
"`trafficFace`.traffic_id as trafficFace_traffic_id "
);
return
(
ColumnContainer
)
this
;
}
public
ColumnContainer
hasStateColumn
()
{
addColumnStr
(
"`trafficFace`.`state` as `trafficFace_state` "
);
return
(
ColumnContainer
)
this
;
}
public
ColumnContainer
hasSexColumn
()
{
addColumnStr
(
"`trafficFace`.sex as trafficFace_sex "
);
return
(
ColumnContainer
)
this
;
}
public
ColumnContainer
hasUpperColorColumn
()
{
addColumnStr
(
"`trafficFace`.upper_color as trafficFace_upper_color "
);
return
(
ColumnContainer
)
this
;
}
public
ColumnContainer
hasLowerColorColumn
()
{
addColumnStr
(
"`trafficFace`.lower_color as trafficFace_lower_color "
);
return
(
ColumnContainer
)
this
;
}
}
}
\ No newline at end of file
\ No newline at end of file
fanxing-commons/src/main/java/com/viontech/fanxing/commons/vo/TrafficFaceVo.java
0 → 100644
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
commons
.
vo
;
import
com.viontech.fanxing.commons.model.TrafficFace
;
import
com.viontech.fanxing.commons.vobase.TrafficFaceVoBase
;
public
class
TrafficFaceVo
extends
TrafficFaceVoBase
{
public
TrafficFaceVo
()
{
super
();
}
public
TrafficFaceVo
(
TrafficFace
trafficFace
)
{
super
(
trafficFace
);
}
}
\ No newline at end of file
\ No newline at end of file
fanxing-commons/src/main/java/com/viontech/fanxing/commons/vobase/FlowDataVoBase.java
View file @
3370b9b
...
@@ -31,13 +31,22 @@ public class FlowDataVoBase extends FlowData implements VoInterface<FlowData> {
...
@@ -31,13 +31,22 @@ public class FlowDataVoBase extends FlowData implements VoInterface<FlowData> {
private
String
unid_like
;
private
String
unid_like
;
@JsonIgnore
@JsonIgnore
private
Boolean
e
ventId_null
;
private
Boolean
flowE
ventId_null
;
@JsonIgnore
@JsonIgnore
private
ArrayList
<
String
>
e
ventId_arr
;
private
ArrayList
<
Long
>
flowE
ventId_arr
;
@JsonIgnore
@JsonIgnore
private
String
eventId_like
;
private
Long
flowEventId_gt
;
@JsonIgnore
private
Long
flowEventId_lt
;
@JsonIgnore
private
Long
flowEventId_gte
;
@JsonIgnore
private
Long
flowEventId_lte
;
@JsonIgnore
@JsonIgnore
private
Boolean
taskId_null
;
private
Boolean
taskId_null
;
...
@@ -482,42 +491,66 @@ public class FlowDataVoBase extends FlowData implements VoInterface<FlowData> {
...
@@ -482,42 +491,66 @@ public class FlowDataVoBase extends FlowData implements VoInterface<FlowData> {
this
.
getModel
().
setUnid
(
unid
);
this
.
getModel
().
setUnid
(
unid
);
}
}
public
Boolean
getEventId_null
()
{
public
Boolean
getFlowEventId_null
()
{
return
eventId_null
;
return
flowEventId_null
;
}
public
void
setFlowEventId_null
(
Boolean
flowEventId_null
)
{
this
.
flowEventId_null
=
flowEventId_null
;
}
public
ArrayList
<
Long
>
getFlowEventId_arr
()
{
return
flowEventId_arr
;
}
public
void
setFlowEventId_arr
(
ArrayList
<
Long
>
flowEventId_arr
)
{
this
.
flowEventId_arr
=
flowEventId_arr
;
}
public
Long
getFlowEventId_gt
()
{
return
flowEventId_gt
;
}
public
void
setFlowEventId_gt
(
Long
flowEventId_gt
)
{
this
.
flowEventId_gt
=
flowEventId_gt
;
}
public
Long
getFlowEventId_lt
()
{
return
flowEventId_lt
;
}
}
public
void
set
EventId_null
(
Boolean
eventId_null
)
{
public
void
set
FlowEventId_lt
(
Long
flowEventId_lt
)
{
this
.
eventId_null
=
eventId_null
;
this
.
flowEventId_lt
=
flowEventId_lt
;
}
}
public
ArrayList
<
String
>
getEventId_arr
()
{
public
Long
getFlowEventId_gte
()
{
return
eventId_arr
;
return
flowEventId_gte
;
}
}
public
void
set
EventId_arr
(
ArrayList
<
String
>
eventId_arr
)
{
public
void
set
FlowEventId_gte
(
Long
flowEventId_gte
)
{
this
.
eventId_arr
=
eventId_arr
;
this
.
flowEventId_gte
=
flowEventId_gte
;
}
}
public
String
getEventId_lik
e
()
{
public
Long
getFlowEventId_lt
e
()
{
return
eventId_lik
e
;
return
flowEventId_lt
e
;
}
}
public
void
set
EventId_like
(
String
eventId_lik
e
)
{
public
void
set
FlowEventId_lte
(
Long
flowEventId_lt
e
)
{
this
.
eventId_like
=
eventId_lik
e
;
this
.
flowEventId_lte
=
flowEventId_lt
e
;
}
}
public
String
get
EventId
()
{
public
Long
getFlow
EventId
()
{
if
(
getModel
()
==
null
){
if
(
getModel
()
==
null
){
throw
new
RuntimeException
(
"model is null"
);
throw
new
RuntimeException
(
"model is null"
);
}
}
return
this
.
getModel
().
getEventId
();
return
this
.
getModel
().
get
Flow
EventId
();
}
}
public
void
set
EventId
(
String
e
ventId
)
{
public
void
set
FlowEventId
(
Long
flowE
ventId
)
{
if
(
getModel
()
==
null
){
if
(
getModel
()
==
null
){
throw
new
RuntimeException
(
"model is null"
);
throw
new
RuntimeException
(
"model is null"
);
}
}
this
.
getModel
().
set
EventId
(
e
ventId
);
this
.
getModel
().
set
FlowEventId
(
flowE
ventId
);
}
}
public
Boolean
getTaskId_null
()
{
public
Boolean
getTaskId_null
()
{
...
...
fanxing-commons/src/main/java/com/viontech/fanxing/commons/vobase/FlowEventVoBase.java
View file @
3370b9b
...
@@ -76,6 +76,15 @@ public class FlowEventVoBase extends FlowEvent implements VoInterface<FlowEvent>
...
@@ -76,6 +76,15 @@ public class FlowEventVoBase extends FlowEvent implements VoInterface<FlowEvent>
private
Date
eventTime_lte
;
private
Date
eventTime_lte
;
@JsonIgnore
@JsonIgnore
private
Boolean
eventId_null
;
@JsonIgnore
private
ArrayList
<
String
>
eventId_arr
;
@JsonIgnore
private
String
eventId_like
;
@JsonIgnore
private
Boolean
deviceCode_null
;
private
Boolean
deviceCode_null
;
@JsonIgnore
@JsonIgnore
...
@@ -404,6 +413,44 @@ public class FlowEventVoBase extends FlowEvent implements VoInterface<FlowEvent>
...
@@ -404,6 +413,44 @@ public class FlowEventVoBase extends FlowEvent implements VoInterface<FlowEvent>
this
.
getModel
().
setEventTime
(
eventTime
);
this
.
getModel
().
setEventTime
(
eventTime
);
}
}
public
Boolean
getEventId_null
()
{
return
eventId_null
;
}
public
void
setEventId_null
(
Boolean
eventId_null
)
{
this
.
eventId_null
=
eventId_null
;
}
public
ArrayList
<
String
>
getEventId_arr
()
{
return
eventId_arr
;
}
public
void
setEventId_arr
(
ArrayList
<
String
>
eventId_arr
)
{
this
.
eventId_arr
=
eventId_arr
;
}
public
String
getEventId_like
()
{
return
eventId_like
;
}
public
void
setEventId_like
(
String
eventId_like
)
{
this
.
eventId_like
=
eventId_like
;
}
public
String
getEventId
()
{
if
(
getModel
()
==
null
){
throw
new
RuntimeException
(
"model is null"
);
}
return
this
.
getModel
().
getEventId
();
}
public
void
setEventId
(
String
eventId
)
{
if
(
getModel
()
==
null
){
throw
new
RuntimeException
(
"model is null"
);
}
this
.
getModel
().
setEventId
(
eventId
);
}
public
Boolean
getDeviceCode_null
()
{
public
Boolean
getDeviceCode_null
()
{
return
deviceCode_null
;
return
deviceCode_null
;
}
}
...
...
fanxing-commons/src/main/java/com/viontech/fanxing/commons/vobase/TrafficFaceVoBase.java
0 → 100644
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
commons
.
vobase
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.viontech.fanxing.commons.base.VoInterface
;
import
com.viontech.fanxing.commons.model.TrafficFace
;
import
java.util.ArrayList
;
public
class
TrafficFaceVoBase
extends
TrafficFace
implements
VoInterface
<
TrafficFace
>
{
private
TrafficFace
trafficFace
;
@JsonIgnore
private
ArrayList
<
Long
>
id_arr
;
@JsonIgnore
private
Long
id_gt
;
@JsonIgnore
private
Long
id_lt
;
@JsonIgnore
private
Long
id_gte
;
@JsonIgnore
private
Long
id_lte
;
@JsonIgnore
private
ArrayList
<
String
>
unid_arr
;
@JsonIgnore
private
String
unid_like
;
@JsonIgnore
private
ArrayList
<
Long
>
trafficId_arr
;
@JsonIgnore
private
Long
trafficId_gt
;
@JsonIgnore
private
Long
trafficId_lt
;
@JsonIgnore
private
Long
trafficId_gte
;
@JsonIgnore
private
Long
trafficId_lte
;
@JsonIgnore
private
ArrayList
<
Short
>
state_arr
;
@JsonIgnore
private
Short
state_gt
;
@JsonIgnore
private
Short
state_lt
;
@JsonIgnore
private
Short
state_gte
;
@JsonIgnore
private
Short
state_lte
;
@JsonIgnore
private
ArrayList
<
Short
>
sex_arr
;
@JsonIgnore
private
Short
sex_gt
;
@JsonIgnore
private
Short
sex_lt
;
@JsonIgnore
private
Short
sex_gte
;
@JsonIgnore
private
Short
sex_lte
;
@JsonIgnore
private
Boolean
upperColor_null
;
@JsonIgnore
private
ArrayList
<
String
>
upperColor_arr
;
@JsonIgnore
private
String
upperColor_like
;
@JsonIgnore
private
Boolean
lowerColor_null
;
@JsonIgnore
private
ArrayList
<
String
>
lowerColor_arr
;
@JsonIgnore
private
String
lowerColor_like
;
public
TrafficFaceVoBase
()
{
this
(
null
);
}
public
TrafficFaceVoBase
(
TrafficFace
trafficFace
)
{
if
(
trafficFace
==
null
)
{
trafficFace
=
new
TrafficFace
();
}
this
.
trafficFace
=
trafficFace
;
}
@JsonIgnore
public
TrafficFace
getModel
()
{
return
trafficFace
;
}
public
void
setModel
(
TrafficFace
trafficFace
)
{
this
.
trafficFace
=
trafficFace
;
}
public
ArrayList
<
Long
>
getId_arr
()
{
return
id_arr
;
}
public
void
setId_arr
(
ArrayList
<
Long
>
id_arr
)
{
this
.
id_arr
=
id_arr
;
}
public
Long
getId_gt
()
{
return
id_gt
;
}
public
void
setId_gt
(
Long
id_gt
)
{
this
.
id_gt
=
id_gt
;
}
public
Long
getId_lt
()
{
return
id_lt
;
}
public
void
setId_lt
(
Long
id_lt
)
{
this
.
id_lt
=
id_lt
;
}
public
Long
getId_gte
()
{
return
id_gte
;
}
public
void
setId_gte
(
Long
id_gte
)
{
this
.
id_gte
=
id_gte
;
}
public
Long
getId_lte
()
{
return
id_lte
;
}
public
void
setId_lte
(
Long
id_lte
)
{
this
.
id_lte
=
id_lte
;
}
public
Long
getId
()
{
if
(
getModel
()
==
null
){
throw
new
RuntimeException
(
"model is null"
);
}
return
this
.
getModel
().
getId
();
}
public
void
setId
(
Long
id
)
{
if
(
getModel
()
==
null
){
throw
new
RuntimeException
(
"model is null"
);
}
this
.
getModel
().
setId
(
id
);
}
public
ArrayList
<
String
>
getUnid_arr
()
{
return
unid_arr
;
}
public
void
setUnid_arr
(
ArrayList
<
String
>
unid_arr
)
{
this
.
unid_arr
=
unid_arr
;
}
public
String
getUnid_like
()
{
return
unid_like
;
}
public
void
setUnid_like
(
String
unid_like
)
{
this
.
unid_like
=
unid_like
;
}
public
String
getUnid
()
{
if
(
getModel
()
==
null
){
throw
new
RuntimeException
(
"model is null"
);
}
return
this
.
getModel
().
getUnid
();
}
public
void
setUnid
(
String
unid
)
{
if
(
getModel
()
==
null
){
throw
new
RuntimeException
(
"model is null"
);
}
this
.
getModel
().
setUnid
(
unid
);
}
public
ArrayList
<
Long
>
getTrafficId_arr
()
{
return
trafficId_arr
;
}
public
void
setTrafficId_arr
(
ArrayList
<
Long
>
trafficId_arr
)
{
this
.
trafficId_arr
=
trafficId_arr
;
}
public
Long
getTrafficId_gt
()
{
return
trafficId_gt
;
}
public
void
setTrafficId_gt
(
Long
trafficId_gt
)
{
this
.
trafficId_gt
=
trafficId_gt
;
}
public
Long
getTrafficId_lt
()
{
return
trafficId_lt
;
}
public
void
setTrafficId_lt
(
Long
trafficId_lt
)
{
this
.
trafficId_lt
=
trafficId_lt
;
}
public
Long
getTrafficId_gte
()
{
return
trafficId_gte
;
}
public
void
setTrafficId_gte
(
Long
trafficId_gte
)
{
this
.
trafficId_gte
=
trafficId_gte
;
}
public
Long
getTrafficId_lte
()
{
return
trafficId_lte
;
}
public
void
setTrafficId_lte
(
Long
trafficId_lte
)
{
this
.
trafficId_lte
=
trafficId_lte
;
}
public
Long
getTrafficId
()
{
if
(
getModel
()
==
null
){
throw
new
RuntimeException
(
"model is null"
);
}
return
this
.
getModel
().
getTrafficId
();
}
public
void
setTrafficId
(
Long
trafficId
)
{
if
(
getModel
()
==
null
){
throw
new
RuntimeException
(
"model is null"
);
}
this
.
getModel
().
setTrafficId
(
trafficId
);
}
public
ArrayList
<
Short
>
getState_arr
()
{
return
state_arr
;
}
public
void
setState_arr
(
ArrayList
<
Short
>
state_arr
)
{
this
.
state_arr
=
state_arr
;
}
public
Short
getState_gt
()
{
return
state_gt
;
}
public
void
setState_gt
(
Short
state_gt
)
{
this
.
state_gt
=
state_gt
;
}
public
Short
getState_lt
()
{
return
state_lt
;
}
public
void
setState_lt
(
Short
state_lt
)
{
this
.
state_lt
=
state_lt
;
}
public
Short
getState_gte
()
{
return
state_gte
;
}
public
void
setState_gte
(
Short
state_gte
)
{
this
.
state_gte
=
state_gte
;
}
public
Short
getState_lte
()
{
return
state_lte
;
}
public
void
setState_lte
(
Short
state_lte
)
{
this
.
state_lte
=
state_lte
;
}
public
Short
getState
()
{
if
(
getModel
()
==
null
){
throw
new
RuntimeException
(
"model is null"
);
}
return
this
.
getModel
().
getState
();
}
public
void
setState
(
Short
state
)
{
if
(
getModel
()
==
null
){
throw
new
RuntimeException
(
"model is null"
);
}
this
.
getModel
().
setState
(
state
);
}
public
ArrayList
<
Short
>
getSex_arr
()
{
return
sex_arr
;
}
public
void
setSex_arr
(
ArrayList
<
Short
>
sex_arr
)
{
this
.
sex_arr
=
sex_arr
;
}
public
Short
getSex_gt
()
{
return
sex_gt
;
}
public
void
setSex_gt
(
Short
sex_gt
)
{
this
.
sex_gt
=
sex_gt
;
}
public
Short
getSex_lt
()
{
return
sex_lt
;
}
public
void
setSex_lt
(
Short
sex_lt
)
{
this
.
sex_lt
=
sex_lt
;
}
public
Short
getSex_gte
()
{
return
sex_gte
;
}
public
void
setSex_gte
(
Short
sex_gte
)
{
this
.
sex_gte
=
sex_gte
;
}
public
Short
getSex_lte
()
{
return
sex_lte
;
}
public
void
setSex_lte
(
Short
sex_lte
)
{
this
.
sex_lte
=
sex_lte
;
}
public
Short
getSex
()
{
if
(
getModel
()
==
null
){
throw
new
RuntimeException
(
"model is null"
);
}
return
this
.
getModel
().
getSex
();
}
public
void
setSex
(
Short
sex
)
{
if
(
getModel
()
==
null
){
throw
new
RuntimeException
(
"model is null"
);
}
this
.
getModel
().
setSex
(
sex
);
}
public
Boolean
getUpperColor_null
()
{
return
upperColor_null
;
}
public
void
setUpperColor_null
(
Boolean
upperColor_null
)
{
this
.
upperColor_null
=
upperColor_null
;
}
public
ArrayList
<
String
>
getUpperColor_arr
()
{
return
upperColor_arr
;
}
public
void
setUpperColor_arr
(
ArrayList
<
String
>
upperColor_arr
)
{
this
.
upperColor_arr
=
upperColor_arr
;
}
public
String
getUpperColor_like
()
{
return
upperColor_like
;
}
public
void
setUpperColor_like
(
String
upperColor_like
)
{
this
.
upperColor_like
=
upperColor_like
;
}
public
String
getUpperColor
()
{
if
(
getModel
()
==
null
){
throw
new
RuntimeException
(
"model is null"
);
}
return
this
.
getModel
().
getUpperColor
();
}
public
void
setUpperColor
(
String
upperColor
)
{
if
(
getModel
()
==
null
){
throw
new
RuntimeException
(
"model is null"
);
}
this
.
getModel
().
setUpperColor
(
upperColor
);
}
public
Boolean
getLowerColor_null
()
{
return
lowerColor_null
;
}
public
void
setLowerColor_null
(
Boolean
lowerColor_null
)
{
this
.
lowerColor_null
=
lowerColor_null
;
}
public
ArrayList
<
String
>
getLowerColor_arr
()
{
return
lowerColor_arr
;
}
public
void
setLowerColor_arr
(
ArrayList
<
String
>
lowerColor_arr
)
{
this
.
lowerColor_arr
=
lowerColor_arr
;
}
public
String
getLowerColor_like
()
{
return
lowerColor_like
;
}
public
void
setLowerColor_like
(
String
lowerColor_like
)
{
this
.
lowerColor_like
=
lowerColor_like
;
}
public
String
getLowerColor
()
{
if
(
getModel
()
==
null
){
throw
new
RuntimeException
(
"model is null"
);
}
return
this
.
getModel
().
getLowerColor
();
}
public
void
setLowerColor
(
String
lowerColor
)
{
if
(
getModel
()
==
null
){
throw
new
RuntimeException
(
"model is null"
);
}
this
.
getModel
().
setLowerColor
(
lowerColor
);
}
}
\ No newline at end of file
\ No newline at end of file
fanxing-commons/src/main/java/com/viontech/fanxing/commons/vobase/TrafficVoBase.java
View file @
3370b9b
...
@@ -67,19 +67,19 @@ public class TrafficVoBase extends Traffic implements VoInterface<Traffic> {
...
@@ -67,19 +67,19 @@ public class TrafficVoBase extends Traffic implements VoInterface<Traffic> {
private
String
eventType_like
;
private
String
eventType_like
;
@JsonIgnore
@JsonIgnore
private
ArrayList
<
Date
>
event
Time
_arr
;
private
ArrayList
<
Date
>
event
Dt
_arr
;
@JsonIgnore
@JsonIgnore
private
Date
event
Time
_gt
;
private
Date
event
Dt
_gt
;
@JsonIgnore
@JsonIgnore
private
Date
event
Time
_lt
;
private
Date
event
Dt
_lt
;
@JsonIgnore
@JsonIgnore
private
Date
event
Time
_gte
;
private
Date
event
Dt
_gte
;
@JsonIgnore
@JsonIgnore
private
Date
event
Time
_lte
;
private
Date
event
Dt
_lte
;
@JsonIgnore
@JsonIgnore
private
Boolean
channelUnid_null
;
private
Boolean
channelUnid_null
;
...
@@ -118,6 +118,15 @@ public class TrafficVoBase extends Traffic implements VoInterface<Traffic> {
...
@@ -118,6 +118,15 @@ public class TrafficVoBase extends Traffic implements VoInterface<Traffic> {
private
String
locationCode_like
;
private
String
locationCode_like
;
@JsonIgnore
@JsonIgnore
private
Boolean
locationName_null
;
@JsonIgnore
private
ArrayList
<
String
>
locationName_arr
;
@JsonIgnore
private
String
locationName_like
;
@JsonIgnore
private
Boolean
laneCode_null
;
private
Boolean
laneCode_null
;
@JsonIgnore
@JsonIgnore
...
@@ -145,6 +154,24 @@ public class TrafficVoBase extends Traffic implements VoInterface<Traffic> {
...
@@ -145,6 +154,24 @@ public class TrafficVoBase extends Traffic implements VoInterface<Traffic> {
private
String
vehicleType_like
;
private
String
vehicleType_like
;
@JsonIgnore
@JsonIgnore
private
Boolean
vehicleColor_null
;
@JsonIgnore
private
ArrayList
<
String
>
vehicleColor_arr
;
@JsonIgnore
private
String
vehicleColor_like
;
@JsonIgnore
private
Boolean
vehicleLogo_null
;
@JsonIgnore
private
ArrayList
<
String
>
vehicleLogo_arr
;
@JsonIgnore
private
String
vehicleLogo_like
;
@JsonIgnore
private
Boolean
illegalCode_null
;
private
Boolean
illegalCode_null
;
@JsonIgnore
@JsonIgnore
...
@@ -172,94 +199,94 @@ public class TrafficVoBase extends Traffic implements VoInterface<Traffic> {
...
@@ -172,94 +199,94 @@ public class TrafficVoBase extends Traffic implements VoInterface<Traffic> {
private
Integer
illegalState_lte
;
private
Integer
illegalState_lte
;
@JsonIgnore
@JsonIgnore
private
Boolean
vehicleColor
_null
;
private
Boolean
featureAnnualInspectionMark
_null
;
@JsonIgnore
@JsonIgnore
private
ArrayList
<
S
tring
>
vehicleColor
_arr
;
private
ArrayList
<
S
hort
>
featureAnnualInspectionMark
_arr
;
@JsonIgnore
@JsonIgnore
private
S
tring
vehicleColor_like
;
private
S
hort
featureAnnualInspectionMark_gt
;
@JsonIgnore
@JsonIgnore
private
Boolean
vehicleLogo_null
;
private
Short
featureAnnualInspectionMark_lt
;
@JsonIgnore
@JsonIgnore
private
ArrayList
<
String
>
vehicleLogo_arr
;
private
Short
featureAnnualInspectionMark_gte
;
@JsonIgnore
@JsonIgnore
private
S
tring
vehicleLogo_lik
e
;
private
S
hort
featureAnnualInspectionMark_lt
e
;
@JsonIgnore
@JsonIgnore
private
Boolean
annualInspectionMark
_null
;
private
Boolean
featurePendant
_null
;
@JsonIgnore
@JsonIgnore
private
ArrayList
<
S
tring
>
annualInspectionMark
_arr
;
private
ArrayList
<
S
hort
>
featurePendant
_arr
;
@JsonIgnore
@JsonIgnore
private
S
tring
annualInspectionMark_like
;
private
S
hort
featurePendant_gt
;
@JsonIgnore
@JsonIgnore
private
Boolean
pendant_null
;
private
Short
featurePendant_lt
;
@JsonIgnore
@JsonIgnore
private
ArrayList
<
String
>
pendant_arr
;
private
Short
featurePendant_gte
;
@JsonIgnore
@JsonIgnore
private
S
tring
pendant_lik
e
;
private
S
hort
featurePendant_lt
e
;
@JsonIgnore
@JsonIgnore
private
Boolean
d
ecoration_null
;
private
Boolean
featureD
ecoration_null
;
@JsonIgnore
@JsonIgnore
private
ArrayList
<
S
tring
>
d
ecoration_arr
;
private
ArrayList
<
S
hort
>
featureD
ecoration_arr
;
@JsonIgnore
@JsonIgnore
private
S
tring
decoration_like
;
private
S
hort
featureDecoration_gt
;
@JsonIgnore
@JsonIgnore
private
Boolean
sunShield_null
;
private
Short
featureDecoration_lt
;
@JsonIgnore
@JsonIgnore
private
ArrayList
<
String
>
sunShield_arr
;
private
Short
featureDecoration_gte
;
@JsonIgnore
@JsonIgnore
private
S
tring
sunShield_lik
e
;
private
S
hort
featureDecoration_lt
e
;
@JsonIgnore
@JsonIgnore
private
Boolean
xcycleType
_null
;
private
Boolean
featureSunShield
_null
;
@JsonIgnore
@JsonIgnore
private
ArrayList
<
S
tring
>
xcycleType
_arr
;
private
ArrayList
<
S
hort
>
featureSunShield
_arr
;
@JsonIgnore
@JsonIgnore
private
S
tring
xcycleType_like
;
private
S
hort
featureSunShield_gt
;
@JsonIgnore
@JsonIgnore
private
Boolean
eventId_null
;
private
Short
featureSunShield_lt
;
@JsonIgnore
@JsonIgnore
private
ArrayList
<
String
>
eventId_arr
;
private
Short
featureSunShield_gte
;
@JsonIgnore
@JsonIgnore
private
S
tring
eventId_lik
e
;
private
S
hort
featureSunShield_lt
e
;
@JsonIgnore
@JsonIgnore
private
Boolean
shootTim
e_null
;
private
Boolean
xcycleTyp
e_null
;
@JsonIgnore
@JsonIgnore
private
ArrayList
<
Date
>
shootTim
e_arr
;
private
ArrayList
<
String
>
xcycleTyp
e_arr
;
@JsonIgnore
@JsonIgnore
private
Date
shootTime_gt
;
private
String
xcycleType_like
;
@JsonIgnore
@JsonIgnore
private
Date
shootTime_lt
;
private
Boolean
eventId_null
;
@JsonIgnore
@JsonIgnore
private
Date
shootTime_gte
;
private
ArrayList
<
String
>
eventId_arr
;
@JsonIgnore
@JsonIgnore
private
Date
shootTime_lt
e
;
private
String
eventId_lik
e
;
@JsonIgnore
@JsonIgnore
private
Boolean
specialType_null
;
private
Boolean
specialType_null
;
...
@@ -572,58 +599,58 @@ public class TrafficVoBase extends Traffic implements VoInterface<Traffic> {
...
@@ -572,58 +599,58 @@ public class TrafficVoBase extends Traffic implements VoInterface<Traffic> {
this
.
getModel
().
setEventType
(
eventType
);
this
.
getModel
().
setEventType
(
eventType
);
}
}
public
ArrayList
<
Date
>
getEvent
Time
_arr
()
{
public
ArrayList
<
Date
>
getEvent
Dt
_arr
()
{
return
event
Time
_arr
;
return
event
Dt
_arr
;
}
}
public
void
setEvent
Time_arr
(
ArrayList
<
Date
>
eventTime
_arr
)
{
public
void
setEvent
Dt_arr
(
ArrayList
<
Date
>
eventDt
_arr
)
{
this
.
event
Time_arr
=
eventTime
_arr
;
this
.
event
Dt_arr
=
eventDt
_arr
;
}
}
public
Date
getEvent
Time
_gt
()
{
public
Date
getEvent
Dt
_gt
()
{
return
event
Time
_gt
;
return
event
Dt
_gt
;
}
}
public
void
setEvent
Time_gt
(
Date
eventTime
_gt
)
{
public
void
setEvent
Dt_gt
(
Date
eventDt
_gt
)
{
this
.
event
Time_gt
=
eventTime
_gt
;
this
.
event
Dt_gt
=
eventDt
_gt
;
}
}
public
Date
getEvent
Time
_lt
()
{
public
Date
getEvent
Dt
_lt
()
{
return
event
Time
_lt
;
return
event
Dt
_lt
;
}
}
public
void
setEvent
Time_lt
(
Date
eventTime
_lt
)
{
public
void
setEvent
Dt_lt
(
Date
eventDt
_lt
)
{
this
.
event
Time_lt
=
eventTime
_lt
;
this
.
event
Dt_lt
=
eventDt
_lt
;
}
}
public
Date
getEvent
Time
_gte
()
{
public
Date
getEvent
Dt
_gte
()
{
return
event
Time
_gte
;
return
event
Dt
_gte
;
}
}
public
void
setEvent
Time_gte
(
Date
eventTime
_gte
)
{
public
void
setEvent
Dt_gte
(
Date
eventDt
_gte
)
{
this
.
event
Time_gte
=
eventTime
_gte
;
this
.
event
Dt_gte
=
eventDt
_gte
;
}
}
public
Date
getEvent
Time
_lte
()
{
public
Date
getEvent
Dt
_lte
()
{
return
event
Time
_lte
;
return
event
Dt
_lte
;
}
}
public
void
setEvent
Time_lte
(
Date
eventTime
_lte
)
{
public
void
setEvent
Dt_lte
(
Date
eventDt
_lte
)
{
this
.
event
Time_lte
=
eventTime
_lte
;
this
.
event
Dt_lte
=
eventDt
_lte
;
}
}
public
Date
getEvent
Time
()
{
public
Date
getEvent
Dt
()
{
if
(
getModel
()
==
null
){
if
(
getModel
()
==
null
){
throw
new
RuntimeException
(
"model is null"
);
throw
new
RuntimeException
(
"model is null"
);
}
}
return
this
.
getModel
().
getEvent
Time
();
return
this
.
getModel
().
getEvent
Dt
();
}
}
public
void
setEvent
Time
(
Date
eventTime
)
{
public
void
setEvent
Dt
(
Date
eventDt
)
{
if
(
getModel
()
==
null
){
if
(
getModel
()
==
null
){
throw
new
RuntimeException
(
"model is null"
);
throw
new
RuntimeException
(
"model is null"
);
}
}
this
.
getModel
().
setEvent
Time
(
eventTime
);
this
.
getModel
().
setEvent
Dt
(
eventDt
);
}
}
public
Boolean
getChannelUnid_null
()
{
public
Boolean
getChannelUnid_null
()
{
...
@@ -778,6 +805,44 @@ public class TrafficVoBase extends Traffic implements VoInterface<Traffic> {
...
@@ -778,6 +805,44 @@ public class TrafficVoBase extends Traffic implements VoInterface<Traffic> {
this
.
getModel
().
setLocationCode
(
locationCode
);
this
.
getModel
().
setLocationCode
(
locationCode
);
}
}
public
Boolean
getLocationName_null
()
{
return
locationName_null
;
}
public
void
setLocationName_null
(
Boolean
locationName_null
)
{
this
.
locationName_null
=
locationName_null
;
}
public
ArrayList
<
String
>
getLocationName_arr
()
{
return
locationName_arr
;
}
public
void
setLocationName_arr
(
ArrayList
<
String
>
locationName_arr
)
{
this
.
locationName_arr
=
locationName_arr
;
}
public
String
getLocationName_like
()
{
return
locationName_like
;
}
public
void
setLocationName_like
(
String
locationName_like
)
{
this
.
locationName_like
=
locationName_like
;
}
public
String
getLocationName
()
{
if
(
getModel
()
==
null
){
throw
new
RuntimeException
(
"model is null"
);
}
return
this
.
getModel
().
getLocationName
();
}
public
void
setLocationName
(
String
locationName
)
{
if
(
getModel
()
==
null
){
throw
new
RuntimeException
(
"model is null"
);
}
this
.
getModel
().
setLocationName
(
locationName
);
}
public
Boolean
getLaneCode_null
()
{
public
Boolean
getLaneCode_null
()
{
return
laneCode_null
;
return
laneCode_null
;
}
}
...
@@ -892,6 +957,82 @@ public class TrafficVoBase extends Traffic implements VoInterface<Traffic> {
...
@@ -892,6 +957,82 @@ public class TrafficVoBase extends Traffic implements VoInterface<Traffic> {
this
.
getModel
().
setVehicleType
(
vehicleType
);
this
.
getModel
().
setVehicleType
(
vehicleType
);
}
}
public
Boolean
getVehicleColor_null
()
{
return
vehicleColor_null
;
}
public
void
setVehicleColor_null
(
Boolean
vehicleColor_null
)
{
this
.
vehicleColor_null
=
vehicleColor_null
;
}
public
ArrayList
<
String
>
getVehicleColor_arr
()
{
return
vehicleColor_arr
;
}
public
void
setVehicleColor_arr
(
ArrayList
<
String
>
vehicleColor_arr
)
{
this
.
vehicleColor_arr
=
vehicleColor_arr
;
}
public
String
getVehicleColor_like
()
{
return
vehicleColor_like
;
}
public
void
setVehicleColor_like
(
String
vehicleColor_like
)
{
this
.
vehicleColor_like
=
vehicleColor_like
;
}
public
String
getVehicleColor
()
{
if
(
getModel
()
==
null
){
throw
new
RuntimeException
(
"model is null"
);
}
return
this
.
getModel
().
getVehicleColor
();
}
public
void
setVehicleColor
(
String
vehicleColor
)
{
if
(
getModel
()
==
null
){
throw
new
RuntimeException
(
"model is null"
);
}
this
.
getModel
().
setVehicleColor
(
vehicleColor
);
}
public
Boolean
getVehicleLogo_null
()
{
return
vehicleLogo_null
;
}
public
void
setVehicleLogo_null
(
Boolean
vehicleLogo_null
)
{
this
.
vehicleLogo_null
=
vehicleLogo_null
;
}
public
ArrayList
<
String
>
getVehicleLogo_arr
()
{
return
vehicleLogo_arr
;
}
public
void
setVehicleLogo_arr
(
ArrayList
<
String
>
vehicleLogo_arr
)
{
this
.
vehicleLogo_arr
=
vehicleLogo_arr
;
}
public
String
getVehicleLogo_like
()
{
return
vehicleLogo_like
;
}
public
void
setVehicleLogo_like
(
String
vehicleLogo_like
)
{
this
.
vehicleLogo_like
=
vehicleLogo_like
;
}
public
String
getVehicleLogo
()
{
if
(
getModel
()
==
null
){
throw
new
RuntimeException
(
"model is null"
);
}
return
this
.
getModel
().
getVehicleLogo
();
}
public
void
setVehicleLogo
(
String
vehicleLogo
)
{
if
(
getModel
()
==
null
){
throw
new
RuntimeException
(
"model is null"
);
}
this
.
getModel
().
setVehicleLogo
(
vehicleLogo
);
}
public
Boolean
getIllegalCode_null
()
{
public
Boolean
getIllegalCode_null
()
{
return
illegalCode_null
;
return
illegalCode_null
;
}
}
...
@@ -992,232 +1133,252 @@ public class TrafficVoBase extends Traffic implements VoInterface<Traffic> {
...
@@ -992,232 +1133,252 @@ public class TrafficVoBase extends Traffic implements VoInterface<Traffic> {
this
.
getModel
().
setIllegalState
(
illegalState
);
this
.
getModel
().
setIllegalState
(
illegalState
);
}
}
public
Boolean
get
VehicleColor
_null
()
{
public
Boolean
get
FeatureAnnualInspectionMark
_null
()
{
return
vehicleColor
_null
;
return
featureAnnualInspectionMark
_null
;
}
}
public
void
set
VehicleColor_null
(
Boolean
vehicleColor
_null
)
{
public
void
set
FeatureAnnualInspectionMark_null
(
Boolean
featureAnnualInspectionMark
_null
)
{
this
.
vehicleColor_null
=
vehicleColor
_null
;
this
.
featureAnnualInspectionMark_null
=
featureAnnualInspectionMark
_null
;
}
}
public
ArrayList
<
S
tring
>
getVehicleColor
_arr
()
{
public
ArrayList
<
S
hort
>
getFeatureAnnualInspectionMark
_arr
()
{
return
vehicleColor
_arr
;
return
featureAnnualInspectionMark
_arr
;
}
}
public
void
set
VehicleColor_arr
(
ArrayList
<
String
>
vehicleColor
_arr
)
{
public
void
set
FeatureAnnualInspectionMark_arr
(
ArrayList
<
Short
>
featureAnnualInspectionMark
_arr
)
{
this
.
vehicleColor_arr
=
vehicleColor
_arr
;
this
.
featureAnnualInspectionMark_arr
=
featureAnnualInspectionMark
_arr
;
}
}
public
S
tring
getVehicleColor_like
()
{
public
S
hort
getFeatureAnnualInspectionMark_gt
()
{
return
vehicleColor_like
;
return
featureAnnualInspectionMark_gt
;
}
}
public
void
set
VehicleColor_like
(
String
vehicleColor_like
)
{
public
void
set
FeatureAnnualInspectionMark_gt
(
Short
featureAnnualInspectionMark_gt
)
{
this
.
vehicleColor_like
=
vehicleColor_like
;
this
.
featureAnnualInspectionMark_gt
=
featureAnnualInspectionMark_gt
;
}
}
public
String
getVehicleColor
()
{
public
Short
getFeatureAnnualInspectionMark_lt
()
{
if
(
getModel
()
==
null
){
return
featureAnnualInspectionMark_lt
;
throw
new
RuntimeException
(
"model is null"
);
}
return
this
.
getModel
().
getVehicleColor
();
}
}
public
void
setVehicleColor
(
String
vehicleColor
)
{
public
void
setFeatureAnnualInspectionMark_lt
(
Short
featureAnnualInspectionMark_lt
)
{
if
(
getModel
()
==
null
){
this
.
featureAnnualInspectionMark_lt
=
featureAnnualInspectionMark_lt
;
throw
new
RuntimeException
(
"model is null"
);
}
this
.
getModel
().
setVehicleColor
(
vehicleColor
);
}
}
public
Boolean
getVehicleLogo_null
()
{
public
Short
getFeatureAnnualInspectionMark_gte
()
{
return
vehicleLogo_null
;
return
featureAnnualInspectionMark_gte
;
}
}
public
void
set
VehicleLogo_null
(
Boolean
vehicleLogo_null
)
{
public
void
set
FeatureAnnualInspectionMark_gte
(
Short
featureAnnualInspectionMark_gte
)
{
this
.
vehicleLogo_null
=
vehicleLogo_null
;
this
.
featureAnnualInspectionMark_gte
=
featureAnnualInspectionMark_gte
;
}
}
public
ArrayList
<
String
>
getVehicleLogo_arr
()
{
public
Short
getFeatureAnnualInspectionMark_lte
()
{
return
vehicleLogo_arr
;
return
featureAnnualInspectionMark_lte
;
}
}
public
void
set
VehicleLogo_arr
(
ArrayList
<
String
>
vehicleLogo_arr
)
{
public
void
set
FeatureAnnualInspectionMark_lte
(
Short
featureAnnualInspectionMark_lte
)
{
this
.
vehicleLogo_arr
=
vehicleLogo_arr
;
this
.
featureAnnualInspectionMark_lte
=
featureAnnualInspectionMark_lte
;
}
}
public
String
getVehicleLogo_like
()
{
public
Short
getFeatureAnnualInspectionMark
()
{
return
vehicleLogo_like
;
}
public
void
setVehicleLogo_like
(
String
vehicleLogo_like
)
{
this
.
vehicleLogo_like
=
vehicleLogo_like
;
}
public
String
getVehicleLogo
()
{
if
(
getModel
()
==
null
){
if
(
getModel
()
==
null
){
throw
new
RuntimeException
(
"model is null"
);
throw
new
RuntimeException
(
"model is null"
);
}
}
return
this
.
getModel
().
get
VehicleLogo
();
return
this
.
getModel
().
get
FeatureAnnualInspectionMark
();
}
}
public
void
set
VehicleLogo
(
String
vehicleLogo
)
{
public
void
set
FeatureAnnualInspectionMark
(
Short
featureAnnualInspectionMark
)
{
if
(
getModel
()
==
null
){
if
(
getModel
()
==
null
){
throw
new
RuntimeException
(
"model is null"
);
throw
new
RuntimeException
(
"model is null"
);
}
}
this
.
getModel
().
set
VehicleLogo
(
vehicleLogo
);
this
.
getModel
().
set
FeatureAnnualInspectionMark
(
featureAnnualInspectionMark
);
}
}
public
Boolean
get
AnnualInspectionMark
_null
()
{
public
Boolean
get
FeaturePendant
_null
()
{
return
annualInspectionMark
_null
;
return
featurePendant
_null
;
}
}
public
void
set
AnnualInspectionMark_null
(
Boolean
annualInspectionMark
_null
)
{
public
void
set
FeaturePendant_null
(
Boolean
featurePendant
_null
)
{
this
.
annualInspectionMark_null
=
annualInspectionMark
_null
;
this
.
featurePendant_null
=
featurePendant
_null
;
}
}
public
ArrayList
<
S
tring
>
getAnnualInspectionMark
_arr
()
{
public
ArrayList
<
S
hort
>
getFeaturePendant
_arr
()
{
return
annualInspectionMark
_arr
;
return
featurePendant
_arr
;
}
}
public
void
set
AnnualInspectionMark_arr
(
ArrayList
<
String
>
annualInspectionMark
_arr
)
{
public
void
set
FeaturePendant_arr
(
ArrayList
<
Short
>
featurePendant
_arr
)
{
this
.
annualInspectionMark_arr
=
annualInspectionMark
_arr
;
this
.
featurePendant_arr
=
featurePendant
_arr
;
}
}
public
S
tring
getAnnualInspectionMark_like
()
{
public
S
hort
getFeaturePendant_gt
()
{
return
annualInspectionMark_like
;
return
featurePendant_gt
;
}
}
public
void
set
AnnualInspectionMark_like
(
String
annualInspectionMark_like
)
{
public
void
set
FeaturePendant_gt
(
Short
featurePendant_gt
)
{
this
.
annualInspectionMark_like
=
annualInspectionMark_like
;
this
.
featurePendant_gt
=
featurePendant_gt
;
}
}
public
String
getAnnualInspectionMark
()
{
public
Short
getFeaturePendant_lt
()
{
if
(
getModel
()
==
null
){
return
featurePendant_lt
;
throw
new
RuntimeException
(
"model is null"
);
}
return
this
.
getModel
().
getAnnualInspectionMark
();
}
}
public
void
setAnnualInspectionMark
(
String
annualInspectionMark
)
{
public
void
setFeaturePendant_lt
(
Short
featurePendant_lt
)
{
if
(
getModel
()
==
null
){
this
.
featurePendant_lt
=
featurePendant_lt
;
throw
new
RuntimeException
(
"model is null"
);
}
this
.
getModel
().
setAnnualInspectionMark
(
annualInspectionMark
);
}
}
public
Boolean
getPendant_null
()
{
public
Short
getFeaturePendant_gte
()
{
return
pendant_null
;
return
featurePendant_gte
;
}
}
public
void
set
Pendant_null
(
Boolean
pendant_null
)
{
public
void
set
FeaturePendant_gte
(
Short
featurePendant_gte
)
{
this
.
pendant_null
=
pendant_null
;
this
.
featurePendant_gte
=
featurePendant_gte
;
}
}
public
ArrayList
<
String
>
getPendant_arr
()
{
public
Short
getFeaturePendant_lte
()
{
return
pendant_arr
;
return
featurePendant_lte
;
}
}
public
void
set
Pendant_arr
(
ArrayList
<
String
>
pendant_arr
)
{
public
void
set
FeaturePendant_lte
(
Short
featurePendant_lte
)
{
this
.
pendant_arr
=
pendant_arr
;
this
.
featurePendant_lte
=
featurePendant_lte
;
}
}
public
String
getPendant_like
()
{
public
Short
getFeaturePendant
()
{
return
pendant_like
;
}
public
void
setPendant_like
(
String
pendant_like
)
{
this
.
pendant_like
=
pendant_like
;
}
public
String
getPendant
()
{
if
(
getModel
()
==
null
){
if
(
getModel
()
==
null
){
throw
new
RuntimeException
(
"model is null"
);
throw
new
RuntimeException
(
"model is null"
);
}
}
return
this
.
getModel
().
getPendant
();
return
this
.
getModel
().
get
Feature
Pendant
();
}
}
public
void
set
Pendant
(
String
p
endant
)
{
public
void
set
FeaturePendant
(
Short
featureP
endant
)
{
if
(
getModel
()
==
null
){
if
(
getModel
()
==
null
){
throw
new
RuntimeException
(
"model is null"
);
throw
new
RuntimeException
(
"model is null"
);
}
}
this
.
getModel
().
setPendant
(
pendant
);
this
.
getModel
().
setFeaturePendant
(
featurePendant
);
}
public
Boolean
getFeatureDecoration_null
()
{
return
featureDecoration_null
;
}
public
void
setFeatureDecoration_null
(
Boolean
featureDecoration_null
)
{
this
.
featureDecoration_null
=
featureDecoration_null
;
}
public
ArrayList
<
Short
>
getFeatureDecoration_arr
()
{
return
featureDecoration_arr
;
}
public
void
setFeatureDecoration_arr
(
ArrayList
<
Short
>
featureDecoration_arr
)
{
this
.
featureDecoration_arr
=
featureDecoration_arr
;
}
public
Short
getFeatureDecoration_gt
()
{
return
featureDecoration_gt
;
}
public
void
setFeatureDecoration_gt
(
Short
featureDecoration_gt
)
{
this
.
featureDecoration_gt
=
featureDecoration_gt
;
}
}
public
Boolean
getDecoration_null
()
{
public
Short
getFeatureDecoration_lt
()
{
return
decoration_null
;
return
featureDecoration_lt
;
}
}
public
void
set
Decoration_null
(
Boolean
decoration_null
)
{
public
void
set
FeatureDecoration_lt
(
Short
featureDecoration_lt
)
{
this
.
decoration_null
=
decoration_null
;
this
.
featureDecoration_lt
=
featureDecoration_lt
;
}
}
public
ArrayList
<
String
>
getDecoration_arr
()
{
public
Short
getFeatureDecoration_gte
()
{
return
decoration_arr
;
return
featureDecoration_gte
;
}
}
public
void
set
Decoration_arr
(
ArrayList
<
String
>
decoration_arr
)
{
public
void
set
FeatureDecoration_gte
(
Short
featureDecoration_gte
)
{
this
.
decoration_arr
=
decoration_arr
;
this
.
featureDecoration_gte
=
featureDecoration_gte
;
}
}
public
S
tring
getDecoration_lik
e
()
{
public
S
hort
getFeatureDecoration_lt
e
()
{
return
decoration_lik
e
;
return
featureDecoration_lt
e
;
}
}
public
void
set
Decoration_like
(
String
decoration_lik
e
)
{
public
void
set
FeatureDecoration_lte
(
Short
featureDecoration_lt
e
)
{
this
.
decoration_like
=
decoration_lik
e
;
this
.
featureDecoration_lte
=
featureDecoration_lt
e
;
}
}
public
S
tring
get
Decoration
()
{
public
S
hort
getFeature
Decoration
()
{
if
(
getModel
()
==
null
){
if
(
getModel
()
==
null
){
throw
new
RuntimeException
(
"model is null"
);
throw
new
RuntimeException
(
"model is null"
);
}
}
return
this
.
getModel
().
getDecoration
();
return
this
.
getModel
().
get
Feature
Decoration
();
}
}
public
void
set
Decoration
(
String
d
ecoration
)
{
public
void
set
FeatureDecoration
(
Short
featureD
ecoration
)
{
if
(
getModel
()
==
null
){
if
(
getModel
()
==
null
){
throw
new
RuntimeException
(
"model is null"
);
throw
new
RuntimeException
(
"model is null"
);
}
}
this
.
getModel
().
set
Decoration
(
d
ecoration
);
this
.
getModel
().
set
FeatureDecoration
(
featureD
ecoration
);
}
}
public
Boolean
getSunShield_null
()
{
public
Boolean
get
Feature
SunShield_null
()
{
return
s
unShield_null
;
return
featureS
unShield_null
;
}
}
public
void
set
SunShield_null
(
Boolean
s
unShield_null
)
{
public
void
set
FeatureSunShield_null
(
Boolean
featureS
unShield_null
)
{
this
.
sunShield_null
=
s
unShield_null
;
this
.
featureSunShield_null
=
featureS
unShield_null
;
}
}
public
ArrayList
<
S
tring
>
get
SunShield_arr
()
{
public
ArrayList
<
S
hort
>
getFeature
SunShield_arr
()
{
return
s
unShield_arr
;
return
featureS
unShield_arr
;
}
}
public
void
set
SunShield_arr
(
ArrayList
<
String
>
s
unShield_arr
)
{
public
void
set
FeatureSunShield_arr
(
ArrayList
<
Short
>
featureS
unShield_arr
)
{
this
.
sunShield_arr
=
s
unShield_arr
;
this
.
featureSunShield_arr
=
featureS
unShield_arr
;
}
}
public
S
tring
getSunShield_like
()
{
public
S
hort
getFeatureSunShield_gt
()
{
return
sunShield_like
;
return
featureSunShield_gt
;
}
}
public
void
set
SunShield_like
(
String
sunShield_like
)
{
public
void
set
FeatureSunShield_gt
(
Short
featureSunShield_gt
)
{
this
.
sunShield_like
=
sunShield_like
;
this
.
featureSunShield_gt
=
featureSunShield_gt
;
}
}
public
String
getSunShield
()
{
public
Short
getFeatureSunShield_lt
()
{
return
featureSunShield_lt
;
}
public
void
setFeatureSunShield_lt
(
Short
featureSunShield_lt
)
{
this
.
featureSunShield_lt
=
featureSunShield_lt
;
}
public
Short
getFeatureSunShield_gte
()
{
return
featureSunShield_gte
;
}
public
void
setFeatureSunShield_gte
(
Short
featureSunShield_gte
)
{
this
.
featureSunShield_gte
=
featureSunShield_gte
;
}
public
Short
getFeatureSunShield_lte
()
{
return
featureSunShield_lte
;
}
public
void
setFeatureSunShield_lte
(
Short
featureSunShield_lte
)
{
this
.
featureSunShield_lte
=
featureSunShield_lte
;
}
public
Short
getFeatureSunShield
()
{
if
(
getModel
()
==
null
){
if
(
getModel
()
==
null
){
throw
new
RuntimeException
(
"model is null"
);
throw
new
RuntimeException
(
"model is null"
);
}
}
return
this
.
getModel
().
getSunShield
();
return
this
.
getModel
().
get
Feature
SunShield
();
}
}
public
void
set
SunShield
(
String
s
unShield
)
{
public
void
set
FeatureSunShield
(
Short
featureS
unShield
)
{
if
(
getModel
()
==
null
){
if
(
getModel
()
==
null
){
throw
new
RuntimeException
(
"model is null"
);
throw
new
RuntimeException
(
"model is null"
);
}
}
this
.
getModel
().
set
SunShield
(
s
unShield
);
this
.
getModel
().
set
FeatureSunShield
(
featureS
unShield
);
}
}
public
Boolean
getXcycleType_null
()
{
public
Boolean
getXcycleType_null
()
{
...
@@ -1296,68 +1457,6 @@ public class TrafficVoBase extends Traffic implements VoInterface<Traffic> {
...
@@ -1296,68 +1457,6 @@ public class TrafficVoBase extends Traffic implements VoInterface<Traffic> {
this
.
getModel
().
setEventId
(
eventId
);
this
.
getModel
().
setEventId
(
eventId
);
}
}
public
Boolean
getShootTime_null
()
{
return
shootTime_null
;
}
public
void
setShootTime_null
(
Boolean
shootTime_null
)
{
this
.
shootTime_null
=
shootTime_null
;
}
public
ArrayList
<
Date
>
getShootTime_arr
()
{
return
shootTime_arr
;
}
public
void
setShootTime_arr
(
ArrayList
<
Date
>
shootTime_arr
)
{
this
.
shootTime_arr
=
shootTime_arr
;
}
public
Date
getShootTime_gt
()
{
return
shootTime_gt
;
}
public
void
setShootTime_gt
(
Date
shootTime_gt
)
{
this
.
shootTime_gt
=
shootTime_gt
;
}
public
Date
getShootTime_lt
()
{
return
shootTime_lt
;
}
public
void
setShootTime_lt
(
Date
shootTime_lt
)
{
this
.
shootTime_lt
=
shootTime_lt
;
}
public
Date
getShootTime_gte
()
{
return
shootTime_gte
;
}
public
void
setShootTime_gte
(
Date
shootTime_gte
)
{
this
.
shootTime_gte
=
shootTime_gte
;
}
public
Date
getShootTime_lte
()
{
return
shootTime_lte
;
}
public
void
setShootTime_lte
(
Date
shootTime_lte
)
{
this
.
shootTime_lte
=
shootTime_lte
;
}
public
Date
getShootTime
()
{
if
(
getModel
()
==
null
){
throw
new
RuntimeException
(
"model is null"
);
}
return
this
.
getModel
().
getShootTime
();
}
public
void
setShootTime
(
Date
shootTime
)
{
if
(
getModel
()
==
null
){
throw
new
RuntimeException
(
"model is null"
);
}
this
.
getModel
().
setShootTime
(
shootTime
);
}
public
Boolean
getSpecialType_null
()
{
public
Boolean
getSpecialType_null
()
{
return
specialType_null
;
return
specialType_null
;
}
}
...
...
fanxing-forward/pom.xml
View file @
3370b9b
...
@@ -31,6 +31,14 @@
...
@@ -31,6 +31,14 @@
<groupId>
org.springframework.cloud
</groupId>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-consul-config
</artifactId>
<artifactId>
spring-cloud-starter-consul-config
</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-jdbc
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-batch
</artifactId>
</dependency>
</dependencies>
</dependencies>
<build>
<build>
...
...
fanxing-forward/src/main/java/com/viontech/fanxing/forward/ForwardApp.java
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
forward
;
package
com
.
viontech
.
fanxing
.
forward
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.springframework.batch.core.configuration.annotation.EnableBatchProcessing
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.core.task.TaskExecutor
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
import
java.util.concurrent.LinkedBlockingDeque
;
import
java.util.concurrent.RejectedExecutionHandler
;
import
java.util.concurrent.ThreadPoolExecutor
;
import
java.util.concurrent.TimeUnit
;
/**
/**
* .
* .
...
@@ -17,6 +28,8 @@ import org.springframework.scheduling.annotation.EnableScheduling;
...
@@ -17,6 +28,8 @@ import org.springframework.scheduling.annotation.EnableScheduling;
@EnableDiscoveryClient
@EnableDiscoveryClient
@EnableScheduling
@EnableScheduling
@EnableFeignClients
@EnableFeignClients
@EnableTransactionManagement
@EnableBatchProcessing
@Slf4j
@Slf4j
public
class
ForwardApp
{
public
class
ForwardApp
{
...
@@ -28,4 +41,14 @@ public class ForwardApp {
...
@@ -28,4 +41,14 @@ public class ForwardApp {
}
}
}
}
public
static
final
ThreadPoolExecutor
THREAD_POOL_EXECUTOR
=
new
ThreadPoolExecutor
(
50
,
50
,
1
,
TimeUnit
.
MINUTES
,
new
LinkedBlockingDeque
<>(
5000
),
new
ThreadPoolExecutor
.
CallerRunsPolicy
());
@Bean
public
TaskExecutor
taskExecutor
()
{
ThreadPoolTaskExecutor
threadPoolTaskExecutor
=
new
ThreadPoolTaskExecutor
();
threadPoolTaskExecutor
.
setMaxPoolSize
(
30
);
threadPoolTaskExecutor
.
setCorePoolSize
(
10
);
return
threadPoolTaskExecutor
;
}
}
}
fanxing-forward/src/main/java/com/viontech/fanxing/forward/batch/configuration/BehaviorJobConfiguration.java
0 → 100644
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
forward
.
batch
.
configuration
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.viontech.fanxing.commons.constant.RedisKeys
;
import
com.viontech.fanxing.commons.model.Behavior
;
import
com.viontech.fanxing.forward.batch.listener.ExecutionContextClearListener
;
import
com.viontech.fanxing.forward.batch.listener.JobRestartListener
;
import
com.viontech.fanxing.forward.batch.listener.WorkQueueClearChunkListener
;
import
com.viontech.fanxing.forward.batch.processor.BehaviorProcessor
;
import
com.viontech.fanxing.forward.batch.reader.ConcurrencyReader
;
import
com.viontech.fanxing.forward.batch.reader.RedisPopReader
;
import
lombok.extern.slf4j.Slf4j
;
import
org.redisson.api.RedissonClient
;
import
org.springframework.batch.core.Job
;
import
org.springframework.batch.core.Step
;
import
org.springframework.batch.core.configuration.annotation.JobBuilderFactory
;
import
org.springframework.batch.core.configuration.annotation.StepBuilderFactory
;
import
org.springframework.batch.core.launch.support.RunIdIncrementer
;
import
org.springframework.batch.core.repository.JobRepository
;
import
org.springframework.batch.item.ItemReader
;
import
org.springframework.batch.item.ItemStreamReader
;
import
org.springframework.batch.item.ItemWriter
;
import
org.springframework.batch.repeat.RepeatContext
;
import
org.springframework.batch.repeat.RepeatStatus
;
import
org.springframework.batch.repeat.policy.CompletionPolicySupport
;
import
org.springframework.batch.repeat.support.RepeatTemplate
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
javax.sql.DataSource
;
/**
* .
*
* @author 谢明辉
* @date 2021/7/15
*/
@Configuration
@Slf4j
public
class
BehaviorJobConfiguration
{
@Autowired
private
JobBuilderFactory
jobBuilderFactory
;
@Autowired
private
StepBuilderFactory
stepBuilderFactory
;
@Bean
(
name
=
"behaviorJob"
)
public
Job
behaviorJob
(
JobRepository
jobRepository
,
Step
behaviorStep
,
JobRestartListener
jobRestartListener
)
{
return
this
.
jobBuilderFactory
.
get
(
"behaviorJob"
)
.
listener
(
jobRestartListener
)
.
incrementer
(
new
RunIdIncrementer
())
.
repository
(
jobRepository
)
.
start
(
behaviorStep
)
.
build
();
}
@Bean
(
name
=
"behaviorStep"
)
public
Step
behaviorStep
(
ItemReader
<
JSONObject
>
behaviorReader
,
ItemWriter
<
Behavior
>
behaviorWriter
,
BehaviorProcessor
behaviorProcessor
)
{
RepeatTemplate
stepOperations
=
new
RepeatTemplate
();
stepOperations
.
setCompletionPolicy
(
new
CompletionPolicySupport
()
{
@Override
public
boolean
isComplete
(
RepeatContext
context
,
RepeatStatus
result
)
{
return
false
;
}
@Override
public
boolean
isComplete
(
RepeatContext
context
)
{
return
false
;
}
});
return
this
.
stepBuilderFactory
.
get
(
"behaviorStep"
)
.
listener
(
new
ExecutionContextClearListener
())
.<
JSONObject
,
Behavior
>
chunk
(
1
)
.
reader
(
behaviorReader
)
.
processor
(
behaviorProcessor
)
.
writer
(
behaviorWriter
)
.
stepOperations
(
stepOperations
)
.
listener
(
new
WorkQueueClearChunkListener
())
.
build
();
}
@Bean
(
name
=
"behaviorReader"
)
public
ItemReader
<
JSONObject
>
behaviorReader
(
RedissonClient
redissonClient
,
@Value
(
"${spring.cloud.consul.discovery.instance-id}"
)
String
instanceId
)
{
return
new
ConcurrencyReader
<
JSONObject
>()
{
@Override
public
ItemStreamReader
<
JSONObject
>
buildReader
()
{
RedisPopReader
<
JSONObject
>
redisPopReader
=
new
RedisPopReader
<>();
redisPopReader
.
setRedissonClient
(
redissonClient
);
redisPopReader
.
setPopType
(
RedisPopReader
.
POP_TYPE_RPOPLPUSH
);
redisPopReader
.
setKey
(
RedisKeys
.
FORWARD_BEHAVIOR_QUEUE
);
redisPopReader
.
setInstanceId
(
instanceId
);
return
redisPopReader
;
}
};
}
}
fanxing-forward/src/main/java/com/viontech/fanxing/forward/batch/configuration/ForwardJobConfiguration.java
0 → 100644
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
forward
.
batch
.
configuration
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.viontech.fanxing.commons.constant.RedisKeys
;
import
com.viontech.fanxing.forward.batch.listener.ExecutionContextClearListener
;
import
com.viontech.fanxing.forward.batch.listener.JobRestartListener
;
import
com.viontech.fanxing.forward.batch.listener.WorkQueueClearChunkListener
;
import
com.viontech.fanxing.forward.batch.processor.ForwardProcessor
;
import
com.viontech.fanxing.forward.batch.reader.ConcurrencyReader
;
import
com.viontech.fanxing.forward.batch.reader.RedisPopReader
;
import
com.viontech.fanxing.forward.model.ForwardContent
;
import
lombok.extern.slf4j.Slf4j
;
import
org.redisson.api.RedissonClient
;
import
org.springframework.batch.core.Job
;
import
org.springframework.batch.core.Step
;
import
org.springframework.batch.core.configuration.annotation.JobBuilderFactory
;
import
org.springframework.batch.core.configuration.annotation.StepBuilderFactory
;
import
org.springframework.batch.core.launch.support.RunIdIncrementer
;
import
org.springframework.batch.core.repository.JobRepository
;
import
org.springframework.batch.item.ItemReader
;
import
org.springframework.batch.item.ItemStreamReader
;
import
org.springframework.batch.item.ItemWriter
;
import
org.springframework.batch.repeat.RepeatContext
;
import
org.springframework.batch.repeat.RepeatStatus
;
import
org.springframework.batch.repeat.policy.CompletionPolicySupport
;
import
org.springframework.batch.repeat.support.RepeatTemplate
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
javax.sql.DataSource
;
/**
* .
*
* @author 谢明辉
* @date 2021/7/15
*/
@Configuration
@Slf4j
public
class
ForwardJobConfiguration
{
@Autowired
private
JobBuilderFactory
jobBuilderFactory
;
@Autowired
private
StepBuilderFactory
stepBuilderFactory
;
@Bean
(
name
=
"forwardJob"
)
public
Job
forwardJob
(
JobRepository
jobRepository
,
Step
forwardStep
,
JobRestartListener
jobRestartListener
)
{
return
this
.
jobBuilderFactory
.
get
(
"forwardJob"
)
.
listener
(
jobRestartListener
)
.
incrementer
(
new
RunIdIncrementer
())
.
repository
(
jobRepository
)
.
start
(
forwardStep
)
.
build
();
}
@Bean
(
name
=
"forwardStep"
)
public
Step
forwardStep
(
ItemReader
<
JSONObject
>
forwardReader
,
ItemWriter
<
ForwardContent
>
forwardWriter
,
ForwardProcessor
forwardProcessor
)
{
RepeatTemplate
stepOperations
=
new
RepeatTemplate
();
stepOperations
.
setCompletionPolicy
(
new
CompletionPolicySupport
()
{
@Override
public
boolean
isComplete
(
RepeatContext
context
,
RepeatStatus
result
)
{
return
false
;
}
@Override
public
boolean
isComplete
(
RepeatContext
context
)
{
return
false
;
}
});
return
this
.
stepBuilderFactory
.
get
(
"forwardStep"
)
.
listener
(
new
ExecutionContextClearListener
())
.<
JSONObject
,
ForwardContent
>
chunk
(
1
)
.
reader
(
forwardReader
)
.
processor
(
forwardProcessor
)
.
writer
(
forwardWriter
)
.
stepOperations
(
stepOperations
)
.
listener
(
new
WorkQueueClearChunkListener
())
.
build
();
}
@Bean
(
name
=
"forwardReader"
)
public
ItemReader
<
JSONObject
>
forwardReader
(
RedissonClient
redissonClient
,
@Value
(
"${spring.cloud.consul.discovery.instance-id}"
)
String
instanceId
)
{
return
new
ConcurrencyReader
<
JSONObject
>()
{
@Override
public
ItemStreamReader
<
JSONObject
>
buildReader
()
{
RedisPopReader
<
JSONObject
>
redisPopReader
=
new
RedisPopReader
<>();
redisPopReader
.
setRedissonClient
(
redissonClient
);
redisPopReader
.
setPopType
(
RedisPopReader
.
POP_TYPE_RPOPLPUSH
);
redisPopReader
.
setKey
(
RedisKeys
.
FORWARD_BEHAVIOR_QUEUE
);
redisPopReader
.
setInstanceId
(
instanceId
);
return
redisPopReader
;
}
};
}
@Bean
(
name
=
"forwardWriter"
)
public
ItemWriter
<
ForwardContent
>
forwardWriter
(
DataSource
dataSource
)
{
return
list
->
{
for
(
ForwardContent
item
:
list
)
{
log
.
info
(
JSON
.
toJSONString
(
item
));
}
};
// JdbcBatchItemWriter<ForwardData> writer = new JdbcBatchItemWriter<>();
// writer.setItemSqlParameterSourceProvider(new BeanPropertyItemSqlParameterSourceProvider<>());
// String sql = "";
// writer.setSql(sql);
// writer.setDataSource(dataSource);
// return writer;
}
}
fanxing-forward/src/main/java/com/viontech/fanxing/forward/batch/configuration/TrafficFlowJobConfiguration.java
0 → 100644
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
forward
.
batch
.
configuration
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.viontech.fanxing.commons.constant.RedisKeys
;
import
com.viontech.fanxing.forward.batch.listener.ExecutionContextClearListener
;
import
com.viontech.fanxing.forward.batch.listener.JobRestartListener
;
import
com.viontech.fanxing.forward.batch.listener.WorkQueueClearChunkListener
;
import
com.viontech.fanxing.forward.batch.processor.TrafficFlowProcessor
;
import
com.viontech.fanxing.forward.batch.reader.ConcurrencyReader
;
import
com.viontech.fanxing.forward.batch.reader.RedisPopReader
;
import
com.viontech.fanxing.forward.model.TrafficFlowContent
;
import
lombok.extern.slf4j.Slf4j
;
import
org.redisson.api.RedissonClient
;
import
org.springframework.batch.core.Job
;
import
org.springframework.batch.core.Step
;
import
org.springframework.batch.core.configuration.annotation.JobBuilderFactory
;
import
org.springframework.batch.core.configuration.annotation.StepBuilderFactory
;
import
org.springframework.batch.core.launch.support.RunIdIncrementer
;
import
org.springframework.batch.core.repository.JobRepository
;
import
org.springframework.batch.item.ItemReader
;
import
org.springframework.batch.item.ItemStreamReader
;
import
org.springframework.batch.item.ItemWriter
;
import
org.springframework.batch.repeat.RepeatContext
;
import
org.springframework.batch.repeat.RepeatStatus
;
import
org.springframework.batch.repeat.policy.CompletionPolicySupport
;
import
org.springframework.batch.repeat.support.RepeatTemplate
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
javax.sql.DataSource
;
/**
* .
*
* @author 谢明辉
* @date 2021/7/15
*/
@Configuration
@Slf4j
public
class
TrafficFlowJobConfiguration
{
@Autowired
private
JobBuilderFactory
jobBuilderFactory
;
@Autowired
private
StepBuilderFactory
stepBuilderFactory
;
@Bean
(
name
=
"trafficFlowJob"
)
public
Job
trafficFlowJob
(
JobRepository
jobRepository
,
Step
trafficFlowStep
,
JobRestartListener
jobRestartListener
)
{
return
this
.
jobBuilderFactory
.
get
(
"trafficFlowJob"
)
.
listener
(
jobRestartListener
)
.
incrementer
(
new
RunIdIncrementer
())
.
repository
(
jobRepository
)
.
start
(
trafficFlowStep
)
.
build
();
}
@Bean
(
name
=
"trafficFlowStep"
)
public
Step
trafficFlowStep
(
ItemReader
<
JSONObject
>
trafficFlowReader
,
ItemWriter
<
TrafficFlowContent
>
trafficFlowWriter
,
TrafficFlowProcessor
trafficFlowProcessor
)
{
RepeatTemplate
stepOperations
=
new
RepeatTemplate
();
stepOperations
.
setCompletionPolicy
(
new
CompletionPolicySupport
()
{
@Override
public
boolean
isComplete
(
RepeatContext
context
,
RepeatStatus
result
)
{
return
false
;
}
@Override
public
boolean
isComplete
(
RepeatContext
context
)
{
return
false
;
}
});
return
this
.
stepBuilderFactory
.
get
(
"trafficFlowStep"
)
.
listener
(
new
ExecutionContextClearListener
())
.<
JSONObject
,
TrafficFlowContent
>
chunk
(
1
)
.
reader
(
trafficFlowReader
)
.
processor
(
trafficFlowProcessor
)
.
writer
(
trafficFlowWriter
)
.
stepOperations
(
stepOperations
)
.
listener
(
new
WorkQueueClearChunkListener
())
.
build
();
}
@Bean
(
name
=
"trafficFlowReader"
)
public
ItemReader
<
JSONObject
>
trafficFlowReader
(
RedissonClient
redissonClient
,
@Value
(
"${spring.cloud.consul.discovery.instance-id}"
)
String
instanceId
)
{
return
new
ConcurrencyReader
<
JSONObject
>()
{
@Override
public
ItemStreamReader
<
JSONObject
>
buildReader
()
{
RedisPopReader
<
JSONObject
>
redisPopReader
=
new
RedisPopReader
<>();
redisPopReader
.
setRedissonClient
(
redissonClient
);
redisPopReader
.
setPopType
(
RedisPopReader
.
POP_TYPE_RPOPLPUSH
);
redisPopReader
.
setKey
(
RedisKeys
.
FORWARD_BEHAVIOR_QUEUE
);
redisPopReader
.
setInstanceId
(
instanceId
);
return
redisPopReader
;
}
};
}
}
fanxing-forward/src/main/java/com/viontech/fanxing/forward/batch/configuration/TrafficJobConfiguration.java
0 → 100644
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
forward
.
batch
.
configuration
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.viontech.fanxing.commons.constant.RedisKeys
;
import
com.viontech.fanxing.forward.batch.listener.ExecutionContextClearListener
;
import
com.viontech.fanxing.forward.batch.listener.JobRestartListener
;
import
com.viontech.fanxing.forward.batch.listener.WorkQueueClearChunkListener
;
import
com.viontech.fanxing.forward.batch.processor.TrafficProcessor
;
import
com.viontech.fanxing.forward.batch.reader.ConcurrencyReader
;
import
com.viontech.fanxing.forward.batch.reader.RedisPopReader
;
import
com.viontech.fanxing.forward.model.TrafficContent
;
import
lombok.extern.slf4j.Slf4j
;
import
org.redisson.api.RedissonClient
;
import
org.springframework.batch.core.Job
;
import
org.springframework.batch.core.Step
;
import
org.springframework.batch.core.configuration.annotation.JobBuilderFactory
;
import
org.springframework.batch.core.configuration.annotation.StepBuilderFactory
;
import
org.springframework.batch.core.launch.support.RunIdIncrementer
;
import
org.springframework.batch.core.repository.JobRepository
;
import
org.springframework.batch.item.ItemReader
;
import
org.springframework.batch.item.ItemStreamReader
;
import
org.springframework.batch.item.ItemWriter
;
import
org.springframework.batch.repeat.RepeatContext
;
import
org.springframework.batch.repeat.RepeatStatus
;
import
org.springframework.batch.repeat.policy.CompletionPolicySupport
;
import
org.springframework.batch.repeat.support.RepeatTemplate
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
/**
* .
*
* @author 谢明辉
* @date 2021/7/15
*/
@Configuration
@Slf4j
public
class
TrafficJobConfiguration
{
@Autowired
private
JobBuilderFactory
jobBuilderFactory
;
@Autowired
private
StepBuilderFactory
stepBuilderFactory
;
@Bean
(
name
=
"trafficJob"
)
public
Job
trafficJob
(
JobRepository
jobRepository
,
Step
trafficStep
,
JobRestartListener
jobRestartListener
)
{
return
this
.
jobBuilderFactory
.
get
(
"trafficJob"
)
.
listener
(
jobRestartListener
)
.
incrementer
(
new
RunIdIncrementer
())
.
repository
(
jobRepository
)
.
start
(
trafficStep
)
.
build
();
}
@Bean
(
name
=
"trafficStep"
)
public
Step
trafficStep
(
ItemReader
<
JSONObject
>
trafficReader
,
ItemWriter
<
TrafficContent
>
trafficWriter
,
TrafficProcessor
trafficProcessor
)
{
RepeatTemplate
stepOperations
=
new
RepeatTemplate
();
stepOperations
.
setCompletionPolicy
(
new
CompletionPolicySupport
()
{
@Override
public
boolean
isComplete
(
RepeatContext
context
,
RepeatStatus
result
)
{
return
false
;
}
@Override
public
boolean
isComplete
(
RepeatContext
context
)
{
return
false
;
}
});
return
this
.
stepBuilderFactory
.
get
(
"trafficStep"
)
.
listener
(
new
ExecutionContextClearListener
())
.<
JSONObject
,
TrafficContent
>
chunk
(
1
)
.
reader
(
trafficReader
)
.
processor
(
trafficProcessor
)
.
writer
(
trafficWriter
)
.
stepOperations
(
stepOperations
)
.
listener
(
new
WorkQueueClearChunkListener
())
.
build
();
}
@Bean
(
name
=
"trafficReader"
)
public
ItemReader
<
JSONObject
>
trafficReader
(
RedissonClient
redissonClient
,
@Value
(
"${spring.cloud.consul.discovery.instance-id}"
)
String
instanceId
)
{
return
new
ConcurrencyReader
<
JSONObject
>()
{
@Override
public
ItemStreamReader
<
JSONObject
>
buildReader
()
{
RedisPopReader
<
JSONObject
>
redisPopReader
=
new
RedisPopReader
<>();
redisPopReader
.
setRedissonClient
(
redissonClient
);
redisPopReader
.
setPopType
(
RedisPopReader
.
POP_TYPE_RPOPLPUSH
);
redisPopReader
.
setKey
(
RedisKeys
.
FORWARD_TRAFFIC_QUEUE
);
redisPopReader
.
setInstanceId
(
instanceId
);
return
redisPopReader
;
}
};
}
}
fanxing-forward/src/main/java/com/viontech/fanxing/forward/batch/dao/VionMapExecutionContextDao.java
0 → 100644
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
forward
.
batch
.
dao
;
import
org.springframework.batch.core.JobExecution
;
import
org.springframework.batch.core.StepExecution
;
import
org.springframework.batch.core.repository.dao.MapExecutionContextDao
;
import
org.springframework.batch.item.ExecutionContext
;
import
org.springframework.batch.support.transaction.TransactionAwareProxyFactory
;
import
org.springframework.util.Assert
;
import
org.springframework.util.SerializationUtils
;
import
java.io.Serializable
;
import
java.util.Collection
;
import
java.util.concurrent.ConcurrentMap
;
/**
* Created by 苏曼 on 2019/5/22.
*/
public
class
VionMapExecutionContextDao
extends
MapExecutionContextDao
{
private
final
ConcurrentMap
<
ContextKey
,
ExecutionContext
>
contexts
=
TransactionAwareProxyFactory
.
createAppendOnlyTransactionalMap
();
private
static
ExecutionContext
copy
(
ExecutionContext
original
)
{
return
(
ExecutionContext
)
SerializationUtils
.
deserialize
(
SerializationUtils
.
serialize
(
original
));
}
@Override
public
void
clear
()
{
contexts
.
clear
();
}
@Override
public
ExecutionContext
getExecutionContext
(
StepExecution
stepExecution
)
{
return
copy
(
contexts
.
get
(
ContextKey
.
step
(
stepExecution
.
getId
())));
}
@Override
public
void
updateExecutionContext
(
StepExecution
stepExecution
)
{
ExecutionContext
executionContext
=
stepExecution
.
getExecutionContext
();
contexts
.
put
(
ContextKey
.
step
(
stepExecution
.
getId
()),
copy
(
executionContext
));
}
@Override
public
ExecutionContext
getExecutionContext
(
JobExecution
jobExecution
)
{
return
copy
(
contexts
.
get
(
ContextKey
.
job
(
jobExecution
.
getId
())));
}
@Override
public
void
updateExecutionContext
(
JobExecution
jobExecution
)
{
ExecutionContext
executionContext
=
jobExecution
.
getExecutionContext
();
contexts
.
put
(
ContextKey
.
job
(
jobExecution
.
getId
()),
copy
(
executionContext
));
}
@Override
public
void
saveExecutionContext
(
JobExecution
jobExecution
)
{
updateExecutionContext
(
jobExecution
);
}
@Override
public
void
saveExecutionContext
(
StepExecution
stepExecution
)
{
updateExecutionContext
(
stepExecution
);
}
@Override
public
void
saveExecutionContexts
(
Collection
<
StepExecution
>
stepExecutions
)
{
Assert
.
notNull
(
stepExecutions
,
"Attempt to save a nulk collection of step executions"
);
for
(
StepExecution
stepExecution
:
stepExecutions
)
{
saveExecutionContext
(
stepExecution
);
saveExecutionContext
(
stepExecution
.
getJobExecution
());
}
}
public
void
clear
(
JobExecution
jobExecution
)
{
ExecutionContext
executionContext
=
jobExecution
.
getExecutionContext
();
contexts
.
remove
(
ContextKey
.
job
(
jobExecution
.
getId
()));
}
public
void
clear
(
StepExecution
stepExecution
)
{
ExecutionContext
executionContext
=
stepExecution
.
getExecutionContext
();
contexts
.
remove
(
ContextKey
.
step
(
stepExecution
.
getId
()));
}
private
static
final
class
ContextKey
implements
Comparable
<
ContextKey
>,
Serializable
{
private
final
Type
type
;
private
final
long
id
;
private
ContextKey
(
Type
type
,
long
id
)
{
if
(
type
==
null
)
{
throw
new
IllegalStateException
(
"Need a non-null type for a context"
);
}
this
.
type
=
type
;
this
.
id
=
id
;
}
public
static
ContextKey
step
(
long
id
)
{
return
new
ContextKey
(
Type
.
STEP
,
id
);
}
public
static
ContextKey
job
(
long
id
)
{
return
new
ContextKey
(
Type
.
JOB
,
id
);
}
@Override
public
int
compareTo
(
ContextKey
them
)
{
if
(
them
==
null
)
{
return
1
;
}
final
int
idCompare
=
new
Long
(
this
.
id
).
compareTo
(
new
Long
(
them
.
id
));
// JDK6 Make this Long.compare(x,y)
if
(
idCompare
!=
0
)
{
return
idCompare
;
}
final
int
typeCompare
=
this
.
type
.
compareTo
(
them
.
type
);
if
(
typeCompare
!=
0
)
{
return
typeCompare
;
}
return
0
;
}
@Override
public
boolean
equals
(
Object
them
)
{
if
(
them
==
null
)
{
return
false
;
}
if
(
them
instanceof
ContextKey
)
{
return
this
.
equals
((
ContextKey
)
them
);
}
return
false
;
}
public
boolean
equals
(
ContextKey
them
)
{
if
(
them
==
null
)
{
return
false
;
}
return
this
.
id
==
them
.
id
&&
this
.
type
.
equals
(
them
.
type
);
}
@Override
public
int
hashCode
()
{
int
value
=
(
int
)
(
id
^
(
id
>>>
32
));
switch
(
type
)
{
case
STEP:
return
value
;
case
JOB:
return
~
value
;
default
:
throw
new
IllegalStateException
(
"Unknown type encountered in switch: "
+
type
);
}
}
private
static
enum
Type
{
STEP
,
JOB
;}
}
}
fanxing-forward/src/main/java/com/viontech/fanxing/forward/batch/dao/VionMapJobExecutionDao.java
0 → 100644
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
forward
.
batch
.
dao
;
import
org.springframework.batch.core.JobExecution
;
import
org.springframework.batch.core.JobInstance
;
import
org.springframework.batch.core.repository.dao.MapJobExecutionDao
;
import
org.springframework.dao.OptimisticLockingFailureException
;
import
org.springframework.util.Assert
;
import
org.springframework.util.SerializationUtils
;
import
java.util.*
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.concurrent.ConcurrentMap
;
import
java.util.concurrent.atomic.AtomicLong
;
/**
* Created by 苏曼 on 2019/5/22.
*/
public
class
VionMapJobExecutionDao
extends
MapJobExecutionDao
{
private
final
ConcurrentMap
<
Long
,
JobExecution
>
executionsById
=
new
ConcurrentHashMap
<
Long
,
JobExecution
>();
private
final
AtomicLong
currentId
=
new
AtomicLong
(
0L
);
private
static
JobExecution
copy
(
JobExecution
original
)
{
JobExecution
copy
=
(
JobExecution
)
SerializationUtils
.
deserialize
(
SerializationUtils
.
serialize
(
original
));
return
copy
;
}
@Override
public
void
clear
()
{
executionsById
.
clear
();
}
@Override
public
void
saveJobExecution
(
JobExecution
jobExecution
)
{
Assert
.
isTrue
(
jobExecution
.
getId
()
==
null
,
"jobExecution id is not null"
);
Long
newId
=
currentId
.
getAndIncrement
();
jobExecution
.
setId
(
newId
);
jobExecution
.
incrementVersion
();
executionsById
.
put
(
newId
,
copy
(
jobExecution
));
}
@Override
public
List
<
JobExecution
>
findJobExecutions
(
JobInstance
jobInstance
)
{
List
<
JobExecution
>
executions
=
new
ArrayList
<
JobExecution
>();
for
(
JobExecution
exec
:
executionsById
.
values
())
{
if
(
exec
.
getJobInstance
().
equals
(
jobInstance
))
{
executions
.
add
(
copy
(
exec
));
}
}
Collections
.
sort
(
executions
,
new
Comparator
<
JobExecution
>()
{
@Override
public
int
compare
(
JobExecution
e1
,
JobExecution
e2
)
{
long
result
=
(
e1
.
getId
()
-
e2
.
getId
());
if
(
result
>
0
)
{
return
-
1
;
}
else
if
(
result
<
0
)
{
return
1
;
}
else
{
return
0
;
}
}
});
return
executions
;
}
@Override
public
void
updateJobExecution
(
JobExecution
jobExecution
)
{
Long
id
=
jobExecution
.
getId
();
Assert
.
notNull
(
id
,
"JobExecution is expected to have an id (should be saved already)"
);
JobExecution
persistedExecution
=
executionsById
.
get
(
id
);
Assert
.
notNull
(
persistedExecution
,
"JobExecution must already be saved"
);
synchronized
(
jobExecution
)
{
if
(!
persistedExecution
.
getVersion
().
equals
(
jobExecution
.
getVersion
()))
{
throw
new
OptimisticLockingFailureException
(
"Attempt to update step execution id="
+
id
+
" with wrong version ("
+
jobExecution
.
getVersion
()
+
"), where current version is "
+
persistedExecution
.
getVersion
());
}
jobExecution
.
incrementVersion
();
executionsById
.
put
(
id
,
copy
(
jobExecution
));
}
}
@Override
public
JobExecution
getLastJobExecution
(
JobInstance
jobInstance
)
{
JobExecution
lastExec
=
null
;
for
(
JobExecution
exec
:
executionsById
.
values
())
{
if
(!
exec
.
getJobInstance
().
equals
(
jobInstance
))
{
continue
;
}
if
(
lastExec
==
null
)
{
lastExec
=
exec
;
}
if
(
lastExec
.
getCreateTime
().
before
(
exec
.
getCreateTime
()))
{
lastExec
=
exec
;
}
}
return
copy
(
lastExec
);
}
/*
* (non-Javadoc)
*
* @seeorg.springframework.batch.core.repository.dao.JobExecutionDao#
* findRunningJobExecutions(java.lang.String)
*/
@Override
public
Set
<
JobExecution
>
findRunningJobExecutions
(
String
jobName
)
{
Set
<
JobExecution
>
result
=
new
HashSet
<
JobExecution
>();
for
(
JobExecution
exec
:
executionsById
.
values
())
{
if
(!
exec
.
getJobInstance
().
getJobName
().
equals
(
jobName
)
||
!
exec
.
isRunning
())
{
continue
;
}
result
.
add
(
copy
(
exec
));
}
return
result
;
}
/*
* (non-Javadoc)
*
* @see
* org.springframework.batch.core.repository.dao.JobExecutionDao#getJobExecution
* (java.lang.Long)
*/
@Override
public
JobExecution
getJobExecution
(
Long
executionId
)
{
return
copy
(
executionsById
.
get
(
executionId
));
}
@Override
public
void
synchronizeStatus
(
JobExecution
jobExecution
)
{
JobExecution
saved
=
getJobExecution
(
jobExecution
.
getId
());
if
(
saved
.
getVersion
().
intValue
()
!=
jobExecution
.
getVersion
().
intValue
())
{
jobExecution
.
upgradeStatus
(
saved
.
getStatus
());
jobExecution
.
setVersion
(
saved
.
getVersion
());
}
}
public
void
clear
(
JobExecution
jobExecution
)
{
executionsById
.
remove
(
jobExecution
.
getId
());
}
}
fanxing-forward/src/main/java/com/viontech/fanxing/forward/batch/dao/VionMapJobInstanceDao.java
0 → 100644
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
forward
.
batch
.
dao
;
import
org.springframework.batch.core.*
;
import
org.springframework.batch.core.launch.NoSuchJobException
;
import
org.springframework.batch.core.repository.dao.MapJobInstanceDao
;
import
org.springframework.util.Assert
;
import
java.util.*
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.concurrent.atomic.AtomicLong
;
/**
* Created by 苏曼 on 2019/5/22.
*/
public
class
VionMapJobInstanceDao
extends
MapJobInstanceDao
{
private
static
final
String
STAR_WILDCARD
=
"\\*"
;
private
static
final
String
STAR_WILDCARD_PATTERN
=
".*"
;
// JDK6 Make a ConcurrentSkipListSet: tends to add on end
private
final
Map
<
String
,
JobInstance
>
jobInstances
=
new
ConcurrentHashMap
<
String
,
JobInstance
>();
private
final
AtomicLong
currentId
=
new
AtomicLong
(
0L
);
private
JobKeyGenerator
<
JobParameters
>
jobKeyGenerator
=
new
DefaultJobKeyGenerator
();
@Override
public
void
clear
()
{
jobInstances
.
clear
();
}
@Override
public
JobInstance
createJobInstance
(
String
jobName
,
JobParameters
jobParameters
)
{
Assert
.
state
(
getJobInstance
(
jobName
,
jobParameters
)
==
null
,
"JobInstance must not already exist"
);
JobInstance
jobInstance
=
new
JobInstance
(
currentId
.
getAndIncrement
(),
jobName
);
jobInstance
.
incrementVersion
();
jobInstances
.
put
(
jobName
+
"|"
+
jobKeyGenerator
.
generateKey
(
jobParameters
),
jobInstance
);
return
jobInstance
;
}
@Override
public
JobInstance
getJobInstance
(
String
jobName
,
JobParameters
jobParameters
)
{
return
jobInstances
.
get
(
jobName
+
"|"
+
jobKeyGenerator
.
generateKey
(
jobParameters
));
}
@Override
public
JobInstance
getJobInstance
(
Long
instanceId
)
{
for
(
Map
.
Entry
<
String
,
JobInstance
>
instanceEntry
:
jobInstances
.
entrySet
())
{
JobInstance
instance
=
instanceEntry
.
getValue
();
if
(
instance
.
getId
().
equals
(
instanceId
))
{
return
instance
;
}
}
return
null
;
}
@Override
public
List
<
String
>
getJobNames
()
{
List
<
String
>
result
=
new
ArrayList
<
String
>();
for
(
Map
.
Entry
<
String
,
JobInstance
>
instanceEntry
:
jobInstances
.
entrySet
())
{
result
.
add
(
instanceEntry
.
getValue
().
getJobName
());
}
Collections
.
sort
(
result
);
return
result
;
}
@Override
public
List
<
JobInstance
>
getJobInstances
(
String
jobName
,
int
start
,
int
count
)
{
List
<
JobInstance
>
result
=
new
ArrayList
<
JobInstance
>();
for
(
Map
.
Entry
<
String
,
JobInstance
>
instanceEntry
:
jobInstances
.
entrySet
())
{
JobInstance
instance
=
instanceEntry
.
getValue
();
if
(
instance
.
getJobName
().
equals
(
jobName
))
{
result
.
add
(
instance
);
}
}
sortDescending
(
result
);
return
subset
(
result
,
start
,
count
);
}
@Override
public
JobInstance
getJobInstance
(
JobExecution
jobExecution
)
{
return
jobExecution
.
getJobInstance
();
}
@Override
public
int
getJobInstanceCount
(
String
jobName
)
throws
NoSuchJobException
{
int
count
=
0
;
for
(
Map
.
Entry
<
String
,
JobInstance
>
instanceEntry
:
jobInstances
.
entrySet
())
{
String
key
=
instanceEntry
.
getKey
();
String
curJobName
=
key
.
substring
(
0
,
key
.
lastIndexOf
(
"|"
));
if
(
curJobName
.
equals
(
jobName
))
{
count
++;
}
}
if
(
count
==
0
)
{
throw
new
NoSuchJobException
(
"No job instances for job name "
+
jobName
+
" were found"
);
}
else
{
return
count
;
}
}
@Override
public
List
<
JobInstance
>
findJobInstancesByName
(
String
jobName
,
int
start
,
int
count
)
{
List
<
JobInstance
>
result
=
new
ArrayList
<
JobInstance
>();
String
convertedJobName
=
jobName
.
replaceAll
(
STAR_WILDCARD
,
STAR_WILDCARD_PATTERN
);
for
(
Map
.
Entry
<
String
,
JobInstance
>
instanceEntry
:
jobInstances
.
entrySet
())
{
JobInstance
instance
=
instanceEntry
.
getValue
();
if
(
instance
.
getJobName
().
matches
(
convertedJobName
))
{
result
.
add
(
instance
);
}
}
sortDescending
(
result
);
return
subset
(
result
,
start
,
count
);
}
private
void
sortDescending
(
List
<
JobInstance
>
result
)
{
Collections
.
sort
(
result
,
new
Comparator
<
JobInstance
>()
{
@Override
public
int
compare
(
JobInstance
o1
,
JobInstance
o2
)
{
return
Long
.
signum
(
o2
.
getId
()
-
o1
.
getId
());
}
});
}
private
List
<
JobInstance
>
subset
(
List
<
JobInstance
>
jobInstances
,
int
start
,
int
count
)
{
int
startIndex
=
Math
.
min
(
start
,
jobInstances
.
size
());
int
endIndex
=
Math
.
min
(
start
+
count
,
jobInstances
.
size
());
return
jobInstances
.
subList
(
startIndex
,
endIndex
);
}
public
void
clear
(
JobInstance
jobInstance
)
{
Long
instanceId
=
jobInstance
.
getId
();
String
key
=
null
;
for
(
Map
.
Entry
<
String
,
JobInstance
>
instanceEntry
:
jobInstances
.
entrySet
())
{
JobInstance
instance
=
instanceEntry
.
getValue
();
if
(
instance
.
getId
().
equals
(
instanceId
))
{
key
=
instanceEntry
.
getKey
();
break
;
}
}
if
(
key
!=
null
)
{
jobInstances
.
remove
(
key
);
}
}
}
fanxing-forward/src/main/java/com/viontech/fanxing/forward/batch/dao/VionMapJobRepositoryFactoryBean.java
0 → 100644
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
forward
.
batch
.
dao
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.batch.core.JobExecution
;
import
org.springframework.batch.core.JobInstance
;
import
org.springframework.batch.core.StepExecution
;
import
org.springframework.batch.core.launch.NoSuchJobException
;
import
org.springframework.batch.core.repository.dao.ExecutionContextDao
;
import
org.springframework.batch.core.repository.dao.JobExecutionDao
;
import
org.springframework.batch.core.repository.dao.JobInstanceDao
;
import
org.springframework.batch.core.repository.dao.StepExecutionDao
;
import
org.springframework.batch.core.repository.support.MapJobRepositoryFactoryBean
;
import
org.springframework.batch.support.transaction.ResourcelessTransactionManager
;
import
org.springframework.transaction.PlatformTransactionManager
;
import
java.util.Collection
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.Set
;
/**
* Created by 苏曼 on 2019/5/22.
*/
public
class
VionMapJobRepositoryFactoryBean
extends
MapJobRepositoryFactoryBean
{
private
final
Logger
logger
=
LoggerFactory
.
getLogger
(
VionMapJobRepositoryFactoryBean
.
class
);
private
VionMapJobExecutionDao
jobExecutionDao
;
private
VionMapJobInstanceDao
jobInstanceDao
;
private
VionMapStepExecutionDao
stepExecutionDao
;
private
VionMapExecutionContextDao
executionContextDao
;
/**
* Create a new instance with a {@link ResourcelessTransactionManager}.
*/
public
VionMapJobRepositoryFactoryBean
()
{
this
(
new
ResourcelessTransactionManager
());
}
/**
* Create a new instance with the provided transaction manager.
*
* @param transactionManager {@link PlatformTransactionManager}
*/
public
VionMapJobRepositoryFactoryBean
(
PlatformTransactionManager
transactionManager
)
{
setTransactionManager
(
transactionManager
);
}
@Override
public
JobExecutionDao
getJobExecutionDao
()
{
return
jobExecutionDao
;
}
@Override
public
JobInstanceDao
getJobInstanceDao
()
{
return
jobInstanceDao
;
}
@Override
public
StepExecutionDao
getStepExecutionDao
()
{
return
stepExecutionDao
;
}
@Override
public
ExecutionContextDao
getExecutionContextDao
()
{
return
executionContextDao
;
}
/**
* Convenience method to clear all the map DAOs globally, removing all
* entities.
*/
@Override
public
void
clear
()
{
List
<
String
>
jobNameList
=
jobInstanceDao
.
getJobNames
();
Set
<
String
>
jobNames
=
new
HashSet
<>(
jobNameList
);
jobNames
.
forEach
(
jobName
->
{
logger
.
info
(
"开始清除任务:{}"
,
jobName
);
try
{
int
jobInstanceCount
=
jobInstanceDao
.
getJobInstanceCount
(
jobName
);
List
<
JobInstance
>
jobInstances
=
jobInstanceDao
.
getJobInstances
(
jobName
,
0
,
jobInstanceCount
);
jobInstances
.
forEach
(
jobInstance
->
{
List
<
JobExecution
>
jobExecutions
=
jobExecutionDao
.
findJobExecutions
(
jobInstance
);
jobExecutions
.
forEach
(
jobExecution
->
{
if
(!
jobExecution
.
isRunning
())
{
Collection
<
StepExecution
>
stepExecutions
=
jobExecution
.
getStepExecutions
();
stepExecutions
.
forEach
(
stepExecution
->
{
executionContextDao
.
clear
(
stepExecution
);
stepExecutionDao
.
clear
(
stepExecution
);
});
executionContextDao
.
clear
(
jobExecution
);
jobExecutionDao
.
clear
(
jobExecution
);
}
});
jobExecutions
=
jobExecutionDao
.
findJobExecutions
(
jobInstance
);
if
(
jobExecutions
==
null
||
jobExecutions
.
size
()
<=
0
)
{
logger
.
info
(
"清除任务实例:{}"
,
jobInstance
.
getId
());
jobInstanceDao
.
clear
(
jobInstance
);
}
});
}
catch
(
NoSuchJobException
e
)
{
e
.
printStackTrace
();
}
});
}
@Override
protected
JobExecutionDao
createJobExecutionDao
()
throws
Exception
{
jobExecutionDao
=
new
VionMapJobExecutionDao
();
return
jobExecutionDao
;
}
@Override
protected
JobInstanceDao
createJobInstanceDao
()
throws
Exception
{
jobInstanceDao
=
new
VionMapJobInstanceDao
();
return
jobInstanceDao
;
}
@Override
protected
StepExecutionDao
createStepExecutionDao
()
throws
Exception
{
stepExecutionDao
=
new
VionMapStepExecutionDao
();
return
stepExecutionDao
;
}
@Override
protected
ExecutionContextDao
createExecutionContextDao
()
throws
Exception
{
executionContextDao
=
new
VionMapExecutionContextDao
();
return
executionContextDao
;
}
}
fanxing-forward/src/main/java/com/viontech/fanxing/forward/batch/dao/VionMapStepExecutionDao.java
0 → 100644
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
forward
.
batch
.
dao
;
import
org.springframework.batch.core.Entity
;
import
org.springframework.batch.core.JobExecution
;
import
org.springframework.batch.core.StepExecution
;
import
org.springframework.batch.core.repository.dao.MapStepExecutionDao
;
import
org.springframework.dao.OptimisticLockingFailureException
;
import
org.springframework.util.Assert
;
import
org.springframework.util.ReflectionUtils
;
import
org.springframework.util.SerializationUtils
;
import
java.util.*
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.concurrent.atomic.AtomicLong
;
/**
* Created by 苏曼 on 2019/5/22.
*/
public
class
VionMapStepExecutionDao
extends
MapStepExecutionDao
{
private
Map
<
Long
,
Map
<
Long
,
StepExecution
>>
executionsByJobExecutionId
=
new
ConcurrentHashMap
<
Long
,
Map
<
Long
,
StepExecution
>>();
private
Map
<
Long
,
StepExecution
>
executionsByStepExecutionId
=
new
ConcurrentHashMap
<
Long
,
StepExecution
>();
private
AtomicLong
currentId
=
new
AtomicLong
();
private
static
StepExecution
copy
(
StepExecution
original
)
{
return
(
StepExecution
)
SerializationUtils
.
deserialize
(
SerializationUtils
.
serialize
(
original
));
}
private
static
void
copy
(
final
StepExecution
sourceExecution
,
final
StepExecution
targetExecution
)
{
// Cheaper than full serialization is a reflective field copy, which is
// fine for volatile storage
ReflectionUtils
.
doWithFields
(
StepExecution
.
class
,
field
->
{
field
.
setAccessible
(
true
);
field
.
set
(
targetExecution
,
field
.
get
(
sourceExecution
));
},
ReflectionUtils
.
COPYABLE_FIELDS
);
}
@Override
public
void
clear
()
{
executionsByJobExecutionId
.
clear
();
executionsByStepExecutionId
.
clear
();
}
@Override
public
void
saveStepExecution
(
StepExecution
stepExecution
)
{
Assert
.
isTrue
(
stepExecution
.
getId
()
==
null
,
"stepExecution id was not null"
);
Assert
.
isTrue
(
stepExecution
.
getVersion
()
==
null
,
"stepExecution version was not null"
);
Assert
.
notNull
(
stepExecution
.
getJobExecutionId
(),
"JobExecution must be saved already."
);
Map
<
Long
,
StepExecution
>
executions
=
executionsByJobExecutionId
.
get
(
stepExecution
.
getJobExecutionId
());
if
(
executions
==
null
)
{
executions
=
new
ConcurrentHashMap
<
Long
,
StepExecution
>();
executionsByJobExecutionId
.
put
(
stepExecution
.
getJobExecutionId
(),
executions
);
}
stepExecution
.
setId
(
currentId
.
incrementAndGet
());
stepExecution
.
incrementVersion
();
StepExecution
copy
=
copy
(
stepExecution
);
executions
.
put
(
stepExecution
.
getId
(),
copy
);
executionsByStepExecutionId
.
put
(
stepExecution
.
getId
(),
copy
);
}
@Override
public
void
updateStepExecution
(
StepExecution
stepExecution
)
{
Assert
.
notNull
(
stepExecution
.
getJobExecutionId
(),
"jobExecution id is null"
);
Map
<
Long
,
StepExecution
>
executions
=
executionsByJobExecutionId
.
get
(
stepExecution
.
getJobExecutionId
());
Assert
.
notNull
(
executions
,
"step executions for given job execution are expected to be already saved"
);
final
StepExecution
persistedExecution
=
executionsByStepExecutionId
.
get
(
stepExecution
.
getId
());
Assert
.
notNull
(
persistedExecution
,
"step execution is expected to be already saved"
);
synchronized
(
stepExecution
)
{
if
(!
persistedExecution
.
getVersion
().
equals
(
stepExecution
.
getVersion
()))
{
throw
new
OptimisticLockingFailureException
(
"Attempt to update step execution id="
+
stepExecution
.
getId
()
+
" with wrong version ("
+
stepExecution
.
getVersion
()
+
"), where current version is "
+
persistedExecution
.
getVersion
());
}
stepExecution
.
incrementVersion
();
StepExecution
copy
=
new
StepExecution
(
stepExecution
.
getStepName
(),
stepExecution
.
getJobExecution
());
copy
(
stepExecution
,
copy
);
executions
.
put
(
stepExecution
.
getId
(),
copy
);
executionsByStepExecutionId
.
put
(
stepExecution
.
getId
(),
copy
);
}
}
@Override
public
StepExecution
getStepExecution
(
JobExecution
jobExecution
,
Long
stepExecutionId
)
{
return
executionsByStepExecutionId
.
get
(
stepExecutionId
);
}
@Override
public
void
addStepExecutions
(
JobExecution
jobExecution
)
{
Map
<
Long
,
StepExecution
>
executions
=
executionsByJobExecutionId
.
get
(
jobExecution
.
getId
());
if
(
executions
==
null
||
executions
.
isEmpty
())
{
return
;
}
List
<
StepExecution
>
result
=
new
ArrayList
<
StepExecution
>(
executions
.
values
());
result
.
sort
((
Comparator
<
Entity
>)
(
o1
,
o2
)
->
Long
.
signum
(
o2
.
getId
()
-
o1
.
getId
()));
List
<
StepExecution
>
copy
=
new
ArrayList
<
StepExecution
>(
result
.
size
());
for
(
StepExecution
exec
:
result
)
{
copy
.
add
(
copy
(
exec
));
}
jobExecution
.
addStepExecutions
(
copy
);
}
@Override
public
void
saveStepExecutions
(
Collection
<
StepExecution
>
stepExecutions
)
{
Assert
.
notNull
(
stepExecutions
,
"Attempt to save an null collect of step executions"
);
for
(
StepExecution
stepExecution
:
stepExecutions
)
{
saveStepExecution
(
stepExecution
);
}
}
public
void
clear
(
StepExecution
stepExecution
)
{
Long
stepExecutionId
=
stepExecution
.
getId
();
executionsByStepExecutionId
.
remove
(
stepExecutionId
);
Map
<
Long
,
StepExecution
>
stepExecutionMap
=
executionsByJobExecutionId
.
get
(
stepExecution
.
getJobExecutionId
());
if
(
stepExecutionMap
!=
null
&&
stepExecutionMap
.
size
()
>
0
)
{
stepExecutionMap
.
remove
(
stepExecutionId
);
}
if
(
stepExecutionMap
==
null
||
stepExecutionMap
.
size
()
<=
0
)
{
executionsByJobExecutionId
.
remove
(
stepExecution
.
getJobExecutionId
());
}
}
}
fanxing-forward/src/main/java/com/viontech/fanxing/forward/batch/listener/ExecutionContextClearListener.java
0 → 100644
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
forward
.
batch
.
listener
;
import
org.springframework.batch.core.ExitStatus
;
import
org.springframework.batch.core.StepExecution
;
import
org.springframework.batch.core.StepExecutionListener
;
import
java.util.Map
;
import
java.util.Set
;
/**
* Created by 苏曼 on 2018/11/26.
*/
public
class
ExecutionContextClearListener
implements
StepExecutionListener
{
@Override
public
void
beforeStep
(
StepExecution
stepExecution
)
{
}
@Override
public
ExitStatus
afterStep
(
StepExecution
stepExecution
)
{
Set
<
Map
.
Entry
<
String
,
Object
>>
entries
=
stepExecution
.
getExecutionContext
().
entrySet
();
for
(
Map
.
Entry
<
String
,
Object
>
entry
:
entries
)
{
stepExecution
.
getExecutionContext
().
remove
(
entry
.
getKey
());
}
return
null
;
}
}
fanxing-forward/src/main/java/com/viontech/fanxing/forward/batch/listener/JobRestartListener.java
0 → 100644
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
forward
.
batch
.
listener
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.batch.core.*
;
import
org.springframework.batch.core.launch.support.SimpleJobLauncher
;
import
org.springframework.batch.core.repository.JobRepository
;
import
org.springframework.beans.BeansException
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.context.ApplicationContextAware
;
import
org.springframework.core.task.SimpleAsyncTaskExecutor
;
import
org.springframework.stereotype.Component
;
/**
* Created by vion on 2018/8/6.
*/
@Component
(
"jobRestartListener"
)
public
class
JobRestartListener
implements
JobExecutionListener
,
ApplicationContextAware
{
private
Logger
logger
=
LoggerFactory
.
getLogger
(
JobRestartListener
.
class
);
private
ApplicationContext
applicationContext
;
@Autowired
private
JobRepository
jobRepository
;
@Override
public
void
beforeJob
(
JobExecution
jobExecution
)
{
logger
.
info
(
">>>>>>>>>>开始执行{}"
,
jobExecution
.
getJobInstance
().
getJobName
());
}
@Override
public
void
afterJob
(
JobExecution
jobExecution
)
{
// 如果任务失败 那么打印下失败信息
if
(!
jobExecution
.
getExitStatus
().
getExitCode
().
equals
(
ExitStatus
.
COMPLETED
.
getExitCode
())){
logger
.
error
(
"{}任务结束,开始尝试进行重启,结束原因为{}"
,
jobExecution
.
getJobInstance
().
getJobName
(),
jobExecution
.
getExitStatus
().
getExitDescription
());
}
ThreadGroup
threadGroup
=
Thread
.
currentThread
().
getThreadGroup
();
while
(
threadGroup
.
getParent
()
!=
null
){
threadGroup
=
threadGroup
.
getParent
();
}
Job
job
=
(
Job
)
applicationContext
.
getBean
(
jobExecution
.
getJobInstance
().
getJobName
());
try
{
SimpleJobLauncher
sjl
=
new
SimpleJobLauncher
();
sjl
.
setJobRepository
(
jobRepository
);
sjl
.
setTaskExecutor
(
new
SimpleAsyncTaskExecutor
());
sjl
.
afterPropertiesSet
();
JobParametersBuilder
jpb
=
new
JobParametersBuilder
();
jpb
.
addLong
(
"date"
,
System
.
currentTimeMillis
());
sjl
.
run
(
job
,
jpb
.
toJobParameters
());
}
catch
(
Exception
e
)
{
logger
.
error
(
"任务"
+
jobExecution
.
getJobInstance
().
getJobName
()+
"重启失败"
,
e
);
}
}
@Override
public
void
setApplicationContext
(
ApplicationContext
applicationContext
)
throws
BeansException
{
this
.
applicationContext
=
applicationContext
;
}
}
fanxing-forward/src/main/java/com/viontech/fanxing/forward/batch/listener/WorkQueueClearChunkListener.java
0 → 100644
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
forward
.
batch
.
listener
;
import
com.viontech.fanxing.commons.config.ApplicationContextProvider
;
import
com.viontech.fanxing.forward.batch.reader.RedisPopReader
;
import
org.redisson.api.RedissonClient
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.batch.core.ChunkListener
;
import
org.springframework.batch.core.scope.context.ChunkContext
;
import
org.springframework.data.redis.core.RedisTemplate
;
/**
* Created by 苏曼 on 2019/6/12.
*/
public
class
WorkQueueClearChunkListener
implements
ChunkListener
{
Logger
logger
=
LoggerFactory
.
getLogger
(
WorkQueueClearChunkListener
.
class
);
@Override
public
void
beforeChunk
(
ChunkContext
context
)
{
logger
.
info
(
"WorkQueueClearChunkListener.beforeChunk"
);
}
@Override
public
void
afterChunk
(
ChunkContext
context
)
{
String
workQueueName
=
(
String
)
context
.
getStepContext
().
getStepExecution
().
getExecutionContext
().
remove
(
RedisPopReader
.
WORK_QUEUE_NAME
);
RedissonClient
redissonClient
=
ApplicationContextProvider
.
getBean
(
RedissonClient
.
class
);
if
(
workQueueName
!=
null
)
{
long
delete
=
redissonClient
.
getKeys
().
delete
(
workQueueName
);
}
logger
.
debug
(
"WorkQueueClearChunkListener.afterChunk {}"
,
workQueueName
);
}
@Override
public
void
afterChunkError
(
ChunkContext
context
)
{
String
workQueueName
=
(
String
)
context
.
getStepContext
().
getStepExecution
().
getExecutionContext
().
remove
(
RedisPopReader
.
WORK_QUEUE_NAME
);
logger
.
debug
(
"WorkQueueClearChunkListener.afterChunkError {}"
,
workQueueName
);
}
}
fanxing-forward/src/main/java/com/viontech/fanxing/forward/batch/processor/BehaviorProcessor.java
0 → 100644
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
forward
.
batch
.
processor
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.viontech.fanxing.commons.model.Behavior
;
import
com.viontech.fanxing.commons.model.Task
;
import
com.viontech.fanxing.forward.util.CacheUtils
;
import
com.viontech.keliu.util.DateUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.batch.item.ExecutionContext
;
import
org.springframework.batch.item.ItemProcessor
;
import
org.springframework.batch.item.ItemStream
;
import
org.springframework.batch.item.ItemStreamException
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.Resource
;
import
java.util.Date
;
import
java.util.Map
;
/**
* .
*
* @author 谢明辉
* @date 2021/7/15
*/
@Component
@Slf4j
public
class
BehaviorProcessor
implements
ItemStream
,
ItemProcessor
<
JSONObject
,
Behavior
>
{
@Resource
private
CacheUtils
cacheUtils
;
@Override
public
Behavior
process
(
JSONObject
item
)
throws
Exception
{
// final Map<String, Task> taskMap = cacheUtils.getTaskMap();
// String taskUnid = item.getString("task_id");
// final Task task = taskMap.get(taskUnid);
// if (task == null) {
// log.info("无法找到对应task:{}", item.toJSONString());
// return null;
// }
// final Long taskId = task.getId();
Behavior
behavior
=
new
Behavior
();
// behavior.setTaskId(taskId);
String
eventType
=
item
.
getString
(
"event_type"
);
String
eventRefid
=
item
.
getString
(
"event_refid"
);
String
eventDt
=
item
.
getString
(
"event_dt"
);
String
eventCate
=
item
.
getString
(
"event_cate"
);
String
channelUnid
=
item
.
getString
(
"vchan_refid"
);
String
taskName
=
item
.
getString
(
"task_name"
);
Date
eventTime
=
DateUtil
.
parse
(
DateUtil
.
FORMAT_FULL
,
eventDt
);
JSONObject
eventData
=
item
.
getJSONObject
(
"event_data"
);
JSONArray
video
=
item
.
getJSONArray
(
"video"
);
JSONArray
pics
=
item
.
getJSONArray
(
"pics"
);
JSONObject
auxDevInfo
=
item
.
getJSONObject
(
"aux_dev_info"
);
behavior
.
setEventType
(
eventType
);
behavior
.
setEventRefid
(
eventRefid
);
behavior
.
setEventTime
(
eventTime
);
behavior
.
setEventCate
(
eventCate
);
behavior
.
setChannelUnid
(
channelUnid
);
behavior
.
setTaskName
(
taskName
);
behavior
.
setEventData
(
eventData
==
null
?
null
:
eventData
.
toJSONString
());
behavior
.
setVideo
(
video
==
null
?
null
:
video
.
toJSONString
());
behavior
.
setPics
(
pics
==
null
?
null
:
pics
.
toJSONString
());
behavior
.
setAuxDevInfo
(
auxDevInfo
==
null
?
null
:
auxDevInfo
.
toJSONString
());
return
behavior
;
}
@Override
public
void
open
(
ExecutionContext
executionContext
)
throws
ItemStreamException
{
}
@Override
public
void
update
(
ExecutionContext
executionContext
)
throws
ItemStreamException
{
}
@Override
public
void
close
()
throws
ItemStreamException
{
}
}
fanxing-forward/src/main/java/com/viontech/fanxing/forward/batch/processor/CompositeItemStreamProcessor.java
0 → 100644
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
forward
.
batch
.
processor
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.batch.item.ExecutionContext
;
import
org.springframework.batch.item.ItemProcessor
;
import
org.springframework.batch.item.ItemStream
;
import
org.springframework.batch.item.ItemStreamException
;
import
org.springframework.batch.item.support.CompositeItemProcessor
;
import
org.springframework.beans.factory.InitializingBean
;
import
org.springframework.util.Assert
;
import
java.util.List
;
/**
* 支持Stream
* Created by suman on 2018/7/19.
*/
public
class
CompositeItemStreamProcessor
<
I
,
O
>
extends
CompositeItemProcessor
<
I
,
O
>
implements
ItemStream
,
ItemProcessor
<
I
,
O
>,
InitializingBean
{
private
boolean
ignoreItemStream
=
false
;
private
Logger
logger
=
LoggerFactory
.
getLogger
(
CompositeItemStreamProcessor
.
class
);
public
void
setIgnoreItemStream
(
boolean
ignoreItemStream
)
{
this
.
ignoreItemStream
=
ignoreItemStream
;
}
private
List
<?
extends
ItemProcessor
<?,
?>>
delegates
;
@Override
@SuppressWarnings
(
"unchecked"
)
public
O
process
(
I
item
)
throws
Exception
{
Object
result
=
item
;
long
startAll
=
System
.
currentTimeMillis
();
for
(
ItemProcessor
<?,
?>
delegate
:
delegates
)
{
if
(
result
==
null
)
{
return
null
;
}
long
start
=
System
.
currentTimeMillis
();
result
=
processItem
(
delegate
,
result
);
long
end
=
System
.
currentTimeMillis
();
long
c
=
end
-
start
;
if
(
c
>
1
)
{
logger
.
info
(
delegate
.
getClass
().
getSimpleName
()
+
"Processor执行时间:"
+
(
end
-
start
));
}
}
logger
.
info
(
item
.
getClass
().
getSimpleName
()
+
"整体处理时间:"
+
(
System
.
currentTimeMillis
()
-
startAll
));
return
(
O
)
result
;
}
/*
* Helper method to work around wildcard capture compiler error: see http://docs.oracle.com/javase/tutorial/java/generics/capture.html
* The method process(capture#1-of ?) in the type ItemProcessor<capture#1-of ?,capture#2-of ?> is not applicable for the arguments (Object)
*/
@SuppressWarnings
(
"unchecked"
)
private
<
T
>
Object
processItem
(
ItemProcessor
<
T
,
?>
processor
,
Object
input
)
throws
Exception
{
return
processor
.
process
((
T
)
input
);
}
@Override
public
void
afterPropertiesSet
()
throws
Exception
{
Assert
.
notNull
(
delegates
,
"The 'delegates' may not be null"
);
Assert
.
notEmpty
(
delegates
,
"The 'delegates' may not be empty"
);
}
/**
* Establishes the {@link ItemProcessor} delegates that will work on the item to be
* processed.
* @param delegates list of {@link ItemProcessor} delegates that will work on the
* item.
*/
@Override
public
void
setDelegates
(
List
<?
extends
ItemProcessor
<?,
?>>
delegates
)
{
this
.
delegates
=
delegates
;
}
@Override
public
void
open
(
ExecutionContext
executionContext
)
throws
ItemStreamException
{
for
(
ItemProcessor
<?,
?>
processor
:
delegates
)
{
if
(!
ignoreItemStream
&&
(
processor
instanceof
ItemStream
))
{
((
ItemStream
)
processor
).
open
(
executionContext
);
}
}
}
@Override
public
void
update
(
ExecutionContext
executionContext
)
throws
ItemStreamException
{
for
(
ItemProcessor
<?,
?>
processor
:
delegates
)
{
if
(!
ignoreItemStream
&&
(
processor
instanceof
ItemStream
))
{
((
ItemStream
)
processor
).
update
(
executionContext
);
}
}
}
@Override
public
void
close
()
throws
ItemStreamException
{
for
(
ItemProcessor
<?,
?>
processor
:
delegates
)
{
if
(!
ignoreItemStream
&&
(
processor
instanceof
ItemStream
))
{
((
ItemStream
)
processor
).
close
();
}
}
}
}
fanxing-forward/src/main/java/com/viontech/fanxing/forward/batch/processor/ForwardProcessor.java
0 → 100644
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
forward
.
batch
.
processor
;
import
com.alibaba.fastjson.JSONObject
;
import
com.viontech.fanxing.commons.model.Forward
;
import
com.viontech.fanxing.forward.model.ForwardContent
;
import
com.viontech.fanxing.forward.util.CacheUtils
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.batch.item.ExecutionContext
;
import
org.springframework.batch.item.ItemProcessor
;
import
org.springframework.batch.item.ItemStream
;
import
org.springframework.batch.item.ItemStreamException
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* .
*
* @author 谢明辉
* @date 2021/7/15
*/
@Component
@Slf4j
public
class
ForwardProcessor
implements
ItemStream
,
ItemProcessor
<
JSONObject
,
ForwardContent
>
{
@Resource
private
CacheUtils
cacheUtils
;
@Override
public
ForwardContent
process
(
JSONObject
item
)
throws
Exception
{
List
<
Forward
>
allForward
=
cacheUtils
.
getAllForward
();
String
eventType
=
item
.
getString
(
"event_type"
);
String
eventCate
=
item
.
getString
(
"event_cate"
);
ForwardContent
forwardContent
=
new
ForwardContent
();
forwardContent
.
setJson
(
item
.
toJSONString
());
forwardContent
.
setForwardList
(
allForward
);
return
forwardContent
;
}
@Override
public
void
open
(
ExecutionContext
executionContext
)
throws
ItemStreamException
{
}
@Override
public
void
update
(
ExecutionContext
executionContext
)
throws
ItemStreamException
{
}
@Override
public
void
close
()
throws
ItemStreamException
{
}
}
fanxing-forward/src/main/java/com/viontech/fanxing/forward/batch/processor/TrafficFlowProcessor.java
0 → 100644
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
forward
.
batch
.
processor
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.viontech.fanxing.commons.model.FlowData
;
import
com.viontech.fanxing.commons.model.FlowEvent
;
import
com.viontech.fanxing.commons.model.Task
;
import
com.viontech.fanxing.forward.model.TrafficFlowContent
;
import
com.viontech.fanxing.forward.util.CacheUtils
;
import
com.viontech.keliu.util.DateUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.batch.item.ExecutionContext
;
import
org.springframework.batch.item.ItemProcessor
;
import
org.springframework.batch.item.ItemStream
;
import
org.springframework.batch.item.ItemStreamException
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
/**
* .
*
* @author 谢明辉
* @date 2021/7/15
*/
@Component
@Slf4j
public
class
TrafficFlowProcessor
implements
ItemProcessor
<
JSONObject
,
TrafficFlowContent
>,
ItemStream
{
@Resource
private
CacheUtils
cacheUtils
;
@Override
public
TrafficFlowContent
process
(
JSONObject
item
)
throws
Exception
{
// final Map<String, Task> taskMap = cacheUtils.getTaskMap();
// String taskUnid = item.getString("task_id");
// final Task task = taskMap.get(taskUnid);
// if (task == null) {
// log.info("无法找到对应task:{}", item.toJSONString());
// return null;
// }
// final Long taskId = task.getId();
Long
taskId
=
0L
;
TrafficFlowContent
content
=
new
TrafficFlowContent
();
FlowEvent
flowEvent
=
new
FlowEvent
();
flowEvent
.
setJsonData
(
item
.
toJSONString
());
content
.
setFlowEvent
(
flowEvent
);
ArrayList
<
FlowData
>
flowDataList
=
new
ArrayList
<>();
content
.
setFlowData
(
flowDataList
);
String
eventType
=
item
.
getString
(
"event_type"
);
String
eventRefid
=
item
.
getString
(
"event_refid"
);
String
eventDt
=
item
.
getString
(
"event_dt"
);
Date
eventTime
=
DateUtil
.
parse
(
DateUtil
.
FORMAT_FULL
,
eventDt
);
flowEvent
.
setEventType
(
eventType
);
flowEvent
.
setEventId
(
eventRefid
);
flowEvent
.
setEventTime
(
eventTime
);
// flowEvent.setTaskId(taskId);
JSONObject
eventData
=
item
.
getJSONObject
(
"event_data"
);
if
(
eventData
!=
null
)
{
// 地理位置
JSONObject
location
=
eventData
.
getJSONObject
(
"location"
);
if
(
location
!=
null
)
{
String
code
=
location
.
getString
(
"code"
);
String
name
=
location
.
getString
(
"name"
);
flowEvent
.
setLocationName
(
name
);
flowEvent
.
setLocationCode
(
code
);
}
// 设备
JSONObject
device
=
eventData
.
getJSONObject
(
"device"
);
if
(
device
!=
null
)
{
String
name
=
device
.
getString
(
"name"
);
String
code
=
device
.
getString
(
"code"
);
flowEvent
.
setDeviceName
(
name
);
flowEvent
.
setDeviceCode
(
code
);
}
//大车big_vehicle
flowDataList
.
addAll
(
getFlowData
(
eventTime
,
taskId
,
"big_vehicle"
,
eventData
));
flowDataList
.
addAll
(
getFlowData
(
eventTime
,
taskId
,
"small_vehicle"
,
eventData
));
flowDataList
.
addAll
(
getFlowData
(
eventTime
,
taskId
,
"xcycle"
,
eventData
));
flowDataList
.
addAll
(
getFlowData
(
eventTime
,
taskId
,
"pedestrian"
,
eventData
));
flowDataList
.
addAll
(
getFlowData
(
eventTime
,
taskId
,
"density"
,
eventData
));
flowDataList
.
addAll
(
getFlowData
(
eventTime
,
taskId
,
"Bus"
,
eventData
));
}
return
content
;
}
private
List
<
FlowData
>
getFlowData
(
Date
eventTime
,
Long
taskId
,
String
detectionType
,
JSONObject
eventData
)
{
JSONArray
array
=
eventData
.
getJSONArray
(
detectionType
);
ArrayList
<
FlowData
>
result
=
new
ArrayList
<>();
if
(
array
!=
null
&&
array
.
size
()
>
0
)
{
for
(
int
i
=
0
;
i
<
array
.
size
();
i
++)
{
JSONObject
item
=
array
.
getJSONObject
(
i
);
FlowData
flowData
=
new
FlowData
();
// flowData.setTaskId(taskId);
flowData
.
setDetectionType
(
detectionType
);
flowData
.
setEventTime
(
eventTime
);
flowData
.
setDetectionType
(
detectionType
);
flowData
.
setDirectionCode
(
item
.
getString
(
"direction"
));
flowData
.
setDistance
(
item
.
getFloat
(
"distance"
));
flowData
.
setOccupy
(
item
.
getFloat
(
"occupy"
));
flowData
.
setQueueLength
(
item
.
getFloat
(
"queue_length"
));
flowData
.
setRoadCode
(
item
.
getString
(
"road"
));
flowData
.
setSampleDura
(
item
.
getLong
(
"sample_dura"
));
flowData
.
setSampleNum
(
item
.
getFloat
(
"sample_num"
));
flowData
.
setVelocity
(
item
.
getFloat
(
"velocity"
));
flowData
.
setVelocityUnit
(
item
.
getString
(
"velocity_unit"
));
flowData
.
setTimeOccupy
(
item
.
getFloat
(
"time_occupy"
));
flowData
.
setDistTime
(
item
.
getFloat
(
"dist_time"
));
//行人流量计区域密度
flowData
.
setRegionId
(
item
.
getString
(
"regionid"
));
flowData
.
setRegionName
(
item
.
getString
(
"regionname"
));
JSONArray
postionList
=
item
.
getJSONArray
(
"postion_list"
);
flowData
.
setPositionContent
(
postionList
==
null
?
null
:
postionList
.
toJSONString
());
JSONArray
headList
=
item
.
getJSONArray
(
"head_list"
);
flowData
.
setHeadContent
(
headList
==
null
?
null
:
headList
.
toJSONString
());
flowData
.
setArea
(
item
.
getFloat
(
"area"
));
flowData
.
setDensity
(
item
.
getFloat
(
"density"
));
flowData
.
setSampleNumIn
(
item
.
getFloat
(
"sample_num_in"
));
flowData
.
setSampleNumOut
(
item
.
getFloat
(
"sample_num_out"
));
result
.
add
(
flowData
);
}
}
return
result
;
}
@Override
public
void
open
(
ExecutionContext
executionContext
)
throws
ItemStreamException
{
}
@Override
public
void
update
(
ExecutionContext
executionContext
)
throws
ItemStreamException
{
}
@Override
public
void
close
()
throws
ItemStreamException
{
}
}
fanxing-forward/src/main/java/com/viontech/fanxing/forward/batch/processor/TrafficProcessor.java
0 → 100644
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
forward
.
batch
.
processor
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.viontech.fanxing.commons.model.Task
;
import
com.viontech.fanxing.commons.model.Traffic
;
import
com.viontech.fanxing.commons.model.TrafficFace
;
import
com.viontech.fanxing.forward.model.TrafficContent
;
import
com.viontech.fanxing.forward.util.CacheUtils
;
import
com.viontech.keliu.util.DateUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.batch.item.ExecutionContext
;
import
org.springframework.batch.item.ItemProcessor
;
import
org.springframework.batch.item.ItemStream
;
import
org.springframework.batch.item.ItemStreamException
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Map
;
/**
* .
*
* @author 谢明辉
* @date 2021/7/15
*/
@Component
@Slf4j
public
class
TrafficProcessor
implements
ItemProcessor
<
JSONObject
,
TrafficContent
>,
ItemStream
{
@Resource
private
CacheUtils
cacheUtils
;
@Override
public
TrafficContent
process
(
JSONObject
item
)
throws
Exception
{
// final Map<String, Task> taskMap = cacheUtils.getTaskMap();
//
// String taskUnid = item.getString("task_id");
// final Task task = taskMap.get(taskUnid);
// if (task == null) {
// log.info("无法找到对应task:{}", item.toJSONString());
// return null;
// }
// final Long taskId = task.getId();
TrafficContent
content
=
new
TrafficContent
();
Traffic
traffic
=
new
Traffic
();
traffic
.
setJsonData
(
item
.
toJSONString
());
content
.
setTraffic
(
traffic
);
ArrayList
<
TrafficFace
>
trafficFaces
=
new
ArrayList
<>();
content
.
setTrafficFaces
(
trafficFaces
);
String
eventType
=
item
.
getString
(
"event_type"
);
String
eventCate
=
item
.
getString
(
"event_cate"
);
String
eventRefid
=
item
.
getString
(
"event_refid"
);
String
eventDt
=
item
.
getString
(
"event_dt"
);
Date
eventTime
=
DateUtil
.
parse
(
DateUtil
.
FORMAT_FULL
,
eventDt
);
String
channelUnid
=
item
.
getString
(
"vchan_refid"
);
// todo taskId
traffic
.
setEventCate
(
eventCate
);
traffic
.
setEventType
(
eventType
);
traffic
.
setEventId
(
eventRefid
);
traffic
.
setEventDt
(
eventTime
);
traffic
.
setChannelUnid
(
channelUnid
);
// traffic.setTaskId(taskId);
JSONObject
eventData
=
item
.
getJSONObject
(
"event_data"
);
//非机动车类型
traffic
.
setXcycleType
(
eventData
.
getString
(
"xcycle_type"
));
// 地理位置
JSONObject
location
=
eventData
.
getJSONObject
(
"location"
);
if
(
location
!=
null
)
{
String
locationCode
=
location
.
getString
(
"code"
);
String
locationName
=
location
.
getString
(
"name"
);
// 方向
String
directionCode
=
location
.
getJSONObject
(
"direction"
).
getString
(
"code"
);
traffic
.
setLocationCode
(
locationCode
);
traffic
.
setDirectionCode
(
directionCode
);
traffic
.
setLocationName
(
locationName
);
}
// 车道
JSONObject
lane
=
eventData
.
getJSONObject
(
"lane"
);
if
(
lane
!=
null
)
{
String
laneCode
=
lane
.
getString
(
"code"
);
traffic
.
setLaneCode
(
laneCode
);
}
// 车辆信息
JSONObject
vehicle
=
eventData
.
getJSONObject
(
"vehicle"
);
if
(
vehicle
!=
null
)
{
JSONObject
plate
=
vehicle
.
getJSONObject
(
"plate"
);
if
(
plate
!=
null
)
{
String
plateColor
=
plate
.
getString
(
"color_code"
);
String
plateNumber
=
plate
.
getString
(
"text"
);
traffic
.
setPlateNumber
(
plateNumber
);
traffic
.
setPlateColor
(
plateColor
);
}
JSONObject
body
=
vehicle
.
getJSONObject
(
"body"
);
if
(
body
!=
null
)
{
JSONObject
bodyType
=
body
.
getJSONObject
(
"type"
);
if
(
bodyType
!=
null
)
{
String
vehicleType
=
bodyType
.
getString
(
"code"
);
traffic
.
setVehicleType
(
vehicleType
);
}
JSONObject
bodyColor
=
body
.
getJSONObject
(
"color"
);
if
(
bodyColor
!=
null
)
{
String
vehicleColor
=
bodyColor
.
getString
(
"code"
);
traffic
.
setVehicleColor
(
vehicleColor
);
}
JSONObject
bodyLogo
=
body
.
getJSONObject
(
"logo"
);
if
(
bodyLogo
!=
null
)
{
String
logo
=
bodyLogo
.
getString
(
"code"
);
traffic
.
setVehicleLogo
(
logo
);
}
}
}
// 违法
JSONObject
illegal
=
eventData
.
getJSONObject
(
"illegal"
);
if
(
illegal
!=
null
)
{
Integer
state
=
illegal
.
getInteger
(
"state"
);
String
illegalCode
=
illegal
.
getString
(
"code"
);
traffic
.
setIllegalState
(
state
);
traffic
.
setIllegalCode
(
illegalCode
);
}
// todo RefinedFeature
JSONObject
refinedFeature
=
eventData
.
getJSONObject
(
"RefinedFeature"
);
if
(
refinedFeature
!=
null
)
{
// 年检标
JSONArray
rAnnualInspection
=
refinedFeature
.
getJSONArray
(
"rAnnualInspection"
);
if
(
rAnnualInspection
!=
null
)
{
}
// 摆件
JSONArray
rDecoration
=
refinedFeature
.
getJSONArray
(
"rDecoration"
);
if
(
rDecoration
!=
null
)
{
}
// 吊坠
JSONArray
rPendant
=
refinedFeature
.
getJSONArray
(
"rPendant"
);
if
(
rPendant
!=
null
)
{
}
// 遮阳板
JSONArray
rSunshading
=
refinedFeature
.
getJSONArray
(
"rSunshading"
);
if
(
rSunshading
!=
null
)
{
}
}
//行人事件
JSONObject
driver
=
eventData
.
getJSONObject
(
"driver"
);
if
(
driver
!=
null
&&
(
"pedestrian"
.
equals
(
eventType
)
||
"xcycle"
.
equals
(
eventType
)))
{
JSONArray
face
=
driver
.
getJSONArray
(
"face"
);
if
(
face
!=
null
&&
face
.
size
()
>
0
)
{
for
(
int
i
=
0
;
i
<
face
.
size
();
i
++)
{
TrafficFace
trafficFace
=
new
TrafficFace
();
JSONObject
faceData
=
face
.
getJSONObject
(
i
);
Short
sex
=
faceData
.
getShort
(
"sex"
);
Short
state
=
faceData
.
getShort
(
"state"
);
trafficFace
.
setSex
(
sex
);
trafficFace
.
setState
(
state
);
JSONObject
upbody
=
faceData
.
getJSONObject
(
"upbody"
);
if
(
upbody
!=
null
)
{
String
upperColor
=
upbody
.
getString
(
"color"
);
trafficFace
.
setUpperColor
(
upperColor
);
}
JSONObject
lobody
=
faceData
.
getJSONObject
(
"lobody"
);
if
(
lobody
!=
null
)
{
String
lowerColor
=
lobody
.
getString
(
"color"
);
trafficFace
.
setLowerColor
(
lowerColor
);
}
trafficFaces
.
add
(
trafficFace
);
}
}
}
return
content
;
}
@Override
public
void
open
(
ExecutionContext
executionContext
)
throws
ItemStreamException
{
}
@Override
public
void
update
(
ExecutionContext
executionContext
)
throws
ItemStreamException
{
}
@Override
public
void
close
()
throws
ItemStreamException
{
}
}
fanxing-forward/src/main/java/com/viontech/fanxing/forward/batch/reader/ConcurrencyReader.java
0 → 100644
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
forward
.
batch
.
reader
;
import
org.springframework.batch.item.ExecutionContext
;
import
org.springframework.batch.item.ItemStreamException
;
import
org.springframework.batch.item.ItemStreamReader
;
/**
* Created by 苏曼 on 2019/10/22.
*/
public
abstract
class
ConcurrencyReader
<
T
>
implements
ItemStreamReader
<
T
>
{
ThreadLocal
<
ItemStreamReader
<
T
>>
readerThreadLocal
=
new
ThreadLocal
<>();
@Override
public
T
read
()
throws
Exception
{
ItemStreamReader
<
T
>
reader
=
readerThreadLocal
.
get
();
if
(
reader
==
null
){
reader
=
buildReader
();
readerThreadLocal
.
set
(
reader
);
}
return
reader
.
read
();
}
@Override
public
void
open
(
ExecutionContext
executionContext
)
throws
ItemStreamException
{
ItemStreamReader
<
T
>
reader
=
readerThreadLocal
.
get
();
if
(
reader
==
null
){
reader
=
buildReader
();
readerThreadLocal
.
set
(
reader
);
}
reader
.
open
(
executionContext
);
}
@Override
public
void
update
(
ExecutionContext
executionContext
)
throws
ItemStreamException
{
ItemStreamReader
<
T
>
reader
=
readerThreadLocal
.
get
();
if
(
reader
==
null
){
reader
=
buildReader
();
readerThreadLocal
.
set
(
reader
);
}
reader
.
update
(
executionContext
);
}
@Override
public
void
close
()
throws
ItemStreamException
{
ItemStreamReader
<
T
>
reader
=
readerThreadLocal
.
get
();
if
(
reader
==
null
){
reader
=
buildReader
();
readerThreadLocal
.
set
(
reader
);
}
reader
.
close
();
}
public
abstract
ItemStreamReader
<
T
>
buildReader
();
}
fanxing-forward/src/main/java/com/viontech/fanxing/forward/batch/reader/RedisHashDataReader.java
0 → 100644
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
forward
.
batch
.
reader
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.batch.item.ExecutionContext
;
import
org.springframework.batch.item.ItemStreamException
;
import
org.springframework.batch.item.ItemStreamReader
;
import
org.springframework.data.redis.connection.DataType
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
java.util.Iterator
;
import
java.util.Map
;
import
java.util.Set
;
public
class
RedisHashDataReader
implements
ItemStreamReader
<
Map
<
String
,
Object
>>
{
private
String
keyPattern
=
""
;
private
RedisTemplate
redisTemplate
;
private
Logger
logger
=
LoggerFactory
.
getLogger
(
RedisHashDataReader
.
class
);
private
ThreadLocal
<
Set
<
String
>>
keysThreadLocal
=
new
ThreadLocal
<>();
private
boolean
needDel
=
false
;
public
RedisHashDataReader
(
RedisTemplate
redisTemplate
,
String
keyPattern
)
{
super
();
this
.
keyPattern
=
keyPattern
;
this
.
redisTemplate
=
redisTemplate
;
}
@Override
public
Map
read
()
throws
Exception
{
Set
<
String
>
keys
=
keysThreadLocal
.
get
();
if
(
keys
==
null
)
{
keys
=
redisTemplate
.
keys
(
keyPattern
);
if
(
keys
==
null
||
keys
.
isEmpty
())
{
return
null
;
}
keysThreadLocal
.
set
(
keys
);
}
for
(
Iterator
iterator
=
keys
.
iterator
();
iterator
.
hasNext
();
)
{
String
keyStr
=
(
String
)
iterator
.
next
();
Map
entries
=
null
;
try
{
DataType
dataType
=
redisTemplate
.
type
(
keyStr
);
if
(
dataType
!=
DataType
.
HASH
)
{
continue
;
}
if
(
needDel
)
{
String
processKey
=
keyStr
;
if
(!
keyStr
.
contains
(
"process"
))
{
processKey
=
keyStr
+
":process"
;
}
//改名后处理 是为了防止你在读取后删除时被别人修改
redisTemplate
.
rename
(
keyStr
,
processKey
);
entries
=
redisTemplate
.
boundHashOps
(
processKey
).
entries
();
redisTemplate
.
delete
(
processKey
);
}
else
{
entries
=
redisTemplate
.
boundHashOps
(
keyStr
).
entries
();
}
entries
.
put
(
"redisKey"
,
keyStr
);
iterator
.
remove
();
return
entries
;
}
catch
(
Exception
e
)
{
logger
.
error
(
"读取"
+
keyStr
+
"失败"
,
e
);
e
.
printStackTrace
();
}
}
// 如果数据过滤完成了 移除
keysThreadLocal
.
remove
();
return
null
;
}
public
RedisTemplate
getRedisTemplate
()
{
return
redisTemplate
;
}
public
void
setRedisTemplate
(
RedisTemplate
redisTemplate
)
{
this
.
redisTemplate
=
redisTemplate
;
}
@Override
public
void
open
(
ExecutionContext
executionContext
)
throws
ItemStreamException
{
}
@Override
public
void
update
(
ExecutionContext
executionContext
)
throws
ItemStreamException
{
}
@Override
public
void
close
()
throws
ItemStreamException
{
}
public
String
getKeyPattern
()
{
return
keyPattern
;
}
public
void
setKeyPattern
(
String
keyPattern
)
{
this
.
keyPattern
=
keyPattern
;
}
public
void
setDel
(
boolean
needDel
)
{
this
.
needDel
=
needDel
;
}
}
fanxing-forward/src/main/java/com/viontech/fanxing/forward/batch/reader/RedisPopReader.java
0 → 100644
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
forward
.
batch
.
reader
;
import
org.redisson.api.RBlockingDeque
;
import
org.redisson.api.RedissonClient
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.batch.item.ExecutionContext
;
import
org.springframework.batch.item.ItemStreamException
;
import
org.springframework.batch.item.ItemStreamReader
;
import
java.util.NoSuchElementException
;
import
java.util.UUID
;
import
java.util.concurrent.TimeUnit
;
import
java.util.concurrent.locks.Condition
;
import
java.util.concurrent.locks.ReentrantLock
;
public
class
RedisPopReader
<
T
>
implements
ItemStreamReader
<
T
>
{
public
static
final
int
POP_TYPE_RIGHT
=
0
;
public
static
final
int
POP_TYPE_LEFT
=
1
;
public
static
final
int
POP_TYPE_RPOPLPUSH
=
2
;
public
static
final
long
DEFAULT_AWAIT_IN_MILLIS
=
10000
;
public
static
final
String
WORK_QUEUE_NAME
=
"work_queue_name"
;
public
ReentrantLock
lock
=
new
ReentrantLock
();
public
Condition
notEmpty
=
lock
.
newCondition
();
private
Logger
logger
=
LoggerFactory
.
getLogger
(
RedisPopReader
.
class
);
private
String
key
=
null
;
private
int
popType
=
POP_TYPE_LEFT
;
private
RedissonClient
redissonClient
;
private
long
awaitInMillis
=
0
;
private
int
tryCount
=
0
;
private
long
lastCommitTime
=
System
.
currentTimeMillis
();
private
ExecutionContext
executionContext
=
null
;
private
String
instanceId
=
"defaultInstanceId"
;
@Override
public
T
read
()
throws
Exception
{
if
(
key
==
null
)
{
throw
new
NoSuchElementException
(
"key"
);
}
awaitInMillis
=
DEFAULT_AWAIT_IN_MILLIS
;
tryCount
=
0
;
String
workQueueName
=
null
;
if
(
POP_TYPE_RPOPLPUSH
==
popType
)
{
workQueueName
=
(
String
)
executionContext
.
get
(
WORK_QUEUE_NAME
);
if
(
workQueueName
==
null
)
{
workQueueName
=
key
+
":workQueue:"
+
instanceId
+
":"
+
UUID
.
randomUUID
();
executionContext
.
put
(
WORK_QUEUE_NAME
,
workQueueName
);
}
}
while
(
true
)
{
T
item
;
try
{
if
(
System
.
currentTimeMillis
()
-
lastCommitTime
>
30000
)
{
//如果30s// 了 立马提交一次
lastCommitTime
=
System
.
currentTimeMillis
();
return
null
;
}
RBlockingDeque
<
T
>
queue
=
redissonClient
.
getBlockingDeque
(
key
);
// 开始读取数据 等待30秒
if
(
POP_TYPE_RPOPLPUSH
==
popType
)
{
item
=
queue
.
pollLastAndOfferFirstTo
(
workQueueName
,
DEFAULT_AWAIT_IN_MILLIS
,
TimeUnit
.
MILLISECONDS
);
}
else
if
(
POP_TYPE_LEFT
==
popType
)
{
item
=
queue
.
pollLast
(
DEFAULT_AWAIT_IN_MILLIS
,
TimeUnit
.
MILLISECONDS
);
}
else
{
item
=
queue
.
pollLast
(
DEFAULT_AWAIT_IN_MILLIS
,
TimeUnit
.
MILLISECONDS
);
}
if
(
item
!=
null
)
{
tryCount
=
0
;
//默认等待时间
awaitInMillis
=
DEFAULT_AWAIT_IN_MILLIS
;
return
item
;
}
else
{
tryCount
++;
//如果获取不到
if
(
tryCount
>
10
)
{
lastCommitTime
=
System
.
currentTimeMillis
();
return
null
;
// 那么返回一次null 提交已有的数据
}
}
awaitInMillis
=
DEFAULT_AWAIT_IN_MILLIS
;
//默认等待时间
}
catch
(
Exception
e
)
{
logger
.
error
(
"读取"
+
key
+
"失败"
,
e
);
lock
.
lock
();
try
{
//如果没有任务,休息下再开始处理,防止死循环耗死内存
if
(
awaitInMillis
<
TimeUnit
.
MINUTES
.
toMillis
(
1
))
{
awaitInMillis
+=
awaitInMillis
;
}
else
{
lastCommitTime
=
System
.
currentTimeMillis
();
return
null
;
}
notEmpty
.
await
(
awaitInMillis
,
TimeUnit
.
MILLISECONDS
);
}
catch
(
InterruptedException
e1
)
{
e1
.
printStackTrace
();
}
finally
{
lock
.
unlock
();
}
}
}
}
public
String
getKey
()
{
return
key
;
}
public
void
setKey
(
String
key
)
{
this
.
key
=
key
;
}
public
RedissonClient
getRedissonClient
()
{
return
redissonClient
;
}
public
void
setRedissonClient
(
RedissonClient
redissonClient
)
{
this
.
redissonClient
=
redissonClient
;
}
@Override
public
void
open
(
ExecutionContext
executionContext
)
throws
ItemStreamException
{
this
.
executionContext
=
executionContext
;
}
@Override
public
void
update
(
ExecutionContext
executionContext
)
throws
ItemStreamException
{
this
.
executionContext
=
executionContext
;
}
@Override
public
void
close
()
throws
ItemStreamException
{
}
public
int
getPopType
()
{
return
popType
;
}
public
void
setPopType
(
int
popType
)
{
this
.
popType
=
popType
;
}
public
String
getInstanceId
()
{
return
instanceId
;
}
public
void
setInstanceId
(
String
instanceId
)
{
this
.
instanceId
=
instanceId
;
}
}
fanxing-forward/src/main/java/com/viontech/fanxing/forward/batch/writer/BehaviorWriter.java
0 → 100644
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
forward
.
batch
.
writer
;
import
com.viontech.fanxing.commons.model.Behavior
;
import
org.springframework.batch.item.ItemWriter
;
import
org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate
;
import
org.springframework.jdbc.core.namedparam.SqlParameterSource
;
import
org.springframework.jdbc.core.namedparam.SqlParameterSourceUtils
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* .
*
* @author 谢明辉
* @date 2021/7/16
*/
@Component
public
class
BehaviorWriter
implements
ItemWriter
<
Behavior
>
{
private
static
final
String
INSERT_BEHAVIOR
=
"insert into d_behavior ("
+
"task_id,event_type,event_cate,event_refid,event_time,aux_dev_info,event_data,pics,video,channel_unid,test_pic_file,test_frame_no,task_name,event_data_num) values ("
+
":taskId,:eventType,:eventCate,:eventRefid,:eventTime,:auxDevInfo,:eventData,:pics,:video,:channelUnid,:testPicFile,:testFrameNo,:taskName,:eventDataNum)"
;
@Resource
private
NamedParameterJdbcTemplate
namedParameterJdbcTemplate
;
@Override
public
void
write
(
List
<?
extends
Behavior
>
items
)
throws
Exception
{
SqlParameterSource
[]
batchParam
=
SqlParameterSourceUtils
.
createBatch
(
items
);
namedParameterJdbcTemplate
.
batchUpdate
(
INSERT_BEHAVIOR
,
batchParam
);
}
}
fanxing-forward/src/main/java/com/viontech/fanxing/forward/batch/writer/ForwardWriter.java
0 → 100644
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
forward
.
batch
.
writer
;
import
com.viontech.fanxing.commons.model.Forward
;
import
com.viontech.fanxing.forward.ForwardApp
;
import
com.viontech.fanxing.forward.model.ForwardContent
;
import
org.apache.commons.lang3.tuple.ImmutablePair
;
import
org.springframework.batch.item.ItemWriter
;
import
org.springframework.boot.web.client.RestTemplateBuilder
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.stereotype.Component
;
import
org.springframework.web.client.RestTemplate
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.concurrent.Callable
;
import
java.util.concurrent.Future
;
/**
* .
*
* @author 谢明辉
* @date 2021/7/16
*/
@Component
public
class
ForwardWriter
implements
ItemWriter
<
ForwardContent
>
{
@Resource
private
RestTemplateBuilder
restTemplateBuilder
;
@Override
public
void
write
(
List
<?
extends
ForwardContent
>
items
)
{
RestTemplate
restTemplate
=
restTemplateBuilder
.
build
();
List
<
ImmutablePair
<
Future
<
ResponseEntity
<
String
>>,
HttpCallable
>>
data
=
new
ArrayList
<>();
for
(
ForwardContent
item
:
items
)
{
List
<
Forward
>
forwardList
=
item
.
getForwardList
();
String
json
=
item
.
getJson
();
for
(
Forward
forward
:
forwardList
)
{
HttpCallable
httpCallable
=
new
HttpCallable
(
restTemplate
,
forward
,
json
);
Future
<
ResponseEntity
<
String
>>
future
=
ForwardApp
.
THREAD_POOL_EXECUTOR
.
submit
(
httpCallable
);
ImmutablePair
<
Future
<
ResponseEntity
<
String
>>,
HttpCallable
>
pair
=
ImmutablePair
.
of
(
future
,
httpCallable
);
data
.
add
(
pair
);
}
}
}
private
static
class
HttpCallable
implements
Callable
<
ResponseEntity
<
String
>>
{
private
final
RestTemplate
restTemplate
;
private
final
Forward
forward
;
private
final
String
json
;
public
HttpCallable
(
RestTemplate
restTemplate
,
Forward
forward
,
String
json
)
{
this
.
restTemplate
=
restTemplate
;
this
.
forward
=
forward
;
this
.
json
=
json
;
}
@Override
public
ResponseEntity
<
String
>
call
()
{
return
restTemplate
.
postForEntity
(
forward
.
getUrl
(),
json
,
String
.
class
);
}
}
}
fanxing-forward/src/main/java/com/viontech/fanxing/forward/batch/writer/TrafficFlowWriter.java
0 → 100644
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
forward
.
batch
.
writer
;
import
com.viontech.fanxing.commons.model.FlowData
;
import
com.viontech.fanxing.commons.model.FlowEvent
;
import
com.viontech.fanxing.forward.model.TrafficFlowContent
;
import
org.springframework.batch.item.ItemWriter
;
import
org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate
;
import
org.springframework.jdbc.core.namedparam.SqlParameterSource
;
import
org.springframework.jdbc.core.namedparam.SqlParameterSourceUtils
;
import
org.springframework.jdbc.support.GeneratedKeyHolder
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* .
*
* @author 谢明辉
* @date 2021/7/15
*/
@Component
public
class
TrafficFlowWriter
implements
ItemWriter
<
TrafficFlowContent
>
{
private
final
static
String
INSERT_FLOW_EVENT
=
"insert into d_flow_event ("
+
"task_id,event_type,event_time,event_id,device_code,device_name,location_code,location_name,json_data,pic_name,video_name) values("
+
":taskId,:eventType,:eventTime,:eventId,,:deviceCode,:deviceName,:locationCode,:locationName,:jsonData,:picName,:videoName)"
;
private
final
static
String
INSERT_FLOW_DATA
=
"insert into d_flow_data ("
+
"flow_event_id,task_id,detection_type,road_code,direction_code,sample_dura,sample_num,velocity,velocity_unit,occupy,distance,queue_length,region_id,region_name,position_content,head_content,area,density,sample_num_in,sample_num_out,event_time,dist_time,time_occupy) values ("
+
":flowEventId,:taskId,:detectionType,:roadCode,:directionCode,:sampleDura,:sampleNum,:velocity,:velocityUnit,:occupy,:distance,:queueLength,:regionId,:regionName,:positionContent,:headContent,:area,:density,:sampleNumIn,:sampleNumOut,:eventTime,:distTime,:timeOccupy)"
;
@Resource
private
NamedParameterJdbcTemplate
namedParameterJdbcTemplate
;
@Override
public
void
write
(
List
<?
extends
TrafficFlowContent
>
list
)
{
for
(
TrafficFlowContent
item
:
list
)
{
List
<
FlowData
>
trafficFlowData
=
item
.
getFlowData
();
FlowEvent
flowEvent
=
item
.
getFlowEvent
();
SqlParameterSource
flowEventParam
=
SqlParameterSourceUtils
.
createBatch
(
flowEvent
)[
0
];
GeneratedKeyHolder
generatedKeyHolder
=
new
GeneratedKeyHolder
();
namedParameterJdbcTemplate
.
update
(
INSERT_FLOW_EVENT
,
flowEventParam
,
generatedKeyHolder
);
long
flowEventId
=
generatedKeyHolder
.
getKey
().
longValue
();
if
(
trafficFlowData
!=
null
&&
trafficFlowData
.
size
()
>
0
)
{
trafficFlowData
.
forEach
(
x
->
x
.
setFlowEventId
(
flowEventId
));
SqlParameterSource
[]
flowDataBatchParam
=
SqlParameterSourceUtils
.
createBatch
(
trafficFlowData
);
namedParameterJdbcTemplate
.
batchUpdate
(
INSERT_FLOW_DATA
,
flowDataBatchParam
);
}
}
}
}
fanxing-forward/src/main/java/com/viontech/fanxing/forward/batch/writer/TrafficWriter.java
0 → 100644
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
forward
.
batch
.
writer
;
import
com.viontech.fanxing.commons.model.TrafficFace
;
import
com.viontech.fanxing.forward.model.TrafficContent
;
import
org.springframework.batch.item.ItemWriter
;
import
org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate
;
import
org.springframework.jdbc.core.namedparam.SqlParameterSource
;
import
org.springframework.jdbc.core.namedparam.SqlParameterSourceUtils
;
import
org.springframework.jdbc.support.GeneratedKeyHolder
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* .
*
* @author 谢明辉
* @date 2021/7/15
*/
@Component
public
class
TrafficWriter
implements
ItemWriter
<
TrafficContent
>
{
private
final
static
String
INSERT_TRAFFIC
=
"insert into d_traffic ("
+
"event_cate,event_type,event_dt,channel_unid,plate_color,plate_number,location_code,location_name,lane_code,direction_code,vehicle_type,vehicle_color,vehicle_logo,illegal_code,illegal_state,feature_annual_inspection_mark,feature_pendant,feature_decoration,feature_sun_shield,xcycle_type,event_id,special_type,with_helmet,json_data,pic_name,video_name) values("
+
":eventCate,:eventType,:eventDt,:channelUnid,:plateColor,:plateNumber,:locationCode,:locationName,:laneCode,:directionCode,:vehicleType,:vehicleColor,:vehicleLogo,:illegalCode,:illegalState,:featureAnnualInspectionMark,:featurePendant,:featureDecoration,:featureSunShield,:xcycleType,:eventId,:specialType,:withHelmet,:jsonData,:picName,:videoName)"
;
private
final
static
String
INSERT_TRAFFIC_FACE
=
"insert into d_traffic_face ("
+
"traffic_id,state,sex,upper_color,lower_color) values (:trafficId,:state,:sex,:upperColor,:lowerColor)"
;
@Resource
private
NamedParameterJdbcTemplate
namedParameterJdbcTemplate
;
@Override
public
void
write
(
List
<?
extends
TrafficContent
>
list
)
throws
Exception
{
List
<
TrafficContent
>
withFace
=
new
ArrayList
<>();
List
<
TrafficContent
>
withoutFace
=
new
ArrayList
<>();
for
(
TrafficContent
item
:
list
)
{
if
(
item
.
getTrafficFaces
()
!=
null
&&
item
.
getTrafficFaces
().
size
()
>
0
)
{
withFace
.
add
(
item
);
}
else
{
withoutFace
.
add
(
item
);
}
}
insertWithoutFace
(
withoutFace
);
insertWithFace
(
withFace
);
}
public
void
insertWithFace
(
List
<
TrafficContent
>
list
)
{
if
(
list
==
null
||
list
.
size
()
==
0
)
{
return
;
}
for
(
TrafficContent
item
:
list
)
{
List
<
TrafficFace
>
trafficFaces
=
item
.
getTrafficFaces
();
SqlParameterSource
[]
batch
=
SqlParameterSourceUtils
.
createBatch
(
item
);
SqlParameterSource
param
=
batch
[
0
];
GeneratedKeyHolder
generatedKeyHolder
=
new
GeneratedKeyHolder
();
namedParameterJdbcTemplate
.
update
(
INSERT_TRAFFIC
,
param
,
generatedKeyHolder
);
long
trafficId
=
generatedKeyHolder
.
getKey
().
longValue
();
trafficFaces
.
forEach
(
x
->
x
.
setTrafficId
(
trafficId
));
SqlParameterSource
[]
trafficFaceBatchParam
=
SqlParameterSourceUtils
.
createBatch
(
trafficFaces
);
namedParameterJdbcTemplate
.
batchUpdate
(
INSERT_TRAFFIC_FACE
,
trafficFaceBatchParam
);
}
}
public
void
insertWithoutFace
(
List
<
TrafficContent
>
list
)
{
if
(
list
==
null
||
list
.
size
()
==
0
)
{
return
;
}
SqlParameterSource
[]
batch
=
SqlParameterSourceUtils
.
createBatch
(
list
);
namedParameterJdbcTemplate
.
batchUpdate
(
INSERT_TRAFFIC
,
batch
);
}
}
fanxing-forward/src/main/java/com/viontech/fanxing/forward/config/BatchConfiguration.java
0 → 100644
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
forward
.
config
;
import
com.viontech.fanxing.forward.batch.dao.VionMapJobRepositoryFactoryBean
;
import
org.apache.commons.logging.Log
;
import
org.apache.commons.logging.LogFactory
;
import
org.springframework.batch.core.configuration.BatchConfigurationException
;
import
org.springframework.batch.core.configuration.annotation.BatchConfigurer
;
import
org.springframework.batch.core.explore.JobExplorer
;
import
org.springframework.batch.core.explore.support.MapJobExplorerFactoryBean
;
import
org.springframework.batch.core.launch.JobLauncher
;
import
org.springframework.batch.core.launch.support.SimpleJobLauncher
;
import
org.springframework.batch.core.repository.JobRepository
;
import
org.springframework.batch.support.transaction.ResourcelessTransactionManager
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.transaction.PlatformTransactionManager
;
import
javax.annotation.PostConstruct
;
/**
* Created by 苏曼 on 2019/5/21.
*/
@Configuration
public
class
BatchConfiguration
{
@Bean
public
BatchConfigurer
batchConfigurer
()
{
VionBatchConfigurer
vionBatchConfigurer
=
new
VionBatchConfigurer
();
return
vionBatchConfigurer
;
}
public
class
VionBatchConfigurer
implements
BatchConfigurer
{
private
final
Log
logger
=
LogFactory
.
getLog
(
VionBatchConfigurer
.
class
);
private
PlatformTransactionManager
transactionManager
;
private
JobRepository
jobRepository
;
private
JobLauncher
jobLauncher
;
private
JobExplorer
jobExplorer
;
private
VionMapJobRepositoryFactoryBean
jobRepositoryFactory
;
public
VionMapJobRepositoryFactoryBean
getJobRepositoryFactory
()
{
return
jobRepositoryFactory
;
}
@Override
public
JobRepository
getJobRepository
()
{
return
jobRepository
;
}
@Override
public
PlatformTransactionManager
getTransactionManager
()
{
return
transactionManager
;
}
@Override
public
JobLauncher
getJobLauncher
()
{
return
jobLauncher
;
}
@Override
public
JobExplorer
getJobExplorer
()
{
return
jobExplorer
;
}
@PostConstruct
public
void
initialize
()
{
try
{
logger
.
warn
(
"No datasource was provided...using a Map based JobRepository"
);
if
(
this
.
transactionManager
==
null
)
{
this
.
transactionManager
=
new
ResourcelessTransactionManager
();
}
this
.
jobRepositoryFactory
=
new
VionMapJobRepositoryFactoryBean
(
this
.
transactionManager
);
jobRepositoryFactory
.
afterPropertiesSet
();
this
.
jobRepository
=
jobRepositoryFactory
.
getObject
();
MapJobExplorerFactoryBean
jobExplorerFactory
=
new
MapJobExplorerFactoryBean
(
jobRepositoryFactory
);
jobExplorerFactory
.
afterPropertiesSet
();
this
.
jobExplorer
=
jobExplorerFactory
.
getObject
();
this
.
jobLauncher
=
createJobLauncher
();
}
catch
(
Exception
e
)
{
throw
new
BatchConfigurationException
(
e
);
}
}
protected
JobLauncher
createJobLauncher
()
throws
Exception
{
SimpleJobLauncher
jobLauncher
=
new
SimpleJobLauncher
();
jobLauncher
.
setJobRepository
(
jobRepository
);
jobLauncher
.
afterPropertiesSet
();
return
jobLauncher
;
}
}
}
fanxing-forward/src/main/java/com/viontech/fanxing/forward/controller/DataReceiveController.java
0 → 100644
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
forward
.
controller
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.viontech.fanxing.commons.constant.RedisKeys
;
import
com.viontech.keliu.util.JsonMessageUtil
;
import
org.redisson.api.RBlockingDeque
;
import
org.redisson.api.RBlockingQueue
;
import
org.redisson.api.RedissonClient
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
/**
* .
*
* @author 谢明辉
* @date 2021/7/14
*/
@RestController
public
class
DataReceiveController
{
@Resource
private
RedissonClient
redissonClient
;
@PostMapping
(
"/result"
)
public
Object
result
(
@RequestBody
String
analysisResultStr
)
{
JSONObject
jsonObject
=
JSON
.
parseObject
(
analysisResultStr
);
String
eventCate
=
jsonObject
.
getString
(
"event_cate"
);
String
eventType
=
jsonObject
.
getString
(
"event_type"
);
RBlockingDeque
<
JSONObject
>
queue
=
null
;
RBlockingDeque
<
JSONObject
>
forwardQueue
=
redissonClient
.
getBlockingDeque
(
RedisKeys
.
FORWARD_FORWARD_QUEUE
);
// 综治事件
if
(
"behavior"
.
equals
(
eventCate
))
{
queue
=
redissonClient
.
getBlockingDeque
(
RedisKeys
.
FORWARD_BEHAVIOR_QUEUE
);
}
else
if
(
"traffic"
.
equals
(
eventCate
))
{
// 交通客流
if
(
"tflow"
.
equals
(
eventType
)
||
"pflow"
.
equals
(
eventType
)
||
"pdensity"
.
equals
(
eventType
))
{
queue
=
redissonClient
.
getBlockingDeque
(
RedisKeys
.
FORWARD_FLOW_QUEUE
);
}
// 过车行人
else
{
queue
=
redissonClient
.
getBlockingDeque
(
RedisKeys
.
FORWARD_TRAFFIC_QUEUE
);
}
}
if
(
queue
!=
null
)
{
queue
.
offerFirst
(
jsonObject
);
}
// forwardQueue.offer(jsonObject);
return
JsonMessageUtil
.
getSuccessJsonMsg
(
"OK"
);
}
}
fanxing-forward/src/main/java/com/viontech/fanxing/forward/controller/base/BehaviorBaseController.java
deleted
100644 → 0
View file @
5adeb0c
package
com
.
viontech
.
fanxing
.
forward
.
controller
.
base
;
import
com.viontech.fanxing.commons.base.BaseController
;
import
com.viontech.fanxing.commons.base.BaseExample
;
import
com.viontech.fanxing.commons.base.BaseMapper
;
import
com.viontech.fanxing.commons.base.BaseService
;
import
com.viontech.fanxing.forward.mapper.BehaviorMapper
;
import
com.viontech.fanxing.commons.model.Behavior
;
import
com.viontech.fanxing.commons.model.BehaviorExample
;
import
com.viontech.fanxing.forward.service.adapter.BehaviorService
;
import
com.viontech.fanxing.commons.vo.BehaviorVo
;
import
javax.annotation.Resource
;
public
abstract
class
BehaviorBaseController
extends
BaseController
<
Behavior
,
BehaviorVo
>
{
@Resource
protected
BehaviorService
behaviorService
;
@Override
protected
BaseExample
getExample
(
BehaviorVo
behaviorVo
,
int
type
)
{
BehaviorExample
behaviorExample
=
new
BehaviorExample
();
BehaviorExample
.
Criteria
criteria
=
behaviorExample
.
createCriteria
();
if
(
behaviorVo
.
getId
()
!=
null
)
{
criteria
.
andIdEqualTo
(
behaviorVo
.
getId
());
}
if
(
behaviorVo
.
getId_arr
()
!=
null
)
{
criteria
.
andIdIn
(
behaviorVo
.
getId_arr
());
}
if
(
behaviorVo
.
getId_gt
()
!=
null
)
{
criteria
.
andIdGreaterThan
(
behaviorVo
.
getId_gt
());
}
if
(
behaviorVo
.
getId_lt
()
!=
null
)
{
criteria
.
andIdLessThan
(
behaviorVo
.
getId_lt
());
}
if
(
behaviorVo
.
getId_gte
()
!=
null
)
{
criteria
.
andIdGreaterThanOrEqualTo
(
behaviorVo
.
getId_gte
());
}
if
(
behaviorVo
.
getId_lte
()
!=
null
)
{
criteria
.
andIdLessThanOrEqualTo
(
behaviorVo
.
getId_lte
());
}
if
(
behaviorVo
.
getUnid
()
!=
null
)
{
criteria
.
andUnidEqualTo
(
behaviorVo
.
getUnid
());
}
if
(
behaviorVo
.
getUnid_arr
()
!=
null
)
{
criteria
.
andUnidIn
(
behaviorVo
.
getUnid_arr
());
}
if
(
behaviorVo
.
getUnid_like
()
!=
null
)
{
criteria
.
andUnidLike
(
behaviorVo
.
getUnid_like
());
}
if
(
behaviorVo
.
getTaskId
()
!=
null
)
{
criteria
.
andTaskIdEqualTo
(
behaviorVo
.
getTaskId
());
}
if
(
behaviorVo
.
getTaskId_null
()
!=
null
)
{
if
(
behaviorVo
.
getTaskId_null
().
booleanValue
())
{
criteria
.
andTaskIdIsNull
();
}
else
{
criteria
.
andTaskIdIsNotNull
();
}
}
if
(
behaviorVo
.
getTaskId_arr
()
!=
null
)
{
criteria
.
andTaskIdIn
(
behaviorVo
.
getTaskId_arr
());
}
if
(
behaviorVo
.
getTaskId_gt
()
!=
null
)
{
criteria
.
andTaskIdGreaterThan
(
behaviorVo
.
getTaskId_gt
());
}
if
(
behaviorVo
.
getTaskId_lt
()
!=
null
)
{
criteria
.
andTaskIdLessThan
(
behaviorVo
.
getTaskId_lt
());
}
if
(
behaviorVo
.
getTaskId_gte
()
!=
null
)
{
criteria
.
andTaskIdGreaterThanOrEqualTo
(
behaviorVo
.
getTaskId_gte
());
}
if
(
behaviorVo
.
getTaskId_lte
()
!=
null
)
{
criteria
.
andTaskIdLessThanOrEqualTo
(
behaviorVo
.
getTaskId_lte
());
}
if
(
behaviorVo
.
getEventType
()
!=
null
)
{
criteria
.
andEventTypeEqualTo
(
behaviorVo
.
getEventType
());
}
if
(
behaviorVo
.
getEventType_null
()
!=
null
)
{
if
(
behaviorVo
.
getEventType_null
().
booleanValue
())
{
criteria
.
andEventTypeIsNull
();
}
else
{
criteria
.
andEventTypeIsNotNull
();
}
}
if
(
behaviorVo
.
getEventType_arr
()
!=
null
)
{
criteria
.
andEventTypeIn
(
behaviorVo
.
getEventType_arr
());
}
if
(
behaviorVo
.
getEventType_like
()
!=
null
)
{
criteria
.
andEventTypeLike
(
behaviorVo
.
getEventType_like
());
}
if
(
behaviorVo
.
getEventCate
()
!=
null
)
{
criteria
.
andEventCateEqualTo
(
behaviorVo
.
getEventCate
());
}
if
(
behaviorVo
.
getEventCate_null
()
!=
null
)
{
if
(
behaviorVo
.
getEventCate_null
().
booleanValue
())
{
criteria
.
andEventCateIsNull
();
}
else
{
criteria
.
andEventCateIsNotNull
();
}
}
if
(
behaviorVo
.
getEventCate_arr
()
!=
null
)
{
criteria
.
andEventCateIn
(
behaviorVo
.
getEventCate_arr
());
}
if
(
behaviorVo
.
getEventCate_like
()
!=
null
)
{
criteria
.
andEventCateLike
(
behaviorVo
.
getEventCate_like
());
}
if
(
behaviorVo
.
getEventRefid
()
!=
null
)
{
criteria
.
andEventRefidEqualTo
(
behaviorVo
.
getEventRefid
());
}
if
(
behaviorVo
.
getEventRefid_null
()
!=
null
)
{
if
(
behaviorVo
.
getEventRefid_null
().
booleanValue
())
{
criteria
.
andEventRefidIsNull
();
}
else
{
criteria
.
andEventRefidIsNotNull
();
}
}
if
(
behaviorVo
.
getEventRefid_arr
()
!=
null
)
{
criteria
.
andEventRefidIn
(
behaviorVo
.
getEventRefid_arr
());
}
if
(
behaviorVo
.
getEventRefid_like
()
!=
null
)
{
criteria
.
andEventRefidLike
(
behaviorVo
.
getEventRefid_like
());
}
if
(
behaviorVo
.
getEventTime
()
!=
null
)
{
criteria
.
andEventTimeEqualTo
(
behaviorVo
.
getEventTime
());
}
if
(
behaviorVo
.
getEventTime_null
()
!=
null
)
{
if
(
behaviorVo
.
getEventTime_null
().
booleanValue
())
{
criteria
.
andEventTimeIsNull
();
}
else
{
criteria
.
andEventTimeIsNotNull
();
}
}
if
(
behaviorVo
.
getEventTime_arr
()
!=
null
)
{
criteria
.
andEventTimeIn
(
behaviorVo
.
getEventTime_arr
());
}
if
(
behaviorVo
.
getEventTime_gt
()
!=
null
)
{
criteria
.
andEventTimeGreaterThan
(
behaviorVo
.
getEventTime_gt
());
}
if
(
behaviorVo
.
getEventTime_lt
()
!=
null
)
{
criteria
.
andEventTimeLessThan
(
behaviorVo
.
getEventTime_lt
());
}
if
(
behaviorVo
.
getEventTime_gte
()
!=
null
)
{
criteria
.
andEventTimeGreaterThanOrEqualTo
(
behaviorVo
.
getEventTime_gte
());
}
if
(
behaviorVo
.
getEventTime_lte
()
!=
null
)
{
criteria
.
andEventTimeLessThanOrEqualTo
(
behaviorVo
.
getEventTime_lte
());
}
if
(
behaviorVo
.
getChannelUnid
()
!=
null
)
{
criteria
.
andChannelUnidEqualTo
(
behaviorVo
.
getChannelUnid
());
}
if
(
behaviorVo
.
getChannelUnid_null
()
!=
null
)
{
if
(
behaviorVo
.
getChannelUnid_null
().
booleanValue
())
{
criteria
.
andChannelUnidIsNull
();
}
else
{
criteria
.
andChannelUnidIsNotNull
();
}
}
if
(
behaviorVo
.
getChannelUnid_arr
()
!=
null
)
{
criteria
.
andChannelUnidIn
(
behaviorVo
.
getChannelUnid_arr
());
}
if
(
behaviorVo
.
getChannelUnid_like
()
!=
null
)
{
criteria
.
andChannelUnidLike
(
behaviorVo
.
getChannelUnid_like
());
}
if
(
behaviorVo
.
getTestPicFile
()
!=
null
)
{
criteria
.
andTestPicFileEqualTo
(
behaviorVo
.
getTestPicFile
());
}
if
(
behaviorVo
.
getTestPicFile_null
()
!=
null
)
{
if
(
behaviorVo
.
getTestPicFile_null
().
booleanValue
())
{
criteria
.
andTestPicFileIsNull
();
}
else
{
criteria
.
andTestPicFileIsNotNull
();
}
}
if
(
behaviorVo
.
getTestPicFile_arr
()
!=
null
)
{
criteria
.
andTestPicFileIn
(
behaviorVo
.
getTestPicFile_arr
());
}
if
(
behaviorVo
.
getTestPicFile_like
()
!=
null
)
{
criteria
.
andTestPicFileLike
(
behaviorVo
.
getTestPicFile_like
());
}
if
(
behaviorVo
.
getTestFrameNo
()
!=
null
)
{
criteria
.
andTestFrameNoEqualTo
(
behaviorVo
.
getTestFrameNo
());
}
if
(
behaviorVo
.
getTestFrameNo_null
()
!=
null
)
{
if
(
behaviorVo
.
getTestFrameNo_null
().
booleanValue
())
{
criteria
.
andTestFrameNoIsNull
();
}
else
{
criteria
.
andTestFrameNoIsNotNull
();
}
}
if
(
behaviorVo
.
getTestFrameNo_arr
()
!=
null
)
{
criteria
.
andTestFrameNoIn
(
behaviorVo
.
getTestFrameNo_arr
());
}
if
(
behaviorVo
.
getTestFrameNo_like
()
!=
null
)
{
criteria
.
andTestFrameNoLike
(
behaviorVo
.
getTestFrameNo_like
());
}
if
(
behaviorVo
.
getTaskName
()
!=
null
)
{
criteria
.
andTaskNameEqualTo
(
behaviorVo
.
getTaskName
());
}
if
(
behaviorVo
.
getTaskName_null
()
!=
null
)
{
if
(
behaviorVo
.
getTaskName_null
().
booleanValue
())
{
criteria
.
andTaskNameIsNull
();
}
else
{
criteria
.
andTaskNameIsNotNull
();
}
}
if
(
behaviorVo
.
getTaskName_arr
()
!=
null
)
{
criteria
.
andTaskNameIn
(
behaviorVo
.
getTaskName_arr
());
}
if
(
behaviorVo
.
getTaskName_like
()
!=
null
)
{
criteria
.
andTaskNameLike
(
behaviorVo
.
getTaskName_like
());
}
if
(
behaviorVo
.
getEventDataNum
()
!=
null
)
{
criteria
.
andEventDataNumEqualTo
(
behaviorVo
.
getEventDataNum
());
}
if
(
behaviorVo
.
getEventDataNum_null
()
!=
null
)
{
if
(
behaviorVo
.
getEventDataNum_null
().
booleanValue
())
{
criteria
.
andEventDataNumIsNull
();
}
else
{
criteria
.
andEventDataNumIsNotNull
();
}
}
if
(
behaviorVo
.
getEventDataNum_arr
()
!=
null
)
{
criteria
.
andEventDataNumIn
(
behaviorVo
.
getEventDataNum_arr
());
}
if
(
behaviorVo
.
getEventDataNum_like
()
!=
null
)
{
criteria
.
andEventDataNumLike
(
behaviorVo
.
getEventDataNum_like
());
}
return
behaviorExample
;
}
@Override
protected
BaseService
<
Behavior
>
getService
()
{
return
behaviorService
;
}
}
\ No newline at end of file
\ No newline at end of file
fanxing-forward/src/main/java/com/viontech/fanxing/forward/controller/base/FlowDataBaseController.java
deleted
100644 → 0
View file @
5adeb0c
package
com
.
viontech
.
fanxing
.
forward
.
controller
.
base
;
import
com.viontech.fanxing.commons.base.BaseController
;
import
com.viontech.fanxing.commons.base.BaseExample
;
import
com.viontech.fanxing.commons.base.BaseMapper
;
import
com.viontech.fanxing.commons.base.BaseService
;
import
com.viontech.fanxing.forward.mapper.FlowDataMapper
;
import
com.viontech.fanxing.commons.model.FlowData
;
import
com.viontech.fanxing.commons.model.FlowDataExample
;
import
com.viontech.fanxing.forward.service.adapter.FlowDataService
;
import
com.viontech.fanxing.commons.vo.FlowDataVo
;
import
javax.annotation.Resource
;
public
abstract
class
FlowDataBaseController
extends
BaseController
<
FlowData
,
FlowDataVo
>
{
@Resource
protected
FlowDataService
flowDataService
;
@Override
protected
BaseExample
getExample
(
FlowDataVo
flowDataVo
,
int
type
)
{
FlowDataExample
flowDataExample
=
new
FlowDataExample
();
FlowDataExample
.
Criteria
criteria
=
flowDataExample
.
createCriteria
();
if
(
flowDataVo
.
getId
()
!=
null
)
{
criteria
.
andIdEqualTo
(
flowDataVo
.
getId
());
}
if
(
flowDataVo
.
getId_arr
()
!=
null
)
{
criteria
.
andIdIn
(
flowDataVo
.
getId_arr
());
}
if
(
flowDataVo
.
getId_gt
()
!=
null
)
{
criteria
.
andIdGreaterThan
(
flowDataVo
.
getId_gt
());
}
if
(
flowDataVo
.
getId_lt
()
!=
null
)
{
criteria
.
andIdLessThan
(
flowDataVo
.
getId_lt
());
}
if
(
flowDataVo
.
getId_gte
()
!=
null
)
{
criteria
.
andIdGreaterThanOrEqualTo
(
flowDataVo
.
getId_gte
());
}
if
(
flowDataVo
.
getId_lte
()
!=
null
)
{
criteria
.
andIdLessThanOrEqualTo
(
flowDataVo
.
getId_lte
());
}
if
(
flowDataVo
.
getUnid
()
!=
null
)
{
criteria
.
andUnidEqualTo
(
flowDataVo
.
getUnid
());
}
if
(
flowDataVo
.
getUnid_arr
()
!=
null
)
{
criteria
.
andUnidIn
(
flowDataVo
.
getUnid_arr
());
}
if
(
flowDataVo
.
getUnid_like
()
!=
null
)
{
criteria
.
andUnidLike
(
flowDataVo
.
getUnid_like
());
}
if
(
flowDataVo
.
getEventId
()
!=
null
)
{
criteria
.
andEventIdEqualTo
(
flowDataVo
.
getEventId
());
}
if
(
flowDataVo
.
getEventId_null
()
!=
null
)
{
if
(
flowDataVo
.
getEventId_null
().
booleanValue
())
{
criteria
.
andEventIdIsNull
();
}
else
{
criteria
.
andEventIdIsNotNull
();
}
}
if
(
flowDataVo
.
getEventId_arr
()
!=
null
)
{
criteria
.
andEventIdIn
(
flowDataVo
.
getEventId_arr
());
}
if
(
flowDataVo
.
getEventId_like
()
!=
null
)
{
criteria
.
andEventIdLike
(
flowDataVo
.
getEventId_like
());
}
if
(
flowDataVo
.
getTaskId
()
!=
null
)
{
criteria
.
andTaskIdEqualTo
(
flowDataVo
.
getTaskId
());
}
if
(
flowDataVo
.
getTaskId_null
()
!=
null
)
{
if
(
flowDataVo
.
getTaskId_null
().
booleanValue
())
{
criteria
.
andTaskIdIsNull
();
}
else
{
criteria
.
andTaskIdIsNotNull
();
}
}
if
(
flowDataVo
.
getTaskId_arr
()
!=
null
)
{
criteria
.
andTaskIdIn
(
flowDataVo
.
getTaskId_arr
());
}
if
(
flowDataVo
.
getTaskId_gt
()
!=
null
)
{
criteria
.
andTaskIdGreaterThan
(
flowDataVo
.
getTaskId_gt
());
}
if
(
flowDataVo
.
getTaskId_lt
()
!=
null
)
{
criteria
.
andTaskIdLessThan
(
flowDataVo
.
getTaskId_lt
());
}
if
(
flowDataVo
.
getTaskId_gte
()
!=
null
)
{
criteria
.
andTaskIdGreaterThanOrEqualTo
(
flowDataVo
.
getTaskId_gte
());
}
if
(
flowDataVo
.
getTaskId_lte
()
!=
null
)
{
criteria
.
andTaskIdLessThanOrEqualTo
(
flowDataVo
.
getTaskId_lte
());
}
if
(
flowDataVo
.
getDetectionType
()
!=
null
)
{
criteria
.
andDetectionTypeEqualTo
(
flowDataVo
.
getDetectionType
());
}
if
(
flowDataVo
.
getDetectionType_null
()
!=
null
)
{
if
(
flowDataVo
.
getDetectionType_null
().
booleanValue
())
{
criteria
.
andDetectionTypeIsNull
();
}
else
{
criteria
.
andDetectionTypeIsNotNull
();
}
}
if
(
flowDataVo
.
getDetectionType_arr
()
!=
null
)
{
criteria
.
andDetectionTypeIn
(
flowDataVo
.
getDetectionType_arr
());
}
if
(
flowDataVo
.
getDetectionType_like
()
!=
null
)
{
criteria
.
andDetectionTypeLike
(
flowDataVo
.
getDetectionType_like
());
}
if
(
flowDataVo
.
getRoadCode
()
!=
null
)
{
criteria
.
andRoadCodeEqualTo
(
flowDataVo
.
getRoadCode
());
}
if
(
flowDataVo
.
getRoadCode_null
()
!=
null
)
{
if
(
flowDataVo
.
getRoadCode_null
().
booleanValue
())
{
criteria
.
andRoadCodeIsNull
();
}
else
{
criteria
.
andRoadCodeIsNotNull
();
}
}
if
(
flowDataVo
.
getRoadCode_arr
()
!=
null
)
{
criteria
.
andRoadCodeIn
(
flowDataVo
.
getRoadCode_arr
());
}
if
(
flowDataVo
.
getRoadCode_like
()
!=
null
)
{
criteria
.
andRoadCodeLike
(
flowDataVo
.
getRoadCode_like
());
}
if
(
flowDataVo
.
getDirectionCode
()
!=
null
)
{
criteria
.
andDirectionCodeEqualTo
(
flowDataVo
.
getDirectionCode
());
}
if
(
flowDataVo
.
getDirectionCode_null
()
!=
null
)
{
if
(
flowDataVo
.
getDirectionCode_null
().
booleanValue
())
{
criteria
.
andDirectionCodeIsNull
();
}
else
{
criteria
.
andDirectionCodeIsNotNull
();
}
}
if
(
flowDataVo
.
getDirectionCode_arr
()
!=
null
)
{
criteria
.
andDirectionCodeIn
(
flowDataVo
.
getDirectionCode_arr
());
}
if
(
flowDataVo
.
getDirectionCode_like
()
!=
null
)
{
criteria
.
andDirectionCodeLike
(
flowDataVo
.
getDirectionCode_like
());
}
if
(
flowDataVo
.
getSampleDura
()
!=
null
)
{
criteria
.
andSampleDuraEqualTo
(
flowDataVo
.
getSampleDura
());
}
if
(
flowDataVo
.
getSampleDura_null
()
!=
null
)
{
if
(
flowDataVo
.
getSampleDura_null
().
booleanValue
())
{
criteria
.
andSampleDuraIsNull
();
}
else
{
criteria
.
andSampleDuraIsNotNull
();
}
}
if
(
flowDataVo
.
getSampleDura_arr
()
!=
null
)
{
criteria
.
andSampleDuraIn
(
flowDataVo
.
getSampleDura_arr
());
}
if
(
flowDataVo
.
getSampleDura_gt
()
!=
null
)
{
criteria
.
andSampleDuraGreaterThan
(
flowDataVo
.
getSampleDura_gt
());
}
if
(
flowDataVo
.
getSampleDura_lt
()
!=
null
)
{
criteria
.
andSampleDuraLessThan
(
flowDataVo
.
getSampleDura_lt
());
}
if
(
flowDataVo
.
getSampleDura_gte
()
!=
null
)
{
criteria
.
andSampleDuraGreaterThanOrEqualTo
(
flowDataVo
.
getSampleDura_gte
());
}
if
(
flowDataVo
.
getSampleDura_lte
()
!=
null
)
{
criteria
.
andSampleDuraLessThanOrEqualTo
(
flowDataVo
.
getSampleDura_lte
());
}
if
(
flowDataVo
.
getSampleNum
()
!=
null
)
{
criteria
.
andSampleNumEqualTo
(
flowDataVo
.
getSampleNum
());
}
if
(
flowDataVo
.
getSampleNum_null
()
!=
null
)
{
if
(
flowDataVo
.
getSampleNum_null
().
booleanValue
())
{
criteria
.
andSampleNumIsNull
();
}
else
{
criteria
.
andSampleNumIsNotNull
();
}
}
if
(
flowDataVo
.
getSampleNum_arr
()
!=
null
)
{
criteria
.
andSampleNumIn
(
flowDataVo
.
getSampleNum_arr
());
}
if
(
flowDataVo
.
getSampleNum_gt
()
!=
null
)
{
criteria
.
andSampleNumGreaterThan
(
flowDataVo
.
getSampleNum_gt
());
}
if
(
flowDataVo
.
getSampleNum_lt
()
!=
null
)
{
criteria
.
andSampleNumLessThan
(
flowDataVo
.
getSampleNum_lt
());
}
if
(
flowDataVo
.
getSampleNum_gte
()
!=
null
)
{
criteria
.
andSampleNumGreaterThanOrEqualTo
(
flowDataVo
.
getSampleNum_gte
());
}
if
(
flowDataVo
.
getSampleNum_lte
()
!=
null
)
{
criteria
.
andSampleNumLessThanOrEqualTo
(
flowDataVo
.
getSampleNum_lte
());
}
if
(
flowDataVo
.
getVelocity
()
!=
null
)
{
criteria
.
andVelocityEqualTo
(
flowDataVo
.
getVelocity
());
}
if
(
flowDataVo
.
getVelocity_null
()
!=
null
)
{
if
(
flowDataVo
.
getVelocity_null
().
booleanValue
())
{
criteria
.
andVelocityIsNull
();
}
else
{
criteria
.
andVelocityIsNotNull
();
}
}
if
(
flowDataVo
.
getVelocity_arr
()
!=
null
)
{
criteria
.
andVelocityIn
(
flowDataVo
.
getVelocity_arr
());
}
if
(
flowDataVo
.
getVelocity_gt
()
!=
null
)
{
criteria
.
andVelocityGreaterThan
(
flowDataVo
.
getVelocity_gt
());
}
if
(
flowDataVo
.
getVelocity_lt
()
!=
null
)
{
criteria
.
andVelocityLessThan
(
flowDataVo
.
getVelocity_lt
());
}
if
(
flowDataVo
.
getVelocity_gte
()
!=
null
)
{
criteria
.
andVelocityGreaterThanOrEqualTo
(
flowDataVo
.
getVelocity_gte
());
}
if
(
flowDataVo
.
getVelocity_lte
()
!=
null
)
{
criteria
.
andVelocityLessThanOrEqualTo
(
flowDataVo
.
getVelocity_lte
());
}
if
(
flowDataVo
.
getVelocityUnit
()
!=
null
)
{
criteria
.
andVelocityUnitEqualTo
(
flowDataVo
.
getVelocityUnit
());
}
if
(
flowDataVo
.
getVelocityUnit_null
()
!=
null
)
{
if
(
flowDataVo
.
getVelocityUnit_null
().
booleanValue
())
{
criteria
.
andVelocityUnitIsNull
();
}
else
{
criteria
.
andVelocityUnitIsNotNull
();
}
}
if
(
flowDataVo
.
getVelocityUnit_arr
()
!=
null
)
{
criteria
.
andVelocityUnitIn
(
flowDataVo
.
getVelocityUnit_arr
());
}
if
(
flowDataVo
.
getVelocityUnit_like
()
!=
null
)
{
criteria
.
andVelocityUnitLike
(
flowDataVo
.
getVelocityUnit_like
());
}
if
(
flowDataVo
.
getOccupy
()
!=
null
)
{
criteria
.
andOccupyEqualTo
(
flowDataVo
.
getOccupy
());
}
if
(
flowDataVo
.
getOccupy_null
()
!=
null
)
{
if
(
flowDataVo
.
getOccupy_null
().
booleanValue
())
{
criteria
.
andOccupyIsNull
();
}
else
{
criteria
.
andOccupyIsNotNull
();
}
}
if
(
flowDataVo
.
getOccupy_arr
()
!=
null
)
{
criteria
.
andOccupyIn
(
flowDataVo
.
getOccupy_arr
());
}
if
(
flowDataVo
.
getOccupy_gt
()
!=
null
)
{
criteria
.
andOccupyGreaterThan
(
flowDataVo
.
getOccupy_gt
());
}
if
(
flowDataVo
.
getOccupy_lt
()
!=
null
)
{
criteria
.
andOccupyLessThan
(
flowDataVo
.
getOccupy_lt
());
}
if
(
flowDataVo
.
getOccupy_gte
()
!=
null
)
{
criteria
.
andOccupyGreaterThanOrEqualTo
(
flowDataVo
.
getOccupy_gte
());
}
if
(
flowDataVo
.
getOccupy_lte
()
!=
null
)
{
criteria
.
andOccupyLessThanOrEqualTo
(
flowDataVo
.
getOccupy_lte
());
}
if
(
flowDataVo
.
getDistance
()
!=
null
)
{
criteria
.
andDistanceEqualTo
(
flowDataVo
.
getDistance
());
}
if
(
flowDataVo
.
getDistance_null
()
!=
null
)
{
if
(
flowDataVo
.
getDistance_null
().
booleanValue
())
{
criteria
.
andDistanceIsNull
();
}
else
{
criteria
.
andDistanceIsNotNull
();
}
}
if
(
flowDataVo
.
getDistance_arr
()
!=
null
)
{
criteria
.
andDistanceIn
(
flowDataVo
.
getDistance_arr
());
}
if
(
flowDataVo
.
getDistance_gt
()
!=
null
)
{
criteria
.
andDistanceGreaterThan
(
flowDataVo
.
getDistance_gt
());
}
if
(
flowDataVo
.
getDistance_lt
()
!=
null
)
{
criteria
.
andDistanceLessThan
(
flowDataVo
.
getDistance_lt
());
}
if
(
flowDataVo
.
getDistance_gte
()
!=
null
)
{
criteria
.
andDistanceGreaterThanOrEqualTo
(
flowDataVo
.
getDistance_gte
());
}
if
(
flowDataVo
.
getDistance_lte
()
!=
null
)
{
criteria
.
andDistanceLessThanOrEqualTo
(
flowDataVo
.
getDistance_lte
());
}
if
(
flowDataVo
.
getQueueLength
()
!=
null
)
{
criteria
.
andQueueLengthEqualTo
(
flowDataVo
.
getQueueLength
());
}
if
(
flowDataVo
.
getQueueLength_null
()
!=
null
)
{
if
(
flowDataVo
.
getQueueLength_null
().
booleanValue
())
{
criteria
.
andQueueLengthIsNull
();
}
else
{
criteria
.
andQueueLengthIsNotNull
();
}
}
if
(
flowDataVo
.
getQueueLength_arr
()
!=
null
)
{
criteria
.
andQueueLengthIn
(
flowDataVo
.
getQueueLength_arr
());
}
if
(
flowDataVo
.
getQueueLength_gt
()
!=
null
)
{
criteria
.
andQueueLengthGreaterThan
(
flowDataVo
.
getQueueLength_gt
());
}
if
(
flowDataVo
.
getQueueLength_lt
()
!=
null
)
{
criteria
.
andQueueLengthLessThan
(
flowDataVo
.
getQueueLength_lt
());
}
if
(
flowDataVo
.
getQueueLength_gte
()
!=
null
)
{
criteria
.
andQueueLengthGreaterThanOrEqualTo
(
flowDataVo
.
getQueueLength_gte
());
}
if
(
flowDataVo
.
getQueueLength_lte
()
!=
null
)
{
criteria
.
andQueueLengthLessThanOrEqualTo
(
flowDataVo
.
getQueueLength_lte
());
}
if
(
flowDataVo
.
getRegionId
()
!=
null
)
{
criteria
.
andRegionIdEqualTo
(
flowDataVo
.
getRegionId
());
}
if
(
flowDataVo
.
getRegionId_null
()
!=
null
)
{
if
(
flowDataVo
.
getRegionId_null
().
booleanValue
())
{
criteria
.
andRegionIdIsNull
();
}
else
{
criteria
.
andRegionIdIsNotNull
();
}
}
if
(
flowDataVo
.
getRegionId_arr
()
!=
null
)
{
criteria
.
andRegionIdIn
(
flowDataVo
.
getRegionId_arr
());
}
if
(
flowDataVo
.
getRegionId_like
()
!=
null
)
{
criteria
.
andRegionIdLike
(
flowDataVo
.
getRegionId_like
());
}
if
(
flowDataVo
.
getRegionName
()
!=
null
)
{
criteria
.
andRegionNameEqualTo
(
flowDataVo
.
getRegionName
());
}
if
(
flowDataVo
.
getRegionName_null
()
!=
null
)
{
if
(
flowDataVo
.
getRegionName_null
().
booleanValue
())
{
criteria
.
andRegionNameIsNull
();
}
else
{
criteria
.
andRegionNameIsNotNull
();
}
}
if
(
flowDataVo
.
getRegionName_arr
()
!=
null
)
{
criteria
.
andRegionNameIn
(
flowDataVo
.
getRegionName_arr
());
}
if
(
flowDataVo
.
getRegionName_like
()
!=
null
)
{
criteria
.
andRegionNameLike
(
flowDataVo
.
getRegionName_like
());
}
if
(
flowDataVo
.
getArea
()
!=
null
)
{
criteria
.
andAreaEqualTo
(
flowDataVo
.
getArea
());
}
if
(
flowDataVo
.
getArea_null
()
!=
null
)
{
if
(
flowDataVo
.
getArea_null
().
booleanValue
())
{
criteria
.
andAreaIsNull
();
}
else
{
criteria
.
andAreaIsNotNull
();
}
}
if
(
flowDataVo
.
getArea_arr
()
!=
null
)
{
criteria
.
andAreaIn
(
flowDataVo
.
getArea_arr
());
}
if
(
flowDataVo
.
getArea_gt
()
!=
null
)
{
criteria
.
andAreaGreaterThan
(
flowDataVo
.
getArea_gt
());
}
if
(
flowDataVo
.
getArea_lt
()
!=
null
)
{
criteria
.
andAreaLessThan
(
flowDataVo
.
getArea_lt
());
}
if
(
flowDataVo
.
getArea_gte
()
!=
null
)
{
criteria
.
andAreaGreaterThanOrEqualTo
(
flowDataVo
.
getArea_gte
());
}
if
(
flowDataVo
.
getArea_lte
()
!=
null
)
{
criteria
.
andAreaLessThanOrEqualTo
(
flowDataVo
.
getArea_lte
());
}
if
(
flowDataVo
.
getDensity
()
!=
null
)
{
criteria
.
andDensityEqualTo
(
flowDataVo
.
getDensity
());
}
if
(
flowDataVo
.
getDensity_null
()
!=
null
)
{
if
(
flowDataVo
.
getDensity_null
().
booleanValue
())
{
criteria
.
andDensityIsNull
();
}
else
{
criteria
.
andDensityIsNotNull
();
}
}
if
(
flowDataVo
.
getDensity_arr
()
!=
null
)
{
criteria
.
andDensityIn
(
flowDataVo
.
getDensity_arr
());
}
if
(
flowDataVo
.
getDensity_gt
()
!=
null
)
{
criteria
.
andDensityGreaterThan
(
flowDataVo
.
getDensity_gt
());
}
if
(
flowDataVo
.
getDensity_lt
()
!=
null
)
{
criteria
.
andDensityLessThan
(
flowDataVo
.
getDensity_lt
());
}
if
(
flowDataVo
.
getDensity_gte
()
!=
null
)
{
criteria
.
andDensityGreaterThanOrEqualTo
(
flowDataVo
.
getDensity_gte
());
}
if
(
flowDataVo
.
getDensity_lte
()
!=
null
)
{
criteria
.
andDensityLessThanOrEqualTo
(
flowDataVo
.
getDensity_lte
());
}
if
(
flowDataVo
.
getSampleNumIn
()
!=
null
)
{
criteria
.
andSampleNumInEqualTo
(
flowDataVo
.
getSampleNumIn
());
}
if
(
flowDataVo
.
getSampleNumIn_null
()
!=
null
)
{
if
(
flowDataVo
.
getSampleNumIn_null
().
booleanValue
())
{
criteria
.
andSampleNumInIsNull
();
}
else
{
criteria
.
andSampleNumInIsNotNull
();
}
}
if
(
flowDataVo
.
getSampleNumIn_arr
()
!=
null
)
{
criteria
.
andSampleNumInIn
(
flowDataVo
.
getSampleNumIn_arr
());
}
if
(
flowDataVo
.
getSampleNumIn_gt
()
!=
null
)
{
criteria
.
andSampleNumInGreaterThan
(
flowDataVo
.
getSampleNumIn_gt
());
}
if
(
flowDataVo
.
getSampleNumIn_lt
()
!=
null
)
{
criteria
.
andSampleNumInLessThan
(
flowDataVo
.
getSampleNumIn_lt
());
}
if
(
flowDataVo
.
getSampleNumIn_gte
()
!=
null
)
{
criteria
.
andSampleNumInGreaterThanOrEqualTo
(
flowDataVo
.
getSampleNumIn_gte
());
}
if
(
flowDataVo
.
getSampleNumIn_lte
()
!=
null
)
{
criteria
.
andSampleNumInLessThanOrEqualTo
(
flowDataVo
.
getSampleNumIn_lte
());
}
if
(
flowDataVo
.
getSampleNumOut
()
!=
null
)
{
criteria
.
andSampleNumOutEqualTo
(
flowDataVo
.
getSampleNumOut
());
}
if
(
flowDataVo
.
getSampleNumOut_null
()
!=
null
)
{
if
(
flowDataVo
.
getSampleNumOut_null
().
booleanValue
())
{
criteria
.
andSampleNumOutIsNull
();
}
else
{
criteria
.
andSampleNumOutIsNotNull
();
}
}
if
(
flowDataVo
.
getSampleNumOut_arr
()
!=
null
)
{
criteria
.
andSampleNumOutIn
(
flowDataVo
.
getSampleNumOut_arr
());
}
if
(
flowDataVo
.
getSampleNumOut_gt
()
!=
null
)
{
criteria
.
andSampleNumOutGreaterThan
(
flowDataVo
.
getSampleNumOut_gt
());
}
if
(
flowDataVo
.
getSampleNumOut_lt
()
!=
null
)
{
criteria
.
andSampleNumOutLessThan
(
flowDataVo
.
getSampleNumOut_lt
());
}
if
(
flowDataVo
.
getSampleNumOut_gte
()
!=
null
)
{
criteria
.
andSampleNumOutGreaterThanOrEqualTo
(
flowDataVo
.
getSampleNumOut_gte
());
}
if
(
flowDataVo
.
getSampleNumOut_lte
()
!=
null
)
{
criteria
.
andSampleNumOutLessThanOrEqualTo
(
flowDataVo
.
getSampleNumOut_lte
());
}
if
(
flowDataVo
.
getEventTime
()
!=
null
)
{
criteria
.
andEventTimeEqualTo
(
flowDataVo
.
getEventTime
());
}
if
(
flowDataVo
.
getEventTime_null
()
!=
null
)
{
if
(
flowDataVo
.
getEventTime_null
().
booleanValue
())
{
criteria
.
andEventTimeIsNull
();
}
else
{
criteria
.
andEventTimeIsNotNull
();
}
}
if
(
flowDataVo
.
getEventTime_arr
()
!=
null
)
{
criteria
.
andEventTimeIn
(
flowDataVo
.
getEventTime_arr
());
}
if
(
flowDataVo
.
getEventTime_gt
()
!=
null
)
{
criteria
.
andEventTimeGreaterThan
(
flowDataVo
.
getEventTime_gt
());
}
if
(
flowDataVo
.
getEventTime_lt
()
!=
null
)
{
criteria
.
andEventTimeLessThan
(
flowDataVo
.
getEventTime_lt
());
}
if
(
flowDataVo
.
getEventTime_gte
()
!=
null
)
{
criteria
.
andEventTimeGreaterThanOrEqualTo
(
flowDataVo
.
getEventTime_gte
());
}
if
(
flowDataVo
.
getEventTime_lte
()
!=
null
)
{
criteria
.
andEventTimeLessThanOrEqualTo
(
flowDataVo
.
getEventTime_lte
());
}
if
(
flowDataVo
.
getDistTime
()
!=
null
)
{
criteria
.
andDistTimeEqualTo
(
flowDataVo
.
getDistTime
());
}
if
(
flowDataVo
.
getDistTime_null
()
!=
null
)
{
if
(
flowDataVo
.
getDistTime_null
().
booleanValue
())
{
criteria
.
andDistTimeIsNull
();
}
else
{
criteria
.
andDistTimeIsNotNull
();
}
}
if
(
flowDataVo
.
getDistTime_arr
()
!=
null
)
{
criteria
.
andDistTimeIn
(
flowDataVo
.
getDistTime_arr
());
}
if
(
flowDataVo
.
getDistTime_gt
()
!=
null
)
{
criteria
.
andDistTimeGreaterThan
(
flowDataVo
.
getDistTime_gt
());
}
if
(
flowDataVo
.
getDistTime_lt
()
!=
null
)
{
criteria
.
andDistTimeLessThan
(
flowDataVo
.
getDistTime_lt
());
}
if
(
flowDataVo
.
getDistTime_gte
()
!=
null
)
{
criteria
.
andDistTimeGreaterThanOrEqualTo
(
flowDataVo
.
getDistTime_gte
());
}
if
(
flowDataVo
.
getDistTime_lte
()
!=
null
)
{
criteria
.
andDistTimeLessThanOrEqualTo
(
flowDataVo
.
getDistTime_lte
());
}
if
(
flowDataVo
.
getTimeOccupy
()
!=
null
)
{
criteria
.
andTimeOccupyEqualTo
(
flowDataVo
.
getTimeOccupy
());
}
if
(
flowDataVo
.
getTimeOccupy_null
()
!=
null
)
{
if
(
flowDataVo
.
getTimeOccupy_null
().
booleanValue
())
{
criteria
.
andTimeOccupyIsNull
();
}
else
{
criteria
.
andTimeOccupyIsNotNull
();
}
}
if
(
flowDataVo
.
getTimeOccupy_arr
()
!=
null
)
{
criteria
.
andTimeOccupyIn
(
flowDataVo
.
getTimeOccupy_arr
());
}
if
(
flowDataVo
.
getTimeOccupy_gt
()
!=
null
)
{
criteria
.
andTimeOccupyGreaterThan
(
flowDataVo
.
getTimeOccupy_gt
());
}
if
(
flowDataVo
.
getTimeOccupy_lt
()
!=
null
)
{
criteria
.
andTimeOccupyLessThan
(
flowDataVo
.
getTimeOccupy_lt
());
}
if
(
flowDataVo
.
getTimeOccupy_gte
()
!=
null
)
{
criteria
.
andTimeOccupyGreaterThanOrEqualTo
(
flowDataVo
.
getTimeOccupy_gte
());
}
if
(
flowDataVo
.
getTimeOccupy_lte
()
!=
null
)
{
criteria
.
andTimeOccupyLessThanOrEqualTo
(
flowDataVo
.
getTimeOccupy_lte
());
}
if
(
flowDataVo
.
getStatus
()
!=
null
)
{
criteria
.
andStatusEqualTo
(
flowDataVo
.
getStatus
());
}
if
(
flowDataVo
.
getStatus_arr
()
!=
null
)
{
criteria
.
andStatusIn
(
flowDataVo
.
getStatus_arr
());
}
if
(
flowDataVo
.
getStatus_gt
()
!=
null
)
{
criteria
.
andStatusGreaterThan
(
flowDataVo
.
getStatus_gt
());
}
if
(
flowDataVo
.
getStatus_lt
()
!=
null
)
{
criteria
.
andStatusLessThan
(
flowDataVo
.
getStatus_lt
());
}
if
(
flowDataVo
.
getStatus_gte
()
!=
null
)
{
criteria
.
andStatusGreaterThanOrEqualTo
(
flowDataVo
.
getStatus_gte
());
}
if
(
flowDataVo
.
getStatus_lte
()
!=
null
)
{
criteria
.
andStatusLessThanOrEqualTo
(
flowDataVo
.
getStatus_lte
());
}
return
flowDataExample
;
}
@Override
protected
BaseService
<
FlowData
>
getService
()
{
return
flowDataService
;
}
}
\ No newline at end of file
\ No newline at end of file
fanxing-forward/src/main/java/com/viontech/fanxing/forward/controller/base/FlowEventBaseController.java
deleted
100644 → 0
View file @
5adeb0c
package
com
.
viontech
.
fanxing
.
forward
.
controller
.
base
;
import
com.viontech.fanxing.commons.base.BaseController
;
import
com.viontech.fanxing.commons.base.BaseExample
;
import
com.viontech.fanxing.commons.base.BaseMapper
;
import
com.viontech.fanxing.commons.base.BaseService
;
import
com.viontech.fanxing.forward.mapper.FlowEventMapper
;
import
com.viontech.fanxing.commons.model.FlowEvent
;
import
com.viontech.fanxing.commons.model.FlowEventExample
;
import
com.viontech.fanxing.forward.service.adapter.FlowEventService
;
import
com.viontech.fanxing.commons.vo.FlowEventVo
;
import
javax.annotation.Resource
;
public
abstract
class
FlowEventBaseController
extends
BaseController
<
FlowEvent
,
FlowEventVo
>
{
@Resource
protected
FlowEventService
flowEventService
;
@Override
protected
BaseExample
getExample
(
FlowEventVo
flowEventVo
,
int
type
)
{
FlowEventExample
flowEventExample
=
new
FlowEventExample
();
FlowEventExample
.
Criteria
criteria
=
flowEventExample
.
createCriteria
();
if
(
flowEventVo
.
getId
()
!=
null
)
{
criteria
.
andIdEqualTo
(
flowEventVo
.
getId
());
}
if
(
flowEventVo
.
getId_arr
()
!=
null
)
{
criteria
.
andIdIn
(
flowEventVo
.
getId_arr
());
}
if
(
flowEventVo
.
getId_gt
()
!=
null
)
{
criteria
.
andIdGreaterThan
(
flowEventVo
.
getId_gt
());
}
if
(
flowEventVo
.
getId_lt
()
!=
null
)
{
criteria
.
andIdLessThan
(
flowEventVo
.
getId_lt
());
}
if
(
flowEventVo
.
getId_gte
()
!=
null
)
{
criteria
.
andIdGreaterThanOrEqualTo
(
flowEventVo
.
getId_gte
());
}
if
(
flowEventVo
.
getId_lte
()
!=
null
)
{
criteria
.
andIdLessThanOrEqualTo
(
flowEventVo
.
getId_lte
());
}
if
(
flowEventVo
.
getUnid
()
!=
null
)
{
criteria
.
andUnidEqualTo
(
flowEventVo
.
getUnid
());
}
if
(
flowEventVo
.
getUnid_arr
()
!=
null
)
{
criteria
.
andUnidIn
(
flowEventVo
.
getUnid_arr
());
}
if
(
flowEventVo
.
getUnid_like
()
!=
null
)
{
criteria
.
andUnidLike
(
flowEventVo
.
getUnid_like
());
}
if
(
flowEventVo
.
getTaskId
()
!=
null
)
{
criteria
.
andTaskIdEqualTo
(
flowEventVo
.
getTaskId
());
}
if
(
flowEventVo
.
getTaskId_null
()
!=
null
)
{
if
(
flowEventVo
.
getTaskId_null
().
booleanValue
())
{
criteria
.
andTaskIdIsNull
();
}
else
{
criteria
.
andTaskIdIsNotNull
();
}
}
if
(
flowEventVo
.
getTaskId_arr
()
!=
null
)
{
criteria
.
andTaskIdIn
(
flowEventVo
.
getTaskId_arr
());
}
if
(
flowEventVo
.
getTaskId_gt
()
!=
null
)
{
criteria
.
andTaskIdGreaterThan
(
flowEventVo
.
getTaskId_gt
());
}
if
(
flowEventVo
.
getTaskId_lt
()
!=
null
)
{
criteria
.
andTaskIdLessThan
(
flowEventVo
.
getTaskId_lt
());
}
if
(
flowEventVo
.
getTaskId_gte
()
!=
null
)
{
criteria
.
andTaskIdGreaterThanOrEqualTo
(
flowEventVo
.
getTaskId_gte
());
}
if
(
flowEventVo
.
getTaskId_lte
()
!=
null
)
{
criteria
.
andTaskIdLessThanOrEqualTo
(
flowEventVo
.
getTaskId_lte
());
}
if
(
flowEventVo
.
getEventType
()
!=
null
)
{
criteria
.
andEventTypeEqualTo
(
flowEventVo
.
getEventType
());
}
if
(
flowEventVo
.
getEventType_null
()
!=
null
)
{
if
(
flowEventVo
.
getEventType_null
().
booleanValue
())
{
criteria
.
andEventTypeIsNull
();
}
else
{
criteria
.
andEventTypeIsNotNull
();
}
}
if
(
flowEventVo
.
getEventType_arr
()
!=
null
)
{
criteria
.
andEventTypeIn
(
flowEventVo
.
getEventType_arr
());
}
if
(
flowEventVo
.
getEventType_like
()
!=
null
)
{
criteria
.
andEventTypeLike
(
flowEventVo
.
getEventType_like
());
}
if
(
flowEventVo
.
getEventTime
()
!=
null
)
{
criteria
.
andEventTimeEqualTo
(
flowEventVo
.
getEventTime
());
}
if
(
flowEventVo
.
getEventTime_null
()
!=
null
)
{
if
(
flowEventVo
.
getEventTime_null
().
booleanValue
())
{
criteria
.
andEventTimeIsNull
();
}
else
{
criteria
.
andEventTimeIsNotNull
();
}
}
if
(
flowEventVo
.
getEventTime_arr
()
!=
null
)
{
criteria
.
andEventTimeIn
(
flowEventVo
.
getEventTime_arr
());
}
if
(
flowEventVo
.
getEventTime_gt
()
!=
null
)
{
criteria
.
andEventTimeGreaterThan
(
flowEventVo
.
getEventTime_gt
());
}
if
(
flowEventVo
.
getEventTime_lt
()
!=
null
)
{
criteria
.
andEventTimeLessThan
(
flowEventVo
.
getEventTime_lt
());
}
if
(
flowEventVo
.
getEventTime_gte
()
!=
null
)
{
criteria
.
andEventTimeGreaterThanOrEqualTo
(
flowEventVo
.
getEventTime_gte
());
}
if
(
flowEventVo
.
getEventTime_lte
()
!=
null
)
{
criteria
.
andEventTimeLessThanOrEqualTo
(
flowEventVo
.
getEventTime_lte
());
}
if
(
flowEventVo
.
getDeviceCode
()
!=
null
)
{
criteria
.
andDeviceCodeEqualTo
(
flowEventVo
.
getDeviceCode
());
}
if
(
flowEventVo
.
getDeviceCode_null
()
!=
null
)
{
if
(
flowEventVo
.
getDeviceCode_null
().
booleanValue
())
{
criteria
.
andDeviceCodeIsNull
();
}
else
{
criteria
.
andDeviceCodeIsNotNull
();
}
}
if
(
flowEventVo
.
getDeviceCode_arr
()
!=
null
)
{
criteria
.
andDeviceCodeIn
(
flowEventVo
.
getDeviceCode_arr
());
}
if
(
flowEventVo
.
getDeviceCode_like
()
!=
null
)
{
criteria
.
andDeviceCodeLike
(
flowEventVo
.
getDeviceCode_like
());
}
if
(
flowEventVo
.
getDeviceName
()
!=
null
)
{
criteria
.
andDeviceNameEqualTo
(
flowEventVo
.
getDeviceName
());
}
if
(
flowEventVo
.
getDeviceName_null
()
!=
null
)
{
if
(
flowEventVo
.
getDeviceName_null
().
booleanValue
())
{
criteria
.
andDeviceNameIsNull
();
}
else
{
criteria
.
andDeviceNameIsNotNull
();
}
}
if
(
flowEventVo
.
getDeviceName_arr
()
!=
null
)
{
criteria
.
andDeviceNameIn
(
flowEventVo
.
getDeviceName_arr
());
}
if
(
flowEventVo
.
getDeviceName_like
()
!=
null
)
{
criteria
.
andDeviceNameLike
(
flowEventVo
.
getDeviceName_like
());
}
if
(
flowEventVo
.
getLocationCode
()
!=
null
)
{
criteria
.
andLocationCodeEqualTo
(
flowEventVo
.
getLocationCode
());
}
if
(
flowEventVo
.
getLocationCode_null
()
!=
null
)
{
if
(
flowEventVo
.
getLocationCode_null
().
booleanValue
())
{
criteria
.
andLocationCodeIsNull
();
}
else
{
criteria
.
andLocationCodeIsNotNull
();
}
}
if
(
flowEventVo
.
getLocationCode_arr
()
!=
null
)
{
criteria
.
andLocationCodeIn
(
flowEventVo
.
getLocationCode_arr
());
}
if
(
flowEventVo
.
getLocationCode_like
()
!=
null
)
{
criteria
.
andLocationCodeLike
(
flowEventVo
.
getLocationCode_like
());
}
if
(
flowEventVo
.
getLocationName
()
!=
null
)
{
criteria
.
andLocationNameEqualTo
(
flowEventVo
.
getLocationName
());
}
if
(
flowEventVo
.
getLocationName_null
()
!=
null
)
{
if
(
flowEventVo
.
getLocationName_null
().
booleanValue
())
{
criteria
.
andLocationNameIsNull
();
}
else
{
criteria
.
andLocationNameIsNotNull
();
}
}
if
(
flowEventVo
.
getLocationName_arr
()
!=
null
)
{
criteria
.
andLocationNameIn
(
flowEventVo
.
getLocationName_arr
());
}
if
(
flowEventVo
.
getLocationName_like
()
!=
null
)
{
criteria
.
andLocationNameLike
(
flowEventVo
.
getLocationName_like
());
}
if
(
flowEventVo
.
getPicName
()
!=
null
)
{
criteria
.
andPicNameEqualTo
(
flowEventVo
.
getPicName
());
}
if
(
flowEventVo
.
getPicName_null
()
!=
null
)
{
if
(
flowEventVo
.
getPicName_null
().
booleanValue
())
{
criteria
.
andPicNameIsNull
();
}
else
{
criteria
.
andPicNameIsNotNull
();
}
}
if
(
flowEventVo
.
getPicName_arr
()
!=
null
)
{
criteria
.
andPicNameIn
(
flowEventVo
.
getPicName_arr
());
}
if
(
flowEventVo
.
getPicName_like
()
!=
null
)
{
criteria
.
andPicNameLike
(
flowEventVo
.
getPicName_like
());
}
if
(
flowEventVo
.
getVideoName
()
!=
null
)
{
criteria
.
andVideoNameEqualTo
(
flowEventVo
.
getVideoName
());
}
if
(
flowEventVo
.
getVideoName_null
()
!=
null
)
{
if
(
flowEventVo
.
getVideoName_null
().
booleanValue
())
{
criteria
.
andVideoNameIsNull
();
}
else
{
criteria
.
andVideoNameIsNotNull
();
}
}
if
(
flowEventVo
.
getVideoName_arr
()
!=
null
)
{
criteria
.
andVideoNameIn
(
flowEventVo
.
getVideoName_arr
());
}
if
(
flowEventVo
.
getVideoName_like
()
!=
null
)
{
criteria
.
andVideoNameLike
(
flowEventVo
.
getVideoName_like
());
}
return
flowEventExample
;
}
@Override
protected
BaseService
<
FlowEvent
>
getService
()
{
return
flowEventService
;
}
}
\ No newline at end of file
\ No newline at end of file
fanxing-forward/src/main/java/com/viontech/fanxing/forward/controller/base/TrafficBaseController.java
deleted
100644 → 0
View file @
5adeb0c
package
com
.
viontech
.
fanxing
.
forward
.
controller
.
base
;
import
com.viontech.fanxing.commons.base.BaseController
;
import
com.viontech.fanxing.commons.base.BaseExample
;
import
com.viontech.fanxing.commons.base.BaseMapper
;
import
com.viontech.fanxing.commons.base.BaseService
;
import
com.viontech.fanxing.forward.mapper.TrafficMapper
;
import
com.viontech.fanxing.commons.model.Traffic
;
import
com.viontech.fanxing.commons.model.TrafficExample
;
import
com.viontech.fanxing.forward.service.adapter.TrafficService
;
import
com.viontech.fanxing.commons.vo.TrafficVo
;
import
javax.annotation.Resource
;
public
abstract
class
TrafficBaseController
extends
BaseController
<
Traffic
,
TrafficVo
>
{
@Resource
protected
TrafficService
trafficService
;
@Override
protected
BaseExample
getExample
(
TrafficVo
trafficVo
,
int
type
)
{
TrafficExample
trafficExample
=
new
TrafficExample
();
TrafficExample
.
Criteria
criteria
=
trafficExample
.
createCriteria
();
if
(
trafficVo
.
getId
()
!=
null
)
{
criteria
.
andIdEqualTo
(
trafficVo
.
getId
());
}
if
(
trafficVo
.
getId_arr
()
!=
null
)
{
criteria
.
andIdIn
(
trafficVo
.
getId_arr
());
}
if
(
trafficVo
.
getId_gt
()
!=
null
)
{
criteria
.
andIdGreaterThan
(
trafficVo
.
getId_gt
());
}
if
(
trafficVo
.
getId_lt
()
!=
null
)
{
criteria
.
andIdLessThan
(
trafficVo
.
getId_lt
());
}
if
(
trafficVo
.
getId_gte
()
!=
null
)
{
criteria
.
andIdGreaterThanOrEqualTo
(
trafficVo
.
getId_gte
());
}
if
(
trafficVo
.
getId_lte
()
!=
null
)
{
criteria
.
andIdLessThanOrEqualTo
(
trafficVo
.
getId_lte
());
}
if
(
trafficVo
.
getUnid
()
!=
null
)
{
criteria
.
andUnidEqualTo
(
trafficVo
.
getUnid
());
}
if
(
trafficVo
.
getUnid_arr
()
!=
null
)
{
criteria
.
andUnidIn
(
trafficVo
.
getUnid_arr
());
}
if
(
trafficVo
.
getUnid_like
()
!=
null
)
{
criteria
.
andUnidLike
(
trafficVo
.
getUnid_like
());
}
if
(
trafficVo
.
getTaskId
()
!=
null
)
{
criteria
.
andTaskIdEqualTo
(
trafficVo
.
getTaskId
());
}
if
(
trafficVo
.
getTaskId_null
()
!=
null
)
{
if
(
trafficVo
.
getTaskId_null
().
booleanValue
())
{
criteria
.
andTaskIdIsNull
();
}
else
{
criteria
.
andTaskIdIsNotNull
();
}
}
if
(
trafficVo
.
getTaskId_arr
()
!=
null
)
{
criteria
.
andTaskIdIn
(
trafficVo
.
getTaskId_arr
());
}
if
(
trafficVo
.
getTaskId_gt
()
!=
null
)
{
criteria
.
andTaskIdGreaterThan
(
trafficVo
.
getTaskId_gt
());
}
if
(
trafficVo
.
getTaskId_lt
()
!=
null
)
{
criteria
.
andTaskIdLessThan
(
trafficVo
.
getTaskId_lt
());
}
if
(
trafficVo
.
getTaskId_gte
()
!=
null
)
{
criteria
.
andTaskIdGreaterThanOrEqualTo
(
trafficVo
.
getTaskId_gte
());
}
if
(
trafficVo
.
getTaskId_lte
()
!=
null
)
{
criteria
.
andTaskIdLessThanOrEqualTo
(
trafficVo
.
getTaskId_lte
());
}
if
(
trafficVo
.
getEventCate
()
!=
null
)
{
criteria
.
andEventCateEqualTo
(
trafficVo
.
getEventCate
());
}
if
(
trafficVo
.
getEventCate_null
()
!=
null
)
{
if
(
trafficVo
.
getEventCate_null
().
booleanValue
())
{
criteria
.
andEventCateIsNull
();
}
else
{
criteria
.
andEventCateIsNotNull
();
}
}
if
(
trafficVo
.
getEventCate_arr
()
!=
null
)
{
criteria
.
andEventCateIn
(
trafficVo
.
getEventCate_arr
());
}
if
(
trafficVo
.
getEventCate_like
()
!=
null
)
{
criteria
.
andEventCateLike
(
trafficVo
.
getEventCate_like
());
}
if
(
trafficVo
.
getEventType
()
!=
null
)
{
criteria
.
andEventTypeEqualTo
(
trafficVo
.
getEventType
());
}
if
(
trafficVo
.
getEventType_null
()
!=
null
)
{
if
(
trafficVo
.
getEventType_null
().
booleanValue
())
{
criteria
.
andEventTypeIsNull
();
}
else
{
criteria
.
andEventTypeIsNotNull
();
}
}
if
(
trafficVo
.
getEventType_arr
()
!=
null
)
{
criteria
.
andEventTypeIn
(
trafficVo
.
getEventType_arr
());
}
if
(
trafficVo
.
getEventType_like
()
!=
null
)
{
criteria
.
andEventTypeLike
(
trafficVo
.
getEventType_like
());
}
if
(
trafficVo
.
getEventTime
()
!=
null
)
{
criteria
.
andEventTimeEqualTo
(
trafficVo
.
getEventTime
());
}
if
(
trafficVo
.
getEventTime_arr
()
!=
null
)
{
criteria
.
andEventTimeIn
(
trafficVo
.
getEventTime_arr
());
}
if
(
trafficVo
.
getEventTime_gt
()
!=
null
)
{
criteria
.
andEventTimeGreaterThan
(
trafficVo
.
getEventTime_gt
());
}
if
(
trafficVo
.
getEventTime_lt
()
!=
null
)
{
criteria
.
andEventTimeLessThan
(
trafficVo
.
getEventTime_lt
());
}
if
(
trafficVo
.
getEventTime_gte
()
!=
null
)
{
criteria
.
andEventTimeGreaterThanOrEqualTo
(
trafficVo
.
getEventTime_gte
());
}
if
(
trafficVo
.
getEventTime_lte
()
!=
null
)
{
criteria
.
andEventTimeLessThanOrEqualTo
(
trafficVo
.
getEventTime_lte
());
}
if
(
trafficVo
.
getChannelUnid
()
!=
null
)
{
criteria
.
andChannelUnidEqualTo
(
trafficVo
.
getChannelUnid
());
}
if
(
trafficVo
.
getChannelUnid_null
()
!=
null
)
{
if
(
trafficVo
.
getChannelUnid_null
().
booleanValue
())
{
criteria
.
andChannelUnidIsNull
();
}
else
{
criteria
.
andChannelUnidIsNotNull
();
}
}
if
(
trafficVo
.
getChannelUnid_arr
()
!=
null
)
{
criteria
.
andChannelUnidIn
(
trafficVo
.
getChannelUnid_arr
());
}
if
(
trafficVo
.
getChannelUnid_like
()
!=
null
)
{
criteria
.
andChannelUnidLike
(
trafficVo
.
getChannelUnid_like
());
}
if
(
trafficVo
.
getPlateColor
()
!=
null
)
{
criteria
.
andPlateColorEqualTo
(
trafficVo
.
getPlateColor
());
}
if
(
trafficVo
.
getPlateColor_null
()
!=
null
)
{
if
(
trafficVo
.
getPlateColor_null
().
booleanValue
())
{
criteria
.
andPlateColorIsNull
();
}
else
{
criteria
.
andPlateColorIsNotNull
();
}
}
if
(
trafficVo
.
getPlateColor_arr
()
!=
null
)
{
criteria
.
andPlateColorIn
(
trafficVo
.
getPlateColor_arr
());
}
if
(
trafficVo
.
getPlateColor_like
()
!=
null
)
{
criteria
.
andPlateColorLike
(
trafficVo
.
getPlateColor_like
());
}
if
(
trafficVo
.
getPlateNumber
()
!=
null
)
{
criteria
.
andPlateNumberEqualTo
(
trafficVo
.
getPlateNumber
());
}
if
(
trafficVo
.
getPlateNumber_null
()
!=
null
)
{
if
(
trafficVo
.
getPlateNumber_null
().
booleanValue
())
{
criteria
.
andPlateNumberIsNull
();
}
else
{
criteria
.
andPlateNumberIsNotNull
();
}
}
if
(
trafficVo
.
getPlateNumber_arr
()
!=
null
)
{
criteria
.
andPlateNumberIn
(
trafficVo
.
getPlateNumber_arr
());
}
if
(
trafficVo
.
getPlateNumber_like
()
!=
null
)
{
criteria
.
andPlateNumberLike
(
trafficVo
.
getPlateNumber_like
());
}
if
(
trafficVo
.
getLocationCode
()
!=
null
)
{
criteria
.
andLocationCodeEqualTo
(
trafficVo
.
getLocationCode
());
}
if
(
trafficVo
.
getLocationCode_null
()
!=
null
)
{
if
(
trafficVo
.
getLocationCode_null
().
booleanValue
())
{
criteria
.
andLocationCodeIsNull
();
}
else
{
criteria
.
andLocationCodeIsNotNull
();
}
}
if
(
trafficVo
.
getLocationCode_arr
()
!=
null
)
{
criteria
.
andLocationCodeIn
(
trafficVo
.
getLocationCode_arr
());
}
if
(
trafficVo
.
getLocationCode_like
()
!=
null
)
{
criteria
.
andLocationCodeLike
(
trafficVo
.
getLocationCode_like
());
}
if
(
trafficVo
.
getLaneCode
()
!=
null
)
{
criteria
.
andLaneCodeEqualTo
(
trafficVo
.
getLaneCode
());
}
if
(
trafficVo
.
getLaneCode_null
()
!=
null
)
{
if
(
trafficVo
.
getLaneCode_null
().
booleanValue
())
{
criteria
.
andLaneCodeIsNull
();
}
else
{
criteria
.
andLaneCodeIsNotNull
();
}
}
if
(
trafficVo
.
getLaneCode_arr
()
!=
null
)
{
criteria
.
andLaneCodeIn
(
trafficVo
.
getLaneCode_arr
());
}
if
(
trafficVo
.
getLaneCode_like
()
!=
null
)
{
criteria
.
andLaneCodeLike
(
trafficVo
.
getLaneCode_like
());
}
if
(
trafficVo
.
getDirectionCode
()
!=
null
)
{
criteria
.
andDirectionCodeEqualTo
(
trafficVo
.
getDirectionCode
());
}
if
(
trafficVo
.
getDirectionCode_null
()
!=
null
)
{
if
(
trafficVo
.
getDirectionCode_null
().
booleanValue
())
{
criteria
.
andDirectionCodeIsNull
();
}
else
{
criteria
.
andDirectionCodeIsNotNull
();
}
}
if
(
trafficVo
.
getDirectionCode_arr
()
!=
null
)
{
criteria
.
andDirectionCodeIn
(
trafficVo
.
getDirectionCode_arr
());
}
if
(
trafficVo
.
getDirectionCode_like
()
!=
null
)
{
criteria
.
andDirectionCodeLike
(
trafficVo
.
getDirectionCode_like
());
}
if
(
trafficVo
.
getVehicleType
()
!=
null
)
{
criteria
.
andVehicleTypeEqualTo
(
trafficVo
.
getVehicleType
());
}
if
(
trafficVo
.
getVehicleType_null
()
!=
null
)
{
if
(
trafficVo
.
getVehicleType_null
().
booleanValue
())
{
criteria
.
andVehicleTypeIsNull
();
}
else
{
criteria
.
andVehicleTypeIsNotNull
();
}
}
if
(
trafficVo
.
getVehicleType_arr
()
!=
null
)
{
criteria
.
andVehicleTypeIn
(
trafficVo
.
getVehicleType_arr
());
}
if
(
trafficVo
.
getVehicleType_like
()
!=
null
)
{
criteria
.
andVehicleTypeLike
(
trafficVo
.
getVehicleType_like
());
}
if
(
trafficVo
.
getIllegalCode
()
!=
null
)
{
criteria
.
andIllegalCodeEqualTo
(
trafficVo
.
getIllegalCode
());
}
if
(
trafficVo
.
getIllegalCode_null
()
!=
null
)
{
if
(
trafficVo
.
getIllegalCode_null
().
booleanValue
())
{
criteria
.
andIllegalCodeIsNull
();
}
else
{
criteria
.
andIllegalCodeIsNotNull
();
}
}
if
(
trafficVo
.
getIllegalCode_arr
()
!=
null
)
{
criteria
.
andIllegalCodeIn
(
trafficVo
.
getIllegalCode_arr
());
}
if
(
trafficVo
.
getIllegalCode_like
()
!=
null
)
{
criteria
.
andIllegalCodeLike
(
trafficVo
.
getIllegalCode_like
());
}
if
(
trafficVo
.
getIllegalState
()
!=
null
)
{
criteria
.
andIllegalStateEqualTo
(
trafficVo
.
getIllegalState
());
}
if
(
trafficVo
.
getIllegalState_null
()
!=
null
)
{
if
(
trafficVo
.
getIllegalState_null
().
booleanValue
())
{
criteria
.
andIllegalStateIsNull
();
}
else
{
criteria
.
andIllegalStateIsNotNull
();
}
}
if
(
trafficVo
.
getIllegalState_arr
()
!=
null
)
{
criteria
.
andIllegalStateIn
(
trafficVo
.
getIllegalState_arr
());
}
if
(
trafficVo
.
getIllegalState_gt
()
!=
null
)
{
criteria
.
andIllegalStateGreaterThan
(
trafficVo
.
getIllegalState_gt
());
}
if
(
trafficVo
.
getIllegalState_lt
()
!=
null
)
{
criteria
.
andIllegalStateLessThan
(
trafficVo
.
getIllegalState_lt
());
}
if
(
trafficVo
.
getIllegalState_gte
()
!=
null
)
{
criteria
.
andIllegalStateGreaterThanOrEqualTo
(
trafficVo
.
getIllegalState_gte
());
}
if
(
trafficVo
.
getIllegalState_lte
()
!=
null
)
{
criteria
.
andIllegalStateLessThanOrEqualTo
(
trafficVo
.
getIllegalState_lte
());
}
if
(
trafficVo
.
getVehicleColor
()
!=
null
)
{
criteria
.
andVehicleColorEqualTo
(
trafficVo
.
getVehicleColor
());
}
if
(
trafficVo
.
getVehicleColor_null
()
!=
null
)
{
if
(
trafficVo
.
getVehicleColor_null
().
booleanValue
())
{
criteria
.
andVehicleColorIsNull
();
}
else
{
criteria
.
andVehicleColorIsNotNull
();
}
}
if
(
trafficVo
.
getVehicleColor_arr
()
!=
null
)
{
criteria
.
andVehicleColorIn
(
trafficVo
.
getVehicleColor_arr
());
}
if
(
trafficVo
.
getVehicleColor_like
()
!=
null
)
{
criteria
.
andVehicleColorLike
(
trafficVo
.
getVehicleColor_like
());
}
if
(
trafficVo
.
getVehicleLogo
()
!=
null
)
{
criteria
.
andVehicleLogoEqualTo
(
trafficVo
.
getVehicleLogo
());
}
if
(
trafficVo
.
getVehicleLogo_null
()
!=
null
)
{
if
(
trafficVo
.
getVehicleLogo_null
().
booleanValue
())
{
criteria
.
andVehicleLogoIsNull
();
}
else
{
criteria
.
andVehicleLogoIsNotNull
();
}
}
if
(
trafficVo
.
getVehicleLogo_arr
()
!=
null
)
{
criteria
.
andVehicleLogoIn
(
trafficVo
.
getVehicleLogo_arr
());
}
if
(
trafficVo
.
getVehicleLogo_like
()
!=
null
)
{
criteria
.
andVehicleLogoLike
(
trafficVo
.
getVehicleLogo_like
());
}
if
(
trafficVo
.
getAnnualInspectionMark
()
!=
null
)
{
criteria
.
andAnnualInspectionMarkEqualTo
(
trafficVo
.
getAnnualInspectionMark
());
}
if
(
trafficVo
.
getAnnualInspectionMark_null
()
!=
null
)
{
if
(
trafficVo
.
getAnnualInspectionMark_null
().
booleanValue
())
{
criteria
.
andAnnualInspectionMarkIsNull
();
}
else
{
criteria
.
andAnnualInspectionMarkIsNotNull
();
}
}
if
(
trafficVo
.
getAnnualInspectionMark_arr
()
!=
null
)
{
criteria
.
andAnnualInspectionMarkIn
(
trafficVo
.
getAnnualInspectionMark_arr
());
}
if
(
trafficVo
.
getAnnualInspectionMark_like
()
!=
null
)
{
criteria
.
andAnnualInspectionMarkLike
(
trafficVo
.
getAnnualInspectionMark_like
());
}
if
(
trafficVo
.
getPendant
()
!=
null
)
{
criteria
.
andPendantEqualTo
(
trafficVo
.
getPendant
());
}
if
(
trafficVo
.
getPendant_null
()
!=
null
)
{
if
(
trafficVo
.
getPendant_null
().
booleanValue
())
{
criteria
.
andPendantIsNull
();
}
else
{
criteria
.
andPendantIsNotNull
();
}
}
if
(
trafficVo
.
getPendant_arr
()
!=
null
)
{
criteria
.
andPendantIn
(
trafficVo
.
getPendant_arr
());
}
if
(
trafficVo
.
getPendant_like
()
!=
null
)
{
criteria
.
andPendantLike
(
trafficVo
.
getPendant_like
());
}
if
(
trafficVo
.
getDecoration
()
!=
null
)
{
criteria
.
andDecorationEqualTo
(
trafficVo
.
getDecoration
());
}
if
(
trafficVo
.
getDecoration_null
()
!=
null
)
{
if
(
trafficVo
.
getDecoration_null
().
booleanValue
())
{
criteria
.
andDecorationIsNull
();
}
else
{
criteria
.
andDecorationIsNotNull
();
}
}
if
(
trafficVo
.
getDecoration_arr
()
!=
null
)
{
criteria
.
andDecorationIn
(
trafficVo
.
getDecoration_arr
());
}
if
(
trafficVo
.
getDecoration_like
()
!=
null
)
{
criteria
.
andDecorationLike
(
trafficVo
.
getDecoration_like
());
}
if
(
trafficVo
.
getSunShield
()
!=
null
)
{
criteria
.
andSunShieldEqualTo
(
trafficVo
.
getSunShield
());
}
if
(
trafficVo
.
getSunShield_null
()
!=
null
)
{
if
(
trafficVo
.
getSunShield_null
().
booleanValue
())
{
criteria
.
andSunShieldIsNull
();
}
else
{
criteria
.
andSunShieldIsNotNull
();
}
}
if
(
trafficVo
.
getSunShield_arr
()
!=
null
)
{
criteria
.
andSunShieldIn
(
trafficVo
.
getSunShield_arr
());
}
if
(
trafficVo
.
getSunShield_like
()
!=
null
)
{
criteria
.
andSunShieldLike
(
trafficVo
.
getSunShield_like
());
}
if
(
trafficVo
.
getXcycleType
()
!=
null
)
{
criteria
.
andXcycleTypeEqualTo
(
trafficVo
.
getXcycleType
());
}
if
(
trafficVo
.
getXcycleType_null
()
!=
null
)
{
if
(
trafficVo
.
getXcycleType_null
().
booleanValue
())
{
criteria
.
andXcycleTypeIsNull
();
}
else
{
criteria
.
andXcycleTypeIsNotNull
();
}
}
if
(
trafficVo
.
getXcycleType_arr
()
!=
null
)
{
criteria
.
andXcycleTypeIn
(
trafficVo
.
getXcycleType_arr
());
}
if
(
trafficVo
.
getXcycleType_like
()
!=
null
)
{
criteria
.
andXcycleTypeLike
(
trafficVo
.
getXcycleType_like
());
}
if
(
trafficVo
.
getEventId
()
!=
null
)
{
criteria
.
andEventIdEqualTo
(
trafficVo
.
getEventId
());
}
if
(
trafficVo
.
getEventId_null
()
!=
null
)
{
if
(
trafficVo
.
getEventId_null
().
booleanValue
())
{
criteria
.
andEventIdIsNull
();
}
else
{
criteria
.
andEventIdIsNotNull
();
}
}
if
(
trafficVo
.
getEventId_arr
()
!=
null
)
{
criteria
.
andEventIdIn
(
trafficVo
.
getEventId_arr
());
}
if
(
trafficVo
.
getEventId_like
()
!=
null
)
{
criteria
.
andEventIdLike
(
trafficVo
.
getEventId_like
());
}
if
(
trafficVo
.
getShootTime
()
!=
null
)
{
criteria
.
andShootTimeEqualTo
(
trafficVo
.
getShootTime
());
}
if
(
trafficVo
.
getShootTime_null
()
!=
null
)
{
if
(
trafficVo
.
getShootTime_null
().
booleanValue
())
{
criteria
.
andShootTimeIsNull
();
}
else
{
criteria
.
andShootTimeIsNotNull
();
}
}
if
(
trafficVo
.
getShootTime_arr
()
!=
null
)
{
criteria
.
andShootTimeIn
(
trafficVo
.
getShootTime_arr
());
}
if
(
trafficVo
.
getShootTime_gt
()
!=
null
)
{
criteria
.
andShootTimeGreaterThan
(
trafficVo
.
getShootTime_gt
());
}
if
(
trafficVo
.
getShootTime_lt
()
!=
null
)
{
criteria
.
andShootTimeLessThan
(
trafficVo
.
getShootTime_lt
());
}
if
(
trafficVo
.
getShootTime_gte
()
!=
null
)
{
criteria
.
andShootTimeGreaterThanOrEqualTo
(
trafficVo
.
getShootTime_gte
());
}
if
(
trafficVo
.
getShootTime_lte
()
!=
null
)
{
criteria
.
andShootTimeLessThanOrEqualTo
(
trafficVo
.
getShootTime_lte
());
}
if
(
trafficVo
.
getSpecialType
()
!=
null
)
{
criteria
.
andSpecialTypeEqualTo
(
trafficVo
.
getSpecialType
());
}
if
(
trafficVo
.
getSpecialType_null
()
!=
null
)
{
if
(
trafficVo
.
getSpecialType_null
().
booleanValue
())
{
criteria
.
andSpecialTypeIsNull
();
}
else
{
criteria
.
andSpecialTypeIsNotNull
();
}
}
if
(
trafficVo
.
getSpecialType_arr
()
!=
null
)
{
criteria
.
andSpecialTypeIn
(
trafficVo
.
getSpecialType_arr
());
}
if
(
trafficVo
.
getSpecialType_like
()
!=
null
)
{
criteria
.
andSpecialTypeLike
(
trafficVo
.
getSpecialType_like
());
}
if
(
trafficVo
.
getWithHelmet
()
!=
null
)
{
criteria
.
andWithHelmetEqualTo
(
trafficVo
.
getWithHelmet
());
}
if
(
trafficVo
.
getWithHelmet_null
()
!=
null
)
{
if
(
trafficVo
.
getWithHelmet_null
().
booleanValue
())
{
criteria
.
andWithHelmetIsNull
();
}
else
{
criteria
.
andWithHelmetIsNotNull
();
}
}
if
(
trafficVo
.
getWithHelmet_arr
()
!=
null
)
{
criteria
.
andWithHelmetIn
(
trafficVo
.
getWithHelmet_arr
());
}
if
(
trafficVo
.
getWithHelmet_gt
()
!=
null
)
{
criteria
.
andWithHelmetGreaterThan
(
trafficVo
.
getWithHelmet_gt
());
}
if
(
trafficVo
.
getWithHelmet_lt
()
!=
null
)
{
criteria
.
andWithHelmetLessThan
(
trafficVo
.
getWithHelmet_lt
());
}
if
(
trafficVo
.
getWithHelmet_gte
()
!=
null
)
{
criteria
.
andWithHelmetGreaterThanOrEqualTo
(
trafficVo
.
getWithHelmet_gte
());
}
if
(
trafficVo
.
getWithHelmet_lte
()
!=
null
)
{
criteria
.
andWithHelmetLessThanOrEqualTo
(
trafficVo
.
getWithHelmet_lte
());
}
if
(
trafficVo
.
getPicName
()
!=
null
)
{
criteria
.
andPicNameEqualTo
(
trafficVo
.
getPicName
());
}
if
(
trafficVo
.
getPicName_null
()
!=
null
)
{
if
(
trafficVo
.
getPicName_null
().
booleanValue
())
{
criteria
.
andPicNameIsNull
();
}
else
{
criteria
.
andPicNameIsNotNull
();
}
}
if
(
trafficVo
.
getPicName_arr
()
!=
null
)
{
criteria
.
andPicNameIn
(
trafficVo
.
getPicName_arr
());
}
if
(
trafficVo
.
getPicName_like
()
!=
null
)
{
criteria
.
andPicNameLike
(
trafficVo
.
getPicName_like
());
}
if
(
trafficVo
.
getVideoName
()
!=
null
)
{
criteria
.
andVideoNameEqualTo
(
trafficVo
.
getVideoName
());
}
if
(
trafficVo
.
getVideoName_null
()
!=
null
)
{
if
(
trafficVo
.
getVideoName_null
().
booleanValue
())
{
criteria
.
andVideoNameIsNull
();
}
else
{
criteria
.
andVideoNameIsNotNull
();
}
}
if
(
trafficVo
.
getVideoName_arr
()
!=
null
)
{
criteria
.
andVideoNameIn
(
trafficVo
.
getVideoName_arr
());
}
if
(
trafficVo
.
getVideoName_like
()
!=
null
)
{
criteria
.
andVideoNameLike
(
trafficVo
.
getVideoName_like
());
}
if
(
trafficVo
.
getStatus
()
!=
null
)
{
criteria
.
andStatusEqualTo
(
trafficVo
.
getStatus
());
}
if
(
trafficVo
.
getStatus_arr
()
!=
null
)
{
criteria
.
andStatusIn
(
trafficVo
.
getStatus_arr
());
}
if
(
trafficVo
.
getStatus_gt
()
!=
null
)
{
criteria
.
andStatusGreaterThan
(
trafficVo
.
getStatus_gt
());
}
if
(
trafficVo
.
getStatus_lt
()
!=
null
)
{
criteria
.
andStatusLessThan
(
trafficVo
.
getStatus_lt
());
}
if
(
trafficVo
.
getStatus_gte
()
!=
null
)
{
criteria
.
andStatusGreaterThanOrEqualTo
(
trafficVo
.
getStatus_gte
());
}
if
(
trafficVo
.
getStatus_lte
()
!=
null
)
{
criteria
.
andStatusLessThanOrEqualTo
(
trafficVo
.
getStatus_lte
());
}
return
trafficExample
;
}
@Override
protected
BaseService
<
Traffic
>
getService
()
{
return
trafficService
;
}
}
\ No newline at end of file
\ No newline at end of file
fanxing-forward/src/main/java/com/viontech/fanxing/forward/controller/web/BehaviorController.java
deleted
100644 → 0
View file @
5adeb0c
package
com
.
viontech
.
fanxing
.
forward
.
controller
.
web
;
import
com.viontech.fanxing.commons.base.BaseExample
;
import
com.viontech.fanxing.commons.base.BaseMapper
;
import
com.viontech.fanxing.commons.vo.BehaviorVo
;
import
com.viontech.fanxing.forward.controller.base.BehaviorBaseController
;
import
com.viontech.fanxing.commons.model.Behavior
;
import
com.viontech.fanxing.commons.model.BehaviorExample
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
@Controller
@RequestMapping
(
"/behaviors"
)
public
class
BehaviorController
extends
BehaviorBaseController
{
@Override
protected
BaseExample
getExample
(
BehaviorVo
behaviorVo
,
int
type
)
{
BehaviorExample
behaviorExample
=
(
BehaviorExample
)
super
.
getExample
(
behaviorVo
,
type
);
return
behaviorExample
;
}
}
\ No newline at end of file
\ No newline at end of file
fanxing-forward/src/main/java/com/viontech/fanxing/forward/controller/web/FlowDataController.java
deleted
100644 → 0
View file @
5adeb0c
package
com
.
viontech
.
fanxing
.
forward
.
controller
.
web
;
import
com.viontech.fanxing.commons.base.BaseExample
;
import
com.viontech.fanxing.commons.base.BaseMapper
;
import
com.viontech.fanxing.commons.vo.FlowDataVo
;
import
com.viontech.fanxing.forward.controller.base.FlowDataBaseController
;
import
com.viontech.fanxing.commons.model.FlowData
;
import
com.viontech.fanxing.commons.model.FlowDataExample
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
@Controller
@RequestMapping
(
"/flowDatas"
)
public
class
FlowDataController
extends
FlowDataBaseController
{
@Override
protected
BaseExample
getExample
(
FlowDataVo
flowDataVo
,
int
type
)
{
FlowDataExample
flowDataExample
=
(
FlowDataExample
)
super
.
getExample
(
flowDataVo
,
type
);
return
flowDataExample
;
}
}
\ No newline at end of file
\ No newline at end of file
fanxing-forward/src/main/java/com/viontech/fanxing/forward/controller/web/FlowEventController.java
deleted
100644 → 0
View file @
5adeb0c
package
com
.
viontech
.
fanxing
.
forward
.
controller
.
web
;
import
com.viontech.fanxing.commons.base.BaseExample
;
import
com.viontech.fanxing.commons.base.BaseMapper
;
import
com.viontech.fanxing.commons.vo.FlowEventVo
;
import
com.viontech.fanxing.forward.controller.base.FlowEventBaseController
;
import
com.viontech.fanxing.commons.model.FlowEvent
;
import
com.viontech.fanxing.commons.model.FlowEventExample
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
@Controller
@RequestMapping
(
"/flowEvents"
)
public
class
FlowEventController
extends
FlowEventBaseController
{
@Override
protected
BaseExample
getExample
(
FlowEventVo
flowEventVo
,
int
type
)
{
FlowEventExample
flowEventExample
=
(
FlowEventExample
)
super
.
getExample
(
flowEventVo
,
type
);
return
flowEventExample
;
}
}
\ No newline at end of file
\ No newline at end of file
fanxing-forward/src/main/java/com/viontech/fanxing/forward/controller/web/TrafficController.java
deleted
100644 → 0
View file @
5adeb0c
package
com
.
viontech
.
fanxing
.
forward
.
controller
.
web
;
import
com.viontech.fanxing.commons.base.BaseExample
;
import
com.viontech.fanxing.commons.base.BaseMapper
;
import
com.viontech.fanxing.commons.vo.TrafficVo
;
import
com.viontech.fanxing.forward.controller.base.TrafficBaseController
;
import
com.viontech.fanxing.commons.model.Traffic
;
import
com.viontech.fanxing.commons.model.TrafficExample
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
@Controller
@RequestMapping
(
"/traffics"
)
public
class
TrafficController
extends
TrafficBaseController
{
@Override
protected
BaseExample
getExample
(
TrafficVo
trafficVo
,
int
type
)
{
TrafficExample
trafficExample
=
(
TrafficExample
)
super
.
getExample
(
trafficVo
,
type
);
return
trafficExample
;
}
}
\ No newline at end of file
\ No newline at end of file
fanxing-forward/src/main/java/com/viontech/fanxing/forward/feign/OpsFeignClient.java
0 → 100644
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
forward
.
feign
;
import
com.viontech.fanxing.commons.model.Forward
;
import
com.viontech.keliu.util.JsonMessageUtil
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.bind.annotation.GetMapping
;
/**
* .
*
* @author 谢明辉
* @date 2021/7/16
*/
@FeignClient
(
value
=
"fanxing-ops"
)
@Service
public
interface
OpsFeignClient
{
@GetMapping
(
"/forwards"
)
JsonMessageUtil
.
JsonMessage
<
Forward
>
getForwards
();
}
fanxing-forward/src/main/java/com/viontech/fanxing/forward/feign/TaskManagerFeignClient.java
0 → 100644
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
forward
.
feign
;
import
com.viontech.fanxing.commons.model.Task
;
import
com.viontech.keliu.util.JsonMessageUtil
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.bind.annotation.GetMapping
;
/**
* .
*
* @author 谢明辉
* @date 2021/7/16
*/
@FeignClient
(
value
=
"fanxing-task-manager"
)
@Service
public
interface
TaskManagerFeignClient
{
@GetMapping
(
"/tasks"
)
JsonMessageUtil
.
JsonMessage
<
Task
>
getAllTask
();
}
fanxing-forward/src/main/java/com/viontech/fanxing/forward/mapper/BehaviorMapper.java
deleted
100644 → 0
View file @
5adeb0c
package
com
.
viontech
.
fanxing
.
forward
.
mapper
;
import
com.viontech.fanxing.commons.base.BaseMapper
;
import
com.viontech.fanxing.commons.model.Behavior
;
import
com.viontech.fanxing.commons.model.BehaviorExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
public
interface
BehaviorMapper
extends
BaseMapper
{
int
countByExample
(
BehaviorExample
example
);
int
deleteByExample
(
BehaviorExample
example
);
int
deleteByPrimaryKey
(
Long
id
);
int
insert
(
Behavior
record
);
int
insertSelective
(
Behavior
record
);
List
<
Behavior
>
selectByExampleWithBLOBs
(
BehaviorExample
example
);
List
<
Behavior
>
selectByExample
(
BehaviorExample
example
);
Behavior
selectByPrimaryKey
(
Long
id
);
int
updateByExampleSelective
(
@Param
(
"record"
)
Behavior
record
,
@Param
(
"example"
)
BehaviorExample
example
);
int
updateByExampleWithBLOBs
(
@Param
(
"record"
)
Behavior
record
,
@Param
(
"example"
)
BehaviorExample
example
);
int
updateByExample
(
@Param
(
"record"
)
Behavior
record
,
@Param
(
"example"
)
BehaviorExample
example
);
int
updateByPrimaryKeySelective
(
Behavior
record
);
int
updateByPrimaryKeyWithBLOBs
(
Behavior
record
);
int
updateByPrimaryKey
(
Behavior
record
);
}
\ No newline at end of file
\ No newline at end of file
fanxing-forward/src/main/java/com/viontech/fanxing/forward/mapper/FlowDataMapper.java
deleted
100644 → 0
View file @
5adeb0c
package
com
.
viontech
.
fanxing
.
forward
.
mapper
;
import
com.viontech.fanxing.commons.base.BaseMapper
;
import
com.viontech.fanxing.commons.model.FlowData
;
import
com.viontech.fanxing.commons.model.FlowDataExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
public
interface
FlowDataMapper
extends
BaseMapper
{
int
countByExample
(
FlowDataExample
example
);
int
deleteByExample
(
FlowDataExample
example
);
int
deleteByPrimaryKey
(
Long
id
);
int
insert
(
FlowData
record
);
int
insertSelective
(
FlowData
record
);
List
<
FlowData
>
selectByExampleWithBLOBs
(
FlowDataExample
example
);
List
<
FlowData
>
selectByExample
(
FlowDataExample
example
);
FlowData
selectByPrimaryKey
(
Long
id
);
int
updateByExampleSelective
(
@Param
(
"record"
)
FlowData
record
,
@Param
(
"example"
)
FlowDataExample
example
);
int
updateByExampleWithBLOBs
(
@Param
(
"record"
)
FlowData
record
,
@Param
(
"example"
)
FlowDataExample
example
);
int
updateByExample
(
@Param
(
"record"
)
FlowData
record
,
@Param
(
"example"
)
FlowDataExample
example
);
int
updateByPrimaryKeySelective
(
FlowData
record
);
int
updateByPrimaryKeyWithBLOBs
(
FlowData
record
);
int
updateByPrimaryKey
(
FlowData
record
);
}
\ No newline at end of file
\ No newline at end of file
fanxing-forward/src/main/java/com/viontech/fanxing/forward/mapper/FlowEventMapper.java
deleted
100644 → 0
View file @
5adeb0c
package
com
.
viontech
.
fanxing
.
forward
.
mapper
;
import
com.viontech.fanxing.commons.base.BaseMapper
;
import
com.viontech.fanxing.commons.model.FlowEvent
;
import
com.viontech.fanxing.commons.model.FlowEventExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
public
interface
FlowEventMapper
extends
BaseMapper
{
int
countByExample
(
FlowEventExample
example
);
int
deleteByExample
(
FlowEventExample
example
);
int
deleteByPrimaryKey
(
Long
id
);
int
insert
(
FlowEvent
record
);
int
insertSelective
(
FlowEvent
record
);
List
<
FlowEvent
>
selectByExampleWithBLOBs
(
FlowEventExample
example
);
List
<
FlowEvent
>
selectByExample
(
FlowEventExample
example
);
FlowEvent
selectByPrimaryKey
(
Long
id
);
int
updateByExampleSelective
(
@Param
(
"record"
)
FlowEvent
record
,
@Param
(
"example"
)
FlowEventExample
example
);
int
updateByExampleWithBLOBs
(
@Param
(
"record"
)
FlowEvent
record
,
@Param
(
"example"
)
FlowEventExample
example
);
int
updateByExample
(
@Param
(
"record"
)
FlowEvent
record
,
@Param
(
"example"
)
FlowEventExample
example
);
int
updateByPrimaryKeySelective
(
FlowEvent
record
);
int
updateByPrimaryKeyWithBLOBs
(
FlowEvent
record
);
int
updateByPrimaryKey
(
FlowEvent
record
);
}
\ No newline at end of file
\ No newline at end of file
fanxing-forward/src/main/java/com/viontech/fanxing/forward/mapper/TrafficMapper.java
deleted
100644 → 0
View file @
5adeb0c
package
com
.
viontech
.
fanxing
.
forward
.
mapper
;
import
com.viontech.fanxing.commons.base.BaseMapper
;
import
com.viontech.fanxing.commons.model.Traffic
;
import
com.viontech.fanxing.commons.model.TrafficExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
public
interface
TrafficMapper
extends
BaseMapper
{
int
countByExample
(
TrafficExample
example
);
int
deleteByExample
(
TrafficExample
example
);
int
deleteByPrimaryKey
(
Long
id
);
int
insert
(
Traffic
record
);
int
insertSelective
(
Traffic
record
);
List
<
Traffic
>
selectByExampleWithBLOBs
(
TrafficExample
example
);
List
<
Traffic
>
selectByExample
(
TrafficExample
example
);
Traffic
selectByPrimaryKey
(
Long
id
);
int
updateByExampleSelective
(
@Param
(
"record"
)
Traffic
record
,
@Param
(
"example"
)
TrafficExample
example
);
int
updateByExampleWithBLOBs
(
@Param
(
"record"
)
Traffic
record
,
@Param
(
"example"
)
TrafficExample
example
);
int
updateByExample
(
@Param
(
"record"
)
Traffic
record
,
@Param
(
"example"
)
TrafficExample
example
);
int
updateByPrimaryKeySelective
(
Traffic
record
);
int
updateByPrimaryKeyWithBLOBs
(
Traffic
record
);
int
updateByPrimaryKey
(
Traffic
record
);
}
\ No newline at end of file
\ No newline at end of file
fanxing-forward/src/main/java/com/viontech/fanxing/forward/mapping/BehaviorMapper.xml
deleted
100644 → 0
View file @
5adeb0c
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.viontech.fanxing.forward.mapper.BehaviorMapper"
>
<resultMap
id=
"BaseResultMapRoot"
type=
"com.viontech.fanxing.commons.model.Behavior"
>
<id
column=
"behavior_id"
property=
"id"
/>
<result
column=
"behavior_unid"
property=
"unid"
/>
<result
column=
"behavior_task_id"
property=
"taskId"
/>
<result
column=
"behavior_event_type"
property=
"eventType"
/>
<result
column=
"behavior_event_cate"
property=
"eventCate"
/>
<result
column=
"behavior_event_refid"
property=
"eventRefid"
/>
<result
column=
"behavior_event_time"
property=
"eventTime"
/>
<result
column=
"behavior_channel_unid"
property=
"channelUnid"
/>
<result
column=
"behavior_test_pic_file"
property=
"testPicFile"
/>
<result
column=
"behavior_test_frame_no"
property=
"testFrameNo"
/>
<result
column=
"behavior_task_name"
property=
"taskName"
/>
<result
column=
"behavior_event_data_num"
property=
"eventDataNum"
/>
</resultMap>
<resultMap
id=
"BaseResultMap"
type=
"com.viontech.fanxing.commons.model.Behavior"
extends=
"BaseResultMapRoot"
/>
<resultMap
id=
"ResultMapWithBLOBs"
type=
"com.viontech.fanxing.commons.model.Behavior"
extends=
"BaseResultMap"
>
<result
column=
"behavior_aux_dev_info"
property=
"auxDevInfo"
jdbcType=
"LONGVARCHAR"
/>
<result
column=
"behavior_event_data"
property=
"eventData"
jdbcType=
"LONGVARCHAR"
/>
<result
column=
"behavior_pics"
property=
"pics"
jdbcType=
"LONGVARCHAR"
/>
<result
column=
"behavior_video"
property=
"video"
jdbcType=
"LONGVARCHAR"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<where
>
<foreach
collection=
"oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
suffix=
")"
prefixOverrides=
"and"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose
>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
collection=
"criterion.value"
item=
"listItem"
open=
"("
close=
")"
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Update_By_Example_Where_Clause"
>
<where
>
<foreach
collection=
"example.oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
suffix=
")"
prefixOverrides=
"and"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose
>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
collection=
"criterion.value"
item=
"listItem"
open=
"("
close=
")"
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Base_Column_List_Root"
>
`behavior`.id as behavior_id, `behavior`.unid as behavior_unid, `behavior`.task_id as behavior_task_id,
`behavior`.event_type as behavior_event_type, `behavior`.event_cate as behavior_event_cate,
`behavior`.event_refid as behavior_event_refid, `behavior`.event_time as behavior_event_time,
`behavior`.channel_unid as behavior_channel_unid, `behavior`.test_pic_file as behavior_test_pic_file,
`behavior`.test_frame_no as behavior_test_frame_no, `behavior`.task_name as behavior_task_name,
`behavior`.event_data_num as behavior_event_data_num
</sql>
<sql
id=
"Base_Column_List"
>
<if
test=
"!(_parameter.getClass().getSimpleName() == 'BehaviorExample')"
>
<include
refid=
"com.viontech.fanxing.forward.mapper.BehaviorMapper.Base_Column_List_Root"
/>
</if>
<if
test=
"_parameter.getClass().getSimpleName() == 'BehaviorExample'"
>
<foreach
collection=
"columnContainerSet"
item=
"columns"
separator=
","
>
<choose
>
<when
test=
"columns.tableName == 'd_behavior'.toString()"
>
<if
test=
"columns.valid"
>
${columns.columnContainerStr}
</if>
<if
test=
"!columns.valid"
>
<include
refid=
"com.viontech.fanxing.forward.mapper.BehaviorMapper.Base_Column_List_Root"
/>
</if>
</when>
</choose>
</foreach>
</if>
</sql>
<sql
id=
"Blob_Column_List"
>
`behavior`.aux_dev_info as behavior_aux_dev_info, `behavior`.event_data as behavior_event_data,
`behavior`.pics as behavior_pics, `behavior`.video as behavior_video
</sql>
<select
id=
"selectByExampleWithBLOBs"
resultMap=
"ResultMapWithBLOBs"
parameterType=
"com.viontech.fanxing.commons.model.BehaviorExample"
>
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
,
<include
refid=
"Blob_Column_List"
/>
from `d_behavior` `behavior`
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"groupByClause != null"
>
group by ${groupByClause}
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
<select
id=
"selectByExample"
resultMap=
"BaseResultMap"
parameterType=
"com.viontech.fanxing.commons.model.BehaviorExample"
>
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from `d_behavior` `behavior`
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"groupByClause != null"
>
group by ${groupByClause}
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
<select
id=
"selectByPrimaryKey"
resultMap=
"ResultMapWithBLOBs"
parameterType=
"java.lang.Long"
>
select
<include
refid=
"Base_Column_List"
/>
,
<include
refid=
"Blob_Column_List"
/>
from `d_behavior` `behavior`
where `behavior`.id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from `d_behavior` `behavior`
where id = #{id,jdbcType=BIGINT}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.viontech.fanxing.commons.model.BehaviorExample"
>
delete from `d_behavior` `behavior`
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.viontech.fanxing.commons.model.Behavior"
useGeneratedKeys=
"true"
keyProperty=
"id"
keyColumn=
"id"
>
insert into `d_behavior` (unid, task_id, event_type,
event_cate, event_refid, event_time,
channel_unid, test_pic_file, test_frame_no,
task_name, event_data_num, aux_dev_info,
event_data, pics, video
)
values (#{unid,jdbcType=VARCHAR}, #{taskId,jdbcType=BIGINT}, #{eventType,jdbcType=VARCHAR},
#{eventCate,jdbcType=VARCHAR}, #{eventRefid,jdbcType=VARCHAR}, #{eventTime,jdbcType=TIMESTAMP},
#{channelUnid,jdbcType=VARCHAR}, #{testPicFile,jdbcType=VARCHAR}, #{testFrameNo,jdbcType=VARCHAR},
#{taskName,jdbcType=VARCHAR}, #{eventDataNum,jdbcType=VARCHAR}, #{auxDevInfo,jdbcType=LONGVARCHAR},
#{eventData,jdbcType=LONGVARCHAR}, #{pics,jdbcType=LONGVARCHAR}, #{video,jdbcType=LONGVARCHAR}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.viontech.fanxing.commons.model.Behavior"
useGeneratedKeys=
"true"
keyProperty=
"id"
keyColumn=
"id"
>
insert into `d_behavior`
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"unid != null"
>
unid,
</if>
<if
test=
"taskId != null"
>
task_id,
</if>
<if
test=
"eventType != null"
>
event_type,
</if>
<if
test=
"eventCate != null"
>
event_cate,
</if>
<if
test=
"eventRefid != null"
>
event_refid,
</if>
<if
test=
"eventTime != null"
>
event_time,
</if>
<if
test=
"channelUnid != null"
>
channel_unid,
</if>
<if
test=
"testPicFile != null"
>
test_pic_file,
</if>
<if
test=
"testFrameNo != null"
>
test_frame_no,
</if>
<if
test=
"taskName != null"
>
task_name,
</if>
<if
test=
"eventDataNum != null"
>
event_data_num,
</if>
<if
test=
"auxDevInfo != null"
>
aux_dev_info,
</if>
<if
test=
"eventData != null"
>
event_data,
</if>
<if
test=
"pics != null"
>
pics,
</if>
<if
test=
"video != null"
>
video,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"unid != null"
>
#{unid,jdbcType=VARCHAR},
</if>
<if
test=
"taskId != null"
>
#{taskId,jdbcType=BIGINT},
</if>
<if
test=
"eventType != null"
>
#{eventType,jdbcType=VARCHAR},
</if>
<if
test=
"eventCate != null"
>
#{eventCate,jdbcType=VARCHAR},
</if>
<if
test=
"eventRefid != null"
>
#{eventRefid,jdbcType=VARCHAR},
</if>
<if
test=
"eventTime != null"
>
#{eventTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"channelUnid != null"
>
#{channelUnid,jdbcType=VARCHAR},
</if>
<if
test=
"testPicFile != null"
>
#{testPicFile,jdbcType=VARCHAR},
</if>
<if
test=
"testFrameNo != null"
>
#{testFrameNo,jdbcType=VARCHAR},
</if>
<if
test=
"taskName != null"
>
#{taskName,jdbcType=VARCHAR},
</if>
<if
test=
"eventDataNum != null"
>
#{eventDataNum,jdbcType=VARCHAR},
</if>
<if
test=
"auxDevInfo != null"
>
#{auxDevInfo,jdbcType=LONGVARCHAR},
</if>
<if
test=
"eventData != null"
>
#{eventData,jdbcType=LONGVARCHAR},
</if>
<if
test=
"pics != null"
>
#{pics,jdbcType=LONGVARCHAR},
</if>
<if
test=
"video != null"
>
#{video,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.viontech.fanxing.commons.model.BehaviorExample"
resultType=
"java.lang.Integer"
>
select count(*) from `d_behavior` `behavior`
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update `d_behavior` `behavior`
<set
>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=BIGINT},
</if>
<if
test=
"record.unid != null"
>
unid = #{record.unid,jdbcType=VARCHAR},
</if>
<if
test=
"record.taskId != null"
>
task_id = #{record.taskId,jdbcType=BIGINT},
</if>
<if
test=
"record.eventType != null"
>
event_type = #{record.eventType,jdbcType=VARCHAR},
</if>
<if
test=
"record.eventCate != null"
>
event_cate = #{record.eventCate,jdbcType=VARCHAR},
</if>
<if
test=
"record.eventRefid != null"
>
event_refid = #{record.eventRefid,jdbcType=VARCHAR},
</if>
<if
test=
"record.eventTime != null"
>
event_time = #{record.eventTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.channelUnid != null"
>
channel_unid = #{record.channelUnid,jdbcType=VARCHAR},
</if>
<if
test=
"record.testPicFile != null"
>
test_pic_file = #{record.testPicFile,jdbcType=VARCHAR},
</if>
<if
test=
"record.testFrameNo != null"
>
test_frame_no = #{record.testFrameNo,jdbcType=VARCHAR},
</if>
<if
test=
"record.taskName != null"
>
task_name = #{record.taskName,jdbcType=VARCHAR},
</if>
<if
test=
"record.eventDataNum != null"
>
event_data_num = #{record.eventDataNum,jdbcType=VARCHAR},
</if>
<if
test=
"record.auxDevInfo != null"
>
aux_dev_info = #{record.auxDevInfo,jdbcType=LONGVARCHAR},
</if>
<if
test=
"record.eventData != null"
>
event_data = #{record.eventData,jdbcType=LONGVARCHAR},
</if>
<if
test=
"record.pics != null"
>
pics = #{record.pics,jdbcType=LONGVARCHAR},
</if>
<if
test=
"record.video != null"
>
video = #{record.video,jdbcType=LONGVARCHAR},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExampleWithBLOBs"
parameterType=
"map"
>
update `d_behavior` `behavior`
set `behavior`.id = #{record.id,jdbcType=BIGINT},
`behavior`.unid = #{record.unid,jdbcType=VARCHAR},
`behavior`.task_id = #{record.taskId,jdbcType=BIGINT},
`behavior`.event_type = #{record.eventType,jdbcType=VARCHAR},
`behavior`.event_cate = #{record.eventCate,jdbcType=VARCHAR},
`behavior`.event_refid = #{record.eventRefid,jdbcType=VARCHAR},
`behavior`.event_time = #{record.eventTime,jdbcType=TIMESTAMP},
`behavior`.channel_unid = #{record.channelUnid,jdbcType=VARCHAR},
`behavior`.test_pic_file = #{record.testPicFile,jdbcType=VARCHAR},
`behavior`.test_frame_no = #{record.testFrameNo,jdbcType=VARCHAR},
`behavior`.task_name = #{record.taskName,jdbcType=VARCHAR},
`behavior`.event_data_num = #{record.eventDataNum,jdbcType=VARCHAR},
`behavior`.aux_dev_info = #{record.auxDevInfo,jdbcType=LONGVARCHAR},
`behavior`.event_data = #{record.eventData,jdbcType=LONGVARCHAR},
`behavior`.pics = #{record.pics,jdbcType=LONGVARCHAR},
`behavior`.video = #{record.video,jdbcType=LONGVARCHAR}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update `d_behavior` `behavior`
set id = #{record.id,jdbcType=BIGINT},
unid = #{record.unid,jdbcType=VARCHAR},
task_id = #{record.taskId,jdbcType=BIGINT},
event_type = #{record.eventType,jdbcType=VARCHAR},
event_cate = #{record.eventCate,jdbcType=VARCHAR},
event_refid = #{record.eventRefid,jdbcType=VARCHAR},
event_time = #{record.eventTime,jdbcType=TIMESTAMP},
channel_unid = #{record.channelUnid,jdbcType=VARCHAR},
test_pic_file = #{record.testPicFile,jdbcType=VARCHAR},
test_frame_no = #{record.testFrameNo,jdbcType=VARCHAR},
task_name = #{record.taskName,jdbcType=VARCHAR},
event_data_num = #{record.eventDataNum,jdbcType=VARCHAR}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.viontech.fanxing.commons.model.Behavior"
>
update `d_behavior`
<set
>
<if
test=
"unid != null"
>
unid = #{unid,jdbcType=VARCHAR},
</if>
<if
test=
"taskId != null"
>
task_id = #{taskId,jdbcType=BIGINT},
</if>
<if
test=
"eventType != null"
>
event_type = #{eventType,jdbcType=VARCHAR},
</if>
<if
test=
"eventCate != null"
>
event_cate = #{eventCate,jdbcType=VARCHAR},
</if>
<if
test=
"eventRefid != null"
>
event_refid = #{eventRefid,jdbcType=VARCHAR},
</if>
<if
test=
"eventTime != null"
>
event_time = #{eventTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"channelUnid != null"
>
channel_unid = #{channelUnid,jdbcType=VARCHAR},
</if>
<if
test=
"testPicFile != null"
>
test_pic_file = #{testPicFile,jdbcType=VARCHAR},
</if>
<if
test=
"testFrameNo != null"
>
test_frame_no = #{testFrameNo,jdbcType=VARCHAR},
</if>
<if
test=
"taskName != null"
>
task_name = #{taskName,jdbcType=VARCHAR},
</if>
<if
test=
"eventDataNum != null"
>
event_data_num = #{eventDataNum,jdbcType=VARCHAR},
</if>
<if
test=
"auxDevInfo != null"
>
aux_dev_info = #{auxDevInfo,jdbcType=LONGVARCHAR},
</if>
<if
test=
"eventData != null"
>
event_data = #{eventData,jdbcType=LONGVARCHAR},
</if>
<if
test=
"pics != null"
>
pics = #{pics,jdbcType=LONGVARCHAR},
</if>
<if
test=
"video != null"
>
video = #{video,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKeyWithBLOBs"
parameterType=
"com.viontech.fanxing.commons.model.Behavior"
>
update `d_behavior`
set unid = #{unid,jdbcType=VARCHAR},
task_id = #{taskId,jdbcType=BIGINT},
event_type = #{eventType,jdbcType=VARCHAR},
event_cate = #{eventCate,jdbcType=VARCHAR},
event_refid = #{eventRefid,jdbcType=VARCHAR},
event_time = #{eventTime,jdbcType=TIMESTAMP},
channel_unid = #{channelUnid,jdbcType=VARCHAR},
test_pic_file = #{testPicFile,jdbcType=VARCHAR},
test_frame_no = #{testFrameNo,jdbcType=VARCHAR},
task_name = #{taskName,jdbcType=VARCHAR},
event_data_num = #{eventDataNum,jdbcType=VARCHAR},
aux_dev_info = #{auxDevInfo,jdbcType=LONGVARCHAR},
event_data = #{eventData,jdbcType=LONGVARCHAR},
pics = #{pics,jdbcType=LONGVARCHAR},
video = #{video,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.viontech.fanxing.commons.model.Behavior"
>
update `d_behavior`
set unid = #{unid,jdbcType=VARCHAR},
task_id = #{taskId,jdbcType=BIGINT},
event_type = #{eventType,jdbcType=VARCHAR},
event_cate = #{eventCate,jdbcType=VARCHAR},
event_refid = #{eventRefid,jdbcType=VARCHAR},
event_time = #{eventTime,jdbcType=TIMESTAMP},
channel_unid = #{channelUnid,jdbcType=VARCHAR},
test_pic_file = #{testPicFile,jdbcType=VARCHAR},
test_frame_no = #{testFrameNo,jdbcType=VARCHAR},
task_name = #{taskName,jdbcType=VARCHAR},
event_data_num = #{eventDataNum,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
\ No newline at end of file
fanxing-forward/src/main/java/com/viontech/fanxing/forward/mapping/FlowDataMapper.xml
deleted
100644 → 0
View file @
5adeb0c
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.viontech.fanxing.forward.mapper.FlowDataMapper"
>
<resultMap
id=
"BaseResultMapRoot"
type=
"com.viontech.fanxing.commons.model.FlowData"
>
<id
column=
"flowData_id"
property=
"id"
/>
<result
column=
"flowData_unid"
property=
"unid"
/>
<result
column=
"flowData_event_id"
property=
"eventId"
/>
<result
column=
"flowData_task_id"
property=
"taskId"
/>
<result
column=
"flowData_detection_type"
property=
"detectionType"
/>
<result
column=
"flowData_road_code"
property=
"roadCode"
/>
<result
column=
"flowData_direction_code"
property=
"directionCode"
/>
<result
column=
"flowData_sample_dura"
property=
"sampleDura"
/>
<result
column=
"flowData_sample_num"
property=
"sampleNum"
/>
<result
column=
"flowData_velocity"
property=
"velocity"
/>
<result
column=
"flowData_velocity_unit"
property=
"velocityUnit"
/>
<result
column=
"flowData_occupy"
property=
"occupy"
/>
<result
column=
"flowData_distance"
property=
"distance"
/>
<result
column=
"flowData_queue_length"
property=
"queueLength"
/>
<result
column=
"flowData_region_id"
property=
"regionId"
/>
<result
column=
"flowData_region_name"
property=
"regionName"
/>
<result
column=
"flowData_area"
property=
"area"
/>
<result
column=
"flowData_density"
property=
"density"
/>
<result
column=
"flowData_sample_num_in"
property=
"sampleNumIn"
/>
<result
column=
"flowData_sample_num_out"
property=
"sampleNumOut"
/>
<result
column=
"flowData_event_time"
property=
"eventTime"
/>
<result
column=
"flowData_dist_time"
property=
"distTime"
/>
<result
column=
"flowData_time_occupy"
property=
"timeOccupy"
/>
<result
column=
"flowData_status"
property=
"status"
/>
</resultMap>
<resultMap
id=
"BaseResultMap"
type=
"com.viontech.fanxing.commons.model.FlowData"
extends=
"BaseResultMapRoot"
/>
<resultMap
id=
"ResultMapWithBLOBs"
type=
"com.viontech.fanxing.commons.model.FlowData"
extends=
"BaseResultMap"
>
<result
column=
"flowData_position_content"
property=
"positionContent"
jdbcType=
"LONGVARCHAR"
/>
<result
column=
"flowData_head_content"
property=
"headContent"
jdbcType=
"LONGVARCHAR"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<where
>
<foreach
collection=
"oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
suffix=
")"
prefixOverrides=
"and"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose
>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
collection=
"criterion.value"
item=
"listItem"
open=
"("
close=
")"
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Update_By_Example_Where_Clause"
>
<where
>
<foreach
collection=
"example.oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
suffix=
")"
prefixOverrides=
"and"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose
>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
collection=
"criterion.value"
item=
"listItem"
open=
"("
close=
")"
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Base_Column_List_Root"
>
`flowData`.id as flowData_id, `flowData`.unid as flowData_unid, `flowData`.event_id as flowData_event_id,
`flowData`.task_id as flowData_task_id, `flowData`.detection_type as flowData_detection_type,
`flowData`.road_code as flowData_road_code, `flowData`.direction_code as flowData_direction_code,
`flowData`.sample_dura as flowData_sample_dura, `flowData`.sample_num as flowData_sample_num,
`flowData`.velocity as flowData_velocity, `flowData`.velocity_unit as flowData_velocity_unit,
`flowData`.occupy as flowData_occupy, `flowData`.distance as flowData_distance, `flowData`.queue_length as flowData_queue_length,
`flowData`.region_id as flowData_region_id, `flowData`.region_name as flowData_region_name,
`flowData`.area as flowData_area, `flowData`.density as flowData_density, `flowData`.sample_num_in as flowData_sample_num_in,
`flowData`.sample_num_out as flowData_sample_num_out, `flowData`.event_time as flowData_event_time,
`flowData`.dist_time as flowData_dist_time, `flowData`.time_occupy as flowData_time_occupy,
`flowData`.`status` as `flowData_status`
</sql>
<sql
id=
"Base_Column_List"
>
<if
test=
"!(_parameter.getClass().getSimpleName() == 'FlowDataExample')"
>
<include
refid=
"com.viontech.fanxing.forward.mapper.FlowDataMapper.Base_Column_List_Root"
/>
</if>
<if
test=
"_parameter.getClass().getSimpleName() == 'FlowDataExample'"
>
<foreach
collection=
"columnContainerSet"
item=
"columns"
separator=
","
>
<choose
>
<when
test=
"columns.tableName == 'd_flow_data'.toString()"
>
<if
test=
"columns.valid"
>
${columns.columnContainerStr}
</if>
<if
test=
"!columns.valid"
>
<include
refid=
"com.viontech.fanxing.forward.mapper.FlowDataMapper.Base_Column_List_Root"
/>
</if>
</when>
</choose>
</foreach>
</if>
</sql>
<sql
id=
"Blob_Column_List"
>
`flowData`.position_content as flowData_position_content, `flowData`.head_content as flowData_head_content
</sql>
<select
id=
"selectByExampleWithBLOBs"
resultMap=
"ResultMapWithBLOBs"
parameterType=
"com.viontech.fanxing.commons.model.FlowDataExample"
>
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
,
<include
refid=
"Blob_Column_List"
/>
from `d_flow_data` `flowData`
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"groupByClause != null"
>
group by ${groupByClause}
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
<select
id=
"selectByExample"
resultMap=
"BaseResultMap"
parameterType=
"com.viontech.fanxing.commons.model.FlowDataExample"
>
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from `d_flow_data` `flowData`
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"groupByClause != null"
>
group by ${groupByClause}
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
<select
id=
"selectByPrimaryKey"
resultMap=
"ResultMapWithBLOBs"
parameterType=
"java.lang.Long"
>
select
<include
refid=
"Base_Column_List"
/>
,
<include
refid=
"Blob_Column_List"
/>
from `d_flow_data` `flowData`
where `flowData`.id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from `d_flow_data` `flowData`
where id = #{id,jdbcType=BIGINT}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.viontech.fanxing.commons.model.FlowDataExample"
>
delete from `d_flow_data` `flowData`
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.viontech.fanxing.commons.model.FlowData"
useGeneratedKeys=
"true"
keyProperty=
"id"
keyColumn=
"id"
>
insert into `d_flow_data` (unid, event_id, task_id,
detection_type, road_code, direction_code,
sample_dura, sample_num, velocity,
velocity_unit, occupy, distance,
queue_length, region_id, region_name,
area, density, sample_num_in,
sample_num_out, event_time, dist_time,
time_occupy, `status`, position_content,
head_content)
values (#{unid,jdbcType=VARCHAR}, #{eventId,jdbcType=VARCHAR}, #{taskId,jdbcType=BIGINT},
#{detectionType,jdbcType=VARCHAR}, #{roadCode,jdbcType=VARCHAR}, #{directionCode,jdbcType=VARCHAR},
#{sampleDura,jdbcType=BIGINT}, #{sampleNum,jdbcType=REAL}, #{velocity,jdbcType=REAL},
#{velocityUnit,jdbcType=VARCHAR}, #{occupy,jdbcType=REAL}, #{distance,jdbcType=REAL},
#{queueLength,jdbcType=REAL}, #{regionId,jdbcType=VARCHAR}, #{regionName,jdbcType=VARCHAR},
#{area,jdbcType=REAL}, #{density,jdbcType=REAL}, #{sampleNumIn,jdbcType=REAL},
#{sampleNumOut,jdbcType=REAL}, #{eventTime,jdbcType=TIMESTAMP}, #{distTime,jdbcType=REAL},
#{timeOccupy,jdbcType=REAL}, #{status,jdbcType=INTEGER}, #{positionContent,jdbcType=LONGVARCHAR},
#{headContent,jdbcType=LONGVARCHAR})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.viontech.fanxing.commons.model.FlowData"
useGeneratedKeys=
"true"
keyProperty=
"id"
keyColumn=
"id"
>
insert into `d_flow_data`
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"unid != null"
>
unid,
</if>
<if
test=
"eventId != null"
>
event_id,
</if>
<if
test=
"taskId != null"
>
task_id,
</if>
<if
test=
"detectionType != null"
>
detection_type,
</if>
<if
test=
"roadCode != null"
>
road_code,
</if>
<if
test=
"directionCode != null"
>
direction_code,
</if>
<if
test=
"sampleDura != null"
>
sample_dura,
</if>
<if
test=
"sampleNum != null"
>
sample_num,
</if>
<if
test=
"velocity != null"
>
velocity,
</if>
<if
test=
"velocityUnit != null"
>
velocity_unit,
</if>
<if
test=
"occupy != null"
>
occupy,
</if>
<if
test=
"distance != null"
>
distance,
</if>
<if
test=
"queueLength != null"
>
queue_length,
</if>
<if
test=
"regionId != null"
>
region_id,
</if>
<if
test=
"regionName != null"
>
region_name,
</if>
<if
test=
"area != null"
>
area,
</if>
<if
test=
"density != null"
>
density,
</if>
<if
test=
"sampleNumIn != null"
>
sample_num_in,
</if>
<if
test=
"sampleNumOut != null"
>
sample_num_out,
</if>
<if
test=
"eventTime != null"
>
event_time,
</if>
<if
test=
"distTime != null"
>
dist_time,
</if>
<if
test=
"timeOccupy != null"
>
time_occupy,
</if>
<if
test=
"status != null"
>
`status`,
</if>
<if
test=
"positionContent != null"
>
position_content,
</if>
<if
test=
"headContent != null"
>
head_content,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"unid != null"
>
#{unid,jdbcType=VARCHAR},
</if>
<if
test=
"eventId != null"
>
#{eventId,jdbcType=VARCHAR},
</if>
<if
test=
"taskId != null"
>
#{taskId,jdbcType=BIGINT},
</if>
<if
test=
"detectionType != null"
>
#{detectionType,jdbcType=VARCHAR},
</if>
<if
test=
"roadCode != null"
>
#{roadCode,jdbcType=VARCHAR},
</if>
<if
test=
"directionCode != null"
>
#{directionCode,jdbcType=VARCHAR},
</if>
<if
test=
"sampleDura != null"
>
#{sampleDura,jdbcType=BIGINT},
</if>
<if
test=
"sampleNum != null"
>
#{sampleNum,jdbcType=REAL},
</if>
<if
test=
"velocity != null"
>
#{velocity,jdbcType=REAL},
</if>
<if
test=
"velocityUnit != null"
>
#{velocityUnit,jdbcType=VARCHAR},
</if>
<if
test=
"occupy != null"
>
#{occupy,jdbcType=REAL},
</if>
<if
test=
"distance != null"
>
#{distance,jdbcType=REAL},
</if>
<if
test=
"queueLength != null"
>
#{queueLength,jdbcType=REAL},
</if>
<if
test=
"regionId != null"
>
#{regionId,jdbcType=VARCHAR},
</if>
<if
test=
"regionName != null"
>
#{regionName,jdbcType=VARCHAR},
</if>
<if
test=
"area != null"
>
#{area,jdbcType=REAL},
</if>
<if
test=
"density != null"
>
#{density,jdbcType=REAL},
</if>
<if
test=
"sampleNumIn != null"
>
#{sampleNumIn,jdbcType=REAL},
</if>
<if
test=
"sampleNumOut != null"
>
#{sampleNumOut,jdbcType=REAL},
</if>
<if
test=
"eventTime != null"
>
#{eventTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"distTime != null"
>
#{distTime,jdbcType=REAL},
</if>
<if
test=
"timeOccupy != null"
>
#{timeOccupy,jdbcType=REAL},
</if>
<if
test=
"status != null"
>
#{status,jdbcType=INTEGER},
</if>
<if
test=
"positionContent != null"
>
#{positionContent,jdbcType=LONGVARCHAR},
</if>
<if
test=
"headContent != null"
>
#{headContent,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.viontech.fanxing.commons.model.FlowDataExample"
resultType=
"java.lang.Integer"
>
select count(*) from `d_flow_data` `flowData`
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update `d_flow_data` `flowData`
<set
>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=BIGINT},
</if>
<if
test=
"record.unid != null"
>
unid = #{record.unid,jdbcType=VARCHAR},
</if>
<if
test=
"record.eventId != null"
>
event_id = #{record.eventId,jdbcType=VARCHAR},
</if>
<if
test=
"record.taskId != null"
>
task_id = #{record.taskId,jdbcType=BIGINT},
</if>
<if
test=
"record.detectionType != null"
>
detection_type = #{record.detectionType,jdbcType=VARCHAR},
</if>
<if
test=
"record.roadCode != null"
>
road_code = #{record.roadCode,jdbcType=VARCHAR},
</if>
<if
test=
"record.directionCode != null"
>
direction_code = #{record.directionCode,jdbcType=VARCHAR},
</if>
<if
test=
"record.sampleDura != null"
>
sample_dura = #{record.sampleDura,jdbcType=BIGINT},
</if>
<if
test=
"record.sampleNum != null"
>
sample_num = #{record.sampleNum,jdbcType=REAL},
</if>
<if
test=
"record.velocity != null"
>
velocity = #{record.velocity,jdbcType=REAL},
</if>
<if
test=
"record.velocityUnit != null"
>
velocity_unit = #{record.velocityUnit,jdbcType=VARCHAR},
</if>
<if
test=
"record.occupy != null"
>
occupy = #{record.occupy,jdbcType=REAL},
</if>
<if
test=
"record.distance != null"
>
distance = #{record.distance,jdbcType=REAL},
</if>
<if
test=
"record.queueLength != null"
>
queue_length = #{record.queueLength,jdbcType=REAL},
</if>
<if
test=
"record.regionId != null"
>
region_id = #{record.regionId,jdbcType=VARCHAR},
</if>
<if
test=
"record.regionName != null"
>
region_name = #{record.regionName,jdbcType=VARCHAR},
</if>
<if
test=
"record.area != null"
>
area = #{record.area,jdbcType=REAL},
</if>
<if
test=
"record.density != null"
>
density = #{record.density,jdbcType=REAL},
</if>
<if
test=
"record.sampleNumIn != null"
>
sample_num_in = #{record.sampleNumIn,jdbcType=REAL},
</if>
<if
test=
"record.sampleNumOut != null"
>
sample_num_out = #{record.sampleNumOut,jdbcType=REAL},
</if>
<if
test=
"record.eventTime != null"
>
event_time = #{record.eventTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.distTime != null"
>
dist_time = #{record.distTime,jdbcType=REAL},
</if>
<if
test=
"record.timeOccupy != null"
>
time_occupy = #{record.timeOccupy,jdbcType=REAL},
</if>
<if
test=
"record.status != null"
>
`status` = #{record.status,jdbcType=INTEGER},
</if>
<if
test=
"record.positionContent != null"
>
position_content = #{record.positionContent,jdbcType=LONGVARCHAR},
</if>
<if
test=
"record.headContent != null"
>
head_content = #{record.headContent,jdbcType=LONGVARCHAR},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExampleWithBLOBs"
parameterType=
"map"
>
update `d_flow_data` `flowData`
set `flowData`.id = #{record.id,jdbcType=BIGINT},
`flowData`.unid = #{record.unid,jdbcType=VARCHAR},
`flowData`.event_id = #{record.eventId,jdbcType=VARCHAR},
`flowData`.task_id = #{record.taskId,jdbcType=BIGINT},
`flowData`.detection_type = #{record.detectionType,jdbcType=VARCHAR},
`flowData`.road_code = #{record.roadCode,jdbcType=VARCHAR},
`flowData`.direction_code = #{record.directionCode,jdbcType=VARCHAR},
`flowData`.sample_dura = #{record.sampleDura,jdbcType=BIGINT},
`flowData`.sample_num = #{record.sampleNum,jdbcType=REAL},
`flowData`.velocity = #{record.velocity,jdbcType=REAL},
`flowData`.velocity_unit = #{record.velocityUnit,jdbcType=VARCHAR},
`flowData`.occupy = #{record.occupy,jdbcType=REAL},
`flowData`.distance = #{record.distance,jdbcType=REAL},
`flowData`.queue_length = #{record.queueLength,jdbcType=REAL},
`flowData`.region_id = #{record.regionId,jdbcType=VARCHAR},
`flowData`.region_name = #{record.regionName,jdbcType=VARCHAR},
`flowData`.area = #{record.area,jdbcType=REAL},
`flowData`.density = #{record.density,jdbcType=REAL},
`flowData`.sample_num_in = #{record.sampleNumIn,jdbcType=REAL},
`flowData`.sample_num_out = #{record.sampleNumOut,jdbcType=REAL},
`flowData`.event_time = #{record.eventTime,jdbcType=TIMESTAMP},
`flowData`.dist_time = #{record.distTime,jdbcType=REAL},
`flowData`.time_occupy = #{record.timeOccupy,jdbcType=REAL},
`flowData`.`status` = #{record.status,jdbcType=INTEGER},
`flowData`.position_content = #{record.positionContent,jdbcType=LONGVARCHAR},
`flowData`.head_content = #{record.headContent,jdbcType=LONGVARCHAR}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update `d_flow_data` `flowData`
set id = #{record.id,jdbcType=BIGINT},
unid = #{record.unid,jdbcType=VARCHAR},
event_id = #{record.eventId,jdbcType=VARCHAR},
task_id = #{record.taskId,jdbcType=BIGINT},
detection_type = #{record.detectionType,jdbcType=VARCHAR},
road_code = #{record.roadCode,jdbcType=VARCHAR},
direction_code = #{record.directionCode,jdbcType=VARCHAR},
sample_dura = #{record.sampleDura,jdbcType=BIGINT},
sample_num = #{record.sampleNum,jdbcType=REAL},
velocity = #{record.velocity,jdbcType=REAL},
velocity_unit = #{record.velocityUnit,jdbcType=VARCHAR},
occupy = #{record.occupy,jdbcType=REAL},
distance = #{record.distance,jdbcType=REAL},
queue_length = #{record.queueLength,jdbcType=REAL},
region_id = #{record.regionId,jdbcType=VARCHAR},
region_name = #{record.regionName,jdbcType=VARCHAR},
area = #{record.area,jdbcType=REAL},
density = #{record.density,jdbcType=REAL},
sample_num_in = #{record.sampleNumIn,jdbcType=REAL},
sample_num_out = #{record.sampleNumOut,jdbcType=REAL},
event_time = #{record.eventTime,jdbcType=TIMESTAMP},
dist_time = #{record.distTime,jdbcType=REAL},
time_occupy = #{record.timeOccupy,jdbcType=REAL},
`status` = #{record.status,jdbcType=INTEGER}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.viontech.fanxing.commons.model.FlowData"
>
update `d_flow_data`
<set
>
<if
test=
"unid != null"
>
unid = #{unid,jdbcType=VARCHAR},
</if>
<if
test=
"eventId != null"
>
event_id = #{eventId,jdbcType=VARCHAR},
</if>
<if
test=
"taskId != null"
>
task_id = #{taskId,jdbcType=BIGINT},
</if>
<if
test=
"detectionType != null"
>
detection_type = #{detectionType,jdbcType=VARCHAR},
</if>
<if
test=
"roadCode != null"
>
road_code = #{roadCode,jdbcType=VARCHAR},
</if>
<if
test=
"directionCode != null"
>
direction_code = #{directionCode,jdbcType=VARCHAR},
</if>
<if
test=
"sampleDura != null"
>
sample_dura = #{sampleDura,jdbcType=BIGINT},
</if>
<if
test=
"sampleNum != null"
>
sample_num = #{sampleNum,jdbcType=REAL},
</if>
<if
test=
"velocity != null"
>
velocity = #{velocity,jdbcType=REAL},
</if>
<if
test=
"velocityUnit != null"
>
velocity_unit = #{velocityUnit,jdbcType=VARCHAR},
</if>
<if
test=
"occupy != null"
>
occupy = #{occupy,jdbcType=REAL},
</if>
<if
test=
"distance != null"
>
distance = #{distance,jdbcType=REAL},
</if>
<if
test=
"queueLength != null"
>
queue_length = #{queueLength,jdbcType=REAL},
</if>
<if
test=
"regionId != null"
>
region_id = #{regionId,jdbcType=VARCHAR},
</if>
<if
test=
"regionName != null"
>
region_name = #{regionName,jdbcType=VARCHAR},
</if>
<if
test=
"area != null"
>
area = #{area,jdbcType=REAL},
</if>
<if
test=
"density != null"
>
density = #{density,jdbcType=REAL},
</if>
<if
test=
"sampleNumIn != null"
>
sample_num_in = #{sampleNumIn,jdbcType=REAL},
</if>
<if
test=
"sampleNumOut != null"
>
sample_num_out = #{sampleNumOut,jdbcType=REAL},
</if>
<if
test=
"eventTime != null"
>
event_time = #{eventTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"distTime != null"
>
dist_time = #{distTime,jdbcType=REAL},
</if>
<if
test=
"timeOccupy != null"
>
time_occupy = #{timeOccupy,jdbcType=REAL},
</if>
<if
test=
"status != null"
>
`status` = #{status,jdbcType=INTEGER},
</if>
<if
test=
"positionContent != null"
>
position_content = #{positionContent,jdbcType=LONGVARCHAR},
</if>
<if
test=
"headContent != null"
>
head_content = #{headContent,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKeyWithBLOBs"
parameterType=
"com.viontech.fanxing.commons.model.FlowData"
>
update `d_flow_data`
set unid = #{unid,jdbcType=VARCHAR},
event_id = #{eventId,jdbcType=VARCHAR},
task_id = #{taskId,jdbcType=BIGINT},
detection_type = #{detectionType,jdbcType=VARCHAR},
road_code = #{roadCode,jdbcType=VARCHAR},
direction_code = #{directionCode,jdbcType=VARCHAR},
sample_dura = #{sampleDura,jdbcType=BIGINT},
sample_num = #{sampleNum,jdbcType=REAL},
velocity = #{velocity,jdbcType=REAL},
velocity_unit = #{velocityUnit,jdbcType=VARCHAR},
occupy = #{occupy,jdbcType=REAL},
distance = #{distance,jdbcType=REAL},
queue_length = #{queueLength,jdbcType=REAL},
region_id = #{regionId,jdbcType=VARCHAR},
region_name = #{regionName,jdbcType=VARCHAR},
area = #{area,jdbcType=REAL},
density = #{density,jdbcType=REAL},
sample_num_in = #{sampleNumIn,jdbcType=REAL},
sample_num_out = #{sampleNumOut,jdbcType=REAL},
event_time = #{eventTime,jdbcType=TIMESTAMP},
dist_time = #{distTime,jdbcType=REAL},
time_occupy = #{timeOccupy,jdbcType=REAL},
`status` = #{status,jdbcType=INTEGER},
position_content = #{positionContent,jdbcType=LONGVARCHAR},
head_content = #{headContent,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.viontech.fanxing.commons.model.FlowData"
>
update `d_flow_data`
set unid = #{unid,jdbcType=VARCHAR},
event_id = #{eventId,jdbcType=VARCHAR},
task_id = #{taskId,jdbcType=BIGINT},
detection_type = #{detectionType,jdbcType=VARCHAR},
road_code = #{roadCode,jdbcType=VARCHAR},
direction_code = #{directionCode,jdbcType=VARCHAR},
sample_dura = #{sampleDura,jdbcType=BIGINT},
sample_num = #{sampleNum,jdbcType=REAL},
velocity = #{velocity,jdbcType=REAL},
velocity_unit = #{velocityUnit,jdbcType=VARCHAR},
occupy = #{occupy,jdbcType=REAL},
distance = #{distance,jdbcType=REAL},
queue_length = #{queueLength,jdbcType=REAL},
region_id = #{regionId,jdbcType=VARCHAR},
region_name = #{regionName,jdbcType=VARCHAR},
area = #{area,jdbcType=REAL},
density = #{density,jdbcType=REAL},
sample_num_in = #{sampleNumIn,jdbcType=REAL},
sample_num_out = #{sampleNumOut,jdbcType=REAL},
event_time = #{eventTime,jdbcType=TIMESTAMP},
dist_time = #{distTime,jdbcType=REAL},
time_occupy = #{timeOccupy,jdbcType=REAL},
`status` = #{status,jdbcType=INTEGER}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
\ No newline at end of file
fanxing-forward/src/main/java/com/viontech/fanxing/forward/mapping/TrafficMapper.xml
deleted
100644 → 0
View file @
5adeb0c
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.viontech.fanxing.forward.mapper.TrafficMapper"
>
<resultMap
id=
"BaseResultMapRoot"
type=
"com.viontech.fanxing.commons.model.Traffic"
>
<id
column=
"traffic_id"
property=
"id"
/>
<result
column=
"traffic_unid"
property=
"unid"
/>
<result
column=
"traffic_task_id"
property=
"taskId"
/>
<result
column=
"traffic_event_cate"
property=
"eventCate"
/>
<result
column=
"traffic_event_type"
property=
"eventType"
/>
<result
column=
"traffic_event_time"
property=
"eventTime"
/>
<result
column=
"traffic_channel_unid"
property=
"channelUnid"
/>
<result
column=
"traffic_plate_color"
property=
"plateColor"
/>
<result
column=
"traffic_plate_number"
property=
"plateNumber"
/>
<result
column=
"traffic_location_code"
property=
"locationCode"
/>
<result
column=
"traffic_lane_code"
property=
"laneCode"
/>
<result
column=
"traffic_direction_code"
property=
"directionCode"
/>
<result
column=
"traffic_vehicle_type"
property=
"vehicleType"
/>
<result
column=
"traffic_illegal_code"
property=
"illegalCode"
/>
<result
column=
"traffic_illegal_state"
property=
"illegalState"
/>
<result
column=
"traffic_vehicle_color"
property=
"vehicleColor"
/>
<result
column=
"traffic_vehicle_logo"
property=
"vehicleLogo"
/>
<result
column=
"traffic_annual_inspection_mark"
property=
"annualInspectionMark"
/>
<result
column=
"traffic_pendant"
property=
"pendant"
/>
<result
column=
"traffic_decoration"
property=
"decoration"
/>
<result
column=
"traffic_sun_shield"
property=
"sunShield"
/>
<result
column=
"traffic_xcycle_type"
property=
"xcycleType"
/>
<result
column=
"traffic_event_id"
property=
"eventId"
/>
<result
column=
"traffic_shoot_time"
property=
"shootTime"
/>
<result
column=
"traffic_special_type"
property=
"specialType"
/>
<result
column=
"traffic_with_helmet"
property=
"withHelmet"
/>
<result
column=
"traffic_pic_name"
property=
"picName"
/>
<result
column=
"traffic_video_name"
property=
"videoName"
/>
<result
column=
"traffic_status"
property=
"status"
/>
</resultMap>
<resultMap
id=
"BaseResultMap"
type=
"com.viontech.fanxing.commons.model.Traffic"
extends=
"BaseResultMapRoot"
/>
<resultMap
id=
"ResultMapWithBLOBs"
type=
"com.viontech.fanxing.commons.model.Traffic"
extends=
"BaseResultMap"
>
<result
column=
"traffic_json_data"
property=
"jsonData"
jdbcType=
"LONGVARCHAR"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<where
>
<foreach
collection=
"oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
suffix=
")"
prefixOverrides=
"and"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose
>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
collection=
"criterion.value"
item=
"listItem"
open=
"("
close=
")"
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Update_By_Example_Where_Clause"
>
<where
>
<foreach
collection=
"example.oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
suffix=
")"
prefixOverrides=
"and"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose
>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
collection=
"criterion.value"
item=
"listItem"
open=
"("
close=
")"
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Base_Column_List_Root"
>
`traffic`.id as traffic_id, `traffic`.unid as traffic_unid, `traffic`.task_id as traffic_task_id,
`traffic`.event_cate as traffic_event_cate, `traffic`.event_type as traffic_event_type,
`traffic`.event_time as traffic_event_time, `traffic`.channel_unid as traffic_channel_unid,
`traffic`.plate_color as traffic_plate_color, `traffic`.plate_number as traffic_plate_number,
`traffic`.location_code as traffic_location_code, `traffic`.lane_code as traffic_lane_code,
`traffic`.direction_code as traffic_direction_code, `traffic`.vehicle_type as traffic_vehicle_type,
`traffic`.illegal_code as traffic_illegal_code, `traffic`.illegal_state as traffic_illegal_state,
`traffic`.vehicle_color as traffic_vehicle_color, `traffic`.vehicle_logo as traffic_vehicle_logo,
`traffic`.annual_inspection_mark as traffic_annual_inspection_mark, `traffic`.pendant as traffic_pendant,
`traffic`.decoration as traffic_decoration, `traffic`.sun_shield as traffic_sun_shield,
`traffic`.xcycle_type as traffic_xcycle_type, `traffic`.event_id as traffic_event_id,
`traffic`.shoot_time as traffic_shoot_time, `traffic`.special_type as traffic_special_type,
`traffic`.with_helmet as traffic_with_helmet, `traffic`.pic_name as traffic_pic_name,
`traffic`.video_name as traffic_video_name, `traffic`.`status` as `traffic_status`
</sql>
<sql
id=
"Base_Column_List"
>
<if
test=
"!(_parameter.getClass().getSimpleName() == 'TrafficExample')"
>
<include
refid=
"com.viontech.fanxing.forward.mapper.TrafficMapper.Base_Column_List_Root"
/>
</if>
<if
test=
"_parameter.getClass().getSimpleName() == 'TrafficExample'"
>
<foreach
collection=
"columnContainerSet"
item=
"columns"
separator=
","
>
<choose
>
<when
test=
"columns.tableName == 'd_traffic'.toString()"
>
<if
test=
"columns.valid"
>
${columns.columnContainerStr}
</if>
<if
test=
"!columns.valid"
>
<include
refid=
"com.viontech.fanxing.forward.mapper.TrafficMapper.Base_Column_List_Root"
/>
</if>
</when>
</choose>
</foreach>
</if>
</sql>
<sql
id=
"Blob_Column_List"
>
`traffic`.json_data as traffic_json_data
</sql>
<select
id=
"selectByExampleWithBLOBs"
resultMap=
"ResultMapWithBLOBs"
parameterType=
"com.viontech.fanxing.commons.model.TrafficExample"
>
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
,
<include
refid=
"Blob_Column_List"
/>
from `d_traffic` `traffic`
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"groupByClause != null"
>
group by ${groupByClause}
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
<select
id=
"selectByExample"
resultMap=
"BaseResultMap"
parameterType=
"com.viontech.fanxing.commons.model.TrafficExample"
>
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from `d_traffic` `traffic`
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"groupByClause != null"
>
group by ${groupByClause}
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
<select
id=
"selectByPrimaryKey"
resultMap=
"ResultMapWithBLOBs"
parameterType=
"java.lang.Long"
>
select
<include
refid=
"Base_Column_List"
/>
,
<include
refid=
"Blob_Column_List"
/>
from `d_traffic` `traffic`
where `traffic`.id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from `d_traffic` `traffic`
where id = #{id,jdbcType=BIGINT}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.viontech.fanxing.commons.model.TrafficExample"
>
delete from `d_traffic` `traffic`
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.viontech.fanxing.commons.model.Traffic"
useGeneratedKeys=
"true"
keyProperty=
"id"
keyColumn=
"id"
>
insert into `d_traffic` (unid, task_id, event_cate,
event_type, event_time, channel_unid,
plate_color, plate_number, location_code,
lane_code, direction_code, vehicle_type,
illegal_code, illegal_state, vehicle_color,
vehicle_logo, annual_inspection_mark, pendant,
decoration, sun_shield, xcycle_type,
event_id, shoot_time, special_type,
with_helmet, pic_name, video_name,
`status`, json_data)
values (#{unid,jdbcType=VARCHAR}, #{taskId,jdbcType=BIGINT}, #{eventCate,jdbcType=VARCHAR},
#{eventType,jdbcType=VARCHAR}, #{eventTime,jdbcType=TIMESTAMP}, #{channelUnid,jdbcType=VARCHAR},
#{plateColor,jdbcType=VARCHAR}, #{plateNumber,jdbcType=VARCHAR}, #{locationCode,jdbcType=VARCHAR},
#{laneCode,jdbcType=VARCHAR}, #{directionCode,jdbcType=VARCHAR}, #{vehicleType,jdbcType=VARCHAR},
#{illegalCode,jdbcType=VARCHAR}, #{illegalState,jdbcType=INTEGER}, #{vehicleColor,jdbcType=VARCHAR},
#{vehicleLogo,jdbcType=VARCHAR}, #{annualInspectionMark,jdbcType=VARCHAR}, #{pendant,jdbcType=VARCHAR},
#{decoration,jdbcType=VARCHAR}, #{sunShield,jdbcType=VARCHAR}, #{xcycleType,jdbcType=VARCHAR},
#{eventId,jdbcType=VARCHAR}, #{shootTime,jdbcType=TIMESTAMP}, #{specialType,jdbcType=VARCHAR},
#{withHelmet,jdbcType=INTEGER}, #{picName,jdbcType=VARCHAR}, #{videoName,jdbcType=VARCHAR},
#{status,jdbcType=INTEGER}, #{jsonData,jdbcType=LONGVARCHAR})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.viontech.fanxing.commons.model.Traffic"
useGeneratedKeys=
"true"
keyProperty=
"id"
keyColumn=
"id"
>
insert into `d_traffic`
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"unid != null"
>
unid,
</if>
<if
test=
"taskId != null"
>
task_id,
</if>
<if
test=
"eventCate != null"
>
event_cate,
</if>
<if
test=
"eventType != null"
>
event_type,
</if>
<if
test=
"eventTime != null"
>
event_time,
</if>
<if
test=
"channelUnid != null"
>
channel_unid,
</if>
<if
test=
"plateColor != null"
>
plate_color,
</if>
<if
test=
"plateNumber != null"
>
plate_number,
</if>
<if
test=
"locationCode != null"
>
location_code,
</if>
<if
test=
"laneCode != null"
>
lane_code,
</if>
<if
test=
"directionCode != null"
>
direction_code,
</if>
<if
test=
"vehicleType != null"
>
vehicle_type,
</if>
<if
test=
"illegalCode != null"
>
illegal_code,
</if>
<if
test=
"illegalState != null"
>
illegal_state,
</if>
<if
test=
"vehicleColor != null"
>
vehicle_color,
</if>
<if
test=
"vehicleLogo != null"
>
vehicle_logo,
</if>
<if
test=
"annualInspectionMark != null"
>
annual_inspection_mark,
</if>
<if
test=
"pendant != null"
>
pendant,
</if>
<if
test=
"decoration != null"
>
decoration,
</if>
<if
test=
"sunShield != null"
>
sun_shield,
</if>
<if
test=
"xcycleType != null"
>
xcycle_type,
</if>
<if
test=
"eventId != null"
>
event_id,
</if>
<if
test=
"shootTime != null"
>
shoot_time,
</if>
<if
test=
"specialType != null"
>
special_type,
</if>
<if
test=
"withHelmet != null"
>
with_helmet,
</if>
<if
test=
"picName != null"
>
pic_name,
</if>
<if
test=
"videoName != null"
>
video_name,
</if>
<if
test=
"status != null"
>
`status`,
</if>
<if
test=
"jsonData != null"
>
json_data,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"unid != null"
>
#{unid,jdbcType=VARCHAR},
</if>
<if
test=
"taskId != null"
>
#{taskId,jdbcType=BIGINT},
</if>
<if
test=
"eventCate != null"
>
#{eventCate,jdbcType=VARCHAR},
</if>
<if
test=
"eventType != null"
>
#{eventType,jdbcType=VARCHAR},
</if>
<if
test=
"eventTime != null"
>
#{eventTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"channelUnid != null"
>
#{channelUnid,jdbcType=VARCHAR},
</if>
<if
test=
"plateColor != null"
>
#{plateColor,jdbcType=VARCHAR},
</if>
<if
test=
"plateNumber != null"
>
#{plateNumber,jdbcType=VARCHAR},
</if>
<if
test=
"locationCode != null"
>
#{locationCode,jdbcType=VARCHAR},
</if>
<if
test=
"laneCode != null"
>
#{laneCode,jdbcType=VARCHAR},
</if>
<if
test=
"directionCode != null"
>
#{directionCode,jdbcType=VARCHAR},
</if>
<if
test=
"vehicleType != null"
>
#{vehicleType,jdbcType=VARCHAR},
</if>
<if
test=
"illegalCode != null"
>
#{illegalCode,jdbcType=VARCHAR},
</if>
<if
test=
"illegalState != null"
>
#{illegalState,jdbcType=INTEGER},
</if>
<if
test=
"vehicleColor != null"
>
#{vehicleColor,jdbcType=VARCHAR},
</if>
<if
test=
"vehicleLogo != null"
>
#{vehicleLogo,jdbcType=VARCHAR},
</if>
<if
test=
"annualInspectionMark != null"
>
#{annualInspectionMark,jdbcType=VARCHAR},
</if>
<if
test=
"pendant != null"
>
#{pendant,jdbcType=VARCHAR},
</if>
<if
test=
"decoration != null"
>
#{decoration,jdbcType=VARCHAR},
</if>
<if
test=
"sunShield != null"
>
#{sunShield,jdbcType=VARCHAR},
</if>
<if
test=
"xcycleType != null"
>
#{xcycleType,jdbcType=VARCHAR},
</if>
<if
test=
"eventId != null"
>
#{eventId,jdbcType=VARCHAR},
</if>
<if
test=
"shootTime != null"
>
#{shootTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"specialType != null"
>
#{specialType,jdbcType=VARCHAR},
</if>
<if
test=
"withHelmet != null"
>
#{withHelmet,jdbcType=INTEGER},
</if>
<if
test=
"picName != null"
>
#{picName,jdbcType=VARCHAR},
</if>
<if
test=
"videoName != null"
>
#{videoName,jdbcType=VARCHAR},
</if>
<if
test=
"status != null"
>
#{status,jdbcType=INTEGER},
</if>
<if
test=
"jsonData != null"
>
#{jsonData,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.viontech.fanxing.commons.model.TrafficExample"
resultType=
"java.lang.Integer"
>
select count(*) from `d_traffic` `traffic`
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update `d_traffic` `traffic`
<set
>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=BIGINT},
</if>
<if
test=
"record.unid != null"
>
unid = #{record.unid,jdbcType=VARCHAR},
</if>
<if
test=
"record.taskId != null"
>
task_id = #{record.taskId,jdbcType=BIGINT},
</if>
<if
test=
"record.eventCate != null"
>
event_cate = #{record.eventCate,jdbcType=VARCHAR},
</if>
<if
test=
"record.eventType != null"
>
event_type = #{record.eventType,jdbcType=VARCHAR},
</if>
<if
test=
"record.eventTime != null"
>
event_time = #{record.eventTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.channelUnid != null"
>
channel_unid = #{record.channelUnid,jdbcType=VARCHAR},
</if>
<if
test=
"record.plateColor != null"
>
plate_color = #{record.plateColor,jdbcType=VARCHAR},
</if>
<if
test=
"record.plateNumber != null"
>
plate_number = #{record.plateNumber,jdbcType=VARCHAR},
</if>
<if
test=
"record.locationCode != null"
>
location_code = #{record.locationCode,jdbcType=VARCHAR},
</if>
<if
test=
"record.laneCode != null"
>
lane_code = #{record.laneCode,jdbcType=VARCHAR},
</if>
<if
test=
"record.directionCode != null"
>
direction_code = #{record.directionCode,jdbcType=VARCHAR},
</if>
<if
test=
"record.vehicleType != null"
>
vehicle_type = #{record.vehicleType,jdbcType=VARCHAR},
</if>
<if
test=
"record.illegalCode != null"
>
illegal_code = #{record.illegalCode,jdbcType=VARCHAR},
</if>
<if
test=
"record.illegalState != null"
>
illegal_state = #{record.illegalState,jdbcType=INTEGER},
</if>
<if
test=
"record.vehicleColor != null"
>
vehicle_color = #{record.vehicleColor,jdbcType=VARCHAR},
</if>
<if
test=
"record.vehicleLogo != null"
>
vehicle_logo = #{record.vehicleLogo,jdbcType=VARCHAR},
</if>
<if
test=
"record.annualInspectionMark != null"
>
annual_inspection_mark = #{record.annualInspectionMark,jdbcType=VARCHAR},
</if>
<if
test=
"record.pendant != null"
>
pendant = #{record.pendant,jdbcType=VARCHAR},
</if>
<if
test=
"record.decoration != null"
>
decoration = #{record.decoration,jdbcType=VARCHAR},
</if>
<if
test=
"record.sunShield != null"
>
sun_shield = #{record.sunShield,jdbcType=VARCHAR},
</if>
<if
test=
"record.xcycleType != null"
>
xcycle_type = #{record.xcycleType,jdbcType=VARCHAR},
</if>
<if
test=
"record.eventId != null"
>
event_id = #{record.eventId,jdbcType=VARCHAR},
</if>
<if
test=
"record.shootTime != null"
>
shoot_time = #{record.shootTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.specialType != null"
>
special_type = #{record.specialType,jdbcType=VARCHAR},
</if>
<if
test=
"record.withHelmet != null"
>
with_helmet = #{record.withHelmet,jdbcType=INTEGER},
</if>
<if
test=
"record.picName != null"
>
pic_name = #{record.picName,jdbcType=VARCHAR},
</if>
<if
test=
"record.videoName != null"
>
video_name = #{record.videoName,jdbcType=VARCHAR},
</if>
<if
test=
"record.status != null"
>
`status` = #{record.status,jdbcType=INTEGER},
</if>
<if
test=
"record.jsonData != null"
>
json_data = #{record.jsonData,jdbcType=LONGVARCHAR},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExampleWithBLOBs"
parameterType=
"map"
>
update `d_traffic` `traffic`
set `traffic`.id = #{record.id,jdbcType=BIGINT},
`traffic`.unid = #{record.unid,jdbcType=VARCHAR},
`traffic`.task_id = #{record.taskId,jdbcType=BIGINT},
`traffic`.event_cate = #{record.eventCate,jdbcType=VARCHAR},
`traffic`.event_type = #{record.eventType,jdbcType=VARCHAR},
`traffic`.event_time = #{record.eventTime,jdbcType=TIMESTAMP},
`traffic`.channel_unid = #{record.channelUnid,jdbcType=VARCHAR},
`traffic`.plate_color = #{record.plateColor,jdbcType=VARCHAR},
`traffic`.plate_number = #{record.plateNumber,jdbcType=VARCHAR},
`traffic`.location_code = #{record.locationCode,jdbcType=VARCHAR},
`traffic`.lane_code = #{record.laneCode,jdbcType=VARCHAR},
`traffic`.direction_code = #{record.directionCode,jdbcType=VARCHAR},
`traffic`.vehicle_type = #{record.vehicleType,jdbcType=VARCHAR},
`traffic`.illegal_code = #{record.illegalCode,jdbcType=VARCHAR},
`traffic`.illegal_state = #{record.illegalState,jdbcType=INTEGER},
`traffic`.vehicle_color = #{record.vehicleColor,jdbcType=VARCHAR},
`traffic`.vehicle_logo = #{record.vehicleLogo,jdbcType=VARCHAR},
`traffic`.annual_inspection_mark = #{record.annualInspectionMark,jdbcType=VARCHAR},
`traffic`.pendant = #{record.pendant,jdbcType=VARCHAR},
`traffic`.decoration = #{record.decoration,jdbcType=VARCHAR},
`traffic`.sun_shield = #{record.sunShield,jdbcType=VARCHAR},
`traffic`.xcycle_type = #{record.xcycleType,jdbcType=VARCHAR},
`traffic`.event_id = #{record.eventId,jdbcType=VARCHAR},
`traffic`.shoot_time = #{record.shootTime,jdbcType=TIMESTAMP},
`traffic`.special_type = #{record.specialType,jdbcType=VARCHAR},
`traffic`.with_helmet = #{record.withHelmet,jdbcType=INTEGER},
`traffic`.pic_name = #{record.picName,jdbcType=VARCHAR},
`traffic`.video_name = #{record.videoName,jdbcType=VARCHAR},
`traffic`.`status` = #{record.status,jdbcType=INTEGER},
`traffic`.json_data = #{record.jsonData,jdbcType=LONGVARCHAR}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update `d_traffic` `traffic`
set id = #{record.id,jdbcType=BIGINT},
unid = #{record.unid,jdbcType=VARCHAR},
task_id = #{record.taskId,jdbcType=BIGINT},
event_cate = #{record.eventCate,jdbcType=VARCHAR},
event_type = #{record.eventType,jdbcType=VARCHAR},
event_time = #{record.eventTime,jdbcType=TIMESTAMP},
channel_unid = #{record.channelUnid,jdbcType=VARCHAR},
plate_color = #{record.plateColor,jdbcType=VARCHAR},
plate_number = #{record.plateNumber,jdbcType=VARCHAR},
location_code = #{record.locationCode,jdbcType=VARCHAR},
lane_code = #{record.laneCode,jdbcType=VARCHAR},
direction_code = #{record.directionCode,jdbcType=VARCHAR},
vehicle_type = #{record.vehicleType,jdbcType=VARCHAR},
illegal_code = #{record.illegalCode,jdbcType=VARCHAR},
illegal_state = #{record.illegalState,jdbcType=INTEGER},
vehicle_color = #{record.vehicleColor,jdbcType=VARCHAR},
vehicle_logo = #{record.vehicleLogo,jdbcType=VARCHAR},
annual_inspection_mark = #{record.annualInspectionMark,jdbcType=VARCHAR},
pendant = #{record.pendant,jdbcType=VARCHAR},
decoration = #{record.decoration,jdbcType=VARCHAR},
sun_shield = #{record.sunShield,jdbcType=VARCHAR},
xcycle_type = #{record.xcycleType,jdbcType=VARCHAR},
event_id = #{record.eventId,jdbcType=VARCHAR},
shoot_time = #{record.shootTime,jdbcType=TIMESTAMP},
special_type = #{record.specialType,jdbcType=VARCHAR},
with_helmet = #{record.withHelmet,jdbcType=INTEGER},
pic_name = #{record.picName,jdbcType=VARCHAR},
video_name = #{record.videoName,jdbcType=VARCHAR},
`status` = #{record.status,jdbcType=INTEGER}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.viontech.fanxing.commons.model.Traffic"
>
update `d_traffic`
<set
>
<if
test=
"unid != null"
>
unid = #{unid,jdbcType=VARCHAR},
</if>
<if
test=
"taskId != null"
>
task_id = #{taskId,jdbcType=BIGINT},
</if>
<if
test=
"eventCate != null"
>
event_cate = #{eventCate,jdbcType=VARCHAR},
</if>
<if
test=
"eventType != null"
>
event_type = #{eventType,jdbcType=VARCHAR},
</if>
<if
test=
"eventTime != null"
>
event_time = #{eventTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"channelUnid != null"
>
channel_unid = #{channelUnid,jdbcType=VARCHAR},
</if>
<if
test=
"plateColor != null"
>
plate_color = #{plateColor,jdbcType=VARCHAR},
</if>
<if
test=
"plateNumber != null"
>
plate_number = #{plateNumber,jdbcType=VARCHAR},
</if>
<if
test=
"locationCode != null"
>
location_code = #{locationCode,jdbcType=VARCHAR},
</if>
<if
test=
"laneCode != null"
>
lane_code = #{laneCode,jdbcType=VARCHAR},
</if>
<if
test=
"directionCode != null"
>
direction_code = #{directionCode,jdbcType=VARCHAR},
</if>
<if
test=
"vehicleType != null"
>
vehicle_type = #{vehicleType,jdbcType=VARCHAR},
</if>
<if
test=
"illegalCode != null"
>
illegal_code = #{illegalCode,jdbcType=VARCHAR},
</if>
<if
test=
"illegalState != null"
>
illegal_state = #{illegalState,jdbcType=INTEGER},
</if>
<if
test=
"vehicleColor != null"
>
vehicle_color = #{vehicleColor,jdbcType=VARCHAR},
</if>
<if
test=
"vehicleLogo != null"
>
vehicle_logo = #{vehicleLogo,jdbcType=VARCHAR},
</if>
<if
test=
"annualInspectionMark != null"
>
annual_inspection_mark = #{annualInspectionMark,jdbcType=VARCHAR},
</if>
<if
test=
"pendant != null"
>
pendant = #{pendant,jdbcType=VARCHAR},
</if>
<if
test=
"decoration != null"
>
decoration = #{decoration,jdbcType=VARCHAR},
</if>
<if
test=
"sunShield != null"
>
sun_shield = #{sunShield,jdbcType=VARCHAR},
</if>
<if
test=
"xcycleType != null"
>
xcycle_type = #{xcycleType,jdbcType=VARCHAR},
</if>
<if
test=
"eventId != null"
>
event_id = #{eventId,jdbcType=VARCHAR},
</if>
<if
test=
"shootTime != null"
>
shoot_time = #{shootTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"specialType != null"
>
special_type = #{specialType,jdbcType=VARCHAR},
</if>
<if
test=
"withHelmet != null"
>
with_helmet = #{withHelmet,jdbcType=INTEGER},
</if>
<if
test=
"picName != null"
>
pic_name = #{picName,jdbcType=VARCHAR},
</if>
<if
test=
"videoName != null"
>
video_name = #{videoName,jdbcType=VARCHAR},
</if>
<if
test=
"status != null"
>
`status` = #{status,jdbcType=INTEGER},
</if>
<if
test=
"jsonData != null"
>
json_data = #{jsonData,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKeyWithBLOBs"
parameterType=
"com.viontech.fanxing.commons.model.Traffic"
>
update `d_traffic`
set unid = #{unid,jdbcType=VARCHAR},
task_id = #{taskId,jdbcType=BIGINT},
event_cate = #{eventCate,jdbcType=VARCHAR},
event_type = #{eventType,jdbcType=VARCHAR},
event_time = #{eventTime,jdbcType=TIMESTAMP},
channel_unid = #{channelUnid,jdbcType=VARCHAR},
plate_color = #{plateColor,jdbcType=VARCHAR},
plate_number = #{plateNumber,jdbcType=VARCHAR},
location_code = #{locationCode,jdbcType=VARCHAR},
lane_code = #{laneCode,jdbcType=VARCHAR},
direction_code = #{directionCode,jdbcType=VARCHAR},
vehicle_type = #{vehicleType,jdbcType=VARCHAR},
illegal_code = #{illegalCode,jdbcType=VARCHAR},
illegal_state = #{illegalState,jdbcType=INTEGER},
vehicle_color = #{vehicleColor,jdbcType=VARCHAR},
vehicle_logo = #{vehicleLogo,jdbcType=VARCHAR},
annual_inspection_mark = #{annualInspectionMark,jdbcType=VARCHAR},
pendant = #{pendant,jdbcType=VARCHAR},
decoration = #{decoration,jdbcType=VARCHAR},
sun_shield = #{sunShield,jdbcType=VARCHAR},
xcycle_type = #{xcycleType,jdbcType=VARCHAR},
event_id = #{eventId,jdbcType=VARCHAR},
shoot_time = #{shootTime,jdbcType=TIMESTAMP},
special_type = #{specialType,jdbcType=VARCHAR},
with_helmet = #{withHelmet,jdbcType=INTEGER},
pic_name = #{picName,jdbcType=VARCHAR},
video_name = #{videoName,jdbcType=VARCHAR},
`status` = #{status,jdbcType=INTEGER},
json_data = #{jsonData,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.viontech.fanxing.commons.model.Traffic"
>
update `d_traffic`
set unid = #{unid,jdbcType=VARCHAR},
task_id = #{taskId,jdbcType=BIGINT},
event_cate = #{eventCate,jdbcType=VARCHAR},
event_type = #{eventType,jdbcType=VARCHAR},
event_time = #{eventTime,jdbcType=TIMESTAMP},
channel_unid = #{channelUnid,jdbcType=VARCHAR},
plate_color = #{plateColor,jdbcType=VARCHAR},
plate_number = #{plateNumber,jdbcType=VARCHAR},
location_code = #{locationCode,jdbcType=VARCHAR},
lane_code = #{laneCode,jdbcType=VARCHAR},
direction_code = #{directionCode,jdbcType=VARCHAR},
vehicle_type = #{vehicleType,jdbcType=VARCHAR},
illegal_code = #{illegalCode,jdbcType=VARCHAR},
illegal_state = #{illegalState,jdbcType=INTEGER},
vehicle_color = #{vehicleColor,jdbcType=VARCHAR},
vehicle_logo = #{vehicleLogo,jdbcType=VARCHAR},
annual_inspection_mark = #{annualInspectionMark,jdbcType=VARCHAR},
pendant = #{pendant,jdbcType=VARCHAR},
decoration = #{decoration,jdbcType=VARCHAR},
sun_shield = #{sunShield,jdbcType=VARCHAR},
xcycle_type = #{xcycleType,jdbcType=VARCHAR},
event_id = #{eventId,jdbcType=VARCHAR},
shoot_time = #{shootTime,jdbcType=TIMESTAMP},
special_type = #{specialType,jdbcType=VARCHAR},
with_helmet = #{withHelmet,jdbcType=INTEGER},
pic_name = #{picName,jdbcType=VARCHAR},
video_name = #{videoName,jdbcType=VARCHAR},
`status` = #{status,jdbcType=INTEGER}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
\ No newline at end of file
fanxing-forward/src/main/java/com/viontech/fanxing/forward/model/ForwardContent.java
0 → 100644
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
forward
.
model
;
import
com.alibaba.fastjson.JSONObject
;
import
com.viontech.fanxing.commons.model.Forward
;
import
lombok.Data
;
import
java.util.List
;
/**
* .
*
* @author 谢明辉
* @date 2021/7/15
*/
@Data
public
class
ForwardContent
{
private
String
json
;
private
List
<
Forward
>
forwardList
;
}
fanxing-forward/src/main/java/com/viontech/fanxing/forward/model/TrafficContent.java
0 → 100644
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
forward
.
model
;
import
com.viontech.fanxing.commons.model.Traffic
;
import
com.viontech.fanxing.commons.model.TrafficFace
;
import
lombok.Data
;
import
java.util.List
;
/**
* .
*
* @author 谢明辉
* @date 2021/7/15
*/
@Data
public
class
TrafficContent
{
private
Traffic
traffic
;
private
List
<
TrafficFace
>
trafficFaces
;
}
fanxing-forward/src/main/java/com/viontech/fanxing/forward/model/TrafficFlowContent.java
0 → 100644
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
forward
.
model
;
import
com.viontech.fanxing.commons.model.FlowData
;
import
com.viontech.fanxing.commons.model.FlowEvent
;
import
lombok.Data
;
import
java.util.List
;
/**
* .
*
* @author 谢明辉
* @date 2021/7/15
*/
@Data
public
class
TrafficFlowContent
{
private
FlowEvent
flowEvent
;
private
List
<
FlowData
>
flowData
;
}
fanxing-forward/src/main/java/com/viontech/fanxing/forward/runner/JobStartRunner.java
0 → 100644
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
forward
.
runner
;
import
org.springframework.batch.core.Job
;
import
org.springframework.batch.core.JobParameters
;
import
org.springframework.batch.core.JobParametersBuilder
;
import
org.springframework.batch.core.launch.support.SimpleJobLauncher
;
import
org.springframework.batch.core.repository.JobRepository
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.CommandLineRunner
;
import
org.springframework.core.annotation.Order
;
import
org.springframework.core.task.SimpleAsyncTaskExecutor
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.Resource
;
import
java.util.UUID
;
/**
* .
*
* @author 谢明辉
* @date 2021/7/14
*/
@Component
@Order
(
11
)
public
class
JobStartRunner
implements
CommandLineRunner
{
@Autowired
JobRepository
jobRepository
;
@Resource
private
Job
trafficJob
;
@Resource
private
Job
forwardJob
;
@Resource
private
Job
trafficFlowJob
;
@Resource
private
Job
behaviorJob
;
@Override
public
void
run
(
String
...
args
)
throws
Exception
{
SimpleJobLauncher
sjl
=
new
SimpleJobLauncher
();
sjl
.
setJobRepository
(
jobRepository
);
sjl
.
setTaskExecutor
(
new
SimpleAsyncTaskExecutor
());
sjl
.
afterPropertiesSet
();
JobParameters
jobParameters
=
new
JobParametersBuilder
().
addString
(
"uuid"
,
UUID
.
randomUUID
().
toString
()).
toJobParameters
();
sjl
.
run
(
trafficJob
,
jobParameters
);
jobParameters
=
new
JobParametersBuilder
().
addString
(
"uuid"
,
UUID
.
randomUUID
().
toString
()).
toJobParameters
();
sjl
.
run
(
trafficFlowJob
,
jobParameters
);
jobParameters
=
new
JobParametersBuilder
().
addString
(
"uuid"
,
UUID
.
randomUUID
().
toString
()).
toJobParameters
();
sjl
.
run
(
behaviorJob
,
jobParameters
);
}
}
fanxing-forward/src/main/java/com/viontech/fanxing/forward/service/adapter/BehaviorService.java
deleted
100644 → 0
View file @
5adeb0c
package
com
.
viontech
.
fanxing
.
forward
.
service
.
adapter
;
import
com.viontech.fanxing.commons.base.BaseService
;
import
com.viontech.fanxing.commons.model.Behavior
;
public
interface
BehaviorService
extends
BaseService
<
Behavior
>
{
}
\ No newline at end of file
\ No newline at end of file
fanxing-forward/src/main/java/com/viontech/fanxing/forward/service/adapter/FlowDataService.java
deleted
100644 → 0
View file @
5adeb0c
package
com
.
viontech
.
fanxing
.
forward
.
service
.
adapter
;
import
com.viontech.fanxing.commons.base.BaseService
;
import
com.viontech.fanxing.commons.model.FlowData
;
public
interface
FlowDataService
extends
BaseService
<
FlowData
>
{
}
\ No newline at end of file
\ No newline at end of file
fanxing-forward/src/main/java/com/viontech/fanxing/forward/service/adapter/FlowEventService.java
deleted
100644 → 0
View file @
5adeb0c
package
com
.
viontech
.
fanxing
.
forward
.
service
.
adapter
;
import
com.viontech.fanxing.commons.base.BaseService
;
import
com.viontech.fanxing.commons.model.FlowEvent
;
public
interface
FlowEventService
extends
BaseService
<
FlowEvent
>
{
}
\ No newline at end of file
\ No newline at end of file
fanxing-forward/src/main/java/com/viontech/fanxing/forward/service/adapter/TrafficService.java
deleted
100644 → 0
View file @
5adeb0c
package
com
.
viontech
.
fanxing
.
forward
.
service
.
adapter
;
import
com.viontech.fanxing.commons.base.BaseService
;
import
com.viontech.fanxing.commons.model.Traffic
;
public
interface
TrafficService
extends
BaseService
<
Traffic
>
{
}
\ No newline at end of file
\ No newline at end of file
fanxing-forward/src/main/java/com/viontech/fanxing/forward/service/impl/FlowDataServiceImpl.java
deleted
100644 → 0
View file @
5adeb0c
package
com
.
viontech
.
fanxing
.
forward
.
service
.
impl
;
import
com.viontech.fanxing.commons.base.BaseMapper
;
import
com.viontech.fanxing.commons.base.BaseServiceImpl
;
import
com.viontech.fanxing.forward.mapper.FlowDataMapper
;
import
com.viontech.fanxing.commons.model.FlowData
;
import
com.viontech.fanxing.forward.service.adapter.FlowDataService
;
import
javax.annotation.Resource
;
import
org.springframework.stereotype.Service
;
@Service
public
class
FlowDataServiceImpl
extends
BaseServiceImpl
<
FlowData
>
implements
FlowDataService
{
@Resource
private
FlowDataMapper
flowDataMapper
;
@Override
public
BaseMapper
<
FlowData
>
getMapper
()
{
return
flowDataMapper
;
}
}
\ No newline at end of file
\ No newline at end of file
fanxing-forward/src/main/java/com/viontech/fanxing/forward/service/impl/FlowEventServiceImpl.java
deleted
100644 → 0
View file @
5adeb0c
package
com
.
viontech
.
fanxing
.
forward
.
service
.
impl
;
import
com.viontech.fanxing.commons.base.BaseMapper
;
import
com.viontech.fanxing.commons.base.BaseServiceImpl
;
import
com.viontech.fanxing.forward.mapper.FlowEventMapper
;
import
com.viontech.fanxing.commons.model.FlowEvent
;
import
com.viontech.fanxing.forward.service.adapter.FlowEventService
;
import
javax.annotation.Resource
;
import
org.springframework.stereotype.Service
;
@Service
public
class
FlowEventServiceImpl
extends
BaseServiceImpl
<
FlowEvent
>
implements
FlowEventService
{
@Resource
private
FlowEventMapper
flowEventMapper
;
@Override
public
BaseMapper
<
FlowEvent
>
getMapper
()
{
return
flowEventMapper
;
}
}
\ No newline at end of file
\ No newline at end of file
fanxing-forward/src/main/java/com/viontech/fanxing/forward/service/impl/TrafficServiceImpl.java
deleted
100644 → 0
View file @
5adeb0c
package
com
.
viontech
.
fanxing
.
forward
.
service
.
impl
;
import
com.viontech.fanxing.commons.base.BaseMapper
;
import
com.viontech.fanxing.commons.base.BaseServiceImpl
;
import
com.viontech.fanxing.forward.mapper.TrafficMapper
;
import
com.viontech.fanxing.commons.model.Traffic
;
import
com.viontech.fanxing.forward.service.adapter.TrafficService
;
import
javax.annotation.Resource
;
import
org.springframework.stereotype.Service
;
@Service
public
class
TrafficServiceImpl
extends
BaseServiceImpl
<
Traffic
>
implements
TrafficService
{
@Resource
private
TrafficMapper
trafficMapper
;
@Override
public
BaseMapper
<
Traffic
>
getMapper
()
{
return
trafficMapper
;
}
}
\ No newline at end of file
\ No newline at end of file
fanxing-forward/src/main/java/com/viontech/fanxing/forward/util/CacheUtils.java
0 → 100644
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
forward
.
util
;
import
com.viontech.fanxing.commons.model.Forward
;
import
com.viontech.fanxing.commons.model.Task
;
import
com.viontech.fanxing.forward.feign.OpsFeignClient
;
import
com.viontech.fanxing.forward.feign.TaskManagerFeignClient
;
import
com.viontech.keliu.util.JsonMessageUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.Resource
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.stream.Collectors
;
/**
* .
*
* @author 谢明辉
* @date 2021/7/16
*/
@Component
@Slf4j
public
class
CacheUtils
{
private
static
final
ConcurrentHashMap
<
String
,
Object
>
CACHE_MAP
=
new
ConcurrentHashMap
<>();
private
static
final
ConcurrentHashMap
<
String
,
Long
>
EXPIRE_MAP
=
new
ConcurrentHashMap
<>();
@Resource
private
TaskManagerFeignClient
taskManagerFeignClient
;
@Resource
private
OpsFeignClient
opsFeignClient
;
public
synchronized
Map
<
String
,
Task
>
getTaskMap
()
{
String
key
=
"task_map"
;
Long
expire
=
EXPIRE_MAP
.
get
(
key
);
if
(
expire
==
null
||
expire
<
System
.
currentTimeMillis
())
{
JsonMessageUtil
.
JsonMessage
<
Task
>
response
=
null
;
try
{
response
=
taskManagerFeignClient
.
getAllTask
();
}
catch
(
Exception
e
)
{
log
.
info
(
"获取 task_map 失败:"
,
e
);
}
if
(
response
!=
null
&&
response
.
getData
()
!=
null
)
{
List
<
Task
>
data
=
(
List
<
Task
>)
response
.
getData
();
Map
<
String
,
Task
>
taskMap
=
data
.
stream
().
collect
(
Collectors
.
toMap
(
Task:
:
getUnid
,
x
->
x
,
(
x
,
y
)
->
x
));
CACHE_MAP
.
put
(
key
,
taskMap
);
}
else
{
CACHE_MAP
.
put
(
key
,
Collections
.
emptyMap
());
}
EXPIRE_MAP
.
put
(
key
,
System
.
currentTimeMillis
());
}
return
(
Map
<
String
,
Task
>)
CACHE_MAP
.
get
(
key
);
}
public
synchronized
List
<
Forward
>
getAllForward
()
{
String
key
=
"forward_list"
;
Long
expire
=
EXPIRE_MAP
.
get
(
key
);
if
(
expire
==
null
||
expire
<
System
.
currentTimeMillis
())
{
JsonMessageUtil
.
JsonMessage
<
Forward
>
response
=
null
;
try
{
response
=
opsFeignClient
.
getForwards
();
}
catch
(
Exception
e
)
{
log
.
info
(
"获取 forward_list 失败:"
,
e
);
}
if
(
response
!=
null
&&
response
.
getData
()
!=
null
)
{
List
<
Forward
>
data
=
(
List
<
Forward
>)
response
.
getData
();
CACHE_MAP
.
put
(
key
,
data
);
}
else
{
CACHE_MAP
.
put
(
key
,
Collections
.
emptyMap
());
}
EXPIRE_MAP
.
put
(
key
,
System
.
currentTimeMillis
());
}
return
(
List
<
Forward
>)
CACHE_MAP
.
get
(
key
);
}
}
fanxing-forward/src/main/resources/application.yml
View file @
3370b9b
...
@@ -34,6 +34,9 @@ spring:
...
@@ -34,6 +34,9 @@ spring:
date-format
:
yyyy-MM-dd HH:mm:ss
date-format
:
yyyy-MM-dd HH:mm:ss
time-zone
:
GMT+8
time-zone
:
GMT+8
default-property-inclusion
:
non_null
default-property-inclusion
:
non_null
batch
:
job
:
enabled
:
false
logging
:
logging
:
config
:
classpath:logback-${spring.profiles.active}.xml
config
:
classpath:logback-${spring.profiles.active}.xml
mybatis
:
mybatis
:
...
@@ -46,4 +49,5 @@ pagehelper:
...
@@ -46,4 +49,5 @@ pagehelper:
params
:
count=countByExample
params
:
count=countByExample
vion
:
vion
:
redisson
:
redisson
:
path
:
F:\myIDEAworkspace\jt\fanxing3\fanxing-commons\src\main\resources\redisson.yml
\ No newline at end of file
\ No newline at end of file
path
:
F:\myIDEAworkspace\jt\fanxing3\fanxing-commons\src\main\resources\redisson.yml
debug
:
true
\ No newline at end of file
\ No newline at end of file
fanxing-forward/src/test/java/com/viontech/fanxing/forward/Test0.java
0 → 100644
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
forward
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.springframework.boot.test.context.SpringBootTest
;
import
org.springframework.test.context.junit4.SpringRunner
;
/**
* .
*
* @author 谢明辉
* @date 2021/7/16
*/
@SpringBootTest
@RunWith
(
SpringRunner
.
class
)
public
class
Test0
{
@Test
public
void
test
()
{
}
}
fanxing-ops/src/main/java/com/viontech/fanxing/ops/OpsApp.java
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
ops
;
package
com
.
viontech
.
fanxing
.
ops
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
...
@@ -17,6 +18,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
...
@@ -17,6 +18,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
@EnableScheduling
@EnableScheduling
@SpringBootApplication
(
scanBasePackages
=
"com.viontech.fanxing"
)
@SpringBootApplication
(
scanBasePackages
=
"com.viontech.fanxing"
)
@EnableFeignClients
@EnableFeignClients
@MapperScan
(
basePackages
=
"com.viontech.fanxing.ops.mapper"
)
@Slf4j
@Slf4j
public
class
OpsApp
{
public
class
OpsApp
{
...
...
fanxing-
forward/src/main/java/com/viontech/fanxing/forward
/controller/base/ForwardBaseController.java
→
fanxing-
ops/src/main/java/com/viontech/fanxing/ops
/controller/base/ForwardBaseController.java
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
forward
.
controller
.
base
;
package
com
.
viontech
.
fanxing
.
ops
.
controller
.
base
;
import
com.viontech.fanxing.commons.base.BaseController
;
import
com.viontech.fanxing.commons.base.BaseController
;
import
com.viontech.fanxing.commons.base.BaseExample
;
import
com.viontech.fanxing.commons.base.BaseExample
;
import
com.viontech.fanxing.commons.base.BaseMapper
;
import
com.viontech.fanxing.commons.base.BaseService
;
import
com.viontech.fanxing.commons.base.BaseService
;
import
com.viontech.fanxing.forward.mapper.ForwardMapper
;
import
com.viontech.fanxing.commons.model.Forward
;
import
com.viontech.fanxing.commons.model.Forward
;
import
com.viontech.fanxing.commons.model.ForwardExample
;
import
com.viontech.fanxing.commons.model.ForwardExample
;
import
com.viontech.fanxing.
forward
.service.adapter.ForwardService
;
import
com.viontech.fanxing.
ops
.service.adapter.ForwardService
;
import
com.viontech.fanxing.commons.vo.ForwardVo
;
import
com.viontech.fanxing.commons.vo.ForwardVo
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
...
...
fanxing-
forward/src/main/java/com/viontech/fanxing/forward
/controller/base/ForwardConfigBaseController.java
→
fanxing-
ops/src/main/java/com/viontech/fanxing/ops
/controller/base/ForwardConfigBaseController.java
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
forward
.
controller
.
base
;
package
com
.
viontech
.
fanxing
.
ops
.
controller
.
base
;
import
com.viontech.fanxing.commons.base.BaseController
;
import
com.viontech.fanxing.commons.base.BaseController
;
import
com.viontech.fanxing.commons.base.BaseExample
;
import
com.viontech.fanxing.commons.base.BaseExample
;
import
com.viontech.fanxing.commons.base.BaseMapper
;
import
com.viontech.fanxing.commons.base.BaseService
;
import
com.viontech.fanxing.commons.base.BaseService
;
import
com.viontech.fanxing.forward.mapper.ForwardConfigMapper
;
import
com.viontech.fanxing.commons.model.ForwardConfig
;
import
com.viontech.fanxing.commons.model.ForwardConfig
;
import
com.viontech.fanxing.commons.model.ForwardConfigExample
;
import
com.viontech.fanxing.commons.model.ForwardConfigExample
;
import
com.viontech.fanxing.
forward
.service.adapter.ForwardConfigService
;
import
com.viontech.fanxing.
ops
.service.adapter.ForwardConfigService
;
import
com.viontech.fanxing.commons.vo.ForwardConfigVo
;
import
com.viontech.fanxing.commons.vo.ForwardConfigVo
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
...
...
fanxing-
forward/src/main/java/com/viontech/fanxing/forward
/controller/web/ForwardConfigController.java
→
fanxing-
ops/src/main/java/com/viontech/fanxing/ops
/controller/web/ForwardConfigController.java
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
forward
.
controller
.
web
;
package
com
.
viontech
.
fanxing
.
ops
.
controller
.
web
;
import
com.viontech.fanxing.commons.base.BaseExample
;
import
com.viontech.fanxing.commons.base.BaseExample
;
import
com.viontech.fanxing.commons.base.BaseMapper
;
import
com.viontech.fanxing.commons.vo.ForwardConfigVo
;
import
com.viontech.fanxing.commons.vo.ForwardConfigVo
;
import
com.viontech.fanxing.forward.controller.base.ForwardConfigBaseController
;
import
com.viontech.fanxing.ops.controller.base.ForwardConfigBaseController
;
import
com.viontech.fanxing.commons.model.ForwardConfig
;
import
com.viontech.fanxing.commons.model.ForwardConfigExample
;
import
com.viontech.fanxing.commons.model.ForwardConfigExample
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
fanxing-
forward/src/main/java/com/viontech/fanxing/forward
/controller/web/ForwardController.java
→
fanxing-
ops/src/main/java/com/viontech/fanxing/ops
/controller/web/ForwardController.java
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
forward
.
controller
.
web
;
package
com
.
viontech
.
fanxing
.
ops
.
controller
.
web
;
import
com.viontech.fanxing.commons.base.BaseExample
;
import
com.viontech.fanxing.commons.base.BaseExample
;
import
com.viontech.fanxing.commons.base.BaseMapper
;
import
com.viontech.fanxing.commons.vo.ForwardVo
;
import
com.viontech.fanxing.commons.vo.ForwardVo
;
import
com.viontech.fanxing.forward.controller.base.ForwardBaseController
;
import
com.viontech.fanxing.ops.controller.base.ForwardBaseController
;
import
com.viontech.fanxing.commons.model.Forward
;
import
com.viontech.fanxing.commons.model.ForwardExample
;
import
com.viontech.fanxing.commons.model.ForwardExample
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
fanxing-
forward/src/main/java/com/viontech/fanxing/forward
/mapper/ForwardConfigMapper.java
→
fanxing-
ops/src/main/java/com/viontech/fanxing/ops
/mapper/ForwardConfigMapper.java
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
forward
.
mapper
;
package
com
.
viontech
.
fanxing
.
ops
.
mapper
;
import
com.viontech.fanxing.commons.base.BaseMapper
;
import
com.viontech.fanxing.commons.base.BaseMapper
;
import
com.viontech.fanxing.commons.model.ForwardConfig
;
import
com.viontech.fanxing.commons.model.ForwardConfig
;
...
...
fanxing-
forward/src/main/java/com/viontech/fanxing/forward
/mapper/ForwardMapper.java
→
fanxing-
ops/src/main/java/com/viontech/fanxing/ops
/mapper/ForwardMapper.java
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
forward
.
mapper
;
package
com
.
viontech
.
fanxing
.
ops
.
mapper
;
import
com.viontech.fanxing.commons.base.BaseMapper
;
import
com.viontech.fanxing.commons.base.BaseMapper
;
import
com.viontech.fanxing.commons.model.Forward
;
import
com.viontech.fanxing.commons.model.Forward
;
...
...
fanxing-
forward/src/main/java/com/viontech/fanxing/forward
/mapping/ForwardConfigMapper.xml
→
fanxing-
ops/src/main/java/com/viontech/fanxing/ops
/mapping/ForwardConfigMapper.xml
View file @
3370b9b
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.viontech.fanxing.
forward
.mapper.ForwardConfigMapper"
>
<mapper
namespace=
"com.viontech.fanxing.
ops
.mapper.ForwardConfigMapper"
>
<resultMap
id=
"BaseResultMapRoot"
type=
"com.viontech.fanxing.commons.model.ForwardConfig"
>
<resultMap
id=
"BaseResultMapRoot"
type=
"com.viontech.fanxing.commons.model.ForwardConfig"
>
<id
column=
"forwardConfig_id"
property=
"id"
/>
<id
column=
"forwardConfig_id"
property=
"id"
/>
<result
column=
"forwardConfig_unid"
property=
"unid"
/>
<result
column=
"forwardConfig_unid"
property=
"unid"
/>
...
@@ -74,7 +74,7 @@
...
@@ -74,7 +74,7 @@
</sql>
</sql>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
<if
test=
"!(_parameter.getClass().getSimpleName() == 'ForwardConfigExample')"
>
<if
test=
"!(_parameter.getClass().getSimpleName() == 'ForwardConfigExample')"
>
<include
refid=
"com.viontech.fanxing.
forward
.mapper.ForwardConfigMapper.Base_Column_List_Root"
/>
<include
refid=
"com.viontech.fanxing.
ops
.mapper.ForwardConfigMapper.Base_Column_List_Root"
/>
</if>
</if>
<if
test=
"_parameter.getClass().getSimpleName() == 'ForwardConfigExample'"
>
<if
test=
"_parameter.getClass().getSimpleName() == 'ForwardConfigExample'"
>
<foreach
collection=
"columnContainerSet"
item=
"columns"
separator=
","
>
<foreach
collection=
"columnContainerSet"
item=
"columns"
separator=
","
>
...
@@ -84,7 +84,7 @@
...
@@ -84,7 +84,7 @@
${columns.columnContainerStr}
${columns.columnContainerStr}
</if>
</if>
<if
test=
"!columns.valid"
>
<if
test=
"!columns.valid"
>
<include
refid=
"com.viontech.fanxing.
forward
.mapper.ForwardConfigMapper.Base_Column_List_Root"
/>
<include
refid=
"com.viontech.fanxing.
ops
.mapper.ForwardConfigMapper.Base_Column_List_Root"
/>
</if>
</if>
</when>
</when>
</choose>
</choose>
...
...
fanxing-
forward/src/main/java/com/viontech/fanxing/forward
/mapping/ForwardMapper.xml
→
fanxing-
ops/src/main/java/com/viontech/fanxing/ops
/mapping/ForwardMapper.xml
View file @
3370b9b
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.viontech.fanxing.
forward
.mapper.ForwardMapper"
>
<mapper
namespace=
"com.viontech.fanxing.
ops
.mapper.ForwardMapper"
>
<resultMap
id=
"BaseResultMapRoot"
type=
"com.viontech.fanxing.commons.model.Forward"
>
<resultMap
id=
"BaseResultMapRoot"
type=
"com.viontech.fanxing.commons.model.Forward"
>
<id
column=
"forward_id"
property=
"id"
/>
<id
column=
"forward_id"
property=
"id"
/>
<result
column=
"forward_unid"
property=
"unid"
/>
<result
column=
"forward_unid"
property=
"unid"
/>
...
@@ -79,7 +79,7 @@
...
@@ -79,7 +79,7 @@
</sql>
</sql>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
<if
test=
"!(_parameter.getClass().getSimpleName() == 'ForwardExample')"
>
<if
test=
"!(_parameter.getClass().getSimpleName() == 'ForwardExample')"
>
<include
refid=
"com.viontech.fanxing.
forward
.mapper.ForwardMapper.Base_Column_List_Root"
/>
<include
refid=
"com.viontech.fanxing.
ops
.mapper.ForwardMapper.Base_Column_List_Root"
/>
</if>
</if>
<if
test=
"_parameter.getClass().getSimpleName() == 'ForwardExample'"
>
<if
test=
"_parameter.getClass().getSimpleName() == 'ForwardExample'"
>
<foreach
collection=
"columnContainerSet"
item=
"columns"
separator=
","
>
<foreach
collection=
"columnContainerSet"
item=
"columns"
separator=
","
>
...
@@ -89,7 +89,7 @@
...
@@ -89,7 +89,7 @@
${columns.columnContainerStr}
${columns.columnContainerStr}
</if>
</if>
<if
test=
"!columns.valid"
>
<if
test=
"!columns.valid"
>
<include
refid=
"com.viontech.fanxing.
forward
.mapper.ForwardMapper.Base_Column_List_Root"
/>
<include
refid=
"com.viontech.fanxing.
ops
.mapper.ForwardMapper.Base_Column_List_Root"
/>
</if>
</if>
</when>
</when>
</choose>
</choose>
...
...
fanxing-
forward/src/main/java/com/viontech/fanxing/forward
/service/adapter/ForwardConfigService.java
→
fanxing-
ops/src/main/java/com/viontech/fanxing/ops
/service/adapter/ForwardConfigService.java
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
forward
.
service
.
adapter
;
package
com
.
viontech
.
fanxing
.
ops
.
service
.
adapter
;
import
com.viontech.fanxing.commons.base.BaseService
;
import
com.viontech.fanxing.commons.base.BaseService
;
import
com.viontech.fanxing.commons.model.ForwardConfig
;
import
com.viontech.fanxing.commons.model.ForwardConfig
;
...
...
fanxing-
forward/src/main/java/com/viontech/fanxing/forward
/service/adapter/ForwardService.java
→
fanxing-
ops/src/main/java/com/viontech/fanxing/ops
/service/adapter/ForwardService.java
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
forward
.
service
.
adapter
;
package
com
.
viontech
.
fanxing
.
ops
.
service
.
adapter
;
import
com.viontech.fanxing.commons.base.BaseService
;
import
com.viontech.fanxing.commons.base.BaseService
;
import
com.viontech.fanxing.commons.model.Forward
;
import
com.viontech.fanxing.commons.model.Forward
;
...
...
fanxing-
forward/src/main/java/com/viontech/fanxing/forward
/service/impl/ForwardConfigServiceImpl.java
→
fanxing-
ops/src/main/java/com/viontech/fanxing/ops
/service/impl/ForwardConfigServiceImpl.java
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
forward
.
service
.
impl
;
package
com
.
viontech
.
fanxing
.
ops
.
service
.
impl
;
import
com.viontech.fanxing.commons.base.BaseMapper
;
import
com.viontech.fanxing.commons.base.BaseMapper
;
import
com.viontech.fanxing.commons.base.BaseServiceImpl
;
import
com.viontech.fanxing.commons.base.BaseServiceImpl
;
import
com.viontech.fanxing.
forward
.mapper.ForwardConfigMapper
;
import
com.viontech.fanxing.
ops
.mapper.ForwardConfigMapper
;
import
com.viontech.fanxing.commons.model.ForwardConfig
;
import
com.viontech.fanxing.commons.model.ForwardConfig
;
import
com.viontech.fanxing.
forward
.service.adapter.ForwardConfigService
;
import
com.viontech.fanxing.
ops
.service.adapter.ForwardConfigService
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
...
fanxing-
forward/src/main/java/com/viontech/fanxing/forward
/service/impl/ForwardServiceImpl.java
→
fanxing-
ops/src/main/java/com/viontech/fanxing/ops
/service/impl/ForwardServiceImpl.java
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
forward
.
service
.
impl
;
package
com
.
viontech
.
fanxing
.
ops
.
service
.
impl
;
import
com.viontech.fanxing.commons.base.BaseMapper
;
import
com.viontech.fanxing.commons.base.BaseMapper
;
import
com.viontech.fanxing.commons.base.BaseServiceImpl
;
import
com.viontech.fanxing.commons.base.BaseServiceImpl
;
import
com.viontech.fanxing.
forward
.mapper.ForwardMapper
;
import
com.viontech.fanxing.
ops
.mapper.ForwardMapper
;
import
com.viontech.fanxing.commons.model.Forward
;
import
com.viontech.fanxing.commons.model.Forward
;
import
com.viontech.fanxing.
forward
.service.adapter.ForwardService
;
import
com.viontech.fanxing.
ops
.service.adapter.ForwardService
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
...
fanxing-query/src/main/java/com/viontech/fanxing/query/controller/base/FlowDataBaseController.java
View file @
3370b9b
...
@@ -4,11 +4,11 @@ import com.viontech.fanxing.commons.base.BaseController;
...
@@ -4,11 +4,11 @@ import com.viontech.fanxing.commons.base.BaseController;
import
com.viontech.fanxing.commons.base.BaseExample
;
import
com.viontech.fanxing.commons.base.BaseExample
;
import
com.viontech.fanxing.commons.base.BaseMapper
;
import
com.viontech.fanxing.commons.base.BaseMapper
;
import
com.viontech.fanxing.commons.base.BaseService
;
import
com.viontech.fanxing.commons.base.BaseService
;
import
com.viontech.fanxing.query.mapper.FlowDataMapper
;
import
com.viontech.fanxing.commons.model.FlowData
;
import
com.viontech.fanxing.commons.model.FlowData
;
import
com.viontech.fanxing.commons.model.FlowDataExample
;
import
com.viontech.fanxing.commons.model.FlowDataExample
;
import
com.viontech.fanxing.query.service.adapter.FlowDataService
;
import
com.viontech.fanxing.commons.vo.FlowDataVo
;
import
com.viontech.fanxing.commons.vo.FlowDataVo
;
import
com.viontech.fanxing.query.mapper.FlowDataMapper
;
import
com.viontech.fanxing.query.service.adapter.FlowDataService
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
public
abstract
class
FlowDataBaseController
extends
BaseController
<
FlowData
,
FlowDataVo
>
{
public
abstract
class
FlowDataBaseController
extends
BaseController
<
FlowData
,
FlowDataVo
>
{
...
@@ -46,21 +46,30 @@ public abstract class FlowDataBaseController extends BaseController<FlowData, Fl
...
@@ -46,21 +46,30 @@ public abstract class FlowDataBaseController extends BaseController<FlowData, Fl
if
(
flowDataVo
.
getUnid_like
()
!=
null
)
{
if
(
flowDataVo
.
getUnid_like
()
!=
null
)
{
criteria
.
andUnidLike
(
flowDataVo
.
getUnid_like
());
criteria
.
andUnidLike
(
flowDataVo
.
getUnid_like
());
}
}
if
(
flowDataVo
.
getEventId
()
!=
null
)
{
if
(
flowDataVo
.
get
Flow
EventId
()
!=
null
)
{
criteria
.
and
EventIdEqualTo
(
flowDataVo
.
get
EventId
());
criteria
.
and
FlowEventIdEqualTo
(
flowDataVo
.
getFlow
EventId
());
}
}
if
(
flowDataVo
.
getEventId_null
()
!=
null
)
{
if
(
flowDataVo
.
get
Flow
EventId_null
()
!=
null
)
{
if
(
flowDataVo
.
getEventId_null
().
booleanValue
())
{
if
(
flowDataVo
.
get
Flow
EventId_null
().
booleanValue
())
{
criteria
.
andEventIdIsNull
();
criteria
.
and
Flow
EventIdIsNull
();
}
else
{
}
else
{
criteria
.
andEventIdIsNotNull
();
criteria
.
and
Flow
EventIdIsNotNull
();
}
}
}
}
if
(
flowDataVo
.
getEventId_arr
()
!=
null
)
{
if
(
flowDataVo
.
get
Flow
EventId_arr
()
!=
null
)
{
criteria
.
and
EventIdIn
(
flowDataVo
.
get
EventId_arr
());
criteria
.
and
FlowEventIdIn
(
flowDataVo
.
getFlow
EventId_arr
());
}
}
if
(
flowDataVo
.
getEventId_like
()
!=
null
)
{
if
(
flowDataVo
.
getFlowEventId_gt
()
!=
null
)
{
criteria
.
andEventIdLike
(
flowDataVo
.
getEventId_like
());
criteria
.
andFlowEventIdGreaterThan
(
flowDataVo
.
getFlowEventId_gt
());
}
if
(
flowDataVo
.
getFlowEventId_lt
()
!=
null
)
{
criteria
.
andFlowEventIdLessThan
(
flowDataVo
.
getFlowEventId_lt
());
}
if
(
flowDataVo
.
getFlowEventId_gte
()
!=
null
)
{
criteria
.
andFlowEventIdGreaterThanOrEqualTo
(
flowDataVo
.
getFlowEventId_gte
());
}
if
(
flowDataVo
.
getFlowEventId_lte
()
!=
null
)
{
criteria
.
andFlowEventIdLessThanOrEqualTo
(
flowDataVo
.
getFlowEventId_lte
());
}
}
if
(
flowDataVo
.
getTaskId
()
!=
null
)
{
if
(
flowDataVo
.
getTaskId
()
!=
null
)
{
criteria
.
andTaskIdEqualTo
(
flowDataVo
.
getTaskId
());
criteria
.
andTaskIdEqualTo
(
flowDataVo
.
getTaskId
());
...
@@ -526,7 +535,6 @@ public abstract class FlowDataBaseController extends BaseController<FlowData, Fl
...
@@ -526,7 +535,6 @@ public abstract class FlowDataBaseController extends BaseController<FlowData, Fl
if
(
flowDataVo
.
getStatus_lte
()
!=
null
)
{
if
(
flowDataVo
.
getStatus_lte
()
!=
null
)
{
criteria
.
andStatusLessThanOrEqualTo
(
flowDataVo
.
getStatus_lte
());
criteria
.
andStatusLessThanOrEqualTo
(
flowDataVo
.
getStatus_lte
());
}
}
return
flowDataExample
;
return
flowDataExample
;
}
}
...
...
fanxing-query/src/main/java/com/viontech/fanxing/query/controller/base/FlowEventBaseController.java
View file @
3370b9b
...
@@ -4,11 +4,11 @@ import com.viontech.fanxing.commons.base.BaseController;
...
@@ -4,11 +4,11 @@ import com.viontech.fanxing.commons.base.BaseController;
import
com.viontech.fanxing.commons.base.BaseExample
;
import
com.viontech.fanxing.commons.base.BaseExample
;
import
com.viontech.fanxing.commons.base.BaseMapper
;
import
com.viontech.fanxing.commons.base.BaseMapper
;
import
com.viontech.fanxing.commons.base.BaseService
;
import
com.viontech.fanxing.commons.base.BaseService
;
import
com.viontech.fanxing.query.mapper.FlowEventMapper
;
import
com.viontech.fanxing.commons.model.FlowEvent
;
import
com.viontech.fanxing.commons.model.FlowEvent
;
import
com.viontech.fanxing.commons.model.FlowEventExample
;
import
com.viontech.fanxing.commons.model.FlowEventExample
;
import
com.viontech.fanxing.query.service.adapter.FlowEventService
;
import
com.viontech.fanxing.commons.vo.FlowEventVo
;
import
com.viontech.fanxing.commons.vo.FlowEventVo
;
import
com.viontech.fanxing.query.mapper.FlowEventMapper
;
import
com.viontech.fanxing.query.service.adapter.FlowEventService
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
public
abstract
class
FlowEventBaseController
extends
BaseController
<
FlowEvent
,
FlowEventVo
>
{
public
abstract
class
FlowEventBaseController
extends
BaseController
<
FlowEvent
,
FlowEventVo
>
{
...
@@ -112,6 +112,22 @@ public abstract class FlowEventBaseController extends BaseController<FlowEvent,
...
@@ -112,6 +112,22 @@ public abstract class FlowEventBaseController extends BaseController<FlowEvent,
if
(
flowEventVo
.
getEventTime_lte
()
!=
null
)
{
if
(
flowEventVo
.
getEventTime_lte
()
!=
null
)
{
criteria
.
andEventTimeLessThanOrEqualTo
(
flowEventVo
.
getEventTime_lte
());
criteria
.
andEventTimeLessThanOrEqualTo
(
flowEventVo
.
getEventTime_lte
());
}
}
if
(
flowEventVo
.
getEventId
()
!=
null
)
{
criteria
.
andEventIdEqualTo
(
flowEventVo
.
getEventId
());
}
if
(
flowEventVo
.
getEventId_null
()
!=
null
)
{
if
(
flowEventVo
.
getEventId_null
().
booleanValue
())
{
criteria
.
andEventIdIsNull
();
}
else
{
criteria
.
andEventIdIsNotNull
();
}
}
if
(
flowEventVo
.
getEventId_arr
()
!=
null
)
{
criteria
.
andEventIdIn
(
flowEventVo
.
getEventId_arr
());
}
if
(
flowEventVo
.
getEventId_like
()
!=
null
)
{
criteria
.
andEventIdLike
(
flowEventVo
.
getEventId_like
());
}
if
(
flowEventVo
.
getDeviceCode
()
!=
null
)
{
if
(
flowEventVo
.
getDeviceCode
()
!=
null
)
{
criteria
.
andDeviceCodeEqualTo
(
flowEventVo
.
getDeviceCode
());
criteria
.
andDeviceCodeEqualTo
(
flowEventVo
.
getDeviceCode
());
}
}
...
...
fanxing-query/src/main/java/com/viontech/fanxing/query/controller/base/TrafficBaseController.java
View file @
3370b9b
...
@@ -2,13 +2,12 @@ package com.viontech.fanxing.query.controller.base;
...
@@ -2,13 +2,12 @@ package com.viontech.fanxing.query.controller.base;
import
com.viontech.fanxing.commons.base.BaseController
;
import
com.viontech.fanxing.commons.base.BaseController
;
import
com.viontech.fanxing.commons.base.BaseExample
;
import
com.viontech.fanxing.commons.base.BaseExample
;
import
com.viontech.fanxing.commons.base.BaseMapper
;
import
com.viontech.fanxing.commons.base.BaseService
;
import
com.viontech.fanxing.commons.base.BaseService
;
import
com.viontech.fanxing.query.mapper.TrafficMapper
;
import
com.viontech.fanxing.commons.model.Traffic
;
import
com.viontech.fanxing.commons.model.Traffic
;
import
com.viontech.fanxing.commons.model.TrafficExample
;
import
com.viontech.fanxing.commons.model.TrafficExample
;
import
com.viontech.fanxing.query.service.adapter.TrafficService
;
import
com.viontech.fanxing.commons.vo.TrafficVo
;
import
com.viontech.fanxing.commons.vo.TrafficVo
;
import
com.viontech.fanxing.query.service.adapter.TrafficService
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
public
abstract
class
TrafficBaseController
extends
BaseController
<
Traffic
,
TrafficVo
>
{
public
abstract
class
TrafficBaseController
extends
BaseController
<
Traffic
,
TrafficVo
>
{
...
@@ -19,503 +18,530 @@ public abstract class TrafficBaseController extends BaseController<Traffic, Traf
...
@@ -19,503 +18,530 @@ public abstract class TrafficBaseController extends BaseController<Traffic, Traf
protected
BaseExample
getExample
(
TrafficVo
trafficVo
,
int
type
)
{
protected
BaseExample
getExample
(
TrafficVo
trafficVo
,
int
type
)
{
TrafficExample
trafficExample
=
new
TrafficExample
();
TrafficExample
trafficExample
=
new
TrafficExample
();
TrafficExample
.
Criteria
criteria
=
trafficExample
.
createCriteria
();
TrafficExample
.
Criteria
criteria
=
trafficExample
.
createCriteria
();
if
(
trafficVo
.
getId
()
!=
null
)
{
if
(
trafficVo
.
getId
()
!=
null
)
{
criteria
.
andIdEqualTo
(
trafficVo
.
getId
());
criteria
.
andIdEqualTo
(
trafficVo
.
getId
());
}
}
if
(
trafficVo
.
getId_arr
()
!=
null
)
{
if
(
trafficVo
.
getId_arr
()
!=
null
)
{
criteria
.
andIdIn
(
trafficVo
.
getId_arr
());
criteria
.
andIdIn
(
trafficVo
.
getId_arr
());
}
}
if
(
trafficVo
.
getId_gt
()
!=
null
)
{
if
(
trafficVo
.
getId_gt
()
!=
null
)
{
criteria
.
andIdGreaterThan
(
trafficVo
.
getId_gt
());
criteria
.
andIdGreaterThan
(
trafficVo
.
getId_gt
());
}
}
if
(
trafficVo
.
getId_lt
()
!=
null
)
{
if
(
trafficVo
.
getId_lt
()
!=
null
)
{
criteria
.
andIdLessThan
(
trafficVo
.
getId_lt
());
criteria
.
andIdLessThan
(
trafficVo
.
getId_lt
());
}
}
if
(
trafficVo
.
getId_gte
()
!=
null
)
{
if
(
trafficVo
.
getId_gte
()
!=
null
)
{
criteria
.
andIdGreaterThanOrEqualTo
(
trafficVo
.
getId_gte
());
criteria
.
andIdGreaterThanOrEqualTo
(
trafficVo
.
getId_gte
());
}
}
if
(
trafficVo
.
getId_lte
()
!=
null
)
{
if
(
trafficVo
.
getId_lte
()
!=
null
)
{
criteria
.
andIdLessThanOrEqualTo
(
trafficVo
.
getId_lte
());
criteria
.
andIdLessThanOrEqualTo
(
trafficVo
.
getId_lte
());
}
}
if
(
trafficVo
.
getUnid
()
!=
null
)
{
if
(
trafficVo
.
getUnid
()
!=
null
)
{
criteria
.
andUnidEqualTo
(
trafficVo
.
getUnid
());
criteria
.
andUnidEqualTo
(
trafficVo
.
getUnid
());
}
}
if
(
trafficVo
.
getUnid_arr
()
!=
null
)
{
if
(
trafficVo
.
getUnid_arr
()
!=
null
)
{
criteria
.
andUnidIn
(
trafficVo
.
getUnid_arr
());
criteria
.
andUnidIn
(
trafficVo
.
getUnid_arr
());
}
}
if
(
trafficVo
.
getUnid_like
()
!=
null
)
{
if
(
trafficVo
.
getUnid_like
()
!=
null
)
{
criteria
.
andUnidLike
(
trafficVo
.
getUnid_like
());
criteria
.
andUnidLike
(
trafficVo
.
getUnid_like
());
}
}
if
(
trafficVo
.
getTaskId
()
!=
null
)
{
if
(
trafficVo
.
getTaskId
()
!=
null
)
{
criteria
.
andTaskIdEqualTo
(
trafficVo
.
getTaskId
());
criteria
.
andTaskIdEqualTo
(
trafficVo
.
getTaskId
());
}
}
if
(
trafficVo
.
getTaskId_null
()
!=
null
)
{
if
(
trafficVo
.
getTaskId_null
()
!=
null
)
{
if
(
trafficVo
.
getTaskId_null
().
booleanValue
())
{
if
(
trafficVo
.
getTaskId_null
().
booleanValue
())
{
criteria
.
andTaskIdIsNull
();
criteria
.
andTaskIdIsNull
();
}
else
{
}
else
{
criteria
.
andTaskIdIsNotNull
();
criteria
.
andTaskIdIsNotNull
();
}
}
}
}
if
(
trafficVo
.
getTaskId_arr
()
!=
null
)
{
if
(
trafficVo
.
getTaskId_arr
()
!=
null
)
{
criteria
.
andTaskIdIn
(
trafficVo
.
getTaskId_arr
());
criteria
.
andTaskIdIn
(
trafficVo
.
getTaskId_arr
());
}
}
if
(
trafficVo
.
getTaskId_gt
()
!=
null
)
{
if
(
trafficVo
.
getTaskId_gt
()
!=
null
)
{
criteria
.
andTaskIdGreaterThan
(
trafficVo
.
getTaskId_gt
());
criteria
.
andTaskIdGreaterThan
(
trafficVo
.
getTaskId_gt
());
}
}
if
(
trafficVo
.
getTaskId_lt
()
!=
null
)
{
if
(
trafficVo
.
getTaskId_lt
()
!=
null
)
{
criteria
.
andTaskIdLessThan
(
trafficVo
.
getTaskId_lt
());
criteria
.
andTaskIdLessThan
(
trafficVo
.
getTaskId_lt
());
}
}
if
(
trafficVo
.
getTaskId_gte
()
!=
null
)
{
if
(
trafficVo
.
getTaskId_gte
()
!=
null
)
{
criteria
.
andTaskIdGreaterThanOrEqualTo
(
trafficVo
.
getTaskId_gte
());
criteria
.
andTaskIdGreaterThanOrEqualTo
(
trafficVo
.
getTaskId_gte
());
}
}
if
(
trafficVo
.
getTaskId_lte
()
!=
null
)
{
if
(
trafficVo
.
getTaskId_lte
()
!=
null
)
{
criteria
.
andTaskIdLessThanOrEqualTo
(
trafficVo
.
getTaskId_lte
());
criteria
.
andTaskIdLessThanOrEqualTo
(
trafficVo
.
getTaskId_lte
());
}
}
if
(
trafficVo
.
getEventCate
()
!=
null
)
{
if
(
trafficVo
.
getEventCate
()
!=
null
)
{
criteria
.
andEventCateEqualTo
(
trafficVo
.
getEventCate
());
criteria
.
andEventCateEqualTo
(
trafficVo
.
getEventCate
());
}
}
if
(
trafficVo
.
getEventCate_null
()
!=
null
)
{
if
(
trafficVo
.
getEventCate_null
()
!=
null
)
{
if
(
trafficVo
.
getEventCate_null
().
booleanValue
())
{
if
(
trafficVo
.
getEventCate_null
().
booleanValue
())
{
criteria
.
andEventCateIsNull
();
criteria
.
andEventCateIsNull
();
}
else
{
}
else
{
criteria
.
andEventCateIsNotNull
();
criteria
.
andEventCateIsNotNull
();
}
}
}
}
if
(
trafficVo
.
getEventCate_arr
()
!=
null
)
{
if
(
trafficVo
.
getEventCate_arr
()
!=
null
)
{
criteria
.
andEventCateIn
(
trafficVo
.
getEventCate_arr
());
criteria
.
andEventCateIn
(
trafficVo
.
getEventCate_arr
());
}
}
if
(
trafficVo
.
getEventCate_like
()
!=
null
)
{
if
(
trafficVo
.
getEventCate_like
()
!=
null
)
{
criteria
.
andEventCateLike
(
trafficVo
.
getEventCate_like
());
criteria
.
andEventCateLike
(
trafficVo
.
getEventCate_like
());
}
}
if
(
trafficVo
.
getEventType
()
!=
null
)
{
if
(
trafficVo
.
getEventType
()
!=
null
)
{
criteria
.
andEventTypeEqualTo
(
trafficVo
.
getEventType
());
criteria
.
andEventTypeEqualTo
(
trafficVo
.
getEventType
());
}
}
if
(
trafficVo
.
getEventType_null
()
!=
null
)
{
if
(
trafficVo
.
getEventType_null
()
!=
null
)
{
if
(
trafficVo
.
getEventType_null
().
booleanValue
())
{
if
(
trafficVo
.
getEventType_null
().
booleanValue
())
{
criteria
.
andEventTypeIsNull
();
criteria
.
andEventTypeIsNull
();
}
else
{
}
else
{
criteria
.
andEventTypeIsNotNull
();
criteria
.
andEventTypeIsNotNull
();
}
}
}
}
if
(
trafficVo
.
getEventType_arr
()
!=
null
)
{
if
(
trafficVo
.
getEventType_arr
()
!=
null
)
{
criteria
.
andEventTypeIn
(
trafficVo
.
getEventType_arr
());
criteria
.
andEventTypeIn
(
trafficVo
.
getEventType_arr
());
}
}
if
(
trafficVo
.
getEventType_like
()
!=
null
)
{
if
(
trafficVo
.
getEventType_like
()
!=
null
)
{
criteria
.
andEventTypeLike
(
trafficVo
.
getEventType_like
());
criteria
.
andEventTypeLike
(
trafficVo
.
getEventType_like
());
}
}
if
(
trafficVo
.
getEventTime
()
!=
null
)
{
if
(
trafficVo
.
getEventDt
()
!=
null
)
{
criteria
.
andEvent
TimeEqualTo
(
trafficVo
.
getEventTime
());
criteria
.
andEvent
DtEqualTo
(
trafficVo
.
getEventDt
());
}
}
if
(
trafficVo
.
getEventTime
_arr
()
!=
null
)
{
if
(
trafficVo
.
getEventDt
_arr
()
!=
null
)
{
criteria
.
andEvent
TimeIn
(
trafficVo
.
getEventTime
_arr
());
criteria
.
andEvent
DtIn
(
trafficVo
.
getEventDt
_arr
());
}
}
if
(
trafficVo
.
getEventTime
_gt
()
!=
null
)
{
if
(
trafficVo
.
getEventDt
_gt
()
!=
null
)
{
criteria
.
andEvent
TimeGreaterThan
(
trafficVo
.
getEventTime
_gt
());
criteria
.
andEvent
DtGreaterThan
(
trafficVo
.
getEventDt
_gt
());
}
}
if
(
trafficVo
.
getEventTime
_lt
()
!=
null
)
{
if
(
trafficVo
.
getEventDt
_lt
()
!=
null
)
{
criteria
.
andEvent
TimeLessThan
(
trafficVo
.
getEventTime
_lt
());
criteria
.
andEvent
DtLessThan
(
trafficVo
.
getEventDt
_lt
());
}
}
if
(
trafficVo
.
getEventTime
_gte
()
!=
null
)
{
if
(
trafficVo
.
getEventDt
_gte
()
!=
null
)
{
criteria
.
andEvent
TimeGreaterThanOrEqualTo
(
trafficVo
.
getEventTime
_gte
());
criteria
.
andEvent
DtGreaterThanOrEqualTo
(
trafficVo
.
getEventDt
_gte
());
}
}
if
(
trafficVo
.
getEventTime
_lte
()
!=
null
)
{
if
(
trafficVo
.
getEventDt
_lte
()
!=
null
)
{
criteria
.
andEvent
TimeLessThanOrEqualTo
(
trafficVo
.
getEventTime
_lte
());
criteria
.
andEvent
DtLessThanOrEqualTo
(
trafficVo
.
getEventDt
_lte
());
}
}
if
(
trafficVo
.
getChannelUnid
()
!=
null
)
{
if
(
trafficVo
.
getChannelUnid
()
!=
null
)
{
criteria
.
andChannelUnidEqualTo
(
trafficVo
.
getChannelUnid
());
criteria
.
andChannelUnidEqualTo
(
trafficVo
.
getChannelUnid
());
}
}
if
(
trafficVo
.
getChannelUnid_null
()
!=
null
)
{
if
(
trafficVo
.
getChannelUnid_null
()
!=
null
)
{
if
(
trafficVo
.
getChannelUnid_null
().
booleanValue
())
{
if
(
trafficVo
.
getChannelUnid_null
().
booleanValue
())
{
criteria
.
andChannelUnidIsNull
();
criteria
.
andChannelUnidIsNull
();
}
else
{
}
else
{
criteria
.
andChannelUnidIsNotNull
();
criteria
.
andChannelUnidIsNotNull
();
}
}
}
}
if
(
trafficVo
.
getChannelUnid_arr
()
!=
null
)
{
if
(
trafficVo
.
getChannelUnid_arr
()
!=
null
)
{
criteria
.
andChannelUnidIn
(
trafficVo
.
getChannelUnid_arr
());
criteria
.
andChannelUnidIn
(
trafficVo
.
getChannelUnid_arr
());
}
}
if
(
trafficVo
.
getChannelUnid_like
()
!=
null
)
{
if
(
trafficVo
.
getChannelUnid_like
()
!=
null
)
{
criteria
.
andChannelUnidLike
(
trafficVo
.
getChannelUnid_like
());
criteria
.
andChannelUnidLike
(
trafficVo
.
getChannelUnid_like
());
}
}
if
(
trafficVo
.
getPlateColor
()
!=
null
)
{
if
(
trafficVo
.
getPlateColor
()
!=
null
)
{
criteria
.
andPlateColorEqualTo
(
trafficVo
.
getPlateColor
());
criteria
.
andPlateColorEqualTo
(
trafficVo
.
getPlateColor
());
}
}
if
(
trafficVo
.
getPlateColor_null
()
!=
null
)
{
if
(
trafficVo
.
getPlateColor_null
()
!=
null
)
{
if
(
trafficVo
.
getPlateColor_null
().
booleanValue
())
{
if
(
trafficVo
.
getPlateColor_null
().
booleanValue
())
{
criteria
.
andPlateColorIsNull
();
criteria
.
andPlateColorIsNull
();
}
else
{
}
else
{
criteria
.
andPlateColorIsNotNull
();
criteria
.
andPlateColorIsNotNull
();
}
}
}
}
if
(
trafficVo
.
getPlateColor_arr
()
!=
null
)
{
if
(
trafficVo
.
getPlateColor_arr
()
!=
null
)
{
criteria
.
andPlateColorIn
(
trafficVo
.
getPlateColor_arr
());
criteria
.
andPlateColorIn
(
trafficVo
.
getPlateColor_arr
());
}
}
if
(
trafficVo
.
getPlateColor_like
()
!=
null
)
{
if
(
trafficVo
.
getPlateColor_like
()
!=
null
)
{
criteria
.
andPlateColorLike
(
trafficVo
.
getPlateColor_like
());
criteria
.
andPlateColorLike
(
trafficVo
.
getPlateColor_like
());
}
}
if
(
trafficVo
.
getPlateNumber
()
!=
null
)
{
if
(
trafficVo
.
getPlateNumber
()
!=
null
)
{
criteria
.
andPlateNumberEqualTo
(
trafficVo
.
getPlateNumber
());
criteria
.
andPlateNumberEqualTo
(
trafficVo
.
getPlateNumber
());
}
}
if
(
trafficVo
.
getPlateNumber_null
()
!=
null
)
{
if
(
trafficVo
.
getPlateNumber_null
()
!=
null
)
{
if
(
trafficVo
.
getPlateNumber_null
().
booleanValue
())
{
if
(
trafficVo
.
getPlateNumber_null
().
booleanValue
())
{
criteria
.
andPlateNumberIsNull
();
criteria
.
andPlateNumberIsNull
();
}
else
{
}
else
{
criteria
.
andPlateNumberIsNotNull
();
criteria
.
andPlateNumberIsNotNull
();
}
}
}
}
if
(
trafficVo
.
getPlateNumber_arr
()
!=
null
)
{
if
(
trafficVo
.
getPlateNumber_arr
()
!=
null
)
{
criteria
.
andPlateNumberIn
(
trafficVo
.
getPlateNumber_arr
());
criteria
.
andPlateNumberIn
(
trafficVo
.
getPlateNumber_arr
());
}
}
if
(
trafficVo
.
getPlateNumber_like
()
!=
null
)
{
if
(
trafficVo
.
getPlateNumber_like
()
!=
null
)
{
criteria
.
andPlateNumberLike
(
trafficVo
.
getPlateNumber_like
());
criteria
.
andPlateNumberLike
(
trafficVo
.
getPlateNumber_like
());
}
}
if
(
trafficVo
.
getLocationCode
()
!=
null
)
{
if
(
trafficVo
.
getLocationCode
()
!=
null
)
{
criteria
.
andLocationCodeEqualTo
(
trafficVo
.
getLocationCode
());
criteria
.
andLocationCodeEqualTo
(
trafficVo
.
getLocationCode
());
}
}
if
(
trafficVo
.
getLocationCode_null
()
!=
null
)
{
if
(
trafficVo
.
getLocationCode_null
()
!=
null
)
{
if
(
trafficVo
.
getLocationCode_null
().
booleanValue
())
{
if
(
trafficVo
.
getLocationCode_null
().
booleanValue
())
{
criteria
.
andLocationCodeIsNull
();
criteria
.
andLocationCodeIsNull
();
}
else
{
}
else
{
criteria
.
andLocationCodeIsNotNull
();
criteria
.
andLocationCodeIsNotNull
();
}
}
}
}
if
(
trafficVo
.
getLocationCode_arr
()
!=
null
)
{
if
(
trafficVo
.
getLocationCode_arr
()
!=
null
)
{
criteria
.
andLocationCodeIn
(
trafficVo
.
getLocationCode_arr
());
criteria
.
andLocationCodeIn
(
trafficVo
.
getLocationCode_arr
());
}
}
if
(
trafficVo
.
getLocationCode_like
()
!=
null
)
{
if
(
trafficVo
.
getLocationCode_like
()
!=
null
)
{
criteria
.
andLocationCodeLike
(
trafficVo
.
getLocationCode_like
());
criteria
.
andLocationCodeLike
(
trafficVo
.
getLocationCode_like
());
}
}
if
(
trafficVo
.
getLaneCode
()
!=
null
)
{
if
(
trafficVo
.
getLocationName
()
!=
null
)
{
criteria
.
andLocationNameEqualTo
(
trafficVo
.
getLocationName
());
}
if
(
trafficVo
.
getLocationName_null
()
!=
null
)
{
if
(
trafficVo
.
getLocationName_null
().
booleanValue
())
{
criteria
.
andLocationNameIsNull
();
}
else
{
criteria
.
andLocationNameIsNotNull
();
}
}
if
(
trafficVo
.
getLocationName_arr
()
!=
null
)
{
criteria
.
andLocationNameIn
(
trafficVo
.
getLocationName_arr
());
}
if
(
trafficVo
.
getLocationName_like
()
!=
null
)
{
criteria
.
andLocationNameLike
(
trafficVo
.
getLocationName_like
());
}
if
(
trafficVo
.
getLaneCode
()
!=
null
)
{
criteria
.
andLaneCodeEqualTo
(
trafficVo
.
getLaneCode
());
criteria
.
andLaneCodeEqualTo
(
trafficVo
.
getLaneCode
());
}
}
if
(
trafficVo
.
getLaneCode_null
()
!=
null
)
{
if
(
trafficVo
.
getLaneCode_null
()
!=
null
)
{
if
(
trafficVo
.
getLaneCode_null
().
booleanValue
())
{
if
(
trafficVo
.
getLaneCode_null
().
booleanValue
())
{
criteria
.
andLaneCodeIsNull
();
criteria
.
andLaneCodeIsNull
();
}
else
{
}
else
{
criteria
.
andLaneCodeIsNotNull
();
criteria
.
andLaneCodeIsNotNull
();
}
}
}
}
if
(
trafficVo
.
getLaneCode_arr
()
!=
null
)
{
if
(
trafficVo
.
getLaneCode_arr
()
!=
null
)
{
criteria
.
andLaneCodeIn
(
trafficVo
.
getLaneCode_arr
());
criteria
.
andLaneCodeIn
(
trafficVo
.
getLaneCode_arr
());
}
}
if
(
trafficVo
.
getLaneCode_like
()
!=
null
)
{
if
(
trafficVo
.
getLaneCode_like
()
!=
null
)
{
criteria
.
andLaneCodeLike
(
trafficVo
.
getLaneCode_like
());
criteria
.
andLaneCodeLike
(
trafficVo
.
getLaneCode_like
());
}
}
if
(
trafficVo
.
getDirectionCode
()
!=
null
)
{
if
(
trafficVo
.
getDirectionCode
()
!=
null
)
{
criteria
.
andDirectionCodeEqualTo
(
trafficVo
.
getDirectionCode
());
criteria
.
andDirectionCodeEqualTo
(
trafficVo
.
getDirectionCode
());
}
}
if
(
trafficVo
.
getDirectionCode_null
()
!=
null
)
{
if
(
trafficVo
.
getDirectionCode_null
()
!=
null
)
{
if
(
trafficVo
.
getDirectionCode_null
().
booleanValue
())
{
if
(
trafficVo
.
getDirectionCode_null
().
booleanValue
())
{
criteria
.
andDirectionCodeIsNull
();
criteria
.
andDirectionCodeIsNull
();
}
else
{
}
else
{
criteria
.
andDirectionCodeIsNotNull
();
criteria
.
andDirectionCodeIsNotNull
();
}
}
}
}
if
(
trafficVo
.
getDirectionCode_arr
()
!=
null
)
{
if
(
trafficVo
.
getDirectionCode_arr
()
!=
null
)
{
criteria
.
andDirectionCodeIn
(
trafficVo
.
getDirectionCode_arr
());
criteria
.
andDirectionCodeIn
(
trafficVo
.
getDirectionCode_arr
());
}
}
if
(
trafficVo
.
getDirectionCode_like
()
!=
null
)
{
if
(
trafficVo
.
getDirectionCode_like
()
!=
null
)
{
criteria
.
andDirectionCodeLike
(
trafficVo
.
getDirectionCode_like
());
criteria
.
andDirectionCodeLike
(
trafficVo
.
getDirectionCode_like
());
}
}
if
(
trafficVo
.
getVehicleType
()
!=
null
)
{
if
(
trafficVo
.
getVehicleType
()
!=
null
)
{
criteria
.
andVehicleTypeEqualTo
(
trafficVo
.
getVehicleType
());
criteria
.
andVehicleTypeEqualTo
(
trafficVo
.
getVehicleType
());
}
}
if
(
trafficVo
.
getVehicleType_null
()
!=
null
)
{
if
(
trafficVo
.
getVehicleType_null
()
!=
null
)
{
if
(
trafficVo
.
getVehicleType_null
().
booleanValue
())
{
if
(
trafficVo
.
getVehicleType_null
().
booleanValue
())
{
criteria
.
andVehicleTypeIsNull
();
criteria
.
andVehicleTypeIsNull
();
}
else
{
}
else
{
criteria
.
andVehicleTypeIsNotNull
();
criteria
.
andVehicleTypeIsNotNull
();
}
}
}
}
if
(
trafficVo
.
getVehicleType_arr
()
!=
null
)
{
if
(
trafficVo
.
getVehicleType_arr
()
!=
null
)
{
criteria
.
andVehicleTypeIn
(
trafficVo
.
getVehicleType_arr
());
criteria
.
andVehicleTypeIn
(
trafficVo
.
getVehicleType_arr
());
}
}
if
(
trafficVo
.
getVehicleType_like
()
!=
null
)
{
if
(
trafficVo
.
getVehicleType_like
()
!=
null
)
{
criteria
.
andVehicleTypeLike
(
trafficVo
.
getVehicleType_like
());
criteria
.
andVehicleTypeLike
(
trafficVo
.
getVehicleType_like
());
}
}
if
(
trafficVo
.
getIllegalCode
()
!=
null
)
{
if
(
trafficVo
.
getVehicleColor
()
!=
null
)
{
criteria
.
andVehicleColorEqualTo
(
trafficVo
.
getVehicleColor
());
}
if
(
trafficVo
.
getVehicleColor_null
()
!=
null
)
{
if
(
trafficVo
.
getVehicleColor_null
().
booleanValue
())
{
criteria
.
andVehicleColorIsNull
();
}
else
{
criteria
.
andVehicleColorIsNotNull
();
}
}
if
(
trafficVo
.
getVehicleColor_arr
()
!=
null
)
{
criteria
.
andVehicleColorIn
(
trafficVo
.
getVehicleColor_arr
());
}
if
(
trafficVo
.
getVehicleColor_like
()
!=
null
)
{
criteria
.
andVehicleColorLike
(
trafficVo
.
getVehicleColor_like
());
}
if
(
trafficVo
.
getVehicleLogo
()
!=
null
)
{
criteria
.
andVehicleLogoEqualTo
(
trafficVo
.
getVehicleLogo
());
}
if
(
trafficVo
.
getVehicleLogo_null
()
!=
null
)
{
if
(
trafficVo
.
getVehicleLogo_null
().
booleanValue
())
{
criteria
.
andVehicleLogoIsNull
();
}
else
{
criteria
.
andVehicleLogoIsNotNull
();
}
}
if
(
trafficVo
.
getVehicleLogo_arr
()
!=
null
)
{
criteria
.
andVehicleLogoIn
(
trafficVo
.
getVehicleLogo_arr
());
}
if
(
trafficVo
.
getVehicleLogo_like
()
!=
null
)
{
criteria
.
andVehicleLogoLike
(
trafficVo
.
getVehicleLogo_like
());
}
if
(
trafficVo
.
getIllegalCode
()
!=
null
)
{
criteria
.
andIllegalCodeEqualTo
(
trafficVo
.
getIllegalCode
());
criteria
.
andIllegalCodeEqualTo
(
trafficVo
.
getIllegalCode
());
}
}
if
(
trafficVo
.
getIllegalCode_null
()
!=
null
)
{
if
(
trafficVo
.
getIllegalCode_null
()
!=
null
)
{
if
(
trafficVo
.
getIllegalCode_null
().
booleanValue
())
{
if
(
trafficVo
.
getIllegalCode_null
().
booleanValue
())
{
criteria
.
andIllegalCodeIsNull
();
criteria
.
andIllegalCodeIsNull
();
}
else
{
}
else
{
criteria
.
andIllegalCodeIsNotNull
();
criteria
.
andIllegalCodeIsNotNull
();
}
}
}
}
if
(
trafficVo
.
getIllegalCode_arr
()
!=
null
)
{
if
(
trafficVo
.
getIllegalCode_arr
()
!=
null
)
{
criteria
.
andIllegalCodeIn
(
trafficVo
.
getIllegalCode_arr
());
criteria
.
andIllegalCodeIn
(
trafficVo
.
getIllegalCode_arr
());
}
}
if
(
trafficVo
.
getIllegalCode_like
()
!=
null
)
{
if
(
trafficVo
.
getIllegalCode_like
()
!=
null
)
{
criteria
.
andIllegalCodeLike
(
trafficVo
.
getIllegalCode_like
());
criteria
.
andIllegalCodeLike
(
trafficVo
.
getIllegalCode_like
());
}
}
if
(
trafficVo
.
getIllegalState
()
!=
null
)
{
if
(
trafficVo
.
getIllegalState
()
!=
null
)
{
criteria
.
andIllegalStateEqualTo
(
trafficVo
.
getIllegalState
());
criteria
.
andIllegalStateEqualTo
(
trafficVo
.
getIllegalState
());
}
}
if
(
trafficVo
.
getIllegalState_null
()
!=
null
)
{
if
(
trafficVo
.
getIllegalState_null
()
!=
null
)
{
if
(
trafficVo
.
getIllegalState_null
().
booleanValue
())
{
if
(
trafficVo
.
getIllegalState_null
().
booleanValue
())
{
criteria
.
andIllegalStateIsNull
();
criteria
.
andIllegalStateIsNull
();
}
else
{
}
else
{
criteria
.
andIllegalStateIsNotNull
();
criteria
.
andIllegalStateIsNotNull
();
}
}
}
}
if
(
trafficVo
.
getIllegalState_arr
()
!=
null
)
{
if
(
trafficVo
.
getIllegalState_arr
()
!=
null
)
{
criteria
.
andIllegalStateIn
(
trafficVo
.
getIllegalState_arr
());
criteria
.
andIllegalStateIn
(
trafficVo
.
getIllegalState_arr
());
}
}
if
(
trafficVo
.
getIllegalState_gt
()
!=
null
)
{
if
(
trafficVo
.
getIllegalState_gt
()
!=
null
)
{
criteria
.
andIllegalStateGreaterThan
(
trafficVo
.
getIllegalState_gt
());
criteria
.
andIllegalStateGreaterThan
(
trafficVo
.
getIllegalState_gt
());
}
}
if
(
trafficVo
.
getIllegalState_lt
()
!=
null
)
{
if
(
trafficVo
.
getIllegalState_lt
()
!=
null
)
{
criteria
.
andIllegalStateLessThan
(
trafficVo
.
getIllegalState_lt
());
criteria
.
andIllegalStateLessThan
(
trafficVo
.
getIllegalState_lt
());
}
}
if
(
trafficVo
.
getIllegalState_gte
()
!=
null
)
{
if
(
trafficVo
.
getIllegalState_gte
()
!=
null
)
{
criteria
.
andIllegalStateGreaterThanOrEqualTo
(
trafficVo
.
getIllegalState_gte
());
criteria
.
andIllegalStateGreaterThanOrEqualTo
(
trafficVo
.
getIllegalState_gte
());
}
}
if
(
trafficVo
.
getIllegalState_lte
()
!=
null
)
{
if
(
trafficVo
.
getIllegalState_lte
()
!=
null
)
{
criteria
.
andIllegalStateLessThanOrEqualTo
(
trafficVo
.
getIllegalState_lte
());
criteria
.
andIllegalStateLessThanOrEqualTo
(
trafficVo
.
getIllegalState_lte
());
}
}
if
(
trafficVo
.
getVehicleColor
()
!=
null
)
{
if
(
trafficVo
.
getFeatureAnnualInspectionMark
()
!=
null
)
{
criteria
.
and
VehicleColorEqualTo
(
trafficVo
.
getVehicleColor
());
criteria
.
and
FeatureAnnualInspectionMarkEqualTo
(
trafficVo
.
getFeatureAnnualInspectionMark
());
}
}
if
(
trafficVo
.
getVehicleColor
_null
()
!=
null
)
{
if
(
trafficVo
.
getFeatureAnnualInspectionMark
_null
()
!=
null
)
{
if
(
trafficVo
.
getVehicleColor
_null
().
booleanValue
())
{
if
(
trafficVo
.
getFeatureAnnualInspectionMark
_null
().
booleanValue
())
{
criteria
.
and
VehicleColor
IsNull
();
criteria
.
and
FeatureAnnualInspectionMark
IsNull
();
}
else
{
}
else
{
criteria
.
and
VehicleColor
IsNotNull
();
criteria
.
and
FeatureAnnualInspectionMark
IsNotNull
();
}
}
}
}
if
(
trafficVo
.
getVehicleColor_arr
()
!=
null
)
{
if
(
trafficVo
.
getFeatureAnnualInspectionMark_arr
()
!=
null
)
{
criteria
.
andVehicleColorIn
(
trafficVo
.
getVehicleColor_arr
());
criteria
.
andFeatureAnnualInspectionMarkIn
(
trafficVo
.
getFeatureAnnualInspectionMark_arr
());
}
if
(
trafficVo
.
getVehicleColor_like
()
!=
null
)
{
criteria
.
andVehicleColorLike
(
trafficVo
.
getVehicleColor_like
());
}
}
if
(
trafficVo
.
getVehicleLogo
()
!=
null
)
{
if
(
trafficVo
.
getFeatureAnnualInspectionMark_gt
()
!=
null
)
{
criteria
.
and
VehicleLogoEqualTo
(
trafficVo
.
getVehicleLogo
());
criteria
.
and
FeatureAnnualInspectionMarkGreaterThan
(
trafficVo
.
getFeatureAnnualInspectionMark_gt
());
}
}
if
(
trafficVo
.
getVehicleLogo_null
()
!=
null
)
{
if
(
trafficVo
.
getFeatureAnnualInspectionMark_lt
()
!=
null
)
{
if
(
trafficVo
.
getVehicleLogo_null
().
booleanValue
())
{
criteria
.
andFeatureAnnualInspectionMarkLessThan
(
trafficVo
.
getFeatureAnnualInspectionMark_lt
());
criteria
.
andVehicleLogoIsNull
();
}
else
{
criteria
.
andVehicleLogoIsNotNull
();
}
}
}
if
(
trafficVo
.
getVehicleLogo_arr
()
!=
null
)
{
if
(
trafficVo
.
getFeatureAnnualInspectionMark_gte
()
!=
null
)
{
criteria
.
and
VehicleLogoIn
(
trafficVo
.
getVehicleLogo_arr
());
criteria
.
and
FeatureAnnualInspectionMarkGreaterThanOrEqualTo
(
trafficVo
.
getFeatureAnnualInspectionMark_gte
());
}
}
if
(
trafficVo
.
getVehicleLogo_lik
e
()
!=
null
)
{
if
(
trafficVo
.
getFeatureAnnualInspectionMark_lt
e
()
!=
null
)
{
criteria
.
and
VehicleLogoLike
(
trafficVo
.
getVehicleLogo_lik
e
());
criteria
.
and
FeatureAnnualInspectionMarkLessThanOrEqualTo
(
trafficVo
.
getFeatureAnnualInspectionMark_lt
e
());
}
}
if
(
trafficVo
.
getAnnualInspectionMark
()
!=
null
)
{
if
(
trafficVo
.
getFeaturePendant
()
!=
null
)
{
criteria
.
and
AnnualInspectionMarkEqualTo
(
trafficVo
.
getAnnualInspectionMark
());
criteria
.
and
FeaturePendantEqualTo
(
trafficVo
.
getFeaturePendant
());
}
}
if
(
trafficVo
.
getAnnualInspectionMark
_null
()
!=
null
)
{
if
(
trafficVo
.
getFeaturePendant
_null
()
!=
null
)
{
if
(
trafficVo
.
getAnnualInspectionMark
_null
().
booleanValue
())
{
if
(
trafficVo
.
getFeaturePendant
_null
().
booleanValue
())
{
criteria
.
and
AnnualInspectionMark
IsNull
();
criteria
.
and
FeaturePendant
IsNull
();
}
else
{
}
else
{
criteria
.
and
AnnualInspectionMark
IsNotNull
();
criteria
.
and
FeaturePendant
IsNotNull
();
}
}
}
}
if
(
trafficVo
.
getAnnualInspectionMark_arr
()
!=
null
)
{
if
(
trafficVo
.
getFeaturePendant_arr
()
!=
null
)
{
criteria
.
andAnnualInspectionMarkIn
(
trafficVo
.
getAnnualInspectionMark_arr
());
criteria
.
andFeaturePendantIn
(
trafficVo
.
getFeaturePendant_arr
());
}
if
(
trafficVo
.
getAnnualInspectionMark_like
()
!=
null
)
{
criteria
.
andAnnualInspectionMarkLike
(
trafficVo
.
getAnnualInspectionMark_like
());
}
}
if
(
trafficVo
.
getPendan
t
()
!=
null
)
{
if
(
trafficVo
.
getFeaturePendant_g
t
()
!=
null
)
{
criteria
.
and
PendantEqualTo
(
trafficVo
.
getPendan
t
());
criteria
.
and
FeaturePendantGreaterThan
(
trafficVo
.
getFeaturePendant_g
t
());
}
}
if
(
trafficVo
.
getPendant_null
()
!=
null
)
{
if
(
trafficVo
.
getFeaturePendant_lt
()
!=
null
)
{
if
(
trafficVo
.
getPendant_null
().
booleanValue
())
{
criteria
.
andFeaturePendantLessThan
(
trafficVo
.
getFeaturePendant_lt
());
criteria
.
andPendantIsNull
();
}
else
{
criteria
.
andPendantIsNotNull
();
}
}
}
if
(
trafficVo
.
getPendant_arr
()
!=
null
)
{
if
(
trafficVo
.
getFeaturePendant_gte
()
!=
null
)
{
criteria
.
and
PendantIn
(
trafficVo
.
getPendant_arr
());
criteria
.
and
FeaturePendantGreaterThanOrEqualTo
(
trafficVo
.
getFeaturePendant_gte
());
}
}
if
(
trafficVo
.
getPendant_lik
e
()
!=
null
)
{
if
(
trafficVo
.
getFeaturePendant_lt
e
()
!=
null
)
{
criteria
.
and
PendantLike
(
trafficVo
.
getPendant_lik
e
());
criteria
.
and
FeaturePendantLessThanOrEqualTo
(
trafficVo
.
getFeaturePendant_lt
e
());
}
}
if
(
trafficVo
.
get
Decoration
()
!=
null
)
{
if
(
trafficVo
.
getFeature
Decoration
()
!=
null
)
{
criteria
.
and
DecorationEqualTo
(
trafficVo
.
get
Decoration
());
criteria
.
and
FeatureDecorationEqualTo
(
trafficVo
.
getFeature
Decoration
());
}
}
if
(
trafficVo
.
get
Decoration_null
()
!=
null
)
{
if
(
trafficVo
.
getFeature
Decoration_null
()
!=
null
)
{
if
(
trafficVo
.
get
Decoration_null
().
booleanValue
())
{
if
(
trafficVo
.
getFeature
Decoration_null
().
booleanValue
())
{
criteria
.
andDecorationIsNull
();
criteria
.
and
Feature
DecorationIsNull
();
}
else
{
}
else
{
criteria
.
andDecorationIsNotNull
();
criteria
.
and
Feature
DecorationIsNotNull
();
}
}
}
}
if
(
trafficVo
.
get
Decoration_arr
()
!=
null
)
{
if
(
trafficVo
.
getFeature
Decoration_arr
()
!=
null
)
{
criteria
.
and
DecorationIn
(
trafficVo
.
get
Decoration_arr
());
criteria
.
and
FeatureDecorationIn
(
trafficVo
.
getFeature
Decoration_arr
());
}
}
if
(
trafficVo
.
getDecoration_like
()
!=
null
)
{
if
(
trafficVo
.
getFeatureDecoration_gt
()
!=
null
)
{
criteria
.
and
DecorationLike
(
trafficVo
.
getDecoration_like
());
criteria
.
and
FeatureDecorationGreaterThan
(
trafficVo
.
getFeatureDecoration_gt
());
}
}
if
(
trafficVo
.
getSunShield
()
!=
null
)
{
if
(
trafficVo
.
getFeatureDecoration_lt
()
!=
null
)
{
criteria
.
and
SunShieldEqualTo
(
trafficVo
.
getSunShield
());
criteria
.
and
FeatureDecorationLessThan
(
trafficVo
.
getFeatureDecoration_lt
());
}
}
if
(
trafficVo
.
getSunShield_null
()
!=
null
)
{
if
(
trafficVo
.
getFeatureDecoration_gte
()
!=
null
)
{
if
(
trafficVo
.
getSunShield_null
().
booleanValue
())
{
criteria
.
andFeatureDecorationGreaterThanOrEqualTo
(
trafficVo
.
getFeatureDecoration_gte
());
criteria
.
andSunShieldIsNull
();
}
if
(
trafficVo
.
getFeatureDecoration_lte
()
!=
null
)
{
criteria
.
andFeatureDecorationLessThanOrEqualTo
(
trafficVo
.
getFeatureDecoration_lte
());
}
if
(
trafficVo
.
getFeatureSunShield
()
!=
null
)
{
criteria
.
andFeatureSunShieldEqualTo
(
trafficVo
.
getFeatureSunShield
());
}
if
(
trafficVo
.
getFeatureSunShield_null
()
!=
null
)
{
if
(
trafficVo
.
getFeatureSunShield_null
().
booleanValue
())
{
criteria
.
andFeatureSunShieldIsNull
();
}
else
{
}
else
{
criteria
.
andSunShieldIsNotNull
();
criteria
.
and
Feature
SunShieldIsNotNull
();
}
}
}
}
if
(
trafficVo
.
getSunShield_arr
()
!=
null
)
{
if
(
trafficVo
.
getFeatureSunShield_arr
()
!=
null
)
{
criteria
.
andSunShieldIn
(
trafficVo
.
getSunShield_arr
());
criteria
.
andFeatureSunShieldIn
(
trafficVo
.
getFeatureSunShield_arr
());
}
if
(
trafficVo
.
getFeatureSunShield_gt
()
!=
null
)
{
criteria
.
andFeatureSunShieldGreaterThan
(
trafficVo
.
getFeatureSunShield_gt
());
}
}
if
(
trafficVo
.
getSunShield_like
()
!=
null
)
{
if
(
trafficVo
.
getFeatureSunShield_lt
()
!=
null
)
{
criteria
.
and
SunShieldLike
(
trafficVo
.
getSunShield_like
());
criteria
.
and
FeatureSunShieldLessThan
(
trafficVo
.
getFeatureSunShield_lt
());
}
}
if
(
trafficVo
.
getXcycleType
()
!=
null
)
{
if
(
trafficVo
.
getFeatureSunShield_gte
()
!=
null
)
{
criteria
.
andFeatureSunShieldGreaterThanOrEqualTo
(
trafficVo
.
getFeatureSunShield_gte
());
}
if
(
trafficVo
.
getFeatureSunShield_lte
()
!=
null
)
{
criteria
.
andFeatureSunShieldLessThanOrEqualTo
(
trafficVo
.
getFeatureSunShield_lte
());
}
if
(
trafficVo
.
getXcycleType
()
!=
null
)
{
criteria
.
andXcycleTypeEqualTo
(
trafficVo
.
getXcycleType
());
criteria
.
andXcycleTypeEqualTo
(
trafficVo
.
getXcycleType
());
}
}
if
(
trafficVo
.
getXcycleType_null
()
!=
null
)
{
if
(
trafficVo
.
getXcycleType_null
()
!=
null
)
{
if
(
trafficVo
.
getXcycleType_null
().
booleanValue
())
{
if
(
trafficVo
.
getXcycleType_null
().
booleanValue
())
{
criteria
.
andXcycleTypeIsNull
();
criteria
.
andXcycleTypeIsNull
();
}
else
{
}
else
{
criteria
.
andXcycleTypeIsNotNull
();
criteria
.
andXcycleTypeIsNotNull
();
}
}
}
}
if
(
trafficVo
.
getXcycleType_arr
()
!=
null
)
{
if
(
trafficVo
.
getXcycleType_arr
()
!=
null
)
{
criteria
.
andXcycleTypeIn
(
trafficVo
.
getXcycleType_arr
());
criteria
.
andXcycleTypeIn
(
trafficVo
.
getXcycleType_arr
());
}
}
if
(
trafficVo
.
getXcycleType_like
()
!=
null
)
{
if
(
trafficVo
.
getXcycleType_like
()
!=
null
)
{
criteria
.
andXcycleTypeLike
(
trafficVo
.
getXcycleType_like
());
criteria
.
andXcycleTypeLike
(
trafficVo
.
getXcycleType_like
());
}
}
if
(
trafficVo
.
getEventId
()
!=
null
)
{
if
(
trafficVo
.
getEventId
()
!=
null
)
{
criteria
.
andEventIdEqualTo
(
trafficVo
.
getEventId
());
criteria
.
andEventIdEqualTo
(
trafficVo
.
getEventId
());
}
}
if
(
trafficVo
.
getEventId_null
()
!=
null
)
{
if
(
trafficVo
.
getEventId_null
()
!=
null
)
{
if
(
trafficVo
.
getEventId_null
().
booleanValue
())
{
if
(
trafficVo
.
getEventId_null
().
booleanValue
())
{
criteria
.
andEventIdIsNull
();
criteria
.
andEventIdIsNull
();
}
else
{
}
else
{
criteria
.
andEventIdIsNotNull
();
criteria
.
andEventIdIsNotNull
();
}
}
}
}
if
(
trafficVo
.
getEventId_arr
()
!=
null
)
{
if
(
trafficVo
.
getEventId_arr
()
!=
null
)
{
criteria
.
andEventIdIn
(
trafficVo
.
getEventId_arr
());
criteria
.
andEventIdIn
(
trafficVo
.
getEventId_arr
());
}
}
if
(
trafficVo
.
getEventId_like
()
!=
null
)
{
if
(
trafficVo
.
getEventId_like
()
!=
null
)
{
criteria
.
andEventIdLike
(
trafficVo
.
getEventId_like
());
criteria
.
andEventIdLike
(
trafficVo
.
getEventId_like
());
}
}
if
(
trafficVo
.
getShootTime
()
!=
null
)
{
if
(
trafficVo
.
getSpecialType
()
!=
null
)
{
criteria
.
andShootTimeEqualTo
(
trafficVo
.
getShootTime
());
}
if
(
trafficVo
.
getShootTime_null
()
!=
null
)
{
if
(
trafficVo
.
getShootTime_null
().
booleanValue
())
{
criteria
.
andShootTimeIsNull
();
}
else
{
criteria
.
andShootTimeIsNotNull
();
}
}
if
(
trafficVo
.
getShootTime_arr
()
!=
null
)
{
criteria
.
andShootTimeIn
(
trafficVo
.
getShootTime_arr
());
}
if
(
trafficVo
.
getShootTime_gt
()
!=
null
)
{
criteria
.
andShootTimeGreaterThan
(
trafficVo
.
getShootTime_gt
());
}
if
(
trafficVo
.
getShootTime_lt
()
!=
null
)
{
criteria
.
andShootTimeLessThan
(
trafficVo
.
getShootTime_lt
());
}
if
(
trafficVo
.
getShootTime_gte
()
!=
null
)
{
criteria
.
andShootTimeGreaterThanOrEqualTo
(
trafficVo
.
getShootTime_gte
());
}
if
(
trafficVo
.
getShootTime_lte
()
!=
null
)
{
criteria
.
andShootTimeLessThanOrEqualTo
(
trafficVo
.
getShootTime_lte
());
}
if
(
trafficVo
.
getSpecialType
()
!=
null
)
{
criteria
.
andSpecialTypeEqualTo
(
trafficVo
.
getSpecialType
());
criteria
.
andSpecialTypeEqualTo
(
trafficVo
.
getSpecialType
());
}
}
if
(
trafficVo
.
getSpecialType_null
()
!=
null
)
{
if
(
trafficVo
.
getSpecialType_null
()
!=
null
)
{
if
(
trafficVo
.
getSpecialType_null
().
booleanValue
())
{
if
(
trafficVo
.
getSpecialType_null
().
booleanValue
())
{
criteria
.
andSpecialTypeIsNull
();
criteria
.
andSpecialTypeIsNull
();
}
else
{
}
else
{
criteria
.
andSpecialTypeIsNotNull
();
criteria
.
andSpecialTypeIsNotNull
();
}
}
}
}
if
(
trafficVo
.
getSpecialType_arr
()
!=
null
)
{
if
(
trafficVo
.
getSpecialType_arr
()
!=
null
)
{
criteria
.
andSpecialTypeIn
(
trafficVo
.
getSpecialType_arr
());
criteria
.
andSpecialTypeIn
(
trafficVo
.
getSpecialType_arr
());
}
}
if
(
trafficVo
.
getSpecialType_like
()
!=
null
)
{
if
(
trafficVo
.
getSpecialType_like
()
!=
null
)
{
criteria
.
andSpecialTypeLike
(
trafficVo
.
getSpecialType_like
());
criteria
.
andSpecialTypeLike
(
trafficVo
.
getSpecialType_like
());
}
}
if
(
trafficVo
.
getWithHelmet
()
!=
null
)
{
if
(
trafficVo
.
getWithHelmet
()
!=
null
)
{
criteria
.
andWithHelmetEqualTo
(
trafficVo
.
getWithHelmet
());
criteria
.
andWithHelmetEqualTo
(
trafficVo
.
getWithHelmet
());
}
}
if
(
trafficVo
.
getWithHelmet_null
()
!=
null
)
{
if
(
trafficVo
.
getWithHelmet_null
()
!=
null
)
{
if
(
trafficVo
.
getWithHelmet_null
().
booleanValue
())
{
if
(
trafficVo
.
getWithHelmet_null
().
booleanValue
())
{
criteria
.
andWithHelmetIsNull
();
criteria
.
andWithHelmetIsNull
();
}
else
{
}
else
{
criteria
.
andWithHelmetIsNotNull
();
criteria
.
andWithHelmetIsNotNull
();
}
}
}
}
if
(
trafficVo
.
getWithHelmet_arr
()
!=
null
)
{
if
(
trafficVo
.
getWithHelmet_arr
()
!=
null
)
{
criteria
.
andWithHelmetIn
(
trafficVo
.
getWithHelmet_arr
());
criteria
.
andWithHelmetIn
(
trafficVo
.
getWithHelmet_arr
());
}
}
if
(
trafficVo
.
getWithHelmet_gt
()
!=
null
)
{
if
(
trafficVo
.
getWithHelmet_gt
()
!=
null
)
{
criteria
.
andWithHelmetGreaterThan
(
trafficVo
.
getWithHelmet_gt
());
criteria
.
andWithHelmetGreaterThan
(
trafficVo
.
getWithHelmet_gt
());
}
}
if
(
trafficVo
.
getWithHelmet_lt
()
!=
null
)
{
if
(
trafficVo
.
getWithHelmet_lt
()
!=
null
)
{
criteria
.
andWithHelmetLessThan
(
trafficVo
.
getWithHelmet_lt
());
criteria
.
andWithHelmetLessThan
(
trafficVo
.
getWithHelmet_lt
());
}
}
if
(
trafficVo
.
getWithHelmet_gte
()
!=
null
)
{
if
(
trafficVo
.
getWithHelmet_gte
()
!=
null
)
{
criteria
.
andWithHelmetGreaterThanOrEqualTo
(
trafficVo
.
getWithHelmet_gte
());
criteria
.
andWithHelmetGreaterThanOrEqualTo
(
trafficVo
.
getWithHelmet_gte
());
}
}
if
(
trafficVo
.
getWithHelmet_lte
()
!=
null
)
{
if
(
trafficVo
.
getWithHelmet_lte
()
!=
null
)
{
criteria
.
andWithHelmetLessThanOrEqualTo
(
trafficVo
.
getWithHelmet_lte
());
criteria
.
andWithHelmetLessThanOrEqualTo
(
trafficVo
.
getWithHelmet_lte
());
}
}
if
(
trafficVo
.
getPicName
()
!=
null
)
{
if
(
trafficVo
.
getPicName
()
!=
null
)
{
criteria
.
andPicNameEqualTo
(
trafficVo
.
getPicName
());
criteria
.
andPicNameEqualTo
(
trafficVo
.
getPicName
());
}
}
if
(
trafficVo
.
getPicName_null
()
!=
null
)
{
if
(
trafficVo
.
getPicName_null
()
!=
null
)
{
if
(
trafficVo
.
getPicName_null
().
booleanValue
())
{
if
(
trafficVo
.
getPicName_null
().
booleanValue
())
{
criteria
.
andPicNameIsNull
();
criteria
.
andPicNameIsNull
();
}
else
{
}
else
{
criteria
.
andPicNameIsNotNull
();
criteria
.
andPicNameIsNotNull
();
}
}
}
}
if
(
trafficVo
.
getPicName_arr
()
!=
null
)
{
if
(
trafficVo
.
getPicName_arr
()
!=
null
)
{
criteria
.
andPicNameIn
(
trafficVo
.
getPicName_arr
());
criteria
.
andPicNameIn
(
trafficVo
.
getPicName_arr
());
}
}
if
(
trafficVo
.
getPicName_like
()
!=
null
)
{
if
(
trafficVo
.
getPicName_like
()
!=
null
)
{
criteria
.
andPicNameLike
(
trafficVo
.
getPicName_like
());
criteria
.
andPicNameLike
(
trafficVo
.
getPicName_like
());
}
}
if
(
trafficVo
.
getVideoName
()
!=
null
)
{
if
(
trafficVo
.
getVideoName
()
!=
null
)
{
criteria
.
andVideoNameEqualTo
(
trafficVo
.
getVideoName
());
criteria
.
andVideoNameEqualTo
(
trafficVo
.
getVideoName
());
}
}
if
(
trafficVo
.
getVideoName_null
()
!=
null
)
{
if
(
trafficVo
.
getVideoName_null
()
!=
null
)
{
if
(
trafficVo
.
getVideoName_null
().
booleanValue
())
{
if
(
trafficVo
.
getVideoName_null
().
booleanValue
())
{
criteria
.
andVideoNameIsNull
();
criteria
.
andVideoNameIsNull
();
}
else
{
}
else
{
criteria
.
andVideoNameIsNotNull
();
criteria
.
andVideoNameIsNotNull
();
}
}
}
}
if
(
trafficVo
.
getVideoName_arr
()
!=
null
)
{
if
(
trafficVo
.
getVideoName_arr
()
!=
null
)
{
criteria
.
andVideoNameIn
(
trafficVo
.
getVideoName_arr
());
criteria
.
andVideoNameIn
(
trafficVo
.
getVideoName_arr
());
}
}
if
(
trafficVo
.
getVideoName_like
()
!=
null
)
{
if
(
trafficVo
.
getVideoName_like
()
!=
null
)
{
criteria
.
andVideoNameLike
(
trafficVo
.
getVideoName_like
());
criteria
.
andVideoNameLike
(
trafficVo
.
getVideoName_like
());
}
}
if
(
trafficVo
.
getStatus
()
!=
null
)
{
if
(
trafficVo
.
getStatus
()
!=
null
)
{
criteria
.
andStatusEqualTo
(
trafficVo
.
getStatus
());
criteria
.
andStatusEqualTo
(
trafficVo
.
getStatus
());
}
}
if
(
trafficVo
.
getStatus_arr
()
!=
null
)
{
if
(
trafficVo
.
getStatus_arr
()
!=
null
)
{
criteria
.
andStatusIn
(
trafficVo
.
getStatus_arr
());
criteria
.
andStatusIn
(
trafficVo
.
getStatus_arr
());
}
}
if
(
trafficVo
.
getStatus_gt
()
!=
null
)
{
if
(
trafficVo
.
getStatus_gt
()
!=
null
)
{
criteria
.
andStatusGreaterThan
(
trafficVo
.
getStatus_gt
());
criteria
.
andStatusGreaterThan
(
trafficVo
.
getStatus_gt
());
}
}
if
(
trafficVo
.
getStatus_lt
()
!=
null
)
{
if
(
trafficVo
.
getStatus_lt
()
!=
null
)
{
criteria
.
andStatusLessThan
(
trafficVo
.
getStatus_lt
());
criteria
.
andStatusLessThan
(
trafficVo
.
getStatus_lt
());
}
}
if
(
trafficVo
.
getStatus_gte
()
!=
null
)
{
if
(
trafficVo
.
getStatus_gte
()
!=
null
)
{
criteria
.
andStatusGreaterThanOrEqualTo
(
trafficVo
.
getStatus_gte
());
criteria
.
andStatusGreaterThanOrEqualTo
(
trafficVo
.
getStatus_gte
());
}
}
if
(
trafficVo
.
getStatus_lte
()
!=
null
)
{
if
(
trafficVo
.
getStatus_lte
()
!=
null
)
{
criteria
.
andStatusLessThanOrEqualTo
(
trafficVo
.
getStatus_lte
());
criteria
.
andStatusLessThanOrEqualTo
(
trafficVo
.
getStatus_lte
());
}
}
return
trafficExample
;
return
trafficExample
;
...
...
fanxing-query/src/main/java/com/viontech/fanxing/query/controller/base/TrafficFaceBaseController.java
0 → 100644
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
query
.
controller
.
base
;
import
com.viontech.fanxing.commons.base.BaseController
;
import
com.viontech.fanxing.commons.base.BaseExample
;
import
com.viontech.fanxing.commons.base.BaseService
;
import
com.viontech.fanxing.commons.model.TrafficFace
;
import
com.viontech.fanxing.commons.model.TrafficFaceExample
;
import
com.viontech.fanxing.commons.vo.TrafficFaceVo
;
import
com.viontech.fanxing.query.service.adapter.TrafficFaceService
;
import
javax.annotation.Resource
;
public
abstract
class
TrafficFaceBaseController
extends
BaseController
<
TrafficFace
,
TrafficFaceVo
>
{
@Resource
protected
TrafficFaceService
trafficFaceService
;
@Override
protected
BaseExample
getExample
(
TrafficFaceVo
trafficFaceVo
,
int
type
)
{
TrafficFaceExample
trafficFaceExample
=
new
TrafficFaceExample
();
TrafficFaceExample
.
Criteria
criteria
=
trafficFaceExample
.
createCriteria
();
if
(
trafficFaceVo
.
getId
()
!=
null
)
{
criteria
.
andIdEqualTo
(
trafficFaceVo
.
getId
());
}
if
(
trafficFaceVo
.
getId_arr
()
!=
null
)
{
criteria
.
andIdIn
(
trafficFaceVo
.
getId_arr
());
}
if
(
trafficFaceVo
.
getId_gt
()
!=
null
)
{
criteria
.
andIdGreaterThan
(
trafficFaceVo
.
getId_gt
());
}
if
(
trafficFaceVo
.
getId_lt
()
!=
null
)
{
criteria
.
andIdLessThan
(
trafficFaceVo
.
getId_lt
());
}
if
(
trafficFaceVo
.
getId_gte
()
!=
null
)
{
criteria
.
andIdGreaterThanOrEqualTo
(
trafficFaceVo
.
getId_gte
());
}
if
(
trafficFaceVo
.
getId_lte
()
!=
null
)
{
criteria
.
andIdLessThanOrEqualTo
(
trafficFaceVo
.
getId_lte
());
}
if
(
trafficFaceVo
.
getUnid
()
!=
null
)
{
criteria
.
andUnidEqualTo
(
trafficFaceVo
.
getUnid
());
}
if
(
trafficFaceVo
.
getUnid_arr
()
!=
null
)
{
criteria
.
andUnidIn
(
trafficFaceVo
.
getUnid_arr
());
}
if
(
trafficFaceVo
.
getUnid_like
()
!=
null
)
{
criteria
.
andUnidLike
(
trafficFaceVo
.
getUnid_like
());
}
if
(
trafficFaceVo
.
getTrafficId
()
!=
null
)
{
criteria
.
andTrafficIdEqualTo
(
trafficFaceVo
.
getTrafficId
());
}
if
(
trafficFaceVo
.
getTrafficId_arr
()
!=
null
)
{
criteria
.
andTrafficIdIn
(
trafficFaceVo
.
getTrafficId_arr
());
}
if
(
trafficFaceVo
.
getTrafficId_gt
()
!=
null
)
{
criteria
.
andTrafficIdGreaterThan
(
trafficFaceVo
.
getTrafficId_gt
());
}
if
(
trafficFaceVo
.
getTrafficId_lt
()
!=
null
)
{
criteria
.
andTrafficIdLessThan
(
trafficFaceVo
.
getTrafficId_lt
());
}
if
(
trafficFaceVo
.
getTrafficId_gte
()
!=
null
)
{
criteria
.
andTrafficIdGreaterThanOrEqualTo
(
trafficFaceVo
.
getTrafficId_gte
());
}
if
(
trafficFaceVo
.
getTrafficId_lte
()
!=
null
)
{
criteria
.
andTrafficIdLessThanOrEqualTo
(
trafficFaceVo
.
getTrafficId_lte
());
}
if
(
trafficFaceVo
.
getState
()
!=
null
)
{
criteria
.
andStateEqualTo
(
trafficFaceVo
.
getState
());
}
if
(
trafficFaceVo
.
getState_arr
()
!=
null
)
{
criteria
.
andStateIn
(
trafficFaceVo
.
getState_arr
());
}
if
(
trafficFaceVo
.
getState_gt
()
!=
null
)
{
criteria
.
andStateGreaterThan
(
trafficFaceVo
.
getState_gt
());
}
if
(
trafficFaceVo
.
getState_lt
()
!=
null
)
{
criteria
.
andStateLessThan
(
trafficFaceVo
.
getState_lt
());
}
if
(
trafficFaceVo
.
getState_gte
()
!=
null
)
{
criteria
.
andStateGreaterThanOrEqualTo
(
trafficFaceVo
.
getState_gte
());
}
if
(
trafficFaceVo
.
getState_lte
()
!=
null
)
{
criteria
.
andStateLessThanOrEqualTo
(
trafficFaceVo
.
getState_lte
());
}
if
(
trafficFaceVo
.
getSex
()
!=
null
)
{
criteria
.
andSexEqualTo
(
trafficFaceVo
.
getSex
());
}
if
(
trafficFaceVo
.
getSex_arr
()
!=
null
)
{
criteria
.
andSexIn
(
trafficFaceVo
.
getSex_arr
());
}
if
(
trafficFaceVo
.
getSex_gt
()
!=
null
)
{
criteria
.
andSexGreaterThan
(
trafficFaceVo
.
getSex_gt
());
}
if
(
trafficFaceVo
.
getSex_lt
()
!=
null
)
{
criteria
.
andSexLessThan
(
trafficFaceVo
.
getSex_lt
());
}
if
(
trafficFaceVo
.
getSex_gte
()
!=
null
)
{
criteria
.
andSexGreaterThanOrEqualTo
(
trafficFaceVo
.
getSex_gte
());
}
if
(
trafficFaceVo
.
getSex_lte
()
!=
null
)
{
criteria
.
andSexLessThanOrEqualTo
(
trafficFaceVo
.
getSex_lte
());
}
if
(
trafficFaceVo
.
getUpperColor
()
!=
null
)
{
criteria
.
andUpperColorEqualTo
(
trafficFaceVo
.
getUpperColor
());
}
if
(
trafficFaceVo
.
getUpperColor_null
()
!=
null
)
{
if
(
trafficFaceVo
.
getUpperColor_null
().
booleanValue
())
{
criteria
.
andUpperColorIsNull
();
}
else
{
criteria
.
andUpperColorIsNotNull
();
}
}
if
(
trafficFaceVo
.
getUpperColor_arr
()
!=
null
)
{
criteria
.
andUpperColorIn
(
trafficFaceVo
.
getUpperColor_arr
());
}
if
(
trafficFaceVo
.
getUpperColor_like
()
!=
null
)
{
criteria
.
andUpperColorLike
(
trafficFaceVo
.
getUpperColor_like
());
}
if
(
trafficFaceVo
.
getLowerColor
()
!=
null
)
{
criteria
.
andLowerColorEqualTo
(
trafficFaceVo
.
getLowerColor
());
}
if
(
trafficFaceVo
.
getLowerColor_null
()
!=
null
)
{
if
(
trafficFaceVo
.
getLowerColor_null
().
booleanValue
())
{
criteria
.
andLowerColorIsNull
();
}
else
{
criteria
.
andLowerColorIsNotNull
();
}
}
if
(
trafficFaceVo
.
getLowerColor_arr
()
!=
null
)
{
criteria
.
andLowerColorIn
(
trafficFaceVo
.
getLowerColor_arr
());
}
if
(
trafficFaceVo
.
getLowerColor_like
()
!=
null
)
{
criteria
.
andLowerColorLike
(
trafficFaceVo
.
getLowerColor_like
());
}
return
trafficFaceExample
;
}
@Override
protected
BaseService
<
TrafficFace
>
getService
()
{
return
trafficFaceService
;
}
}
\ No newline at end of file
\ No newline at end of file
fanxing-query/src/main/java/com/viontech/fanxing/query/controller/web/TrafficFaceController.java
0 → 100644
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
query
.
controller
.
web
;
import
com.viontech.fanxing.commons.base.BaseExample
;
import
com.viontech.fanxing.commons.model.TrafficFaceExample
;
import
com.viontech.fanxing.commons.vo.TrafficFaceVo
;
import
com.viontech.fanxing.query.controller.base.TrafficFaceBaseController
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
@Controller
@RequestMapping
(
"/trafficFaces"
)
public
class
TrafficFaceController
extends
TrafficFaceBaseController
{
@Override
protected
BaseExample
getExample
(
TrafficFaceVo
trafficFaceVo
,
int
type
)
{
TrafficFaceExample
trafficFaceExample
=
(
TrafficFaceExample
)
super
.
getExample
(
trafficFaceVo
,
type
);
return
trafficFaceExample
;
}
}
\ No newline at end of file
\ No newline at end of file
fanxing-query/src/main/java/com/viontech/fanxing/query/mapper/TrafficFaceMapper.java
0 → 100644
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
query
.
mapper
;
import
com.viontech.fanxing.commons.base.BaseMapper
;
import
com.viontech.fanxing.commons.model.TrafficFace
;
import
com.viontech.fanxing.commons.model.TrafficFaceExample
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
public
interface
TrafficFaceMapper
extends
BaseMapper
{
int
countByExample
(
TrafficFaceExample
example
);
int
deleteByExample
(
TrafficFaceExample
example
);
int
deleteByPrimaryKey
(
Long
id
);
int
insert
(
TrafficFace
record
);
int
insertSelective
(
TrafficFace
record
);
List
<
TrafficFace
>
selectByExample
(
TrafficFaceExample
example
);
TrafficFace
selectByPrimaryKey
(
Long
id
);
int
updateByExampleSelective
(
@Param
(
"record"
)
TrafficFace
record
,
@Param
(
"example"
)
TrafficFaceExample
example
);
int
updateByExample
(
@Param
(
"record"
)
TrafficFace
record
,
@Param
(
"example"
)
TrafficFaceExample
example
);
int
updateByPrimaryKeySelective
(
TrafficFace
record
);
int
updateByPrimaryKey
(
TrafficFace
record
);
}
\ No newline at end of file
\ No newline at end of file
fanxing-query/src/main/java/com/viontech/fanxing/query/mapping/FlowDataMapper.xml
View file @
3370b9b
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<resultMap
id=
"BaseResultMapRoot"
type=
"com.viontech.fanxing.commons.model.FlowData"
>
<resultMap
id=
"BaseResultMapRoot"
type=
"com.viontech.fanxing.commons.model.FlowData"
>
<id
column=
"flowData_id"
property=
"id"
/>
<id
column=
"flowData_id"
property=
"id"
/>
<result
column=
"flowData_unid"
property=
"unid"
/>
<result
column=
"flowData_unid"
property=
"unid"
/>
<result
column=
"flowData_
event_id"
property=
"e
ventId"
/>
<result
column=
"flowData_
flow_event_id"
property=
"flowE
ventId"
/>
<result
column=
"flowData_task_id"
property=
"taskId"
/>
<result
column=
"flowData_task_id"
property=
"taskId"
/>
<result
column=
"flowData_detection_type"
property=
"detectionType"
/>
<result
column=
"flowData_detection_type"
property=
"detectionType"
/>
<result
column=
"flowData_road_code"
property=
"roadCode"
/>
<result
column=
"flowData_road_code"
property=
"roadCode"
/>
...
@@ -91,7 +91,7 @@
...
@@ -91,7 +91,7 @@
</where>
</where>
</sql>
</sql>
<sql
id=
"Base_Column_List_Root"
>
<sql
id=
"Base_Column_List_Root"
>
`flowData`.id as flowData_id, `flowData`.unid as flowData_unid, `flowData`.
event_id as flowData
_event_id,
`flowData`.id as flowData_id, `flowData`.unid as flowData_unid, `flowData`.
flow_event_id as flowData_flow
_event_id,
`flowData`.task_id as flowData_task_id, `flowData`.detection_type as flowData_detection_type,
`flowData`.task_id as flowData_task_id, `flowData`.detection_type as flowData_detection_type,
`flowData`.road_code as flowData_road_code, `flowData`.direction_code as flowData_direction_code,
`flowData`.road_code as flowData_road_code, `flowData`.direction_code as flowData_direction_code,
`flowData`.sample_dura as flowData_sample_dura, `flowData`.sample_num as flowData_sample_num,
`flowData`.sample_dura as flowData_sample_dura, `flowData`.sample_num as flowData_sample_num,
...
@@ -180,7 +180,7 @@
...
@@ -180,7 +180,7 @@
</if>
</if>
</delete>
</delete>
<insert
id=
"insert"
parameterType=
"com.viontech.fanxing.commons.model.FlowData"
useGeneratedKeys=
"true"
keyProperty=
"id"
keyColumn=
"id"
>
<insert
id=
"insert"
parameterType=
"com.viontech.fanxing.commons.model.FlowData"
useGeneratedKeys=
"true"
keyProperty=
"id"
keyColumn=
"id"
>
insert into `d_flow_data` (unid, event_id, task_id,
insert into `d_flow_data` (unid,
flow_
event_id, task_id,
detection_type, road_code, direction_code,
detection_type, road_code, direction_code,
sample_dura, sample_num, velocity,
sample_dura, sample_num, velocity,
velocity_unit, occupy, distance,
velocity_unit, occupy, distance,
...
@@ -189,7 +189,7 @@
...
@@ -189,7 +189,7 @@
sample_num_out, event_time, dist_time,
sample_num_out, event_time, dist_time,
time_occupy, `status`, position_content,
time_occupy, `status`, position_content,
head_content)
head_content)
values (#{unid,jdbcType=VARCHAR}, #{
eventId,jdbcType=VARCHAR
}, #{taskId,jdbcType=BIGINT},
values (#{unid,jdbcType=VARCHAR}, #{
flowEventId,jdbcType=BIGINT
}, #{taskId,jdbcType=BIGINT},
#{detectionType,jdbcType=VARCHAR}, #{roadCode,jdbcType=VARCHAR}, #{directionCode,jdbcType=VARCHAR},
#{detectionType,jdbcType=VARCHAR}, #{roadCode,jdbcType=VARCHAR}, #{directionCode,jdbcType=VARCHAR},
#{sampleDura,jdbcType=BIGINT}, #{sampleNum,jdbcType=REAL}, #{velocity,jdbcType=REAL},
#{sampleDura,jdbcType=BIGINT}, #{sampleNum,jdbcType=REAL}, #{velocity,jdbcType=REAL},
#{velocityUnit,jdbcType=VARCHAR}, #{occupy,jdbcType=REAL}, #{distance,jdbcType=REAL},
#{velocityUnit,jdbcType=VARCHAR}, #{occupy,jdbcType=REAL}, #{distance,jdbcType=REAL},
...
@@ -205,8 +205,8 @@
...
@@ -205,8 +205,8 @@
<if
test=
"unid != null"
>
<if
test=
"unid != null"
>
unid,
unid,
</if>
</if>
<if
test=
"
e
ventId != null"
>
<if
test=
"
flowE
ventId != null"
>
event_id,
flow_
event_id,
</if>
</if>
<if
test=
"taskId != null"
>
<if
test=
"taskId != null"
>
task_id,
task_id,
...
@@ -282,8 +282,8 @@
...
@@ -282,8 +282,8 @@
<if
test=
"unid != null"
>
<if
test=
"unid != null"
>
#{unid,jdbcType=VARCHAR},
#{unid,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"
e
ventId != null"
>
<if
test=
"
flowE
ventId != null"
>
#{
eventId,jdbcType=VARCHAR
},
#{
flowEventId,jdbcType=BIGINT
},
</if>
</if>
<if
test=
"taskId != null"
>
<if
test=
"taskId != null"
>
#{taskId,jdbcType=BIGINT},
#{taskId,jdbcType=BIGINT},
...
@@ -371,8 +371,8 @@
...
@@ -371,8 +371,8 @@
<if
test=
"record.unid != null"
>
<if
test=
"record.unid != null"
>
unid = #{record.unid,jdbcType=VARCHAR},
unid = #{record.unid,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"record.
e
ventId != null"
>
<if
test=
"record.
flowE
ventId != null"
>
event_id = #{record.eventId,jdbcType=VARCHAR
},
flow_event_id = #{record.flowEventId,jdbcType=BIGINT
},
</if>
</if>
<if
test=
"record.taskId != null"
>
<if
test=
"record.taskId != null"
>
task_id = #{record.taskId,jdbcType=BIGINT},
task_id = #{record.taskId,jdbcType=BIGINT},
...
@@ -452,7 +452,7 @@
...
@@ -452,7 +452,7 @@
update `d_flow_data` `flowData`
update `d_flow_data` `flowData`
set `flowData`.id = #{record.id,jdbcType=BIGINT},
set `flowData`.id = #{record.id,jdbcType=BIGINT},
`flowData`.unid = #{record.unid,jdbcType=VARCHAR},
`flowData`.unid = #{record.unid,jdbcType=VARCHAR},
`flowData`.
event_id = #{record.eventId,jdbcType=VARCHAR
},
`flowData`.
flow_event_id = #{record.flowEventId,jdbcType=BIGINT
},
`flowData`.task_id = #{record.taskId,jdbcType=BIGINT},
`flowData`.task_id = #{record.taskId,jdbcType=BIGINT},
`flowData`.detection_type = #{record.detectionType,jdbcType=VARCHAR},
`flowData`.detection_type = #{record.detectionType,jdbcType=VARCHAR},
`flowData`.road_code = #{record.roadCode,jdbcType=VARCHAR},
`flowData`.road_code = #{record.roadCode,jdbcType=VARCHAR},
...
@@ -484,7 +484,7 @@
...
@@ -484,7 +484,7 @@
update `d_flow_data` `flowData`
update `d_flow_data` `flowData`
set id = #{record.id,jdbcType=BIGINT},
set id = #{record.id,jdbcType=BIGINT},
unid = #{record.unid,jdbcType=VARCHAR},
unid = #{record.unid,jdbcType=VARCHAR},
event_id = #{record.eventId,jdbcType=VARCHAR
},
flow_event_id = #{record.flowEventId,jdbcType=BIGINT
},
task_id = #{record.taskId,jdbcType=BIGINT},
task_id = #{record.taskId,jdbcType=BIGINT},
detection_type = #{record.detectionType,jdbcType=VARCHAR},
detection_type = #{record.detectionType,jdbcType=VARCHAR},
road_code = #{record.roadCode,jdbcType=VARCHAR},
road_code = #{record.roadCode,jdbcType=VARCHAR},
...
@@ -516,8 +516,8 @@
...
@@ -516,8 +516,8 @@
<if
test=
"unid != null"
>
<if
test=
"unid != null"
>
unid = #{unid,jdbcType=VARCHAR},
unid = #{unid,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"
e
ventId != null"
>
<if
test=
"
flowE
ventId != null"
>
event_id = #{eventId,jdbcType=VARCHAR
},
flow_event_id = #{flowEventId,jdbcType=BIGINT
},
</if>
</if>
<if
test=
"taskId != null"
>
<if
test=
"taskId != null"
>
task_id = #{taskId,jdbcType=BIGINT},
task_id = #{taskId,jdbcType=BIGINT},
...
@@ -594,7 +594,7 @@
...
@@ -594,7 +594,7 @@
<update
id=
"updateByPrimaryKeyWithBLOBs"
parameterType=
"com.viontech.fanxing.commons.model.FlowData"
>
<update
id=
"updateByPrimaryKeyWithBLOBs"
parameterType=
"com.viontech.fanxing.commons.model.FlowData"
>
update `d_flow_data`
update `d_flow_data`
set unid = #{unid,jdbcType=VARCHAR},
set unid = #{unid,jdbcType=VARCHAR},
event_id = #{eventId,jdbcType=VARCHAR
},
flow_event_id = #{flowEventId,jdbcType=BIGINT
},
task_id = #{taskId,jdbcType=BIGINT},
task_id = #{taskId,jdbcType=BIGINT},
detection_type = #{detectionType,jdbcType=VARCHAR},
detection_type = #{detectionType,jdbcType=VARCHAR},
road_code = #{roadCode,jdbcType=VARCHAR},
road_code = #{roadCode,jdbcType=VARCHAR},
...
@@ -623,7 +623,7 @@
...
@@ -623,7 +623,7 @@
<update
id=
"updateByPrimaryKey"
parameterType=
"com.viontech.fanxing.commons.model.FlowData"
>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.viontech.fanxing.commons.model.FlowData"
>
update `d_flow_data`
update `d_flow_data`
set unid = #{unid,jdbcType=VARCHAR},
set unid = #{unid,jdbcType=VARCHAR},
event_id = #{eventId,jdbcType=VARCHAR
},
flow_event_id = #{flowEventId,jdbcType=BIGINT
},
task_id = #{taskId,jdbcType=BIGINT},
task_id = #{taskId,jdbcType=BIGINT},
detection_type = #{detectionType,jdbcType=VARCHAR},
detection_type = #{detectionType,jdbcType=VARCHAR},
road_code = #{roadCode,jdbcType=VARCHAR},
road_code = #{roadCode,jdbcType=VARCHAR},
...
...
fanxing-query/src/main/java/com/viontech/fanxing/query/mapping/FlowEventMapper.xml
View file @
3370b9b
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
<result
column=
"flowEvent_task_id"
property=
"taskId"
/>
<result
column=
"flowEvent_task_id"
property=
"taskId"
/>
<result
column=
"flowEvent_event_type"
property=
"eventType"
/>
<result
column=
"flowEvent_event_type"
property=
"eventType"
/>
<result
column=
"flowEvent_event_time"
property=
"eventTime"
/>
<result
column=
"flowEvent_event_time"
property=
"eventTime"
/>
<result
column=
"flowEvent_event_id"
property=
"eventId"
/>
<result
column=
"flowEvent_device_code"
property=
"deviceCode"
/>
<result
column=
"flowEvent_device_code"
property=
"deviceCode"
/>
<result
column=
"flowEvent_device_name"
property=
"deviceName"
/>
<result
column=
"flowEvent_device_name"
property=
"deviceName"
/>
<result
column=
"flowEvent_location_code"
property=
"locationCode"
/>
<result
column=
"flowEvent_location_code"
property=
"locationCode"
/>
...
@@ -79,9 +80,10 @@
...
@@ -79,9 +80,10 @@
<sql
id=
"Base_Column_List_Root"
>
<sql
id=
"Base_Column_List_Root"
>
`flowEvent`.id as flowEvent_id, `flowEvent`.unid as flowEvent_unid, `flowEvent`.task_id as flowEvent_task_id,
`flowEvent`.id as flowEvent_id, `flowEvent`.unid as flowEvent_unid, `flowEvent`.task_id as flowEvent_task_id,
`flowEvent`.event_type as flowEvent_event_type, `flowEvent`.event_time as flowEvent_event_time,
`flowEvent`.event_type as flowEvent_event_type, `flowEvent`.event_time as flowEvent_event_time,
`flowEvent`.device_code as flowEvent_device_code, `flowEvent`.device_name as flowEvent_device_name,
`flowEvent`.event_id as flowEvent_event_id, `flowEvent`.device_code as flowEvent_device_code,
`flowEvent`.location_code as flowEvent_location_code, `flowEvent`.location_name as flowEvent_location_name,
`flowEvent`.device_name as flowEvent_device_name, `flowEvent`.location_code as flowEvent_location_code,
`flowEvent`.pic_name as flowEvent_pic_name, `flowEvent`.video_name as flowEvent_video_name
`flowEvent`.location_name as flowEvent_location_name, `flowEvent`.pic_name as flowEvent_pic_name,
`flowEvent`.video_name as flowEvent_video_name
</sql>
</sql>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
<if
test=
"!(_parameter.getClass().getSimpleName() == 'FlowEventExample')"
>
<if
test=
"!(_parameter.getClass().getSimpleName() == 'FlowEventExample')"
>
...
@@ -161,13 +163,15 @@
...
@@ -161,13 +163,15 @@
</delete>
</delete>
<insert
id=
"insert"
parameterType=
"com.viontech.fanxing.commons.model.FlowEvent"
useGeneratedKeys=
"true"
keyProperty=
"id"
keyColumn=
"id"
>
<insert
id=
"insert"
parameterType=
"com.viontech.fanxing.commons.model.FlowEvent"
useGeneratedKeys=
"true"
keyProperty=
"id"
keyColumn=
"id"
>
insert into `d_flow_event` (unid, task_id, event_type,
insert into `d_flow_event` (unid, task_id, event_type,
event_time, device_code, device_name,
event_time, event_id, device_code,
location_code, location_name, pic_name,
device_name, location_code, location_name,
video_name, json_data)
pic_name, video_name, json_data
)
values (#{unid,jdbcType=VARCHAR}, #{taskId,jdbcType=BIGINT}, #{eventType,jdbcType=VARCHAR},
values (#{unid,jdbcType=VARCHAR}, #{taskId,jdbcType=BIGINT}, #{eventType,jdbcType=VARCHAR},
#{eventTime,jdbcType=TIMESTAMP}, #{deviceCode,jdbcType=VARCHAR}, #{deviceName,jdbcType=VARCHAR},
#{eventTime,jdbcType=TIMESTAMP}, #{eventId,jdbcType=VARCHAR}, #{deviceCode,jdbcType=VARCHAR},
#{locationCode,jdbcType=VARCHAR}, #{locationName,jdbcType=VARCHAR}, #{picName,jdbcType=VARCHAR},
#{deviceName,jdbcType=VARCHAR}, #{locationCode,jdbcType=VARCHAR}, #{locationName,jdbcType=VARCHAR},
#{videoName,jdbcType=VARCHAR}, #{jsonData,jdbcType=LONGVARCHAR})
#{picName,jdbcType=VARCHAR}, #{videoName,jdbcType=VARCHAR}, #{jsonData,jdbcType=LONGVARCHAR}
)
</insert>
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.viontech.fanxing.commons.model.FlowEvent"
useGeneratedKeys=
"true"
keyProperty=
"id"
keyColumn=
"id"
>
<insert
id=
"insertSelective"
parameterType=
"com.viontech.fanxing.commons.model.FlowEvent"
useGeneratedKeys=
"true"
keyProperty=
"id"
keyColumn=
"id"
>
insert into `d_flow_event`
insert into `d_flow_event`
...
@@ -184,6 +188,9 @@
...
@@ -184,6 +188,9 @@
<if
test=
"eventTime != null"
>
<if
test=
"eventTime != null"
>
event_time,
event_time,
</if>
</if>
<if
test=
"eventId != null"
>
event_id,
</if>
<if
test=
"deviceCode != null"
>
<if
test=
"deviceCode != null"
>
device_code,
device_code,
</if>
</if>
...
@@ -219,6 +226,9 @@
...
@@ -219,6 +226,9 @@
<if
test=
"eventTime != null"
>
<if
test=
"eventTime != null"
>
#{eventTime,jdbcType=TIMESTAMP},
#{eventTime,jdbcType=TIMESTAMP},
</if>
</if>
<if
test=
"eventId != null"
>
#{eventId,jdbcType=VARCHAR},
</if>
<if
test=
"deviceCode != null"
>
<if
test=
"deviceCode != null"
>
#{deviceCode,jdbcType=VARCHAR},
#{deviceCode,jdbcType=VARCHAR},
</if>
</if>
...
@@ -266,6 +276,9 @@
...
@@ -266,6 +276,9 @@
<if
test=
"record.eventTime != null"
>
<if
test=
"record.eventTime != null"
>
event_time = #{record.eventTime,jdbcType=TIMESTAMP},
event_time = #{record.eventTime,jdbcType=TIMESTAMP},
</if>
</if>
<if
test=
"record.eventId != null"
>
event_id = #{record.eventId,jdbcType=VARCHAR},
</if>
<if
test=
"record.deviceCode != null"
>
<if
test=
"record.deviceCode != null"
>
device_code = #{record.deviceCode,jdbcType=VARCHAR},
device_code = #{record.deviceCode,jdbcType=VARCHAR},
</if>
</if>
...
@@ -299,6 +312,7 @@
...
@@ -299,6 +312,7 @@
`flowEvent`.task_id = #{record.taskId,jdbcType=BIGINT},
`flowEvent`.task_id = #{record.taskId,jdbcType=BIGINT},
`flowEvent`.event_type = #{record.eventType,jdbcType=VARCHAR},
`flowEvent`.event_type = #{record.eventType,jdbcType=VARCHAR},
`flowEvent`.event_time = #{record.eventTime,jdbcType=TIMESTAMP},
`flowEvent`.event_time = #{record.eventTime,jdbcType=TIMESTAMP},
`flowEvent`.event_id = #{record.eventId,jdbcType=VARCHAR},
`flowEvent`.device_code = #{record.deviceCode,jdbcType=VARCHAR},
`flowEvent`.device_code = #{record.deviceCode,jdbcType=VARCHAR},
`flowEvent`.device_name = #{record.deviceName,jdbcType=VARCHAR},
`flowEvent`.device_name = #{record.deviceName,jdbcType=VARCHAR},
`flowEvent`.location_code = #{record.locationCode,jdbcType=VARCHAR},
`flowEvent`.location_code = #{record.locationCode,jdbcType=VARCHAR},
...
@@ -317,6 +331,7 @@
...
@@ -317,6 +331,7 @@
task_id = #{record.taskId,jdbcType=BIGINT},
task_id = #{record.taskId,jdbcType=BIGINT},
event_type = #{record.eventType,jdbcType=VARCHAR},
event_type = #{record.eventType,jdbcType=VARCHAR},
event_time = #{record.eventTime,jdbcType=TIMESTAMP},
event_time = #{record.eventTime,jdbcType=TIMESTAMP},
event_id = #{record.eventId,jdbcType=VARCHAR},
device_code = #{record.deviceCode,jdbcType=VARCHAR},
device_code = #{record.deviceCode,jdbcType=VARCHAR},
device_name = #{record.deviceName,jdbcType=VARCHAR},
device_name = #{record.deviceName,jdbcType=VARCHAR},
location_code = #{record.locationCode,jdbcType=VARCHAR},
location_code = #{record.locationCode,jdbcType=VARCHAR},
...
@@ -342,6 +357,9 @@
...
@@ -342,6 +357,9 @@
<if
test=
"eventTime != null"
>
<if
test=
"eventTime != null"
>
event_time = #{eventTime,jdbcType=TIMESTAMP},
event_time = #{eventTime,jdbcType=TIMESTAMP},
</if>
</if>
<if
test=
"eventId != null"
>
event_id = #{eventId,jdbcType=VARCHAR},
</if>
<if
test=
"deviceCode != null"
>
<if
test=
"deviceCode != null"
>
device_code = #{deviceCode,jdbcType=VARCHAR},
device_code = #{deviceCode,jdbcType=VARCHAR},
</if>
</if>
...
@@ -372,6 +390,7 @@
...
@@ -372,6 +390,7 @@
task_id = #{taskId,jdbcType=BIGINT},
task_id = #{taskId,jdbcType=BIGINT},
event_type = #{eventType,jdbcType=VARCHAR},
event_type = #{eventType,jdbcType=VARCHAR},
event_time = #{eventTime,jdbcType=TIMESTAMP},
event_time = #{eventTime,jdbcType=TIMESTAMP},
event_id = #{eventId,jdbcType=VARCHAR},
device_code = #{deviceCode,jdbcType=VARCHAR},
device_code = #{deviceCode,jdbcType=VARCHAR},
device_name = #{deviceName,jdbcType=VARCHAR},
device_name = #{deviceName,jdbcType=VARCHAR},
location_code = #{locationCode,jdbcType=VARCHAR},
location_code = #{locationCode,jdbcType=VARCHAR},
...
@@ -387,6 +406,7 @@
...
@@ -387,6 +406,7 @@
task_id = #{taskId,jdbcType=BIGINT},
task_id = #{taskId,jdbcType=BIGINT},
event_type = #{eventType,jdbcType=VARCHAR},
event_type = #{eventType,jdbcType=VARCHAR},
event_time = #{eventTime,jdbcType=TIMESTAMP},
event_time = #{eventTime,jdbcType=TIMESTAMP},
event_id = #{eventId,jdbcType=VARCHAR},
device_code = #{deviceCode,jdbcType=VARCHAR},
device_code = #{deviceCode,jdbcType=VARCHAR},
device_name = #{deviceName,jdbcType=VARCHAR},
device_name = #{deviceName,jdbcType=VARCHAR},
location_code = #{locationCode,jdbcType=VARCHAR},
location_code = #{locationCode,jdbcType=VARCHAR},
...
...
fanxing-
forward/src/main/java/com/viontech/fanxing/forward/mapping/FlowEvent
Mapper.xml
→
fanxing-
query/src/main/java/com/viontech/fanxing/query/mapping/TrafficFace
Mapper.xml
View file @
3370b9b
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.viontech.fanxing.forward.mapper.FlowEventMapper"
>
<mapper
namespace=
"com.viontech.fanxing.query.mapper.TrafficFaceMapper"
>
<resultMap
id=
"BaseResultMapRoot"
type=
"com.viontech.fanxing.commons.model.FlowEvent"
>
<resultMap
id=
"BaseResultMapRoot"
type=
"com.viontech.fanxing.commons.model.TrafficFace"
>
<id
column=
"flowEvent_id"
property=
"id"
/>
<id
column=
"trafficFace_id"
property=
"id"
/>
<result
column=
"flowEvent_unid"
property=
"unid"
/>
<result
column=
"trafficFace_unid"
property=
"unid"
/>
<result
column=
"flowEvent_task_id"
property=
"taskId"
/>
<result
column=
"trafficFace_traffic_id"
property=
"trafficId"
/>
<result
column=
"flowEvent_event_type"
property=
"eventType"
/>
<result
column=
"trafficFace_state"
property=
"state"
/>
<result
column=
"flowEvent_event_time"
property=
"eventTime"
/>
<result
column=
"trafficFace_sex"
property=
"sex"
/>
<result
column=
"flowEvent_device_code"
property=
"deviceCode"
/>
<result
column=
"trafficFace_upper_color"
property=
"upperColor"
/>
<result
column=
"flowEvent_device_name"
property=
"deviceName"
/>
<result
column=
"trafficFace_lower_color"
property=
"lowerColor"
/>
<result
column=
"flowEvent_location_code"
property=
"locationCode"
/>
<result
column=
"flowEvent_location_name"
property=
"locationName"
/>
<result
column=
"flowEvent_pic_name"
property=
"picName"
/>
<result
column=
"flowEvent_video_name"
property=
"videoName"
/>
</resultMap>
<resultMap
id=
"BaseResultMap"
type=
"com.viontech.fanxing.commons.model.FlowEvent"
extends=
"BaseResultMapRoot"
/>
<resultMap
id=
"ResultMapWithBLOBs"
type=
"com.viontech.fanxing.commons.model.FlowEvent"
extends=
"BaseResultMap"
>
<result
column=
"flowEvent_json_data"
property=
"jsonData"
jdbcType=
"LONGVARCHAR"
/>
</resultMap>
</resultMap>
<resultMap
id=
"BaseResultMap"
type=
"com.viontech.fanxing.commons.model.TrafficFace"
extends=
"BaseResultMapRoot"
/>
<sql
id=
"Example_Where_Clause"
>
<sql
id=
"Example_Where_Clause"
>
<where
>
<where
>
<foreach
collection=
"oredCriteria"
item=
"criteria"
separator=
"or"
>
<foreach
collection=
"oredCriteria"
item=
"criteria"
separator=
"or"
>
...
@@ -77,60 +70,36 @@
...
@@ -77,60 +70,36 @@
</where>
</where>
</sql>
</sql>
<sql
id=
"Base_Column_List_Root"
>
<sql
id=
"Base_Column_List_Root"
>
`flowEvent`.id as flowEvent_id, `flowEvent`.unid as flowEvent_unid, `flowEvent`.task_id as flowEvent_task_id,
`trafficFace`.id as trafficFace_id, `trafficFace`.unid as trafficFace_unid, `trafficFace`.traffic_id as trafficFace_traffic_id,
`flowEvent`.event_type as flowEvent_event_type, `flowEvent`.event_time as flowEvent_event_time,
`trafficFace`.`state` as `trafficFace_state`, `trafficFace`.sex as trafficFace_sex,
`flowEvent`.device_code as flowEvent_device_code, `flowEvent`.device_name as flowEvent_device_name,
`trafficFace`.upper_color as trafficFace_upper_color, `trafficFace`.lower_color as trafficFace_lower_color
`flowEvent`.location_code as flowEvent_location_code, `flowEvent`.location_name as flowEvent_location_name,
`flowEvent`.pic_name as flowEvent_pic_name, `flowEvent`.video_name as flowEvent_video_name
</sql>
</sql>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
<if
test=
"!(_parameter.getClass().getSimpleName() == '
FlowEvent
Example')"
>
<if
test=
"!(_parameter.getClass().getSimpleName() == '
TrafficFace
Example')"
>
<include
refid=
"com.viontech.fanxing.
forward.mapper.FlowEvent
Mapper.Base_Column_List_Root"
/>
<include
refid=
"com.viontech.fanxing.
query.mapper.TrafficFace
Mapper.Base_Column_List_Root"
/>
</if>
</if>
<if
test=
"_parameter.getClass().getSimpleName() == '
FlowEvent
Example'"
>
<if
test=
"_parameter.getClass().getSimpleName() == '
TrafficFace
Example'"
>
<foreach
collection=
"columnContainerSet"
item=
"columns"
separator=
","
>
<foreach
collection=
"columnContainerSet"
item=
"columns"
separator=
","
>
<choose
>
<choose
>
<when
test=
"columns.tableName == 'd_
flow_event
'.toString()"
>
<when
test=
"columns.tableName == 'd_
traffic_face
'.toString()"
>
<if
test=
"columns.valid"
>
<if
test=
"columns.valid"
>
${columns.columnContainerStr}
${columns.columnContainerStr}
</if>
</if>
<if
test=
"!columns.valid"
>
<if
test=
"!columns.valid"
>
<include
refid=
"com.viontech.fanxing.
forward.mapper.FlowEvent
Mapper.Base_Column_List_Root"
/>
<include
refid=
"com.viontech.fanxing.
query.mapper.TrafficFace
Mapper.Base_Column_List_Root"
/>
</if>
</if>
</when>
</when>
</choose>
</choose>
</foreach>
</foreach>
</if>
</if>
</sql>
</sql>
<sql
id=
"Blob_Column_List"
>
<select
id=
"selectByExample"
resultMap=
"BaseResultMap"
parameterType=
"com.viontech.fanxing.commons.model.TrafficFaceExample"
>
`flowEvent`.json_data as flowEvent_json_data
</sql>
<select
id=
"selectByExampleWithBLOBs"
resultMap=
"ResultMapWithBLOBs"
parameterType=
"com.viontech.fanxing.commons.model.FlowEventExample"
>
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
,
<include
refid=
"Blob_Column_List"
/>
from `d_flow_event` `flowEvent`
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"groupByClause != null"
>
group by ${groupByClause}
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
<select
id=
"selectByExample"
resultMap=
"BaseResultMap"
parameterType=
"com.viontech.fanxing.commons.model.FlowEventExample"
>
select
select
<if
test=
"distinct"
>
<if
test=
"distinct"
>
distinct
distinct
</if>
</if>
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from `d_
flow_event` `flowEvent
`
from `d_
traffic_face` `trafficFace
`
<if
test=
"_parameter != null"
>
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
<include
refid=
"Example_Where_Clause"
/>
</if>
</if>
...
@@ -141,115 +110,81 @@
...
@@ -141,115 +110,81 @@
order by ${orderByClause}
order by ${orderByClause}
</if>
</if>
</select>
</select>
<select
id=
"selectByPrimaryKey"
resultMap=
"
ResultMapWithBLOBs
"
parameterType=
"java.lang.Long"
>
<select
id=
"selectByPrimaryKey"
resultMap=
"
BaseResultMap
"
parameterType=
"java.lang.Long"
>
select
select
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
,
from `d_traffic_face` `trafficFace`
<include
refid=
"Blob_Column_List"
/>
where `trafficFace`.id = #{id,jdbcType=BIGINT}
from `d_flow_event` `flowEvent`
where `flowEvent`.id = #{id,jdbcType=BIGINT}
</select>
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from `d_
flow_event` `flowEvent
`
delete from `d_
traffic_face` `trafficFace
`
where id = #{id,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</delete>
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.viontech.fanxing.commons.model.
FlowEvent
Example"
>
<delete
id=
"deleteByExample"
parameterType=
"com.viontech.fanxing.commons.model.
TrafficFace
Example"
>
delete from `d_
flow_event` `flowEvent
`
delete from `d_
traffic_face` `trafficFace
`
<if
test=
"_parameter != null"
>
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
<include
refid=
"Example_Where_Clause"
/>
</if>
</if>
</delete>
</delete>
<insert
id=
"insert"
parameterType=
"com.viontech.fanxing.commons.model.FlowEvent"
useGeneratedKeys=
"true"
keyProperty=
"id"
keyColumn=
"id"
>
<insert
id=
"insert"
parameterType=
"com.viontech.fanxing.commons.model.TrafficFace"
useGeneratedKeys=
"true"
keyProperty=
"id"
keyColumn=
"id"
>
insert into `d_flow_event` (unid, task_id, event_type,
insert into `d_traffic_face` (unid, traffic_id, `state`,
event_time, device_code, device_name,
sex, upper_color, lower_color
location_code, location_name, pic_name,
)
video_name, json_data)
values (#{unid,jdbcType=VARCHAR}, #{trafficId,jdbcType=BIGINT}, #{state,jdbcType=SMALLINT},
values (#{unid,jdbcType=VARCHAR}, #{taskId,jdbcType=BIGINT}, #{eventType,jdbcType=VARCHAR},
#{sex,jdbcType=SMALLINT}, #{upperColor,jdbcType=VARCHAR}, #{lowerColor,jdbcType=VARCHAR}
#{eventTime,jdbcType=TIMESTAMP}, #{deviceCode,jdbcType=VARCHAR}, #{deviceName,jdbcType=VARCHAR},
)
#{locationCode,jdbcType=VARCHAR}, #{locationName,jdbcType=VARCHAR}, #{picName,jdbcType=VARCHAR},
#{videoName,jdbcType=VARCHAR}, #{jsonData,jdbcType=LONGVARCHAR})
</insert>
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.viontech.fanxing.commons.model.
FlowEvent
"
useGeneratedKeys=
"true"
keyProperty=
"id"
keyColumn=
"id"
>
<insert
id=
"insertSelective"
parameterType=
"com.viontech.fanxing.commons.model.
TrafficFace
"
useGeneratedKeys=
"true"
keyProperty=
"id"
keyColumn=
"id"
>
insert into `d_
flow_event
`
insert into `d_
traffic_face
`
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"unid != null"
>
<if
test=
"unid != null"
>
unid,
unid,
</if>
</if>
<if
test=
"taskId != null"
>
<if
test=
"trafficId != null"
>
task_id,
traffic_id,
</if>
<if
test=
"eventType != null"
>
event_type,
</if>
<if
test=
"eventTime != null"
>
event_time,
</if>
<if
test=
"deviceCode != null"
>
device_code,
</if>
<if
test=
"deviceName != null"
>
device_name,
</if>
<if
test=
"locationCode != null"
>
location_code,
</if>
</if>
<if
test=
"
locationNam
e != null"
>
<if
test=
"
stat
e != null"
>
location_name
,
`state`
,
</if>
</if>
<if
test=
"
picName
!= null"
>
<if
test=
"
sex
!= null"
>
pic_name
,
sex
,
</if>
</if>
<if
test=
"
videoName
!= null"
>
<if
test=
"
upperColor
!= null"
>
video_name
,
upper_color
,
</if>
</if>
<if
test=
"
jsonData
!= null"
>
<if
test=
"
lowerColor
!= null"
>
json_data
,
lower_color
,
</if>
</if>
</trim>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"unid != null"
>
<if
test=
"unid != null"
>
#{unid,jdbcType=VARCHAR},
#{unid,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"t
ask
Id != null"
>
<if
test=
"t
raffic
Id != null"
>
#{t
ask
Id,jdbcType=BIGINT},
#{t
raffic
Id,jdbcType=BIGINT},
</if>
</if>
<if
test=
"
eventTyp
e != null"
>
<if
test=
"
stat
e != null"
>
#{
eventType,jdbcType=VARCHAR
},
#{
state,jdbcType=SMALLINT
},
</if>
</if>
<if
test=
"
eventTime
!= null"
>
<if
test=
"
sex
!= null"
>
#{
eventTime,jdbcType=TIMESTAMP
},
#{
sex,jdbcType=SMALLINT
},
</if>
</if>
<if
test=
"
deviceCode
!= null"
>
<if
test=
"
upperColor
!= null"
>
#{
deviceCode
,jdbcType=VARCHAR},
#{
upperColor
,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"deviceName != null"
>
<if
test=
"lowerColor != null"
>
#{deviceName,jdbcType=VARCHAR},
#{lowerColor,jdbcType=VARCHAR},
</if>
<if
test=
"locationCode != null"
>
#{locationCode,jdbcType=VARCHAR},
</if>
<if
test=
"locationName != null"
>
#{locationName,jdbcType=VARCHAR},
</if>
<if
test=
"picName != null"
>
#{picName,jdbcType=VARCHAR},
</if>
<if
test=
"videoName != null"
>
#{videoName,jdbcType=VARCHAR},
</if>
<if
test=
"jsonData != null"
>
#{jsonData,jdbcType=LONGVARCHAR},
</if>
</if>
</trim>
</trim>
</insert>
</insert>
<select
id=
"countByExample"
parameterType=
"com.viontech.fanxing.commons.model.
FlowEvent
Example"
resultType=
"java.lang.Integer"
>
<select
id=
"countByExample"
parameterType=
"com.viontech.fanxing.commons.model.
TrafficFace
Example"
resultType=
"java.lang.Integer"
>
select count(*) from `d_
flow_event` `flowEvent
`
select count(*) from `d_
traffic_face` `trafficFace
`
<if
test=
"_parameter != null"
>
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
<include
refid=
"Example_Where_Clause"
/>
</if>
</if>
</select>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update `d_
flow_event` `flowEvent
`
update `d_
traffic_face` `trafficFace
`
<set
>
<set
>
<if
test=
"record.id != null"
>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=BIGINT},
id = #{record.id,jdbcType=BIGINT},
...
@@ -257,142 +192,71 @@
...
@@ -257,142 +192,71 @@
<if
test=
"record.unid != null"
>
<if
test=
"record.unid != null"
>
unid = #{record.unid,jdbcType=VARCHAR},
unid = #{record.unid,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"record.taskId != null"
>
<if
test=
"record.trafficId != null"
>
task_id = #{record.taskId,jdbcType=BIGINT},
traffic_id = #{record.trafficId,jdbcType=BIGINT},
</if>
<if
test=
"record.eventType != null"
>
event_type = #{record.eventType,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"record.
eventTim
e != null"
>
<if
test=
"record.
stat
e != null"
>
event_time = #{record.eventTime,jdbcType=TIMESTAMP
},
`state` = #{record.state,jdbcType=SMALLINT
},
</if>
</if>
<if
test=
"record.
deviceCode
!= null"
>
<if
test=
"record.
sex
!= null"
>
device_code = #{record.deviceCode,jdbcType=VARCHAR
},
sex = #{record.sex,jdbcType=SMALLINT
},
</if>
</if>
<if
test=
"record.
deviceName
!= null"
>
<if
test=
"record.
upperColor
!= null"
>
device_name = #{record.deviceName
,jdbcType=VARCHAR},
upper_color = #{record.upperColor
,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"record.locationCode != null"
>
<if
test=
"record.lowerColor != null"
>
location_code = #{record.locationCode,jdbcType=VARCHAR},
lower_color = #{record.lowerColor,jdbcType=VARCHAR},
</if>
<if
test=
"record.locationName != null"
>
location_name = #{record.locationName,jdbcType=VARCHAR},
</if>
<if
test=
"record.picName != null"
>
pic_name = #{record.picName,jdbcType=VARCHAR},
</if>
<if
test=
"record.videoName != null"
>
video_name = #{record.videoName,jdbcType=VARCHAR},
</if>
<if
test=
"record.jsonData != null"
>
json_data = #{record.jsonData,jdbcType=LONGVARCHAR},
</if>
</if>
</set>
</set>
<if
test=
"_parameter != null"
>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</if>
</update>
</update>
<update
id=
"updateByExampleWithBLOBs"
parameterType=
"map"
>
update `d_flow_event` `flowEvent`
set `flowEvent`.id = #{record.id,jdbcType=BIGINT},
`flowEvent`.unid = #{record.unid,jdbcType=VARCHAR},
`flowEvent`.task_id = #{record.taskId,jdbcType=BIGINT},
`flowEvent`.event_type = #{record.eventType,jdbcType=VARCHAR},
`flowEvent`.event_time = #{record.eventTime,jdbcType=TIMESTAMP},
`flowEvent`.device_code = #{record.deviceCode,jdbcType=VARCHAR},
`flowEvent`.device_name = #{record.deviceName,jdbcType=VARCHAR},
`flowEvent`.location_code = #{record.locationCode,jdbcType=VARCHAR},
`flowEvent`.location_name = #{record.locationName,jdbcType=VARCHAR},
`flowEvent`.pic_name = #{record.picName,jdbcType=VARCHAR},
`flowEvent`.video_name = #{record.videoName,jdbcType=VARCHAR},
`flowEvent`.json_data = #{record.jsonData,jdbcType=LONGVARCHAR}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
<update
id=
"updateByExample"
parameterType=
"map"
>
update `d_
flow_event` `flowEvent
`
update `d_
traffic_face` `trafficFace
`
set id = #{record.id,jdbcType=BIGINT},
set id = #{record.id,jdbcType=BIGINT},
unid = #{record.unid,jdbcType=VARCHAR},
unid = #{record.unid,jdbcType=VARCHAR},
task_id = #{record.taskId,jdbcType=BIGINT},
traffic_id = #{record.trafficId,jdbcType=BIGINT},
event_type = #{record.eventType,jdbcType=VARCHAR},
`state` = #{record.state,jdbcType=SMALLINT},
event_time = #{record.eventTime,jdbcType=TIMESTAMP},
sex = #{record.sex,jdbcType=SMALLINT},
device_code = #{record.deviceCode,jdbcType=VARCHAR},
upper_color = #{record.upperColor,jdbcType=VARCHAR},
device_name = #{record.deviceName,jdbcType=VARCHAR},
lower_color = #{record.lowerColor,jdbcType=VARCHAR}
location_code = #{record.locationCode,jdbcType=VARCHAR},
location_name = #{record.locationName,jdbcType=VARCHAR},
pic_name = #{record.picName,jdbcType=VARCHAR},
video_name = #{record.videoName,jdbcType=VARCHAR}
<if
test=
"_parameter != null"
>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</if>
</update>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.viontech.fanxing.commons.model.
FlowEvent
"
>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.viontech.fanxing.commons.model.
TrafficFace
"
>
update `d_
flow_event
`
update `d_
traffic_face
`
<set
>
<set
>
<if
test=
"unid != null"
>
<if
test=
"unid != null"
>
unid = #{unid,jdbcType=VARCHAR},
unid = #{unid,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"taskId != null"
>
<if
test=
"trafficId != null"
>
task_id = #{taskId,jdbcType=BIGINT},
traffic_id = #{trafficId,jdbcType=BIGINT},
</if>
<if
test=
"eventType != null"
>
event_type = #{eventType,jdbcType=VARCHAR},
</if>
<if
test=
"eventTime != null"
>
event_time = #{eventTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"deviceCode != null"
>
device_code = #{deviceCode,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"
deviceNam
e != null"
>
<if
test=
"
stat
e != null"
>
device_name = #{deviceName,jdbcType=VARCHAR
},
`state` = #{state,jdbcType=SMALLINT
},
</if>
</if>
<if
test=
"
locationCode
!= null"
>
<if
test=
"
sex
!= null"
>
location_code = #{locationCode,jdbcType=VARCHAR
},
sex = #{sex,jdbcType=SMALLINT
},
</if>
</if>
<if
test=
"
locationName
!= null"
>
<if
test=
"
upperColor
!= null"
>
location_name = #{locationName
,jdbcType=VARCHAR},
upper_color = #{upperColor
,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"picName != null"
>
<if
test=
"lowerColor != null"
>
pic_name = #{picName,jdbcType=VARCHAR},
lower_color = #{lowerColor,jdbcType=VARCHAR},
</if>
<if
test=
"videoName != null"
>
video_name = #{videoName,jdbcType=VARCHAR},
</if>
<if
test=
"jsonData != null"
>
json_data = #{jsonData,jdbcType=LONGVARCHAR},
</if>
</if>
</set>
</set>
where id = #{id,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</update>
<update
id=
"updateByPrimaryKeyWithBLOBs"
parameterType=
"com.viontech.fanxing.commons.model.FlowEvent"
>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.viontech.fanxing.commons.model.TrafficFace"
>
update `d_flow_event`
update `d_traffic_face`
set unid = #{unid,jdbcType=VARCHAR},
task_id = #{taskId,jdbcType=BIGINT},
event_type = #{eventType,jdbcType=VARCHAR},
event_time = #{eventTime,jdbcType=TIMESTAMP},
device_code = #{deviceCode,jdbcType=VARCHAR},
device_name = #{deviceName,jdbcType=VARCHAR},
location_code = #{locationCode,jdbcType=VARCHAR},
location_name = #{locationName,jdbcType=VARCHAR},
pic_name = #{picName,jdbcType=VARCHAR},
video_name = #{videoName,jdbcType=VARCHAR},
json_data = #{jsonData,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.viontech.fanxing.commons.model.FlowEvent"
>
update `d_flow_event`
set unid = #{unid,jdbcType=VARCHAR},
set unid = #{unid,jdbcType=VARCHAR},
task_id = #{taskId,jdbcType=BIGINT},
traffic_id = #{trafficId,jdbcType=BIGINT},
event_type = #{eventType,jdbcType=VARCHAR},
`state` = #{state,jdbcType=SMALLINT},
event_time = #{eventTime,jdbcType=TIMESTAMP},
sex = #{sex,jdbcType=SMALLINT},
device_code = #{deviceCode,jdbcType=VARCHAR},
upper_color = #{upperColor,jdbcType=VARCHAR},
device_name = #{deviceName,jdbcType=VARCHAR},
lower_color = #{lowerColor,jdbcType=VARCHAR}
location_code = #{locationCode,jdbcType=VARCHAR},
location_name = #{locationName,jdbcType=VARCHAR},
pic_name = #{picName,jdbcType=VARCHAR},
video_name = #{videoName,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</update>
</mapper>
</mapper>
\ No newline at end of file
\ No newline at end of file
fanxing-query/src/main/java/com/viontech/fanxing/query/mapping/TrafficMapper.xml
View file @
3370b9b
...
@@ -7,25 +7,25 @@
...
@@ -7,25 +7,25 @@
<result
column=
"traffic_task_id"
property=
"taskId"
/>
<result
column=
"traffic_task_id"
property=
"taskId"
/>
<result
column=
"traffic_event_cate"
property=
"eventCate"
/>
<result
column=
"traffic_event_cate"
property=
"eventCate"
/>
<result
column=
"traffic_event_type"
property=
"eventType"
/>
<result
column=
"traffic_event_type"
property=
"eventType"
/>
<result
column=
"traffic_event_
time"
property=
"eventTime
"
/>
<result
column=
"traffic_event_
dt"
property=
"eventDt
"
/>
<result
column=
"traffic_channel_unid"
property=
"channelUnid"
/>
<result
column=
"traffic_channel_unid"
property=
"channelUnid"
/>
<result
column=
"traffic_plate_color"
property=
"plateColor"
/>
<result
column=
"traffic_plate_color"
property=
"plateColor"
/>
<result
column=
"traffic_plate_number"
property=
"plateNumber"
/>
<result
column=
"traffic_plate_number"
property=
"plateNumber"
/>
<result
column=
"traffic_location_code"
property=
"locationCode"
/>
<result
column=
"traffic_location_code"
property=
"locationCode"
/>
<result
column=
"traffic_location_name"
property=
"locationName"
/>
<result
column=
"traffic_lane_code"
property=
"laneCode"
/>
<result
column=
"traffic_lane_code"
property=
"laneCode"
/>
<result
column=
"traffic_direction_code"
property=
"directionCode"
/>
<result
column=
"traffic_direction_code"
property=
"directionCode"
/>
<result
column=
"traffic_vehicle_type"
property=
"vehicleType"
/>
<result
column=
"traffic_vehicle_type"
property=
"vehicleType"
/>
<result
column=
"traffic_illegal_code"
property=
"illegalCode"
/>
<result
column=
"traffic_illegal_state"
property=
"illegalState"
/>
<result
column=
"traffic_vehicle_color"
property=
"vehicleColor"
/>
<result
column=
"traffic_vehicle_color"
property=
"vehicleColor"
/>
<result
column=
"traffic_vehicle_logo"
property=
"vehicleLogo"
/>
<result
column=
"traffic_vehicle_logo"
property=
"vehicleLogo"
/>
<result
column=
"traffic_annual_inspection_mark"
property=
"annualInspectionMark"
/>
<result
column=
"traffic_illegal_code"
property=
"illegalCode"
/>
<result
column=
"traffic_pendant"
property=
"pendant"
/>
<result
column=
"traffic_illegal_state"
property=
"illegalState"
/>
<result
column=
"traffic_decoration"
property=
"decoration"
/>
<result
column=
"traffic_feature_annual_inspection_mark"
property=
"featureAnnualInspectionMark"
/>
<result
column=
"traffic_sun_shield"
property=
"sunShield"
/>
<result
column=
"traffic_feature_pendant"
property=
"featurePendant"
/>
<result
column=
"traffic_feature_decoration"
property=
"featureDecoration"
/>
<result
column=
"traffic_feature_sun_shield"
property=
"featureSunShield"
/>
<result
column=
"traffic_xcycle_type"
property=
"xcycleType"
/>
<result
column=
"traffic_xcycle_type"
property=
"xcycleType"
/>
<result
column=
"traffic_event_id"
property=
"eventId"
/>
<result
column=
"traffic_event_id"
property=
"eventId"
/>
<result
column=
"traffic_shoot_time"
property=
"shootTime"
/>
<result
column=
"traffic_special_type"
property=
"specialType"
/>
<result
column=
"traffic_special_type"
property=
"specialType"
/>
<result
column=
"traffic_with_helmet"
property=
"withHelmet"
/>
<result
column=
"traffic_with_helmet"
property=
"withHelmet"
/>
<result
column=
"traffic_pic_name"
property=
"picName"
/>
<result
column=
"traffic_pic_name"
property=
"picName"
/>
...
@@ -97,16 +97,16 @@
...
@@ -97,16 +97,16 @@
<sql
id=
"Base_Column_List_Root"
>
<sql
id=
"Base_Column_List_Root"
>
`traffic`.id as traffic_id, `traffic`.unid as traffic_unid, `traffic`.task_id as traffic_task_id,
`traffic`.id as traffic_id, `traffic`.unid as traffic_unid, `traffic`.task_id as traffic_task_id,
`traffic`.event_cate as traffic_event_cate, `traffic`.event_type as traffic_event_type,
`traffic`.event_cate as traffic_event_cate, `traffic`.event_type as traffic_event_type,
`traffic`.event_
time as traffic_event_time
, `traffic`.channel_unid as traffic_channel_unid,
`traffic`.event_
dt as traffic_event_dt
, `traffic`.channel_unid as traffic_channel_unid,
`traffic`.plate_color as traffic_plate_color, `traffic`.plate_number as traffic_plate_number,
`traffic`.plate_color as traffic_plate_color, `traffic`.plate_number as traffic_plate_number,
`traffic`.location_code as traffic_location_code, `traffic`.l
ane_code as traffic_lane_cod
e,
`traffic`.location_code as traffic_location_code, `traffic`.l
ocation_name as traffic_location_nam
e,
`traffic`.
direction_code as traffic_direction_code, `traffic`.vehicle_type as traffic_vehicle_typ
e,
`traffic`.
lane_code as traffic_lane_code, `traffic`.direction_code as traffic_direction_cod
e,
`traffic`.
illegal_code as traffic_illegal_code, `traffic`.illegal_state as traffic_illegal_state
,
`traffic`.
vehicle_type as traffic_vehicle_type, `traffic`.vehicle_color as traffic_vehicle_color
,
`traffic`.vehicle_
color as traffic_vehicle_color, `traffic`.vehicle_logo as traffic_vehicle_logo
,
`traffic`.vehicle_
logo as traffic_vehicle_logo, `traffic`.illegal_code as traffic_illegal_code
,
`traffic`.
annual_inspection_mark as traffic_annual_inspection_mark, `traffic`.pendant as traffic_pendant
,
`traffic`.
illegal_state as traffic_illegal_state, `traffic`.feature_annual_inspection_mark as traffic_feature_annual_inspection_mark
,
`traffic`.
decoration as traffic_decoration, `traffic`.sun_shield as traffic_sun_shield
,
`traffic`.
feature_pendant as traffic_feature_pendant, `traffic`.feature_decoration as traffic_feature_decoration
,
`traffic`.
xcycle_type as traffic_xcycle_type, `traffic`.event_id as traffic_event_id
,
`traffic`.
feature_sun_shield as traffic_feature_sun_shield, `traffic`.xcycle_type as traffic_xcycle_type
,
`traffic`.
shoot_time as traffic_shoot_time
, `traffic`.special_type as traffic_special_type,
`traffic`.
event_id as traffic_event_id
, `traffic`.special_type as traffic_special_type,
`traffic`.with_helmet as traffic_with_helmet, `traffic`.pic_name as traffic_pic_name,
`traffic`.with_helmet as traffic_with_helmet, `traffic`.pic_name as traffic_pic_name,
`traffic`.video_name as traffic_video_name, `traffic`.`status` as `traffic_status`
`traffic`.video_name as traffic_video_name, `traffic`.`status` as `traffic_status`
</sql>
</sql>
...
@@ -188,23 +188,23 @@
...
@@ -188,23 +188,23 @@
</delete>
</delete>
<insert
id=
"insert"
parameterType=
"com.viontech.fanxing.commons.model.Traffic"
useGeneratedKeys=
"true"
keyProperty=
"id"
keyColumn=
"id"
>
<insert
id=
"insert"
parameterType=
"com.viontech.fanxing.commons.model.Traffic"
useGeneratedKeys=
"true"
keyProperty=
"id"
keyColumn=
"id"
>
insert into `d_traffic` (unid, task_id, event_cate,
insert into `d_traffic` (unid, task_id, event_cate,
event_type, event_
time
, channel_unid,
event_type, event_
dt
, channel_unid,
plate_color, plate_number, location_code,
plate_color, plate_number, location_code,
l
ane_code, direction_code, vehicle_typ
e,
l
ocation_name, lane_code, direction_cod
e,
illegal_code, illegal_state, vehicle_color
,
vehicle_type, vehicle_color, vehicle_logo
,
vehicle_logo, annual_inspection_mark, pendant
,
illegal_code, illegal_state, feature_annual_inspection_mark
,
decoration, sun_shield, xcycle_type
,
feature_pendant, feature_decoration, feature_sun_shield
,
event_id, shoot_time
, special_type,
xcycle_type, event_id
, special_type,
with_helmet, pic_name, video_name,
with_helmet, pic_name, video_name,
`status`, json_data)
`status`, json_data)
values (#{unid,jdbcType=VARCHAR}, #{taskId,jdbcType=BIGINT}, #{eventCate,jdbcType=VARCHAR},
values (#{unid,jdbcType=VARCHAR}, #{taskId,jdbcType=BIGINT}, #{eventCate,jdbcType=VARCHAR},
#{eventType,jdbcType=VARCHAR}, #{event
Time
,jdbcType=TIMESTAMP}, #{channelUnid,jdbcType=VARCHAR},
#{eventType,jdbcType=VARCHAR}, #{event
Dt
,jdbcType=TIMESTAMP}, #{channelUnid,jdbcType=VARCHAR},
#{plateColor,jdbcType=VARCHAR}, #{plateNumber,jdbcType=VARCHAR}, #{locationCode,jdbcType=VARCHAR},
#{plateColor,jdbcType=VARCHAR}, #{plateNumber,jdbcType=VARCHAR}, #{locationCode,jdbcType=VARCHAR},
#{l
aneCode,jdbcType=VARCHAR}, #{directionCode,jdbcType=VARCHAR}, #{vehicleTyp
e,jdbcType=VARCHAR},
#{l
ocationName,jdbcType=VARCHAR}, #{laneCode,jdbcType=VARCHAR}, #{directionCod
e,jdbcType=VARCHAR},
#{
illegalCode,jdbcType=VARCHAR}, #{illegalState,jdbcType=INTEGER}, #{vehicleColor
,jdbcType=VARCHAR},
#{
vehicleType,jdbcType=VARCHAR}, #{vehicleColor,jdbcType=VARCHAR}, #{vehicleLogo
,jdbcType=VARCHAR},
#{
vehicleLogo,jdbcType=VARCHAR}, #{annualInspectionMark,jdbcType=VARCHAR}, #{pendant,jdbcType=VARCHAR
},
#{
illegalCode,jdbcType=VARCHAR}, #{illegalState,jdbcType=INTEGER}, #{featureAnnualInspectionMark,jdbcType=SMALLINT
},
#{
decoration,jdbcType=VARCHAR}, #{sunShield,jdbcType=VARCHAR}, #{xcycleType,jdbcType=VARCHAR
},
#{
featurePendant,jdbcType=SMALLINT}, #{featureDecoration,jdbcType=SMALLINT}, #{featureSunShield,jdbcType=SMALLINT
},
#{
eventId,jdbcType=VARCHAR}, #{shootTime,jdbcType=TIMESTAMP
}, #{specialType,jdbcType=VARCHAR},
#{
xcycleType,jdbcType=VARCHAR}, #{eventId,jdbcType=VARCHAR
}, #{specialType,jdbcType=VARCHAR},
#{withHelmet,jdbcType=INTEGER}, #{picName,jdbcType=VARCHAR}, #{videoName,jdbcType=VARCHAR},
#{withHelmet,jdbcType=INTEGER}, #{picName,jdbcType=VARCHAR}, #{videoName,jdbcType=VARCHAR},
#{status,jdbcType=INTEGER}, #{jsonData,jdbcType=LONGVARCHAR})
#{status,jdbcType=INTEGER}, #{jsonData,jdbcType=LONGVARCHAR})
</insert>
</insert>
...
@@ -223,8 +223,8 @@
...
@@ -223,8 +223,8 @@
<if
test=
"eventType != null"
>
<if
test=
"eventType != null"
>
event_type,
event_type,
</if>
</if>
<if
test=
"event
Time
!= null"
>
<if
test=
"event
Dt
!= null"
>
event_
time
,
event_
dt
,
</if>
</if>
<if
test=
"channelUnid != null"
>
<if
test=
"channelUnid != null"
>
channel_unid,
channel_unid,
...
@@ -238,6 +238,9 @@
...
@@ -238,6 +238,9 @@
<if
test=
"locationCode != null"
>
<if
test=
"locationCode != null"
>
location_code,
location_code,
</if>
</if>
<if
test=
"locationName != null"
>
location_name,
</if>
<if
test=
"laneCode != null"
>
<if
test=
"laneCode != null"
>
lane_code,
lane_code,
</if>
</if>
...
@@ -247,29 +250,29 @@
...
@@ -247,29 +250,29 @@
<if
test=
"vehicleType != null"
>
<if
test=
"vehicleType != null"
>
vehicle_type,
vehicle_type,
</if>
</if>
<if
test=
"illegalCode != null"
>
illegal_code,
</if>
<if
test=
"illegalState != null"
>
illegal_state,
</if>
<if
test=
"vehicleColor != null"
>
<if
test=
"vehicleColor != null"
>
vehicle_color,
vehicle_color,
</if>
</if>
<if
test=
"vehicleLogo != null"
>
<if
test=
"vehicleLogo != null"
>
vehicle_logo,
vehicle_logo,
</if>
</if>
<if
test=
"
annualInspectionMark
!= null"
>
<if
test=
"
illegalCode
!= null"
>
annual_inspection_mark
,
illegal_code
,
</if>
</if>
<if
test=
"
pendant
!= null"
>
<if
test=
"
illegalState
!= null"
>
pendant
,
illegal_state
,
</if>
</if>
<if
test=
"
decoration
!= null"
>
<if
test=
"
featureAnnualInspectionMark
!= null"
>
decoration
,
feature_annual_inspection_mark
,
</if>
</if>
<if
test=
"sunShield != null"
>
<if
test=
"featurePendant != null"
>
sun_shield,
feature_pendant,
</if>
<if
test=
"featureDecoration != null"
>
feature_decoration,
</if>
<if
test=
"featureSunShield != null"
>
feature_sun_shield,
</if>
</if>
<if
test=
"xcycleType != null"
>
<if
test=
"xcycleType != null"
>
xcycle_type,
xcycle_type,
...
@@ -277,9 +280,6 @@
...
@@ -277,9 +280,6 @@
<if
test=
"eventId != null"
>
<if
test=
"eventId != null"
>
event_id,
event_id,
</if>
</if>
<if
test=
"shootTime != null"
>
shoot_time,
</if>
<if
test=
"specialType != null"
>
<if
test=
"specialType != null"
>
special_type,
special_type,
</if>
</if>
...
@@ -312,8 +312,8 @@
...
@@ -312,8 +312,8 @@
<if
test=
"eventType != null"
>
<if
test=
"eventType != null"
>
#{eventType,jdbcType=VARCHAR},
#{eventType,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"event
Time
!= null"
>
<if
test=
"event
Dt
!= null"
>
#{event
Time
,jdbcType=TIMESTAMP},
#{event
Dt
,jdbcType=TIMESTAMP},
</if>
</if>
<if
test=
"channelUnid != null"
>
<if
test=
"channelUnid != null"
>
#{channelUnid,jdbcType=VARCHAR},
#{channelUnid,jdbcType=VARCHAR},
...
@@ -327,6 +327,9 @@
...
@@ -327,6 +327,9 @@
<if
test=
"locationCode != null"
>
<if
test=
"locationCode != null"
>
#{locationCode,jdbcType=VARCHAR},
#{locationCode,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"locationName != null"
>
#{locationName,jdbcType=VARCHAR},
</if>
<if
test=
"laneCode != null"
>
<if
test=
"laneCode != null"
>
#{laneCode,jdbcType=VARCHAR},
#{laneCode,jdbcType=VARCHAR},
</if>
</if>
...
@@ -336,29 +339,29 @@
...
@@ -336,29 +339,29 @@
<if
test=
"vehicleType != null"
>
<if
test=
"vehicleType != null"
>
#{vehicleType,jdbcType=VARCHAR},
#{vehicleType,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"illegalCode != null"
>
#{illegalCode,jdbcType=VARCHAR},
</if>
<if
test=
"illegalState != null"
>
#{illegalState,jdbcType=INTEGER},
</if>
<if
test=
"vehicleColor != null"
>
<if
test=
"vehicleColor != null"
>
#{vehicleColor,jdbcType=VARCHAR},
#{vehicleColor,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"vehicleLogo != null"
>
<if
test=
"vehicleLogo != null"
>
#{vehicleLogo,jdbcType=VARCHAR},
#{vehicleLogo,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"
annualInspectionMark
!= null"
>
<if
test=
"
illegalCode
!= null"
>
#{
annualInspectionMark
,jdbcType=VARCHAR},
#{
illegalCode
,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"
pendant
!= null"
>
<if
test=
"
illegalState
!= null"
>
#{
pendant,jdbcType=VARCHA
R},
#{
illegalState,jdbcType=INTEGE
R},
</if>
</if>
<if
test=
"
decoration
!= null"
>
<if
test=
"
featureAnnualInspectionMark
!= null"
>
#{
decoration,jdbcType=VARCHAR
},
#{
featureAnnualInspectionMark,jdbcType=SMALLINT
},
</if>
</if>
<if
test=
"sunShield != null"
>
<if
test=
"featurePendant != null"
>
#{sunShield,jdbcType=VARCHAR},
#{featurePendant,jdbcType=SMALLINT},
</if>
<if
test=
"featureDecoration != null"
>
#{featureDecoration,jdbcType=SMALLINT},
</if>
<if
test=
"featureSunShield != null"
>
#{featureSunShield,jdbcType=SMALLINT},
</if>
</if>
<if
test=
"xcycleType != null"
>
<if
test=
"xcycleType != null"
>
#{xcycleType,jdbcType=VARCHAR},
#{xcycleType,jdbcType=VARCHAR},
...
@@ -366,9 +369,6 @@
...
@@ -366,9 +369,6 @@
<if
test=
"eventId != null"
>
<if
test=
"eventId != null"
>
#{eventId,jdbcType=VARCHAR},
#{eventId,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"shootTime != null"
>
#{shootTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"specialType != null"
>
<if
test=
"specialType != null"
>
#{specialType,jdbcType=VARCHAR},
#{specialType,jdbcType=VARCHAR},
</if>
</if>
...
@@ -413,8 +413,8 @@
...
@@ -413,8 +413,8 @@
<if
test=
"record.eventType != null"
>
<if
test=
"record.eventType != null"
>
event_type = #{record.eventType,jdbcType=VARCHAR},
event_type = #{record.eventType,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"record.event
Time
!= null"
>
<if
test=
"record.event
Dt
!= null"
>
event_
time = #{record.eventTime
,jdbcType=TIMESTAMP},
event_
dt = #{record.eventDt
,jdbcType=TIMESTAMP},
</if>
</if>
<if
test=
"record.channelUnid != null"
>
<if
test=
"record.channelUnid != null"
>
channel_unid = #{record.channelUnid,jdbcType=VARCHAR},
channel_unid = #{record.channelUnid,jdbcType=VARCHAR},
...
@@ -428,6 +428,9 @@
...
@@ -428,6 +428,9 @@
<if
test=
"record.locationCode != null"
>
<if
test=
"record.locationCode != null"
>
location_code = #{record.locationCode,jdbcType=VARCHAR},
location_code = #{record.locationCode,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"record.locationName != null"
>
location_name = #{record.locationName,jdbcType=VARCHAR},
</if>
<if
test=
"record.laneCode != null"
>
<if
test=
"record.laneCode != null"
>
lane_code = #{record.laneCode,jdbcType=VARCHAR},
lane_code = #{record.laneCode,jdbcType=VARCHAR},
</if>
</if>
...
@@ -437,29 +440,29 @@
...
@@ -437,29 +440,29 @@
<if
test=
"record.vehicleType != null"
>
<if
test=
"record.vehicleType != null"
>
vehicle_type = #{record.vehicleType,jdbcType=VARCHAR},
vehicle_type = #{record.vehicleType,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"record.illegalCode != null"
>
illegal_code = #{record.illegalCode,jdbcType=VARCHAR},
</if>
<if
test=
"record.illegalState != null"
>
illegal_state = #{record.illegalState,jdbcType=INTEGER},
</if>
<if
test=
"record.vehicleColor != null"
>
<if
test=
"record.vehicleColor != null"
>
vehicle_color = #{record.vehicleColor,jdbcType=VARCHAR},
vehicle_color = #{record.vehicleColor,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"record.vehicleLogo != null"
>
<if
test=
"record.vehicleLogo != null"
>
vehicle_logo = #{record.vehicleLogo,jdbcType=VARCHAR},
vehicle_logo = #{record.vehicleLogo,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"record.annualInspectionMark != null"
>
<if
test=
"record.illegalCode != null"
>
annual_inspection_mark = #{record.annualInspectionMark,jdbcType=VARCHAR},
illegal_code = #{record.illegalCode,jdbcType=VARCHAR},
</if>
<if
test=
"record.illegalState != null"
>
illegal_state = #{record.illegalState,jdbcType=INTEGER},
</if>
<if
test=
"record.featureAnnualInspectionMark != null"
>
feature_annual_inspection_mark = #{record.featureAnnualInspectionMark,jdbcType=SMALLINT},
</if>
</if>
<if
test=
"record.
p
endant != null"
>
<if
test=
"record.
featureP
endant != null"
>
pendant = #{record.pendant,jdbcType=VARCHAR
},
feature_pendant = #{record.featurePendant,jdbcType=SMALLINT
},
</if>
</if>
<if
test=
"record.
d
ecoration != null"
>
<if
test=
"record.
featureD
ecoration != null"
>
decoration = #{record.decoration,jdbcType=VARCHAR
},
feature_decoration = #{record.featureDecoration,jdbcType=SMALLINT
},
</if>
</if>
<if
test=
"record.
s
unShield != null"
>
<if
test=
"record.
featureS
unShield != null"
>
sun_shield = #{record.sunShield,jdbcType=VARCHAR
},
feature_sun_shield = #{record.featureSunShield,jdbcType=SMALLINT
},
</if>
</if>
<if
test=
"record.xcycleType != null"
>
<if
test=
"record.xcycleType != null"
>
xcycle_type = #{record.xcycleType,jdbcType=VARCHAR},
xcycle_type = #{record.xcycleType,jdbcType=VARCHAR},
...
@@ -467,9 +470,6 @@
...
@@ -467,9 +470,6 @@
<if
test=
"record.eventId != null"
>
<if
test=
"record.eventId != null"
>
event_id = #{record.eventId,jdbcType=VARCHAR},
event_id = #{record.eventId,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"record.shootTime != null"
>
shoot_time = #{record.shootTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.specialType != null"
>
<if
test=
"record.specialType != null"
>
special_type = #{record.specialType,jdbcType=VARCHAR},
special_type = #{record.specialType,jdbcType=VARCHAR},
</if>
</if>
...
@@ -500,25 +500,25 @@
...
@@ -500,25 +500,25 @@
`traffic`.task_id = #{record.taskId,jdbcType=BIGINT},
`traffic`.task_id = #{record.taskId,jdbcType=BIGINT},
`traffic`.event_cate = #{record.eventCate,jdbcType=VARCHAR},
`traffic`.event_cate = #{record.eventCate,jdbcType=VARCHAR},
`traffic`.event_type = #{record.eventType,jdbcType=VARCHAR},
`traffic`.event_type = #{record.eventType,jdbcType=VARCHAR},
`traffic`.event_
time = #{record.eventTime
,jdbcType=TIMESTAMP},
`traffic`.event_
dt = #{record.eventDt
,jdbcType=TIMESTAMP},
`traffic`.channel_unid = #{record.channelUnid,jdbcType=VARCHAR},
`traffic`.channel_unid = #{record.channelUnid,jdbcType=VARCHAR},
`traffic`.plate_color = #{record.plateColor,jdbcType=VARCHAR},
`traffic`.plate_color = #{record.plateColor,jdbcType=VARCHAR},
`traffic`.plate_number = #{record.plateNumber,jdbcType=VARCHAR},
`traffic`.plate_number = #{record.plateNumber,jdbcType=VARCHAR},
`traffic`.location_code = #{record.locationCode,jdbcType=VARCHAR},
`traffic`.location_code = #{record.locationCode,jdbcType=VARCHAR},
`traffic`.location_name = #{record.locationName,jdbcType=VARCHAR},
`traffic`.lane_code = #{record.laneCode,jdbcType=VARCHAR},
`traffic`.lane_code = #{record.laneCode,jdbcType=VARCHAR},
`traffic`.direction_code = #{record.directionCode,jdbcType=VARCHAR},
`traffic`.direction_code = #{record.directionCode,jdbcType=VARCHAR},
`traffic`.vehicle_type = #{record.vehicleType,jdbcType=VARCHAR},
`traffic`.vehicle_type = #{record.vehicleType,jdbcType=VARCHAR},
`traffic`.illegal_code = #{record.illegalCode,jdbcType=VARCHAR},
`traffic`.illegal_state = #{record.illegalState,jdbcType=INTEGER},
`traffic`.vehicle_color = #{record.vehicleColor,jdbcType=VARCHAR},
`traffic`.vehicle_color = #{record.vehicleColor,jdbcType=VARCHAR},
`traffic`.vehicle_logo = #{record.vehicleLogo,jdbcType=VARCHAR},
`traffic`.vehicle_logo = #{record.vehicleLogo,jdbcType=VARCHAR},
`traffic`.annual_inspection_mark = #{record.annualInspectionMark,jdbcType=VARCHAR},
`traffic`.illegal_code = #{record.illegalCode,jdbcType=VARCHAR},
`traffic`.pendant = #{record.pendant,jdbcType=VARCHAR},
`traffic`.illegal_state = #{record.illegalState,jdbcType=INTEGER},
`traffic`.decoration = #{record.decoration,jdbcType=VARCHAR},
`traffic`.feature_annual_inspection_mark = #{record.featureAnnualInspectionMark,jdbcType=SMALLINT},
`traffic`.sun_shield = #{record.sunShield,jdbcType=VARCHAR},
`traffic`.feature_pendant = #{record.featurePendant,jdbcType=SMALLINT},
`traffic`.feature_decoration = #{record.featureDecoration,jdbcType=SMALLINT},
`traffic`.feature_sun_shield = #{record.featureSunShield,jdbcType=SMALLINT},
`traffic`.xcycle_type = #{record.xcycleType,jdbcType=VARCHAR},
`traffic`.xcycle_type = #{record.xcycleType,jdbcType=VARCHAR},
`traffic`.event_id = #{record.eventId,jdbcType=VARCHAR},
`traffic`.event_id = #{record.eventId,jdbcType=VARCHAR},
`traffic`.shoot_time = #{record.shootTime,jdbcType=TIMESTAMP},
`traffic`.special_type = #{record.specialType,jdbcType=VARCHAR},
`traffic`.special_type = #{record.specialType,jdbcType=VARCHAR},
`traffic`.with_helmet = #{record.withHelmet,jdbcType=INTEGER},
`traffic`.with_helmet = #{record.withHelmet,jdbcType=INTEGER},
`traffic`.pic_name = #{record.picName,jdbcType=VARCHAR},
`traffic`.pic_name = #{record.picName,jdbcType=VARCHAR},
...
@@ -536,25 +536,25 @@
...
@@ -536,25 +536,25 @@
task_id = #{record.taskId,jdbcType=BIGINT},
task_id = #{record.taskId,jdbcType=BIGINT},
event_cate = #{record.eventCate,jdbcType=VARCHAR},
event_cate = #{record.eventCate,jdbcType=VARCHAR},
event_type = #{record.eventType,jdbcType=VARCHAR},
event_type = #{record.eventType,jdbcType=VARCHAR},
event_
time = #{record.eventTime
,jdbcType=TIMESTAMP},
event_
dt = #{record.eventDt
,jdbcType=TIMESTAMP},
channel_unid = #{record.channelUnid,jdbcType=VARCHAR},
channel_unid = #{record.channelUnid,jdbcType=VARCHAR},
plate_color = #{record.plateColor,jdbcType=VARCHAR},
plate_color = #{record.plateColor,jdbcType=VARCHAR},
plate_number = #{record.plateNumber,jdbcType=VARCHAR},
plate_number = #{record.plateNumber,jdbcType=VARCHAR},
location_code = #{record.locationCode,jdbcType=VARCHAR},
location_code = #{record.locationCode,jdbcType=VARCHAR},
location_name = #{record.locationName,jdbcType=VARCHAR},
lane_code = #{record.laneCode,jdbcType=VARCHAR},
lane_code = #{record.laneCode,jdbcType=VARCHAR},
direction_code = #{record.directionCode,jdbcType=VARCHAR},
direction_code = #{record.directionCode,jdbcType=VARCHAR},
vehicle_type = #{record.vehicleType,jdbcType=VARCHAR},
vehicle_type = #{record.vehicleType,jdbcType=VARCHAR},
illegal_code = #{record.illegalCode,jdbcType=VARCHAR},
illegal_state = #{record.illegalState,jdbcType=INTEGER},
vehicle_color = #{record.vehicleColor,jdbcType=VARCHAR},
vehicle_color = #{record.vehicleColor,jdbcType=VARCHAR},
vehicle_logo = #{record.vehicleLogo,jdbcType=VARCHAR},
vehicle_logo = #{record.vehicleLogo,jdbcType=VARCHAR},
annual_inspection_mark = #{record.annualInspectionMark,jdbcType=VARCHAR},
illegal_code = #{record.illegalCode,jdbcType=VARCHAR},
pendant = #{record.pendant,jdbcType=VARCHAR},
illegal_state = #{record.illegalState,jdbcType=INTEGER},
decoration = #{record.decoration,jdbcType=VARCHAR},
feature_annual_inspection_mark = #{record.featureAnnualInspectionMark,jdbcType=SMALLINT},
sun_shield = #{record.sunShield,jdbcType=VARCHAR},
feature_pendant = #{record.featurePendant,jdbcType=SMALLINT},
feature_decoration = #{record.featureDecoration,jdbcType=SMALLINT},
feature_sun_shield = #{record.featureSunShield,jdbcType=SMALLINT},
xcycle_type = #{record.xcycleType,jdbcType=VARCHAR},
xcycle_type = #{record.xcycleType,jdbcType=VARCHAR},
event_id = #{record.eventId,jdbcType=VARCHAR},
event_id = #{record.eventId,jdbcType=VARCHAR},
shoot_time = #{record.shootTime,jdbcType=TIMESTAMP},
special_type = #{record.specialType,jdbcType=VARCHAR},
special_type = #{record.specialType,jdbcType=VARCHAR},
with_helmet = #{record.withHelmet,jdbcType=INTEGER},
with_helmet = #{record.withHelmet,jdbcType=INTEGER},
pic_name = #{record.picName,jdbcType=VARCHAR},
pic_name = #{record.picName,jdbcType=VARCHAR},
...
@@ -579,8 +579,8 @@
...
@@ -579,8 +579,8 @@
<if
test=
"eventType != null"
>
<if
test=
"eventType != null"
>
event_type = #{eventType,jdbcType=VARCHAR},
event_type = #{eventType,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"event
Time
!= null"
>
<if
test=
"event
Dt
!= null"
>
event_
time = #{eventTime
,jdbcType=TIMESTAMP},
event_
dt = #{eventDt
,jdbcType=TIMESTAMP},
</if>
</if>
<if
test=
"channelUnid != null"
>
<if
test=
"channelUnid != null"
>
channel_unid = #{channelUnid,jdbcType=VARCHAR},
channel_unid = #{channelUnid,jdbcType=VARCHAR},
...
@@ -594,6 +594,9 @@
...
@@ -594,6 +594,9 @@
<if
test=
"locationCode != null"
>
<if
test=
"locationCode != null"
>
location_code = #{locationCode,jdbcType=VARCHAR},
location_code = #{locationCode,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"locationName != null"
>
location_name = #{locationName,jdbcType=VARCHAR},
</if>
<if
test=
"laneCode != null"
>
<if
test=
"laneCode != null"
>
lane_code = #{laneCode,jdbcType=VARCHAR},
lane_code = #{laneCode,jdbcType=VARCHAR},
</if>
</if>
...
@@ -603,29 +606,29 @@
...
@@ -603,29 +606,29 @@
<if
test=
"vehicleType != null"
>
<if
test=
"vehicleType != null"
>
vehicle_type = #{vehicleType,jdbcType=VARCHAR},
vehicle_type = #{vehicleType,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"illegalCode != null"
>
illegal_code = #{illegalCode,jdbcType=VARCHAR},
</if>
<if
test=
"illegalState != null"
>
illegal_state = #{illegalState,jdbcType=INTEGER},
</if>
<if
test=
"vehicleColor != null"
>
<if
test=
"vehicleColor != null"
>
vehicle_color = #{vehicleColor,jdbcType=VARCHAR},
vehicle_color = #{vehicleColor,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"vehicleLogo != null"
>
<if
test=
"vehicleLogo != null"
>
vehicle_logo = #{vehicleLogo,jdbcType=VARCHAR},
vehicle_logo = #{vehicleLogo,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"annualInspectionMark != null"
>
<if
test=
"illegalCode != null"
>
annual_inspection_mark = #{annualInspectionMark,jdbcType=VARCHAR},
illegal_code = #{illegalCode,jdbcType=VARCHAR},
</if>
<if
test=
"illegalState != null"
>
illegal_state = #{illegalState,jdbcType=INTEGER},
</if>
<if
test=
"featureAnnualInspectionMark != null"
>
feature_annual_inspection_mark = #{featureAnnualInspectionMark,jdbcType=SMALLINT},
</if>
</if>
<if
test=
"
p
endant != null"
>
<if
test=
"
featureP
endant != null"
>
pendant = #{pendant,jdbcType=VARCHAR
},
feature_pendant = #{featurePendant,jdbcType=SMALLINT
},
</if>
</if>
<if
test=
"
d
ecoration != null"
>
<if
test=
"
featureD
ecoration != null"
>
decoration = #{decoration,jdbcType=VARCHAR
},
feature_decoration = #{featureDecoration,jdbcType=SMALLINT
},
</if>
</if>
<if
test=
"
s
unShield != null"
>
<if
test=
"
featureS
unShield != null"
>
sun_shield = #{sunShield,jdbcType=VARCHAR
},
feature_sun_shield = #{featureSunShield,jdbcType=SMALLINT
},
</if>
</if>
<if
test=
"xcycleType != null"
>
<if
test=
"xcycleType != null"
>
xcycle_type = #{xcycleType,jdbcType=VARCHAR},
xcycle_type = #{xcycleType,jdbcType=VARCHAR},
...
@@ -633,9 +636,6 @@
...
@@ -633,9 +636,6 @@
<if
test=
"eventId != null"
>
<if
test=
"eventId != null"
>
event_id = #{eventId,jdbcType=VARCHAR},
event_id = #{eventId,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"shootTime != null"
>
shoot_time = #{shootTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"specialType != null"
>
<if
test=
"specialType != null"
>
special_type = #{specialType,jdbcType=VARCHAR},
special_type = #{specialType,jdbcType=VARCHAR},
</if>
</if>
...
@@ -663,25 +663,25 @@
...
@@ -663,25 +663,25 @@
task_id = #{taskId,jdbcType=BIGINT},
task_id = #{taskId,jdbcType=BIGINT},
event_cate = #{eventCate,jdbcType=VARCHAR},
event_cate = #{eventCate,jdbcType=VARCHAR},
event_type = #{eventType,jdbcType=VARCHAR},
event_type = #{eventType,jdbcType=VARCHAR},
event_
time = #{eventTime
,jdbcType=TIMESTAMP},
event_
dt = #{eventDt
,jdbcType=TIMESTAMP},
channel_unid = #{channelUnid,jdbcType=VARCHAR},
channel_unid = #{channelUnid,jdbcType=VARCHAR},
plate_color = #{plateColor,jdbcType=VARCHAR},
plate_color = #{plateColor,jdbcType=VARCHAR},
plate_number = #{plateNumber,jdbcType=VARCHAR},
plate_number = #{plateNumber,jdbcType=VARCHAR},
location_code = #{locationCode,jdbcType=VARCHAR},
location_code = #{locationCode,jdbcType=VARCHAR},
location_name = #{locationName,jdbcType=VARCHAR},
lane_code = #{laneCode,jdbcType=VARCHAR},
lane_code = #{laneCode,jdbcType=VARCHAR},
direction_code = #{directionCode,jdbcType=VARCHAR},
direction_code = #{directionCode,jdbcType=VARCHAR},
vehicle_type = #{vehicleType,jdbcType=VARCHAR},
vehicle_type = #{vehicleType,jdbcType=VARCHAR},
illegal_code = #{illegalCode,jdbcType=VARCHAR},
illegal_state = #{illegalState,jdbcType=INTEGER},
vehicle_color = #{vehicleColor,jdbcType=VARCHAR},
vehicle_color = #{vehicleColor,jdbcType=VARCHAR},
vehicle_logo = #{vehicleLogo,jdbcType=VARCHAR},
vehicle_logo = #{vehicleLogo,jdbcType=VARCHAR},
annual_inspection_mark = #{annualInspectionMark,jdbcType=VARCHAR},
illegal_code = #{illegalCode,jdbcType=VARCHAR},
pendant = #{pendant,jdbcType=VARCHAR},
illegal_state = #{illegalState,jdbcType=INTEGER},
decoration = #{decoration,jdbcType=VARCHAR},
feature_annual_inspection_mark = #{featureAnnualInspectionMark,jdbcType=SMALLINT},
sun_shield = #{sunShield,jdbcType=VARCHAR},
feature_pendant = #{featurePendant,jdbcType=SMALLINT},
feature_decoration = #{featureDecoration,jdbcType=SMALLINT},
feature_sun_shield = #{featureSunShield,jdbcType=SMALLINT},
xcycle_type = #{xcycleType,jdbcType=VARCHAR},
xcycle_type = #{xcycleType,jdbcType=VARCHAR},
event_id = #{eventId,jdbcType=VARCHAR},
event_id = #{eventId,jdbcType=VARCHAR},
shoot_time = #{shootTime,jdbcType=TIMESTAMP},
special_type = #{specialType,jdbcType=VARCHAR},
special_type = #{specialType,jdbcType=VARCHAR},
with_helmet = #{withHelmet,jdbcType=INTEGER},
with_helmet = #{withHelmet,jdbcType=INTEGER},
pic_name = #{picName,jdbcType=VARCHAR},
pic_name = #{picName,jdbcType=VARCHAR},
...
@@ -696,25 +696,25 @@
...
@@ -696,25 +696,25 @@
task_id = #{taskId,jdbcType=BIGINT},
task_id = #{taskId,jdbcType=BIGINT},
event_cate = #{eventCate,jdbcType=VARCHAR},
event_cate = #{eventCate,jdbcType=VARCHAR},
event_type = #{eventType,jdbcType=VARCHAR},
event_type = #{eventType,jdbcType=VARCHAR},
event_
time = #{eventTime
,jdbcType=TIMESTAMP},
event_
dt = #{eventDt
,jdbcType=TIMESTAMP},
channel_unid = #{channelUnid,jdbcType=VARCHAR},
channel_unid = #{channelUnid,jdbcType=VARCHAR},
plate_color = #{plateColor,jdbcType=VARCHAR},
plate_color = #{plateColor,jdbcType=VARCHAR},
plate_number = #{plateNumber,jdbcType=VARCHAR},
plate_number = #{plateNumber,jdbcType=VARCHAR},
location_code = #{locationCode,jdbcType=VARCHAR},
location_code = #{locationCode,jdbcType=VARCHAR},
location_name = #{locationName,jdbcType=VARCHAR},
lane_code = #{laneCode,jdbcType=VARCHAR},
lane_code = #{laneCode,jdbcType=VARCHAR},
direction_code = #{directionCode,jdbcType=VARCHAR},
direction_code = #{directionCode,jdbcType=VARCHAR},
vehicle_type = #{vehicleType,jdbcType=VARCHAR},
vehicle_type = #{vehicleType,jdbcType=VARCHAR},
illegal_code = #{illegalCode,jdbcType=VARCHAR},
illegal_state = #{illegalState,jdbcType=INTEGER},
vehicle_color = #{vehicleColor,jdbcType=VARCHAR},
vehicle_color = #{vehicleColor,jdbcType=VARCHAR},
vehicle_logo = #{vehicleLogo,jdbcType=VARCHAR},
vehicle_logo = #{vehicleLogo,jdbcType=VARCHAR},
annual_inspection_mark = #{annualInspectionMark,jdbcType=VARCHAR},
illegal_code = #{illegalCode,jdbcType=VARCHAR},
pendant = #{pendant,jdbcType=VARCHAR},
illegal_state = #{illegalState,jdbcType=INTEGER},
decoration = #{decoration,jdbcType=VARCHAR},
feature_annual_inspection_mark = #{featureAnnualInspectionMark,jdbcType=SMALLINT},
sun_shield = #{sunShield,jdbcType=VARCHAR},
feature_pendant = #{featurePendant,jdbcType=SMALLINT},
feature_decoration = #{featureDecoration,jdbcType=SMALLINT},
feature_sun_shield = #{featureSunShield,jdbcType=SMALLINT},
xcycle_type = #{xcycleType,jdbcType=VARCHAR},
xcycle_type = #{xcycleType,jdbcType=VARCHAR},
event_id = #{eventId,jdbcType=VARCHAR},
event_id = #{eventId,jdbcType=VARCHAR},
shoot_time = #{shootTime,jdbcType=TIMESTAMP},
special_type = #{specialType,jdbcType=VARCHAR},
special_type = #{specialType,jdbcType=VARCHAR},
with_helmet = #{withHelmet,jdbcType=INTEGER},
with_helmet = #{withHelmet,jdbcType=INTEGER},
pic_name = #{picName,jdbcType=VARCHAR},
pic_name = #{picName,jdbcType=VARCHAR},
...
...
fanxing-query/src/main/java/com/viontech/fanxing/query/service/adapter/TrafficFaceService.java
0 → 100644
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
query
.
service
.
adapter
;
import
com.viontech.fanxing.commons.base.BaseService
;
import
com.viontech.fanxing.commons.model.TrafficFace
;
public
interface
TrafficFaceService
extends
BaseService
<
TrafficFace
>
{
}
\ No newline at end of file
\ No newline at end of file
fanxing-
forward/src/main/java/com/viontech/fanxing/forward/service/impl/Behavior
ServiceImpl.java
→
fanxing-
query/src/main/java/com/viontech/fanxing/query/service/impl/TrafficFace
ServiceImpl.java
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
forward
.
service
.
impl
;
package
com
.
viontech
.
fanxing
.
query
.
service
.
impl
;
import
com.viontech.fanxing.commons.base.BaseMapper
;
import
com.viontech.fanxing.commons.base.BaseMapper
;
import
com.viontech.fanxing.commons.base.BaseServiceImpl
;
import
com.viontech.fanxing.commons.base.BaseServiceImpl
;
import
com.viontech.fanxing.forward.mapper.BehaviorMapper
;
import
com.viontech.fanxing.commons.model.TrafficFace
;
import
com.viontech.fanxing.commons.model.Behavior
;
import
com.viontech.fanxing.query.mapper.TrafficFaceMapper
;
import
com.viontech.fanxing.forward.service.adapter.BehaviorService
;
import
com.viontech.fanxing.query.service.adapter.TrafficFaceService
;
import
javax.annotation.Resource
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
@Service
@Service
public
class
BehaviorServiceImpl
extends
BaseServiceImpl
<
Behavior
>
implements
Behavior
Service
{
public
class
TrafficFaceServiceImpl
extends
BaseServiceImpl
<
TrafficFace
>
implements
TrafficFace
Service
{
@Resource
@Resource
private
BehaviorMapper
behavior
Mapper
;
private
TrafficFaceMapper
trafficFace
Mapper
;
@Override
@Override
public
BaseMapper
<
Behavior
>
getMapper
()
{
public
BaseMapper
<
TrafficFace
>
getMapper
()
{
return
behavior
Mapper
;
return
trafficFace
Mapper
;
}
}
}
}
\ No newline at end of file
\ No newline at end of file
fanxing-task-scheduling/src/main/java/com/viontech/fanxing/task/scheduling/model/vaserver/VaServerInfo.java
View file @
3370b9b
...
@@ -20,4 +20,14 @@ public class VaServerInfo implements Serializable {
...
@@ -20,4 +20,14 @@ public class VaServerInfo implements Serializable {
private
Float
videoResource
;
private
Float
videoResource
;
private
String
serviceBaseUrl
;
private
String
serviceBaseUrl
;
private
String
proxy
;
private
String
proxy
;
private
Float
availableResources
;
public
VaServerInfo
setVideoResource
(
Float
videoResource
)
{
this
.
videoResource
=
videoResource
;
if
(
availableResources
==
null
)
{
availableResources
=
videoResource
;
}
return
this
;
}
}
}
fanxing-task-scheduling/src/main/java/com/viontech/fanxing/task/scheduling/runner/TaskRunner.java
View file @
3370b9b
package
com
.
viontech
.
fanxing
.
task
.
scheduling
.
runner
;
package
com
.
viontech
.
fanxing
.
task
.
scheduling
.
runner
;
import
com.viontech.fanxing.commons.constant.RedisKeys
;
import
com.viontech.fanxing.commons.constant.RedisKeys
;
import
com.viontech.fanxing.commons.model.Task
;
import
com.viontech.fanxing.task.scheduling.model.RuntimeConfig
;
import
com.viontech.fanxing.task.scheduling.model.RuntimeConfig
;
import
com.viontech.fanxing.task.scheduling.model.TaskData
;
import
com.viontech.fanxing.task.scheduling.model.TaskData
;
import
com.viontech.fanxing.task.scheduling.model.vaserver.VaServerInfo
;
import
com.viontech.fanxing.task.scheduling.model.vaserver.VaServerInfo
;
...
@@ -17,7 +18,6 @@ import org.springframework.scheduling.annotation.Scheduled;
...
@@ -17,7 +18,6 @@ import org.springframework.scheduling.annotation.Scheduled;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.Collection
;
import
java.util.Collection
;
import
java.util.Iterator
;
import
java.util.Iterator
;
import
java.util.concurrent.TimeUnit
;
import
java.util.concurrent.TimeUnit
;
...
@@ -64,9 +64,27 @@ public class TaskRunner {
...
@@ -64,9 +64,27 @@ public class TaskRunner {
return
;
return
;
}
else
{
}
else
{
TaskData
taskData
=
taskDataMap
.
get
(
taskUnid
);
TaskData
taskData
=
taskDataMap
.
get
(
taskUnid
);
Task
task
=
taskData
.
getTask
();
String
taskVaType
=
task
.
getVaType
();
Float
resourceNeed
=
task
.
getResourceNeed
();
Collection
<
VaServerInfo
>
vaServerInfos
=
vaServerMap
.
values
();
Collection
<
VaServerInfo
>
vaServerInfos
=
vaServerMap
.
values
();
// todo 获取可用的vaserver,执行任务下发动作,如果成功,关联taskData和vaServer,修改可用资源数,并且从zset中移除任务
// todo 暂时先找有可用资源的vaserver,以后再进行算法优化
vaServerService
.
executeTask
(
taskData
.
getTask
(),
"devId"
);
Iterator
<
VaServerInfo
>
iterator1
=
vaServerInfos
.
iterator
();
VaServerInfo
server
=
null
;
while
(
iterator1
.
hasNext
())
{
VaServerInfo
next1
=
iterator1
.
next
();
if
(
next1
.
getAvailableResources
()
>
resourceNeed
)
{
server
=
next1
;
break
;
}
}
if
(
server
==
null
)
{
// todo 没找到可用设备,需要修改任务的状态
continue
;
}
boolean
success
=
vaServerService
.
executeTask
(
task
,
server
);
// todo 获取可用的vaserver,执行任务下发动作,如果成功,关联taskData和vaServer,修改可用资源数,并且从zset中移除任务,修改任务状态
set
.
remove
(
taskUnid
);
set
.
remove
(
taskUnid
);
}
}
...
...
fanxing-task-scheduling/src/main/java/com/viontech/fanxing/task/scheduling/service/VAServerService.java
View file @
3370b9b
...
@@ -3,6 +3,7 @@ package com.viontech.fanxing.task.scheduling.service;
...
@@ -3,6 +3,7 @@ package com.viontech.fanxing.task.scheduling.service;
import
com.viontech.fanxing.commons.constant.RedisKeys
;
import
com.viontech.fanxing.commons.constant.RedisKeys
;
import
com.viontech.fanxing.commons.model.Task
;
import
com.viontech.fanxing.commons.model.Task
;
import
com.viontech.fanxing.task.scheduling.model.vaserver.VaServerInfo
;
import
com.viontech.fanxing.task.scheduling.model.vaserver.VaServerInfo
;
import
org.apache.commons.lang3.tuple.ImmutablePair
;
import
org.redisson.api.RBucket
;
import
org.redisson.api.RBucket
;
import
org.redisson.api.RMap
;
import
org.redisson.api.RMap
;
import
org.redisson.api.RedissonClient
;
import
org.redisson.api.RedissonClient
;
...
@@ -47,17 +48,26 @@ public class VAServerService {
...
@@ -47,17 +48,26 @@ public class VAServerService {
map
.
put
(
taskUnid
,
devId
);
map
.
put
(
taskUnid
,
devId
);
}
}
public
void
unlinkTaskAndVaServer
(
String
taskUnid
)
{
/**
* 解绑任务和设备的关联状态
*
* @return ImmutablePair<String, String>
* <li>left <code>taskUnid</code></li>
* <li>right <code>devId</code></li>
*/
public
ImmutablePair
<
String
,
String
>
unlinkTaskAndVaServer
(
String
taskUnid
)
{
RMap
<
String
,
String
>
map
=
redissonClient
.
getMap
(
RedisKeys
.
SCHEDULING_TASK_VASERVER_MAP
);
RMap
<
String
,
String
>
map
=
redissonClient
.
getMap
(
RedisKeys
.
SCHEDULING_TASK_VASERVER_MAP
);
String
devId
=
map
.
get
(
taskUnid
);
map
.
remove
(
taskUnid
);
map
.
remove
(
taskUnid
);
return
ImmutablePair
.
of
(
taskUnid
,
devId
);
}
}
/**
/**
* 下发任务
* 下发任务
*/
*/
public
boolean
executeTask
(
Task
task
,
String
devId
)
{
public
boolean
executeTask
(
Task
task
,
VaServerInfo
server
)
{
linkTaskAndVaServer
(
task
.
getUnid
(),
devId
);
linkTaskAndVaServer
(
task
.
getUnid
(),
server
.
getDevID
()
);
server
.
setAvailableResources
(
server
.
getAvailableResources
()
-
task
.
getResourceNeed
());
return
false
;
return
false
;
}
}
...
@@ -66,7 +76,13 @@ public class VAServerService {
...
@@ -66,7 +76,13 @@ public class VAServerService {
* 删除任务
* 删除任务
*/
*/
public
boolean
terminateTask
(
Task
task
)
{
public
boolean
terminateTask
(
Task
task
)
{
unlinkTaskAndVaServer
(
task
.
getUnid
());
ImmutablePair
<
String
,
String
>
unlinkResult
=
unlinkTaskAndVaServer
(
task
.
getUnid
());
String
devId
=
unlinkResult
.
right
;
RMap
<
String
,
VaServerInfo
>
vaServerMap
=
redissonClient
.
getMap
(
RedisKeys
.
SCHEDULING_VASERVER_MAP
);
VaServerInfo
vaServerInfo
=
vaServerMap
.
get
(
devId
);
vaServerInfo
.
setAvailableResources
(
vaServerInfo
.
getAvailableResources
()
+
task
.
getResourceNeed
());
vaServerMap
.
put
(
devId
,
vaServerInfo
);
return
false
;
return
false
;
}
}
...
...
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