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
e2354536
Commit
e2354536
authored
Mar 27, 2023
by
廖旭伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
应用列表接口增加host
parent
36935a31
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
3 deletions
+21
-3
sst-manager/src/main/java/com/mortals/xhx/module/sst/service/SstAppsService.java
...va/com/mortals/xhx/module/sst/service/SstAppsService.java
+1
-1
sst-manager/src/main/java/com/mortals/xhx/module/sst/service/impl/SstAppsServiceImpl.java
...rtals/xhx/module/sst/service/impl/SstAppsServiceImpl.java
+6
-1
sst-manager/src/main/java/com/mortals/xhx/module/sst/web/SstBasicController.java
...va/com/mortals/xhx/module/sst/web/SstBasicController.java
+14
-1
No files found.
sst-manager/src/main/java/com/mortals/xhx/module/sst/service/SstAppsService.java
View file @
e2354536
...
@@ -38,7 +38,7 @@ public interface SstAppsService extends ICRUDService<SstAppsEntity,Long>{
...
@@ -38,7 +38,7 @@ public interface SstAppsService extends ICRUDService<SstAppsEntity,Long>{
* @param siteId 站点ID
* @param siteId 站点ID
* @return
* @return
*/
*/
Map
<
String
,
Object
>
getAppListBySite
(
Long
siteId
);
Map
<
String
,
Object
>
getAppListBySite
(
Long
siteId
,
String
host
);
/**
/**
* 应用下架
* 应用下架
...
...
sst-manager/src/main/java/com/mortals/xhx/module/sst/service/impl/SstAppsServiceImpl.java
View file @
e2354536
...
@@ -139,7 +139,7 @@ public class SstAppsServiceImpl extends AbstractCRUDServiceImpl<SstAppsDao, SstA
...
@@ -139,7 +139,7 @@ public class SstAppsServiceImpl extends AbstractCRUDServiceImpl<SstAppsDao, SstA
}
}
@Override
@Override
public
Map
<
String
,
Object
>
getAppListBySite
(
Long
siteId
)
{
public
Map
<
String
,
Object
>
getAppListBySite
(
Long
siteId
,
String
host
)
{
SstAppsEntity
query
=
new
SstAppsEntity
();
SstAppsEntity
query
=
new
SstAppsEntity
();
Map
<
String
,
String
>
orderCols
=
new
HashMap
<>();
Map
<
String
,
String
>
orderCols
=
new
HashMap
<>();
orderCols
.
put
(
"basicSort"
,
"DESC"
);
orderCols
.
put
(
"basicSort"
,
"DESC"
);
...
@@ -150,6 +150,11 @@ public class SstAppsServiceImpl extends AbstractCRUDServiceImpl<SstAppsDao, SstA
...
@@ -150,6 +150,11 @@ public class SstAppsServiceImpl extends AbstractCRUDServiceImpl<SstAppsDao, SstA
AppsInfoEntity
appsInfoQuery
=
new
AppsInfoEntity
();
AppsInfoEntity
appsInfoQuery
=
new
AppsInfoEntity
();
appsInfoQuery
.
setSiteId
(
siteId
);
appsInfoQuery
.
setSiteId
(
siteId
);
List
<
AppsInfoEntity
>
allApps
=
appsInfoService
.
find
(
appsInfoQuery
);
List
<
AppsInfoEntity
>
allApps
=
appsInfoService
.
find
(
appsInfoQuery
);
for
(
AppsInfoEntity
appsInfoEntity:
allApps
){
if
(
com
.
mortals
.
framework
.
util
.
StringUtils
.
isNotEmpty
(
host
))
{
appsInfoEntity
.
setCustUrl
(
host
+
"/"
+
appsInfoEntity
.
getCustUrl
());
}
}
Map
<
Long
,
AppsInfoEntity
>
appInfoMap
=
allApps
.
stream
().
collect
(
Collectors
.
toMap
(
AppsInfoEntity:
:
getId
,
Function
.
identity
()));
Map
<
Long
,
AppsInfoEntity
>
appInfoMap
=
allApps
.
stream
().
collect
(
Collectors
.
toMap
(
AppsInfoEntity:
:
getId
,
Function
.
identity
()));
Map
<
String
,
Object
>
siteApp
=
new
HashMap
<>();
Map
<
String
,
Object
>
siteApp
=
new
HashMap
<>();
siteApp
.
put
(
"allApps"
,
allApps
);
siteApp
.
put
(
"allApps"
,
allApps
);
...
...
sst-manager/src/main/java/com/mortals/xhx/module/sst/web/SstBasicController.java
View file @
e2354536
package
com.mortals.xhx.module.sst.web
;
package
com.mortals.xhx.module.sst.web
;
import
cn.hutool.core.lang.Validator
;
import
cn.hutool.core.net.url.UrlBuilder
;
import
cn.hutool.core.util.StrUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.mortals.framework.annotation.UnAuth
;
import
com.mortals.framework.annotation.UnAuth
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.common.Rest
;
...
@@ -16,6 +19,7 @@ import com.mortals.xhx.feign.site.ISiteFeign;
...
@@ -16,6 +19,7 @@ import com.mortals.xhx.feign.site.ISiteFeign;
import
com.mortals.xhx.module.sst.model.SstAppsEntity
;
import
com.mortals.xhx.module.sst.model.SstAppsEntity
;
import
com.mortals.xhx.module.sst.service.SstAppsService
;
import
com.mortals.xhx.module.sst.service.SstAppsService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
...
@@ -217,7 +221,16 @@ public class SstBasicController extends BaseCRUDJsonBodyMappingController<SstBas
...
@@ -217,7 +221,16 @@ public class SstBasicController extends BaseCRUDJsonBodyMappingController<SstBas
String
busiDesc
=
"查询自助终端应用展示数据"
;
String
busiDesc
=
"查询自助终端应用展示数据"
;
int
code
=
1
;
int
code
=
1
;
try
{
try
{
Map
<
String
,
Object
>
sstApps
=
sstAppsService
.
getAppListBySite
(
query
.
getSiteId
());
String
host
=
""
;
String
serverName
=
request
.
getHeader
(
"server-name"
);
Integer
serverPort
=
DataUtil
.
converStr2Int
(
request
.
getHeader
(
"server-port"
),
0
);
if
(!
ObjectUtils
.
isEmpty
(
serverName
)
&&
Validator
.
isIpv4
(
serverName
))
{
host
=
UrlBuilder
.
ofHttp
(
serverName
).
setPort
(
serverPort
>
0
?
serverPort
:
11078
).
build
();
host
=
StrUtil
.
sub
(
host
,
0
,
host
.
length
()
-
1
);
}
else
{
host
=
""
;
}
Map
<
String
,
Object
>
sstApps
=
sstAppsService
.
getAppListBySite
(
query
.
getSiteId
(),
host
);
model
.
put
(
"showApps"
,
sstApps
.
get
(
"showApps"
));
model
.
put
(
"showApps"
,
sstApps
.
get
(
"showApps"
));
model
.
put
(
"hotApps"
,
sstApps
.
get
(
"hotApps"
));
model
.
put
(
"hotApps"
,
sstApps
.
get
(
"hotApps"
));
model
.
put
(
"allApps"
,
sstApps
.
get
(
"allApps"
));
model
.
put
(
"allApps"
,
sstApps
.
get
(
"allApps"
));
...
...
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