Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
谢明辉
/
fanxing3
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit c8aa9e36
authored
Sep 08, 2021
by
xmh
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
运维服务:
1. <feat> 视频通道添加 createTime 和 tag
1 parent
7ef951c1
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
1420 additions
and
108 deletions
fanxing-commons/src/main/java/com/viontech/fanxing/commons/model/Channel.java
fanxing-commons/src/main/java/com/viontech/fanxing/commons/model/ChannelExample.java
fanxing-commons/src/main/java/com/viontech/fanxing/commons/model/ChannelTag.java
fanxing-commons/src/main/java/com/viontech/fanxing/commons/model/ChannelTagExample.java
fanxing-commons/src/main/java/com/viontech/fanxing/commons/vo/ChannelTagVo.java
fanxing-commons/src/main/java/com/viontech/fanxing/commons/vo/ChannelVo.java
fanxing-commons/src/main/java/com/viontech/fanxing/commons/vobase/ChannelTagVoBase.java
fanxing-commons/src/main/java/com/viontech/fanxing/commons/vobase/ChannelVoBase.java
fanxing-ops/src/main/java/com/viontech/fanxing/ops/controller/base/ChannelBaseController.java
fanxing-ops/src/main/java/com/viontech/fanxing/ops/controller/base/ChannelTagBaseController.java
fanxing-ops/src/main/java/com/viontech/fanxing/ops/controller/web/ChannelController.java
fanxing-ops/src/main/java/com/viontech/fanxing/ops/controller/web/ChannelTagController.java
fanxing-ops/src/main/java/com/viontech/fanxing/ops/mapper/ChannelTagMapper.java
fanxing-ops/src/main/java/com/viontech/fanxing/ops/mapping/ChannelMapper.xml
fanxing-ops/src/main/java/com/viontech/fanxing/ops/mapping/ChannelTagMapper.xml
fanxing-ops/src/main/java/com/viontech/fanxing/ops/service/adapter/ChannelTagService.java
fanxing-ops/src/main/java/com/viontech/fanxing/ops/service/impl/ChannelServiceImpl.java
fanxing-ops/src/main/java/com/viontech/fanxing/ops/service/impl/ChannelTagServiceImpl.java
fanxing-commons/src/main/java/com/viontech/fanxing/commons/model/Channel.java
View file @
c8aa9e3
...
...
@@ -2,6 +2,9 @@ package com.viontech.fanxing.commons.model;
import
com.viontech.fanxing.commons.base.BaseModel
;
import
java.util.Date
;
import
java.util.List
;
public
class
Channel
extends
BaseModel
{
private
Long
id
;
...
...
@@ -37,6 +40,10 @@ public class Channel extends BaseModel {
private
Integer
status
;
private
Date
createTime
;
private
List
<
Long
>
tags
;
public
Long
getId
()
{
return
id
;
}
...
...
@@ -172,4 +179,21 @@ public class Channel extends BaseModel {
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
List
<
Long
>
getTags
()
{
return
tags
;
}
public
Channel
setTags
(
List
<
Long
>
tags
)
{
this
.
tags
=
tags
;
return
this
;
}
}
\ No newline at end of file
fanxing-commons/src/main/java/com/viontech/fanxing/commons/model/ChannelExample.java
View file @
c8aa9e3
...
...
@@ -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
;
...
...
@@ -1207,6 +1208,66 @@ public class ChannelExample extends BaseExample {
addCriterion
(
"`channel`.`status` not between"
,
value1
,
value2
,
"status"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeIsNull
()
{
addCriterion
(
"`channel`.create_time is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeIsNotNull
()
{
addCriterion
(
"`channel`.create_time is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeEqualTo
(
Date
value
)
{
addCriterion
(
"`channel`.create_time ="
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeNotEqualTo
(
Date
value
)
{
addCriterion
(
"`channel`.create_time <>"
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeGreaterThan
(
Date
value
)
{
addCriterion
(
"`channel`.create_time >"
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeGreaterThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"`channel`.create_time >="
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeLessThan
(
Date
value
)
{
addCriterion
(
"`channel`.create_time <"
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeLessThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"`channel`.create_time <="
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeIn
(
List
<
Date
>
values
)
{
addCriterion
(
"`channel`.create_time in"
,
values
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeNotIn
(
List
<
Date
>
values
)
{
addCriterion
(
"`channel`.create_time not in"
,
values
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"`channel`.create_time between"
,
value1
,
value2
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeNotBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"`channel`.create_time not between"
,
value1
,
value2
,
"createTime"
);
return
(
Criteria
)
this
;
}
}
public
static
class
ColumnContainer
extends
ColumnContainerBase
{
...
...
@@ -1299,5 +1360,10 @@ public class ChannelExample extends BaseExample {
addColumnStr
(
"`channel`.`status` as `channel_status` "
);
return
(
ColumnContainer
)
this
;
}
public
ColumnContainer
hasCreateTimeColumn
()
{
addColumnStr
(
"`channel`.create_time as channel_create_time "
);
return
(
ColumnContainer
)
this
;
}
}
}
\ No newline at end of file
fanxing-commons/src/main/java/com/viontech/fanxing/commons/model/ChannelTag.java
0 → 100644
View file @
c8aa9e3
package
com
.
viontech
.
fanxing
.
commons
.
model
;
import
com.viontech.fanxing.commons.base.BaseModel
;
public
class
ChannelTag
extends
BaseModel
{
private
Long
id
;
private
Long
channelId
;
private
Long
tagId
;
private
Channel
channel
;
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
Long
getChannelId
()
{
return
channelId
;
}
public
void
setChannelId
(
Long
channelId
)
{
this
.
channelId
=
channelId
;
}
public
Long
getTagId
()
{
return
tagId
;
}
public
void
setTagId
(
Long
tagId
)
{
this
.
tagId
=
tagId
;
}
public
Channel
getChannel
()
{
return
channel
;
}
public
void
setChannel
(
Channel
channel
)
{
this
.
channel
=
channel
;
}
}
\ No newline at end of file
fanxing-commons/src/main/java/com/viontech/fanxing/commons/model/ChannelTagExample.java
0 → 100644
View file @
c8aa9e3
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
ChannelTagExample
extends
BaseExample
{
public
ChannelTagExample
()
{
super
();
tableName
=
"r_channel_tag"
;
tableAlias
=
"channel_tag"
;
ignoreCase
=
false
;
}
public
ChannelExample
.
ColumnContainer
createChannelColumns
()
{
ChannelExample
channelExample
=
new
ChannelExample
();
ChannelExample
.
ColumnContainer
columnContainer
=
(
ChannelExample
.
ColumnContainer
)
columnContainerMap
.
get
(
channelExample
.
getTableName
());
if
(
columnContainer
==
null
){
columnContainer
=
channelExample
.
createColumns
();
columnContainerMap
.
put
(
channelExample
.
getTableName
(),
columnContainer
);
}
leftJoinTableSet
.
add
(
columnContainer
.
getTableName
());
return
columnContainer
;
}
public
ChannelExample
.
Criteria
andChannelCriteria
()
{
ChannelExample
channelExample
=
new
ChannelExample
();
ChannelExample
.
Criteria
criteria
=
channelExample
.
createCriteria
();
Criteria
myCriteria
=
null
;
if
(
oredCriteria
.
size
()
==
0
)
{
myCriteria
=
createCriteriaInternal
();
oredCriteria
.
add
(
myCriteria
);
}
else
{
myCriteria
=
(
Criteria
)
oredCriteria
.
get
(
0
);
}
leftJoinTableSet
.
add
(
criteria
.
getTableName
());
criteria
.
setAllCriteria
(
myCriteria
.
getAllCriteria
());
return
criteria
;
}
public
ChannelExample
.
Criteria
orChannelCriteria
()
{
ChannelExample
channelExample
=
new
ChannelExample
();
ChannelExample
.
Criteria
criteria
=
channelExample
.
createCriteria
();
leftJoinTableSet
.
add
(
criteria
.
getTableName
());
oredCriteria
.
add
(
criteria
);
return
criteria
;
}
public
ChannelExample
.
Criteria
andChannelCriteria
(
Criteria
criteria
)
{
ChannelExample
channelExample
=
new
ChannelExample
();
ChannelExample
.
Criteria
newCriteria
=
channelExample
.
createCriteria
();
leftJoinTableSet
.
add
(
newCriteria
.
getTableName
());
newCriteria
.
setAllCriteria
(
criteria
.
getAllCriteria
());
return
newCriteria
;
}
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
=
"r_channel_tag"
;
}
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_tag`.id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdIsNotNull
()
{
addCriterion
(
"`channel_tag`.id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdEqualTo
(
Long
value
)
{
addCriterion
(
"`channel_tag`.id ="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"`channel_tag`.id <>"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThan
(
Long
value
)
{
addCriterion
(
"`channel_tag`.id >"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"`channel_tag`.id >="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThan
(
Long
value
)
{
addCriterion
(
"`channel_tag`.id <"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"`channel_tag`.id <="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"`channel_tag`.id in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"`channel_tag`.id not in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"`channel_tag`.id between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"`channel_tag`.id not between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andChannelIdIsNull
()
{
addCriterion
(
"`channel_tag`.channel_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andChannelIdIsNotNull
()
{
addCriterion
(
"`channel_tag`.channel_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andChannelIdEqualTo
(
Long
value
)
{
addCriterion
(
"`channel_tag`.channel_id ="
,
value
,
"channelId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andChannelIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"`channel_tag`.channel_id <>"
,
value
,
"channelId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andChannelIdGreaterThan
(
Long
value
)
{
addCriterion
(
"`channel_tag`.channel_id >"
,
value
,
"channelId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andChannelIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"`channel_tag`.channel_id >="
,
value
,
"channelId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andChannelIdLessThan
(
Long
value
)
{
addCriterion
(
"`channel_tag`.channel_id <"
,
value
,
"channelId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andChannelIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"`channel_tag`.channel_id <="
,
value
,
"channelId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andChannelIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"`channel_tag`.channel_id in"
,
values
,
"channelId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andChannelIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"`channel_tag`.channel_id not in"
,
values
,
"channelId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andChannelIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"`channel_tag`.channel_id between"
,
value1
,
value2
,
"channelId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andChannelIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"`channel_tag`.channel_id not between"
,
value1
,
value2
,
"channelId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTagIdIsNull
()
{
addCriterion
(
"`channel_tag`.tag_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTagIdIsNotNull
()
{
addCriterion
(
"`channel_tag`.tag_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTagIdEqualTo
(
Long
value
)
{
addCriterion
(
"`channel_tag`.tag_id ="
,
value
,
"tagId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTagIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"`channel_tag`.tag_id <>"
,
value
,
"tagId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTagIdGreaterThan
(
Long
value
)
{
addCriterion
(
"`channel_tag`.tag_id >"
,
value
,
"tagId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTagIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"`channel_tag`.tag_id >="
,
value
,
"tagId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTagIdLessThan
(
Long
value
)
{
addCriterion
(
"`channel_tag`.tag_id <"
,
value
,
"tagId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTagIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"`channel_tag`.tag_id <="
,
value
,
"tagId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTagIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"`channel_tag`.tag_id in"
,
values
,
"tagId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTagIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"`channel_tag`.tag_id not in"
,
values
,
"tagId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTagIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"`channel_tag`.tag_id between"
,
value1
,
value2
,
"tagId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTagIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"`channel_tag`.tag_id not between"
,
value1
,
value2
,
"tagId"
);
return
(
Criteria
)
this
;
}
}
public
static
class
ColumnContainer
extends
ColumnContainerBase
{
protected
ColumnContainer
(
String
tableName
)
{
super
(
tableName
);
}
public
ColumnContainer
hasIdColumn
()
{
addColumnStr
(
"`channel_tag`.id as channel_tag_id "
);
return
(
ColumnContainer
)
this
;
}
public
ColumnContainer
hasChannelIdColumn
()
{
addColumnStr
(
"`channel_tag`.channel_id as channel_tag_channel_id "
);
return
(
ColumnContainer
)
this
;
}
public
ColumnContainer
hasTagIdColumn
()
{
addColumnStr
(
"`channel_tag`.tag_id as channel_tag_tag_id "
);
return
(
ColumnContainer
)
this
;
}
}
}
\ No newline at end of file
fanxing-commons/src/main/java/com/viontech/fanxing/commons/vo/ChannelTagVo.java
0 → 100644
View file @
c8aa9e3
package
com
.
viontech
.
fanxing
.
commons
.
vo
;
import
com.viontech.fanxing.commons.model.ChannelTag
;
import
com.viontech.fanxing.commons.vobase.ChannelTagVoBase
;
public
class
ChannelTagVo
extends
ChannelTagVoBase
{
public
ChannelTagVo
()
{
super
();
}
public
ChannelTagVo
(
ChannelTag
channelTag
)
{
super
(
channelTag
);
}
}
\ No newline at end of file
fanxing-commons/src/main/java/com/viontech/fanxing/commons/vo/ChannelVo.java
View file @
c8aa9e3
...
...
@@ -2,12 +2,12 @@ package com.viontech.fanxing.commons.vo;
import
com.viontech.fanxing.commons.model.Channel
;
import
com.viontech.fanxing.commons.vobase.ChannelVoBase
;
import
net.minidev.json.annotate.JsonIgnore
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.util.List
;
public
class
ChannelVo
extends
ChannelVoBase
{
@JsonIgnore
private
MultipartFile
file
;
private
Boolean
tree
;
...
...
fanxing-commons/src/main/java/com/viontech/fanxing/commons/vobase/ChannelTagVoBase.java
0 → 100644
View file @
c8aa9e3
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
com.viontech.fanxing.commons.model.ChannelTag
;
import
java.util.ArrayList
;
public
class
ChannelTagVoBase
extends
ChannelTag
implements
VoInterface
<
ChannelTag
>
{
private
ChannelTag
channelTag
;
@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
<
Long
>
channelId_arr
;
@JsonIgnore
private
Long
channelId_gt
;
@JsonIgnore
private
Long
channelId_lt
;
@JsonIgnore
private
Long
channelId_gte
;
@JsonIgnore
private
Long
channelId_lte
;
@JsonIgnore
private
ArrayList
<
Long
>
tagId_arr
;
@JsonIgnore
private
Long
tagId_gt
;
@JsonIgnore
private
Long
tagId_lt
;
@JsonIgnore
private
Long
tagId_gte
;
@JsonIgnore
private
Long
tagId_lte
;
public
ChannelTagVoBase
()
{
this
(
null
);
}
public
ChannelTagVoBase
(
ChannelTag
channelTag
)
{
if
(
channelTag
==
null
)
{
channelTag
=
new
ChannelTag
();
}
this
.
channelTag
=
channelTag
;
}
@JsonIgnore
public
ChannelTag
getModel
()
{
return
channelTag
;
}
public
void
setModel
(
ChannelTag
channelTag
)
{
this
.
channelTag
=
channelTag
;
}
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
<
Long
>
getChannelId_arr
()
{
return
channelId_arr
;
}
public
void
setChannelId_arr
(
ArrayList
<
Long
>
channelId_arr
)
{
this
.
channelId_arr
=
channelId_arr
;
}
public
Long
getChannelId_gt
()
{
return
channelId_gt
;
}
public
void
setChannelId_gt
(
Long
channelId_gt
)
{
this
.
channelId_gt
=
channelId_gt
;
}
public
Long
getChannelId_lt
()
{
return
channelId_lt
;
}
public
void
setChannelId_lt
(
Long
channelId_lt
)
{
this
.
channelId_lt
=
channelId_lt
;
}
public
Long
getChannelId_gte
()
{
return
channelId_gte
;
}
public
void
setChannelId_gte
(
Long
channelId_gte
)
{
this
.
channelId_gte
=
channelId_gte
;
}
public
Long
getChannelId_lte
()
{
return
channelId_lte
;
}
public
void
setChannelId_lte
(
Long
channelId_lte
)
{
this
.
channelId_lte
=
channelId_lte
;
}
public
Long
getChannelId
()
{
if
(
getModel
()
==
null
){
throw
new
RuntimeException
(
"model is null"
);
}
return
this
.
getModel
().
getChannelId
();
}
public
void
setChannelId
(
Long
channelId
)
{
if
(
getModel
()
==
null
){
throw
new
RuntimeException
(
"model is null"
);
}
this
.
getModel
().
setChannelId
(
channelId
);
}
public
ArrayList
<
Long
>
getTagId_arr
()
{
return
tagId_arr
;
}
public
void
setTagId_arr
(
ArrayList
<
Long
>
tagId_arr
)
{
this
.
tagId_arr
=
tagId_arr
;
}
public
Long
getTagId_gt
()
{
return
tagId_gt
;
}
public
void
setTagId_gt
(
Long
tagId_gt
)
{
this
.
tagId_gt
=
tagId_gt
;
}
public
Long
getTagId_lt
()
{
return
tagId_lt
;
}
public
void
setTagId_lt
(
Long
tagId_lt
)
{
this
.
tagId_lt
=
tagId_lt
;
}
public
Long
getTagId_gte
()
{
return
tagId_gte
;
}
public
void
setTagId_gte
(
Long
tagId_gte
)
{
this
.
tagId_gte
=
tagId_gte
;
}
public
Long
getTagId_lte
()
{
return
tagId_lte
;
}
public
void
setTagId_lte
(
Long
tagId_lte
)
{
this
.
tagId_lte
=
tagId_lte
;
}
public
Long
getTagId
()
{
if
(
getModel
()
==
null
){
throw
new
RuntimeException
(
"model is null"
);
}
return
this
.
getModel
().
getTagId
();
}
public
void
setTagId
(
Long
tagId
)
{
if
(
getModel
()
==
null
){
throw
new
RuntimeException
(
"model is null"
);
}
this
.
getModel
().
setTagId
(
tagId
);
}
public
Channel
getChannel
()
{
if
(
getModel
()
==
null
){
throw
new
RuntimeException
(
"model is null"
);
}
return
this
.
getModel
().
getChannel
();
}
public
void
setChannel
(
Channel
channel
)
{
if
(
getModel
()
==
null
){
throw
new
RuntimeException
(
"model is null"
);
}
this
.
getModel
().
setChannel
(
channel
);
}
}
\ No newline at end of file
fanxing-commons/src/main/java/com/viontech/fanxing/commons/vobase/ChannelVoBase.java
View file @
c8aa9e3
...
...
@@ -4,6 +4,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore;
import
com.viontech.fanxing.commons.base.VoInterface
;
import
com.viontech.fanxing.commons.model.Channel
;
import
java.util.ArrayList
;
import
java.util.Date
;
public
class
ChannelVoBase
extends
Channel
implements
VoInterface
<
Channel
>
{
private
Channel
channel
;
...
...
@@ -36,6 +37,9 @@ public class ChannelVoBase extends Channel implements VoInterface<Channel> {
private
String
channelUnid_like
;
@JsonIgnore
private
Boolean
deviceUnid_null
;
@JsonIgnore
private
ArrayList
<
String
>
deviceUnid_arr
;
@JsonIgnore
...
...
@@ -206,6 +210,21 @@ public class ChannelVoBase extends Channel implements VoInterface<Channel> {
@JsonIgnore
private
Integer
status_lte
;
@JsonIgnore
private
ArrayList
<
Date
>
createTime_arr
;
@JsonIgnore
private
Date
createTime_gt
;
@JsonIgnore
private
Date
createTime_lt
;
@JsonIgnore
private
Date
createTime_gte
;
@JsonIgnore
private
Date
createTime_lte
;
public
ChannelVoBase
()
{
this
(
null
);
}
...
...
@@ -340,6 +359,14 @@ public class ChannelVoBase extends Channel implements VoInterface<Channel> {
this
.
getModel
().
setChannelUnid
(
channelUnid
);
}
public
Boolean
getDeviceUnid_null
()
{
return
deviceUnid_null
;
}
public
void
setDeviceUnid_null
(
Boolean
deviceUnid_null
)
{
this
.
deviceUnid_null
=
deviceUnid_null
;
}
public
ArrayList
<
String
>
getDeviceUnid_arr
()
{
return
deviceUnid_arr
;
}
...
...
@@ -991,4 +1018,58 @@ public class ChannelVoBase extends Channel implements VoInterface<Channel> {
}
this
.
getModel
().
setStatus
(
status
);
}
public
ArrayList
<
Date
>
getCreateTime_arr
()
{
return
createTime_arr
;
}
public
void
setCreateTime_arr
(
ArrayList
<
Date
>
createTime_arr
)
{
this
.
createTime_arr
=
createTime_arr
;
}
public
Date
getCreateTime_gt
()
{
return
createTime_gt
;
}
public
void
setCreateTime_gt
(
Date
createTime_gt
)
{
this
.
createTime_gt
=
createTime_gt
;
}
public
Date
getCreateTime_lt
()
{
return
createTime_lt
;
}
public
void
setCreateTime_lt
(
Date
createTime_lt
)
{
this
.
createTime_lt
=
createTime_lt
;
}
public
Date
getCreateTime_gte
()
{
return
createTime_gte
;
}
public
void
setCreateTime_gte
(
Date
createTime_gte
)
{
this
.
createTime_gte
=
createTime_gte
;
}
public
Date
getCreateTime_lte
()
{
return
createTime_lte
;
}
public
void
setCreateTime_lte
(
Date
createTime_lte
)
{
this
.
createTime_lte
=
createTime_lte
;
}
public
Date
getCreateTime
()
{
if
(
getModel
()
==
null
){
throw
new
RuntimeException
(
"model is null"
);
}
return
this
.
getModel
().
getCreateTime
();
}
public
void
setCreateTime
(
Date
createTime
)
{
if
(
getModel
()
==
null
){
throw
new
RuntimeException
(
"model is null"
);
}
this
.
getModel
().
setCreateTime
(
createTime
);
}
}
\ No newline at end of file
fanxing-ops/src/main/java/com/viontech/fanxing/ops/controller/base/ChannelBaseController.java
View file @
c8aa9e3
...
...
@@ -2,12 +2,13 @@ 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.BaseMapper
;
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.mapper.ChannelMapper
;
import
com.viontech.fanxing.ops.service.adapter.ChannelService
;
import
javax.annotation.Resource
;
public
abstract
class
ChannelBaseController
extends
BaseController
<
Channel
,
ChannelVo
>
{
...
...
@@ -18,299 +19,324 @@ public abstract class ChannelBaseController extends BaseController<Channel, Chan
protected
BaseExample
getExample
(
ChannelVo
channelVo
,
int
type
)
{
ChannelExample
channelExample
=
new
ChannelExample
();
ChannelExample
.
Criteria
criteria
=
channelExample
.
createCriteria
();
if
(
channelVo
.
getId
()
!=
null
)
{
if
(
channelVo
.
getId
()
!=
null
)
{
criteria
.
andIdEqualTo
(
channelVo
.
getId
());
}
if
(
channelVo
.
getId_arr
()
!=
null
)
{
if
(
channelVo
.
getId_arr
()
!=
null
)
{
criteria
.
andIdIn
(
channelVo
.
getId_arr
());
}
if
(
channelVo
.
getId_gt
()
!=
null
)
{
if
(
channelVo
.
getId_gt
()
!=
null
)
{
criteria
.
andIdGreaterThan
(
channelVo
.
getId_gt
());
}
if
(
channelVo
.
getId_lt
()
!=
null
)
{
if
(
channelVo
.
getId_lt
()
!=
null
)
{
criteria
.
andIdLessThan
(
channelVo
.
getId_lt
());
}
if
(
channelVo
.
getId_gte
()
!=
null
)
{
if
(
channelVo
.
getId_gte
()
!=
null
)
{
criteria
.
andIdGreaterThanOrEqualTo
(
channelVo
.
getId_gte
());
}
if
(
channelVo
.
getId_lte
()
!=
null
)
{
if
(
channelVo
.
getId_lte
()
!=
null
)
{
criteria
.
andIdLessThanOrEqualTo
(
channelVo
.
getId_lte
());
}
if
(
channelVo
.
getUnid
()
!=
null
)
{
if
(
channelVo
.
getUnid
()
!=
null
)
{
criteria
.
andUnidEqualTo
(
channelVo
.
getUnid
());
}
if
(
channelVo
.
getUnid_arr
()
!=
null
)
{
if
(
channelVo
.
getUnid_arr
()
!=
null
)
{
criteria
.
andUnidIn
(
channelVo
.
getUnid_arr
());
}
if
(
channelVo
.
getUnid_like
()
!=
null
)
{
if
(
channelVo
.
getUnid_like
()
!=
null
)
{
criteria
.
andUnidLike
(
channelVo
.
getUnid_like
());
}
if
(
channelVo
.
getChannelUnid
()
!=
null
)
{
if
(
channelVo
.
getChannelUnid
()
!=
null
)
{
criteria
.
andChannelUnidEqualTo
(
channelVo
.
getChannelUnid
());
}
if
(
channelVo
.
getChannelUnid_arr
()
!=
null
)
{
if
(
channelVo
.
getChannelUnid_arr
()
!=
null
)
{
criteria
.
andChannelUnidIn
(
channelVo
.
getChannelUnid_arr
());
}
if
(
channelVo
.
getChannelUnid_like
()
!=
null
)
{
if
(
channelVo
.
getChannelUnid_like
()
!=
null
)
{
criteria
.
andChannelUnidLike
(
channelVo
.
getChannelUnid_like
());
}
if
(
channelVo
.
getDeviceUnid
()
!=
null
)
{
if
(
channelVo
.
getDeviceUnid
()
!=
null
)
{
criteria
.
andDeviceUnidEqualTo
(
channelVo
.
getDeviceUnid
());
}
if
(
channelVo
.
getDeviceUnid_arr
()
!=
null
)
{
if
(
channelVo
.
getDeviceUnid_null
()
!=
null
)
{
if
(
channelVo
.
getDeviceUnid_null
().
booleanValue
())
{
criteria
.
andDeviceUnidIsNull
();
}
else
{
criteria
.
andDeviceUnidIsNotNull
();
}
}
if
(
channelVo
.
getDeviceUnid_arr
()
!=
null
)
{
criteria
.
andDeviceUnidIn
(
channelVo
.
getDeviceUnid_arr
());
}
if
(
channelVo
.
getDeviceUnid_like
()
!=
null
)
{
if
(
channelVo
.
getDeviceUnid_like
()
!=
null
)
{
criteria
.
andDeviceUnidLike
(
channelVo
.
getDeviceUnid_like
());
}
if
(
channelVo
.
getType
()
!=
null
)
{
if
(
channelVo
.
getType
()
!=
null
)
{
criteria
.
andTypeEqualTo
(
channelVo
.
getType
());
}
if
(
channelVo
.
getType_arr
()
!=
null
)
{
if
(
channelVo
.
getType_arr
()
!=
null
)
{
criteria
.
andTypeIn
(
channelVo
.
getType_arr
());
}
if
(
channelVo
.
getType_gt
()
!=
null
)
{
if
(
channelVo
.
getType_gt
()
!=
null
)
{
criteria
.
andTypeGreaterThan
(
channelVo
.
getType_gt
());
}
if
(
channelVo
.
getType_lt
()
!=
null
)
{
if
(
channelVo
.
getType_lt
()
!=
null
)
{
criteria
.
andTypeLessThan
(
channelVo
.
getType_lt
());
}
if
(
channelVo
.
getType_gte
()
!=
null
)
{
if
(
channelVo
.
getType_gte
()
!=
null
)
{
criteria
.
andTypeGreaterThanOrEqualTo
(
channelVo
.
getType_gte
());
}
if
(
channelVo
.
getType_lte
()
!=
null
)
{
if
(
channelVo
.
getType_lte
()
!=
null
)
{
criteria
.
andTypeLessThanOrEqualTo
(
channelVo
.
getType_lte
());
}
if
(
channelVo
.
getStreamType
()
!=
null
)
{
if
(
channelVo
.
getStreamType
()
!=
null
)
{
criteria
.
andStreamTypeEqualTo
(
channelVo
.
getStreamType
());
}
if
(
channelVo
.
getStreamType_null
()
!=
null
)
{
if
(
channelVo
.
getStreamType_null
().
booleanValue
())
{
if
(
channelVo
.
getStreamType_null
()
!=
null
)
{
if
(
channelVo
.
getStreamType_null
().
booleanValue
())
{
criteria
.
andStreamTypeIsNull
();
}
else
{
criteria
.
andStreamTypeIsNotNull
();
}
}
if
(
channelVo
.
getStreamType_arr
()
!=
null
)
{
if
(
channelVo
.
getStreamType_arr
()
!=
null
)
{
criteria
.
andStreamTypeIn
(
channelVo
.
getStreamType_arr
());
}
if
(
channelVo
.
getStreamType_gt
()
!=
null
)
{
if
(
channelVo
.
getStreamType_gt
()
!=
null
)
{
criteria
.
andStreamTypeGreaterThan
(
channelVo
.
getStreamType_gt
());
}
if
(
channelVo
.
getStreamType_lt
()
!=
null
)
{
if
(
channelVo
.
getStreamType_lt
()
!=
null
)
{
criteria
.
andStreamTypeLessThan
(
channelVo
.
getStreamType_lt
());
}
if
(
channelVo
.
getStreamType_gte
()
!=
null
)
{
if
(
channelVo
.
getStreamType_gte
()
!=
null
)
{
criteria
.
andStreamTypeGreaterThanOrEqualTo
(
channelVo
.
getStreamType_gte
());
}
if
(
channelVo
.
getStreamType_lte
()
!=
null
)
{
if
(
channelVo
.
getStreamType_lte
()
!=
null
)
{
criteria
.
andStreamTypeLessThanOrEqualTo
(
channelVo
.
getStreamType_lte
());
}
if
(
channelVo
.
getStreamPath
()
!=
null
)
{
if
(
channelVo
.
getStreamPath
()
!=
null
)
{
criteria
.
andStreamPathEqualTo
(
channelVo
.
getStreamPath
());
}
if
(
channelVo
.
getStreamPath_null
()
!=
null
)
{
if
(
channelVo
.
getStreamPath_null
().
booleanValue
())
{
if
(
channelVo
.
getStreamPath_null
()
!=
null
)
{
if
(
channelVo
.
getStreamPath_null
().
booleanValue
())
{
criteria
.
andStreamPathIsNull
();
}
else
{
criteria
.
andStreamPathIsNotNull
();
}
}
if
(
channelVo
.
getStreamPath_arr
()
!=
null
)
{
if
(
channelVo
.
getStreamPath_arr
()
!=
null
)
{
criteria
.
andStreamPathIn
(
channelVo
.
getStreamPath_arr
());
}
if
(
channelVo
.
getStreamPath_like
()
!=
null
)
{
if
(
channelVo
.
getStreamPath_like
()
!=
null
)
{
criteria
.
andStreamPathLike
(
channelVo
.
getStreamPath_like
());
}
if
(
channelVo
.
getUsername
()
!=
null
)
{
if
(
channelVo
.
getUsername
()
!=
null
)
{
criteria
.
andUsernameEqualTo
(
channelVo
.
getUsername
());
}
if
(
channelVo
.
getUsername_null
()
!=
null
)
{
if
(
channelVo
.
getUsername_null
().
booleanValue
())
{
if
(
channelVo
.
getUsername_null
()
!=
null
)
{
if
(
channelVo
.
getUsername_null
().
booleanValue
())
{
criteria
.
andUsernameIsNull
();
}
else
{
criteria
.
andUsernameIsNotNull
();
}
}
if
(
channelVo
.
getUsername_arr
()
!=
null
)
{
if
(
channelVo
.
getUsername_arr
()
!=
null
)
{
criteria
.
andUsernameIn
(
channelVo
.
getUsername_arr
());
}
if
(
channelVo
.
getUsername_like
()
!=
null
)
{
if
(
channelVo
.
getUsername_like
()
!=
null
)
{
criteria
.
andUsernameLike
(
channelVo
.
getUsername_like
());
}
if
(
channelVo
.
getPassword
()
!=
null
)
{
if
(
channelVo
.
getPassword
()
!=
null
)
{
criteria
.
andPasswordEqualTo
(
channelVo
.
getPassword
());
}
if
(
channelVo
.
getPassword_null
()
!=
null
)
{
if
(
channelVo
.
getPassword_null
().
booleanValue
())
{
if
(
channelVo
.
getPassword_null
()
!=
null
)
{
if
(
channelVo
.
getPassword_null
().
booleanValue
())
{
criteria
.
andPasswordIsNull
();
}
else
{
criteria
.
andPasswordIsNotNull
();
}
}
if
(
channelVo
.
getPassword_arr
()
!=
null
)
{
if
(
channelVo
.
getPassword_arr
()
!=
null
)
{
criteria
.
andPasswordIn
(
channelVo
.
getPassword_arr
());
}
if
(
channelVo
.
getPassword_like
()
!=
null
)
{
if
(
channelVo
.
getPassword_like
()
!=
null
)
{
criteria
.
andPasswordLike
(
channelVo
.
getPassword_like
());
}
if
(
channelVo
.
getAddressUnid
()
!=
null
)
{
if
(
channelVo
.
getAddressUnid
()
!=
null
)
{
criteria
.
andAddressUnidEqualTo
(
channelVo
.
getAddressUnid
());
}
if
(
channelVo
.
getAddressUnid_null
()
!=
null
)
{
if
(
channelVo
.
getAddressUnid_null
().
booleanValue
())
{
if
(
channelVo
.
getAddressUnid_null
()
!=
null
)
{
if
(
channelVo
.
getAddressUnid_null
().
booleanValue
())
{
criteria
.
andAddressUnidIsNull
();
}
else
{
criteria
.
andAddressUnidIsNotNull
();
}
}
if
(
channelVo
.
getAddressUnid_arr
()
!=
null
)
{
if
(
channelVo
.
getAddressUnid_arr
()
!=
null
)
{
criteria
.
andAddressUnidIn
(
channelVo
.
getAddressUnid_arr
());
}
if
(
channelVo
.
getAddressUnid_like
()
!=
null
)
{
if
(
channelVo
.
getAddressUnid_like
()
!=
null
)
{
criteria
.
andAddressUnidLike
(
channelVo
.
getAddressUnid_like
());
}
if
(
channelVo
.
getName
()
!=
null
)
{
if
(
channelVo
.
getName
()
!=
null
)
{
criteria
.
andNameEqualTo
(
channelVo
.
getName
());
}
if
(
channelVo
.
getName_null
()
!=
null
)
{
if
(
channelVo
.
getName_null
().
booleanValue
())
{
if
(
channelVo
.
getName_null
()
!=
null
)
{
if
(
channelVo
.
getName_null
().
booleanValue
())
{
criteria
.
andNameIsNull
();
}
else
{
criteria
.
andNameIsNotNull
();
}
}
if
(
channelVo
.
getName_arr
()
!=
null
)
{
if
(
channelVo
.
getName_arr
()
!=
null
)
{
criteria
.
andNameIn
(
channelVo
.
getName_arr
());
}
if
(
channelVo
.
getName_like
()
!=
null
)
{
if
(
channelVo
.
getName_like
()
!=
null
)
{
criteria
.
andNameLike
(
channelVo
.
getName_like
());
}
if
(
channelVo
.
getIp
()
!=
null
)
{
if
(
channelVo
.
getIp
()
!=
null
)
{
criteria
.
andIpEqualTo
(
channelVo
.
getIp
());
}
if
(
channelVo
.
getIp_null
()
!=
null
)
{
if
(
channelVo
.
getIp_null
().
booleanValue
())
{
if
(
channelVo
.
getIp_null
()
!=
null
)
{
if
(
channelVo
.
getIp_null
().
booleanValue
())
{
criteria
.
andIpIsNull
();
}
else
{
criteria
.
andIpIsNotNull
();
}
}
if
(
channelVo
.
getIp_arr
()
!=
null
)
{
if
(
channelVo
.
getIp_arr
()
!=
null
)
{
criteria
.
andIpIn
(
channelVo
.
getIp_arr
());
}
if
(
channelVo
.
getIp_like
()
!=
null
)
{
if
(
channelVo
.
getIp_like
()
!=
null
)
{
criteria
.
andIpLike
(
channelVo
.
getIp_like
());
}
if
(
channelVo
.
getPort
()
!=
null
)
{
if
(
channelVo
.
getPort
()
!=
null
)
{
criteria
.
andPortEqualTo
(
channelVo
.
getPort
());
}
if
(
channelVo
.
getPort_null
()
!=
null
)
{
if
(
channelVo
.
getPort_null
().
booleanValue
())
{
if
(
channelVo
.
getPort_null
()
!=
null
)
{
if
(
channelVo
.
getPort_null
().
booleanValue
())
{
criteria
.
andPortIsNull
();
}
else
{
criteria
.
andPortIsNotNull
();
}
}
if
(
channelVo
.
getPort_arr
()
!=
null
)
{
if
(
channelVo
.
getPort_arr
()
!=
null
)
{
criteria
.
andPortIn
(
channelVo
.
getPort_arr
());
}
if
(
channelVo
.
getPort_gt
()
!=
null
)
{
if
(
channelVo
.
getPort_gt
()
!=
null
)
{
criteria
.
andPortGreaterThan
(
channelVo
.
getPort_gt
());
}
if
(
channelVo
.
getPort_lt
()
!=
null
)
{
if
(
channelVo
.
getPort_lt
()
!=
null
)
{
criteria
.
andPortLessThan
(
channelVo
.
getPort_lt
());
}
if
(
channelVo
.
getPort_gte
()
!=
null
)
{
if
(
channelVo
.
getPort_gte
()
!=
null
)
{
criteria
.
andPortGreaterThanOrEqualTo
(
channelVo
.
getPort_gte
());
}
if
(
channelVo
.
getPort_lte
()
!=
null
)
{
if
(
channelVo
.
getPort_lte
()
!=
null
)
{
criteria
.
andPortLessThanOrEqualTo
(
channelVo
.
getPort_lte
());
}
if
(
channelVo
.
getExpand
()
!=
null
)
{
if
(
channelVo
.
getExpand
()
!=
null
)
{
criteria
.
andExpandEqualTo
(
channelVo
.
getExpand
());
}
if
(
channelVo
.
getExpand_null
()
!=
null
)
{
if
(
channelVo
.
getExpand_null
().
booleanValue
())
{
if
(
channelVo
.
getExpand_null
()
!=
null
)
{
if
(
channelVo
.
getExpand_null
().
booleanValue
())
{
criteria
.
andExpandIsNull
();
}
else
{
criteria
.
andExpandIsNotNull
();
}
}
if
(
channelVo
.
getExpand_arr
()
!=
null
)
{
if
(
channelVo
.
getExpand_arr
()
!=
null
)
{
criteria
.
andExpandIn
(
channelVo
.
getExpand_arr
());
}
if
(
channelVo
.
getExpand_like
()
!=
null
)
{
if
(
channelVo
.
getExpand_like
()
!=
null
)
{
criteria
.
andExpandLike
(
channelVo
.
getExpand_like
());
}
if
(
channelVo
.
getLongitude
()
!=
null
)
{
if
(
channelVo
.
getLongitude
()
!=
null
)
{
criteria
.
andLongitudeEqualTo
(
channelVo
.
getLongitude
());
}
if
(
channelVo
.
getLongitude_null
()
!=
null
)
{
if
(
channelVo
.
getLongitude_null
().
booleanValue
())
{
if
(
channelVo
.
getLongitude_null
()
!=
null
)
{
if
(
channelVo
.
getLongitude_null
().
booleanValue
())
{
criteria
.
andLongitudeIsNull
();
}
else
{
criteria
.
andLongitudeIsNotNull
();
}
}
if
(
channelVo
.
getLongitude_arr
()
!=
null
)
{
if
(
channelVo
.
getLongitude_arr
()
!=
null
)
{
criteria
.
andLongitudeIn
(
channelVo
.
getLongitude_arr
());
}
if
(
channelVo
.
getLongitude_gt
()
!=
null
)
{
if
(
channelVo
.
getLongitude_gt
()
!=
null
)
{
criteria
.
andLongitudeGreaterThan
(
channelVo
.
getLongitude_gt
());
}
if
(
channelVo
.
getLongitude_lt
()
!=
null
)
{
if
(
channelVo
.
getLongitude_lt
()
!=
null
)
{
criteria
.
andLongitudeLessThan
(
channelVo
.
getLongitude_lt
());
}
if
(
channelVo
.
getLongitude_gte
()
!=
null
)
{
if
(
channelVo
.
getLongitude_gte
()
!=
null
)
{
criteria
.
andLongitudeGreaterThanOrEqualTo
(
channelVo
.
getLongitude_gte
());
}
if
(
channelVo
.
getLongitude_lte
()
!=
null
)
{
if
(
channelVo
.
getLongitude_lte
()
!=
null
)
{
criteria
.
andLongitudeLessThanOrEqualTo
(
channelVo
.
getLongitude_lte
());
}
if
(
channelVo
.
getLatitude
()
!=
null
)
{
if
(
channelVo
.
getLatitude
()
!=
null
)
{
criteria
.
andLatitudeEqualTo
(
channelVo
.
getLatitude
());
}
if
(
channelVo
.
getLatitude_null
()
!=
null
)
{
if
(
channelVo
.
getLatitude_null
().
booleanValue
())
{
if
(
channelVo
.
getLatitude_null
()
!=
null
)
{
if
(
channelVo
.
getLatitude_null
().
booleanValue
())
{
criteria
.
andLatitudeIsNull
();
}
else
{
criteria
.
andLatitudeIsNotNull
();
}
}
if
(
channelVo
.
getLatitude_arr
()
!=
null
)
{
if
(
channelVo
.
getLatitude_arr
()
!=
null
)
{
criteria
.
andLatitudeIn
(
channelVo
.
getLatitude_arr
());
}
if
(
channelVo
.
getLatitude_gt
()
!=
null
)
{
if
(
channelVo
.
getLatitude_gt
()
!=
null
)
{
criteria
.
andLatitudeGreaterThan
(
channelVo
.
getLatitude_gt
());
}
if
(
channelVo
.
getLatitude_lt
()
!=
null
)
{
if
(
channelVo
.
getLatitude_lt
()
!=
null
)
{
criteria
.
andLatitudeLessThan
(
channelVo
.
getLatitude_lt
());
}
if
(
channelVo
.
getLatitude_gte
()
!=
null
)
{
if
(
channelVo
.
getLatitude_gte
()
!=
null
)
{
criteria
.
andLatitudeGreaterThanOrEqualTo
(
channelVo
.
getLatitude_gte
());
}
if
(
channelVo
.
getLatitude_lte
()
!=
null
)
{
if
(
channelVo
.
getLatitude_lte
()
!=
null
)
{
criteria
.
andLatitudeLessThanOrEqualTo
(
channelVo
.
getLatitude_lte
());
}
if
(
channelVo
.
getStatus
()
!=
null
)
{
if
(
channelVo
.
getStatus
()
!=
null
)
{
criteria
.
andStatusEqualTo
(
channelVo
.
getStatus
());
}
if
(
channelVo
.
getStatus_arr
()
!=
null
)
{
if
(
channelVo
.
getStatus_arr
()
!=
null
)
{
criteria
.
andStatusIn
(
channelVo
.
getStatus_arr
());
}
if
(
channelVo
.
getStatus_gt
()
!=
null
)
{
if
(
channelVo
.
getStatus_gt
()
!=
null
)
{
criteria
.
andStatusGreaterThan
(
channelVo
.
getStatus_gt
());
}
if
(
channelVo
.
getStatus_lt
()
!=
null
)
{
if
(
channelVo
.
getStatus_lt
()
!=
null
)
{
criteria
.
andStatusLessThan
(
channelVo
.
getStatus_lt
());
}
if
(
channelVo
.
getStatus_gte
()
!=
null
)
{
if
(
channelVo
.
getStatus_gte
()
!=
null
)
{
criteria
.
andStatusGreaterThanOrEqualTo
(
channelVo
.
getStatus_gte
());
}
if
(
channelVo
.
getStatus_lte
()
!=
null
)
{
if
(
channelVo
.
getStatus_lte
()
!=
null
)
{
criteria
.
andStatusLessThanOrEqualTo
(
channelVo
.
getStatus_lte
());
}
if
(
channelVo
.
getCreateTime
()
!=
null
)
{
criteria
.
andCreateTimeEqualTo
(
channelVo
.
getCreateTime
());
}
if
(
channelVo
.
getCreateTime_arr
()
!=
null
)
{
criteria
.
andCreateTimeIn
(
channelVo
.
getCreateTime_arr
());
}
if
(
channelVo
.
getCreateTime_gt
()
!=
null
)
{
criteria
.
andCreateTimeGreaterThan
(
channelVo
.
getCreateTime_gt
());
}
if
(
channelVo
.
getCreateTime_lt
()
!=
null
)
{
criteria
.
andCreateTimeLessThan
(
channelVo
.
getCreateTime_lt
());
}
if
(
channelVo
.
getCreateTime_gte
()
!=
null
)
{
criteria
.
andCreateTimeGreaterThanOrEqualTo
(
channelVo
.
getCreateTime_gte
());
}
if
(
channelVo
.
getCreateTime_lte
()
!=
null
)
{
criteria
.
andCreateTimeLessThanOrEqualTo
(
channelVo
.
getCreateTime_lte
());
}
return
channelExample
;
}
...
...
fanxing-ops/src/main/java/com/viontech/fanxing/ops/controller/base/ChannelTagBaseController.java
0 → 100644
View file @
c8aa9e3
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.BaseMapper
;
import
com.viontech.fanxing.commons.base.BaseService
;
import
com.viontech.fanxing.commons.model.ChannelTag
;
import
com.viontech.fanxing.commons.model.ChannelTagExample
;
import
com.viontech.fanxing.commons.vo.ChannelTagVo
;
import
com.viontech.fanxing.ops.mapper.ChannelTagMapper
;
import
com.viontech.fanxing.ops.service.adapter.ChannelTagService
;
import
javax.annotation.Resource
;
public
abstract
class
ChannelTagBaseController
extends
BaseController
<
ChannelTag
,
ChannelTagVo
>
{
@Resource
protected
ChannelTagService
channelTagService
;
@Override
protected
BaseExample
getExample
(
ChannelTagVo
channelTagVo
,
int
type
)
{
ChannelTagExample
channelTagExample
=
new
ChannelTagExample
();
ChannelTagExample
.
Criteria
criteria
=
channelTagExample
.
createCriteria
();
if
(
channelTagVo
.
getId
()
!=
null
)
{
criteria
.
andIdEqualTo
(
channelTagVo
.
getId
());
}
if
(
channelTagVo
.
getId_arr
()
!=
null
)
{
criteria
.
andIdIn
(
channelTagVo
.
getId_arr
());
}
if
(
channelTagVo
.
getId_gt
()
!=
null
)
{
criteria
.
andIdGreaterThan
(
channelTagVo
.
getId_gt
());
}
if
(
channelTagVo
.
getId_lt
()
!=
null
)
{
criteria
.
andIdLessThan
(
channelTagVo
.
getId_lt
());
}
if
(
channelTagVo
.
getId_gte
()
!=
null
)
{
criteria
.
andIdGreaterThanOrEqualTo
(
channelTagVo
.
getId_gte
());
}
if
(
channelTagVo
.
getId_lte
()
!=
null
)
{
criteria
.
andIdLessThanOrEqualTo
(
channelTagVo
.
getId_lte
());
}
if
(
channelTagVo
.
getChannelId
()
!=
null
)
{
criteria
.
andChannelIdEqualTo
(
channelTagVo
.
getChannelId
());
}
if
(
channelTagVo
.
getChannelId_arr
()
!=
null
)
{
criteria
.
andChannelIdIn
(
channelTagVo
.
getChannelId_arr
());
}
if
(
channelTagVo
.
getChannelId_gt
()
!=
null
)
{
criteria
.
andChannelIdGreaterThan
(
channelTagVo
.
getChannelId_gt
());
}
if
(
channelTagVo
.
getChannelId_lt
()
!=
null
)
{
criteria
.
andChannelIdLessThan
(
channelTagVo
.
getChannelId_lt
());
}
if
(
channelTagVo
.
getChannelId_gte
()
!=
null
)
{
criteria
.
andChannelIdGreaterThanOrEqualTo
(
channelTagVo
.
getChannelId_gte
());
}
if
(
channelTagVo
.
getChannelId_lte
()
!=
null
)
{
criteria
.
andChannelIdLessThanOrEqualTo
(
channelTagVo
.
getChannelId_lte
());
}
if
(
channelTagVo
.
getTagId
()
!=
null
)
{
criteria
.
andTagIdEqualTo
(
channelTagVo
.
getTagId
());
}
if
(
channelTagVo
.
getTagId_arr
()
!=
null
)
{
criteria
.
andTagIdIn
(
channelTagVo
.
getTagId_arr
());
}
if
(
channelTagVo
.
getTagId_gt
()
!=
null
)
{
criteria
.
andTagIdGreaterThan
(
channelTagVo
.
getTagId_gt
());
}
if
(
channelTagVo
.
getTagId_lt
()
!=
null
)
{
criteria
.
andTagIdLessThan
(
channelTagVo
.
getTagId_lt
());
}
if
(
channelTagVo
.
getTagId_gte
()
!=
null
)
{
criteria
.
andTagIdGreaterThanOrEqualTo
(
channelTagVo
.
getTagId_gte
());
}
if
(
channelTagVo
.
getTagId_lte
()
!=
null
)
{
criteria
.
andTagIdLessThanOrEqualTo
(
channelTagVo
.
getTagId_lte
());
}
return
channelTagExample
;
}
@Override
protected
BaseService
<
ChannelTag
>
getService
()
{
return
channelTagService
;
}
}
\ No newline at end of file
fanxing-ops/src/main/java/com/viontech/fanxing/ops/controller/web/ChannelController.java
View file @
c8aa9e3
package
com
.
viontech
.
fanxing
.
ops
.
controller
.
web
;
import
com.alibaba.fastjson.JSONObject
;
import
com.github.pagehelper.PageInfo
;
import
com.viontech.fanxing.commons.base.BaseExample
;
import
com.viontech.fanxing.commons.constant.ChannelType
;
import
com.viontech.fanxing.commons.model.Channel
;
import
com.viontech.fanxing.commons.model.ChannelExample
;
import
com.viontech.fanxing.commons.model.ChannelTag
;
import
com.viontech.fanxing.commons.model.ChannelTagExample
;
import
com.viontech.fanxing.commons.vo.ChannelVo
;
import
com.viontech.fanxing.commons.vo.DictCodeVo
;
import
com.viontech.fanxing.ops.controller.base.ChannelBaseController
;
import
com.viontech.fanxing.ops.service.adapter.ChannelTagService
;
import
com.viontech.keliu.util.JsonMessageUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
static
com
.
viontech
.
keliu
.
util
.
JsonMessageUtil
.
getSuccessJsonMsg
;
@RestController
@RequestMapping
(
"/channels"
)
@Slf4j
public
class
ChannelController
extends
ChannelBaseController
{
@Resource
private
ChannelTagService
channelTagService
;
@Override
protected
BaseExample
getExample
(
ChannelVo
channelVo
,
int
type
)
{
...
...
@@ -36,7 +48,35 @@ public class ChannelController extends ChannelBaseController {
List
<
DictCodeVo
>
dictCodeVos
=
channelService
.
channelOrg
(
channels
);
return
JsonMessageUtil
.
getSuccessJsonMsg
(
dictCodeVos
);
}
else
{
return
super
.
page
(
channelVo
,
page
,
pageSize
,
sortName
,
sortOrder
);
BaseExample
baseExample
=
getExample
(
channelVo
,
EXAMPLE_TYPE_PAGE
);
if
(
isNotNull
(
sortOrder
)
&&
isNotNull
(
sortName
))
{
baseExample
.
setOrderByClause
(
baseExample
.
getTableAlias
()
+
"."
+
sortName
+
" "
+
sortOrder
);
}
else
if
(
isNotNull
(
sortName
)
&&
!
isNotNull
(
sortOrder
))
{
baseExample
.
setOrderByClause
(
sortName
);
}
Object
response
;
List
<
Channel
>
channels
;
if
(
page
<=
0
)
{
channels
=
getService
().
selectByExample
(
baseExample
);
response
=
channels
;
}
else
{
PageInfo
<
Channel
>
pageInfo
=
(
PageInfo
<
Channel
>)
getService
().
pagedQuery
(
baseExample
,
page
,
pageSize
);
channels
=
pageInfo
.
getList
();
response
=
pageInfo
;
}
if
(
channels
.
size
()
>
0
&&
channelVo
.
getType
()
!=
null
&&
channelVo
.
getType
().
equals
(
ChannelType
.
FILE
.
value
))
{
List
<
Long
>
channelIdList
=
channels
.
stream
().
map
(
Channel:
:
getId
).
collect
(
Collectors
.
toList
());
ChannelTagExample
channelTagExample
=
new
ChannelTagExample
();
channelTagExample
.
createCriteria
().
andChannelIdIn
(
channelIdList
);
List
<
ChannelTag
>
channelTags
=
channelTagService
.
selectByExample
(
channelTagExample
);
Map
<
Long
,
List
<
Long
>>
channel_tag_map
=
channelTags
.
stream
().
collect
(
Collectors
.
groupingBy
(
ChannelTag:
:
getChannelId
,
Collectors
.
mapping
(
ChannelTag:
:
getTagId
,
Collectors
.
toList
())));
for
(
Channel
channel
:
channels
)
{
List
<
Long
>
tags
=
channel_tag_map
.
get
(
channel
.
getId
());
channel
.
setTags
(
tags
);
}
}
return
getSuccessJsonMsg
(
MESSAGE_SELECT_SUCCESS
,
response
);
}
}
...
...
fanxing-ops/src/main/java/com/viontech/fanxing/ops/controller/web/ChannelTagController.java
0 → 100644
View file @
c8aa9e3
package
com
.
viontech
.
fanxing
.
ops
.
controller
.
web
;
import
com.viontech.fanxing.commons.base.BaseExample
;
import
com.viontech.fanxing.commons.model.ChannelTagExample
;
import
com.viontech.fanxing.commons.vo.ChannelTagVo
;
import
com.viontech.fanxing.ops.controller.base.ChannelTagBaseController
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
@Controller
@RequestMapping
(
"/channelTags"
)
public
class
ChannelTagController
extends
ChannelTagBaseController
{
@Override
protected
BaseExample
getExample
(
ChannelTagVo
channelTagVo
,
int
type
)
{
ChannelTagExample
channelTagExample
=
(
ChannelTagExample
)
super
.
getExample
(
channelTagVo
,
type
);
return
channelTagExample
;
}
}
\ No newline at end of file
fanxing-ops/src/main/java/com/viontech/fanxing/ops/mapper/ChannelTagMapper.java
0 → 100644
View file @
c8aa9e3
package
com
.
viontech
.
fanxing
.
ops
.
mapper
;
import
com.viontech.fanxing.commons.base.BaseMapper
;
import
com.viontech.fanxing.commons.model.ChannelTag
;
import
com.viontech.fanxing.commons.model.ChannelTagExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
public
interface
ChannelTagMapper
extends
BaseMapper
{
int
countByExample
(
ChannelTagExample
example
);
int
deleteByExample
(
ChannelTagExample
example
);
int
deleteByPrimaryKey
(
Long
id
);
int
insert
(
ChannelTag
record
);
int
insertSelective
(
ChannelTag
record
);
List
<
ChannelTag
>
selectByExample
(
ChannelTagExample
example
);
ChannelTag
selectByPrimaryKey
(
Long
id
);
int
updateByExampleSelective
(
@Param
(
"record"
)
ChannelTag
record
,
@Param
(
"example"
)
ChannelTagExample
example
);
int
updateByExample
(
@Param
(
"record"
)
ChannelTag
record
,
@Param
(
"example"
)
ChannelTagExample
example
);
int
updateByPrimaryKeySelective
(
ChannelTag
record
);
int
updateByPrimaryKey
(
ChannelTag
record
);
}
\ No newline at end of file
fanxing-ops/src/main/java/com/viontech/fanxing/ops/mapping/ChannelMapper.xml
View file @
c8aa9e3
...
...
@@ -19,6 +19,7 @@
<result
column=
"channel_longitude"
property=
"longitude"
/>
<result
column=
"channel_latitude"
property=
"latitude"
/>
<result
column=
"channel_status"
property=
"status"
/>
<result
column=
"channel_create_time"
property=
"createTime"
/>
</resultMap>
<resultMap
id=
"BaseResultMap"
type=
"com.viontech.fanxing.commons.model.Channel"
extends=
"BaseResultMapRoot"
/>
<sql
id=
"Example_Where_Clause"
>
...
...
@@ -87,7 +88,7 @@
`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`
`channel`.`status` as `channel_status`
, `channel`.create_time as channel_create_time
</sql>
<sql
id=
"Base_Column_List"
>
<if
test=
"!(_parameter.getClass().getSimpleName() == 'ChannelExample')"
>
...
...
@@ -146,14 +147,14 @@
`type`, stream_type, stream_path,
username, `password`, address_unid,
`name`, ip, port, expand,
longitude, latitude, `status`
)
longitude, latitude, `status`
,
create_time
)
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}
)
#{longitude,jdbcType=REAL}, #{latitude,jdbcType=REAL}, #{status,jdbcType=INTEGER}
,
#{createTime,jdbcType=TIMESTAMP}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.viontech.fanxing.commons.model.Channel"
useGeneratedKeys=
"true"
keyProperty=
"id"
keyColumn=
"id"
>
insert into `s_channel`
...
...
@@ -206,6 +207,9 @@
<if
test=
"status != null"
>
`status`,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"unid != null"
>
...
...
@@ -256,6 +260,9 @@
<if
test=
"status != null"
>
#{status,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.viontech.fanxing.commons.model.ChannelExample"
resultType=
"java.lang.Integer"
>
...
...
@@ -318,6 +325,9 @@
<if
test=
"record.status != null"
>
`status` = #{record.status,jdbcType=INTEGER},
</if>
<if
test=
"record.createTime != null"
>
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
...
...
@@ -341,7 +351,8 @@
expand = #{record.expand,jdbcType=VARCHAR},
longitude = #{record.longitude,jdbcType=REAL},
latitude = #{record.latitude,jdbcType=REAL},
`status` = #{record.status,jdbcType=INTEGER}
`status` = #{record.status,jdbcType=INTEGER},
create_time = #{record.createTime,jdbcType=TIMESTAMP}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
...
...
@@ -397,6 +408,9 @@
<if
test=
"status != null"
>
`status` = #{status,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
...
...
@@ -417,7 +431,8 @@
expand = #{expand,jdbcType=VARCHAR},
longitude = #{longitude,jdbcType=REAL},
latitude = #{latitude,jdbcType=REAL},
`status` = #{status,jdbcType=INTEGER}
`status` = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
fanxing-ops/src/main/java/com/viontech/fanxing/ops/mapping/ChannelTagMapper.xml
0 → 100644
View file @
c8aa9e3
<?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.ChannelTagMapper"
>
<resultMap
id=
"BaseResultMapRoot"
type=
"com.viontech.fanxing.commons.model.ChannelTag"
>
<id
column=
"channel_tag_id"
property=
"id"
/>
<result
column=
"channel_tag_channel_id"
property=
"channelId"
/>
<result
column=
"channel_tag_tag_id"
property=
"tagId"
/>
</resultMap>
<resultMap
id=
"BaseResultMap"
type=
"com.viontech.fanxing.commons.model.ChannelTag"
extends=
"BaseResultMapRoot"
>
<result
column=
"channel_id"
property=
"channel.id"
/>
<result
column=
"channel_unid"
property=
"channel.unid"
/>
<result
column=
"channel_channel_unid"
property=
"channel.channelUnid"
/>
<result
column=
"channel_device_unid"
property=
"channel.deviceUnid"
/>
<result
column=
"channel_type"
property=
"channel.type"
/>
<result
column=
"channel_stream_type"
property=
"channel.streamType"
/>
<result
column=
"channel_stream_path"
property=
"channel.streamPath"
/>
<result
column=
"channel_username"
property=
"channel.username"
/>
<result
column=
"channel_password"
property=
"channel.password"
/>
<result
column=
"channel_address_unid"
property=
"channel.addressUnid"
/>
<result
column=
"channel_name"
property=
"channel.name"
/>
<result
column=
"channel_ip"
property=
"channel.ip"
/>
<result
column=
"channel_port"
property=
"channel.port"
/>
<result
column=
"channel_expand"
property=
"channel.expand"
/>
<result
column=
"channel_longitude"
property=
"channel.longitude"
/>
<result
column=
"channel_latitude"
property=
"channel.latitude"
/>
<result
column=
"channel_status"
property=
"channel.status"
/>
<result
column=
"channel_create_time"
property=
"channel.createTime"
/>
</resultMap>
<sql
id=
"Left_Join_List"
>
<foreach
collection=
"leftJoinTableSet"
item=
"leftJoinTable"
>
<choose
>
<when
test=
"leftJoinTable == 's_channel'.toString()"
>
left join `s_channel` `channel` on `channel`.id = `channel_tag`.channel_id
</when>
</choose>
</foreach>
</sql>
<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_tag`.id as channel_tag_id, `channel_tag`.channel_id as channel_tag_channel_id,
`channel_tag`.tag_id as channel_tag_tag_id
</sql>
<sql
id=
"Base_Column_List"
>
<if
test=
"!(_parameter.getClass().getSimpleName() == 'ChannelTagExample')"
>
<include
refid=
"com.viontech.fanxing.ops.mapper.ChannelTagMapper.Base_Column_List_Root"
/>
</if>
<if
test=
"_parameter.getClass().getSimpleName() == 'ChannelTagExample'"
>
<foreach
collection=
"columnContainerSet"
item=
"columns"
separator=
","
>
<choose
>
<when
test=
"columns.tableName == 'r_channel_tag'.toString()"
>
<if
test=
"columns.valid"
>
${columns.columnContainerStr}
</if>
<if
test=
"!columns.valid"
>
<include
refid=
"com.viontech.fanxing.ops.mapper.ChannelTagMapper.Base_Column_List_Root"
/>
</if>
</when>
<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.ChannelTagExample"
>
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from `r_channel_tag` `channel_tag`
<include
refid=
"Left_Join_List"
/>
<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 `r_channel_tag` `channel_tag`
where `channel_tag`.id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from `r_channel_tag` `channel_tag`
where id = #{id,jdbcType=BIGINT}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.viontech.fanxing.commons.model.ChannelTagExample"
>
delete from `r_channel_tag` `channel_tag`
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.viontech.fanxing.commons.model.ChannelTag"
useGeneratedKeys=
"true"
keyProperty=
"id"
keyColumn=
"id"
>
insert into `r_channel_tag` (channel_id, tag_id)
values (#{channelId,jdbcType=BIGINT}, #{tagId,jdbcType=BIGINT})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.viontech.fanxing.commons.model.ChannelTag"
useGeneratedKeys=
"true"
keyProperty=
"id"
keyColumn=
"id"
>
insert into `r_channel_tag`
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"channelId != null"
>
channel_id,
</if>
<if
test=
"tagId != null"
>
tag_id,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"channelId != null"
>
#{channelId,jdbcType=BIGINT},
</if>
<if
test=
"tagId != null"
>
#{tagId,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.viontech.fanxing.commons.model.ChannelTagExample"
resultType=
"java.lang.Integer"
>
select count(*) from `r_channel_tag` `channel_tag`
<include
refid=
"Left_Join_List"
/>
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update `r_channel_tag` `channel_tag`
<set
>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=BIGINT},
</if>
<if
test=
"record.channelId != null"
>
channel_id = #{record.channelId,jdbcType=BIGINT},
</if>
<if
test=
"record.tagId != null"
>
tag_id = #{record.tagId,jdbcType=BIGINT},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update `r_channel_tag` `channel_tag`
set id = #{record.id,jdbcType=BIGINT},
channel_id = #{record.channelId,jdbcType=BIGINT},
tag_id = #{record.tagId,jdbcType=BIGINT}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.viontech.fanxing.commons.model.ChannelTag"
>
update `r_channel_tag`
<set
>
<if
test=
"channelId != null"
>
channel_id = #{channelId,jdbcType=BIGINT},
</if>
<if
test=
"tagId != null"
>
tag_id = #{tagId,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.viontech.fanxing.commons.model.ChannelTag"
>
update `r_channel_tag`
set channel_id = #{channelId,jdbcType=BIGINT},
tag_id = #{tagId,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
fanxing-ops/src/main/java/com/viontech/fanxing/ops/service/adapter/ChannelTagService.java
0 → 100644
View file @
c8aa9e3
package
com
.
viontech
.
fanxing
.
ops
.
service
.
adapter
;
import
com.viontech.fanxing.commons.base.BaseService
;
import
com.viontech.fanxing.commons.model.ChannelTag
;
public
interface
ChannelTagService
extends
BaseService
<
ChannelTag
>
{
}
\ No newline at end of file
fanxing-ops/src/main/java/com/viontech/fanxing/ops/service/impl/ChannelServiceImpl.java
View file @
c8aa9e3
...
...
@@ -12,6 +12,7 @@ import com.viontech.fanxing.commons.vo.ChannelVo;
import
com.viontech.fanxing.commons.vo.DictCodeVo
;
import
com.viontech.fanxing.ops.mapper.ChannelMapper
;
import
com.viontech.fanxing.ops.service.adapter.ChannelService
;
import
com.viontech.fanxing.ops.service.adapter.ChannelTagService
;
import
com.viontech.fanxing.ops.service.adapter.DictCateService
;
import
com.viontech.fanxing.ops.service.adapter.DictCodeService
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -20,6 +21,7 @@ import org.apache.commons.io.FilenameUtils;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.tuple.ImmutablePair
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.reactive.function.client.WebClient
;
...
...
@@ -41,6 +43,8 @@ public class ChannelServiceImpl extends BaseServiceImpl<Channel> implements Chan
private
DictCateService
dictCateService
;
@Resource
private
VionConfig
vionConfig
;
@Resource
private
ChannelTagService
channelTagService
;
@Override
public
BaseMapper
<
Channel
>
getMapper
()
{
...
...
@@ -177,6 +181,7 @@ public class ChannelServiceImpl extends BaseServiceImpl<Channel> implements Chan
* 上传存储视频文件
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Channel
uploadVideo
(
ChannelVo
channelVo
)
{
MultipartFile
file
=
channelVo
.
getFile
();
String
originalFilename
=
file
.
getOriginalFilename
();
...
...
@@ -195,7 +200,9 @@ public class ChannelServiceImpl extends BaseServiceImpl<Channel> implements Chan
throw
new
RuntimeException
(
e
);
}
long
videoLength
=
video
.
length
();
long
mbSize
=
videoLength
/
1024
/
1024
;
List
<
Long
>
tags
=
channelVo
.
getTags
();
channelVo
.
setUnid
(
unid
);
channelVo
.
setChannelUnid
(
unid
);
channelVo
.
setDeviceUnid
(
unid
);
...
...
@@ -203,9 +210,20 @@ public class ChannelServiceImpl extends BaseServiceImpl<Channel> implements Chan
channelVo
.
setStreamPath
(
video
.
getPath
());
channelVo
.
setType
(
ChannelType
.
FILE
.
value
);
channelVo
.
setStreamType
(
ChannelType
.
STREAM_FILE
.
value
);
channelVo
.
setPort
(
Math
.
toIntExact
(
mbSize
));
Channel
channel
=
this
.
insertSelective
(
channelVo
);
channel
=
selectByPrimaryKey
(
channel
.
getId
());
return
channel
;
channelVo
=
new
ChannelVo
(
channel
);
channelVo
.
setTags
(
tags
);
if
(
tags
!=
null
&&
tags
.
size
()
>
0
)
{
for
(
Long
tagId
:
tags
)
{
ChannelTag
channelTag
=
new
ChannelTag
();
channelTag
.
setChannelId
(
channel
.
getId
());
channelTag
.
setTagId
(
tagId
);
channelTagService
.
insertSelective
(
channelTag
);
}
}
return
channelVo
;
}
}
\ No newline at end of file
fanxing-ops/src/main/java/com/viontech/fanxing/ops/service/impl/ChannelTagServiceImpl.java
0 → 100644
View file @
c8aa9e3
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.ChannelTag
;
import
com.viontech.fanxing.ops.mapper.ChannelTagMapper
;
import
com.viontech.fanxing.ops.service.adapter.ChannelTagService
;
import
javax.annotation.Resource
;
import
org.springframework.stereotype.Service
;
@Service
public
class
ChannelTagServiceImpl
extends
BaseServiceImpl
<
ChannelTag
>
implements
ChannelTagService
{
@Resource
private
ChannelTagMapper
channelTagMapper
;
@Override
public
BaseMapper
<
ChannelTag
>
getMapper
()
{
return
channelTagMapper
;
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment