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
f51ac288
Commit
f51ac288
authored
Apr 09, 2023
by
廖旭伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
基础设置增加桌面终端应用编排设置
parent
9c5b55e7
Changes
13
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
3549 additions
and
9 deletions
+3549
-9
sst-manager/db/add_db.sql
sst-manager/db/add_db.sql
+142
-0
sst-manager/doc/api.md
sst-manager/doc/api.md
+271
-9
sst-manager/src/main/java/com/mortals/xhx/module/sst/dao/SstAppsDeskDao.java
...n/java/com/mortals/xhx/module/sst/dao/SstAppsDeskDao.java
+17
-0
sst-manager/src/main/java/com/mortals/xhx/module/sst/dao/ibatis/SstAppsDeskDaoImpl.java
...mortals/xhx/module/sst/dao/ibatis/SstAppsDeskDaoImpl.java
+21
-0
sst-manager/src/main/java/com/mortals/xhx/module/sst/model/SstAppsDeskEntity.java
...a/com/mortals/xhx/module/sst/model/SstAppsDeskEntity.java
+239
-0
sst-manager/src/main/java/com/mortals/xhx/module/sst/model/SstAppsDeskQuery.java
...va/com/mortals/xhx/module/sst/model/SstAppsDeskQuery.java
+1648
-0
sst-manager/src/main/java/com/mortals/xhx/module/sst/model/vo/SstAppsDeskVo.java
...va/com/mortals/xhx/module/sst/model/vo/SstAppsDeskVo.java
+14
-0
sst-manager/src/main/java/com/mortals/xhx/module/sst/model/vo/SstBasicVo.java
.../java/com/mortals/xhx/module/sst/model/vo/SstBasicVo.java
+21
-0
sst-manager/src/main/java/com/mortals/xhx/module/sst/service/SstAppsDeskService.java
...om/mortals/xhx/module/sst/service/SstAppsDeskService.java
+47
-0
sst-manager/src/main/java/com/mortals/xhx/module/sst/service/impl/SstAppsDeskServiceImpl.java
...s/xhx/module/sst/service/impl/SstAppsDeskServiceImpl.java
+186
-0
sst-manager/src/main/java/com/mortals/xhx/module/sst/web/SstAppsDeskController.java
...com/mortals/xhx/module/sst/web/SstAppsDeskController.java
+79
-0
sst-manager/src/main/java/com/mortals/xhx/module/sst/web/SstBasicController.java
...va/com/mortals/xhx/module/sst/web/SstBasicController.java
+13
-0
sst-manager/src/main/resources/sqlmap/module/sst/SstAppsDeskMapper.xml
...rc/main/resources/sqlmap/module/sst/SstAppsDeskMapper.xml
+851
-0
No files found.
sst-manager/db/add_db.sql
0 → 100644
View file @
f51ac288
-- ----------------------------
-- 桌面终端应用编排表
-- ----------------------------
DROP
TABLE
IF
EXISTS
`mortals_xhx_sst_apps_desk`
;
CREATE
TABLE
mortals_xhx_sst_apps_desk
(
`id`
bigint
(
20
)
AUTO_INCREMENT
COMMENT
'序号,主键,自增长'
,
`siteId`
bigint
(
20
)
NOT
NULL
COMMENT
'站点id'
,
`appId`
bigint
(
20
)
NOT
NULL
COMMENT
'应用id'
,
`name`
varchar
(
64
)
COMMENT
'应用名称'
,
`describe`
varchar
(
64
)
COMMENT
'应用描述'
,
`url`
varchar
(
128
)
COMMENT
'应用访问地址'
,
`showBasic`
tinyint
(
2
)
DEFAULT
'1'
COMMENT
'是否展示基础应用1是0否'
,
`basicSort`
int
(
4
)
COMMENT
'基础应用排序号'
,
`showHot`
tinyint
(
2
)
DEFAULT
'1'
COMMENT
'是否展示热门应用1是0否'
,
`hotSort`
int
(
4
)
COMMENT
'热门应用排序号'
,
`createUserId`
bigint
(
20
)
COMMENT
'创建用户'
,
`createTime`
datetime
COMMENT
'创建时间'
,
`updateUserId`
bigint
(
20
)
COMMENT
'更新用户'
,
`updateTime`
datetime
COMMENT
'更新时间'
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COMMENT
=
'桌面终端应用编排'
;
-- ----------------------------
-- 申报事项表
-- ----------------------------
DROP
TABLE
IF
EXISTS
`mortals_sys_matter_apply`
;
CREATE
TABLE
mortals_sys_matter_apply
(
`id`
bigint
(
20
)
AUTO_INCREMENT
COMMENT
'序号,主键,自增长'
,
`siteId`
bigint
(
20
)
COMMENT
'站点id'
,
`siteName`
varchar
(
255
)
COMMENT
'站点名称'
,
`siteMatterId`
bigint
(
20
)
COMMENT
'站点事项id'
,
`matterId`
bigint
(
20
)
COMMENT
'事项ID'
,
`matterName`
varchar
(
1024
)
COMMENT
'事项名称'
,
`matterCode`
varchar
(
512
)
COMMENT
'事项编码'
,
`deptId`
bigint
(
20
)
COMMENT
'部门ID'
,
`deptName`
varchar
(
128
)
COMMENT
'部门名称'
,
`deptCode`
varchar
(
255
)
COMMENT
'部门编码'
,
`themeCode`
varchar
(
255
)
COMMENT
'事项主题'
,
`themeName`
varchar
(
255
)
COMMENT
'事项主题'
,
`source`
tinyint
(
2
)
COMMENT
'事项来源'
,
`reportCount`
int
(
8
)
DEFAULT
'0'
COMMENT
'申报次数'
,
`datumCount`
int
(
8
)
DEFAULT
'0'
COMMENT
'材料数量'
,
`govUrl`
varchar
(
255
)
COMMENT
'政务网地址'
,
`isConvert`
tinyint
(
2
)
DEFAULT
'0'
COMMENT
'是否生成本地附件'
,
`createUserId`
bigint
(
20
)
NOT
NULL
COMMENT
'创建用户'
,
`createTime`
datetime
NOT
NULL
COMMENT
'创建时间'
,
`updateUserId`
bigint
(
20
)
COMMENT
'更新用户'
,
`updateTime`
datetime
COMMENT
'更新时间'
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COMMENT
=
'申报事项'
;
-- ----------------------------
-- 事项申请材料业务表
-- ----------------------------
DROP
TABLE
IF
EXISTS
`mortals_sys_matter_datum`
;
CREATE
TABLE
mortals_sys_matter_datum
(
`id`
bigint
(
20
)
AUTO_INCREMENT
COMMENT
'主键,自增长'
,
`matterId`
bigint
(
20
)
COMMENT
'事项基础表matter id'
,
`materialName`
varchar
(
1024
)
NOT
NULL
COMMENT
'材料名'
,
`isMust`
varchar
(
32
)
DEFAULT
'1'
COMMENT
'必交性(1.非必要,2.必要,3.必要|容缺后补,4.非必要|容缺后补)'
,
`materialType`
varchar
(
32
)
DEFAULT
'1'
COMMENT
'材料类型(1.无,2.原件,3.复印件,4.原件和复印件)'
,
`materialProperty`
varchar
(
32
)
DEFAULT
'1'
COMMENT
'材料形式(1.纸质,2.电子,3.纸质|电子)'
,
`electronicgs`
varchar
(
32
)
DEFAULT
'1'
COMMENT
'电子材料格式(1.无,2.不限,3.jpg,4.jpeg,5.pdf,6.word,7.pdf,jpg,jpeg,8.pdf,jpg)'
,
`materialSource`
varchar
(
32
)
DEFAULT
'1'
COMMENT
'材料来源渠道(1.无,2.申请人自备,3.政府部门核发,4.其他)'
,
`paperNum`
tinyint
(
4
)
DEFAULT
'1'
COMMENT
'纸质材料份数'
,
`paperGg`
varchar
(
32
)
COMMENT
'纸质材料规格'
,
`jianmMs`
varchar
(
32
)
DEFAULT
'1'
COMMENT
'减免模式(1.无,2.减,3.免)'
,
`sealWay`
varchar
(
32
)
COMMENT
'盖章方式'
,
`isjianm`
varchar
(
32
)
DEFAULT
'1'
COMMENT
'是否减免(0.否,1.是)'
,
`isLack`
varchar
(
32
)
DEFAULT
'1'
COMMENT
'材料是否容缺(1.必要,2.非必要)'
,
`ybUrl`
varchar
(
512
)
COMMENT
'材料地址'
,
`materialSourceSm`
varchar
(
512
)
COMMENT
'来源渠道说明'
,
`remarkSub`
text
COMMENT
'填报须知'
,
`clauseContent`
text
COMMENT
'要求提供材料的依据'
,
`summary`
text
COMMENT
'受理标准'
,
`remark`
varchar
(
512
)
COMMENT
'备注'
,
`source`
tinyint
(
2
)
DEFAULT
'0'
COMMENT
'事项来源(0.政务网,1.自定义)'
,
`createTime`
datetime
COMMENT
'创建时间'
,
`createUserId`
bigint
(
20
)
COMMENT
'创建用户'
,
`updateTime`
datetime
COMMENT
'修改时间'
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COMMENT
=
'事项申请材料业务'
;
-- ----------------------------
-- 材料附件业务表
-- ----------------------------
DROP
TABLE
IF
EXISTS
`mortals_sys_matter_datum_file`
;
CREATE
TABLE
mortals_sys_matter_datum_file
(
`id`
bigint
(
20
)
AUTO_INCREMENT
COMMENT
'主键,自增长'
,
`datumId`
bigint
(
20
)
NOT
NULL
COMMENT
'材料id'
,
`matterId`
bigint
(
20
)
COMMENT
'事项基础表matter id'
,
`matterCode`
varchar
(
512
)
COMMENT
'事项编码'
,
`materialName`
varchar
(
1024
)
NOT
NULL
COMMENT
'材料名'
,
`fileName`
varchar
(
255
)
COMMENT
'附件名称'
,
`fileUrl`
varchar
(
255
)
COMMENT
'附件下载地址'
,
`filetype`
tinyint
(
2
)
DEFAULT
'1'
COMMENT
'附件类型 (1.示例样表,2.空白表格)'
,
`source`
tinyint
(
2
)
DEFAULT
'0'
COMMENT
'附件来源 (0.政务网,1.自定义)'
,
`localFileUrl`
varchar
(
255
)
COMMENT
'本地文件地址'
,
`previewUrl`
varchar
(
255
)
COMMENT
'文件预览地址'
,
`createTime`
datetime
COMMENT
'创建时间'
,
`createUserId`
bigint
(
20
)
COMMENT
'创建用户'
,
`updateTime`
datetime
COMMENT
'修改时间'
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COMMENT
=
'材料附件业务'
;
-- ----------------------------
-- 站点材料公共库表
-- ----------------------------
DROP
TABLE
IF
EXISTS
`mortals_sys_datum_library`
;
CREATE
TABLE
mortals_sys_datum_library
(
`id`
bigint
(
20
)
AUTO_INCREMENT
COMMENT
'主键,自增长'
,
`siteId`
bigint
(
20
)
COMMENT
'站点id'
,
`siteName`
varchar
(
255
)
COMMENT
'站点名称'
,
`datumId`
bigint
(
20
)
COMMENT
'材料id'
,
`matterId`
bigint
(
20
)
COMMENT
'事项基础表matter id'
,
`matterCode`
varchar
(
512
)
COMMENT
'事项编码'
,
`matterName`
varchar
(
1024
)
COMMENT
'事项名称'
,
`materialName`
varchar
(
1024
)
NOT
NULL
COMMENT
'材料名'
,
`isMust`
varchar
(
32
)
DEFAULT
'1'
COMMENT
'必交性(1.非必要,2.必要,3.必要|容缺后补,4.非必要|容缺后补)'
,
`materialType`
varchar
(
32
)
DEFAULT
'1'
COMMENT
'材料类型(1.无,2.原件,3.复印件,4.原件和复印件)'
,
`materialProperty`
varchar
(
32
)
DEFAULT
'1'
COMMENT
'材料形式(1.纸质,2.电子,3.纸质|电子)'
,
`electronicgs`
varchar
(
32
)
DEFAULT
'1'
COMMENT
'电子材料格式(1.无,2.不限,3.jpg,4.jpeg,5.pdf,6.word,7.pdf,jpg,jpeg,8.pdf,jpg)'
,
`materialSource`
varchar
(
32
)
DEFAULT
'1'
COMMENT
'材料来源渠道(1.无,2.申请人自备,3.政府部门核发,4.其他)'
,
`paperNum`
tinyint
(
4
)
DEFAULT
'1'
COMMENT
'纸质材料份数'
,
`paperGg`
varchar
(
32
)
COMMENT
'纸质材料规格'
,
`jianmMs`
varchar
(
32
)
DEFAULT
'1'
COMMENT
'减免模式(1.无,2.减,3.免)'
,
`sealWay`
varchar
(
32
)
COMMENT
'盖章方式'
,
`isjianm`
varchar
(
32
)
DEFAULT
'1'
COMMENT
'是否减免(0.否,1.是)'
,
`isLack`
varchar
(
32
)
DEFAULT
'1'
COMMENT
'材料是否容缺(1.必要,2.非必要)'
,
`ybUrl`
varchar
(
512
)
COMMENT
'材料地址'
,
`materialSourceSm`
varchar
(
512
)
COMMENT
'来源渠道说明'
,
`remarkSub`
text
COMMENT
'填报须知'
,
`clauseContent`
text
COMMENT
'要求提供材料的依据'
,
`summary`
text
COMMENT
'受理标准'
,
`remark`
varchar
(
512
)
COMMENT
'备注'
,
`source`
tinyint
(
2
)
DEFAULT
'0'
COMMENT
'事项来源(0.政务网,1.自定义)'
,
`createTime`
datetime
COMMENT
'创建时间'
,
`createUserId`
bigint
(
20
)
COMMENT
'创建用户'
,
`updateTime`
datetime
COMMENT
'修改时间'
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COMMENT
=
'站点材料公共库'
;
sst-manager/doc/api.md
View file @
f51ac288
This diff is collapsed.
Click to expand it.
sst-manager/src/main/java/com/mortals/xhx/module/sst/dao/SstAppsDeskDao.java
0 → 100644
View file @
f51ac288
package
com.mortals.xhx.module.sst.dao
;
import
com.mortals.framework.dao.ICRUDDao
;
import
com.mortals.xhx.module.sst.model.SstAppsDeskEntity
;
import
java.util.List
;
/**
* 桌面终端应用编排Dao
* 桌面终端应用编排 DAO接口
*
* @author zxfei
* @date 2023-04-09
*/
public
interface
SstAppsDeskDao
extends
ICRUDDao
<
SstAppsDeskEntity
,
Long
>{
}
sst-manager/src/main/java/com/mortals/xhx/module/sst/dao/ibatis/SstAppsDeskDaoImpl.java
0 → 100644
View file @
f51ac288
package
com.mortals.xhx.module.sst.dao.ibatis
;
import
org.springframework.stereotype.Repository
;
import
com.mortals.xhx.module.sst.dao.SstAppsDeskDao
;
import
com.mortals.xhx.module.sst.model.SstAppsDeskEntity
;
import
java.util.Date
;
import
com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis
;
import
java.util.List
;
/**
* 桌面终端应用编排DaoImpl DAO接口
*
* @author zxfei
* @date 2023-04-09
*/
@Repository
(
"sstAppsDeskDao"
)
public
class
SstAppsDeskDaoImpl
extends
BaseCRUDDaoMybatis
<
SstAppsDeskEntity
,
Long
>
implements
SstAppsDeskDao
{
}
sst-manager/src/main/java/com/mortals/xhx/module/sst/model/SstAppsDeskEntity.java
0 → 100644
View file @
f51ac288
package
com.mortals.xhx.module.sst.model
;
import
java.util.List
;
import
java.util.ArrayList
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.mortals.framework.annotation.Excel
;
import
com.mortals.framework.model.BaseEntityLong
;
import
com.mortals.xhx.module.sst.model.vo.SstAppsDeskVo
;
/**
* 桌面终端应用编排实体对象
*
* @author zxfei
* @date 2023-04-09
*/
public
class
SstAppsDeskEntity
extends
SstAppsDeskVo
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 站点id
*/
private
Long
siteId
;
/**
* 应用id
*/
private
Long
appId
;
/**
* 应用名称
*/
private
String
name
;
/**
* 应用描述
*/
private
String
describe
;
/**
* 应用访问地址
*/
private
String
url
;
/**
* 是否展示基础应用1是0否
*/
private
Integer
showBasic
;
/**
* 基础应用排序号
*/
private
Integer
basicSort
;
/**
* 是否展示热门应用1是0否
*/
private
Integer
showHot
;
/**
* 热门应用排序号
*/
private
Integer
hotSort
;
public
SstAppsDeskEntity
(){}
/**
* 获取 站点id
* @return Long
*/
public
Long
getSiteId
(){
return
siteId
;
}
/**
* 设置 站点id
* @param siteId
*/
public
void
setSiteId
(
Long
siteId
){
this
.
siteId
=
siteId
;
}
/**
* 获取 应用id
* @return Long
*/
public
Long
getAppId
(){
return
appId
;
}
/**
* 设置 应用id
* @param appId
*/
public
void
setAppId
(
Long
appId
){
this
.
appId
=
appId
;
}
/**
* 获取 应用名称
* @return String
*/
public
String
getName
(){
return
name
;
}
/**
* 设置 应用名称
* @param name
*/
public
void
setName
(
String
name
){
this
.
name
=
name
;
}
/**
* 获取 应用描述
* @return String
*/
public
String
getDescribe
(){
return
describe
;
}
/**
* 设置 应用描述
* @param describe
*/
public
void
setDescribe
(
String
describe
){
this
.
describe
=
describe
;
}
/**
* 获取 应用访问地址
* @return String
*/
public
String
getUrl
(){
return
url
;
}
/**
* 设置 应用访问地址
* @param url
*/
public
void
setUrl
(
String
url
){
this
.
url
=
url
;
}
/**
* 获取 是否展示基础应用1是0否
* @return Integer
*/
public
Integer
getShowBasic
(){
return
showBasic
;
}
/**
* 设置 是否展示基础应用1是0否
* @param showBasic
*/
public
void
setShowBasic
(
Integer
showBasic
){
this
.
showBasic
=
showBasic
;
}
/**
* 获取 基础应用排序号
* @return Integer
*/
public
Integer
getBasicSort
(){
return
basicSort
;
}
/**
* 设置 基础应用排序号
* @param basicSort
*/
public
void
setBasicSort
(
Integer
basicSort
){
this
.
basicSort
=
basicSort
;
}
/**
* 获取 是否展示热门应用1是0否
* @return Integer
*/
public
Integer
getShowHot
(){
return
showHot
;
}
/**
* 设置 是否展示热门应用1是0否
* @param showHot
*/
public
void
setShowHot
(
Integer
showHot
){
this
.
showHot
=
showHot
;
}
/**
* 获取 热门应用排序号
* @return Integer
*/
public
Integer
getHotSort
(){
return
hotSort
;
}
/**
* 设置 热门应用排序号
* @param hotSort
*/
public
void
setHotSort
(
Integer
hotSort
){
this
.
hotSort
=
hotSort
;
}
@Override
public
int
hashCode
()
{
return
this
.
getId
().
hashCode
();
}
@Override
public
boolean
equals
(
Object
obj
)
{
if
(
obj
==
null
)
return
false
;
if
(
obj
instanceof
SstAppsDeskEntity
)
{
SstAppsDeskEntity
tmp
=
(
SstAppsDeskEntity
)
obj
;
if
(
this
.
getId
()
==
tmp
.
getId
())
{
return
true
;
}
}
return
false
;
}
public
String
toString
(){
StringBuilder
sb
=
new
StringBuilder
(
""
);
sb
.
append
(
",siteId:"
).
append
(
getSiteId
());
sb
.
append
(
",appId:"
).
append
(
getAppId
());
sb
.
append
(
",name:"
).
append
(
getName
());
sb
.
append
(
",describe:"
).
append
(
getDescribe
());
sb
.
append
(
",url:"
).
append
(
getUrl
());
sb
.
append
(
",showBasic:"
).
append
(
getShowBasic
());
sb
.
append
(
",basicSort:"
).
append
(
getBasicSort
());
sb
.
append
(
",showHot:"
).
append
(
getShowHot
());
sb
.
append
(
",hotSort:"
).
append
(
getHotSort
());
return
sb
.
toString
();
}
public
void
initAttrValue
(){
this
.
siteId
=
null
;
this
.
appId
=
null
;
this
.
name
=
""
;
this
.
describe
=
""
;
this
.
url
=
""
;
this
.
showBasic
=
1
;
this
.
basicSort
=
null
;
this
.
showHot
=
1
;
this
.
hotSort
=
null
;
}
}
\ No newline at end of file
sst-manager/src/main/java/com/mortals/xhx/module/sst/model/SstAppsDeskQuery.java
0 → 100644
View file @
f51ac288
This diff is collapsed.
Click to expand it.
sst-manager/src/main/java/com/mortals/xhx/module/sst/model/vo/SstAppsDeskVo.java
0 → 100644
View file @
f51ac288
package
com.mortals.xhx.module.sst.model.vo
;
import
com.mortals.framework.model.BaseEntityLong
;
import
com.mortals.xhx.module.sst.model.SstAppsDeskEntity
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* 桌面终端应用编排视图对象
*
* @author zxfei
* @date 2023-04-09
*/
public
class
SstAppsDeskVo
extends
BaseEntityLong
{
}
\ No newline at end of file
sst-manager/src/main/java/com/mortals/xhx/module/sst/model/vo/SstBasicVo.java
View file @
f51ac288
...
...
@@ -16,6 +16,11 @@ public class SstBasicVo extends BaseEntityLong {
/** 热门应用 */
private
String
hotAppIds
;
/** 桌面展示的应用 */
private
String
deskShowAppIds
;
/** 桌面热门应用 */
private
String
deskHotAppIds
;
public
String
getShowAppIds
()
{
return
showAppIds
;
}
...
...
@@ -31,4 +36,20 @@ public class SstBasicVo extends BaseEntityLong {
public
void
setHotAppIds
(
String
hotAppIds
)
{
this
.
hotAppIds
=
hotAppIds
;
}
public
String
getDeskShowAppIds
()
{
return
deskShowAppIds
;
}
public
void
setDeskShowAppIds
(
String
deskShowAppIds
)
{
this
.
deskShowAppIds
=
deskShowAppIds
;
}
public
String
getDeskHotAppIds
()
{
return
deskHotAppIds
;
}
public
void
setDeskHotAppIds
(
String
deskHotAppIds
)
{
this
.
deskHotAppIds
=
deskHotAppIds
;
}
}
\ No newline at end of file
sst-manager/src/main/java/com/mortals/xhx/module/sst/service/SstAppsDeskService.java
0 → 100644
View file @
f51ac288
package
com.mortals.xhx.module.sst.service
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.service.ICRUDService
;
import
com.mortals.xhx.module.sst.model.SstAppsDeskEntity
;
import
java.util.Map
;
/**
* SstAppsDeskService
*
* 桌面终端应用编排 service接口
*
* @author zxfei
* @date 2023-04-09
*/
public
interface
SstAppsDeskService
extends
ICRUDService
<
SstAppsDeskEntity
,
Long
>{
/**
* 获取站点应用列表
* @param siteId
* @return
*/
Map
<
String
,
Object
>
getAppsBySiteId
(
Long
siteId
)
throws
AppException
;
/**
* 保存基础设置
* @param showAppIds
* @param hotAppIds
* @throws AppException
*/
void
settingSave
(
Long
siteId
,
String
showAppIds
,
String
hotAppIds
,
Context
context
)
throws
AppException
;
/***
* 获取站点热门应用or展示应用
* @param siteId 站点ID
* @return
*/
Map
<
String
,
Object
>
getAppListBySite
(
Long
siteId
,
String
host
);
/**
* 应用下架
* @param appId
* @param userId
*/
void
forbidden
(
Long
appId
,
Long
userId
);
}
\ No newline at end of file
sst-manager/src/main/java/com/mortals/xhx/module/sst/service/impl/SstAppsDeskServiceImpl.java
0 → 100644
View file @
f51ac288
package
com.mortals.xhx.module.sst.service.impl
;
import
com.mortals.framework.util.DataUtil
;
import
com.mortals.xhx.common.utils.StringUtils
;
import
com.mortals.xhx.module.apps.model.AppsInfoEntity
;
import
com.mortals.xhx.module.apps.service.AppsInfoService
;
import
com.mortals.xhx.module.sst.model.SstAppsDeskEntity
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.model.Context
;
import
com.mortals.xhx.module.sst.dao.SstAppsDeskDao
;
import
com.mortals.xhx.module.sst.model.SstAppsDeskEntity
;
import
com.mortals.xhx.module.sst.service.SstAppsDeskService
;
import
java.util.*
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
/**
* SstAppsDeskService
* 桌面终端应用编排 service实现
*
* @author zxfei
* @date 2023-04-09
*/
@Service
(
"sstAppsDeskService"
)
public
class
SstAppsDeskServiceImpl
extends
AbstractCRUDServiceImpl
<
SstAppsDeskDao
,
SstAppsDeskEntity
,
Long
>
implements
SstAppsDeskService
{
@Autowired
private
AppsInfoService
appsInfoService
;
@Override
public
Map
<
String
,
Object
>
getAppsBySiteId
(
Long
siteId
)
throws
AppException
{
if
(
siteId
==
null
){
throw
new
AppException
(
"站点id不能为空"
);
}
AppsInfoEntity
appsInfoQuery
=
new
AppsInfoEntity
();
appsInfoQuery
.
setSiteId
(
siteId
);
List
<
AppsInfoEntity
>
allApps
=
appsInfoService
.
find
(
appsInfoQuery
);
SstAppsDeskEntity
query
=
new
SstAppsDeskEntity
();
Map
<
String
,
String
>
orderCols
=
new
HashMap
<>();
orderCols
.
put
(
"basicSort"
,
"DESC"
);
query
.
setOrderCols
(
orderCols
);
query
.
setSiteId
(
siteId
);
List
<
SstAppsDeskEntity
>
appsEntities
=
this
.
find
(
query
);
Map
<
String
,
Object
>
siteApp
=
new
HashMap
<>();
siteApp
.
put
(
"allApps"
,
allApps
);
if
(
CollectionUtils
.
isNotEmpty
(
appsEntities
)){
List
<
SstAppsDeskEntity
>
showApps
=
new
ArrayList
<>();
List
<
SstAppsDeskEntity
>
hotApps
=
new
ArrayList
<>();
for
(
SstAppsDeskEntity
SstAppsDeskEntity:
appsEntities
){
if
(
SstAppsDeskEntity
.
getShowBasic
()==
1
){
showApps
.
add
(
SstAppsDeskEntity
);
}
if
(
SstAppsDeskEntity
.
getShowHot
()==
1
){
hotApps
.
add
(
SstAppsDeskEntity
);
}
}
siteApp
.
put
(
"showApps"
,
showApps
);
siteApp
.
put
(
"hotApps"
,
hotApps
);
}
else
{
siteApp
.
put
(
"showApps"
,
Collections
.
emptyList
());
siteApp
.
put
(
"hotApps"
,
Collections
.
emptyList
());
}
return
siteApp
;
}
@Override
public
void
settingSave
(
Long
siteId
,
String
showAppIds
,
String
hotAppIds
,
Context
context
)
throws
AppException
{
Map
<
Long
,
SstAppsDeskEntity
>
sstAppIds
=
new
HashMap
<>();
if
(
StringUtils
.
isNotEmpty
(
showAppIds
)){
String
appIds
[]
=
showAppIds
.
split
(
","
);
int
sort
=
99
;
for
(
String
id:
appIds
){
Long
appId
=
DataUtil
.
converStr2Long
(
id
,
0
l
);
AppsInfoEntity
appsInfoEntity
=
appsInfoService
.
get
(
appId
);
if
(
appsInfoEntity
!=
null
)
{
SstAppsDeskEntity
SstAppsDeskEntity
=
new
SstAppsDeskEntity
();
SstAppsDeskEntity
.
setSiteId
(
siteId
);
SstAppsDeskEntity
.
setAppId
(
appId
);
SstAppsDeskEntity
.
setName
(
appsInfoEntity
.
getName
());
SstAppsDeskEntity
.
setDescribe
(
appsInfoEntity
.
getDescribe
());
SstAppsDeskEntity
.
setUrl
(
appsInfoEntity
.
getUrl
());
SstAppsDeskEntity
.
setShowBasic
(
1
);
SstAppsDeskEntity
.
setBasicSort
(
sort
);
SstAppsDeskEntity
.
setShowHot
(
0
);
SstAppsDeskEntity
.
setHotSort
(
0
);
if
(
context
!=
null
){
SstAppsDeskEntity
.
setCreateUserId
(
context
.
getUser
().
getId
());
SstAppsDeskEntity
.
setCreateTime
(
new
Date
());
}
sstAppIds
.
put
(
appId
,
SstAppsDeskEntity
);
sort
--;
}
}
}
if
(
StringUtils
.
isNotEmpty
(
hotAppIds
)){
String
appIds
[]
=
hotAppIds
.
split
(
","
);
int
sort
=
99
;
for
(
String
id:
appIds
){
Long
appId
=
DataUtil
.
converStr2Long
(
id
,
0
l
);
if
(
sstAppIds
.
containsKey
(
appId
)){
sstAppIds
.
get
(
appId
).
setShowHot
(
1
);
sstAppIds
.
get
(
appId
).
setHotSort
(
sort
);
sort
--;
}
else
{
AppsInfoEntity
appsInfoEntity
=
appsInfoService
.
get
(
appId
);
if
(
appsInfoEntity
!=
null
)
{
SstAppsDeskEntity
SstAppsDeskEntity
=
new
SstAppsDeskEntity
();
SstAppsDeskEntity
.
setSiteId
(
siteId
);
SstAppsDeskEntity
.
setAppId
(
appId
);
SstAppsDeskEntity
.
setName
(
appsInfoEntity
.
getName
());
SstAppsDeskEntity
.
setDescribe
(
appsInfoEntity
.
getDescribe
());
SstAppsDeskEntity
.
setUrl
(
appsInfoEntity
.
getUrl
());
SstAppsDeskEntity
.
setShowBasic
(
0
);
SstAppsDeskEntity
.
setBasicSort
(
0
);
SstAppsDeskEntity
.
setShowHot
(
1
);
SstAppsDeskEntity
.
setHotSort
(
sort
);
if
(
context
!=
null
)
{
SstAppsDeskEntity
.
setCreateUserId
(
context
.
getUser
().
getId
());
SstAppsDeskEntity
.
setCreateTime
(
new
Date
());
}
sstAppIds
.
put
(
appId
,
SstAppsDeskEntity
);
sort
--;
}
}
}
}
Map
<
String
,
Object
>
condition
=
new
HashMap
<>();
condition
.
put
(
"siteId"
,
siteId
);
this
.
dao
.
delete
(
condition
);
if
(
sstAppIds
.
size
()>
0
){
List
<
SstAppsDeskEntity
>
list
=
sstAppIds
.
values
().
stream
().
collect
(
Collectors
.
toList
());
this
.
dao
.
insertBatch
(
list
);
}
}
@Override
public
Map
<
String
,
Object
>
getAppListBySite
(
Long
siteId
,
String
host
)
{
SstAppsDeskEntity
query
=
new
SstAppsDeskEntity
();
Map
<
String
,
String
>
orderCols
=
new
HashMap
<>();
orderCols
.
put
(
"basicSort"
,
"DESC"
);
query
.
setOrderCols
(
orderCols
);
query
.
setSiteId
(
siteId
);
List
<
SstAppsDeskEntity
>
appsEntities
=
this
.
find
(
query
);
AppsInfoEntity
appsInfoQuery
=
new
AppsInfoEntity
();
appsInfoQuery
.
setSiteId
(
siteId
);
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
<
String
,
Object
>
siteApp
=
new
HashMap
<>();
siteApp
.
put
(
"allApps"
,
allApps
);
if
(
CollectionUtils
.
isNotEmpty
(
appsEntities
)){
List
<
AppsInfoEntity
>
showApps
=
new
ArrayList
<>();
List
<
AppsInfoEntity
>
hotApps
=
new
ArrayList
<>();
for
(
SstAppsDeskEntity
SstAppsDeskEntity:
appsEntities
){
if
(
SstAppsDeskEntity
.
getShowBasic
()==
1
){
showApps
.
add
(
appInfoMap
.
get
(
SstAppsDeskEntity
.
getAppId
()));
}
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
;
}
@Override
public
void
forbidden
(
Long
appId
,
Long
userId
)
{
Map
<
String
,
Object
>
condition
=
new
HashMap
<>();
condition
.
put
(
"appId"
,
appId
);
this
.
dao
.
delete
(
condition
);
}
}
\ No newline at end of file
sst-manager/src/main/java/com/mortals/xhx/module/sst/web/SstAppsDeskController.java
0 → 100644
View file @
f51ac288
package
com.mortals.xhx.module.sst.web
;
import
com.mortals.framework.common.Rest
;
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.model.SstAppsEntity
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
com.mortals.framework.model.Context
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.xhx.module.sst.model.SstAppsDeskEntity
;
import
com.mortals.xhx.module.sst.service.SstAppsDeskService
;
import
org.apache.commons.lang3.ArrayUtils
;
import
com.mortals.framework.util.StringUtils
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
com.alibaba.fastjson.JSONObject
;
import
java.util.Arrays
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
static
com
.
mortals
.
framework
.
ap
.
SysConstains
.*;
/**
*
* 桌面终端应用编排
*
* @author zxfei
* @date 2023-04-09
*/
@RestController
@RequestMapping
(
"sst/apps/desk"
)
public
class
SstAppsDeskController
extends
BaseCRUDJsonBodyMappingController
<
SstAppsDeskService
,
SstAppsDeskEntity
,
Long
>
{
@Autowired
private
ParamService
paramService
;
public
SstAppsDeskController
(){
super
.
setModuleDesc
(
"桌面终端应用编排"
);
}
@Override
protected
void
init
(
Map
<
String
,
Object
>
model
,
Context
context
)
{
this
.
addDict
(
model
,
"showBasic"
,
paramService
.
getParamBySecondOrganize
(
"SstApps"
,
"showBasic"
));
this
.
addDict
(
model
,
"showHot"
,
paramService
.
getParamBySecondOrganize
(
"SstApps"
,
"showHot"
));
super
.
init
(
model
,
context
);
}
@PostMapping
({
"forbidden"
})
public
Rest
<
Object
>
forbidden
(
@RequestBody
SstAppsDeskEntity
entity
)
{
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
{
this
.
service
.
forbidden
(
entity
.
getAppId
(),
user
.
getId
());
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
;
}
}
\ No newline at end of file
sst-manager/src/main/java/com/mortals/xhx/module/sst/web/SstBasicController.java
View file @
f51ac288
...
...
@@ -17,6 +17,7 @@ import com.mortals.xhx.feign.base.pdu.SitePdu;
import
com.mortals.xhx.feign.rsp.ApiResp
;
import
com.mortals.xhx.feign.site.ISiteFeign
;
import
com.mortals.xhx.module.sst.model.SstAppsEntity
;
import
com.mortals.xhx.module.sst.service.SstAppsDeskService
;
import
com.mortals.xhx.module.sst.service.SstAppsService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.ObjectUtils
;
...
...
@@ -58,6 +59,9 @@ public class SstBasicController extends BaseCRUDJsonBodyMappingController<SstBas
@Autowired
private
SstAppsService
sstAppsService
;
@Autowired
private
SstAppsDeskService
sstAppsDeskService
;
@Autowired
private
ISiteFeign
iSiteFeign
;
...
...
@@ -84,10 +88,14 @@ public class SstBasicController extends BaseCRUDJsonBodyMappingController<SstBas
try
{
SstBasicEntity
sstBasic
=
this
.
service
.
getBasicBySiteId
(
query
.
getSiteId
());
Map
<
String
,
Object
>
sstApps
=
sstAppsService
.
getAppsBySiteId
(
query
.
getSiteId
());
Map
<
String
,
Object
>
sstAppsDesk
=
sstAppsDeskService
.
getAppsBySiteId
(
query
.
getSiteId
());
model
.
put
(
"basicInfo"
,
sstBasic
);
model
.
put
(
"showApps"
,
sstApps
.
get
(
"showApps"
));
model
.
put
(
"hotApps"
,
sstApps
.
get
(
"hotApps"
));
model
.
put
(
"allApps"
,
sstApps
.
get
(
"allApps"
));
model
.
put
(
"showAppsDesk"
,
sstAppsDesk
.
get
(
"showApps"
));
model
.
put
(
"hotAppsDesk"
,
sstAppsDesk
.
get
(
"hotApps"
));
model
.
put
(
"allAppsDesk"
,
sstAppsDesk
.
get
(
"allApps"
));
model
.
put
(
"message_info"
,
busiDesc
+
"成功"
);
this
.
recordSysLog
(
this
.
request
,
busiDesc
+
" 【成功】"
);
}
catch
(
Exception
var9
)
{
...
...
@@ -115,6 +123,7 @@ public class SstBasicController extends BaseCRUDJsonBodyMappingController<SstBas
try
{
this
.
service
.
settingSave
(
basicEntity
,
this
.
getContext
());
this
.
sstAppsService
.
settingSave
(
basicEntity
.
getSiteId
(),
basicEntity
.
getShowAppIds
(),
basicEntity
.
getHotAppIds
(),
this
.
getContext
());
this
.
sstAppsDeskService
.
settingSave
(
basicEntity
.
getSiteId
(),
basicEntity
.
getDeskShowAppIds
(),
basicEntity
.
getDeskHotAppIds
(),
this
.
getContext
());
model
.
put
(
"message_info"
,
busiDesc
+
"成功"
);
this
.
recordSysLog
(
this
.
request
,
busiDesc
+
" 【成功】"
);
}
catch
(
Exception
var9
)
{
...
...
@@ -235,6 +244,10 @@ public class SstBasicController extends BaseCRUDJsonBodyMappingController<SstBas
model
.
put
(
"showApps"
,
sstApps
.
get
(
"showApps"
));
model
.
put
(
"hotApps"
,
sstApps
.
get
(
"hotApps"
));
model
.
put
(
"allApps"
,
sstApps
.
get
(
"allApps"
));
Map
<
String
,
Object
>
sstAppsDesk
=
sstAppsDeskService
.
getAppListBySite
(
query
.
getSiteId
(),
host
);
model
.
put
(
"showAppsDesk"
,
sstAppsDesk
.
get
(
"showApps"
));
model
.
put
(
"hotAppsDesk"
,
sstAppsDesk
.
get
(
"hotApps"
));
model
.
put
(
"allAppsDesk"
,
sstAppsDesk
.
get
(
"allApps"
));
model
.
put
(
"message_info"
,
busiDesc
+
"成功"
);
this
.
recordSysLog
(
this
.
request
,
busiDesc
+
" 【成功】"
);
}
catch
(
Exception
var9
)
{
...
...
sst-manager/src/main/resources/sqlmap/module/sst/SstAppsDeskMapper.xml
0 → 100644
View file @
f51ac288
This diff is collapsed.
Click to expand it.
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