Commit 4e429a9d by xmh

初版

1 parent d9f6a1f8
Showing 64 changed files with 5477 additions and 1555 deletions
......@@ -124,7 +124,7 @@
| decoration | VARCHAR(36) | | | 摆件 |
| sun_shield | VARCHAR(36) | | | 遮阳板 |
| xcycle_type | VARCHAR(36) | | | 非机动车类型 |
| event_id | VARCHAR(36) | | | |
| event_id | VARCHAR(64) | | | |
| shoot_time | TIMESTAMP | | | |
| special_type | VARCHAR(36) | | | |
| with_helmet | INT | | 0 | 是否戴头盔(0不带) |
......@@ -138,7 +138,7 @@
| ---------------- | ------------ | -------- | ------ | ---------- |
| id | BIGINT | 否 | | 自增主键ID |
| unid | VARCHAR(36) | 否 | uuid() | 唯一ID |
| event_id | VARCHAR(36) | 否 | | |
| event_id | VARCHAR(64) | 否 | | |
| task_id | BIGINT | | | |
| detection_type | VARCHAR(36) | | | |
| road_code | VARCHAR(36) | | | |
......@@ -191,14 +191,11 @@
| event_type | VARCHAR(36) | | | |
| event_refid | VARCHAR(36) | | | |
| event_time | TIMESTAMP | | | |
| aux_dev_info | TEXT | | | |
| event_data | TEXT | | | |
| pics | TEXT | | | |
| video | TEXT | | | |
| event_cate | VARCHAR(36) | | | |
| vchan_ref_id | VARCHAR(36) | | | |
| test_pic_file | VARCHAR(256) | | | |
| test_frame_no | VARCHAR(256) | | | |
| channel_unid | VARCHAR(36) | | | |
| task_name | VARCHAR(128) | | | |
| event_data_num | VARCHAR(36) | | | |
......@@ -253,6 +250,30 @@
| name | VARCHAR(36) | 否 | | cate名称 |
| note | VARCHAR(128) | | | 注释 |
### 运维服务模块
#### s_channel 视频通道表
| 字段名称 | 类型 | 可否为空 | 默认值 | 注释 |
| ------------ | ------------- | -------- | ------ | ------------------ |
| id | BIGINT | 否 | | 自增主键ID |
| unid | VARCHAR(36) | 否 | uuid() | 唯一ID |
| channel_unid | VARCHAR(36) | | | 原通道unid |
| device_unid | VARCHAR(36) | 否 | | 原设备unid |
| type | INT | | | 设备类型 |
| stream_type | INT | | | 设备流类型 |
| stream_path | VARCHAR(1024) | | | 视频流地址 |
| username | varchar(36) | | | 用户名 |
| password | varchar(64) | | | 密码 |
| address_unid | VARCHAR(36) | | | 设备挂载地址的unid |
| name | VARCHAR(128) | | | 设备名称 |
| ip | VARCHAR(36) | | | 设备ip |
| port | INT | | | 设备端口 |
| expand | VARCHAR(128) | | | 扩展字段 |
| longitude | FLOAT | | | 经度 |
| latitude | FLOAT | | | 纬度 |
| status | INT | | | 状态 |
## 接口
### 任务管理模块
......@@ -406,48 +427,9 @@
#### VAServer心跳接口
- **path**
- `/fanxing-task-scheduling/keepalive`
- **verb**
- `POST`
- **body**
```json
{
keepalive: "i am good"
}
```
#### VAServer运行状态推送
- **path**
- `/fanxing-task-scheduling/status`
- `/fanxing-task-scheduling/keepalive/{devId}`
- **verb**
- `POST`
- **body**
```json
{
tasks:
[
{
"progress": 0, //进度百分比
"status": "Running", //状态,Running Finished
"task_id": "0821fdac47b04b0d9f85ec4a2f9657eb" //任务id
},
{
"task_id": "0a263320bd274b529e5185e3b05aa157",
"status": "Running",
"progress": 0
}
],
resource:
{
"brief":
{
"video_total":10, //视频资源总数
"video_busy":10, //视频资源占用数
"video_free":0 //视频资源剩余数
}
}
}
```
- `GET`
### 转发服务
#### 任务分析结果接收接口
......@@ -575,25 +557,71 @@
### VAServer
#### 添加任务
- **path**
- `/api/vaserver/v1/task`
- **verb**
- `POST`
- **body**
```json
{
"task_unid": "abcd-xxxx-xxxxxx-xxxxxx", //任务id
"task_name": "任务名称",
"alg_type": "算法类型(交通,客流,违停等)",
"store_config": "存储配置",
"channel_unid": "视频通道unid",
"stream_path": "视频流地址",
"stream_type": 0, //视频流类型
"scene": "场景配置"
}
```
#### 编辑任务
- **path**
- `/api/vaserver/v1/task`
- **verb**
- `PUT`
- **body**
```json
{
"task_unid": "abcd-xxxx-xxxxxx-xxxxxx", //任务id
"task_name": "任务名称",
"alg_type": "算法类型(交通,客流,违停等)",
"store_config": "存储配置",
"channel_unid": "视频通道unid",
"stream_path": "视频流地址",
"stream_type": 0, //视频流类型
"scene": "场景配置"
}
```
#### 删除任务
- **path**
- `/api/vaserver/v1/task`
- **verb**
- `DELETE`
- **param**
- task_unid 任务unid
#### 获取算法/运行参数
#### 分析结果推送
#### 截图
- **path**
- `/api/vaserver/v1/snapshot`
- **verb**
- `GET`
- **param**
- task_unid 任务unid
#### 获取点播地址
- **path**
- `/api/vaserver/v1/get_analyze_stream`
- **verb**
- `POST`
- **body**
```json
{
"taskID": "task1111111" //任务id
"task_unid": "task1111111" //任务id
}
```
- **response**
```json
{
......@@ -605,7 +633,7 @@
#### 开始输出分析流
- **path**
- `/api/vaserver/v1/get_analyze_stream`
- `/api/vaserver/v1/start_analyze_stream`
- **verb**
- `POST`
- **body**
......@@ -613,17 +641,105 @@
//开始推送rtmp流
//此接口在点播期间30秒钟调用一次,如果超时,分析会关闭编码通道
{
"taskID": "task1111111", //任务id
"isDrawRect": 1, //是否画框
"mediaServerPushUrl": "rtmp://192.168.9.159:1200/task1111111" //流推送地址
"task_unid": "task1111111",//任务id
"isDrawRect": 1,//是否画框
"mediaServerPushUrl": "rtmp://192.168.9.159:1200/task1111111" //流推送地址
}
```
- **response**
```json
{
"code": 200,
"msg": "OK",
}
```
#### 切换场景/预置位
- **path**
- `/api/vaserver/v1/switch_scene`
- **verb**
- `POST`
- **body**
```json
{
"task_unid": "task1111111", // 任务id
"sceneID": "xxxxxxxxxx" // 切换至哪个场景
}
```
- **response**
```json
{
"code": 200,
"msg": "OK",
}
```
#### 任务轮询状态控制
- **path**
- `/api/vaserver/v1/alternate`
- **verb**
- `POST`
- **body**
```json
{
"task_unid": "task1111111",//任务id
"alternateStatus": "0" // 0-开启轮训 1-停止轮训
}
```
- **response**
```json
{
"code": 200,
"msg": "OK",
}
```
#### 任务轮询状态查询
- **path**
- `/api/vaserver/v1/alternate`
- **verb**
- `GET`
- **param**
- task_unid 任务id
- **response**
```json
{
"code": 400,
"msg": "task not found"
"code": 200,
"msg": "OK",
}
```
#### 运行状态查询
- **path**
- `/api/vaserver/v1/status`
- **verb**
- `GET`
- **response**
```json
{
{
"tasks": [
{
"progress": 0,
"status": "Running",
"task_unid": "0821fdac47b04b0d9f85ec4a2f9657eb"
},
{
"task_unid": "0a263320bd274b529e5185e3b05aa157",
"status": "Running",
"progress": 0
}
],
"resource": {
"brief": {
"video_total": 10,
"video_busy": 10,
"video_free": 0
}
}
}
}
```
......
......@@ -40,6 +40,15 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<excludes>
<exclude>application.yml</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
<resources>
<resource>
......@@ -48,12 +57,6 @@
<include>**/*.xml</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>*</include>
</includes>
</resource>
</resources>
</build>
</project>
\ No newline at end of file
......@@ -35,6 +35,10 @@
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<dependency>
......
package com.viontech.fanxing.commons.constant;
/**
* .
*
* @author 谢明辉
* @date 2021/7/20
*/
public enum TaskStatus {
/** 运行中 */
RUNNING(1),
/** 暂停 */
PAUSE(2),
/** 等待执行 */
AWAIT(0),
/** 资源不足 */
CAN_NOT_RUN(4);
public int val;
TaskStatus(int val) {
this.val = val;
}
}
......@@ -6,6 +6,8 @@ import java.util.Date;
public class Behavior extends BaseModel {
private Long id;
private Date eventTime;
private String unid;
private Long taskId;
......@@ -16,22 +18,14 @@ public class Behavior extends BaseModel {
private String eventRefid;
private Date eventTime;
private String pics;
private String channelUnid;
private String testPicFile;
private String testFrameNo;
private String taskName;
private String eventDataNum;
private String auxDevInfo;
private String eventData;
private String video;
......@@ -44,6 +38,14 @@ public class Behavior extends BaseModel {
this.id = id;
}
public Date getEventTime() {
return eventTime;
}
public void setEventTime(Date eventTime) {
this.eventTime = eventTime;
}
public String getUnid() {
return unid;
}
......@@ -84,14 +86,6 @@ public class Behavior extends BaseModel {
this.eventRefid = eventRefid == null ? null : eventRefid.trim();
}
public Date getEventTime() {
return eventTime;
}
public void setEventTime(Date eventTime) {
this.eventTime = eventTime;
}
public String getPics() {
return pics;
}
......@@ -108,22 +102,6 @@ public class Behavior extends BaseModel {
this.channelUnid = channelUnid == null ? null : channelUnid.trim();
}
public String getTestPicFile() {
return testPicFile;
}
public void setTestPicFile(String testPicFile) {
this.testPicFile = testPicFile == null ? null : testPicFile.trim();
}
public String getTestFrameNo() {
return testFrameNo;
}
public void setTestFrameNo(String testFrameNo) {
this.testFrameNo = testFrameNo == null ? null : testFrameNo.trim();
}
public String getTaskName() {
return taskName;
}
......@@ -140,14 +118,6 @@ public class Behavior extends BaseModel {
this.eventDataNum = eventDataNum == null ? null : eventDataNum.trim();
}
public String getAuxDevInfo() {
return auxDevInfo;
}
public void setAuxDevInfo(String auxDevInfo) {
this.auxDevInfo = auxDevInfo == null ? null : auxDevInfo.trim();
}
public String getEventData() {
return eventData;
}
......
......@@ -149,6 +149,66 @@ public class BehaviorExample extends BaseExample {
return (Criteria) this;
}
public Criteria andEventTimeIsNull() {
addCriterion("`behavior`.event_time is null");
return (Criteria) this;
}
public Criteria andEventTimeIsNotNull() {
addCriterion("`behavior`.event_time is not null");
return (Criteria) this;
}
public Criteria andEventTimeEqualTo(Date value) {
addCriterion("`behavior`.event_time =", value, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeNotEqualTo(Date value) {
addCriterion("`behavior`.event_time <>", value, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeGreaterThan(Date value) {
addCriterion("`behavior`.event_time >", value, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeGreaterThanOrEqualTo(Date value) {
addCriterion("`behavior`.event_time >=", value, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeLessThan(Date value) {
addCriterion("`behavior`.event_time <", value, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeLessThanOrEqualTo(Date value) {
addCriterion("`behavior`.event_time <=", value, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeIn(List<Date> values) {
addCriterion("`behavior`.event_time in", values, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeNotIn(List<Date> values) {
addCriterion("`behavior`.event_time not in", values, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeBetween(Date value1, Date value2) {
addCriterion("`behavior`.event_time between", value1, value2, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeNotBetween(Date value1, Date value2) {
addCriterion("`behavior`.event_time not between", value1, value2, "eventTime");
return (Criteria) this;
}
public Criteria andUnidIsNull() {
addCriterion("`behavior`.unid is null");
return (Criteria) this;
......@@ -489,66 +549,6 @@ public class BehaviorExample extends BaseExample {
return (Criteria) this;
}
public Criteria andEventTimeIsNull() {
addCriterion("`behavior`.event_time is null");
return (Criteria) this;
}
public Criteria andEventTimeIsNotNull() {
addCriterion("`behavior`.event_time is not null");
return (Criteria) this;
}
public Criteria andEventTimeEqualTo(Date value) {
addCriterion("`behavior`.event_time =", value, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeNotEqualTo(Date value) {
addCriterion("`behavior`.event_time <>", value, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeGreaterThan(Date value) {
addCriterion("`behavior`.event_time >", value, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeGreaterThanOrEqualTo(Date value) {
addCriterion("`behavior`.event_time >=", value, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeLessThan(Date value) {
addCriterion("`behavior`.event_time <", value, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeLessThanOrEqualTo(Date value) {
addCriterion("`behavior`.event_time <=", value, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeIn(List<Date> values) {
addCriterion("`behavior`.event_time in", values, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeNotIn(List<Date> values) {
addCriterion("`behavior`.event_time not in", values, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeBetween(Date value1, Date value2) {
addCriterion("`behavior`.event_time between", value1, value2, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeNotBetween(Date value1, Date value2) {
addCriterion("`behavior`.event_time not between", value1, value2, "eventTime");
return (Criteria) this;
}
public Criteria andPicsIsNull() {
addCriterion("`behavior`.pics is null");
return (Criteria) this;
......@@ -689,146 +689,6 @@ public class BehaviorExample extends BaseExample {
return (Criteria) this;
}
public Criteria andTestPicFileIsNull() {
addCriterion("`behavior`.test_pic_file is null");
return (Criteria) this;
}
public Criteria andTestPicFileIsNotNull() {
addCriterion("`behavior`.test_pic_file is not null");
return (Criteria) this;
}
public Criteria andTestPicFileEqualTo(String value) {
addCriterion("`behavior`.test_pic_file =", value, "testPicFile");
return (Criteria) this;
}
public Criteria andTestPicFileNotEqualTo(String value) {
addCriterion("`behavior`.test_pic_file <>", value, "testPicFile");
return (Criteria) this;
}
public Criteria andTestPicFileGreaterThan(String value) {
addCriterion("`behavior`.test_pic_file >", value, "testPicFile");
return (Criteria) this;
}
public Criteria andTestPicFileGreaterThanOrEqualTo(String value) {
addCriterion("`behavior`.test_pic_file >=", value, "testPicFile");
return (Criteria) this;
}
public Criteria andTestPicFileLessThan(String value) {
addCriterion("`behavior`.test_pic_file <", value, "testPicFile");
return (Criteria) this;
}
public Criteria andTestPicFileLessThanOrEqualTo(String value) {
addCriterion("`behavior`.test_pic_file <=", value, "testPicFile");
return (Criteria) this;
}
public Criteria andTestPicFileLike(String value) {
addCriterion("`behavior`.test_pic_file like", value, "testPicFile");
return (Criteria) this;
}
public Criteria andTestPicFileNotLike(String value) {
addCriterion("`behavior`.test_pic_file not like", value, "testPicFile");
return (Criteria) this;
}
public Criteria andTestPicFileIn(List<String> values) {
addCriterion("`behavior`.test_pic_file in", values, "testPicFile");
return (Criteria) this;
}
public Criteria andTestPicFileNotIn(List<String> values) {
addCriterion("`behavior`.test_pic_file not in", values, "testPicFile");
return (Criteria) this;
}
public Criteria andTestPicFileBetween(String value1, String value2) {
addCriterion("`behavior`.test_pic_file between", value1, value2, "testPicFile");
return (Criteria) this;
}
public Criteria andTestPicFileNotBetween(String value1, String value2) {
addCriterion("`behavior`.test_pic_file not between", value1, value2, "testPicFile");
return (Criteria) this;
}
public Criteria andTestFrameNoIsNull() {
addCriterion("`behavior`.test_frame_no is null");
return (Criteria) this;
}
public Criteria andTestFrameNoIsNotNull() {
addCriterion("`behavior`.test_frame_no is not null");
return (Criteria) this;
}
public Criteria andTestFrameNoEqualTo(String value) {
addCriterion("`behavior`.test_frame_no =", value, "testFrameNo");
return (Criteria) this;
}
public Criteria andTestFrameNoNotEqualTo(String value) {
addCriterion("`behavior`.test_frame_no <>", value, "testFrameNo");
return (Criteria) this;
}
public Criteria andTestFrameNoGreaterThan(String value) {
addCriterion("`behavior`.test_frame_no >", value, "testFrameNo");
return (Criteria) this;
}
public Criteria andTestFrameNoGreaterThanOrEqualTo(String value) {
addCriterion("`behavior`.test_frame_no >=", value, "testFrameNo");
return (Criteria) this;
}
public Criteria andTestFrameNoLessThan(String value) {
addCriterion("`behavior`.test_frame_no <", value, "testFrameNo");
return (Criteria) this;
}
public Criteria andTestFrameNoLessThanOrEqualTo(String value) {
addCriterion("`behavior`.test_frame_no <=", value, "testFrameNo");
return (Criteria) this;
}
public Criteria andTestFrameNoLike(String value) {
addCriterion("`behavior`.test_frame_no like", value, "testFrameNo");
return (Criteria) this;
}
public Criteria andTestFrameNoNotLike(String value) {
addCriterion("`behavior`.test_frame_no not like", value, "testFrameNo");
return (Criteria) this;
}
public Criteria andTestFrameNoIn(List<String> values) {
addCriterion("`behavior`.test_frame_no in", values, "testFrameNo");
return (Criteria) this;
}
public Criteria andTestFrameNoNotIn(List<String> values) {
addCriterion("`behavior`.test_frame_no not in", values, "testFrameNo");
return (Criteria) this;
}
public Criteria andTestFrameNoBetween(String value1, String value2) {
addCriterion("`behavior`.test_frame_no between", value1, value2, "testFrameNo");
return (Criteria) this;
}
public Criteria andTestFrameNoNotBetween(String value1, String value2) {
addCriterion("`behavior`.test_frame_no not between", value1, value2, "testFrameNo");
return (Criteria) this;
}
public Criteria andTaskNameIsNull() {
addCriterion("`behavior`.task_name is null");
return (Criteria) this;
......@@ -981,6 +841,11 @@ public class BehaviorExample extends BaseExample {
return (ColumnContainer) this;
}
public ColumnContainer hasEventTimeColumn() {
addColumnStr("`behavior`.event_time as behavior_event_time ");
return (ColumnContainer) this;
}
public ColumnContainer hasUnidColumn() {
addColumnStr("`behavior`.unid as behavior_unid ");
return (ColumnContainer) this;
......@@ -1006,11 +871,6 @@ public class BehaviorExample extends BaseExample {
return (ColumnContainer) this;
}
public ColumnContainer hasEventTimeColumn() {
addColumnStr("`behavior`.event_time as behavior_event_time ");
return (ColumnContainer) this;
}
public ColumnContainer hasPicsColumn() {
addColumnStr("`behavior`.pics as behavior_pics ");
return (ColumnContainer) this;
......@@ -1021,16 +881,6 @@ public class BehaviorExample extends BaseExample {
return (ColumnContainer) this;
}
public ColumnContainer hasTestPicFileColumn() {
addColumnStr("`behavior`.test_pic_file as behavior_test_pic_file ");
return (ColumnContainer) this;
}
public ColumnContainer hasTestFrameNoColumn() {
addColumnStr("`behavior`.test_frame_no as behavior_test_frame_no ");
return (ColumnContainer) this;
}
public ColumnContainer hasTaskNameColumn() {
addColumnStr("`behavior`.task_name as behavior_task_name ");
return (ColumnContainer) this;
......
package com.viontech.fanxing.commons.model;
import com.viontech.fanxing.commons.base.BaseModel;
public class Channel extends BaseModel {
private Long id;
private String unid;
private String channelUnid;
private String deviceUnid;
private Integer type;
private Integer streamType;
private String streamPath;
private String username;
private String password;
private String addressUnid;
private String name;
private String ip;
private Integer port;
private String expand;
private Float longitude;
private Float latitude;
private Integer status;
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 String getChannelUnid() {
return channelUnid;
}
public void setChannelUnid(String channelUnid) {
this.channelUnid = channelUnid == null ? null : channelUnid.trim();
}
public String getDeviceUnid() {
return deviceUnid;
}
public void setDeviceUnid(String deviceUnid) {
this.deviceUnid = deviceUnid == null ? null : deviceUnid.trim();
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
public Integer getStreamType() {
return streamType;
}
public void setStreamType(Integer streamType) {
this.streamType = streamType;
}
public String getStreamPath() {
return streamPath;
}
public void setStreamPath(String streamPath) {
this.streamPath = streamPath == null ? null : streamPath.trim();
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username == null ? null : username.trim();
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password == null ? null : password.trim();
}
public String getAddressUnid() {
return addressUnid;
}
public void setAddressUnid(String addressUnid) {
this.addressUnid = addressUnid == null ? null : addressUnid.trim();
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name == null ? null : name.trim();
}
public String getIp() {
return ip;
}
public void setIp(String ip) {
this.ip = ip == null ? null : ip.trim();
}
public Integer getPort() {
return port;
}
public void setPort(Integer port) {
this.port = port;
}
public String getExpand() {
return expand;
}
public void setExpand(String expand) {
this.expand = expand == null ? null : expand.trim();
}
public Float getLongitude() {
return longitude;
}
public void setLongitude(Float longitude) {
this.longitude = longitude;
}
public Float getLatitude() {
return latitude;
}
public void setLatitude(Float latitude) {
this.latitude = latitude;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
}
\ No newline at end of file
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 ChannelExample extends BaseExample {
public ChannelExample() {
super();
tableName = "s_channel";
tableAlias = "channel";
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 = "s_channel";
}
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("`channel`.id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("`channel`.id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("`channel`.id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("`channel`.id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("`channel`.id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("`channel`.id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("`channel`.id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("`channel`.id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("`channel`.id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("`channel`.id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("`channel`.id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("`channel`.id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andUnidIsNull() {
addCriterion("`channel`.unid is null");
return (Criteria) this;
}
public Criteria andUnidIsNotNull() {
addCriterion("`channel`.unid is not null");
return (Criteria) this;
}
public Criteria andUnidEqualTo(String value) {
addCriterion("`channel`.unid =", value, "unid");
return (Criteria) this;
}
public Criteria andUnidNotEqualTo(String value) {
addCriterion("`channel`.unid <>", value, "unid");
return (Criteria) this;
}
public Criteria andUnidGreaterThan(String value) {
addCriterion("`channel`.unid >", value, "unid");
return (Criteria) this;
}
public Criteria andUnidGreaterThanOrEqualTo(String value) {
addCriterion("`channel`.unid >=", value, "unid");
return (Criteria) this;
}
public Criteria andUnidLessThan(String value) {
addCriterion("`channel`.unid <", value, "unid");
return (Criteria) this;
}
public Criteria andUnidLessThanOrEqualTo(String value) {
addCriterion("`channel`.unid <=", value, "unid");
return (Criteria) this;
}
public Criteria andUnidLike(String value) {
addCriterion("`channel`.unid like", value, "unid");
return (Criteria) this;
}
public Criteria andUnidNotLike(String value) {
addCriterion("`channel`.unid not like", value, "unid");
return (Criteria) this;
}
public Criteria andUnidIn(List<String> values) {
addCriterion("`channel`.unid in", values, "unid");
return (Criteria) this;
}
public Criteria andUnidNotIn(List<String> values) {
addCriterion("`channel`.unid not in", values, "unid");
return (Criteria) this;
}
public Criteria andUnidBetween(String value1, String value2) {
addCriterion("`channel`.unid between", value1, value2, "unid");
return (Criteria) this;
}
public Criteria andUnidNotBetween(String value1, String value2) {
addCriterion("`channel`.unid not between", value1, value2, "unid");
return (Criteria) this;
}
public Criteria andChannelUnidIsNull() {
addCriterion("`channel`.channel_unid is null");
return (Criteria) this;
}
public Criteria andChannelUnidIsNotNull() {
addCriterion("`channel`.channel_unid is not null");
return (Criteria) this;
}
public Criteria andChannelUnidEqualTo(String value) {
addCriterion("`channel`.channel_unid =", value, "channelUnid");
return (Criteria) this;
}
public Criteria andChannelUnidNotEqualTo(String value) {
addCriterion("`channel`.channel_unid <>", value, "channelUnid");
return (Criteria) this;
}
public Criteria andChannelUnidGreaterThan(String value) {
addCriterion("`channel`.channel_unid >", value, "channelUnid");
return (Criteria) this;
}
public Criteria andChannelUnidGreaterThanOrEqualTo(String value) {
addCriterion("`channel`.channel_unid >=", value, "channelUnid");
return (Criteria) this;
}
public Criteria andChannelUnidLessThan(String value) {
addCriterion("`channel`.channel_unid <", value, "channelUnid");
return (Criteria) this;
}
public Criteria andChannelUnidLessThanOrEqualTo(String value) {
addCriterion("`channel`.channel_unid <=", value, "channelUnid");
return (Criteria) this;
}
public Criteria andChannelUnidLike(String value) {
addCriterion("`channel`.channel_unid like", value, "channelUnid");
return (Criteria) this;
}
public Criteria andChannelUnidNotLike(String value) {
addCriterion("`channel`.channel_unid not like", value, "channelUnid");
return (Criteria) this;
}
public Criteria andChannelUnidIn(List<String> values) {
addCriterion("`channel`.channel_unid in", values, "channelUnid");
return (Criteria) this;
}
public Criteria andChannelUnidNotIn(List<String> values) {
addCriterion("`channel`.channel_unid not in", values, "channelUnid");
return (Criteria) this;
}
public Criteria andChannelUnidBetween(String value1, String value2) {
addCriterion("`channel`.channel_unid between", value1, value2, "channelUnid");
return (Criteria) this;
}
public Criteria andChannelUnidNotBetween(String value1, String value2) {
addCriterion("`channel`.channel_unid not between", value1, value2, "channelUnid");
return (Criteria) this;
}
public Criteria andDeviceUnidIsNull() {
addCriterion("`channel`.device_unid is null");
return (Criteria) this;
}
public Criteria andDeviceUnidIsNotNull() {
addCriterion("`channel`.device_unid is not null");
return (Criteria) this;
}
public Criteria andDeviceUnidEqualTo(String value) {
addCriterion("`channel`.device_unid =", value, "deviceUnid");
return (Criteria) this;
}
public Criteria andDeviceUnidNotEqualTo(String value) {
addCriterion("`channel`.device_unid <>", value, "deviceUnid");
return (Criteria) this;
}
public Criteria andDeviceUnidGreaterThan(String value) {
addCriterion("`channel`.device_unid >", value, "deviceUnid");
return (Criteria) this;
}
public Criteria andDeviceUnidGreaterThanOrEqualTo(String value) {
addCriterion("`channel`.device_unid >=", value, "deviceUnid");
return (Criteria) this;
}
public Criteria andDeviceUnidLessThan(String value) {
addCriterion("`channel`.device_unid <", value, "deviceUnid");
return (Criteria) this;
}
public Criteria andDeviceUnidLessThanOrEqualTo(String value) {
addCriterion("`channel`.device_unid <=", value, "deviceUnid");
return (Criteria) this;
}
public Criteria andDeviceUnidLike(String value) {
addCriterion("`channel`.device_unid like", value, "deviceUnid");
return (Criteria) this;
}
public Criteria andDeviceUnidNotLike(String value) {
addCriterion("`channel`.device_unid not like", value, "deviceUnid");
return (Criteria) this;
}
public Criteria andDeviceUnidIn(List<String> values) {
addCriterion("`channel`.device_unid in", values, "deviceUnid");
return (Criteria) this;
}
public Criteria andDeviceUnidNotIn(List<String> values) {
addCriterion("`channel`.device_unid not in", values, "deviceUnid");
return (Criteria) this;
}
public Criteria andDeviceUnidBetween(String value1, String value2) {
addCriterion("`channel`.device_unid between", value1, value2, "deviceUnid");
return (Criteria) this;
}
public Criteria andDeviceUnidNotBetween(String value1, String value2) {
addCriterion("`channel`.device_unid not between", value1, value2, "deviceUnid");
return (Criteria) this;
}
public Criteria andTypeIsNull() {
addCriterion("`channel`.`type` is null");
return (Criteria) this;
}
public Criteria andTypeIsNotNull() {
addCriterion("`channel`.`type` is not null");
return (Criteria) this;
}
public Criteria andTypeEqualTo(Integer value) {
addCriterion("`channel`.`type` =", value, "type");
return (Criteria) this;
}
public Criteria andTypeNotEqualTo(Integer value) {
addCriterion("`channel`.`type` <>", value, "type");
return (Criteria) this;
}
public Criteria andTypeGreaterThan(Integer value) {
addCriterion("`channel`.`type` >", value, "type");
return (Criteria) this;
}
public Criteria andTypeGreaterThanOrEqualTo(Integer value) {
addCriterion("`channel`.`type` >=", value, "type");
return (Criteria) this;
}
public Criteria andTypeLessThan(Integer value) {
addCriterion("`channel`.`type` <", value, "type");
return (Criteria) this;
}
public Criteria andTypeLessThanOrEqualTo(Integer value) {
addCriterion("`channel`.`type` <=", value, "type");
return (Criteria) this;
}
public Criteria andTypeIn(List<Integer> values) {
addCriterion("`channel`.`type` in", values, "type");
return (Criteria) this;
}
public Criteria andTypeNotIn(List<Integer> values) {
addCriterion("`channel`.`type` not in", values, "type");
return (Criteria) this;
}
public Criteria andTypeBetween(Integer value1, Integer value2) {
addCriterion("`channel`.`type` between", value1, value2, "type");
return (Criteria) this;
}
public Criteria andTypeNotBetween(Integer value1, Integer value2) {
addCriterion("`channel`.`type` not between", value1, value2, "type");
return (Criteria) this;
}
public Criteria andStreamTypeIsNull() {
addCriterion("`channel`.stream_type is null");
return (Criteria) this;
}
public Criteria andStreamTypeIsNotNull() {
addCriterion("`channel`.stream_type is not null");
return (Criteria) this;
}
public Criteria andStreamTypeEqualTo(Integer value) {
addCriterion("`channel`.stream_type =", value, "streamType");
return (Criteria) this;
}
public Criteria andStreamTypeNotEqualTo(Integer value) {
addCriterion("`channel`.stream_type <>", value, "streamType");
return (Criteria) this;
}
public Criteria andStreamTypeGreaterThan(Integer value) {
addCriterion("`channel`.stream_type >", value, "streamType");
return (Criteria) this;
}
public Criteria andStreamTypeGreaterThanOrEqualTo(Integer value) {
addCriterion("`channel`.stream_type >=", value, "streamType");
return (Criteria) this;
}
public Criteria andStreamTypeLessThan(Integer value) {
addCriterion("`channel`.stream_type <", value, "streamType");
return (Criteria) this;
}
public Criteria andStreamTypeLessThanOrEqualTo(Integer value) {
addCriterion("`channel`.stream_type <=", value, "streamType");
return (Criteria) this;
}
public Criteria andStreamTypeIn(List<Integer> values) {
addCriterion("`channel`.stream_type in", values, "streamType");
return (Criteria) this;
}
public Criteria andStreamTypeNotIn(List<Integer> values) {
addCriterion("`channel`.stream_type not in", values, "streamType");
return (Criteria) this;
}
public Criteria andStreamTypeBetween(Integer value1, Integer value2) {
addCriterion("`channel`.stream_type between", value1, value2, "streamType");
return (Criteria) this;
}
public Criteria andStreamTypeNotBetween(Integer value1, Integer value2) {
addCriterion("`channel`.stream_type not between", value1, value2, "streamType");
return (Criteria) this;
}
public Criteria andStreamPathIsNull() {
addCriterion("`channel`.stream_path is null");
return (Criteria) this;
}
public Criteria andStreamPathIsNotNull() {
addCriterion("`channel`.stream_path is not null");
return (Criteria) this;
}
public Criteria andStreamPathEqualTo(String value) {
addCriterion("`channel`.stream_path =", value, "streamPath");
return (Criteria) this;
}
public Criteria andStreamPathNotEqualTo(String value) {
addCriterion("`channel`.stream_path <>", value, "streamPath");
return (Criteria) this;
}
public Criteria andStreamPathGreaterThan(String value) {
addCriterion("`channel`.stream_path >", value, "streamPath");
return (Criteria) this;
}
public Criteria andStreamPathGreaterThanOrEqualTo(String value) {
addCriterion("`channel`.stream_path >=", value, "streamPath");
return (Criteria) this;
}
public Criteria andStreamPathLessThan(String value) {
addCriterion("`channel`.stream_path <", value, "streamPath");
return (Criteria) this;
}
public Criteria andStreamPathLessThanOrEqualTo(String value) {
addCriterion("`channel`.stream_path <=", value, "streamPath");
return (Criteria) this;
}
public Criteria andStreamPathLike(String value) {
addCriterion("`channel`.stream_path like", value, "streamPath");
return (Criteria) this;
}
public Criteria andStreamPathNotLike(String value) {
addCriterion("`channel`.stream_path not like", value, "streamPath");
return (Criteria) this;
}
public Criteria andStreamPathIn(List<String> values) {
addCriterion("`channel`.stream_path in", values, "streamPath");
return (Criteria) this;
}
public Criteria andStreamPathNotIn(List<String> values) {
addCriterion("`channel`.stream_path not in", values, "streamPath");
return (Criteria) this;
}
public Criteria andStreamPathBetween(String value1, String value2) {
addCriterion("`channel`.stream_path between", value1, value2, "streamPath");
return (Criteria) this;
}
public Criteria andStreamPathNotBetween(String value1, String value2) {
addCriterion("`channel`.stream_path not between", value1, value2, "streamPath");
return (Criteria) this;
}
public Criteria andUsernameIsNull() {
addCriterion("`channel`.username is null");
return (Criteria) this;
}
public Criteria andUsernameIsNotNull() {
addCriterion("`channel`.username is not null");
return (Criteria) this;
}
public Criteria andUsernameEqualTo(String value) {
addCriterion("`channel`.username =", value, "username");
return (Criteria) this;
}
public Criteria andUsernameNotEqualTo(String value) {
addCriterion("`channel`.username <>", value, "username");
return (Criteria) this;
}
public Criteria andUsernameGreaterThan(String value) {
addCriterion("`channel`.username >", value, "username");
return (Criteria) this;
}
public Criteria andUsernameGreaterThanOrEqualTo(String value) {
addCriterion("`channel`.username >=", value, "username");
return (Criteria) this;
}
public Criteria andUsernameLessThan(String value) {
addCriterion("`channel`.username <", value, "username");
return (Criteria) this;
}
public Criteria andUsernameLessThanOrEqualTo(String value) {
addCriterion("`channel`.username <=", value, "username");
return (Criteria) this;
}
public Criteria andUsernameLike(String value) {
addCriterion("`channel`.username like", value, "username");
return (Criteria) this;
}
public Criteria andUsernameNotLike(String value) {
addCriterion("`channel`.username not like", value, "username");
return (Criteria) this;
}
public Criteria andUsernameIn(List<String> values) {
addCriterion("`channel`.username in", values, "username");
return (Criteria) this;
}
public Criteria andUsernameNotIn(List<String> values) {
addCriterion("`channel`.username not in", values, "username");
return (Criteria) this;
}
public Criteria andUsernameBetween(String value1, String value2) {
addCriterion("`channel`.username between", value1, value2, "username");
return (Criteria) this;
}
public Criteria andUsernameNotBetween(String value1, String value2) {
addCriterion("`channel`.username not between", value1, value2, "username");
return (Criteria) this;
}
public Criteria andPasswordIsNull() {
addCriterion("`channel`.`password` is null");
return (Criteria) this;
}
public Criteria andPasswordIsNotNull() {
addCriterion("`channel`.`password` is not null");
return (Criteria) this;
}
public Criteria andPasswordEqualTo(String value) {
addCriterion("`channel`.`password` =", value, "password");
return (Criteria) this;
}
public Criteria andPasswordNotEqualTo(String value) {
addCriterion("`channel`.`password` <>", value, "password");
return (Criteria) this;
}
public Criteria andPasswordGreaterThan(String value) {
addCriterion("`channel`.`password` >", value, "password");
return (Criteria) this;
}
public Criteria andPasswordGreaterThanOrEqualTo(String value) {
addCriterion("`channel`.`password` >=", value, "password");
return (Criteria) this;
}
public Criteria andPasswordLessThan(String value) {
addCriterion("`channel`.`password` <", value, "password");
return (Criteria) this;
}
public Criteria andPasswordLessThanOrEqualTo(String value) {
addCriterion("`channel`.`password` <=", value, "password");
return (Criteria) this;
}
public Criteria andPasswordLike(String value) {
addCriterion("`channel`.`password` like", value, "password");
return (Criteria) this;
}
public Criteria andPasswordNotLike(String value) {
addCriterion("`channel`.`password` not like", value, "password");
return (Criteria) this;
}
public Criteria andPasswordIn(List<String> values) {
addCriterion("`channel`.`password` in", values, "password");
return (Criteria) this;
}
public Criteria andPasswordNotIn(List<String> values) {
addCriterion("`channel`.`password` not in", values, "password");
return (Criteria) this;
}
public Criteria andPasswordBetween(String value1, String value2) {
addCriterion("`channel`.`password` between", value1, value2, "password");
return (Criteria) this;
}
public Criteria andPasswordNotBetween(String value1, String value2) {
addCriterion("`channel`.`password` not between", value1, value2, "password");
return (Criteria) this;
}
public Criteria andAddressUnidIsNull() {
addCriterion("`channel`.address_unid is null");
return (Criteria) this;
}
public Criteria andAddressUnidIsNotNull() {
addCriterion("`channel`.address_unid is not null");
return (Criteria) this;
}
public Criteria andAddressUnidEqualTo(String value) {
addCriterion("`channel`.address_unid =", value, "addressUnid");
return (Criteria) this;
}
public Criteria andAddressUnidNotEqualTo(String value) {
addCriterion("`channel`.address_unid <>", value, "addressUnid");
return (Criteria) this;
}
public Criteria andAddressUnidGreaterThan(String value) {
addCriterion("`channel`.address_unid >", value, "addressUnid");
return (Criteria) this;
}
public Criteria andAddressUnidGreaterThanOrEqualTo(String value) {
addCriterion("`channel`.address_unid >=", value, "addressUnid");
return (Criteria) this;
}
public Criteria andAddressUnidLessThan(String value) {
addCriterion("`channel`.address_unid <", value, "addressUnid");
return (Criteria) this;
}
public Criteria andAddressUnidLessThanOrEqualTo(String value) {
addCriterion("`channel`.address_unid <=", value, "addressUnid");
return (Criteria) this;
}
public Criteria andAddressUnidLike(String value) {
addCriterion("`channel`.address_unid like", value, "addressUnid");
return (Criteria) this;
}
public Criteria andAddressUnidNotLike(String value) {
addCriterion("`channel`.address_unid not like", value, "addressUnid");
return (Criteria) this;
}
public Criteria andAddressUnidIn(List<String> values) {
addCriterion("`channel`.address_unid in", values, "addressUnid");
return (Criteria) this;
}
public Criteria andAddressUnidNotIn(List<String> values) {
addCriterion("`channel`.address_unid not in", values, "addressUnid");
return (Criteria) this;
}
public Criteria andAddressUnidBetween(String value1, String value2) {
addCriterion("`channel`.address_unid between", value1, value2, "addressUnid");
return (Criteria) this;
}
public Criteria andAddressUnidNotBetween(String value1, String value2) {
addCriterion("`channel`.address_unid not between", value1, value2, "addressUnid");
return (Criteria) this;
}
public Criteria andNameIsNull() {
addCriterion("`channel`.`name` is null");
return (Criteria) this;
}
public Criteria andNameIsNotNull() {
addCriterion("`channel`.`name` is not null");
return (Criteria) this;
}
public Criteria andNameEqualTo(String value) {
addCriterion("`channel`.`name` =", value, "name");
return (Criteria) this;
}
public Criteria andNameNotEqualTo(String value) {
addCriterion("`channel`.`name` <>", value, "name");
return (Criteria) this;
}
public Criteria andNameGreaterThan(String value) {
addCriterion("`channel`.`name` >", value, "name");
return (Criteria) this;
}
public Criteria andNameGreaterThanOrEqualTo(String value) {
addCriterion("`channel`.`name` >=", value, "name");
return (Criteria) this;
}
public Criteria andNameLessThan(String value) {
addCriterion("`channel`.`name` <", value, "name");
return (Criteria) this;
}
public Criteria andNameLessThanOrEqualTo(String value) {
addCriterion("`channel`.`name` <=", value, "name");
return (Criteria) this;
}
public Criteria andNameLike(String value) {
addCriterion("`channel`.`name` like", value, "name");
return (Criteria) this;
}
public Criteria andNameNotLike(String value) {
addCriterion("`channel`.`name` not like", value, "name");
return (Criteria) this;
}
public Criteria andNameIn(List<String> values) {
addCriterion("`channel`.`name` in", values, "name");
return (Criteria) this;
}
public Criteria andNameNotIn(List<String> values) {
addCriterion("`channel`.`name` not in", values, "name");
return (Criteria) this;
}
public Criteria andNameBetween(String value1, String value2) {
addCriterion("`channel`.`name` between", value1, value2, "name");
return (Criteria) this;
}
public Criteria andNameNotBetween(String value1, String value2) {
addCriterion("`channel`.`name` not between", value1, value2, "name");
return (Criteria) this;
}
public Criteria andIpIsNull() {
addCriterion("`channel`.ip is null");
return (Criteria) this;
}
public Criteria andIpIsNotNull() {
addCriterion("`channel`.ip is not null");
return (Criteria) this;
}
public Criteria andIpEqualTo(String value) {
addCriterion("`channel`.ip =", value, "ip");
return (Criteria) this;
}
public Criteria andIpNotEqualTo(String value) {
addCriterion("`channel`.ip <>", value, "ip");
return (Criteria) this;
}
public Criteria andIpGreaterThan(String value) {
addCriterion("`channel`.ip >", value, "ip");
return (Criteria) this;
}
public Criteria andIpGreaterThanOrEqualTo(String value) {
addCriterion("`channel`.ip >=", value, "ip");
return (Criteria) this;
}
public Criteria andIpLessThan(String value) {
addCriterion("`channel`.ip <", value, "ip");
return (Criteria) this;
}
public Criteria andIpLessThanOrEqualTo(String value) {
addCriterion("`channel`.ip <=", value, "ip");
return (Criteria) this;
}
public Criteria andIpLike(String value) {
addCriterion("`channel`.ip like", value, "ip");
return (Criteria) this;
}
public Criteria andIpNotLike(String value) {
addCriterion("`channel`.ip not like", value, "ip");
return (Criteria) this;
}
public Criteria andIpIn(List<String> values) {
addCriterion("`channel`.ip in", values, "ip");
return (Criteria) this;
}
public Criteria andIpNotIn(List<String> values) {
addCriterion("`channel`.ip not in", values, "ip");
return (Criteria) this;
}
public Criteria andIpBetween(String value1, String value2) {
addCriterion("`channel`.ip between", value1, value2, "ip");
return (Criteria) this;
}
public Criteria andIpNotBetween(String value1, String value2) {
addCriterion("`channel`.ip not between", value1, value2, "ip");
return (Criteria) this;
}
public Criteria andPortIsNull() {
addCriterion("`channel`.port is null");
return (Criteria) this;
}
public Criteria andPortIsNotNull() {
addCriterion("`channel`.port is not null");
return (Criteria) this;
}
public Criteria andPortEqualTo(Integer value) {
addCriterion("`channel`.port =", value, "port");
return (Criteria) this;
}
public Criteria andPortNotEqualTo(Integer value) {
addCriterion("`channel`.port <>", value, "port");
return (Criteria) this;
}
public Criteria andPortGreaterThan(Integer value) {
addCriterion("`channel`.port >", value, "port");
return (Criteria) this;
}
public Criteria andPortGreaterThanOrEqualTo(Integer value) {
addCriterion("`channel`.port >=", value, "port");
return (Criteria) this;
}
public Criteria andPortLessThan(Integer value) {
addCriterion("`channel`.port <", value, "port");
return (Criteria) this;
}
public Criteria andPortLessThanOrEqualTo(Integer value) {
addCriterion("`channel`.port <=", value, "port");
return (Criteria) this;
}
public Criteria andPortIn(List<Integer> values) {
addCriterion("`channel`.port in", values, "port");
return (Criteria) this;
}
public Criteria andPortNotIn(List<Integer> values) {
addCriterion("`channel`.port not in", values, "port");
return (Criteria) this;
}
public Criteria andPortBetween(Integer value1, Integer value2) {
addCriterion("`channel`.port between", value1, value2, "port");
return (Criteria) this;
}
public Criteria andPortNotBetween(Integer value1, Integer value2) {
addCriterion("`channel`.port not between", value1, value2, "port");
return (Criteria) this;
}
public Criteria andExpandIsNull() {
addCriterion("`channel`.expand is null");
return (Criteria) this;
}
public Criteria andExpandIsNotNull() {
addCriterion("`channel`.expand is not null");
return (Criteria) this;
}
public Criteria andExpandEqualTo(String value) {
addCriterion("`channel`.expand =", value, "expand");
return (Criteria) this;
}
public Criteria andExpandNotEqualTo(String value) {
addCriterion("`channel`.expand <>", value, "expand");
return (Criteria) this;
}
public Criteria andExpandGreaterThan(String value) {
addCriterion("`channel`.expand >", value, "expand");
return (Criteria) this;
}
public Criteria andExpandGreaterThanOrEqualTo(String value) {
addCriterion("`channel`.expand >=", value, "expand");
return (Criteria) this;
}
public Criteria andExpandLessThan(String value) {
addCriterion("`channel`.expand <", value, "expand");
return (Criteria) this;
}
public Criteria andExpandLessThanOrEqualTo(String value) {
addCriterion("`channel`.expand <=", value, "expand");
return (Criteria) this;
}
public Criteria andExpandLike(String value) {
addCriterion("`channel`.expand like", value, "expand");
return (Criteria) this;
}
public Criteria andExpandNotLike(String value) {
addCriterion("`channel`.expand not like", value, "expand");
return (Criteria) this;
}
public Criteria andExpandIn(List<String> values) {
addCriterion("`channel`.expand in", values, "expand");
return (Criteria) this;
}
public Criteria andExpandNotIn(List<String> values) {
addCriterion("`channel`.expand not in", values, "expand");
return (Criteria) this;
}
public Criteria andExpandBetween(String value1, String value2) {
addCriterion("`channel`.expand between", value1, value2, "expand");
return (Criteria) this;
}
public Criteria andExpandNotBetween(String value1, String value2) {
addCriterion("`channel`.expand not between", value1, value2, "expand");
return (Criteria) this;
}
public Criteria andLongitudeIsNull() {
addCriterion("`channel`.longitude is null");
return (Criteria) this;
}
public Criteria andLongitudeIsNotNull() {
addCriterion("`channel`.longitude is not null");
return (Criteria) this;
}
public Criteria andLongitudeEqualTo(Float value) {
addCriterion("`channel`.longitude =", value, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeNotEqualTo(Float value) {
addCriterion("`channel`.longitude <>", value, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeGreaterThan(Float value) {
addCriterion("`channel`.longitude >", value, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeGreaterThanOrEqualTo(Float value) {
addCriterion("`channel`.longitude >=", value, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeLessThan(Float value) {
addCriterion("`channel`.longitude <", value, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeLessThanOrEqualTo(Float value) {
addCriterion("`channel`.longitude <=", value, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeIn(List<Float> values) {
addCriterion("`channel`.longitude in", values, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeNotIn(List<Float> values) {
addCriterion("`channel`.longitude not in", values, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeBetween(Float value1, Float value2) {
addCriterion("`channel`.longitude between", value1, value2, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeNotBetween(Float value1, Float value2) {
addCriterion("`channel`.longitude not between", value1, value2, "longitude");
return (Criteria) this;
}
public Criteria andLatitudeIsNull() {
addCriterion("`channel`.latitude is null");
return (Criteria) this;
}
public Criteria andLatitudeIsNotNull() {
addCriterion("`channel`.latitude is not null");
return (Criteria) this;
}
public Criteria andLatitudeEqualTo(Float value) {
addCriterion("`channel`.latitude =", value, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeNotEqualTo(Float value) {
addCriterion("`channel`.latitude <>", value, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeGreaterThan(Float value) {
addCriterion("`channel`.latitude >", value, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeGreaterThanOrEqualTo(Float value) {
addCriterion("`channel`.latitude >=", value, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeLessThan(Float value) {
addCriterion("`channel`.latitude <", value, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeLessThanOrEqualTo(Float value) {
addCriterion("`channel`.latitude <=", value, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeIn(List<Float> values) {
addCriterion("`channel`.latitude in", values, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeNotIn(List<Float> values) {
addCriterion("`channel`.latitude not in", values, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeBetween(Float value1, Float value2) {
addCriterion("`channel`.latitude between", value1, value2, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeNotBetween(Float value1, Float value2) {
addCriterion("`channel`.latitude not between", value1, value2, "latitude");
return (Criteria) this;
}
public Criteria andStatusIsNull() {
addCriterion("`channel`.`status` is null");
return (Criteria) this;
}
public Criteria andStatusIsNotNull() {
addCriterion("`channel`.`status` is not null");
return (Criteria) this;
}
public Criteria andStatusEqualTo(Integer value) {
addCriterion("`channel`.`status` =", value, "status");
return (Criteria) this;
}
public Criteria andStatusNotEqualTo(Integer value) {
addCriterion("`channel`.`status` <>", value, "status");
return (Criteria) this;
}
public Criteria andStatusGreaterThan(Integer value) {
addCriterion("`channel`.`status` >", value, "status");
return (Criteria) this;
}
public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
addCriterion("`channel`.`status` >=", value, "status");
return (Criteria) this;
}
public Criteria andStatusLessThan(Integer value) {
addCriterion("`channel`.`status` <", value, "status");
return (Criteria) this;
}
public Criteria andStatusLessThanOrEqualTo(Integer value) {
addCriterion("`channel`.`status` <=", value, "status");
return (Criteria) this;
}
public Criteria andStatusIn(List<Integer> values) {
addCriterion("`channel`.`status` in", values, "status");
return (Criteria) this;
}
public Criteria andStatusNotIn(List<Integer> values) {
addCriterion("`channel`.`status` not in", values, "status");
return (Criteria) this;
}
public Criteria andStatusBetween(Integer value1, Integer value2) {
addCriterion("`channel`.`status` between", value1, value2, "status");
return (Criteria) this;
}
public Criteria andStatusNotBetween(Integer value1, Integer value2) {
addCriterion("`channel`.`status` not between", value1, value2, "status");
return (Criteria) this;
}
}
public static class ColumnContainer extends ColumnContainerBase {
protected ColumnContainer(String tableName) {
super(tableName);
}
public ColumnContainer hasIdColumn() {
addColumnStr("`channel`.id as channel_id ");
return (ColumnContainer) this;
}
public ColumnContainer hasUnidColumn() {
addColumnStr("`channel`.unid as channel_unid ");
return (ColumnContainer) this;
}
public ColumnContainer hasChannelUnidColumn() {
addColumnStr("`channel`.channel_unid as channel_channel_unid ");
return (ColumnContainer) this;
}
public ColumnContainer hasDeviceUnidColumn() {
addColumnStr("`channel`.device_unid as channel_device_unid ");
return (ColumnContainer) this;
}
public ColumnContainer hasTypeColumn() {
addColumnStr("`channel`.`type` as `channel_type` ");
return (ColumnContainer) this;
}
public ColumnContainer hasStreamTypeColumn() {
addColumnStr("`channel`.stream_type as channel_stream_type ");
return (ColumnContainer) this;
}
public ColumnContainer hasStreamPathColumn() {
addColumnStr("`channel`.stream_path as channel_stream_path ");
return (ColumnContainer) this;
}
public ColumnContainer hasUsernameColumn() {
addColumnStr("`channel`.username as channel_username ");
return (ColumnContainer) this;
}
public ColumnContainer hasPasswordColumn() {
addColumnStr("`channel`.`password` as `channel_password` ");
return (ColumnContainer) this;
}
public ColumnContainer hasAddressUnidColumn() {
addColumnStr("`channel`.address_unid as channel_address_unid ");
return (ColumnContainer) this;
}
public ColumnContainer hasNameColumn() {
addColumnStr("`channel`.`name` as `channel_name` ");
return (ColumnContainer) this;
}
public ColumnContainer hasIpColumn() {
addColumnStr("`channel`.ip as channel_ip ");
return (ColumnContainer) this;
}
public ColumnContainer hasPortColumn() {
addColumnStr("`channel`.port as channel_port ");
return (ColumnContainer) this;
}
public ColumnContainer hasExpandColumn() {
addColumnStr("`channel`.expand as channel_expand ");
return (ColumnContainer) this;
}
public ColumnContainer hasLongitudeColumn() {
addColumnStr("`channel`.longitude as channel_longitude ");
return (ColumnContainer) this;
}
public ColumnContainer hasLatitudeColumn() {
addColumnStr("`channel`.latitude as channel_latitude ");
return (ColumnContainer) this;
}
public ColumnContainer hasStatusColumn() {
addColumnStr("`channel`.`status` as `channel_status` ");
return (ColumnContainer) this;
}
}
}
\ No newline at end of file
......@@ -6,6 +6,8 @@ import java.util.Date;
public class FlowData extends BaseModel {
private Long id;
private Date eventTime;
private String unid;
private Long flowEventId;
......@@ -44,8 +46,6 @@ public class FlowData extends BaseModel {
private Float sampleNumOut;
private Date eventTime;
private Float distTime;
private Float timeOccupy;
......@@ -64,6 +64,14 @@ public class FlowData extends BaseModel {
this.id = id;
}
public Date getEventTime() {
return eventTime;
}
public void setEventTime(Date eventTime) {
this.eventTime = eventTime;
}
public String getUnid() {
return unid;
}
......@@ -216,14 +224,6 @@ public class FlowData extends BaseModel {
this.sampleNumOut = sampleNumOut;
}
public Date getEventTime() {
return eventTime;
}
public void setEventTime(Date eventTime) {
this.eventTime = eventTime;
}
public Float getDistTime() {
return distTime;
}
......
......@@ -149,6 +149,66 @@ public class FlowDataExample extends BaseExample {
return (Criteria) this;
}
public Criteria andEventTimeIsNull() {
addCriterion("`flowData`.event_time is null");
return (Criteria) this;
}
public Criteria andEventTimeIsNotNull() {
addCriterion("`flowData`.event_time is not null");
return (Criteria) this;
}
public Criteria andEventTimeEqualTo(Date value) {
addCriterion("`flowData`.event_time =", value, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeNotEqualTo(Date value) {
addCriterion("`flowData`.event_time <>", value, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeGreaterThan(Date value) {
addCriterion("`flowData`.event_time >", value, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeGreaterThanOrEqualTo(Date value) {
addCriterion("`flowData`.event_time >=", value, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeLessThan(Date value) {
addCriterion("`flowData`.event_time <", value, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeLessThanOrEqualTo(Date value) {
addCriterion("`flowData`.event_time <=", value, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeIn(List<Date> values) {
addCriterion("`flowData`.event_time in", values, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeNotIn(List<Date> values) {
addCriterion("`flowData`.event_time not in", values, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeBetween(Date value1, Date value2) {
addCriterion("`flowData`.event_time between", value1, value2, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeNotBetween(Date value1, Date value2) {
addCriterion("`flowData`.event_time not between", value1, value2, "eventTime");
return (Criteria) this;
}
public Criteria andUnidIsNull() {
addCriterion("`flowData`.unid is null");
return (Criteria) this;
......@@ -1359,66 +1419,6 @@ public class FlowDataExample extends BaseExample {
return (Criteria) this;
}
public Criteria andEventTimeIsNull() {
addCriterion("`flowData`.event_time is null");
return (Criteria) this;
}
public Criteria andEventTimeIsNotNull() {
addCriterion("`flowData`.event_time is not null");
return (Criteria) this;
}
public Criteria andEventTimeEqualTo(Date value) {
addCriterion("`flowData`.event_time =", value, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeNotEqualTo(Date value) {
addCriterion("`flowData`.event_time <>", value, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeGreaterThan(Date value) {
addCriterion("`flowData`.event_time >", value, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeGreaterThanOrEqualTo(Date value) {
addCriterion("`flowData`.event_time >=", value, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeLessThan(Date value) {
addCriterion("`flowData`.event_time <", value, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeLessThanOrEqualTo(Date value) {
addCriterion("`flowData`.event_time <=", value, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeIn(List<Date> values) {
addCriterion("`flowData`.event_time in", values, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeNotIn(List<Date> values) {
addCriterion("`flowData`.event_time not in", values, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeBetween(Date value1, Date value2) {
addCriterion("`flowData`.event_time between", value1, value2, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeNotBetween(Date value1, Date value2) {
addCriterion("`flowData`.event_time not between", value1, value2, "eventTime");
return (Criteria) this;
}
public Criteria andDistTimeIsNull() {
addCriterion("`flowData`.dist_time is null");
return (Criteria) this;
......@@ -1611,6 +1611,11 @@ public class FlowDataExample extends BaseExample {
return (ColumnContainer) this;
}
public ColumnContainer hasEventTimeColumn() {
addColumnStr("`flowData`.event_time as flowData_event_time ");
return (ColumnContainer) this;
}
public ColumnContainer hasUnidColumn() {
addColumnStr("`flowData`.unid as flowData_unid ");
return (ColumnContainer) this;
......@@ -1706,11 +1711,6 @@ public class FlowDataExample extends BaseExample {
return (ColumnContainer) this;
}
public ColumnContainer hasEventTimeColumn() {
addColumnStr("`flowData`.event_time as flowData_event_time ");
return (ColumnContainer) this;
}
public ColumnContainer hasDistTimeColumn() {
addColumnStr("`flowData`.dist_time as flowData_dist_time ");
return (ColumnContainer) this;
......
......@@ -6,14 +6,14 @@ import java.util.Date;
public class FlowEvent extends BaseModel {
private Long id;
private Date eventTime;
private String unid;
private Long taskId;
private String eventType;
private Date eventTime;
private String eventId;
private String deviceCode;
......@@ -38,6 +38,14 @@ public class FlowEvent extends BaseModel {
this.id = id;
}
public Date getEventTime() {
return eventTime;
}
public void setEventTime(Date eventTime) {
this.eventTime = eventTime;
}
public String getUnid() {
return unid;
}
......@@ -62,14 +70,6 @@ public class FlowEvent extends BaseModel {
this.eventType = eventType == null ? null : eventType.trim();
}
public Date getEventTime() {
return eventTime;
}
public void setEventTime(Date eventTime) {
this.eventTime = eventTime;
}
public String getEventId() {
return eventId;
}
......
......@@ -149,6 +149,66 @@ public class FlowEventExample extends BaseExample {
return (Criteria) this;
}
public Criteria andEventTimeIsNull() {
addCriterion("`flowEvent`.event_time is null");
return (Criteria) this;
}
public Criteria andEventTimeIsNotNull() {
addCriterion("`flowEvent`.event_time is not null");
return (Criteria) this;
}
public Criteria andEventTimeEqualTo(Date value) {
addCriterion("`flowEvent`.event_time =", value, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeNotEqualTo(Date value) {
addCriterion("`flowEvent`.event_time <>", value, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeGreaterThan(Date value) {
addCriterion("`flowEvent`.event_time >", value, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeGreaterThanOrEqualTo(Date value) {
addCriterion("`flowEvent`.event_time >=", value, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeLessThan(Date value) {
addCriterion("`flowEvent`.event_time <", value, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeLessThanOrEqualTo(Date value) {
addCriterion("`flowEvent`.event_time <=", value, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeIn(List<Date> values) {
addCriterion("`flowEvent`.event_time in", values, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeNotIn(List<Date> values) {
addCriterion("`flowEvent`.event_time not in", values, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeBetween(Date value1, Date value2) {
addCriterion("`flowEvent`.event_time between", value1, value2, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeNotBetween(Date value1, Date value2) {
addCriterion("`flowEvent`.event_time not between", value1, value2, "eventTime");
return (Criteria) this;
}
public Criteria andUnidIsNull() {
addCriterion("`flowEvent`.unid is null");
return (Criteria) this;
......@@ -349,66 +409,6 @@ public class FlowEventExample extends BaseExample {
return (Criteria) this;
}
public Criteria andEventTimeIsNull() {
addCriterion("`flowEvent`.event_time is null");
return (Criteria) this;
}
public Criteria andEventTimeIsNotNull() {
addCriterion("`flowEvent`.event_time is not null");
return (Criteria) this;
}
public Criteria andEventTimeEqualTo(Date value) {
addCriterion("`flowEvent`.event_time =", value, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeNotEqualTo(Date value) {
addCriterion("`flowEvent`.event_time <>", value, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeGreaterThan(Date value) {
addCriterion("`flowEvent`.event_time >", value, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeGreaterThanOrEqualTo(Date value) {
addCriterion("`flowEvent`.event_time >=", value, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeLessThan(Date value) {
addCriterion("`flowEvent`.event_time <", value, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeLessThanOrEqualTo(Date value) {
addCriterion("`flowEvent`.event_time <=", value, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeIn(List<Date> values) {
addCriterion("`flowEvent`.event_time in", values, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeNotIn(List<Date> values) {
addCriterion("`flowEvent`.event_time not in", values, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeBetween(Date value1, Date value2) {
addCriterion("`flowEvent`.event_time between", value1, value2, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeNotBetween(Date value1, Date value2) {
addCriterion("`flowEvent`.event_time not between", value1, value2, "eventTime");
return (Criteria) this;
}
public Criteria andEventIdIsNull() {
addCriterion("`flowEvent`.event_id is null");
return (Criteria) this;
......@@ -911,6 +911,11 @@ public class FlowEventExample extends BaseExample {
return (ColumnContainer) this;
}
public ColumnContainer hasEventTimeColumn() {
addColumnStr("`flowEvent`.event_time as flowEvent_event_time ");
return (ColumnContainer) this;
}
public ColumnContainer hasUnidColumn() {
addColumnStr("`flowEvent`.unid as flowEvent_unid ");
return (ColumnContainer) this;
......@@ -926,11 +931,6 @@ public class FlowEventExample extends BaseExample {
return (ColumnContainer) this;
}
public ColumnContainer hasEventTimeColumn() {
addColumnStr("`flowEvent`.event_time as flowEvent_event_time ");
return (ColumnContainer) this;
}
public ColumnContainer hasEventIdColumn() {
addColumnStr("`flowEvent`.event_id as flowEvent_event_id ");
return (ColumnContainer) this;
......
......@@ -6,6 +6,8 @@ import java.util.Date;
public class Traffic extends BaseModel {
private Long id;
private Date eventTime;
private String unid;
private Long taskId;
......@@ -14,8 +16,6 @@ public class Traffic extends BaseModel {
private String eventType;
private Date eventDt;
private String channelUnid;
private String plateColor;
......@@ -72,6 +72,14 @@ public class Traffic extends BaseModel {
this.id = id;
}
public Date getEventTime() {
return eventTime;
}
public void setEventTime(Date eventTime) {
this.eventTime = eventTime;
}
public String getUnid() {
return unid;
}
......@@ -104,14 +112,6 @@ public class Traffic extends BaseModel {
this.eventType = eventType == null ? null : eventType.trim();
}
public Date getEventDt() {
return eventDt;
}
public void setEventDt(Date eventDt) {
this.eventDt = eventDt;
}
public String getChannelUnid() {
return channelUnid;
}
......
......@@ -149,6 +149,66 @@ public class TrafficExample extends BaseExample {
return (Criteria) this;
}
public Criteria andEventTimeIsNull() {
addCriterion("`traffic`.event_time is null");
return (Criteria) this;
}
public Criteria andEventTimeIsNotNull() {
addCriterion("`traffic`.event_time is not null");
return (Criteria) this;
}
public Criteria andEventTimeEqualTo(Date value) {
addCriterion("`traffic`.event_time =", value, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeNotEqualTo(Date value) {
addCriterion("`traffic`.event_time <>", value, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeGreaterThan(Date value) {
addCriterion("`traffic`.event_time >", value, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeGreaterThanOrEqualTo(Date value) {
addCriterion("`traffic`.event_time >=", value, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeLessThan(Date value) {
addCriterion("`traffic`.event_time <", value, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeLessThanOrEqualTo(Date value) {
addCriterion("`traffic`.event_time <=", value, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeIn(List<Date> values) {
addCriterion("`traffic`.event_time in", values, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeNotIn(List<Date> values) {
addCriterion("`traffic`.event_time not in", values, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeBetween(Date value1, Date value2) {
addCriterion("`traffic`.event_time between", value1, value2, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeNotBetween(Date value1, Date value2) {
addCriterion("`traffic`.event_time not between", value1, value2, "eventTime");
return (Criteria) this;
}
public Criteria andUnidIsNull() {
addCriterion("`traffic`.unid is null");
return (Criteria) this;
......@@ -419,66 +479,6 @@ public class TrafficExample extends BaseExample {
return (Criteria) this;
}
public Criteria andEventDtIsNull() {
addCriterion("`traffic`.event_dt is null");
return (Criteria) this;
}
public Criteria andEventDtIsNotNull() {
addCriterion("`traffic`.event_dt is not null");
return (Criteria) this;
}
public Criteria andEventDtEqualTo(Date value) {
addCriterion("`traffic`.event_dt =", value, "eventDt");
return (Criteria) this;
}
public Criteria andEventDtNotEqualTo(Date value) {
addCriterion("`traffic`.event_dt <>", value, "eventDt");
return (Criteria) this;
}
public Criteria andEventDtGreaterThan(Date value) {
addCriterion("`traffic`.event_dt >", value, "eventDt");
return (Criteria) this;
}
public Criteria andEventDtGreaterThanOrEqualTo(Date value) {
addCriterion("`traffic`.event_dt >=", value, "eventDt");
return (Criteria) this;
}
public Criteria andEventDtLessThan(Date value) {
addCriterion("`traffic`.event_dt <", value, "eventDt");
return (Criteria) this;
}
public Criteria andEventDtLessThanOrEqualTo(Date value) {
addCriterion("`traffic`.event_dt <=", value, "eventDt");
return (Criteria) this;
}
public Criteria andEventDtIn(List<Date> values) {
addCriterion("`traffic`.event_dt in", values, "eventDt");
return (Criteria) this;
}
public Criteria andEventDtNotIn(List<Date> values) {
addCriterion("`traffic`.event_dt not in", values, "eventDt");
return (Criteria) this;
}
public Criteria andEventDtBetween(Date value1, Date value2) {
addCriterion("`traffic`.event_dt between", value1, value2, "eventDt");
return (Criteria) this;
}
public Criteria andEventDtNotBetween(Date value1, Date value2) {
addCriterion("`traffic`.event_dt not between", value1, value2, "eventDt");
return (Criteria) this;
}
public Criteria andChannelUnidIsNull() {
addCriterion("`traffic`.channel_unid is null");
return (Criteria) this;
......@@ -2031,6 +2031,11 @@ public class TrafficExample extends BaseExample {
return (ColumnContainer) this;
}
public ColumnContainer hasEventTimeColumn() {
addColumnStr("`traffic`.event_time as traffic_event_time ");
return (ColumnContainer) this;
}
public ColumnContainer hasUnidColumn() {
addColumnStr("`traffic`.unid as traffic_unid ");
return (ColumnContainer) this;
......@@ -2051,11 +2056,6 @@ public class TrafficExample extends BaseExample {
return (ColumnContainer) this;
}
public ColumnContainer hasEventDtColumn() {
addColumnStr("`traffic`.event_dt as traffic_event_dt ");
return (ColumnContainer) this;
}
public ColumnContainer hasChannelUnidColumn() {
addColumnStr("`traffic`.channel_unid as traffic_channel_unid ");
return (ColumnContainer) this;
......
package com.viontech.fanxing.commons.model;
import com.viontech.fanxing.commons.base.BaseModel;
import java.util.Date;
public class TrafficFace extends BaseModel {
private Long id;
private Date eventTime;
private String unid;
private Long trafficId;
......@@ -25,6 +28,14 @@ public class TrafficFace extends BaseModel {
this.id = id;
}
public Date getEventTime() {
return eventTime;
}
public void setEventTime(Date eventTime) {
this.eventTime = eventTime;
}
public String getUnid() {
return unid;
}
......
......@@ -2,6 +2,7 @@ package com.viontech.fanxing.commons.model;
import com.viontech.fanxing.commons.base.BaseExample;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
......@@ -148,6 +149,66 @@ public class TrafficFaceExample extends BaseExample {
return (Criteria) this;
}
public Criteria andEventTimeIsNull() {
addCriterion("`trafficFace`.event_time is null");
return (Criteria) this;
}
public Criteria andEventTimeIsNotNull() {
addCriterion("`trafficFace`.event_time is not null");
return (Criteria) this;
}
public Criteria andEventTimeEqualTo(Date value) {
addCriterion("`trafficFace`.event_time =", value, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeNotEqualTo(Date value) {
addCriterion("`trafficFace`.event_time <>", value, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeGreaterThan(Date value) {
addCriterion("`trafficFace`.event_time >", value, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeGreaterThanOrEqualTo(Date value) {
addCriterion("`trafficFace`.event_time >=", value, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeLessThan(Date value) {
addCriterion("`trafficFace`.event_time <", value, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeLessThanOrEqualTo(Date value) {
addCriterion("`trafficFace`.event_time <=", value, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeIn(List<Date> values) {
addCriterion("`trafficFace`.event_time in", values, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeNotIn(List<Date> values) {
addCriterion("`trafficFace`.event_time not in", values, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeBetween(Date value1, Date value2) {
addCriterion("`trafficFace`.event_time between", value1, value2, "eventTime");
return (Criteria) this;
}
public Criteria andEventTimeNotBetween(Date value1, Date value2) {
addCriterion("`trafficFace`.event_time not between", value1, value2, "eventTime");
return (Criteria) this;
}
public Criteria andUnidIsNull() {
addCriterion("`trafficFace`.unid is null");
return (Criteria) this;
......@@ -550,6 +611,11 @@ public class TrafficFaceExample extends BaseExample {
return (ColumnContainer) this;
}
public ColumnContainer hasEventTimeColumn() {
addColumnStr("`trafficFace`.event_time as trafficFace_event_time ");
return (ColumnContainer) this;
}
public ColumnContainer hasUnidColumn() {
addColumnStr("`trafficFace`.unid as trafficFace_unid ");
return (ColumnContainer) this;
......
package com.viontech.fanxing.commons.vo;
import com.viontech.fanxing.commons.model.Channel;
import com.viontech.fanxing.commons.vobase.ChannelVoBase;
public class ChannelVo extends ChannelVoBase {
public ChannelVo() {
super();
}
public ChannelVo(Channel channel) {
super(channel);
}
}
\ No newline at end of file
......@@ -25,6 +25,21 @@ public class BehaviorVoBase extends Behavior implements VoInterface<Behavior> {
private Long id_lte;
@JsonIgnore
private ArrayList<Date> eventTime_arr;
@JsonIgnore
private Date eventTime_gt;
@JsonIgnore
private Date eventTime_lt;
@JsonIgnore
private Date eventTime_gte;
@JsonIgnore
private Date eventTime_lte;
@JsonIgnore
private ArrayList<String> unid_arr;
@JsonIgnore
......@@ -76,24 +91,6 @@ public class BehaviorVoBase extends Behavior implements VoInterface<Behavior> {
private String eventRefid_like;
@JsonIgnore
private Boolean eventTime_null;
@JsonIgnore
private ArrayList<Date> eventTime_arr;
@JsonIgnore
private Date eventTime_gt;
@JsonIgnore
private Date eventTime_lt;
@JsonIgnore
private Date eventTime_gte;
@JsonIgnore
private Date eventTime_lte;
@JsonIgnore
private Boolean pics_null;
@JsonIgnore
......@@ -112,24 +109,6 @@ public class BehaviorVoBase extends Behavior implements VoInterface<Behavior> {
private String channelUnid_like;
@JsonIgnore
private Boolean testPicFile_null;
@JsonIgnore
private ArrayList<String> testPicFile_arr;
@JsonIgnore
private String testPicFile_like;
@JsonIgnore
private Boolean testFrameNo_null;
@JsonIgnore
private ArrayList<String> testFrameNo_arr;
@JsonIgnore
private String testFrameNo_like;
@JsonIgnore
private Boolean taskName_null;
@JsonIgnore
......@@ -148,15 +127,6 @@ public class BehaviorVoBase extends Behavior implements VoInterface<Behavior> {
private String eventDataNum_like;
@JsonIgnore
private Boolean auxDevInfo_null;
@JsonIgnore
private ArrayList<String> auxDevInfo_arr;
@JsonIgnore
private String auxDevInfo_like;
@JsonIgnore
private Boolean eventData_null;
@JsonIgnore
......@@ -248,6 +218,60 @@ public class BehaviorVoBase extends Behavior implements VoInterface<Behavior> {
this.getModel().setId(id);
}
public ArrayList<Date> getEventTime_arr() {
return eventTime_arr;
}
public void setEventTime_arr(ArrayList<Date> eventTime_arr) {
this.eventTime_arr = eventTime_arr;
}
public Date getEventTime_gt() {
return eventTime_gt;
}
public void setEventTime_gt(Date eventTime_gt) {
this.eventTime_gt = eventTime_gt;
}
public Date getEventTime_lt() {
return eventTime_lt;
}
public void setEventTime_lt(Date eventTime_lt) {
this.eventTime_lt = eventTime_lt;
}
public Date getEventTime_gte() {
return eventTime_gte;
}
public void setEventTime_gte(Date eventTime_gte) {
this.eventTime_gte = eventTime_gte;
}
public Date getEventTime_lte() {
return eventTime_lte;
}
public void setEventTime_lte(Date eventTime_lte) {
this.eventTime_lte = eventTime_lte;
}
public Date getEventTime() {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
return this.getModel().getEventTime();
}
public void setEventTime(Date eventTime) {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
this.getModel().setEventTime(eventTime);
}
public ArrayList<String> getUnid_arr() {
return unid_arr;
}
......@@ -454,68 +478,6 @@ public class BehaviorVoBase extends Behavior implements VoInterface<Behavior> {
this.getModel().setEventRefid(eventRefid);
}
public Boolean getEventTime_null() {
return eventTime_null;
}
public void setEventTime_null(Boolean eventTime_null) {
this.eventTime_null = eventTime_null;
}
public ArrayList<Date> getEventTime_arr() {
return eventTime_arr;
}
public void setEventTime_arr(ArrayList<Date> eventTime_arr) {
this.eventTime_arr = eventTime_arr;
}
public Date getEventTime_gt() {
return eventTime_gt;
}
public void setEventTime_gt(Date eventTime_gt) {
this.eventTime_gt = eventTime_gt;
}
public Date getEventTime_lt() {
return eventTime_lt;
}
public void setEventTime_lt(Date eventTime_lt) {
this.eventTime_lt = eventTime_lt;
}
public Date getEventTime_gte() {
return eventTime_gte;
}
public void setEventTime_gte(Date eventTime_gte) {
this.eventTime_gte = eventTime_gte;
}
public Date getEventTime_lte() {
return eventTime_lte;
}
public void setEventTime_lte(Date eventTime_lte) {
this.eventTime_lte = eventTime_lte;
}
public Date getEventTime() {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
return this.getModel().getEventTime();
}
public void setEventTime(Date eventTime) {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
this.getModel().setEventTime(eventTime);
}
public Boolean getPics_null() {
return pics_null;
}
......@@ -592,82 +554,6 @@ public class BehaviorVoBase extends Behavior implements VoInterface<Behavior> {
this.getModel().setChannelUnid(channelUnid);
}
public Boolean getTestPicFile_null() {
return testPicFile_null;
}
public void setTestPicFile_null(Boolean testPicFile_null) {
this.testPicFile_null = testPicFile_null;
}
public ArrayList<String> getTestPicFile_arr() {
return testPicFile_arr;
}
public void setTestPicFile_arr(ArrayList<String> testPicFile_arr) {
this.testPicFile_arr = testPicFile_arr;
}
public String getTestPicFile_like() {
return testPicFile_like;
}
public void setTestPicFile_like(String testPicFile_like) {
this.testPicFile_like = testPicFile_like;
}
public String getTestPicFile() {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
return this.getModel().getTestPicFile();
}
public void setTestPicFile(String testPicFile) {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
this.getModel().setTestPicFile(testPicFile);
}
public Boolean getTestFrameNo_null() {
return testFrameNo_null;
}
public void setTestFrameNo_null(Boolean testFrameNo_null) {
this.testFrameNo_null = testFrameNo_null;
}
public ArrayList<String> getTestFrameNo_arr() {
return testFrameNo_arr;
}
public void setTestFrameNo_arr(ArrayList<String> testFrameNo_arr) {
this.testFrameNo_arr = testFrameNo_arr;
}
public String getTestFrameNo_like() {
return testFrameNo_like;
}
public void setTestFrameNo_like(String testFrameNo_like) {
this.testFrameNo_like = testFrameNo_like;
}
public String getTestFrameNo() {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
return this.getModel().getTestFrameNo();
}
public void setTestFrameNo(String testFrameNo) {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
this.getModel().setTestFrameNo(testFrameNo);
}
public Boolean getTaskName_null() {
return taskName_null;
}
......@@ -744,44 +630,6 @@ public class BehaviorVoBase extends Behavior implements VoInterface<Behavior> {
this.getModel().setEventDataNum(eventDataNum);
}
public Boolean getAuxDevInfo_null() {
return auxDevInfo_null;
}
public void setAuxDevInfo_null(Boolean auxDevInfo_null) {
this.auxDevInfo_null = auxDevInfo_null;
}
public ArrayList<String> getAuxDevInfo_arr() {
return auxDevInfo_arr;
}
public void setAuxDevInfo_arr(ArrayList<String> auxDevInfo_arr) {
this.auxDevInfo_arr = auxDevInfo_arr;
}
public String getAuxDevInfo_like() {
return auxDevInfo_like;
}
public void setAuxDevInfo_like(String auxDevInfo_like) {
this.auxDevInfo_like = auxDevInfo_like;
}
public String getAuxDevInfo() {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
return this.getModel().getAuxDevInfo();
}
public void setAuxDevInfo(String auxDevInfo) {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
this.getModel().setAuxDevInfo(auxDevInfo);
}
public Boolean getEventData_null() {
return eventData_null;
}
......
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.Channel;
import java.util.ArrayList;
public class ChannelVoBase extends Channel implements VoInterface<Channel> {
private Channel channel;
@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<String> channelUnid_arr;
@JsonIgnore
private String channelUnid_like;
@JsonIgnore
private ArrayList<String> deviceUnid_arr;
@JsonIgnore
private String deviceUnid_like;
@JsonIgnore
private ArrayList<Integer> type_arr;
@JsonIgnore
private Integer type_gt;
@JsonIgnore
private Integer type_lt;
@JsonIgnore
private Integer type_gte;
@JsonIgnore
private Integer type_lte;
@JsonIgnore
private Boolean streamType_null;
@JsonIgnore
private ArrayList<Integer> streamType_arr;
@JsonIgnore
private Integer streamType_gt;
@JsonIgnore
private Integer streamType_lt;
@JsonIgnore
private Integer streamType_gte;
@JsonIgnore
private Integer streamType_lte;
@JsonIgnore
private Boolean streamPath_null;
@JsonIgnore
private ArrayList<String> streamPath_arr;
@JsonIgnore
private String streamPath_like;
@JsonIgnore
private Boolean username_null;
@JsonIgnore
private ArrayList<String> username_arr;
@JsonIgnore
private String username_like;
@JsonIgnore
private Boolean password_null;
@JsonIgnore
private ArrayList<String> password_arr;
@JsonIgnore
private String password_like;
@JsonIgnore
private Boolean addressUnid_null;
@JsonIgnore
private ArrayList<String> addressUnid_arr;
@JsonIgnore
private String addressUnid_like;
@JsonIgnore
private Boolean name_null;
@JsonIgnore
private ArrayList<String> name_arr;
@JsonIgnore
private String name_like;
@JsonIgnore
private Boolean ip_null;
@JsonIgnore
private ArrayList<String> ip_arr;
@JsonIgnore
private String ip_like;
@JsonIgnore
private Boolean port_null;
@JsonIgnore
private ArrayList<Integer> port_arr;
@JsonIgnore
private Integer port_gt;
@JsonIgnore
private Integer port_lt;
@JsonIgnore
private Integer port_gte;
@JsonIgnore
private Integer port_lte;
@JsonIgnore
private Boolean expand_null;
@JsonIgnore
private ArrayList<String> expand_arr;
@JsonIgnore
private String expand_like;
@JsonIgnore
private Boolean longitude_null;
@JsonIgnore
private ArrayList<Float> longitude_arr;
@JsonIgnore
private Float longitude_gt;
@JsonIgnore
private Float longitude_lt;
@JsonIgnore
private Float longitude_gte;
@JsonIgnore
private Float longitude_lte;
@JsonIgnore
private Boolean latitude_null;
@JsonIgnore
private ArrayList<Float> latitude_arr;
@JsonIgnore
private Float latitude_gt;
@JsonIgnore
private Float latitude_lt;
@JsonIgnore
private Float latitude_gte;
@JsonIgnore
private Float latitude_lte;
@JsonIgnore
private ArrayList<Integer> status_arr;
@JsonIgnore
private Integer status_gt;
@JsonIgnore
private Integer status_lt;
@JsonIgnore
private Integer status_gte;
@JsonIgnore
private Integer status_lte;
public ChannelVoBase() {
this(null);
}
public ChannelVoBase(Channel channel) {
if(channel == null) {
channel = new Channel();
}
this.channel = channel;
}
@JsonIgnore
public Channel getModel() {
return channel;
}
public void setModel(Channel channel) {
this.channel = channel;
}
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<String> getChannelUnid_arr() {
return channelUnid_arr;
}
public void setChannelUnid_arr(ArrayList<String> channelUnid_arr) {
this.channelUnid_arr = channelUnid_arr;
}
public String getChannelUnid_like() {
return channelUnid_like;
}
public void setChannelUnid_like(String channelUnid_like) {
this.channelUnid_like = channelUnid_like;
}
public String getChannelUnid() {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
return this.getModel().getChannelUnid();
}
public void setChannelUnid(String channelUnid) {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
this.getModel().setChannelUnid(channelUnid);
}
public ArrayList<String> getDeviceUnid_arr() {
return deviceUnid_arr;
}
public void setDeviceUnid_arr(ArrayList<String> deviceUnid_arr) {
this.deviceUnid_arr = deviceUnid_arr;
}
public String getDeviceUnid_like() {
return deviceUnid_like;
}
public void setDeviceUnid_like(String deviceUnid_like) {
this.deviceUnid_like = deviceUnid_like;
}
public String getDeviceUnid() {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
return this.getModel().getDeviceUnid();
}
public void setDeviceUnid(String deviceUnid) {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
this.getModel().setDeviceUnid(deviceUnid);
}
public ArrayList<Integer> getType_arr() {
return type_arr;
}
public void setType_arr(ArrayList<Integer> type_arr) {
this.type_arr = type_arr;
}
public Integer getType_gt() {
return type_gt;
}
public void setType_gt(Integer type_gt) {
this.type_gt = type_gt;
}
public Integer getType_lt() {
return type_lt;
}
public void setType_lt(Integer type_lt) {
this.type_lt = type_lt;
}
public Integer getType_gte() {
return type_gte;
}
public void setType_gte(Integer type_gte) {
this.type_gte = type_gte;
}
public Integer getType_lte() {
return type_lte;
}
public void setType_lte(Integer type_lte) {
this.type_lte = type_lte;
}
public Integer getType() {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
return this.getModel().getType();
}
public void setType(Integer type) {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
this.getModel().setType(type);
}
public Boolean getStreamType_null() {
return streamType_null;
}
public void setStreamType_null(Boolean streamType_null) {
this.streamType_null = streamType_null;
}
public ArrayList<Integer> getStreamType_arr() {
return streamType_arr;
}
public void setStreamType_arr(ArrayList<Integer> streamType_arr) {
this.streamType_arr = streamType_arr;
}
public Integer getStreamType_gt() {
return streamType_gt;
}
public void setStreamType_gt(Integer streamType_gt) {
this.streamType_gt = streamType_gt;
}
public Integer getStreamType_lt() {
return streamType_lt;
}
public void setStreamType_lt(Integer streamType_lt) {
this.streamType_lt = streamType_lt;
}
public Integer getStreamType_gte() {
return streamType_gte;
}
public void setStreamType_gte(Integer streamType_gte) {
this.streamType_gte = streamType_gte;
}
public Integer getStreamType_lte() {
return streamType_lte;
}
public void setStreamType_lte(Integer streamType_lte) {
this.streamType_lte = streamType_lte;
}
public Integer getStreamType() {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
return this.getModel().getStreamType();
}
public void setStreamType(Integer streamType) {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
this.getModel().setStreamType(streamType);
}
public Boolean getStreamPath_null() {
return streamPath_null;
}
public void setStreamPath_null(Boolean streamPath_null) {
this.streamPath_null = streamPath_null;
}
public ArrayList<String> getStreamPath_arr() {
return streamPath_arr;
}
public void setStreamPath_arr(ArrayList<String> streamPath_arr) {
this.streamPath_arr = streamPath_arr;
}
public String getStreamPath_like() {
return streamPath_like;
}
public void setStreamPath_like(String streamPath_like) {
this.streamPath_like = streamPath_like;
}
public String getStreamPath() {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
return this.getModel().getStreamPath();
}
public void setStreamPath(String streamPath) {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
this.getModel().setStreamPath(streamPath);
}
public Boolean getUsername_null() {
return username_null;
}
public void setUsername_null(Boolean username_null) {
this.username_null = username_null;
}
public ArrayList<String> getUsername_arr() {
return username_arr;
}
public void setUsername_arr(ArrayList<String> username_arr) {
this.username_arr = username_arr;
}
public String getUsername_like() {
return username_like;
}
public void setUsername_like(String username_like) {
this.username_like = username_like;
}
public String getUsername() {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
return this.getModel().getUsername();
}
public void setUsername(String username) {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
this.getModel().setUsername(username);
}
public Boolean getPassword_null() {
return password_null;
}
public void setPassword_null(Boolean password_null) {
this.password_null = password_null;
}
public ArrayList<String> getPassword_arr() {
return password_arr;
}
public void setPassword_arr(ArrayList<String> password_arr) {
this.password_arr = password_arr;
}
public String getPassword_like() {
return password_like;
}
public void setPassword_like(String password_like) {
this.password_like = password_like;
}
public String getPassword() {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
return this.getModel().getPassword();
}
public void setPassword(String password) {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
this.getModel().setPassword(password);
}
public Boolean getAddressUnid_null() {
return addressUnid_null;
}
public void setAddressUnid_null(Boolean addressUnid_null) {
this.addressUnid_null = addressUnid_null;
}
public ArrayList<String> getAddressUnid_arr() {
return addressUnid_arr;
}
public void setAddressUnid_arr(ArrayList<String> addressUnid_arr) {
this.addressUnid_arr = addressUnid_arr;
}
public String getAddressUnid_like() {
return addressUnid_like;
}
public void setAddressUnid_like(String addressUnid_like) {
this.addressUnid_like = addressUnid_like;
}
public String getAddressUnid() {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
return this.getModel().getAddressUnid();
}
public void setAddressUnid(String addressUnid) {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
this.getModel().setAddressUnid(addressUnid);
}
public Boolean getName_null() {
return name_null;
}
public void setName_null(Boolean name_null) {
this.name_null = name_null;
}
public ArrayList<String> getName_arr() {
return name_arr;
}
public void setName_arr(ArrayList<String> name_arr) {
this.name_arr = name_arr;
}
public String getName_like() {
return name_like;
}
public void setName_like(String name_like) {
this.name_like = name_like;
}
public String getName() {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
return this.getModel().getName();
}
public void setName(String name) {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
this.getModel().setName(name);
}
public Boolean getIp_null() {
return ip_null;
}
public void setIp_null(Boolean ip_null) {
this.ip_null = ip_null;
}
public ArrayList<String> getIp_arr() {
return ip_arr;
}
public void setIp_arr(ArrayList<String> ip_arr) {
this.ip_arr = ip_arr;
}
public String getIp_like() {
return ip_like;
}
public void setIp_like(String ip_like) {
this.ip_like = ip_like;
}
public String getIp() {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
return this.getModel().getIp();
}
public void setIp(String ip) {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
this.getModel().setIp(ip);
}
public Boolean getPort_null() {
return port_null;
}
public void setPort_null(Boolean port_null) {
this.port_null = port_null;
}
public ArrayList<Integer> getPort_arr() {
return port_arr;
}
public void setPort_arr(ArrayList<Integer> port_arr) {
this.port_arr = port_arr;
}
public Integer getPort_gt() {
return port_gt;
}
public void setPort_gt(Integer port_gt) {
this.port_gt = port_gt;
}
public Integer getPort_lt() {
return port_lt;
}
public void setPort_lt(Integer port_lt) {
this.port_lt = port_lt;
}
public Integer getPort_gte() {
return port_gte;
}
public void setPort_gte(Integer port_gte) {
this.port_gte = port_gte;
}
public Integer getPort_lte() {
return port_lte;
}
public void setPort_lte(Integer port_lte) {
this.port_lte = port_lte;
}
public Integer getPort() {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
return this.getModel().getPort();
}
public void setPort(Integer port) {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
this.getModel().setPort(port);
}
public Boolean getExpand_null() {
return expand_null;
}
public void setExpand_null(Boolean expand_null) {
this.expand_null = expand_null;
}
public ArrayList<String> getExpand_arr() {
return expand_arr;
}
public void setExpand_arr(ArrayList<String> expand_arr) {
this.expand_arr = expand_arr;
}
public String getExpand_like() {
return expand_like;
}
public void setExpand_like(String expand_like) {
this.expand_like = expand_like;
}
public String getExpand() {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
return this.getModel().getExpand();
}
public void setExpand(String expand) {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
this.getModel().setExpand(expand);
}
public Boolean getLongitude_null() {
return longitude_null;
}
public void setLongitude_null(Boolean longitude_null) {
this.longitude_null = longitude_null;
}
public ArrayList<Float> getLongitude_arr() {
return longitude_arr;
}
public void setLongitude_arr(ArrayList<Float> longitude_arr) {
this.longitude_arr = longitude_arr;
}
public Float getLongitude_gt() {
return longitude_gt;
}
public void setLongitude_gt(Float longitude_gt) {
this.longitude_gt = longitude_gt;
}
public Float getLongitude_lt() {
return longitude_lt;
}
public void setLongitude_lt(Float longitude_lt) {
this.longitude_lt = longitude_lt;
}
public Float getLongitude_gte() {
return longitude_gte;
}
public void setLongitude_gte(Float longitude_gte) {
this.longitude_gte = longitude_gte;
}
public Float getLongitude_lte() {
return longitude_lte;
}
public void setLongitude_lte(Float longitude_lte) {
this.longitude_lte = longitude_lte;
}
public Float getLongitude() {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
return this.getModel().getLongitude();
}
public void setLongitude(Float longitude) {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
this.getModel().setLongitude(longitude);
}
public Boolean getLatitude_null() {
return latitude_null;
}
public void setLatitude_null(Boolean latitude_null) {
this.latitude_null = latitude_null;
}
public ArrayList<Float> getLatitude_arr() {
return latitude_arr;
}
public void setLatitude_arr(ArrayList<Float> latitude_arr) {
this.latitude_arr = latitude_arr;
}
public Float getLatitude_gt() {
return latitude_gt;
}
public void setLatitude_gt(Float latitude_gt) {
this.latitude_gt = latitude_gt;
}
public Float getLatitude_lt() {
return latitude_lt;
}
public void setLatitude_lt(Float latitude_lt) {
this.latitude_lt = latitude_lt;
}
public Float getLatitude_gte() {
return latitude_gte;
}
public void setLatitude_gte(Float latitude_gte) {
this.latitude_gte = latitude_gte;
}
public Float getLatitude_lte() {
return latitude_lte;
}
public void setLatitude_lte(Float latitude_lte) {
this.latitude_lte = latitude_lte;
}
public Float getLatitude() {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
return this.getModel().getLatitude();
}
public void setLatitude(Float latitude) {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
this.getModel().setLatitude(latitude);
}
public ArrayList<Integer> getStatus_arr() {
return status_arr;
}
public void setStatus_arr(ArrayList<Integer> status_arr) {
this.status_arr = status_arr;
}
public Integer getStatus_gt() {
return status_gt;
}
public void setStatus_gt(Integer status_gt) {
this.status_gt = status_gt;
}
public Integer getStatus_lt() {
return status_lt;
}
public void setStatus_lt(Integer status_lt) {
this.status_lt = status_lt;
}
public Integer getStatus_gte() {
return status_gte;
}
public void setStatus_gte(Integer status_gte) {
this.status_gte = status_gte;
}
public Integer getStatus_lte() {
return status_lte;
}
public void setStatus_lte(Integer status_lte) {
this.status_lte = status_lte;
}
public Integer getStatus() {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
return this.getModel().getStatus();
}
public void setStatus(Integer status) {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
this.getModel().setStatus(status);
}
}
\ No newline at end of file
......@@ -25,6 +25,21 @@ public class FlowDataVoBase extends FlowData implements VoInterface<FlowData> {
private Long id_lte;
@JsonIgnore
private ArrayList<Date> eventTime_arr;
@JsonIgnore
private Date eventTime_gt;
@JsonIgnore
private Date eventTime_lt;
@JsonIgnore
private Date eventTime_gte;
@JsonIgnore
private Date eventTime_lte;
@JsonIgnore
private ArrayList<String> unid_arr;
@JsonIgnore
......@@ -301,24 +316,6 @@ public class FlowDataVoBase extends FlowData implements VoInterface<FlowData> {
private Float sampleNumOut_lte;
@JsonIgnore
private Boolean eventTime_null;
@JsonIgnore
private ArrayList<Date> eventTime_arr;
@JsonIgnore
private Date eventTime_gt;
@JsonIgnore
private Date eventTime_lt;
@JsonIgnore
private Date eventTime_gte;
@JsonIgnore
private Date eventTime_lte;
@JsonIgnore
private Boolean distTime_null;
@JsonIgnore
......@@ -461,6 +458,60 @@ public class FlowDataVoBase extends FlowData implements VoInterface<FlowData> {
this.getModel().setId(id);
}
public ArrayList<Date> getEventTime_arr() {
return eventTime_arr;
}
public void setEventTime_arr(ArrayList<Date> eventTime_arr) {
this.eventTime_arr = eventTime_arr;
}
public Date getEventTime_gt() {
return eventTime_gt;
}
public void setEventTime_gt(Date eventTime_gt) {
this.eventTime_gt = eventTime_gt;
}
public Date getEventTime_lt() {
return eventTime_lt;
}
public void setEventTime_lt(Date eventTime_lt) {
this.eventTime_lt = eventTime_lt;
}
public Date getEventTime_gte() {
return eventTime_gte;
}
public void setEventTime_gte(Date eventTime_gte) {
this.eventTime_gte = eventTime_gte;
}
public Date getEventTime_lte() {
return eventTime_lte;
}
public void setEventTime_lte(Date eventTime_lte) {
this.eventTime_lte = eventTime_lte;
}
public Date getEventTime() {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
return this.getModel().getEventTime();
}
public void setEventTime(Date eventTime) {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
this.getModel().setEventTime(eventTime);
}
public ArrayList<String> getUnid_arr() {
return unid_arr;
}
......@@ -1463,68 +1514,6 @@ public class FlowDataVoBase extends FlowData implements VoInterface<FlowData> {
this.getModel().setSampleNumOut(sampleNumOut);
}
public Boolean getEventTime_null() {
return eventTime_null;
}
public void setEventTime_null(Boolean eventTime_null) {
this.eventTime_null = eventTime_null;
}
public ArrayList<Date> getEventTime_arr() {
return eventTime_arr;
}
public void setEventTime_arr(ArrayList<Date> eventTime_arr) {
this.eventTime_arr = eventTime_arr;
}
public Date getEventTime_gt() {
return eventTime_gt;
}
public void setEventTime_gt(Date eventTime_gt) {
this.eventTime_gt = eventTime_gt;
}
public Date getEventTime_lt() {
return eventTime_lt;
}
public void setEventTime_lt(Date eventTime_lt) {
this.eventTime_lt = eventTime_lt;
}
public Date getEventTime_gte() {
return eventTime_gte;
}
public void setEventTime_gte(Date eventTime_gte) {
this.eventTime_gte = eventTime_gte;
}
public Date getEventTime_lte() {
return eventTime_lte;
}
public void setEventTime_lte(Date eventTime_lte) {
this.eventTime_lte = eventTime_lte;
}
public Date getEventTime() {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
return this.getModel().getEventTime();
}
public void setEventTime(Date eventTime) {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
this.getModel().setEventTime(eventTime);
}
public Boolean getDistTime_null() {
return distTime_null;
}
......
......@@ -25,6 +25,21 @@ public class FlowEventVoBase extends FlowEvent implements VoInterface<FlowEvent>
private Long id_lte;
@JsonIgnore
private ArrayList<Date> eventTime_arr;
@JsonIgnore
private Date eventTime_gt;
@JsonIgnore
private Date eventTime_lt;
@JsonIgnore
private Date eventTime_gte;
@JsonIgnore
private Date eventTime_lte;
@JsonIgnore
private ArrayList<String> unid_arr;
@JsonIgnore
......@@ -58,24 +73,6 @@ public class FlowEventVoBase extends FlowEvent implements VoInterface<FlowEvent>
private String eventType_like;
@JsonIgnore
private Boolean eventTime_null;
@JsonIgnore
private ArrayList<Date> eventTime_arr;
@JsonIgnore
private Date eventTime_gt;
@JsonIgnore
private Date eventTime_lt;
@JsonIgnore
private Date eventTime_gte;
@JsonIgnore
private Date eventTime_lte;
@JsonIgnore
private Boolean eventId_null;
@JsonIgnore
......@@ -221,6 +218,60 @@ public class FlowEventVoBase extends FlowEvent implements VoInterface<FlowEvent>
this.getModel().setId(id);
}
public ArrayList<Date> getEventTime_arr() {
return eventTime_arr;
}
public void setEventTime_arr(ArrayList<Date> eventTime_arr) {
this.eventTime_arr = eventTime_arr;
}
public Date getEventTime_gt() {
return eventTime_gt;
}
public void setEventTime_gt(Date eventTime_gt) {
this.eventTime_gt = eventTime_gt;
}
public Date getEventTime_lt() {
return eventTime_lt;
}
public void setEventTime_lt(Date eventTime_lt) {
this.eventTime_lt = eventTime_lt;
}
public Date getEventTime_gte() {
return eventTime_gte;
}
public void setEventTime_gte(Date eventTime_gte) {
this.eventTime_gte = eventTime_gte;
}
public Date getEventTime_lte() {
return eventTime_lte;
}
public void setEventTime_lte(Date eventTime_lte) {
this.eventTime_lte = eventTime_lte;
}
public Date getEventTime() {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
return this.getModel().getEventTime();
}
public void setEventTime(Date eventTime) {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
this.getModel().setEventTime(eventTime);
}
public ArrayList<String> getUnid_arr() {
return unid_arr;
}
......@@ -351,68 +402,6 @@ public class FlowEventVoBase extends FlowEvent implements VoInterface<FlowEvent>
this.getModel().setEventType(eventType);
}
public Boolean getEventTime_null() {
return eventTime_null;
}
public void setEventTime_null(Boolean eventTime_null) {
this.eventTime_null = eventTime_null;
}
public ArrayList<Date> getEventTime_arr() {
return eventTime_arr;
}
public void setEventTime_arr(ArrayList<Date> eventTime_arr) {
this.eventTime_arr = eventTime_arr;
}
public Date getEventTime_gt() {
return eventTime_gt;
}
public void setEventTime_gt(Date eventTime_gt) {
this.eventTime_gt = eventTime_gt;
}
public Date getEventTime_lt() {
return eventTime_lt;
}
public void setEventTime_lt(Date eventTime_lt) {
this.eventTime_lt = eventTime_lt;
}
public Date getEventTime_gte() {
return eventTime_gte;
}
public void setEventTime_gte(Date eventTime_gte) {
this.eventTime_gte = eventTime_gte;
}
public Date getEventTime_lte() {
return eventTime_lte;
}
public void setEventTime_lte(Date eventTime_lte) {
this.eventTime_lte = eventTime_lte;
}
public Date getEventTime() {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
return this.getModel().getEventTime();
}
public void setEventTime(Date eventTime) {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
this.getModel().setEventTime(eventTime);
}
public Boolean getEventId_null() {
return eventId_null;
}
......
......@@ -4,6 +4,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore;
import com.viontech.fanxing.commons.base.VoInterface;
import com.viontech.fanxing.commons.model.TrafficFace;
import java.util.ArrayList;
import java.util.Date;
public class TrafficFaceVoBase extends TrafficFace implements VoInterface<TrafficFace> {
private TrafficFace trafficFace;
......@@ -24,6 +25,21 @@ public class TrafficFaceVoBase extends TrafficFace implements VoInterface<Traffi
private Long id_lte;
@JsonIgnore
private ArrayList<Date> eventTime_arr;
@JsonIgnore
private Date eventTime_gt;
@JsonIgnore
private Date eventTime_lt;
@JsonIgnore
private Date eventTime_gte;
@JsonIgnore
private Date eventTime_lte;
@JsonIgnore
private ArrayList<String> unid_arr;
@JsonIgnore
......@@ -166,6 +182,60 @@ public class TrafficFaceVoBase extends TrafficFace implements VoInterface<Traffi
this.getModel().setId(id);
}
public ArrayList<Date> getEventTime_arr() {
return eventTime_arr;
}
public void setEventTime_arr(ArrayList<Date> eventTime_arr) {
this.eventTime_arr = eventTime_arr;
}
public Date getEventTime_gt() {
return eventTime_gt;
}
public void setEventTime_gt(Date eventTime_gt) {
this.eventTime_gt = eventTime_gt;
}
public Date getEventTime_lt() {
return eventTime_lt;
}
public void setEventTime_lt(Date eventTime_lt) {
this.eventTime_lt = eventTime_lt;
}
public Date getEventTime_gte() {
return eventTime_gte;
}
public void setEventTime_gte(Date eventTime_gte) {
this.eventTime_gte = eventTime_gte;
}
public Date getEventTime_lte() {
return eventTime_lte;
}
public void setEventTime_lte(Date eventTime_lte) {
this.eventTime_lte = eventTime_lte;
}
public Date getEventTime() {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
return this.getModel().getEventTime();
}
public void setEventTime(Date eventTime) {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
this.getModel().setEventTime(eventTime);
}
public ArrayList<String> getUnid_arr() {
return unid_arr;
}
......
......@@ -25,6 +25,21 @@ public class TrafficVoBase extends Traffic implements VoInterface<Traffic> {
private Long id_lte;
@JsonIgnore
private ArrayList<Date> eventTime_arr;
@JsonIgnore
private Date eventTime_gt;
@JsonIgnore
private Date eventTime_lt;
@JsonIgnore
private Date eventTime_gte;
@JsonIgnore
private Date eventTime_lte;
@JsonIgnore
private ArrayList<String> unid_arr;
@JsonIgnore
......@@ -67,21 +82,6 @@ public class TrafficVoBase extends Traffic implements VoInterface<Traffic> {
private String eventType_like;
@JsonIgnore
private ArrayList<Date> eventDt_arr;
@JsonIgnore
private Date eventDt_gt;
@JsonIgnore
private Date eventDt_lt;
@JsonIgnore
private Date eventDt_gte;
@JsonIgnore
private Date eventDt_lte;
@JsonIgnore
private Boolean channelUnid_null;
@JsonIgnore
......@@ -431,6 +431,60 @@ public class TrafficVoBase extends Traffic implements VoInterface<Traffic> {
this.getModel().setId(id);
}
public ArrayList<Date> getEventTime_arr() {
return eventTime_arr;
}
public void setEventTime_arr(ArrayList<Date> eventTime_arr) {
this.eventTime_arr = eventTime_arr;
}
public Date getEventTime_gt() {
return eventTime_gt;
}
public void setEventTime_gt(Date eventTime_gt) {
this.eventTime_gt = eventTime_gt;
}
public Date getEventTime_lt() {
return eventTime_lt;
}
public void setEventTime_lt(Date eventTime_lt) {
this.eventTime_lt = eventTime_lt;
}
public Date getEventTime_gte() {
return eventTime_gte;
}
public void setEventTime_gte(Date eventTime_gte) {
this.eventTime_gte = eventTime_gte;
}
public Date getEventTime_lte() {
return eventTime_lte;
}
public void setEventTime_lte(Date eventTime_lte) {
this.eventTime_lte = eventTime_lte;
}
public Date getEventTime() {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
return this.getModel().getEventTime();
}
public void setEventTime(Date eventTime) {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
this.getModel().setEventTime(eventTime);
}
public ArrayList<String> getUnid_arr() {
return unid_arr;
}
......@@ -599,60 +653,6 @@ public class TrafficVoBase extends Traffic implements VoInterface<Traffic> {
this.getModel().setEventType(eventType);
}
public ArrayList<Date> getEventDt_arr() {
return eventDt_arr;
}
public void setEventDt_arr(ArrayList<Date> eventDt_arr) {
this.eventDt_arr = eventDt_arr;
}
public Date getEventDt_gt() {
return eventDt_gt;
}
public void setEventDt_gt(Date eventDt_gt) {
this.eventDt_gt = eventDt_gt;
}
public Date getEventDt_lt() {
return eventDt_lt;
}
public void setEventDt_lt(Date eventDt_lt) {
this.eventDt_lt = eventDt_lt;
}
public Date getEventDt_gte() {
return eventDt_gte;
}
public void setEventDt_gte(Date eventDt_gte) {
this.eventDt_gte = eventDt_gte;
}
public Date getEventDt_lte() {
return eventDt_lte;
}
public void setEventDt_lte(Date eventDt_lte) {
this.eventDt_lte = eventDt_lte;
}
public Date getEventDt() {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
return this.getModel().getEventDt();
}
public void setEventDt(Date eventDt) {
if(getModel() == null ){
throw new RuntimeException("model is null");
}
this.getModel().setEventDt(eventDt);
}
public Boolean getChannelUnid_null() {
return channelUnid_null;
}
......
......@@ -48,6 +48,15 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<excludes>
<exclude>application.yml</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
<resources>
<resource>
......@@ -56,12 +65,6 @@
<include>**/*.xml</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>*</include>
</includes>
</resource>
</resources>
</build>
</project>
\ No newline at end of file
......@@ -7,6 +7,7 @@ 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.apache.commons.lang3.StringUtils;
import org.springframework.batch.item.ExecutionContext;
import org.springframework.batch.item.ItemProcessor;
import org.springframework.batch.item.ItemStream;
......@@ -54,9 +55,10 @@ public class BehaviorProcessor implements ItemStream, ItemProcessor<JSONObject,
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");
String picArray = item.getString("pic_path_array");
if (StringUtils.isEmpty(eventRefid)) {
eventRefid = eventData.getString("ID");
}
behavior.setEventType(eventType);
behavior.setEventRefid(eventRefid);
......@@ -68,7 +70,6 @@ public class BehaviorProcessor implements ItemStream, ItemProcessor<JSONObject,
behavior.setEventData(eventData == null ? null : eventData.toJSONString());
behavior.setVideo(video == null ? null : video.toJSONString());
behavior.setAuxDevInfo(auxDevInfo == null ? null : auxDevInfo.toJSONString());
return behavior;
}
......
......@@ -38,12 +38,14 @@ public class PicProcessor implements ItemStream, ItemProcessor<JSONObject, JSONO
for (int i = 0; i < pics.size(); i++) {
JSONObject picObject = pics.getJSONObject(i);
String base64 = picObject.getString("pic_base64");
String format = picObject.getString("format");
String picUnid = picObject.getString("pic_unid");
picObject.remove("pic_base64");
if (base64 != null) {
String format = picObject.getString("format");
String picUnid = picObject.getString("pic_unid");
picObject.remove("pic_base64");
String path = picUtils.savePicBase64(picUnid, eventTime, format, base64);
picList.add(path);
String path = picUtils.savePicBase64(picUnid, eventTime, format, base64);
picList.add(path);
}
}
String picPathArray = String.join(",", picList);
......
......@@ -8,6 +8,7 @@ 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.apache.commons.lang3.StringUtils;
import org.springframework.batch.item.ExecutionContext;
import org.springframework.batch.item.ItemProcessor;
import org.springframework.batch.item.ItemStream;
......@@ -58,6 +59,10 @@ public class TrafficFlowProcessor implements ItemProcessor<JSONObject, TrafficFl
String eventDt = item.getString("event_dt");
String picArray = item.getString("pic_path_array");
Date eventTime = DateUtil.parse(DateUtil.FORMAT_FULL, eventDt);
JSONObject eventData = item.getJSONObject("event_data");
if (StringUtils.isEmpty(eventRefid)) {
eventRefid = eventData.getString("ID");
}
flowEvent.setEventType(eventType);
flowEvent.setEventId(eventRefid);
......@@ -65,7 +70,6 @@ public class TrafficFlowProcessor implements ItemProcessor<JSONObject, TrafficFl
flowEvent.setPics(picArray);
// flowEvent.setTaskId(taskId);
JSONObject eventData = item.getJSONObject("event_data");
if (eventData != null) {
// 地理位置
JSONObject location = eventData.getJSONObject("location");
......
......@@ -8,6 +8,7 @@ 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.apache.commons.lang3.StringUtils;
import org.springframework.batch.item.ExecutionContext;
import org.springframework.batch.item.ItemProcessor;
import org.springframework.batch.item.ItemStream;
......@@ -55,21 +56,26 @@ public class TrafficProcessor implements ItemProcessor<JSONObject, TrafficConten
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");
String picArray = item.getString("pic_path_array");
JSONObject eventData = item.getJSONObject("event_data");
if (StringUtils.isEmpty(eventRefid)) {
eventRefid = eventData.getString("ID");
}
// todo taskId
traffic.setEventCate(eventCate);
traffic.setEventType(eventType);
traffic.setEventId(eventRefid);
traffic.setEventDt(eventTime);
traffic.setEventTime(eventTime);
traffic.setChannelUnid(channelUnid);
traffic.setPics(picArray);
// traffic.setTaskId(taskId);
JSONObject eventData = item.getJSONObject("event_data");
//非机动车类型
traffic.setXcycleType(eventData.getString("xcycle_type"));
......@@ -163,6 +169,7 @@ public class TrafficProcessor implements ItemProcessor<JSONObject, TrafficConten
if (face != null && face.size() > 0) {
for (int i = 0; i < face.size(); i++) {
TrafficFace trafficFace = new TrafficFace();
trafficFace.setEventTime(eventTime);
JSONObject faceData = face.getJSONObject(i);
Short sex = faceData.getShort("sex");
Short state = faceData.getShort("state");
......
......@@ -21,8 +21,8 @@ import java.util.List;
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)";
"task_id,event_type,event_cate,event_refid,event_time,event_data,pics,video,channel_unid,task_name,event_data_num) values (" +
":taskId,:eventType,:eventCate,:eventRefid,:eventTime,:eventData,:pics,:video,:channelUnid,:taskName,:eventDataNum)";
@Resource
private NamedParameterJdbcTemplate namedParameterJdbcTemplate;
......
......@@ -3,7 +3,7 @@ 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 lombok.extern.slf4j.Slf4j;
import org.springframework.batch.item.ItemWriter;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.http.ResponseEntity;
......@@ -11,9 +11,7 @@ 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;
/**
......@@ -31,26 +29,28 @@ public class ForwardWriter implements ItemWriter<ForwardContent> {
@Override
public void write(List<? extends ForwardContent> items) {
RestTemplate restTemplate = restTemplateBuilder.build();
List<ImmutablePair<Future<ResponseEntity<String>>, HttpCallable>> data = new ArrayList<>();
// 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);
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 @Slf4j
static class HttpCallable implements Runnable {
private final RestTemplate restTemplate;
private final Forward forward;
private final String json;
private int failed = 0;
public HttpCallable(RestTemplate restTemplate, Forward forward, String json) {
this.restTemplate = restTemplate;
......@@ -59,8 +59,17 @@ public class ForwardWriter implements ItemWriter<ForwardContent> {
}
@Override
public ResponseEntity<String> call() {
return restTemplate.postForEntity(forward.getUrl(), json, String.class);
public void run() {
try {
ResponseEntity<String> responseEntity = restTemplate.postForEntity(forward.getUrl(), json, String.class);
} catch (Exception e) {
failed += 1;
}
if (failed < 3) {
ForwardApp.THREAD_POOL_EXECUTOR.submit(this);
} else {
log.info("失败次数超过三次,不再发送,forwardId:{}", forward.getId());
}
}
}
}
......@@ -26,10 +26,10 @@ import java.util.stream.Collectors;
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,pics,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,:pics,:videoName)";
"event_cate,event_type,event_time,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,pics,video_name) values(" +
":eventCate,:eventType,:eventTime,:channelUnid,:plateColor,:plateNumber,:locationCode,:locationName,:laneCode,:directionCode,:vehicleType,:vehicleColor,:vehicleLogo,:illegalCode,:illegalState,:featureAnnualInspectionMark,:featurePendant,:featureDecoration,:featureSunShield,:xcycleType,:eventId,:specialType,:withHelmet,:jsonData,:pics,: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)";
"traffic_id,state,sex,upper_color,lower_color,event_time) values (:trafficId,:state,:sex,:upperColor,:lowerColor,:eventTime)";
@Resource
private NamedParameterJdbcTemplate namedParameterJdbcTemplate;
......
......@@ -41,6 +41,15 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<excludes>
<exclude>application.yml</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
<resources>
<resource>
......@@ -49,12 +58,6 @@
<include>**/*.xml</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>*</include>
</includes>
</resource>
</resources>
</build>
......
......@@ -40,6 +40,15 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<excludes>
<exclude>application.yml</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
<resources>
<resource>
......@@ -48,12 +57,6 @@
<include>**/*.xml</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>*</include>
</includes>
</resource>
</resources>
</build>
</project>
\ No newline at end of file
package com.viontech.fanxing.ops.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.Channel;
import com.viontech.fanxing.commons.model.ChannelExample;
import com.viontech.fanxing.commons.vo.ChannelVo;
import com.viontech.fanxing.ops.service.adapter.ChannelService;
import javax.annotation.Resource;
public abstract class ChannelBaseController extends BaseController<Channel, ChannelVo> {
@Resource
protected ChannelService channelService;
@Override
protected BaseExample getExample(ChannelVo channelVo, int type) {
ChannelExample channelExample = new ChannelExample();
ChannelExample.Criteria criteria = channelExample.createCriteria();
if (channelVo.getId() != null) {
criteria.andIdEqualTo(channelVo.getId());
}
if (channelVo.getId_arr() != null) {
criteria.andIdIn(channelVo.getId_arr());
}
if (channelVo.getId_gt() != null) {
criteria.andIdGreaterThan(channelVo.getId_gt());
}
if (channelVo.getId_lt() != null) {
criteria.andIdLessThan(channelVo.getId_lt());
}
if (channelVo.getId_gte() != null) {
criteria.andIdGreaterThanOrEqualTo(channelVo.getId_gte());
}
if (channelVo.getId_lte() != null) {
criteria.andIdLessThanOrEqualTo(channelVo.getId_lte());
}
if (channelVo.getUnid() != null) {
criteria.andUnidEqualTo(channelVo.getUnid());
}
if (channelVo.getUnid_arr() != null) {
criteria.andUnidIn(channelVo.getUnid_arr());
}
if (channelVo.getUnid_like() != null) {
criteria.andUnidLike(channelVo.getUnid_like());
}
if (channelVo.getChannelUnid() != null) {
criteria.andChannelUnidEqualTo(channelVo.getChannelUnid());
}
if (channelVo.getChannelUnid_arr() != null) {
criteria.andChannelUnidIn(channelVo.getChannelUnid_arr());
}
if (channelVo.getChannelUnid_like() != null) {
criteria.andChannelUnidLike(channelVo.getChannelUnid_like());
}
if (channelVo.getDeviceUnid() != null) {
criteria.andDeviceUnidEqualTo(channelVo.getDeviceUnid());
}
if (channelVo.getDeviceUnid_arr() != null) {
criteria.andDeviceUnidIn(channelVo.getDeviceUnid_arr());
}
if (channelVo.getDeviceUnid_like() != null) {
criteria.andDeviceUnidLike(channelVo.getDeviceUnid_like());
}
if (channelVo.getType() != null) {
criteria.andTypeEqualTo(channelVo.getType());
}
if (channelVo.getType_arr() != null) {
criteria.andTypeIn(channelVo.getType_arr());
}
if (channelVo.getType_gt() != null) {
criteria.andTypeGreaterThan(channelVo.getType_gt());
}
if (channelVo.getType_lt() != null) {
criteria.andTypeLessThan(channelVo.getType_lt());
}
if (channelVo.getType_gte() != null) {
criteria.andTypeGreaterThanOrEqualTo(channelVo.getType_gte());
}
if (channelVo.getType_lte() != null) {
criteria.andTypeLessThanOrEqualTo(channelVo.getType_lte());
}
if (channelVo.getStreamType() != null) {
criteria.andStreamTypeEqualTo(channelVo.getStreamType());
}
if (channelVo.getStreamType_null() != null) {
if (channelVo.getStreamType_null().booleanValue()) {
criteria.andStreamTypeIsNull();
} else {
criteria.andStreamTypeIsNotNull();
}
}
if (channelVo.getStreamType_arr() != null) {
criteria.andStreamTypeIn(channelVo.getStreamType_arr());
}
if (channelVo.getStreamType_gt() != null) {
criteria.andStreamTypeGreaterThan(channelVo.getStreamType_gt());
}
if (channelVo.getStreamType_lt() != null) {
criteria.andStreamTypeLessThan(channelVo.getStreamType_lt());
}
if (channelVo.getStreamType_gte() != null) {
criteria.andStreamTypeGreaterThanOrEqualTo(channelVo.getStreamType_gte());
}
if (channelVo.getStreamType_lte() != null) {
criteria.andStreamTypeLessThanOrEqualTo(channelVo.getStreamType_lte());
}
if (channelVo.getStreamPath() != null) {
criteria.andStreamPathEqualTo(channelVo.getStreamPath());
}
if (channelVo.getStreamPath_null() != null) {
if (channelVo.getStreamPath_null().booleanValue()) {
criteria.andStreamPathIsNull();
} else {
criteria.andStreamPathIsNotNull();
}
}
if (channelVo.getStreamPath_arr() != null) {
criteria.andStreamPathIn(channelVo.getStreamPath_arr());
}
if (channelVo.getStreamPath_like() != null) {
criteria.andStreamPathLike(channelVo.getStreamPath_like());
}
if (channelVo.getUsername() != null) {
criteria.andUsernameEqualTo(channelVo.getUsername());
}
if (channelVo.getUsername_null() != null) {
if (channelVo.getUsername_null().booleanValue()) {
criteria.andUsernameIsNull();
} else {
criteria.andUsernameIsNotNull();
}
}
if (channelVo.getUsername_arr() != null) {
criteria.andUsernameIn(channelVo.getUsername_arr());
}
if (channelVo.getUsername_like() != null) {
criteria.andUsernameLike(channelVo.getUsername_like());
}
if (channelVo.getPassword() != null) {
criteria.andPasswordEqualTo(channelVo.getPassword());
}
if (channelVo.getPassword_null() != null) {
if (channelVo.getPassword_null().booleanValue()) {
criteria.andPasswordIsNull();
} else {
criteria.andPasswordIsNotNull();
}
}
if (channelVo.getPassword_arr() != null) {
criteria.andPasswordIn(channelVo.getPassword_arr());
}
if (channelVo.getPassword_like() != null) {
criteria.andPasswordLike(channelVo.getPassword_like());
}
if (channelVo.getAddressUnid() != null) {
criteria.andAddressUnidEqualTo(channelVo.getAddressUnid());
}
if (channelVo.getAddressUnid_null() != null) {
if (channelVo.getAddressUnid_null().booleanValue()) {
criteria.andAddressUnidIsNull();
} else {
criteria.andAddressUnidIsNotNull();
}
}
if (channelVo.getAddressUnid_arr() != null) {
criteria.andAddressUnidIn(channelVo.getAddressUnid_arr());
}
if (channelVo.getAddressUnid_like() != null) {
criteria.andAddressUnidLike(channelVo.getAddressUnid_like());
}
if (channelVo.getName() != null) {
criteria.andNameEqualTo(channelVo.getName());
}
if (channelVo.getName_null() != null) {
if (channelVo.getName_null().booleanValue()) {
criteria.andNameIsNull();
} else {
criteria.andNameIsNotNull();
}
}
if (channelVo.getName_arr() != null) {
criteria.andNameIn(channelVo.getName_arr());
}
if (channelVo.getName_like() != null) {
criteria.andNameLike(channelVo.getName_like());
}
if (channelVo.getIp() != null) {
criteria.andIpEqualTo(channelVo.getIp());
}
if (channelVo.getIp_null() != null) {
if (channelVo.getIp_null().booleanValue()) {
criteria.andIpIsNull();
} else {
criteria.andIpIsNotNull();
}
}
if (channelVo.getIp_arr() != null) {
criteria.andIpIn(channelVo.getIp_arr());
}
if (channelVo.getIp_like() != null) {
criteria.andIpLike(channelVo.getIp_like());
}
if (channelVo.getPort() != null) {
criteria.andPortEqualTo(channelVo.getPort());
}
if (channelVo.getPort_null() != null) {
if (channelVo.getPort_null().booleanValue()) {
criteria.andPortIsNull();
} else {
criteria.andPortIsNotNull();
}
}
if (channelVo.getPort_arr() != null) {
criteria.andPortIn(channelVo.getPort_arr());
}
if (channelVo.getPort_gt() != null) {
criteria.andPortGreaterThan(channelVo.getPort_gt());
}
if (channelVo.getPort_lt() != null) {
criteria.andPortLessThan(channelVo.getPort_lt());
}
if (channelVo.getPort_gte() != null) {
criteria.andPortGreaterThanOrEqualTo(channelVo.getPort_gte());
}
if (channelVo.getPort_lte() != null) {
criteria.andPortLessThanOrEqualTo(channelVo.getPort_lte());
}
if (channelVo.getExpand() != null) {
criteria.andExpandEqualTo(channelVo.getExpand());
}
if (channelVo.getExpand_null() != null) {
if (channelVo.getExpand_null().booleanValue()) {
criteria.andExpandIsNull();
} else {
criteria.andExpandIsNotNull();
}
}
if (channelVo.getExpand_arr() != null) {
criteria.andExpandIn(channelVo.getExpand_arr());
}
if (channelVo.getExpand_like() != null) {
criteria.andExpandLike(channelVo.getExpand_like());
}
if (channelVo.getLongitude() != null) {
criteria.andLongitudeEqualTo(channelVo.getLongitude());
}
if (channelVo.getLongitude_null() != null) {
if (channelVo.getLongitude_null().booleanValue()) {
criteria.andLongitudeIsNull();
} else {
criteria.andLongitudeIsNotNull();
}
}
if (channelVo.getLongitude_arr() != null) {
criteria.andLongitudeIn(channelVo.getLongitude_arr());
}
if (channelVo.getLongitude_gt() != null) {
criteria.andLongitudeGreaterThan(channelVo.getLongitude_gt());
}
if (channelVo.getLongitude_lt() != null) {
criteria.andLongitudeLessThan(channelVo.getLongitude_lt());
}
if (channelVo.getLongitude_gte() != null) {
criteria.andLongitudeGreaterThanOrEqualTo(channelVo.getLongitude_gte());
}
if (channelVo.getLongitude_lte() != null) {
criteria.andLongitudeLessThanOrEqualTo(channelVo.getLongitude_lte());
}
if (channelVo.getLatitude() != null) {
criteria.andLatitudeEqualTo(channelVo.getLatitude());
}
if (channelVo.getLatitude_null() != null) {
if (channelVo.getLatitude_null().booleanValue()) {
criteria.andLatitudeIsNull();
} else {
criteria.andLatitudeIsNotNull();
}
}
if (channelVo.getLatitude_arr() != null) {
criteria.andLatitudeIn(channelVo.getLatitude_arr());
}
if (channelVo.getLatitude_gt() != null) {
criteria.andLatitudeGreaterThan(channelVo.getLatitude_gt());
}
if (channelVo.getLatitude_lt() != null) {
criteria.andLatitudeLessThan(channelVo.getLatitude_lt());
}
if (channelVo.getLatitude_gte() != null) {
criteria.andLatitudeGreaterThanOrEqualTo(channelVo.getLatitude_gte());
}
if (channelVo.getLatitude_lte() != null) {
criteria.andLatitudeLessThanOrEqualTo(channelVo.getLatitude_lte());
}
if (channelVo.getStatus() != null) {
criteria.andStatusEqualTo(channelVo.getStatus());
}
if (channelVo.getStatus_arr() != null) {
criteria.andStatusIn(channelVo.getStatus_arr());
}
if (channelVo.getStatus_gt() != null) {
criteria.andStatusGreaterThan(channelVo.getStatus_gt());
}
if (channelVo.getStatus_lt() != null) {
criteria.andStatusLessThan(channelVo.getStatus_lt());
}
if (channelVo.getStatus_gte() != null) {
criteria.andStatusGreaterThanOrEqualTo(channelVo.getStatus_gte());
}
if (channelVo.getStatus_lte() != null) {
criteria.andStatusLessThanOrEqualTo(channelVo.getStatus_lte());
}
return channelExample;
}
@Override
protected BaseService<Channel> getService() {
return channelService;
}
}
\ No newline at end of file
package com.viontech.fanxing.ops.controller.web;
import com.viontech.fanxing.commons.base.BaseExample;
import com.viontech.fanxing.commons.model.ChannelExample;
import com.viontech.fanxing.commons.vo.ChannelVo;
import com.viontech.fanxing.ops.controller.base.ChannelBaseController;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
@RequestMapping("/channels")
public class ChannelController extends ChannelBaseController {
@Override
protected BaseExample getExample(ChannelVo channelVo, int type) {
ChannelExample channelExample = (ChannelExample) super.getExample(channelVo, type);
return channelExample;
}
}
\ No newline at end of file
package com.viontech.fanxing.ops.mapper;
import com.viontech.fanxing.commons.base.BaseMapper;
import com.viontech.fanxing.commons.model.Channel;
import com.viontech.fanxing.commons.model.ChannelExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface ChannelMapper extends BaseMapper {
int countByExample(ChannelExample example);
int deleteByExample(ChannelExample example);
int deleteByPrimaryKey(Long id);
int insert(Channel record);
int insertSelective(Channel record);
List<Channel> selectByExample(ChannelExample example);
Channel selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") Channel record, @Param("example") ChannelExample example);
int updateByExample(@Param("record") Channel record, @Param("example") ChannelExample example);
int updateByPrimaryKeySelective(Channel record);
int updateByPrimaryKey(Channel record);
}
\ No newline at end of file
<?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.ops.mapper.ChannelMapper" >
<resultMap id="BaseResultMapRoot" type="com.viontech.fanxing.commons.model.Channel" >
<id column="channel_id" property="id" />
<result column="channel_unid" property="unid" />
<result column="channel_channel_unid" property="channelUnid" />
<result column="channel_device_unid" property="deviceUnid" />
<result column="channel_type" property="type" />
<result column="channel_stream_type" property="streamType" />
<result column="channel_stream_path" property="streamPath" />
<result column="channel_username" property="username" />
<result column="channel_password" property="password" />
<result column="channel_address_unid" property="addressUnid" />
<result column="channel_name" property="name" />
<result column="channel_ip" property="ip" />
<result column="channel_port" property="port" />
<result column="channel_expand" property="expand" />
<result column="channel_longitude" property="longitude" />
<result column="channel_latitude" property="latitude" />
<result column="channel_status" property="status" />
</resultMap>
<resultMap id="BaseResultMap" type="com.viontech.fanxing.commons.model.Channel" extends="BaseResultMapRoot" />
<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" >
`channel`.id as channel_id, `channel`.unid as channel_unid, `channel`.channel_unid as channel_channel_unid,
`channel`.device_unid as channel_device_unid, `channel`.`type` as `channel_type`,
`channel`.stream_type as channel_stream_type, `channel`.stream_path as channel_stream_path,
`channel`.username as channel_username, `channel`.`password` as `channel_password`,
`channel`.address_unid as channel_address_unid, `channel`.`name` as `channel_name`,
`channel`.ip as channel_ip, `channel`.port as channel_port, `channel`.expand as channel_expand,
`channel`.longitude as channel_longitude, `channel`.latitude as channel_latitude,
`channel`.`status` as `channel_status`
</sql>
<sql id="Base_Column_List" >
<if test="!(_parameter.getClass().getSimpleName() == 'ChannelExample')" >
<include refid="com.viontech.fanxing.ops.mapper.ChannelMapper.Base_Column_List_Root" />
</if>
<if test="_parameter.getClass().getSimpleName() == 'ChannelExample'" >
<foreach collection="columnContainerSet" item="columns" separator="," >
<choose >
<when test="columns.tableName == 's_channel'.toString()" >
<if test="columns.valid" >
${columns.columnContainerStr}
</if>
<if test="!columns.valid" >
<include refid="com.viontech.fanxing.ops.mapper.ChannelMapper.Base_Column_List_Root" />
</if>
</when>
</choose>
</foreach>
</if>
</sql>
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.viontech.fanxing.commons.model.ChannelExample" >
select
<if test="distinct" >
distinct
</if>
<include refid="Base_Column_List" />
from `s_channel` `channel`
<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="BaseResultMap" parameterType="java.lang.Long" >
select
<include refid="Base_Column_List" />
from `s_channel` `channel`
where `channel`.id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
delete from `s_channel` `channel`
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.viontech.fanxing.commons.model.ChannelExample" >
delete from `s_channel` `channel`
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.viontech.fanxing.commons.model.Channel" useGeneratedKeys="true" keyProperty="id" keyColumn="id" >
insert into `s_channel` (unid, channel_unid, device_unid,
`type`, stream_type, stream_path,
username, `password`, address_unid,
`name`, ip, port, expand,
longitude, latitude, `status`
)
values (#{unid,jdbcType=VARCHAR}, #{channelUnid,jdbcType=VARCHAR}, #{deviceUnid,jdbcType=VARCHAR},
#{type,jdbcType=INTEGER}, #{streamType,jdbcType=INTEGER}, #{streamPath,jdbcType=VARCHAR},
#{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, #{addressUnid,jdbcType=VARCHAR},
#{name,jdbcType=VARCHAR}, #{ip,jdbcType=VARCHAR}, #{port,jdbcType=INTEGER}, #{expand,jdbcType=VARCHAR},
#{longitude,jdbcType=REAL}, #{latitude,jdbcType=REAL}, #{status,jdbcType=INTEGER}
)
</insert>
<insert id="insertSelective" parameterType="com.viontech.fanxing.commons.model.Channel" useGeneratedKeys="true" keyProperty="id" keyColumn="id" >
insert into `s_channel`
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="unid != null" >
unid,
</if>
<if test="channelUnid != null" >
channel_unid,
</if>
<if test="deviceUnid != null" >
device_unid,
</if>
<if test="type != null" >
`type`,
</if>
<if test="streamType != null" >
stream_type,
</if>
<if test="streamPath != null" >
stream_path,
</if>
<if test="username != null" >
username,
</if>
<if test="password != null" >
`password`,
</if>
<if test="addressUnid != null" >
address_unid,
</if>
<if test="name != null" >
`name`,
</if>
<if test="ip != null" >
ip,
</if>
<if test="port != null" >
port,
</if>
<if test="expand != null" >
expand,
</if>
<if test="longitude != null" >
longitude,
</if>
<if test="latitude != null" >
latitude,
</if>
<if test="status != null" >
`status`,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="unid != null" >
#{unid,jdbcType=VARCHAR},
</if>
<if test="channelUnid != null" >
#{channelUnid,jdbcType=VARCHAR},
</if>
<if test="deviceUnid != null" >
#{deviceUnid,jdbcType=VARCHAR},
</if>
<if test="type != null" >
#{type,jdbcType=INTEGER},
</if>
<if test="streamType != null" >
#{streamType,jdbcType=INTEGER},
</if>
<if test="streamPath != null" >
#{streamPath,jdbcType=VARCHAR},
</if>
<if test="username != null" >
#{username,jdbcType=VARCHAR},
</if>
<if test="password != null" >
#{password,jdbcType=VARCHAR},
</if>
<if test="addressUnid != null" >
#{addressUnid,jdbcType=VARCHAR},
</if>
<if test="name != null" >
#{name,jdbcType=VARCHAR},
</if>
<if test="ip != null" >
#{ip,jdbcType=VARCHAR},
</if>
<if test="port != null" >
#{port,jdbcType=INTEGER},
</if>
<if test="expand != null" >
#{expand,jdbcType=VARCHAR},
</if>
<if test="longitude != null" >
#{longitude,jdbcType=REAL},
</if>
<if test="latitude != null" >
#{latitude,jdbcType=REAL},
</if>
<if test="status != null" >
#{status,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.viontech.fanxing.commons.model.ChannelExample" resultType="java.lang.Integer" >
select count(*) from `s_channel` `channel`
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map" >
update `s_channel` `channel`
<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.channelUnid != null" >
channel_unid = #{record.channelUnid,jdbcType=VARCHAR},
</if>
<if test="record.deviceUnid != null" >
device_unid = #{record.deviceUnid,jdbcType=VARCHAR},
</if>
<if test="record.type != null" >
`type` = #{record.type,jdbcType=INTEGER},
</if>
<if test="record.streamType != null" >
stream_type = #{record.streamType,jdbcType=INTEGER},
</if>
<if test="record.streamPath != null" >
stream_path = #{record.streamPath,jdbcType=VARCHAR},
</if>
<if test="record.username != null" >
username = #{record.username,jdbcType=VARCHAR},
</if>
<if test="record.password != null" >
`password` = #{record.password,jdbcType=VARCHAR},
</if>
<if test="record.addressUnid != null" >
address_unid = #{record.addressUnid,jdbcType=VARCHAR},
</if>
<if test="record.name != null" >
`name` = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.ip != null" >
ip = #{record.ip,jdbcType=VARCHAR},
</if>
<if test="record.port != null" >
port = #{record.port,jdbcType=INTEGER},
</if>
<if test="record.expand != null" >
expand = #{record.expand,jdbcType=VARCHAR},
</if>
<if test="record.longitude != null" >
longitude = #{record.longitude,jdbcType=REAL},
</if>
<if test="record.latitude != null" >
latitude = #{record.latitude,jdbcType=REAL},
</if>
<if test="record.status != null" >
`status` = #{record.status,jdbcType=INTEGER},
</if>
</set>
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map" >
update `s_channel` `channel`
set id = #{record.id,jdbcType=BIGINT},
unid = #{record.unid,jdbcType=VARCHAR},
channel_unid = #{record.channelUnid,jdbcType=VARCHAR},
device_unid = #{record.deviceUnid,jdbcType=VARCHAR},
`type` = #{record.type,jdbcType=INTEGER},
stream_type = #{record.streamType,jdbcType=INTEGER},
stream_path = #{record.streamPath,jdbcType=VARCHAR},
username = #{record.username,jdbcType=VARCHAR},
`password` = #{record.password,jdbcType=VARCHAR},
address_unid = #{record.addressUnid,jdbcType=VARCHAR},
`name` = #{record.name,jdbcType=VARCHAR},
ip = #{record.ip,jdbcType=VARCHAR},
port = #{record.port,jdbcType=INTEGER},
expand = #{record.expand,jdbcType=VARCHAR},
longitude = #{record.longitude,jdbcType=REAL},
latitude = #{record.latitude,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.Channel" >
update `s_channel`
<set >
<if test="unid != null" >
unid = #{unid,jdbcType=VARCHAR},
</if>
<if test="channelUnid != null" >
channel_unid = #{channelUnid,jdbcType=VARCHAR},
</if>
<if test="deviceUnid != null" >
device_unid = #{deviceUnid,jdbcType=VARCHAR},
</if>
<if test="type != null" >
`type` = #{type,jdbcType=INTEGER},
</if>
<if test="streamType != null" >
stream_type = #{streamType,jdbcType=INTEGER},
</if>
<if test="streamPath != null" >
stream_path = #{streamPath,jdbcType=VARCHAR},
</if>
<if test="username != null" >
username = #{username,jdbcType=VARCHAR},
</if>
<if test="password != null" >
`password` = #{password,jdbcType=VARCHAR},
</if>
<if test="addressUnid != null" >
address_unid = #{addressUnid,jdbcType=VARCHAR},
</if>
<if test="name != null" >
`name` = #{name,jdbcType=VARCHAR},
</if>
<if test="ip != null" >
ip = #{ip,jdbcType=VARCHAR},
</if>
<if test="port != null" >
port = #{port,jdbcType=INTEGER},
</if>
<if test="expand != null" >
expand = #{expand,jdbcType=VARCHAR},
</if>
<if test="longitude != null" >
longitude = #{longitude,jdbcType=REAL},
</if>
<if test="latitude != null" >
latitude = #{latitude,jdbcType=REAL},
</if>
<if test="status != null" >
`status` = #{status,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.viontech.fanxing.commons.model.Channel" >
update `s_channel`
set unid = #{unid,jdbcType=VARCHAR},
channel_unid = #{channelUnid,jdbcType=VARCHAR},
device_unid = #{deviceUnid,jdbcType=VARCHAR},
`type` = #{type,jdbcType=INTEGER},
stream_type = #{streamType,jdbcType=INTEGER},
stream_path = #{streamPath,jdbcType=VARCHAR},
username = #{username,jdbcType=VARCHAR},
`password` = #{password,jdbcType=VARCHAR},
address_unid = #{addressUnid,jdbcType=VARCHAR},
`name` = #{name,jdbcType=VARCHAR},
ip = #{ip,jdbcType=VARCHAR},
port = #{port,jdbcType=INTEGER},
expand = #{expand,jdbcType=VARCHAR},
longitude = #{longitude,jdbcType=REAL},
latitude = #{latitude,jdbcType=REAL},
`status` = #{status,jdbcType=INTEGER}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
package com.viontech.fanxing.ops.service.adapter;
import com.viontech.fanxing.commons.base.BaseService;
import com.viontech.fanxing.commons.model.Channel;
public interface ChannelService extends BaseService<Channel> {
}
\ No newline at end of file
package com.viontech.fanxing.ops.service.impl;
import com.viontech.fanxing.commons.base.BaseMapper;
import com.viontech.fanxing.commons.base.BaseServiceImpl;
import com.viontech.fanxing.commons.model.Channel;
import com.viontech.fanxing.ops.mapper.ChannelMapper;
import com.viontech.fanxing.ops.service.adapter.ChannelService;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
@Service
public class ChannelServiceImpl extends BaseServiceImpl<Channel> implements ChannelService {
@Resource
private ChannelMapper channelMapper;
@Override
public BaseMapper<Channel> getMapper() {
return channelMapper;
}
}
\ No newline at end of file
......@@ -40,6 +40,15 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<excludes>
<exclude>application.yml</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
<resources>
<resource>
......@@ -48,12 +57,6 @@
<include>**/*.xml</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>*</include>
</includes>
</resource>
</resources>
</build>
</project>
\ No newline at end of file
......@@ -37,6 +37,24 @@ public abstract class BehaviorBaseController extends BaseController<Behavior, Be
if(behaviorVo.getId_lte() != null) {
criteria.andIdLessThanOrEqualTo(behaviorVo.getId_lte());
}
if(behaviorVo.getEventTime() != null) {
criteria.andEventTimeEqualTo(behaviorVo.getEventTime());
}
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.getUnid() != null) {
criteria.andUnidEqualTo(behaviorVo.getUnid());
}
......@@ -119,31 +137,6 @@ public abstract class BehaviorBaseController extends BaseController<Behavior, Be
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.getPics() != null) {
criteria.andPicsEqualTo(behaviorVo.getPics());
}
......@@ -176,38 +169,6 @@ public abstract class BehaviorBaseController extends BaseController<Behavior, Be
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());
}
......
......@@ -37,6 +37,24 @@ public abstract class FlowDataBaseController extends BaseController<FlowData, Fl
if(flowDataVo.getId_lte() != null) {
criteria.andIdLessThanOrEqualTo(flowDataVo.getId_lte());
}
if(flowDataVo.getEventTime() != null) {
criteria.andEventTimeEqualTo(flowDataVo.getEventTime());
}
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.getUnid() != null) {
criteria.andUnidEqualTo(flowDataVo.getUnid());
}
......@@ -442,31 +460,6 @@ public abstract class FlowDataBaseController extends BaseController<FlowData, Fl
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());
}
......
......@@ -37,6 +37,24 @@ public abstract class FlowEventBaseController extends BaseController<FlowEvent,
if(flowEventVo.getId_lte() != null) {
criteria.andIdLessThanOrEqualTo(flowEventVo.getId_lte());
}
if(flowEventVo.getEventTime() != null) {
criteria.andEventTimeEqualTo(flowEventVo.getEventTime());
}
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.getUnid() != null) {
criteria.andUnidEqualTo(flowEventVo.getUnid());
}
......@@ -87,31 +105,6 @@ public abstract class FlowEventBaseController extends BaseController<FlowEvent,
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.getEventId() != null) {
criteria.andEventIdEqualTo(flowEventVo.getEventId());
}
......@@ -224,7 +217,6 @@ public abstract class FlowEventBaseController extends BaseController<FlowEvent,
if(flowEventVo.getVideoName_like() != null) {
criteria.andVideoNameLike(flowEventVo.getVideoName_like());
}
return flowEventExample;
}
......
......@@ -37,6 +37,24 @@ public abstract class TrafficBaseController extends BaseController<Traffic, Traf
if(trafficVo.getId_lte() != null) {
criteria.andIdLessThanOrEqualTo(trafficVo.getId_lte());
}
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.getUnid() != null) {
criteria.andUnidEqualTo(trafficVo.getUnid());
}
......@@ -103,24 +121,6 @@ public abstract class TrafficBaseController extends BaseController<Traffic, Traf
if(trafficVo.getEventType_like() != null) {
criteria.andEventTypeLike(trafficVo.getEventType_like());
}
if(trafficVo.getEventDt() != null) {
criteria.andEventDtEqualTo(trafficVo.getEventDt());
}
if(trafficVo.getEventDt_arr() != null) {
criteria.andEventDtIn(trafficVo.getEventDt_arr());
}
if(trafficVo.getEventDt_gt() != null) {
criteria.andEventDtGreaterThan(trafficVo.getEventDt_gt());
}
if(trafficVo.getEventDt_lt() != null) {
criteria.andEventDtLessThan(trafficVo.getEventDt_lt());
}
if(trafficVo.getEventDt_gte() != null) {
criteria.andEventDtGreaterThanOrEqualTo(trafficVo.getEventDt_gte());
}
if(trafficVo.getEventDt_lte() != null) {
criteria.andEventDtLessThanOrEqualTo(trafficVo.getEventDt_lte());
}
if(trafficVo.getChannelUnid() != null) {
criteria.andChannelUnidEqualTo(trafficVo.getChannelUnid());
}
......@@ -545,6 +545,7 @@ public abstract class TrafficBaseController extends BaseController<Traffic, Traf
if(trafficVo.getStatus_lte() != null) {
criteria.andStatusLessThanOrEqualTo(trafficVo.getStatus_lte());
}
return trafficExample;
}
......
......@@ -2,12 +2,13 @@ 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.BaseMapper;
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.mapper.TrafficFaceMapper;
import com.viontech.fanxing.query.service.adapter.TrafficFaceService;
import javax.annotation.Resource;
public abstract class TrafficFaceBaseController extends BaseController<TrafficFace, TrafficFaceVo> {
......@@ -18,117 +19,135 @@ public abstract class TrafficFaceBaseController extends BaseController<TrafficFa
protected BaseExample getExample(TrafficFaceVo trafficFaceVo, int type) {
TrafficFaceExample trafficFaceExample = new TrafficFaceExample();
TrafficFaceExample.Criteria criteria = trafficFaceExample.createCriteria();
if (trafficFaceVo.getId() != null) {
if(trafficFaceVo.getId() != null) {
criteria.andIdEqualTo(trafficFaceVo.getId());
}
if (trafficFaceVo.getId_arr() != null) {
if(trafficFaceVo.getId_arr() != null) {
criteria.andIdIn(trafficFaceVo.getId_arr());
}
if (trafficFaceVo.getId_gt() != null) {
if(trafficFaceVo.getId_gt() != null) {
criteria.andIdGreaterThan(trafficFaceVo.getId_gt());
}
if (trafficFaceVo.getId_lt() != null) {
if(trafficFaceVo.getId_lt() != null) {
criteria.andIdLessThan(trafficFaceVo.getId_lt());
}
if (trafficFaceVo.getId_gte() != null) {
if(trafficFaceVo.getId_gte() != null) {
criteria.andIdGreaterThanOrEqualTo(trafficFaceVo.getId_gte());
}
if (trafficFaceVo.getId_lte() != null) {
if(trafficFaceVo.getId_lte() != null) {
criteria.andIdLessThanOrEqualTo(trafficFaceVo.getId_lte());
}
if (trafficFaceVo.getUnid() != null) {
if(trafficFaceVo.getEventTime() != null) {
criteria.andEventTimeEqualTo(trafficFaceVo.getEventTime());
}
if(trafficFaceVo.getEventTime_arr() != null) {
criteria.andEventTimeIn(trafficFaceVo.getEventTime_arr());
}
if(trafficFaceVo.getEventTime_gt() != null) {
criteria.andEventTimeGreaterThan(trafficFaceVo.getEventTime_gt());
}
if(trafficFaceVo.getEventTime_lt() != null) {
criteria.andEventTimeLessThan(trafficFaceVo.getEventTime_lt());
}
if(trafficFaceVo.getEventTime_gte() != null) {
criteria.andEventTimeGreaterThanOrEqualTo(trafficFaceVo.getEventTime_gte());
}
if(trafficFaceVo.getEventTime_lte() != null) {
criteria.andEventTimeLessThanOrEqualTo(trafficFaceVo.getEventTime_lte());
}
if(trafficFaceVo.getUnid() != null) {
criteria.andUnidEqualTo(trafficFaceVo.getUnid());
}
if (trafficFaceVo.getUnid_arr() != null) {
if(trafficFaceVo.getUnid_arr() != null) {
criteria.andUnidIn(trafficFaceVo.getUnid_arr());
}
if (trafficFaceVo.getUnid_like() != null) {
if(trafficFaceVo.getUnid_like() != null) {
criteria.andUnidLike(trafficFaceVo.getUnid_like());
}
if (trafficFaceVo.getTrafficId() != null) {
if(trafficFaceVo.getTrafficId() != null) {
criteria.andTrafficIdEqualTo(trafficFaceVo.getTrafficId());
}
if (trafficFaceVo.getTrafficId_arr() != null) {
if(trafficFaceVo.getTrafficId_arr() != null) {
criteria.andTrafficIdIn(trafficFaceVo.getTrafficId_arr());
}
if (trafficFaceVo.getTrafficId_gt() != null) {
if(trafficFaceVo.getTrafficId_gt() != null) {
criteria.andTrafficIdGreaterThan(trafficFaceVo.getTrafficId_gt());
}
if (trafficFaceVo.getTrafficId_lt() != null) {
if(trafficFaceVo.getTrafficId_lt() != null) {
criteria.andTrafficIdLessThan(trafficFaceVo.getTrafficId_lt());
}
if (trafficFaceVo.getTrafficId_gte() != null) {
if(trafficFaceVo.getTrafficId_gte() != null) {
criteria.andTrafficIdGreaterThanOrEqualTo(trafficFaceVo.getTrafficId_gte());
}
if (trafficFaceVo.getTrafficId_lte() != null) {
if(trafficFaceVo.getTrafficId_lte() != null) {
criteria.andTrafficIdLessThanOrEqualTo(trafficFaceVo.getTrafficId_lte());
}
if (trafficFaceVo.getState() != null) {
if(trafficFaceVo.getState() != null) {
criteria.andStateEqualTo(trafficFaceVo.getState());
}
if (trafficFaceVo.getState_arr() != null) {
if(trafficFaceVo.getState_arr() != null) {
criteria.andStateIn(trafficFaceVo.getState_arr());
}
if (trafficFaceVo.getState_gt() != null) {
if(trafficFaceVo.getState_gt() != null) {
criteria.andStateGreaterThan(trafficFaceVo.getState_gt());
}
if (trafficFaceVo.getState_lt() != null) {
if(trafficFaceVo.getState_lt() != null) {
criteria.andStateLessThan(trafficFaceVo.getState_lt());
}
if (trafficFaceVo.getState_gte() != null) {
if(trafficFaceVo.getState_gte() != null) {
criteria.andStateGreaterThanOrEqualTo(trafficFaceVo.getState_gte());
}
if (trafficFaceVo.getState_lte() != null) {
if(trafficFaceVo.getState_lte() != null) {
criteria.andStateLessThanOrEqualTo(trafficFaceVo.getState_lte());
}
if (trafficFaceVo.getSex() != null) {
if(trafficFaceVo.getSex() != null) {
criteria.andSexEqualTo(trafficFaceVo.getSex());
}
if (trafficFaceVo.getSex_arr() != null) {
if(trafficFaceVo.getSex_arr() != null) {
criteria.andSexIn(trafficFaceVo.getSex_arr());
}
if (trafficFaceVo.getSex_gt() != null) {
if(trafficFaceVo.getSex_gt() != null) {
criteria.andSexGreaterThan(trafficFaceVo.getSex_gt());
}
if (trafficFaceVo.getSex_lt() != null) {
if(trafficFaceVo.getSex_lt() != null) {
criteria.andSexLessThan(trafficFaceVo.getSex_lt());
}
if (trafficFaceVo.getSex_gte() != null) {
if(trafficFaceVo.getSex_gte() != null) {
criteria.andSexGreaterThanOrEqualTo(trafficFaceVo.getSex_gte());
}
if (trafficFaceVo.getSex_lte() != null) {
if(trafficFaceVo.getSex_lte() != null) {
criteria.andSexLessThanOrEqualTo(trafficFaceVo.getSex_lte());
}
if (trafficFaceVo.getUpperColor() != null) {
if(trafficFaceVo.getUpperColor() != null) {
criteria.andUpperColorEqualTo(trafficFaceVo.getUpperColor());
}
if (trafficFaceVo.getUpperColor_null() != null) {
if (trafficFaceVo.getUpperColor_null().booleanValue()) {
if(trafficFaceVo.getUpperColor_null() != null) {
if(trafficFaceVo.getUpperColor_null().booleanValue()) {
criteria.andUpperColorIsNull();
} else {
criteria.andUpperColorIsNotNull();
}
}
if (trafficFaceVo.getUpperColor_arr() != null) {
if(trafficFaceVo.getUpperColor_arr() != null) {
criteria.andUpperColorIn(trafficFaceVo.getUpperColor_arr());
}
if (trafficFaceVo.getUpperColor_like() != null) {
if(trafficFaceVo.getUpperColor_like() != null) {
criteria.andUpperColorLike(trafficFaceVo.getUpperColor_like());
}
if (trafficFaceVo.getLowerColor() != null) {
if(trafficFaceVo.getLowerColor() != null) {
criteria.andLowerColorEqualTo(trafficFaceVo.getLowerColor());
}
if (trafficFaceVo.getLowerColor_null() != null) {
if (trafficFaceVo.getLowerColor_null().booleanValue()) {
if(trafficFaceVo.getLowerColor_null() != null) {
if(trafficFaceVo.getLowerColor_null().booleanValue()) {
criteria.andLowerColorIsNull();
} else {
criteria.andLowerColorIsNotNull();
}
}
if (trafficFaceVo.getLowerColor_arr() != null) {
if(trafficFaceVo.getLowerColor_arr() != null) {
criteria.andLowerColorIn(trafficFaceVo.getLowerColor_arr());
}
if (trafficFaceVo.getLowerColor_like() != null) {
if(trafficFaceVo.getLowerColor_like() != null) {
criteria.andLowerColorLike(trafficFaceVo.getLowerColor_like());
}
return trafficFaceExample;
......
......@@ -3,22 +3,19 @@
<mapper namespace="com.viontech.fanxing.query.mapper.BehaviorMapper" >
<resultMap id="BaseResultMapRoot" type="com.viontech.fanxing.commons.model.Behavior" >
<id column="behavior_id" property="id" />
<id column="behavior_event_time" property="eventTime" />
<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_pics" property="pics" />
<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_video" property="video" jdbcType="LONGVARCHAR" />
</resultMap>
......@@ -81,11 +78,10 @@
</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`.id as behavior_id, `behavior`.event_time as behavior_event_time, `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`.pics as behavior_pics, `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" >
......@@ -108,8 +104,7 @@
</if>
</sql>
<sql id="Blob_Column_List" >
`behavior`.aux_dev_info as behavior_aux_dev_info, `behavior`.event_data as behavior_event_data,
`behavior`.video as behavior_video
`behavior`.event_data as behavior_event_data, `behavior`.video as behavior_video
</sql>
<select id="selectByExampleWithBLOBs" resultMap="ResultMapWithBLOBs" parameterType="com.viontech.fanxing.commons.model.BehaviorExample" >
select
......@@ -147,17 +142,19 @@
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" resultMap="ResultMapWithBLOBs" parameterType="java.lang.Long" >
<select id="selectByPrimaryKey" resultMap="ResultMapWithBLOBs" parameterType="map" >
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from `d_behavior` `behavior`
where `behavior`.id = #{id,jdbcType=BIGINT}
and `behavior`.event_time = #{eventTime,jdbcType=TIMESTAMP}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
<delete id="deleteByPrimaryKey" parameterType="map" >
delete from `d_behavior` `behavior`
where id = #{id,jdbcType=BIGINT}
and event_time = #{eventTime,jdbcType=TIMESTAMP}
</delete>
<delete id="deleteByExample" parameterType="com.viontech.fanxing.commons.model.BehaviorExample" >
delete from `d_behavior` `behavior`
......@@ -166,22 +163,23 @@
</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,
pics, channel_unid, test_pic_file,
test_frame_no, task_name, event_data_num,
aux_dev_info, event_data, video
insert into `d_behavior` (event_time, unid, task_id,
event_type, event_cate, event_refid,
pics, channel_unid, task_name,
event_data_num, event_data, video
)
values (#{unid,jdbcType=VARCHAR}, #{taskId,jdbcType=BIGINT}, #{eventType,jdbcType=VARCHAR},
#{eventCate,jdbcType=VARCHAR}, #{eventRefid,jdbcType=VARCHAR}, #{eventTime,jdbcType=TIMESTAMP},
#{pics,jdbcType=VARCHAR}, #{channelUnid,jdbcType=VARCHAR}, #{testPicFile,jdbcType=VARCHAR},
#{testFrameNo,jdbcType=VARCHAR}, #{taskName,jdbcType=VARCHAR}, #{eventDataNum,jdbcType=VARCHAR},
#{auxDevInfo,jdbcType=LONGVARCHAR}, #{eventData,jdbcType=LONGVARCHAR}, #{video,jdbcType=LONGVARCHAR}
values (#{eventTime,jdbcType=TIMESTAMP}, #{unid,jdbcType=VARCHAR}, #{taskId,jdbcType=BIGINT},
#{eventType,jdbcType=VARCHAR}, #{eventCate,jdbcType=VARCHAR}, #{eventRefid,jdbcType=VARCHAR},
#{pics,jdbcType=VARCHAR}, #{channelUnid,jdbcType=VARCHAR}, #{taskName,jdbcType=VARCHAR},
#{eventDataNum,jdbcType=VARCHAR}, #{eventData,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="eventTime != null" >
event_time,
</if>
<if test="unid != null" >
unid,
</if>
......@@ -197,30 +195,18 @@
<if test="eventRefid != null" >
event_refid,
</if>
<if test="eventTime != null" >
event_time,
</if>
<if test="pics != null" >
pics,
</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>
......@@ -229,6 +215,9 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="eventTime != null" >
#{eventTime,jdbcType=TIMESTAMP},
</if>
<if test="unid != null" >
#{unid,jdbcType=VARCHAR},
</if>
......@@ -244,30 +233,18 @@
<if test="eventRefid != null" >
#{eventRefid,jdbcType=VARCHAR},
</if>
<if test="eventTime != null" >
#{eventTime,jdbcType=TIMESTAMP},
</if>
<if test="pics != null" >
#{pics,jdbcType=VARCHAR},
</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>
......@@ -288,6 +265,9 @@
<if test="record.id != null" >
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.eventTime != null" >
event_time = #{record.eventTime,jdbcType=TIMESTAMP},
</if>
<if test="record.unid != null" >
unid = #{record.unid,jdbcType=VARCHAR},
</if>
......@@ -303,30 +283,18 @@
<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.pics != null" >
pics = #{record.pics,jdbcType=VARCHAR},
</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>
......@@ -341,19 +309,16 @@
<update id="updateByExampleWithBLOBs" parameterType="map" >
update `d_behavior` `behavior`
set `behavior`.id = #{record.id,jdbcType=BIGINT},
`behavior`.event_time = #{record.eventTime,jdbcType=TIMESTAMP},
`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`.pics = #{record.pics,jdbcType=VARCHAR},
`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`.video = #{record.video,jdbcType=LONGVARCHAR}
<if test="_parameter != null" >
......@@ -363,16 +328,14 @@
<update id="updateByExample" parameterType="map" >
update `d_behavior` `behavior`
set id = #{record.id,jdbcType=BIGINT},
event_time = #{record.eventTime,jdbcType=TIMESTAMP},
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},
pics = #{record.pics,jdbcType=VARCHAR},
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" >
......@@ -397,30 +360,18 @@
<if test="eventRefid != null" >
event_refid = #{eventRefid,jdbcType=VARCHAR},
</if>
<if test="eventTime != null" >
event_time = #{eventTime,jdbcType=TIMESTAMP},
</if>
<if test="pics != null" >
pics = #{pics,jdbcType=VARCHAR},
</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>
......@@ -429,6 +380,7 @@
</if>
</set>
where id = #{id,jdbcType=BIGINT}
and event_time = #{eventTime,jdbcType=TIMESTAMP}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.viontech.fanxing.commons.model.Behavior" >
update `d_behavior`
......@@ -437,17 +389,14 @@
event_type = #{eventType,jdbcType=VARCHAR},
event_cate = #{eventCate,jdbcType=VARCHAR},
event_refid = #{eventRefid,jdbcType=VARCHAR},
event_time = #{eventTime,jdbcType=TIMESTAMP},
pics = #{pics,jdbcType=VARCHAR},
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},
video = #{video,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=BIGINT}
and event_time = #{eventTime,jdbcType=TIMESTAMP}
</update>
<update id="updateByPrimaryKey" parameterType="com.viontech.fanxing.commons.model.Behavior" >
update `d_behavior`
......@@ -456,13 +405,11 @@
event_type = #{eventType,jdbcType=VARCHAR},
event_cate = #{eventCate,jdbcType=VARCHAR},
event_refid = #{eventRefid,jdbcType=VARCHAR},
event_time = #{eventTime,jdbcType=TIMESTAMP},
pics = #{pics,jdbcType=VARCHAR},
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}
and event_time = #{eventTime,jdbcType=TIMESTAMP}
</update>
</mapper>
\ No newline at end of file
......@@ -3,6 +3,7 @@
<mapper namespace="com.viontech.fanxing.query.mapper.FlowDataMapper" >
<resultMap id="BaseResultMapRoot" type="com.viontech.fanxing.commons.model.FlowData" >
<id column="flowData_id" property="id" />
<id column="flowData_event_time" property="eventTime" />
<result column="flowData_unid" property="unid" />
<result column="flowData_flow_event_id" property="flowEventId" />
<result column="flowData_task_id" property="taskId" />
......@@ -22,7 +23,6 @@
<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" />
......@@ -91,17 +91,17 @@
</where>
</sql>
<sql id="Base_Column_List_Root" >
`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`.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`.id as flowData_id, `flowData`.event_time as flowData_event_time, `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`.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`
`flowData`.sample_num_out as flowData_sample_num_out, `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')" >
......@@ -161,17 +161,19 @@
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" resultMap="ResultMapWithBLOBs" parameterType="java.lang.Long" >
<select id="selectByPrimaryKey" resultMap="ResultMapWithBLOBs" parameterType="map" >
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from `d_flow_data` `flowData`
where `flowData`.id = #{id,jdbcType=BIGINT}
and `flowData`.event_time = #{eventTime,jdbcType=TIMESTAMP}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
<delete id="deleteByPrimaryKey" parameterType="map" >
delete from `d_flow_data` `flowData`
where id = #{id,jdbcType=BIGINT}
and event_time = #{eventTime,jdbcType=TIMESTAMP}
</delete>
<delete id="deleteByExample" parameterType="com.viontech.fanxing.commons.model.FlowDataExample" >
delete from `d_flow_data` `flowData`
......@@ -180,28 +182,31 @@
</if>
</delete>
<insert id="insert" parameterType="com.viontech.fanxing.commons.model.FlowData" useGeneratedKeys="true" keyProperty="id" keyColumn="id" >
insert into `d_flow_data` (unid, 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,
area, density, sample_num_in,
sample_num_out, event_time, dist_time,
insert into `d_flow_data` (event_time, unid, 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, area, density,
sample_num_in, sample_num_out, dist_time,
time_occupy, `status`, position_content,
head_content)
values (#{unid,jdbcType=VARCHAR}, #{flowEventId,jdbcType=BIGINT}, #{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},
values (#{eventTime,jdbcType=TIMESTAMP}, #{unid,jdbcType=VARCHAR}, #{flowEventId,jdbcType=BIGINT},
#{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}, #{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="eventTime != null" >
event_time,
</if>
<if test="unid != null" >
unid,
</if>
......@@ -259,9 +264,6 @@
<if test="sampleNumOut != null" >
sample_num_out,
</if>
<if test="eventTime != null" >
event_time,
</if>
<if test="distTime != null" >
dist_time,
</if>
......@@ -279,6 +281,9 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="eventTime != null" >
#{eventTime,jdbcType=TIMESTAMP},
</if>
<if test="unid != null" >
#{unid,jdbcType=VARCHAR},
</if>
......@@ -336,9 +341,6 @@
<if test="sampleNumOut != null" >
#{sampleNumOut,jdbcType=REAL},
</if>
<if test="eventTime != null" >
#{eventTime,jdbcType=TIMESTAMP},
</if>
<if test="distTime != null" >
#{distTime,jdbcType=REAL},
</if>
......@@ -368,6 +370,9 @@
<if test="record.id != null" >
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.eventTime != null" >
event_time = #{record.eventTime,jdbcType=TIMESTAMP},
</if>
<if test="record.unid != null" >
unid = #{record.unid,jdbcType=VARCHAR},
</if>
......@@ -425,9 +430,6 @@
<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>
......@@ -451,6 +453,7 @@
<update id="updateByExampleWithBLOBs" parameterType="map" >
update `d_flow_data` `flowData`
set `flowData`.id = #{record.id,jdbcType=BIGINT},
`flowData`.event_time = #{record.eventTime,jdbcType=TIMESTAMP},
`flowData`.unid = #{record.unid,jdbcType=VARCHAR},
`flowData`.flow_event_id = #{record.flowEventId,jdbcType=BIGINT},
`flowData`.task_id = #{record.taskId,jdbcType=BIGINT},
......@@ -470,7 +473,6 @@
`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},
......@@ -483,6 +485,7 @@
<update id="updateByExample" parameterType="map" >
update `d_flow_data` `flowData`
set id = #{record.id,jdbcType=BIGINT},
event_time = #{record.eventTime,jdbcType=TIMESTAMP},
unid = #{record.unid,jdbcType=VARCHAR},
flow_event_id = #{record.flowEventId,jdbcType=BIGINT},
task_id = #{record.taskId,jdbcType=BIGINT},
......@@ -502,7 +505,6 @@
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}
......@@ -570,9 +572,6 @@
<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>
......@@ -590,6 +589,7 @@
</if>
</set>
where id = #{id,jdbcType=BIGINT}
and event_time = #{eventTime,jdbcType=TIMESTAMP}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.viontech.fanxing.commons.model.FlowData" >
update `d_flow_data`
......@@ -612,13 +612,13 @@
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}
and event_time = #{eventTime,jdbcType=TIMESTAMP}
</update>
<update id="updateByPrimaryKey" parameterType="com.viontech.fanxing.commons.model.FlowData" >
update `d_flow_data`
......@@ -641,10 +641,10 @@
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}
and event_time = #{eventTime,jdbcType=TIMESTAMP}
</update>
</mapper>
\ No newline at end of file
......@@ -3,10 +3,10 @@
<mapper namespace="com.viontech.fanxing.query.mapper.FlowEventMapper" >
<resultMap id="BaseResultMapRoot" type="com.viontech.fanxing.commons.model.FlowEvent" >
<id column="flowEvent_id" property="id" />
<id column="flowEvent_event_time" property="eventTime" />
<result column="flowEvent_unid" property="unid" />
<result column="flowEvent_task_id" property="taskId" />
<result column="flowEvent_event_type" property="eventType" />
<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_name" property="deviceName" />
......@@ -78,8 +78,8 @@
</where>
</sql>
<sql id="Base_Column_List_Root" >
`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`.id as flowEvent_id, `flowEvent`.event_time as flowEvent_event_time, `flowEvent`.unid as flowEvent_unid,
`flowEvent`.task_id as flowEvent_task_id, `flowEvent`.event_type as flowEvent_event_type,
`flowEvent`.event_id as flowEvent_event_id, `flowEvent`.device_code as flowEvent_device_code,
`flowEvent`.device_name as flowEvent_device_name, `flowEvent`.location_code as flowEvent_location_code,
`flowEvent`.location_name as flowEvent_location_name, `flowEvent`.pics as flowEvent_pics,
......@@ -143,17 +143,19 @@
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" resultMap="ResultMapWithBLOBs" parameterType="java.lang.Long" >
<select id="selectByPrimaryKey" resultMap="ResultMapWithBLOBs" parameterType="map" >
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from `d_flow_event` `flowEvent`
where `flowEvent`.id = #{id,jdbcType=BIGINT}
and `flowEvent`.event_time = #{eventTime,jdbcType=TIMESTAMP}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
<delete id="deleteByPrimaryKey" parameterType="map" >
delete from `d_flow_event` `flowEvent`
where id = #{id,jdbcType=BIGINT}
and event_time = #{eventTime,jdbcType=TIMESTAMP}
</delete>
<delete id="deleteByExample" parameterType="com.viontech.fanxing.commons.model.FlowEventExample" >
delete from `d_flow_event` `flowEvent`
......@@ -162,13 +164,13 @@
</if>
</delete>
<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,
event_time, event_id, device_code,
insert into `d_flow_event` (event_time, unid, task_id,
event_type, event_id, device_code,
device_name, location_code, location_name,
pics, video_name, json_data
)
values (#{unid,jdbcType=VARCHAR}, #{taskId,jdbcType=BIGINT}, #{eventType,jdbcType=VARCHAR},
#{eventTime,jdbcType=TIMESTAMP}, #{eventId,jdbcType=VARCHAR}, #{deviceCode,jdbcType=VARCHAR},
values (#{eventTime,jdbcType=TIMESTAMP}, #{unid,jdbcType=VARCHAR}, #{taskId,jdbcType=BIGINT},
#{eventType,jdbcType=VARCHAR}, #{eventId,jdbcType=VARCHAR}, #{deviceCode,jdbcType=VARCHAR},
#{deviceName,jdbcType=VARCHAR}, #{locationCode,jdbcType=VARCHAR}, #{locationName,jdbcType=VARCHAR},
#{pics,jdbcType=VARCHAR}, #{videoName,jdbcType=VARCHAR}, #{jsonData,jdbcType=LONGVARCHAR}
)
......@@ -176,6 +178,9 @@
<insert id="insertSelective" parameterType="com.viontech.fanxing.commons.model.FlowEvent" useGeneratedKeys="true" keyProperty="id" keyColumn="id" >
insert into `d_flow_event`
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="eventTime != null" >
event_time,
</if>
<if test="unid != null" >
unid,
</if>
......@@ -185,9 +190,6 @@
<if test="eventType != null" >
event_type,
</if>
<if test="eventTime != null" >
event_time,
</if>
<if test="eventId != null" >
event_id,
</if>
......@@ -214,6 +216,9 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="eventTime != null" >
#{eventTime,jdbcType=TIMESTAMP},
</if>
<if test="unid != null" >
#{unid,jdbcType=VARCHAR},
</if>
......@@ -223,9 +228,6 @@
<if test="eventType != null" >
#{eventType,jdbcType=VARCHAR},
</if>
<if test="eventTime != null" >
#{eventTime,jdbcType=TIMESTAMP},
</if>
<if test="eventId != null" >
#{eventId,jdbcType=VARCHAR},
</if>
......@@ -264,6 +266,9 @@
<if test="record.id != null" >
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.eventTime != null" >
event_time = #{record.eventTime,jdbcType=TIMESTAMP},
</if>
<if test="record.unid != null" >
unid = #{record.unid,jdbcType=VARCHAR},
</if>
......@@ -273,9 +278,6 @@
<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.eventId != null" >
event_id = #{record.eventId,jdbcType=VARCHAR},
</if>
......@@ -308,10 +310,10 @@
<update id="updateByExampleWithBLOBs" parameterType="map" >
update `d_flow_event` `flowEvent`
set `flowEvent`.id = #{record.id,jdbcType=BIGINT},
`flowEvent`.event_time = #{record.eventTime,jdbcType=TIMESTAMP},
`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`.event_id = #{record.eventId,jdbcType=VARCHAR},
`flowEvent`.device_code = #{record.deviceCode,jdbcType=VARCHAR},
`flowEvent`.device_name = #{record.deviceName,jdbcType=VARCHAR},
......@@ -327,10 +329,10 @@
<update id="updateByExample" parameterType="map" >
update `d_flow_event` `flowEvent`
set id = #{record.id,jdbcType=BIGINT},
event_time = #{record.eventTime,jdbcType=TIMESTAMP},
unid = #{record.unid,jdbcType=VARCHAR},
task_id = #{record.taskId,jdbcType=BIGINT},
event_type = #{record.eventType,jdbcType=VARCHAR},
event_time = #{record.eventTime,jdbcType=TIMESTAMP},
event_id = #{record.eventId,jdbcType=VARCHAR},
device_code = #{record.deviceCode,jdbcType=VARCHAR},
device_name = #{record.deviceName,jdbcType=VARCHAR},
......@@ -354,9 +356,6 @@
<if test="eventType != null" >
event_type = #{eventType,jdbcType=VARCHAR},
</if>
<if test="eventTime != null" >
event_time = #{eventTime,jdbcType=TIMESTAMP},
</if>
<if test="eventId != null" >
event_id = #{eventId,jdbcType=VARCHAR},
</if>
......@@ -383,13 +382,13 @@
</if>
</set>
where id = #{id,jdbcType=BIGINT}
and event_time = #{eventTime,jdbcType=TIMESTAMP}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.viontech.fanxing.commons.model.FlowEvent" >
update `d_flow_event`
set unid = #{unid,jdbcType=VARCHAR},
task_id = #{taskId,jdbcType=BIGINT},
event_type = #{eventType,jdbcType=VARCHAR},
event_time = #{eventTime,jdbcType=TIMESTAMP},
event_id = #{eventId,jdbcType=VARCHAR},
device_code = #{deviceCode,jdbcType=VARCHAR},
device_name = #{deviceName,jdbcType=VARCHAR},
......@@ -399,13 +398,13 @@
video_name = #{videoName,jdbcType=VARCHAR},
json_data = #{jsonData,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=BIGINT}
and event_time = #{eventTime,jdbcType=TIMESTAMP}
</update>
<update id="updateByPrimaryKey" parameterType="com.viontech.fanxing.commons.model.FlowEvent" >
update `d_flow_event`
set unid = #{unid,jdbcType=VARCHAR},
task_id = #{taskId,jdbcType=BIGINT},
event_type = #{eventType,jdbcType=VARCHAR},
event_time = #{eventTime,jdbcType=TIMESTAMP},
event_id = #{eventId,jdbcType=VARCHAR},
device_code = #{deviceCode,jdbcType=VARCHAR},
device_name = #{deviceName,jdbcType=VARCHAR},
......@@ -414,5 +413,6 @@
pics = #{pics,jdbcType=VARCHAR},
video_name = #{videoName,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
and event_time = #{eventTime,jdbcType=TIMESTAMP}
</update>
</mapper>
\ No newline at end of file
......@@ -3,6 +3,7 @@
<mapper namespace="com.viontech.fanxing.query.mapper.TrafficFaceMapper" >
<resultMap id="BaseResultMapRoot" type="com.viontech.fanxing.commons.model.TrafficFace" >
<id column="trafficFace_id" property="id" />
<id column="trafficFace_event_time" property="eventTime" />
<result column="trafficFace_unid" property="unid" />
<result column="trafficFace_traffic_id" property="trafficId" />
<result column="trafficFace_state" property="state" />
......@@ -70,7 +71,8 @@
</where>
</sql>
<sql id="Base_Column_List_Root" >
`trafficFace`.id as trafficFace_id, `trafficFace`.unid as trafficFace_unid, `trafficFace`.traffic_id as trafficFace_traffic_id,
`trafficFace`.id as trafficFace_id, `trafficFace`.event_time as trafficFace_event_time,
`trafficFace`.unid as trafficFace_unid, `trafficFace`.traffic_id as trafficFace_traffic_id,
`trafficFace`.`state` as `trafficFace_state`, `trafficFace`.sex as trafficFace_sex,
`trafficFace`.upper_color as trafficFace_upper_color, `trafficFace`.lower_color as trafficFace_lower_color
</sql>
......@@ -110,15 +112,17 @@
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="map" >
select
<include refid="Base_Column_List" />
from `d_traffic_face` `trafficFace`
where `trafficFace`.id = #{id,jdbcType=BIGINT}
and `trafficFace`.event_time = #{eventTime,jdbcType=TIMESTAMP}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
<delete id="deleteByPrimaryKey" parameterType="map" >
delete from `d_traffic_face` `trafficFace`
where id = #{id,jdbcType=BIGINT}
and event_time = #{eventTime,jdbcType=TIMESTAMP}
</delete>
<delete id="deleteByExample" parameterType="com.viontech.fanxing.commons.model.TrafficFaceExample" >
delete from `d_traffic_face` `trafficFace`
......@@ -127,16 +131,19 @@
</if>
</delete>
<insert id="insert" parameterType="com.viontech.fanxing.commons.model.TrafficFace" useGeneratedKeys="true" keyProperty="id" keyColumn="id" >
insert into `d_traffic_face` (unid, traffic_id, `state`,
sex, upper_color, lower_color
)
values (#{unid,jdbcType=VARCHAR}, #{trafficId,jdbcType=BIGINT}, #{state,jdbcType=SMALLINT},
#{sex,jdbcType=SMALLINT}, #{upperColor,jdbcType=VARCHAR}, #{lowerColor,jdbcType=VARCHAR}
)
insert into `d_traffic_face` (event_time, unid, traffic_id,
`state`, sex, upper_color,
lower_color)
values (#{eventTime,jdbcType=TIMESTAMP}, #{unid,jdbcType=VARCHAR}, #{trafficId,jdbcType=BIGINT},
#{state,jdbcType=SMALLINT}, #{sex,jdbcType=SMALLINT}, #{upperColor,jdbcType=VARCHAR},
#{lowerColor,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.viontech.fanxing.commons.model.TrafficFace" useGeneratedKeys="true" keyProperty="id" keyColumn="id" >
insert into `d_traffic_face`
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="eventTime != null" >
event_time,
</if>
<if test="unid != null" >
unid,
</if>
......@@ -157,6 +164,9 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="eventTime != null" >
#{eventTime,jdbcType=TIMESTAMP},
</if>
<if test="unid != null" >
#{unid,jdbcType=VARCHAR},
</if>
......@@ -189,6 +199,9 @@
<if test="record.id != null" >
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.eventTime != null" >
event_time = #{record.eventTime,jdbcType=TIMESTAMP},
</if>
<if test="record.unid != null" >
unid = #{record.unid,jdbcType=VARCHAR},
</if>
......@@ -215,6 +228,7 @@
<update id="updateByExample" parameterType="map" >
update `d_traffic_face` `trafficFace`
set id = #{record.id,jdbcType=BIGINT},
event_time = #{record.eventTime,jdbcType=TIMESTAMP},
unid = #{record.unid,jdbcType=VARCHAR},
traffic_id = #{record.trafficId,jdbcType=BIGINT},
`state` = #{record.state,jdbcType=SMALLINT},
......@@ -248,6 +262,7 @@
</if>
</set>
where id = #{id,jdbcType=BIGINT}
and event_time = #{eventTime,jdbcType=TIMESTAMP}
</update>
<update id="updateByPrimaryKey" parameterType="com.viontech.fanxing.commons.model.TrafficFace" >
update `d_traffic_face`
......@@ -258,5 +273,6 @@
upper_color = #{upperColor,jdbcType=VARCHAR},
lower_color = #{lowerColor,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
and event_time = #{eventTime,jdbcType=TIMESTAMP}
</update>
</mapper>
\ No newline at end of file
......@@ -3,11 +3,11 @@
<mapper namespace="com.viontech.fanxing.query.mapper.TrafficMapper" >
<resultMap id="BaseResultMapRoot" type="com.viontech.fanxing.commons.model.Traffic" >
<id column="traffic_id" property="id" />
<id column="traffic_event_time" property="eventTime" />
<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_dt" property="eventDt" />
<result column="traffic_channel_unid" property="channelUnid" />
<result column="traffic_plate_color" property="plateColor" />
<result column="traffic_plate_number" property="plateNumber" />
......@@ -95,9 +95,9 @@
</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_dt as traffic_event_dt, `traffic`.channel_unid as traffic_channel_unid,
`traffic`.id as traffic_id, `traffic`.event_time as traffic_event_time, `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`.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`.location_name as traffic_location_name,
`traffic`.lane_code as traffic_lane_code, `traffic`.direction_code as traffic_direction_code,
......@@ -168,17 +168,19 @@
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" resultMap="ResultMapWithBLOBs" parameterType="java.lang.Long" >
<select id="selectByPrimaryKey" resultMap="ResultMapWithBLOBs" parameterType="map" >
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from `d_traffic` `traffic`
where `traffic`.id = #{id,jdbcType=BIGINT}
and `traffic`.event_time = #{eventTime,jdbcType=TIMESTAMP}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
<delete id="deleteByPrimaryKey" parameterType="map" >
delete from `d_traffic` `traffic`
where id = #{id,jdbcType=BIGINT}
and event_time = #{eventTime,jdbcType=TIMESTAMP}
</delete>
<delete id="deleteByExample" parameterType="com.viontech.fanxing.commons.model.TrafficExample" >
delete from `d_traffic` `traffic`
......@@ -187,8 +189,8 @@
</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_dt, channel_unid,
insert into `d_traffic` (event_time, unid, task_id,
event_cate, event_type, channel_unid,
plate_color, plate_number, location_code,
location_name, lane_code, direction_code,
vehicle_type, vehicle_color, vehicle_logo,
......@@ -197,8 +199,8 @@
xcycle_type, event_id, special_type,
with_helmet, pics, video_name,
`status`, json_data)
values (#{unid,jdbcType=VARCHAR}, #{taskId,jdbcType=BIGINT}, #{eventCate,jdbcType=VARCHAR},
#{eventType,jdbcType=VARCHAR}, #{eventDt,jdbcType=TIMESTAMP}, #{channelUnid,jdbcType=VARCHAR},
values (#{eventTime,jdbcType=TIMESTAMP}, #{unid,jdbcType=VARCHAR}, #{taskId,jdbcType=BIGINT},
#{eventCate,jdbcType=VARCHAR}, #{eventType,jdbcType=VARCHAR}, #{channelUnid,jdbcType=VARCHAR},
#{plateColor,jdbcType=VARCHAR}, #{plateNumber,jdbcType=VARCHAR}, #{locationCode,jdbcType=VARCHAR},
#{locationName,jdbcType=VARCHAR}, #{laneCode,jdbcType=VARCHAR}, #{directionCode,jdbcType=VARCHAR},
#{vehicleType,jdbcType=VARCHAR}, #{vehicleColor,jdbcType=VARCHAR}, #{vehicleLogo,jdbcType=VARCHAR},
......@@ -211,6 +213,9 @@
<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="eventTime != null" >
event_time,
</if>
<if test="unid != null" >
unid,
</if>
......@@ -223,9 +228,6 @@
<if test="eventType != null" >
event_type,
</if>
<if test="eventDt != null" >
event_dt,
</if>
<if test="channelUnid != null" >
channel_unid,
</if>
......@@ -300,6 +302,9 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="eventTime != null" >
#{eventTime,jdbcType=TIMESTAMP},
</if>
<if test="unid != null" >
#{unid,jdbcType=VARCHAR},
</if>
......@@ -312,9 +317,6 @@
<if test="eventType != null" >
#{eventType,jdbcType=VARCHAR},
</if>
<if test="eventDt != null" >
#{eventDt,jdbcType=TIMESTAMP},
</if>
<if test="channelUnid != null" >
#{channelUnid,jdbcType=VARCHAR},
</if>
......@@ -401,6 +403,9 @@
<if test="record.id != null" >
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.eventTime != null" >
event_time = #{record.eventTime,jdbcType=TIMESTAMP},
</if>
<if test="record.unid != null" >
unid = #{record.unid,jdbcType=VARCHAR},
</if>
......@@ -413,9 +418,6 @@
<if test="record.eventType != null" >
event_type = #{record.eventType,jdbcType=VARCHAR},
</if>
<if test="record.eventDt != null" >
event_dt = #{record.eventDt,jdbcType=TIMESTAMP},
</if>
<if test="record.channelUnid != null" >
channel_unid = #{record.channelUnid,jdbcType=VARCHAR},
</if>
......@@ -496,11 +498,11 @@
<update id="updateByExampleWithBLOBs" parameterType="map" >
update `d_traffic` `traffic`
set `traffic`.id = #{record.id,jdbcType=BIGINT},
`traffic`.event_time = #{record.eventTime,jdbcType=TIMESTAMP},
`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_dt = #{record.eventDt,jdbcType=TIMESTAMP},
`traffic`.channel_unid = #{record.channelUnid,jdbcType=VARCHAR},
`traffic`.plate_color = #{record.plateColor,jdbcType=VARCHAR},
`traffic`.plate_number = #{record.plateNumber,jdbcType=VARCHAR},
......@@ -532,11 +534,11 @@
<update id="updateByExample" parameterType="map" >
update `d_traffic` `traffic`
set id = #{record.id,jdbcType=BIGINT},
event_time = #{record.eventTime,jdbcType=TIMESTAMP},
unid = #{record.unid,jdbcType=VARCHAR},
task_id = #{record.taskId,jdbcType=BIGINT},
event_cate = #{record.eventCate,jdbcType=VARCHAR},
event_type = #{record.eventType,jdbcType=VARCHAR},
event_dt = #{record.eventDt,jdbcType=TIMESTAMP},
channel_unid = #{record.channelUnid,jdbcType=VARCHAR},
plate_color = #{record.plateColor,jdbcType=VARCHAR},
plate_number = #{record.plateNumber,jdbcType=VARCHAR},
......@@ -579,9 +581,6 @@
<if test="eventType != null" >
event_type = #{eventType,jdbcType=VARCHAR},
</if>
<if test="eventDt != null" >
event_dt = #{eventDt,jdbcType=TIMESTAMP},
</if>
<if test="channelUnid != null" >
channel_unid = #{channelUnid,jdbcType=VARCHAR},
</if>
......@@ -656,6 +655,7 @@
</if>
</set>
where id = #{id,jdbcType=BIGINT}
and event_time = #{eventTime,jdbcType=TIMESTAMP}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.viontech.fanxing.commons.model.Traffic" >
update `d_traffic`
......@@ -663,7 +663,6 @@
task_id = #{taskId,jdbcType=BIGINT},
event_cate = #{eventCate,jdbcType=VARCHAR},
event_type = #{eventType,jdbcType=VARCHAR},
event_dt = #{eventDt,jdbcType=TIMESTAMP},
channel_unid = #{channelUnid,jdbcType=VARCHAR},
plate_color = #{plateColor,jdbcType=VARCHAR},
plate_number = #{plateNumber,jdbcType=VARCHAR},
......@@ -689,6 +688,7 @@
`status` = #{status,jdbcType=INTEGER},
json_data = #{jsonData,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=BIGINT}
and event_time = #{eventTime,jdbcType=TIMESTAMP}
</update>
<update id="updateByPrimaryKey" parameterType="com.viontech.fanxing.commons.model.Traffic" >
update `d_traffic`
......@@ -696,7 +696,6 @@
task_id = #{taskId,jdbcType=BIGINT},
event_cate = #{eventCate,jdbcType=VARCHAR},
event_type = #{eventType,jdbcType=VARCHAR},
event_dt = #{eventDt,jdbcType=TIMESTAMP},
channel_unid = #{channelUnid,jdbcType=VARCHAR},
plate_color = #{plateColor,jdbcType=VARCHAR},
plate_number = #{plateNumber,jdbcType=VARCHAR},
......@@ -721,5 +720,6 @@
video_name = #{videoName,jdbcType=VARCHAR},
`status` = #{status,jdbcType=INTEGER}
where id = #{id,jdbcType=BIGINT}
and event_time = #{eventTime,jdbcType=TIMESTAMP}
</update>
</mapper>
\ No newline at end of file
......@@ -41,6 +41,15 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<excludes>
<exclude>application.yml</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
<resources>
<resource>
......@@ -49,12 +58,6 @@
<include>**/*.xml</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>*</include>
</includes>
</resource>
</resources>
</build>
......
......@@ -42,6 +42,15 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<excludes>
<exclude>application.yml</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
package com.viontech.fanxing.task.scheduling.controller;
import com.viontech.fanxing.commons.feing.TaskSchedulingTasksAdapter;
import com.viontech.fanxing.commons.model.StoreConfig;
import com.viontech.fanxing.commons.model.Task;
import com.viontech.fanxing.task.scheduling.feign.TaskClient;
import com.viontech.fanxing.task.scheduling.model.TaskData;
import com.viontech.fanxing.task.scheduling.model.vaserver.VaServerInfo;
import com.viontech.fanxing.task.scheduling.service.TaskService;
import com.viontech.fanxing.task.scheduling.service.VAServerService;
import com.viontech.keliu.util.JsonMessageUtil;
......@@ -27,13 +30,24 @@ public class TaskController implements TaskSchedulingTasksAdapter {
private VAServerService vaServerService;
@Resource
private TaskService taskService;
@Resource
private TaskClient taskClient;
@Override
@PostMapping
public JsonMessageUtil.JsonMessage add(Task task) {
TaskData taskData = new TaskData(task);
String unid = task.getUnid();
// 获取存储配置
Long storeConfigId = task.getStoreConfigId();
JsonMessageUtil.JsonMessage<StoreConfig> storeConfigRes = taskClient.getStoreConfigById(storeConfigId);
StoreConfig storeConfigVo = (StoreConfig) storeConfigRes.getData();
if (storeConfigVo == null) {
return JsonMessageUtil.getErrorJsonMsg("无法获取对应的存储配置");
}
taskData.setStoreConfig(storeConfigVo.getContent());
// 计算运行时间并生成任务
String unid = task.getUnid();
ImmutablePair<Long, Long> nextTime = taskData.getRuntimeConfig().getNextTimeOfExecutionAndTerminal();
Long nextExecuteTime = nextTime.left;
Long nextTerminateTime = nextTime.right;
......@@ -50,21 +64,30 @@ public class TaskController implements TaskSchedulingTasksAdapter {
@Override
@PutMapping
public JsonMessageUtil.JsonMessage update(Task task) {
JsonMessageUtil.JsonMessage delete = delete(task);
if (delete.isSuccess()) {
JsonMessageUtil.JsonMessage add = add(task);
return add;
String taskUnid = task.getUnid();
VaServerInfo vaServerInfo = taskService.taskRunOn(taskUnid);
// vaServerId 为空说明任务未执行可以先删除再建立新任务
if (vaServerInfo == null) {
JsonMessageUtil.JsonMessage delete = delete(task);
if (delete.isSuccess()) {
JsonMessageUtil.JsonMessage add = add(task);
return add;
} else {
return delete;
}
} else {
return delete;
taskService.updateTask(task);
return JsonMessageUtil.getSuccessJsonMsg("success");
}
}
@Override
@DeleteMapping
public JsonMessageUtil.JsonMessage delete(Task task) {
String unid = task.getUnid();
vaServerService.terminateTask(task);
taskService.removeTaskDataAll(unid);
String taskUnid = task.getUnid();
vaServerService.terminateTask(taskUnid);
taskService.removeTaskDataAll(taskUnid);
// todo
return JsonMessageUtil.getSuccessJsonMsg("success");
}
......
package com.viontech.fanxing.task.scheduling.controller;
import com.alibaba.fastjson.JSON;
import com.viontech.fanxing.task.scheduling.model.vaserver.VaServerInfo;
import com.viontech.fanxing.task.scheduling.service.VAServerService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import com.viontech.keliu.util.JsonMessageUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
......@@ -16,21 +17,72 @@ import javax.annotation.Resource;
*/
@RestController
@Slf4j
public class VAServerController {
@Resource
private VAServerService vaServerService;
/**
* 注册
*/
@PostMapping("/register")
public Object register(@RequestBody VaServerInfo vaServerInfo) {
log.info("收到注册消息:{}", JSON.toJSONString(vaServerInfo));
vaServerService.registeVAServer(vaServerInfo);
return "success";
return JsonMessageUtil.getSuccessJsonMsg("success");
}
@PostMapping("/keepalive")
public Object keepalive(String devId) {
/**
* 心跳
*/
@GetMapping("/keepalive/{devId}")
public Object keepalive(@PathVariable String devId) {
log.info("收到心跳消息:{}", devId);
vaServerService.keepalive(devId);
return "success";
return JsonMessageUtil.getSuccessJsonMsg("success");
}
/**
* 获取分析视频点播地址
*/
@GetMapping("/getAnalyzeStream")
public Object getAnalyzeStream(@RequestParam String taskUnid) {
return vaServerService.getAnalyzeStream(taskUnid);
}
/**
* 输出分析流,每30秒调一次,不调用就不再输出视频流
*/
@GetMapping("/startAnalyzeStream")
public Object startAnalyzeStream(@RequestParam String taskUnid) {
return vaServerService.startAnalyzeStream(taskUnid);
}
/**
* 获取vaServer运行状态,配置等信息
*/
@GetMapping("/status")
public Object status(@RequestParam String taskUnid) {
return vaServerService.getStatus(taskUnid);
}
/**
* 切换场景/预置位
*/
@GetMapping("/switchScene")
public Object switchScene(@RequestParam String taskUnid, String sceneId) {
return vaServerService.switchScene(taskUnid, sceneId);
}
/**
* 截图
*/
@GetMapping("/snapshot")
public Object snapshot(@RequestParam String taskUnid) {
return vaServerService.snapshot(taskUnid);
}
......
package com.viontech.fanxing.task.scheduling.feign;
import com.viontech.fanxing.commons.model.StoreConfig;
import com.viontech.fanxing.commons.vo.StoreConfigVo;
import com.viontech.fanxing.commons.vo.TaskVo;
import com.viontech.keliu.util.JsonMessageUtil;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
/**
* .
*
* @author 谢明辉
* @date 2021/7/20
*/
@Component
@FeignClient(value = "fanxing-task-manager")
public interface TaskClient {
@PostMapping("/tasks/{id}")
JsonMessageUtil.JsonMessage<TaskVo> updateTask(@PathVariable("id") Long taskId, @RequestBody TaskVo taskVo);
@GetMapping("/storeConfigs/{id}")
JsonMessageUtil.JsonMessage<StoreConfig> getStoreConfigById(@PathVariable("id") Long storeConfigId);
}
......@@ -22,6 +22,8 @@ public class TaskData implements Serializable {
private RuntimeConfig runtimeConfig;
private String storeConfig;
public TaskData(Task task) {
this.task = task;
......
package com.viontech.fanxing.task.scheduling.model.vaserver;
import com.viontech.fanxing.commons.model.Task;
import com.viontech.fanxing.task.scheduling.model.TaskData;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.Accessors;
/**
* .
*
* @author 谢明辉
* @date 2021/7/20
*/
@Getter
@Setter
@NoArgsConstructor
@Accessors(chain = true)
@SuppressWarnings("ALL")
public class VATask {
private String task_unid;
private String task_name;
private String alg_type;
private String store_config;
private String channel_unid;
private String stream_path;
private Integer stream_type;
private String scene;
public VATask(TaskData taskData) {
Task task = taskData.getTask();
this.task_unid = task.getUnid();
this.task_name = task.getName();
this.alg_type = task.getAlgType();
this.store_config = taskData.getStoreConfig();
this.channel_unid = task.getChannelUnid();
this.stream_path = task.getStreamPath();
this.stream_type = task.getStreamType();
this.scene = task.getScene();
}
}
package com.viontech.fanxing.task.scheduling.runner;
import com.viontech.fanxing.commons.constant.RedisKeys;
import com.viontech.fanxing.commons.constant.TaskStatus;
import com.viontech.fanxing.commons.model.Task;
import com.viontech.fanxing.commons.vo.TaskVo;
import com.viontech.fanxing.task.scheduling.feign.TaskClient;
import com.viontech.fanxing.task.scheduling.model.RuntimeConfig;
import com.viontech.fanxing.task.scheduling.model.TaskData;
import com.viontech.fanxing.task.scheduling.model.vaserver.VaServerInfo;
......@@ -13,13 +16,11 @@ import org.redisson.api.RLock;
import org.redisson.api.RMap;
import org.redisson.api.RScoredSortedSet;
import org.redisson.api.RedissonClient;
import org.redisson.client.protocol.ScoredEntry;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.Collection;
import java.util.Iterator;
import java.util.concurrent.TimeUnit;
/**
......@@ -38,6 +39,8 @@ public class TaskRunner {
private VAServerService vaServerService;
@Resource
private TaskService taskService;
@Resource
private TaskClient taskClient;
@Scheduled(fixedDelay = 5000)
public void executedTaskListener() {
......@@ -53,46 +56,41 @@ public class TaskRunner {
RScoredSortedSet<String> set = redissonClient.getScoredSortedSet(RedisKeys.SCHEDULING_TO_BE_EXECUTED_TASK_UNID_SET);
RMap<String, TaskData> taskDataMap = redissonClient.getMap(RedisKeys.SCHEDULING_TASK_DATA_MAP);
RMap<String, VaServerInfo> vaServerMap = redissonClient.getMap(RedisKeys.SCHEDULING_VASERVER_MAP);
for (; ; ) {
Collection<ScoredEntry<String>> entryCollection = set.entryRange(0, 0);
Iterator<ScoredEntry<String>> iterator = entryCollection.iterator();
if (iterator.hasNext()) {
ScoredEntry<String> next = iterator.next();
Double score = next.getScore();
String taskUnid = next.getValue();
if (System.currentTimeMillis() < score) {
break;
} else {
TaskData taskData = taskDataMap.get(taskUnid);
Task task = taskData.getTask();
String taskVaType = task.getVaType();
Float resourceNeed = task.getResourceNeed();
Collection<VaServerInfo> vaServerInfos = vaServerMap.values();
// todo 暂时先找有可用资源的vaserver,以后再进行算法优化
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 修改任务状态
set.remove(taskUnid);
}
Collection<String> entryCollection = set.valueRange(0, true, System.currentTimeMillis(), true);
for (String taskUnid : entryCollection) {
log.info("开始任务 : {}", taskUnid);
// TaskData taskData = taskDataMap.get(taskUnid);
// Task task = taskData.getTask();
// String taskVaType = task.getVaType();
// Float resourceNeed = task.getResourceNeed();
// Collection<VaServerInfo> vaServerInfos = vaServerMap.values();
// // todo 暂时先找有可用资源的vaserver,以后再进行算法优化
// VaServerInfo server = null;
// for (VaServerInfo vaServerInfo : vaServerInfos) {
// if (vaServerInfo.getAvailableResources() > resourceNeed) {
// server = vaServerInfo;
// break;
// }
// }
//
// // 找不到可以用来执行的设备,需要修改状态
// if (server == null) {
// TaskVo taskVo = new TaskVo();
// taskVo.setStatus(TaskStatus.CAN_NOT_RUN.val);
// taskClient.updateTask(task.getId(), taskVo);
// continue;
// }
//
// boolean success = vaServerService.executeTask(taskData, server);
//
// // 修改任务状态
// TaskVo taskVo = new TaskVo();
// taskVo.setStatus(TaskStatus.RUNNING.val);
// taskClient.updateTask(task.getId(), taskVo);
// // 移除任务
set.remove(taskUnid);
} else {
return;
}
}
} catch (Exception e) {
log.error("", e);
} finally {
......@@ -118,33 +116,21 @@ public class TaskRunner {
try {
RScoredSortedSet<String> set = redissonClient.getScoredSortedSet(RedisKeys.SCHEDULING_TO_BE_TERMINATED_TASK_UNID_SET);
RMap<String, TaskData> taskDataMap = redissonClient.getMap(RedisKeys.SCHEDULING_TASK_DATA_MAP);
for (; ; ) {
Collection<ScoredEntry<String>> entryCollection = set.entryRange(0, 0);
Iterator<ScoredEntry<String>> iterator = entryCollection.iterator();
if (iterator.hasNext()) {
ScoredEntry<String> next = iterator.next();
Double score = next.getScore();
String taskUnid = next.getValue();
if (System.currentTimeMillis() < score) {
return;
} else {
TaskData taskData = taskDataMap.get(taskUnid);
RuntimeConfig runtimeConfig = taskData.getRuntimeConfig();
boolean success = vaServerService.terminateTask(taskData.getTask());
// todo 获取可用的 vaserver ,执行任务终止动作,如果成功,解除 taskData和 vaServer 的关联,并且从 zset 中移除任务,恢复vaserver资源数,计算下次任务执行时间,放入zset中
if (success) {
ImmutablePair<Long, Long> nextTime = runtimeConfig.getNextTimeOfExecutionAndTerminal();
taskService.addExecutableTaskData(taskUnid, nextTime.left);
taskService.addTerminatableTaskData(taskUnid, nextTime.right);
}
set.remove(taskUnid);
}
Collection<String> entryCollection = set.valueRange(0, true, System.currentTimeMillis(), true);
} else {
return;
}
for (String taskUnid : entryCollection) {
log.info("停止任务 : {}", taskUnid);
// TaskData taskData = taskDataMap.get(taskUnid);
// RuntimeConfig runtimeConfig = taskData.getRuntimeConfig();
// boolean success = vaServerService.terminateTask(taskUnid);
// // todo 获取可用的 vaserver ,执行任务终止动作,如果成功,解除 taskData和 vaServer 的关联,并且从 zset 中移除任务,恢复vaserver资源数,计算下次任务执行时间,放入zset中
// if (success) {
// ImmutablePair<Long, Long> nextTime = runtimeConfig.getNextTimeOfExecutionAndTerminal();
// taskService.addExecutableTaskData(taskUnid, nextTime.left);
// taskService.addTerminatableTaskData(taskUnid, nextTime.right);
// }
set.remove(taskUnid);
}
} catch (Exception e) {
log.error("", e);
} finally {
......
package com.viontech.fanxing.task.scheduling.service;
import com.viontech.fanxing.commons.constant.RedisKeys;
import com.viontech.fanxing.commons.model.Task;
import com.viontech.fanxing.task.scheduling.model.TaskData;
import com.viontech.fanxing.task.scheduling.model.vaserver.VaServerInfo;
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.redisson.api.RMap;
import org.redisson.api.RScoredSortedSet;
import org.redisson.api.RedissonClient;
......@@ -20,6 +23,8 @@ public class TaskService {
@Resource
private RedissonClient redissonClient;
@Resource
private VAServerService vaServerService;
public boolean addExecutableTaskData(String taskUnid, Long timestamp) {
RScoredSortedSet<String> toBeExecutedTaskUnidSet = redissonClient.getScoredSortedSet(RedisKeys.SCHEDULING_TO_BE_EXECUTED_TASK_UNID_SET);
......@@ -36,6 +41,11 @@ public class TaskService {
taskDataMap.put(taskData.getTask().getUnid(), taskData);
}
public TaskData getTaskDataByUnid(String taskUnid) {
RMap<String, TaskData> taskDataMap = redissonClient.getMap(RedisKeys.SCHEDULING_TASK_DATA_MAP);
return taskDataMap.get(taskUnid);
}
public void removeTaskDataAll(String taskUnid) {
RScoredSortedSet<String> toBeExecutedTaskUnidSet = redissonClient.getScoredSortedSet(RedisKeys.SCHEDULING_TO_BE_EXECUTED_TASK_UNID_SET);
RScoredSortedSet<String> toBeTerminatedTaskUnidSet = redissonClient.getScoredSortedSet(RedisKeys.SCHEDULING_TO_BE_TERMINATED_TASK_UNID_SET);
......@@ -46,4 +56,41 @@ public class TaskService {
taskDataMap.remove(taskUnid);
}
public VaServerInfo taskRunOn(String taskUnid) {
RMap<String, String> taskVaServerMap = redissonClient.getMap(RedisKeys.SCHEDULING_TASK_VASERVER_MAP);
String devId = taskVaServerMap.get(taskUnid);
if (devId != null) {
return vaServerService.getVaServerInfoByDevId(devId);
} else {
return null;
}
}
/**
* 解绑任务和设备的关联状态
*
* @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);
String devId = map.get(taskUnid);
map.remove(taskUnid);
return ImmutablePair.of(taskUnid, devId);
}
public void linkTaskAndVaServer(String taskUnid, String devId) {
RMap<String, String> map = redissonClient.getMap(RedisKeys.SCHEDULING_TASK_VASERVER_MAP);
map.put(taskUnid, devId);
}
public void updateTask(Task task) {
RMap<String, TaskData> taskDataMap = redissonClient.getMap(RedisKeys.SCHEDULING_TASK_DATA_MAP);
TaskData taskData = new TaskData(task);
// 需要更新taskData,并且向vaServer更新任务信息
taskDataMap.put(task.getUnid(), taskData);
vaServerService.updateTask(taskData);
}
}
package com.viontech.fanxing.task.scheduling.service;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.viontech.fanxing.task.scheduling.model.TaskData;
import com.viontech.fanxing.task.scheduling.model.vaserver.VATask;
import com.viontech.fanxing.task.scheduling.model.vaserver.VaServerInfo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.web.reactive.function.client.WebClient;
import reactor.core.publisher.Mono;
import java.time.Duration;
/**
* .
*
* @author 谢明辉
* @date 2021/7/20
*/
@Service
@Slf4j
public class VAServerHttpService {
/**
* 下发任务
*/
public Object addTask(TaskData taskData, VaServerInfo vaServerInfo) {
VATask vaTask = new VATask(taskData);
String path = "/api/vaserver/v1/task";
Mono<String> stringMono = WebClient.create(vaServerInfo.getServiceBaseUrl())
.post()
.uri(uriBuilder -> uriBuilder.path(path).build())
.bodyValue(vaTask)
.retrieve()
.bodyToMono(String.class);
String response = stringMono.block(Duration.ofSeconds(20));
log.info("下发任务结果:{}", response);
return null;
}
/**
* 编辑任务
*/
public Object updateTask(TaskData taskData, VaServerInfo vaServerInfo) {
String path = "/api/vaserver/v1/task";
VATask vaTask = new VATask(taskData);
Mono<String> stringMono = WebClient.create(vaServerInfo.getServiceBaseUrl())
.put()
.uri(uriBuilder -> uriBuilder.path(path).build())
.bodyValue(vaTask)
.retrieve()
.bodyToMono(String.class);
String response = stringMono.block(Duration.ofSeconds(20));
log.info("下发任务结果:{}", response);
return null;
}
/**
* 删除任务
*/
public Object rmTask(String taskUnid, VaServerInfo vaServerInfo) {
String path = "/api/vaserver/v1/task}";
Mono<String> stringMono = WebClient.create(vaServerInfo.getServiceBaseUrl())
.delete()
.uri(uriBuilder -> uriBuilder
.path(path)
.queryParam("task_unid", taskUnid)
.build())
.retrieve()
.bodyToMono(String.class);
String response = stringMono.block(Duration.ofSeconds(20));
log.info("删除任务结果:{}", response);
return null;
}
/**
* 截图
*/
public Object snapshot(String taskUnid, VaServerInfo vaServerInfo) {
String path = "/api/vaserver/v1/snapshot";
Mono<String> stringMono = WebClient.create(vaServerInfo.getServiceBaseUrl())
.get()
.uri(uriBuilder -> uriBuilder
.path(path)
.queryParam("task_unid", taskUnid)
.build())
.retrieve()
.bodyToMono(String.class);
String response = stringMono.block(Duration.ofSeconds(20));
log.info("截图结果:{}", response);
return null;
}
/**
* 获取点播地址
*/
public String getAnalyzeStream(String taskUnid, VaServerInfo vaServerInfo) {
String path = "/api/vaserver/v1/get_analyze_stream";
JSONObject jsonObject = new JSONObject();
jsonObject.put("task_unid", taskUnid);
Mono<String> stringMono = WebClient.create(vaServerInfo.getServiceBaseUrl())
.post()
.uri(uriBuilder -> uriBuilder.path(path).build())
.bodyValue(jsonObject.toString())
.retrieve()
.bodyToMono(String.class);
JSONObject response = stringMono.blockOptional(Duration.ofSeconds(10)).map(JSON::parseObject).get();
Integer code = response.getInteger("code");
if (code == null || -1 == code) {
throw new RuntimeException(response.getString("msg"));
} else {
return response.getString("stream_url");
}
}
/**
* 开始输出分析流
*/
public Object startAnalyzeStream(String taskUnid, VaServerInfo vaServerInfo) {
String path = "/api/vaserver/v1/start_analyze_stream";
JSONObject jsonObject = new JSONObject();
jsonObject.put("task_unid", taskUnid);
jsonObject.put("isDrawRect", 1);
jsonObject.put("mediaServerPushUrl", "rtmp://192.168.9.159:1200/task1111111");
Mono<String> stringMono = WebClient.create(vaServerInfo.getServiceBaseUrl())
.post()
.uri(uriBuilder -> uriBuilder.path(path).build())
.bodyValue(jsonObject.toString())
.retrieve()
.bodyToMono(String.class);
String response = stringMono.block(Duration.ofSeconds(20));
log.info("输出分析流结果:{}", response);
return null;
}
/**
* 切换预置位
*/
public Object switchScene(String taskUnid, VaServerInfo vaServerInfo,String sceneId) {
String path = "/api/vaserver/v1/switch_scene";
JSONObject jsonObject = new JSONObject();
jsonObject.put("task_unid", taskUnid);
jsonObject.put("sceneID", sceneId);
Mono<String> stringMono = WebClient.create(vaServerInfo.getServiceBaseUrl())
.post()
.uri(uriBuilder -> uriBuilder.path(path).build())
.bodyValue(jsonObject.toString())
.retrieve()
.bodyToMono(String.class);
String response = stringMono.block(Duration.ofSeconds(20));
log.info("场景切换结果:{}", response);
return null;
}
/**
* 任务状态轮询控制
*/
public Object updateAlternate(String taskUnid, VaServerInfo vaServerInfo) {
String path = "/api/vaserver/v1/alternate";
JSONObject jsonObject = new JSONObject();
jsonObject.put("task_unid", taskUnid);
jsonObject.put("alternateStatus", "1");
Mono<String> stringMono = WebClient.create(vaServerInfo.getServiceBaseUrl())
.post()
.uri(uriBuilder -> uriBuilder.path(path).build())
.bodyValue(jsonObject.toString())
.retrieve()
.bodyToMono(String.class);
String response = stringMono.block(Duration.ofSeconds(20));
log.info("轮训状态控制结果:{}", response);
return null;
}
/**
* 获取轮询状态
*/
public Object getAlternate(String taskUnid, VaServerInfo vaServerInfo) {
String path = "/api/vaserver/v1/alternate";
Mono<String> stringMono = WebClient.create(vaServerInfo.getServiceBaseUrl())
.get()
.uri(uriBuilder -> uriBuilder
.path(path)
.queryParam("task_unid", taskUnid)
.build())
.retrieve()
.bodyToMono(String.class);
String response = stringMono.block(Duration.ofSeconds(20));
log.info("轮训状态控制结果:{}", response);
return null;
}
/**
* 运行状态查询
*/
public Object status(VaServerInfo vaServerInfo) {
String path = "/api/vaserver/v1/status";
Mono<String> stringMono = WebClient.create(vaServerInfo.getServiceBaseUrl())
.get()
.uri(uriBuilder -> uriBuilder
.path(path)
.build())
.retrieve()
.bodyToMono(String.class);
String response = stringMono.block(Duration.ofSeconds(20));
log.info("轮训状态控制结果:{}", response);
return null;
}
}
......@@ -2,15 +2,15 @@ package com.viontech.fanxing.task.scheduling.service;
import com.viontech.fanxing.commons.constant.RedisKeys;
import com.viontech.fanxing.commons.model.Task;
import com.viontech.fanxing.task.scheduling.model.TaskData;
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.RMap;
import org.redisson.api.RedissonClient;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Date;
import java.util.concurrent.TimeUnit;
/**
......@@ -24,9 +24,11 @@ import java.util.concurrent.TimeUnit;
public class VAServerService {
@Resource
private RestTemplateBuilder restTemplateBuilder;
@Resource
private RedissonClient redissonClient;
@Resource
private TaskService taskService;
@Resource
private VAServerHttpService vaServerHttpService;
/**
* 设备注册
......@@ -34,49 +36,40 @@ public class VAServerService {
public void registeVAServer(VaServerInfo vaServerInfo) {
String devID = vaServerInfo.getDevID();
RMap<String, VaServerInfo> map = redissonClient.getMap(RedisKeys.SCHEDULING_VASERVER_MAP);
RBucket<Object> bucket = redissonClient.getBucket(RedisKeys.getVAServerKeepAliveKey(devID));
bucket.set(1);
bucket.expire(3, TimeUnit.MINUTES);
RBucket<Date> bucket = redissonClient.getBucket(RedisKeys.getVAServerKeepAliveKey(devID));
bucket.set(new Date());
bucket.expire(2, TimeUnit.MINUTES);
map.put(devID, vaServerInfo);
}
public VaServerInfo getVaServerInfoByDevId(String devId) {
RMap<String, VaServerInfo> map = redissonClient.getMap(RedisKeys.SCHEDULING_VASERVER_MAP);
return map.get(devId);
}
/**
* 设备心跳
*/
public void keepalive(String devId) {
RBucket<Object> bucket = redissonClient.getBucket(RedisKeys.getVAServerKeepAliveKey(devId));
bucket.set(1);
bucket.expire(3, TimeUnit.MINUTES);
}
public void linkTaskAndVaServer(String taskUnid, String devId) {
RMap<String, String> map = redissonClient.getMap(RedisKeys.SCHEDULING_TASK_VASERVER_MAP);
map.put(taskUnid, devId);
RBucket<Date> bucket = redissonClient.getBucket(RedisKeys.getVAServerKeepAliveKey(devId));
bucket.set(new Date());
bucket.expire(2, TimeUnit.MINUTES);
}
/**
* 解绑任务和设备的关联状态
*
* @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);
String devId = map.get(taskUnid);
map.remove(taskUnid);
return ImmutablePair.of(taskUnid, devId);
}
/**
* 下发任务,关联任务和vaServer,修改vaServer可用资源数
*/
public boolean executeTask(Task task, VaServerInfo server) {
public boolean executeTask(TaskData taskData, VaServerInfo server) {
Task task = taskData.getTask();
// todo 执行任务下发,成功后关联任务和vaServer,减少vaServer的可用资源数量
// todo 执行任务下发
vaServerHttpService.addTask(taskData, server);
linkTaskAndVaServer(task.getUnid(), server.getDevID());
taskService.linkTaskAndVaServer(task.getUnid(), server.getDevID());
server.setAvailableResources(server.getAvailableResources() - task.getResourceNeed());
RMap<String, VaServerInfo> vaServerMap = redissonClient.getMap(RedisKeys.SCHEDULING_VASERVER_MAP);
vaServerMap.put(server.getDevID(), server);
return false;
}
......@@ -87,49 +80,71 @@ public class VAServerService {
* <p>
* 删除任务
*/
public boolean terminateTask(Task task) {
String taskUnid = task.getUnid();
public boolean terminateTask(String taskUnid) {
TaskData taskData = taskService.getTaskDataByUnid(taskUnid);
Task task = taskData.getTask();
RMap<String, String> map = redissonClient.getMap(RedisKeys.SCHEDULING_TASK_VASERVER_MAP);
String vaServerId = map.get(taskUnid);
// todo 下发终止任务请求
// 解除任务和 vaServer 关联
map.remove(taskUnid);
RMap<String, VaServerInfo> vaServerMap = redissonClient.getMap(RedisKeys.SCHEDULING_VASERVER_MAP);
VaServerInfo vaServerInfo = vaServerMap.get(vaServerId);
vaServerInfo.setAvailableResources(vaServerInfo.getAvailableResources() + task.getResourceNeed());
vaServerMap.put(vaServerId, vaServerInfo);
return false;
// 如果vaServerId不为空,需要终止任务
if (vaServerId != null) {
RMap<String, VaServerInfo> vaServerMap = redissonClient.getMap(RedisKeys.SCHEDULING_VASERVER_MAP);
VaServerInfo vaServerInfo = vaServerMap.get(vaServerId);
// 下发终止任务请求
vaServerHttpService.rmTask(taskUnid, vaServerInfo);
// 解除任务和 vaServer 关联, 恢复资源数量
map.remove(taskUnid);
vaServerInfo.setAvailableResources(vaServerInfo.getAvailableResources() + task.getResourceNeed());
vaServerMap.put(vaServerId, vaServerInfo);
return true;
}
return true;
}
/**
* 修改任务
*/
public boolean modifyTask(Task task) {
return false;
public boolean updateTask(TaskData taskData) {
VaServerInfo vaServerInfo = taskService.taskRunOn(taskData.getTask().getUnid());
vaServerHttpService.updateTask(taskData, vaServerInfo);
return true;
}
/**
* 截图
*/
public Object snapshot(Task task) {
return null;
public Object snapshot(String taskUnid) {
VaServerInfo vaServerInfo = taskService.taskRunOn(taskUnid);
if (vaServerInfo != null) {
return vaServerHttpService.snapshot(taskUnid, vaServerInfo);
} else {
throw new RuntimeException("任务不在运行状态");
}
}
/**
* 获取点播地址
*/
public Object getVideoOnDemandAddress(Task task) {
return null;
public Object getAnalyzeStream(String taskUnid) {
VaServerInfo vaServerInfo = taskService.taskRunOn(taskUnid);
if (vaServerInfo != null) {
return vaServerHttpService.getAnalyzeStream(taskUnid, vaServerInfo);
} else {
throw new RuntimeException("任务不在运行状态");
}
}
/**
* 输出分析流
*/
public void outputAnalysisStream(Task task) {
public Object startAnalyzeStream(String taskUnid) {
VaServerInfo vaServerInfo = taskService.taskRunOn(taskUnid);
if (vaServerInfo != null) {
return vaServerHttpService.startAnalyzeStream(taskUnid, vaServerInfo);
} else {
throw new RuntimeException("任务不在运行状态");
}
}
......@@ -143,9 +158,25 @@ public class VAServerService {
/**
* 获取 VAServer 运行状态配置参数等
*/
public Object getVAServerStatus(String devId) {
public Object getStatus(String devId) {
VaServerInfo vaServerInfo = getVaServerInfoByDevId(devId);
if (vaServerInfo != null) {
return vaServerHttpService.status(vaServerInfo);
} else {
throw new RuntimeException("任务不在运行状态");
}
}
return null;
/**
* 场景切换
*/
public Object switchScene(String taskUnid, String sceneId) {
VaServerInfo vaServerInfo = taskService.taskRunOn(taskUnid);
if (vaServerInfo != null) {
return vaServerHttpService.switchScene(taskUnid, vaServerInfo, sceneId);
} else {
throw new RuntimeException("任务不在运行状态");
}
}
}
package com.viontech.fanxing.task.scheduling;
/**
* .
*
* @author 谢明辉
* @date 2021/7/21
*/
public class MainTest {
}
package com.viontech.fanxing.task.scheduling.service;
import com.alibaba.fastjson.JSON;
import com.viontech.fanxing.commons.constant.RedisKeys;
import com.viontech.fanxing.commons.model.StoreConfig;
import com.viontech.fanxing.commons.model.Task;
import com.viontech.fanxing.commons.vo.StoreConfigVo;
import com.viontech.fanxing.task.scheduling.feign.TaskClient;
import com.viontech.fanxing.task.scheduling.model.TaskData;
import com.viontech.fanxing.task.scheduling.model.vaserver.VaServerInfo;
import com.viontech.keliu.util.DateUtil;
import com.viontech.keliu.util.JsonMessageUtil;
import io.micrometer.core.instrument.Statistic;
import org.apache.commons.lang.time.DateUtils;
import org.apache.commons.lang3.builder.ToStringExclude;
import org.junit.Before;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.runner.RunWith;
import org.redisson.api.RMap;
import org.redisson.api.RScoredSortedSet;
import org.redisson.api.RedissonClient;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import javax.annotation.Resource;
import java.text.ParseException;
import java.util.Date;
/**
* .
*
* @author 谢明辉
* @date 2021/7/21
*/
@SpringBootTest
@RunWith(SpringRunner.class)
class VAServerHttpServiceTest {
@Resource
VAServerHttpService vaServerHttpService;
@Resource
private RedissonClient redissonClient;
@Resource
private TaskClient taskClient;
private VaServerInfo vaServerInfo;
private TaskData taskData;
private static final String TASK_UNID = "8af60a07c86d4571b037af3f4ccf681c";
@BeforeEach
public void before() {
RMap<String, VaServerInfo> map = redissonClient.getMap(RedisKeys.SCHEDULING_VASERVER_MAP);
this.vaServerInfo = map.get("xxx-xx");
this.taskData = new TaskData();
Task task = new Task();
task.setUnid(TASK_UNID);
this.taskData.setTask(task);
}
@Test
void snapshot() {
vaServerHttpService.snapshot(TASK_UNID, vaServerInfo);
}
@Test
void getAnalyzeStream() {
String analyzeStream = vaServerHttpService.getAnalyzeStream(TASK_UNID, vaServerInfo);
System.out.println(analyzeStream);
}
@Test
void startAnalyzeStream() {
vaServerHttpService.startAnalyzeStream(TASK_UNID, vaServerInfo);
}
@Test
void switchScene() {
vaServerHttpService.switchScene(TASK_UNID, vaServerInfo,"1");
}
@Test
void updateAlternate() {
vaServerHttpService.updateAlternate(TASK_UNID, vaServerInfo);
}
@Test
void getAlternate() {
vaServerHttpService.getAlternate(TASK_UNID, vaServerInfo);
}
@Test
void status() {
vaServerHttpService.status(vaServerInfo);
}
@Test
void storeConfig() {
JsonMessageUtil.JsonMessage<StoreConfig> storeConfigById = taskClient.getStoreConfigById(3L);
System.out.println(JSON.toJSONString(storeConfigById.getData()));
}
@Test
void test() throws ParseException {
RScoredSortedSet<String> set = redissonClient.getScoredSortedSet(RedisKeys.SCHEDULING_TO_BE_EXECUTED_TASK_UNID_SET);
RScoredSortedSet<String> set2 = redissonClient.getScoredSortedSet(RedisKeys.SCHEDULING_TO_BE_TERMINATED_TASK_UNID_SET);
set.add(DateUtil.parse("yyyy-MM-dd HH:mm:ss", "2021-07-22 16:15:00").getTime(), "tttttttttttttttttt");
set2.add(DateUtil.parse("yyyy-MM-dd HH:mm:ss", "2021-07-22 16:16:00").getTime(), "tttttttttttttttttt");
}
}
\ No newline at end of file
......@@ -64,12 +64,12 @@ CREATE TABLE IF NOT EXISTS s_forward_config(
-- d_traffic
CREATE TABLE IF NOT EXISTS d_traffic(
id BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT,
id BIGINT NOT NULL AUTO_INCREMENT,
unid VARCHAR(36) NOT NULL DEFAULT (UUID()),
task_id BIGINT COMMENT '任务id',
event_cate VARCHAR(36),
event_type VARCHAR(36),
event_dt TIMESTAMP NOT NULL COMMENT '事件时间',
event_time TIMESTAMP NOT NULL COMMENT '事件时间',
channel_unid VARCHAR(36) COMMENT '通道unid',
plate_color VARCHAR(36) COMMENT '车牌颜色',
plate_number VARCHAR(36) COMMENT '车牌号码',
......@@ -87,32 +87,35 @@ CREATE TABLE IF NOT EXISTS d_traffic(
feature_decoration SMALLINT DEFAULT 0 COMMENT '摆件',
feature_sun_shield SMALLINT DEFAULT 0 COMMENT '遮阳板',
xcycle_type VARCHAR(36) COMMENT '非机动车类型',
event_id VARCHAR(36) COMMENT '事件唯一id' ,
event_id VARCHAR(64) COMMENT '事件唯一id' ,
special_type VARCHAR(36),
with_helmet INT COMMENT '是否戴头盔0不带',
json_data TEXT COMMENT '原始数据',
pic_name VARCHAR(256),
pics VARCHAR(2048),
video_name VARCHAR(256),
status INT NOT NULL DEFAULT 0 COMMENT '状态'
status INT NOT NULL DEFAULT 0 COMMENT '状态',
PRIMARY KEY(id,event_time)
);
-- d_traffic_face
CREATE TABLE IF NOT EXISTS d_traffic_face(
id BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT,
id BIGINT NOT NULL AUTO_INCREMENT,
unid VARCHAR(36) NOT NULL DEFAULT (UUID()),
traffic_id BIGINT NOT NULL COMMENT 'trafficId',
event_time TIMESTAMP NOT NULL COMMENT '事件时间',
state SMALLINT NOT NULL DEFAULT 1,
sex SMALLINT NOT NULL DEFAULT 0,
upper_color VARCHAR(36),
lower_color VARCHAR(36),
INDEX s_task_name(traffic_id)
INDEX s_task_name(traffic_id),
PRIMARY KEY(id,event_time)
);
-- d_flow_data
CREATE TABLE IF NOT EXISTS d_flow_data(
id BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT,
id BIGINT NOT NULL AUTO_INCREMENT,
unid VARCHAR(36) NOT NULL DEFAULT (UUID()),
flow_event_id BIGINT COMMENT 'eventId',
task_id BIGINT,
......@@ -137,48 +140,48 @@ CREATE TABLE IF NOT EXISTS d_flow_data(
event_time TIMESTAMP,
dist_time FLOAT,
time_occupy FLOAT,
status INT NOT NULL DEFAULT 0 COMMENT '状态'
status INT NOT NULL DEFAULT 0 COMMENT '状态',
PRIMARY KEY(id,event_time)
);
-- d_flow_event
CREATE TABLE IF NOT EXISTS d_flow_event(
id BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT,
id BIGINT NOT NULL AUTO_INCREMENT,
unid VARCHAR(36) NOT NULL DEFAULT (UUID()),
task_id BIGINT COMMENT '任务id',
event_type VARCHAR(36),
event_time TIMESTAMP COMMENT '事件时间',
event_id VARCHAR(36) COMMENT '事件唯一id',
event_id VARCHAR(64) COMMENT '事件唯一id',
device_code VARCHAR(36),
device_name VARCHAR(64),
location_code VARCHAR(36),
location_name VARCHAR(64),
json_data TEXT,
pic_name VARCHAR(256),
video_name VARCHAR(256)
pics VARCHAR(2048),
video_name VARCHAR(256),
PRIMARY KEY(id,event_time)
);
-- d_behavior
CREATE TABLE IF NOT EXISTS d_behavior(
id BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT,
id BIGINT NOT NULL AUTO_INCREMENT,
unid VARCHAR(36) NOT NULL DEFAULT (UUID()),
task_id BIGINT,
event_type VARCHAR(36),
event_cate VARCHAR(36),
event_refid VARCHAR(36),
event_refid VARCHAR(64),
event_time TIMESTAMP,
aux_dev_info TEXT,
event_data TEXT,
pics TEXT,
pics VARCHAR(2048),
video TEXT,
channel_unid VARCHAR(36),
test_pic_file VARCHAR(256),
test_frame_no VARCHAR(256),
task_name VARCHAR(128),
event_data_num VARCHAR(36)
event_data_num VARCHAR(36),
PRIMARY KEY(id,event_time)
);
-- s_dict_cate
......@@ -204,4 +207,116 @@ CREATE TABLE IF NOT EXISTS s_dict_code(
name VARCHAR(36) NOT NULL COMMENT 'code名称',
note VARCHAR(36) COMMENT '注释',
INDEX s_dict_code(cate_id)
);
\ No newline at end of file
);
-- s_channel
CREATE TABLE IF NOT EXISTS s_channel(
id BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT,
unid VARCHAR(36) NOT NULL DEFAULT (UUID()),
channel_unid VARCHAR(64) NOT NULL,
device_unid VARCHAR(64) NOT NULL,
type INT NOT NULL default 0,
stream_type INT,
stream_path VARCHAR(1024),
username VARCHAR(36),
password VARCHAR(64),
address_unid VARCHAR(36),
name VARCHAR(128),
ip VARCHAR(36),
port INT,
expand VARCHAR(128),
longitude FLOAT,
latitude FLOAT,
status INT NOT NULL DEFAULT 0,
INDEX s_channel(channel_unid)
);
-- 分表
alter TABLE d_traffic PARTITION by RANGE(UNIX_TIMESTAMP(event_time))(
PARTITION d_traffic20210701 VALUES less than (UNIX_TIMESTAMP('2021-07-02'))
);
alter TABLE d_traffic_face PARTITION by RANGE(UNIX_TIMESTAMP(event_time))(
PARTITION d_traffic_face20210701 VALUES less than (UNIX_TIMESTAMP('2021-07-02'))
);
alter TABLE d_flow_event PARTITION by RANGE(UNIX_TIMESTAMP(event_time))(
PARTITION d_flow_event20210701 VALUES less than (UNIX_TIMESTAMP('2021-07-02'))
);
alter TABLE d_flow_data PARTITION by RANGE(UNIX_TIMESTAMP(event_time))(
PARTITION d_flow_data20210701 VALUES less than (UNIX_TIMESTAMP('2021-07-02'))
);
alter TABLE d_behavior PARTITION by RANGE(UNIX_TIMESTAMP(event_time))(
PARTITION d_behavior20210701 VALUES less than (UNIX_TIMESTAMP('2021-07-02'))
);
delimiter $$
DROP PROCEDURE IF EXISTS timestamp_partition
$$
CREATE PROCEDURE timestamp_partition(v_table_name VARCHAR(128),v_schema VARCHAR(128))
BEGIN
DECLARE v_sysdate date; # 声明 当前时间
DECLARE v_mindate date; # 声明 目前分区的最小值
DECLARE v_maxdate date; # 声明 目前分区值中的最大值
DECLARE v_pt varchar(20); # 声明 分区名称 数字部分
DECLARE v_maxval varchar(20); # 声明 最大值
DECLARE i int; # 声明 ??
-- 增加新分区
SELECT max(CAST(FROM_UNIXTIME(partition_description) as date)) AS val
INTO v_maxdate
FROM INFORMATION_SCHEMA.PARTITIONS
WHERE TABLE_NAME = v_table_name AND TABLE_SCHEMA = v_schema;
set v_sysdate = sysdate(); # 赋值v_sysdate为当前时间
-- INTERVAL 时间计算的关键字
WHILE v_maxdate <= (v_sysdate + INTERVAL 7 DAY) DO
SET v_pt = date_format(v_maxdate ,'%Y%m%d');
SET v_maxval = date_format(v_maxdate + INTERVAL 1 DAY, '%Y-%m-%d');
SET @sql = concat('alter table ',v_table_name,' add partition (partition ',v_table_name, v_pt, ' values less than(UNIX_TIMESTAMP(''', v_maxval , ''')))');
PREPARE stmt FROM @sql;
EXECUTE stmt;
-- 删除预处理
DEALLOCATE PREPARE stmt;
SET v_maxdate = v_maxdate + INTERVAL 1 DAY; # 最大值 加一操作
END WHILE;
-- 删除旧分区
SELECT min(CAST(FROM_UNIXTIME(partition_description) as date)) AS val
INTO v_mindate
FROM INFORMATION_SCHEMA.PARTITIONS
WHERE TABLE_NAME = v_table_name AND TABLE_SCHEMA = v_schema;
-- 删除7天前的旧分区
WHILE v_mindate <= (v_sysdate - INTERVAL 7 DAY) DO
SET v_pt = date_format(v_mindate - INTERVAL 1 DAY,'%Y%m%d');
SET @sql = concat('alter table ',v_table_name,' drop partition ',v_table_name, v_pt);
PREPARE stmt FROM @sql;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET v_mindate = v_mindate + INTERVAL 1 DAY;
END WHILE;
END$$
delimiter ;
-- 创建定时任务
delimiter $$
drop event if exists auto_pt $$
create event auto_pt
on schedule
every 1 day
do
BEGIN
call timestamp_partition('d_traffic','{schema}');
call timestamp_partition('d_behavior','{schema}');
call timestamp_partition('d_flow_event','{schema}');
call timestamp_partition('d_flow_data','{schema}');
call timestamp_partition('d_traffic_face','{schema}');
END$$
delimiter ;
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!