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
ee464a1d
Commit
ee464a1d
authored
Jul 14, 2023
by
刘林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(equip):视频排序接口优化
parent
002890f9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
35 deletions
+7
-35
VideoImportantEquipmentMapper.java
...oin/equipmanage/mapper/VideoImportantEquipmentMapper.java
+0
-2
VideoImportantEquipmentServiceImpl.java
...nage/service/impl/VideoImportantEquipmentServiceImpl.java
+7
-19
VideoImportantEquipmentMapper.xml
...c/main/resources/mapper/VideoImportantEquipmentMapper.xml
+0
-14
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/VideoImportantEquipmentMapper.java
View file @
ee464a1d
...
@@ -19,6 +19,4 @@ public interface VideoImportantEquipmentMapper extends BaseMapper<VideoImportant
...
@@ -19,6 +19,4 @@ public interface VideoImportantEquipmentMapper extends BaseMapper<VideoImportant
List
<
VideoImportantEquipmentVo
>
getVideoList
(
Map
<
String
,
Object
>
map
);
List
<
VideoImportantEquipmentVo
>
getVideoList
(
Map
<
String
,
Object
>
map
);
List
<
String
>
getVideoAddressGroupList
(
Map
<
String
,
Object
>
map
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/VideoImportantEquipmentServiceImpl.java
View file @
ee464a1d
...
@@ -7,12 +7,7 @@ import com.yeejoin.equipmanage.mapper.VideoImportantEquipmentMapper;
...
@@ -7,12 +7,7 @@ import com.yeejoin.equipmanage.mapper.VideoImportantEquipmentMapper;
import
com.yeejoin.equipmanage.service.IVideoImportantEquipmentService
;
import
com.yeejoin.equipmanage.service.IVideoImportantEquipmentService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
java.util.*
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
/**
/**
...
@@ -33,19 +28,12 @@ public class VideoImportantEquipmentServiceImpl extends ServiceImpl<VideoImporta
...
@@ -33,19 +28,12 @@ public class VideoImportantEquipmentServiceImpl extends ServiceImpl<VideoImporta
@Override
@Override
public
List
<
Map
<
String
,
List
<
VideoImportantEquipmentVo
>>>
getVideoList
(
Map
<
String
,
Object
>
map
)
{
public
List
<
Map
<
String
,
List
<
VideoImportantEquipmentVo
>>>
getVideoList
(
Map
<
String
,
Object
>
map
)
{
ArrayList
<
Map
<
String
,
List
<
VideoImportantEquipmentVo
>>>
maps
=
new
ArrayList
<>();
List
<
VideoImportantEquipmentVo
>
videoList
=
videoImportantEquipmentMapper
.
getVideoList
(
map
);
List
<
VideoImportantEquipmentVo
>
videoList
=
videoImportantEquipmentMapper
.
getVideoList
(
map
);
List
<
String
>
videoAddressGroupList
=
videoImportantEquipmentMapper
.
getVideoAddressGroupList
(
map
);
return
videoList
.
stream
()
for
(
String
address
:
videoAddressGroupList
)
{
.
collect
(
Collectors
.
groupingBy
(
VideoImportantEquipmentVo:
:
getAddress
,
LinkedHashMap:
:
new
,
Collectors
.
toList
()))
if
(!
ObjectUtils
.
isEmpty
(
address
))
{
.
entrySet
().
stream
()
List
<
VideoImportantEquipmentVo
>
collect
=
videoList
.
stream
().
filter
(
item
->
item
.
getAddress
().
equals
(
address
)).
collect
(
Collectors
.
toList
());
.
map
(
entry
->
Collections
.
singletonMap
(
entry
.
getKey
(),
entry
.
getValue
()))
if
(
collect
.
size
()
>
0
)
{
.
collect
(
Collectors
.
toList
());
HashMap
<
String
,
List
<
VideoImportantEquipmentVo
>>
listMap
=
new
HashMap
<>();
listMap
.
put
(
address
,
collect
);
maps
.
add
(
listMap
);
}
}
}
return
maps
;
}
}
}
}
amos-boot-system-equip/src/main/resources/mapper/VideoImportantEquipmentMapper.xml
View file @
ee464a1d
...
@@ -44,18 +44,4 @@
...
@@ -44,18 +44,4 @@
</where>
</where>
ORDER BY v.create_date DESC
ORDER BY v.create_date DESC
</select>
</select>
<select
id=
"getVideoAddressGroupList"
resultType=
"java.lang.String"
>
SELECT
v.address
FROM
wl_video v
<where>
<if
test=
"importantEquipmentId != null"
>
v.id in (select video_id from wl_video_important_equipment
where important_equipment_id = #{importantEquipmentId})
</if>
</where>
GROUP BY v.address
ORDER BY v.create_date DESC
</select>
</mapper>
</mapper>
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