Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
self-service
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
廖旭伟
self-service
Commits
3d4c5398
Commit
3d4c5398
authored
Jan 16, 2024
by
廖旭伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
排序bug修改
parent
3498267e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
8 deletions
+42
-8
sst-manager/src/main/java/com/mortals/xhx/module/sst/service/impl/SstAppsDeskServiceImpl.java
...s/xhx/module/sst/service/impl/SstAppsDeskServiceImpl.java
+21
-4
sst-manager/src/main/java/com/mortals/xhx/module/sst/service/impl/SstAppsServiceImpl.java
...rtals/xhx/module/sst/service/impl/SstAppsServiceImpl.java
+21
-4
No files found.
sst-manager/src/main/java/com/mortals/xhx/module/sst/service/impl/SstAppsDeskServiceImpl.java
View file @
3d4c5398
...
...
@@ -155,6 +155,11 @@ public class SstAppsDeskServiceImpl extends AbstractCRUDServiceImpl<SstAppsDeskD
query
.
setOrderCols
(
orderCols
);
query
.
setSiteId
(
siteId
);
List
<
SstAppsDeskEntity
>
appsEntities
=
this
.
find
(
query
);
Map
<
String
,
String
>
orderCols1
=
new
HashMap
<>();
orderCols1
.
put
(
"clickSum"
,
"DESC"
);
orderCols1
.
put
(
"hotSort"
,
"DESC"
);
query
.
setOrderCols
(
orderCols1
);
List
<
SstAppsDeskEntity
>
appsHots
=
this
.
find
(
query
);
Map
<
Long
,
Long
>
black
=
new
HashMap
<>();
if
(
StringUtils
.
isNotEmpty
(
deviceCode
)){
DeviceBlackappPdu
blackappPdu
=
new
DeviceBlackappPdu
();
...
...
@@ -162,7 +167,6 @@ public class SstAppsDeskServiceImpl extends AbstractCRUDServiceImpl<SstAppsDeskD
blackappPdu
.
setDeviceCode
(
deviceCode
);
Rest
<
RespData
<
List
<
DeviceBlackappPdu
>>>
rest
=
appFeign
.
blackappList
(
blackappPdu
);
if
(
rest
.
getCode
().
equals
(
YesNoEnum
.
YES
.
getValue
()))
{
List
<
AppsInfoEntity
>
appsInfoEntities
=
new
ArrayList
<>();
for
(
DeviceBlackappPdu
pdu:
rest
.
getData
().
getData
()){
black
.
put
(
pdu
.
getAppId
(),
pdu
.
getAppId
());
}
...
...
@@ -183,7 +187,6 @@ public class SstAppsDeskServiceImpl extends AbstractCRUDServiceImpl<SstAppsDeskD
siteApp
.
put
(
"allApps"
,
allApps
);
if
(
CollectionUtils
.
isNotEmpty
(
appsEntities
)){
List
<
AppsInfoEntity
>
showApps
=
new
ArrayList
<>();
List
<
AppsInfoEntity
>
hotApps
=
new
ArrayList
<>();
for
(
SstAppsDeskEntity
sstAppsDeskEntity:
appsEntities
){
if
(
black
.
containsKey
(
sstAppsDeskEntity
.
getAppId
())){
continue
;
...
...
@@ -196,14 +199,28 @@ public class SstAppsDeskServiceImpl extends AbstractCRUDServiceImpl<SstAppsDeskD
if
(
sstAppsDeskEntity
.
getShowBasic
()==
1
){
showApps
.
add
(
appInfoMap
.
get
(
sstAppsDeskEntity
.
getAppId
()));
}
}
siteApp
.
put
(
"showApps"
,
showApps
);
}
else
{
siteApp
.
put
(
"showApps"
,
Collections
.
emptyList
());
}
if
(
CollectionUtils
.
isNotEmpty
(
appsHots
)){
List
<
AppsInfoEntity
>
hotApps
=
new
ArrayList
<>();
for
(
SstAppsDeskEntity
sstAppsDeskEntity:
appsHots
){
if
(
black
.
containsKey
(
sstAppsDeskEntity
.
getAppId
())){
continue
;
}
if
(!
appInfoMap
.
containsKey
(
sstAppsDeskEntity
.
getAppId
())){
continue
;
}
appInfoMap
.
get
(
sstAppsDeskEntity
.
getAppId
()).
setClickSum
(
sstAppsDeskEntity
.
getClickSum
());
appInfoMap
.
get
(
sstAppsDeskEntity
.
getAppId
()).
setSort
(
sstAppsDeskEntity
.
getBasicSort
());
if
(
sstAppsDeskEntity
.
getShowHot
()==
1
){
hotApps
.
add
(
appInfoMap
.
get
(
sstAppsDeskEntity
.
getAppId
()));
}
}
siteApp
.
put
(
"showApps"
,
showApps
);
siteApp
.
put
(
"hotApps"
,
hotApps
);
}
else
{
siteApp
.
put
(
"showApps"
,
Collections
.
emptyList
());
siteApp
.
put
(
"hotApps"
,
Collections
.
emptyList
());
}
return
siteApp
;
...
...
sst-manager/src/main/java/com/mortals/xhx/module/sst/service/impl/SstAppsServiceImpl.java
View file @
3d4c5398
...
...
@@ -157,6 +157,11 @@ public class SstAppsServiceImpl extends AbstractCRUDServiceImpl<SstAppsDao, SstA
query
.
setOrderCols
(
orderCols
);
query
.
setSiteId
(
siteId
);
List
<
SstAppsEntity
>
appsEntities
=
this
.
find
(
query
);
Map
<
String
,
String
>
orderCols1
=
new
HashMap
<>();
orderCols1
.
put
(
"clickSum"
,
"DESC"
);
orderCols1
.
put
(
"hotSort"
,
"DESC"
);
query
.
setOrderCols
(
orderCols1
);
List
<
SstAppsEntity
>
appsHots
=
this
.
find
(
query
);
Map
<
Long
,
Long
>
black
=
new
HashMap
<>();
if
(
StringUtils
.
isNotEmpty
(
deviceCode
)){
DeviceBlackappPdu
blackappPdu
=
new
DeviceBlackappPdu
();
...
...
@@ -164,7 +169,6 @@ public class SstAppsServiceImpl extends AbstractCRUDServiceImpl<SstAppsDao, SstA
blackappPdu
.
setDeviceCode
(
deviceCode
);
Rest
<
RespData
<
List
<
DeviceBlackappPdu
>>>
rest
=
appFeign
.
blackappList
(
blackappPdu
);
if
(
rest
.
getCode
().
equals
(
YesNoEnum
.
YES
.
getValue
()))
{
List
<
AppsInfoEntity
>
appsInfoEntities
=
new
ArrayList
<>();
for
(
DeviceBlackappPdu
pdu:
rest
.
getData
().
getData
()){
black
.
put
(
pdu
.
getAppId
(),
pdu
.
getAppId
());
}
...
...
@@ -186,7 +190,6 @@ public class SstAppsServiceImpl extends AbstractCRUDServiceImpl<SstAppsDao, SstA
siteApp
.
put
(
"allApps"
,
allApps
);
if
(
CollectionUtils
.
isNotEmpty
(
appsEntities
)){
List
<
AppsInfoEntity
>
showApps
=
new
ArrayList
<>();
List
<
AppsInfoEntity
>
hotApps
=
new
ArrayList
<>();
for
(
SstAppsEntity
sstAppsEntity:
appsEntities
){
if
(
black
.
containsKey
(
sstAppsEntity
.
getAppId
())){
continue
;
...
...
@@ -199,14 +202,28 @@ public class SstAppsServiceImpl extends AbstractCRUDServiceImpl<SstAppsDao, SstA
if
(
sstAppsEntity
.
getShowBasic
()==
1
){
showApps
.
add
(
appInfoMap
.
get
(
sstAppsEntity
.
getAppId
()));
}
}
siteApp
.
put
(
"showApps"
,
showApps
);
}
else
{
siteApp
.
put
(
"showApps"
,
Collections
.
emptyList
());
}
if
(
CollectionUtils
.
isNotEmpty
(
appsHots
)){
List
<
AppsInfoEntity
>
hotApps
=
new
ArrayList
<>();
for
(
SstAppsEntity
sstAppsEntity:
appsHots
){
if
(
black
.
containsKey
(
sstAppsEntity
.
getAppId
())){
continue
;
}
if
(!
appInfoMap
.
containsKey
(
sstAppsEntity
.
getAppId
())){
continue
;
}
appInfoMap
.
get
(
sstAppsEntity
.
getAppId
()).
setClickSum
(
sstAppsEntity
.
getClickSum
());
appInfoMap
.
get
(
sstAppsEntity
.
getAppId
()).
setSort
(
sstAppsEntity
.
getBasicSort
());
if
(
sstAppsEntity
.
getShowHot
()==
1
){
hotApps
.
add
(
appInfoMap
.
get
(
sstAppsEntity
.
getAppId
()));
}
}
siteApp
.
put
(
"showApps"
,
showApps
);
siteApp
.
put
(
"hotApps"
,
hotApps
);
}
else
{
siteApp
.
put
(
"showApps"
,
Collections
.
emptyList
());
siteApp
.
put
(
"hotApps"
,
Collections
.
emptyList
());
}
return
siteApp
;
...
...
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