Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
1651d36d
Commit
1651d36d
authored
Sep 05, 2022
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改视频推送接口
parent
32537375
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
151 additions
and
127 deletions
+151
-127
EquipFeignClient.java
...n/amos/boot/module/common/api/feign/EquipFeignClient.java
+2
-2
RequestData.java
...va/com/yeejoin/equipmanage/common/entity/RequestData.java
+17
-0
CommandController.java
...boot/module/command/biz/controller/CommandController.java
+2
-2
VideoController.java
...a/com/yeejoin/equipmanage/controller/VideoController.java
+3
-4
VideoMapper.xml
...ot-system-equip/src/main/resources/mapper/VideoMapper.xml
+127
-119
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/feign/EquipFeignClient.java
View file @
1651d36d
...
@@ -241,10 +241,10 @@ public interface EquipFeignClient {
...
@@ -241,10 +241,10 @@ public interface EquipFeignClient {
@RequestParam
(
"latitude"
)
Double
latitude
,
@RequestParam
(
"latitude"
)
Double
latitude
,
@RequestParam
(
"distance"
)
Double
distance
);
@RequestParam
(
"distance"
)
Double
distance
);
@RequestMapping
(
value
=
"/video/pageVideoByAlertType"
,
method
=
RequestMethod
.
GE
T
)
@RequestMapping
(
value
=
"/video/pageVideoByAlertType"
,
method
=
RequestMethod
.
POS
T
)
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
pageVideoByAlertType
(
@RequestParam
(
"pageNum"
)
Integer
pageNum
,
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
pageVideoByAlertType
(
@RequestParam
(
"pageNum"
)
Integer
pageNum
,
@RequestParam
(
"pageSize"
)
Integer
pageSize
,
@RequestParam
(
"pageSize"
)
Integer
pageSize
,
@RequestParam
(
"par"
)
RequestData
par
);
@RequestBody
RequestData
par
);
@RequestMapping
(
value
=
"/video/pageList"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/video/pageList"
,
method
=
RequestMethod
.
GET
)
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/RequestData.java
View file @
1651d36d
...
@@ -50,4 +50,20 @@ public class RequestData {
...
@@ -50,4 +50,20 @@ public class RequestData {
@ApiModelProperty
(
value
=
"排序"
)
@ApiModelProperty
(
value
=
"排序"
)
private
String
orderTime
;
private
String
orderTime
;
@ApiModelProperty
(
value
=
"筛选条件-建筑Id"
)
private
String
buildingId
;
@ApiModelProperty
(
value
=
"筛选条件-视频类型"
)
private
String
type
;
@ApiModelProperty
(
value
=
"筛选条件-视频编码"
)
private
String
code
;
@ApiModelProperty
(
value
=
"筛选条件-视频名称"
)
private
String
remark
;
@ApiModelProperty
(
value
=
"筛选条件-所属单位"
)
private
String
bizOrgCode
;
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-command-biz/src/main/java/com/yeejoin/amos/boot/module/command/biz/controller/CommandController.java
View file @
1651d36d
...
@@ -379,9 +379,9 @@ public class CommandController extends BaseController {
...
@@ -379,9 +379,9 @@ public class CommandController extends BaseController {
}
}
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
data
=
null
;
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
data
=
null
;
if
(
ValidationUtil
.
isEmpty
(
par
.
getLatitudeTwo
())
){
if
(
ValidationUtil
.
isEmpty
(
par
.
getLatitudeTwo
())
){
data
=
equipFeignClient
.
getVideopag
(
pageNum
==
0
?
"1"
:
pageNum
.
toString
(
),
pageSize
.
toString
(),
par
.
getBuildingId
(),
par
.
getCode
(),
null
,
par
.
getBizOrgCode
(),
par
.
getType
());
data
=
equipFeignClient
.
getVideopag
(
pageNum
==
1
?
"0"
:
String
.
valueOf
(
pageNum
*
pageSize
),
pageSize
.
toString
(),
par
.
getBuildingId
(),
par
.
getCode
(),
null
,
par
.
getBizOrgCode
(),
par
.
getType
());
}
else
{
}
else
{
data
=
equipFeignClient
.
pageVideoByAlertType
(
pageNum
==
0
?
1
:
pageNum
,
pageSize
,
par
);
data
=
equipFeignClient
.
pageVideoByAlertType
(
pageNum
,
pageSize
,
par
);
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/VideoController.java
View file @
1651d36d
...
@@ -203,11 +203,10 @@ public class VideoController extends AbstractBaseController {
...
@@ -203,11 +203,10 @@ public class VideoController extends AbstractBaseController {
*
*
* @return
* @return
*/
*/
@RequestMapping
(
value
=
"/pageVideoByAlertType"
,
method
=
RequestMethod
.
GE
T
)
@RequestMapping
(
value
=
"/pageVideoByAlertType"
,
method
=
RequestMethod
.
POS
T
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"视频分页资源查询"
,
notes
=
"视频分页资源查询"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"视频分页资源查询"
,
notes
=
"视频分页资源查询"
)
public
ResponseModel
<
Page
<
VideoListVo
>>
pageVideoByAlertType
(
Integer
pageNum
,
Integer
pageSize
,
RequestData
par
)
{
public
ResponseModel
<
Page
<
VideoListVo
>>
pageVideoByAlertType
(
Integer
pageNum
,
Integer
pageSize
,
@RequestBody
RequestData
par
)
{
if
(
null
==
pageNum
||
null
==
pageSize
)
{
if
(
null
==
pageNum
||
null
==
pageSize
)
{
pageNum
=
1
;
pageNum
=
1
;
pageSize
=
Integer
.
MAX_VALUE
;
pageSize
=
Integer
.
MAX_VALUE
;
...
...
amos-boot-system-equip/src/main/resources/mapper/VideoMapper.xml
View file @
1651d36d
...
@@ -362,69 +362,73 @@
...
@@ -362,69 +362,73 @@
a.*
a.*
FROM
FROM
(
(
SELECT
<if
test=
'par.longitude!=null and par.latitude!=null '
>
wle.id ,
SELECT
wle.`code`
,
wle.id
,
wle.url
,
wle.`code`
,
wle.position3d
,
wle.url
,
wle.token
,
wle.position3d
,
wle.`name`
,
wle.token
,
wle.address
,
wle.`name`
,
wle.longitude
,
wle.address
,
<if
test=
'longitude!=null and latitude!=null '
>
wle.longitude,
Round(st_distance(point(wle.longitude,wle.latitude),point(#{longitude},#{latitude}))*111195,1) AS distance,
Round(st_distance(point(wle.longitude,wle.latitude),point(#{longitude},#{latitude}))*111195,1) AS distance,
wle.latitude
FROM wl_video wle
where wle.longitude is not null and wle.latitude is not null
<if
test=
'par.longitude!=null and par.latitude!=null and distance!=null'
>
and distance
<
= #{distance}
</if>
<if
test=
'par.type!=null and par.type!="" '
>
wle.type = #{type}
</if>
<if
test=
'par.remark!=null and par.remark!="" '
>
wle.remake like concat ('%',#{par.remake},'%')
</if>
<if
test=
'par.code!=null and par.code!="" '
>
wle.code like concat ('%',#{par.code},'%')
</if>
</if>
</if>
wle.latitude
<if
test=
"par.longitudeTwo != null and par.longitude != null"
>
FROM wl_video wle
UNION
where wle.longitude is not null and wle.latitude is not null
</if>
<if
test=
'longitude!=null and latitude!=null and distance!=null'
>
<if
test=
'par.longitudeTwo !=null and par.latitudeTwo !=null '
>
and distance
<
= #{distance}
SELECT
</if>
wle.id,
<if
test=
'type!=null and type!="" '
>
wle.`code`,
wle.type = #{type}
wle.url,
</if>
wle.position3d,
<if
test=
'remake !=null and remake!="" '
>
wle.token,
wle.remake like concat ('%',#{remake},'%')
wle.`name`,
</if>
wle.address,
<if
test=
'code!=null and code!="" '
>
wle.longitude,
wle.code like concat ('%',#{code},'%')
Round(
</if>
UNION
SELECT
wle.id,
wle.`code`,
wle.url,
wle.position3d,
wle.token,
wle.`name`,
wle.address,
wle.longitude,
<if
test=
'longitudeTwo!=null and latitudeTwo!=null '
>
Round(
st_distance (
st_distance (
point ( wle.longitude, wle.latitude ),
point ( wle.longitude, wle.latitude ),
point (#{longitudeTwo},#{latitudeTwo} ) ) * 111195, 1 ) AS distance,
point (#{par.longitudeTwo},#{par.latitudeTwo} ) ) * 111195, 1 ) AS distance,
</if>
wle.latitude
wle.latitude
FROM
FROM
wl_video wle
wl_video wle
WHERE
WHERE
wle.longitude IS NOT NULL
wle.longitude IS NOT NULL
AND wle.latitude IS NOT NULL
AND wle.latitude IS NOT NULL
<if
test=
'longitudeTwo!=null and latitude!=null and distance!=null'
>
<if
test=
'par.longitudeTwo!=null and par.latitude!=null and distance!=null'
>
AND distance
<
= #{distance}
AND distance
<
= #{distance}
</if>
</if>
<if
test=
'type!=null and type!="" '
>
<if
test=
'par.type!=null and par.type!="" '
>
wle.type = #{type}
wle.type = #{par.type}
</if>
</if>
<if
test=
'remake !=null and remake!="" '
>
<if
test=
'par.remark!=null and par.remark!="" '
>
wle.remake like concat ('%',#{remake},'%')
wle.remake like concat ('%',#{par.remark},'%')
</if>
</if>
<if
test=
'code!=null and code!="" '
>
<if
test=
'par.code!=null and par.code!="" '
>
wle.code like concat ('%',#{code},'%')
wle.code like concat ('%',#{par.code},'%')
</if>
</if>
<if
test=
'longitudeTwo !=null and latitudeTwo !=null '
>
<if
test=
'par.longitudeTwo !=null and par.latitudeTwo!=null '
>
ORDER BY
ORDER BY
distance
distance
</if>
</if>
</if>
) AS a
) AS a
limit #{pageNum},#{pageSize}
limit #{pageNum},#{pageSize}
...
@@ -433,72 +437,76 @@
...
@@ -433,72 +437,76 @@
<select
id=
"VideoListByAlertCount"
resultType=
"int"
>
<select
id=
"VideoListByAlertCount"
resultType=
"int"
>
SELECT
SELECT
count(a.
*
)
count(a.
id
)
FROM
FROM
(
(
SELECT
<if
test=
'par.longitude!=null and par.latitude!=null '
>
wle.id ,
SELECT
wle.`code`
,
wle.id
,
wle.url
,
wle.`code`
,
wle.position3d
,
wle.url
,
wle.token
,
wle.position3d
,
wle.`name`
,
wle.token
,
wle.address
,
wle.`name`
,
wle.longitude
,
wle.address
,
<if
test=
'longitude!=null and latitude!=null '
>
wle.longitude,
Round(st_distance(point(wle.longitude,wle.latitude),point(#{longitude},#{latitude}))*111195,1) AS distance,
Round(st_distance(point(wle.longitude,wle.latitude),point(#{longitude},#{latitude}))*111195,1) AS distance,
wle.latitude
FROM wl_video wle
where wle.longitude is not null and wle.latitude is not null
<if
test=
'par.longitude!=null and par.latitude!=null and distance!=null'
>
and distance
<
= #{distance}
</if>
<if
test=
'par.type!=null and par.type!="" '
>
wle.type = #{type}
</if>
<if
test=
'par.remark!=null and par.remark!="" '
>
wle.remake like concat ('%',#{par.remake},'%')
</if>
<if
test=
'par.code!=null and par.code!="" '
>
wle.code like concat ('%',#{par.code},'%')
</if>
</if>
</if>
<if
test=
'type!=null and type!="" '
>
<if
test=
"par.longitudeTwo != null and par.longitude != null"
>
wle.type = #{type}
UNION
</if>
</if>
<if
test=
'remake !=null and remake!="" '
>
<if
test=
'par.longitudeTwo !=null and par.latitudeTwo !=null '
>
wle.remake like concat ('%',#{remake},'%')
SELECT
</if>
wle.id,
<if
test=
'code!=null and code!="" '
>
wle.`code`,
wle.code like concat ('%',#{code},'%')
wle.url,
</if>
wle.position3d,
wle.latitude
wle.token,
FROM wl_video wle
wle.`name`,
where wle.longitude is not null and wle.latitude is not null
wle.address,
<if
test=
'longitude!=null and latitude!=null and distance!=null'
>
wle.longitude,
and distance
<
= #{distance}
Round(
</if>
UNION
SELECT
wle.id,
wle.`code`,
wle.url,
wle.position3d,
wle.token,
wle.`name`,
wle.address,
wle.longitude,
<if
test=
'longitudeTwo!=null and latitudeTwo!=null '
>
Round(
st_distance (
st_distance (
point ( wle.longitude, wle.latitude ),
point ( wle.longitude, wle.latitude ),
point (#{longitudeTwo},#{latitudeTwo} ) ) * 111195, 1 ) AS distance,
point (#{par.longitudeTwo},#{par.latitudeTwo} ) ) * 111195, 1 ) AS distance,
</if>
wle.latitude
wle.latitude
FROM
FROM
wl_video wle
wl_video wle
WHERE
WHERE
wle.longitude IS NOT NULL
wle.longitude IS NOT NULL
AND wle.latitude IS NOT NULL
AND wle.latitude IS NOT NULL
<if
test=
'longitudeTwo!=null and latitude!=null and distance!=null'
>
<if
test=
'par.longitudeTwo!=null and par.latitude!=null and distance!=null'
>
AND distance
<
= #{distance}
AND distance
<
= #{distance}
</if>
</if>
<if
test=
'type!=null and type!="" '
>
<if
test=
'par.type!=null and par.type!="" '
>
wle.type = #{type}
wle.type = #{par.type}
</if>
</if>
<if
test=
'remake !=null and remake!="" '
>
<if
test=
'par.remark!=null and par.remark!="" '
>
wle.remake like concat ('%',#{remake},'%')
wle.remake like concat ('%',#{par.remark},'%')
</if>
</if>
<if
test=
'code!=null and code!="" '
>
<if
test=
'par.code!=null and par.code!="" '
>
wle.code like concat ('%',#{code},'%')
wle.code like concat ('%',#{par.code},'%')
</if>
</if>
<if
test=
'longitudeTwo !=null and latitudeTwo !=null '
>
<if
test=
'par.longitudeTwo !=null and par.latitudeTwo!=null '
>
ORDER BY
ORDER BY
distance
distance
</if>
</if>
</if>
) AS a
) AS a
</select>
</select>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment