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
69e32feb
Commit
69e32feb
authored
Apr 09, 2023
by
廖旭伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
基础设置增加桌面终端应用编排设置
parent
f51ac288
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
138 additions
and
3 deletions
+138
-3
sst-manager/doc/api.md
sst-manager/doc/api.md
+95
-0
sst-manager/src/main/java/com/mortals/xhx/module/sst/web/SstAppsController.java
...ava/com/mortals/xhx/module/sst/web/SstAppsController.java
+4
-0
sst-manager/src/main/java/com/mortals/xhx/module/sst/web/SstBasicController.java
...va/com/mortals/xhx/module/sst/web/SstBasicController.java
+39
-3
No files found.
sst-manager/doc/api.md
View file @
69e32feb
...
...
@@ -477,6 +477,101 @@ msg|String|消息|-
```
### 终端获取应用列表
**请求URL:**
basic/site/apps
**请求方式:**
GET
**内容类型:**
application/json;charset=utf-8
**简要描述:**
查看基础配置,返回实例详细信息
**请求参数:**
参数名称|类型|必填|描述
:---|:---|:---|:------
siteId|Long|是|站点ID
**请求样例:**
```
{
"siteId":8115
}
```
**响应参数:**
参数名称 |参数类型|描述
:---|:---|:-------
code|Integer|结果码(-1.失败,1.成功)
msg|String|消息
data|object|数据对象
 
allApps|array|所有应用结果集
 
showApps|array|基础应用展示结果集列表
 
hotApps|array|热门应用展示结果集列表
dict|object|字典对象
**响应消息样例:**
```
{
"code": 1,
"data": {
"allApps":[],
"showApps":[],
"hotApps":[]
}
}
```
### 桌面终端获取应用列表
**请求URL:**
basic/site/desk/apps
**请求方式:**
GET
**内容类型:**
application/json;charset=utf-8
**简要描述:**
查看基础配置,返回实例详细信息
**请求参数:**
参数名称|类型|必填|描述
:---|:---|:---|:------
siteId|Long|是|站点ID
**请求样例:**
```
{
"siteId":8115
}
```
**响应参数:**
参数名称 |参数类型|描述
:---|:---|:-------
code|Integer|结果码(-1.失败,1.成功)
msg|String|消息
data|object|数据对象
 
allApps|array|所有应用结果集
 
showApps|array|基础应用展示结果集列表
 
hotApps|array|热门应用展示结果集列表
dict|object|字典对象
**响应消息样例:**
```
{
"code": 1,
"data": {
"allApps":[],
"showApps":[],
"hotApps":[]
}
}
```
### 终端基础配置
**请求URL:**
basic/setting/info
...
...
sst-manager/src/main/java/com/mortals/xhx/module/sst/web/SstAppsController.java
View file @
69e32feb
...
...
@@ -5,6 +5,7 @@ import com.mortals.framework.exception.AppException;
import
com.mortals.framework.service.IUser
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.module.sst.service.SstAppsDeskService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
...
...
@@ -37,6 +38,8 @@ public class SstAppsController extends BaseCRUDJsonBodyMappingController<SstApps
@Autowired
private
ParamService
paramService
;
@Autowired
private
SstAppsDeskService
sstAppsDeskService
;
public
SstAppsController
(){
super
.
setModuleDesc
(
"应用编排"
);
...
...
@@ -61,6 +64,7 @@ public class SstAppsController extends BaseCRUDJsonBodyMappingController<SstApps
int
code
=
1
;
try
{
this
.
service
.
forbidden
(
entity
.
getAppId
(),
user
.
getId
());
sstAppsDeskService
.
forbidden
(
entity
.
getAppId
(),
user
.
getId
());
model
.
put
(
"message_info"
,
busiDesc
+
"成功"
);
this
.
recordSysLog
(
this
.
request
,
busiDesc
+
" 【成功】"
);
}
catch
(
Exception
var9
)
{
...
...
sst-manager/src/main/java/com/mortals/xhx/module/sst/web/SstBasicController.java
View file @
69e32feb
...
...
@@ -244,10 +244,46 @@ public class SstBasicController extends BaseCRUDJsonBodyMappingController<SstBas
model
.
put
(
"showApps"
,
sstApps
.
get
(
"showApps"
));
model
.
put
(
"hotApps"
,
sstApps
.
get
(
"hotApps"
));
model
.
put
(
"allApps"
,
sstApps
.
get
(
"allApps"
));
model
.
put
(
"message_info"
,
busiDesc
+
"成功"
);
this
.
recordSysLog
(
this
.
request
,
busiDesc
+
" 【成功】"
);
}
catch
(
Exception
var9
)
{
code
=
-
1
;
this
.
doException
(
this
.
request
,
busiDesc
,
model
,
var9
);
}
ret
.
setCode
(
code
);
ret
.
setData
(
model
);
ret
.
setDict
(
model
.
get
(
"dict"
));
ret
.
setMsg
(
model
.
get
(
"message_info"
)
==
null
?
""
:
model
.
remove
(
"message_info"
).
toString
());
return
ret
;
}
@PostMapping
({
"site/desk/apps"
})
@UnAuth
public
Rest
<
Object
>
showDeskApps
(
@RequestBody
SstBasicEntity
query
)
{
// IUser user = this.getCurUser();
// if(user==null){
// throw new AppException("用户未登录");
// }
Rest
<
Object
>
ret
=
new
Rest
();
Map
<
String
,
Object
>
model
=
new
HashMap
();
String
busiDesc
=
"查询自助终端应用展示数据"
;
int
code
=
1
;
try
{
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
=
""
;
}
log
.
info
(
"server-name:"
+
serverName
+
",server-port:"
+
serverPort
);
Map
<
String
,
Object
>
sstAppsDesk
=
sstAppsDeskService
.
getAppListBySite
(
query
.
getSiteId
(),
host
);
model
.
put
(
"showApps
Desk
"
,
sstAppsDesk
.
get
(
"showApps"
));
model
.
put
(
"hotApps
Desk
"
,
sstAppsDesk
.
get
(
"hotApps"
));
model
.
put
(
"allApps
Desk
"
,
sstAppsDesk
.
get
(
"allApps"
));
model
.
put
(
"showApps"
,
sstAppsDesk
.
get
(
"showApps"
));
model
.
put
(
"hotApps"
,
sstAppsDesk
.
get
(
"hotApps"
));
model
.
put
(
"allApps"
,
sstAppsDesk
.
get
(
"allApps"
));
model
.
put
(
"message_info"
,
busiDesc
+
"成功"
);
this
.
recordSysLog
(
this
.
request
,
busiDesc
+
" 【成功】"
);
}
catch
(
Exception
var9
)
{
...
...
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