Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_gov_platform
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
赵啸非
smart_gov_platform
Commits
12933106
Commit
12933106
authored
Aug 29, 2023
by
廖旭伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
基础设置平台模块管理增加模块类型字段
parent
e0e14ff0
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
643 additions
and
338 deletions
+643
-338
base-manager/db/add.sql
base-manager/db/add.sql
+5
-0
base-manager/doc/基础服务平台设计文档1.0.docx
base-manager/doc/基础服务平台设计文档1.0.docx
+0
-0
base-manager/src/main/java/com/mortals/xhx/common/code/ModelTypeEnum.java
.../main/java/com/mortals/xhx/common/code/ModelTypeEnum.java
+67
-0
base-manager/src/main/java/com/mortals/xhx/module/model/model/ModelEntity.java
.../java/com/mortals/xhx/module/model/model/ModelEntity.java
+21
-10
base-manager/src/main/java/com/mortals/xhx/module/model/model/ModelQuery.java
...n/java/com/mortals/xhx/module/model/model/ModelQuery.java
+95
-1
base-manager/src/main/java/com/mortals/xhx/module/model/web/ModelController.java
...ava/com/mortals/xhx/module/model/web/ModelController.java
+16
-5
base-manager/src/main/resources/sqlmap/module/model/ModelMapper.xml
...er/src/main/resources/sqlmap/module/model/ModelMapper.xml
+439
-322
No files found.
base-manager/db/add.sql
View file @
12933106
...
@@ -192,3 +192,8 @@ PRIMARY KEY (`id`)
...
@@ -192,3 +192,8 @@ PRIMARY KEY (`id`)
ALTER
TABLE
mortals_sys_app_category
ADD
COLUMN
`cover`
varchar
(
256
)
DEFAULT
''
COMMENT
'封面'
AFTER
sort
;
ALTER
TABLE
mortals_sys_app_category
ADD
COLUMN
`cover`
varchar
(
256
)
DEFAULT
''
COMMENT
'封面'
AFTER
sort
;
ALTER
TABLE
mortals_sys_app_category
ADD
COLUMN
`remark`
varchar
(
256
)
DEFAULT
''
COMMENT
'备注'
AFTER
cover
;
ALTER
TABLE
mortals_sys_app_category
ADD
COLUMN
`remark`
varchar
(
256
)
DEFAULT
''
COMMENT
'备注'
AFTER
cover
;
-- ----------------------------
2023
-
08
-
29
-- ----------------------------
ALTER
TABLE
`mortals_sys_model`
ADD
COLUMN
`type`
tinyint
(
2
)
DEFAULT
'1'
COMMENT
'模块分类'
AFTER
`sort`
;
\ No newline at end of file
base-manager/doc/基础服务平台设计文档1.0.docx
View file @
12933106
No preview for this file type
base-manager/src/main/java/com/mortals/xhx/common/code/ModelTypeEnum.java
0 → 100644
View file @
12933106
package
com.mortals.xhx.common.code
;
import
com.mortals.framework.ap.SysConstains
;
import
com.mortals.framework.common.IBaseEnum
;
import
java.util.LinkedHashMap
;
import
java.util.Map
;
public
enum
ModelTypeEnum
implements
IBaseEnum
{
JC
(
1
,
"平台基础能力"
,
SysConstains
.
STYLE_DEFAULT
),
G2G
(
2
,
"G2G:政府面向政府"
,
SysConstains
.
STYLE_DEFAULT
),
G2C
(
3
,
"G2C:政府面向公民"
,
SysConstains
.
STYLE_DEFAULT
),
;
private
int
value
;
private
String
desc
;
private
String
style
;
ModelTypeEnum
(
int
value
,
String
desc
,
String
style
)
{
this
.
value
=
value
;
this
.
desc
=
desc
;
this
.
style
=
style
;
}
@Override
public
int
getValue
()
{
return
this
.
value
;
}
@Override
public
String
getDesc
()
{
return
this
.
desc
;
}
@Override
public
String
getStyle
()
{
return
this
.
style
;
}
public
static
ModelTypeEnum
getByValue
(
int
value
)
{
for
(
ModelTypeEnum
e
:
ModelTypeEnum
.
values
())
{
if
(
e
.
getValue
()
==
value
)
{
return
e
;
}
}
return
null
;
}
public
static
Map
<
String
,
String
>
getEnumMap
(
int
...
eItem
)
{
Map
<
String
,
String
>
resultMap
=
new
LinkedHashMap
<
String
,
String
>();
for
(
ModelTypeEnum
item
:
ModelTypeEnum
.
values
())
{
try
{
boolean
hasE
=
false
;
for
(
int
e
:
eItem
){
if
(
item
.
getValue
()==
e
){
hasE
=
true
;
break
;
}
}
if
(!
hasE
){
resultMap
.
put
(
item
.
getValue
()+
""
,
item
.
getDesc
());
}
}
catch
(
Exception
ex
){
}
}
return
resultMap
;
}
}
\ No newline at end of file
base-manager/src/main/java/com/mortals/xhx/module/model/model/ModelEntity.java
View file @
12933106
package
com.mortals.xhx.module.model.model
;
package
com.mortals.xhx.module.model.model
;
import
java.util.List
;
import
java.util.ArrayList
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.databind.annotation.JsonSerialize
;
import
com.mortals.framework.annotation.Excel
;
import
com.mortals.framework.model.BaseEntityLong
;
import
com.mortals.xhx.module.model.model.vo.ModelVo
;
import
com.mortals.xhx.module.model.model.vo.ModelVo
;
/**
/**
* 模块实体对象
* 模块实体对象
...
@@ -45,7 +38,10 @@ public class ModelEntity extends ModelVo {
...
@@ -45,7 +38,10 @@ public class ModelEntity extends ModelVo {
@JSONField
(
serialize
=
false
)
@JSONField
(
serialize
=
false
)
private
Integer
sort
;
private
Integer
sort
;
/**
* 模块分类
*/
private
Integer
type
;
public
ModelEntity
(){}
public
ModelEntity
(){}
/**
/**
...
@@ -133,8 +129,20 @@ public class ModelEntity extends ModelVo {
...
@@ -133,8 +129,20 @@ public class ModelEntity extends ModelVo {
this
.
sort
=
sort
;
this
.
sort
=
sort
;
}
}
/**
* 获取 模块分类
* @return Integer
*/
public
Integer
getType
()
{
return
type
;
}
/**
* 设置 模块分类
* @param type
*/
public
void
setType
(
Integer
type
)
{
this
.
type
=
type
;
}
@Override
@Override
public
int
hashCode
()
{
public
int
hashCode
()
{
...
@@ -160,6 +168,7 @@ public class ModelEntity extends ModelVo {
...
@@ -160,6 +168,7 @@ public class ModelEntity extends ModelVo {
sb
.
append
(
",modelUrl:"
).
append
(
getModelUrl
());
sb
.
append
(
",modelUrl:"
).
append
(
getModelUrl
());
sb
.
append
(
",remark:"
).
append
(
getRemark
());
sb
.
append
(
",remark:"
).
append
(
getRemark
());
sb
.
append
(
",sort:"
).
append
(
getSort
());
sb
.
append
(
",sort:"
).
append
(
getSort
());
sb
.
append
(
",type:"
).
append
(
getType
());
return
sb
.
toString
();
return
sb
.
toString
();
}
}
...
@@ -176,5 +185,7 @@ public class ModelEntity extends ModelVo {
...
@@ -176,5 +185,7 @@ public class ModelEntity extends ModelVo {
this
.
remark
=
null
;
this
.
remark
=
null
;
this
.
sort
=
0
;
this
.
sort
=
0
;
this
.
type
=
1
;
}
}
}
}
\ No newline at end of file
base-manager/src/main/java/com/mortals/xhx/module/model/model/ModelQuery.java
View file @
12933106
package
com.mortals.xhx.module.model.model
;
package
com.mortals.xhx.module.model.model
;
import
java.util.List
;
import
java.util.List
;
import
com.mortals.xhx.module.model.model.ModelEntity
;
/**
/**
* 模块查询对象
* 模块查询对象
*
*
...
@@ -72,6 +71,21 @@ public class ModelQuery extends ModelEntity {
...
@@ -72,6 +71,21 @@ public class ModelQuery extends ModelEntity {
/** 结束 修改时间 */
/** 结束 修改时间 */
private
String
updateTimeEnd
;
private
String
updateTimeEnd
;
/** 开始 模块分类 */
private
Integer
typeStart
;
/** 结束 模块分类 */
private
Integer
typeEnd
;
/** 增加 模块分类 */
private
Integer
typeIncrement
;
/** 模块分类列表 */
private
List
<
Integer
>
typeList
;
/** 模块分类排除列表 */
private
List
<
Integer
>
typeNotList
;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private
List
<
ModelQuery
>
orConditionList
;
private
List
<
ModelQuery
>
orConditionList
;
...
@@ -551,6 +565,86 @@ public class ModelQuery extends ModelEntity {
...
@@ -551,6 +565,86 @@ public class ModelQuery extends ModelEntity {
return
this
;
return
this
;
}
}
/**
* 获取 开始 模块分类
* @return typeStart
*/
public
Integer
getTypeStart
(){
return
this
.
typeStart
;
}
/**
* 设置 开始 模块分类
* @param typeStart
*/
public
void
setTypeStart
(
Integer
typeStart
){
this
.
typeStart
=
typeStart
;
}
/**
* 获取 结束 模块分类
* @return $typeEnd
*/
public
Integer
getTypeEnd
(){
return
this
.
typeEnd
;
}
/**
* 设置 结束 模块分类
* @param typeEnd
*/
public
void
setTypeEnd
(
Integer
typeEnd
){
this
.
typeEnd
=
typeEnd
;
}
/**
* 获取 增加 模块分类
* @return typeIncrement
*/
public
Integer
getTypeIncrement
(){
return
this
.
typeIncrement
;
}
/**
* 设置 增加 模块分类
* @param typeIncrement
*/
public
void
setTypeIncrement
(
Integer
typeIncrement
){
this
.
typeIncrement
=
typeIncrement
;
}
/**
* 获取 模块分类
* @return typeList
*/
public
List
<
Integer
>
getTypeList
(){
return
this
.
typeList
;
}
/**
* 设置 模块分类
* @param typeList
*/
public
void
setTypeList
(
List
<
Integer
>
typeList
){
this
.
typeList
=
typeList
;
}
/**
* 获取 模块分类
* @return typeNotList
*/
public
List
<
Integer
>
getTypeNotList
(){
return
this
.
typeNotList
;
}
/**
* 设置 模块分类
* @param typeNotList
*/
public
void
setTypeNotList
(
List
<
Integer
>
typeNotList
){
this
.
typeNotList
=
typeNotList
;
}
/**
/**
* 设置 排序
* 设置 排序
* @param sort
* @param sort
...
...
base-manager/src/main/java/com/mortals/xhx/module/model/web/ModelController.java
View file @
12933106
package
com.mortals.xhx.module.model.web
;
package
com.mortals.xhx.module.model.web
;
import
com.mortals.framework.annotation.UnAuth
;
import
com.mortals.framework.annotation.UnAuth
;
import
com.mortals.framework.common.IBaseEnum
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.model.OrderCol
;
import
com.mortals.framework.model.OrderCol
;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.framework.model.Result
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.framework.web.BasePhpCRUDJsonMappingController
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.common.code.ModelTypeEnum
;
import
com.mortals.xhx.module.model.model.ModelEntity
;
import
com.mortals.xhx.module.model.model.ModelEntity
;
import
com.mortals.xhx.module.model.model.ModelQuery
;
import
com.mortals.xhx.module.model.model.ModelQuery
;
import
com.mortals.xhx.module.model.service.ModelService
;
import
com.mortals.xhx.module.model.service.ModelService
;
import
com.mortals.xhx.module.window.model.WindowMatterEntity
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
...
@@ -24,6 +22,7 @@ import java.util.ArrayList;
...
@@ -24,6 +22,7 @@ import java.util.ArrayList;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
/**
* 模块
* 模块
...
@@ -55,6 +54,7 @@ public class ModelController extends BaseCRUDJsonBodyMappingController<ModelServ
...
@@ -55,6 +54,7 @@ public class ModelController extends BaseCRUDJsonBodyMappingController<ModelServ
@Override
@Override
protected
void
init
(
Map
<
String
,
Object
>
model
,
Context
context
)
{
protected
void
init
(
Map
<
String
,
Object
>
model
,
Context
context
)
{
this
.
addDict
(
model
,
"type"
,
IBaseEnum
.
getEnumMap
(
ModelTypeEnum
.
class
));
super
.
init
(
model
,
context
);
super
.
init
(
model
,
context
);
}
}
...
@@ -135,7 +135,18 @@ public class ModelController extends BaseCRUDJsonBodyMappingController<ModelServ
...
@@ -135,7 +135,18 @@ public class ModelController extends BaseCRUDJsonBodyMappingController<ModelServ
int
code
=
1
;
int
code
=
1
;
try
{
try
{
List
<
ModelEntity
>
result
=
this
.
getService
().
getListBySiteId
(
query
.
getSiteId
(),
query
.
getIsAdmin
());
List
<
ModelEntity
>
result
=
this
.
getService
().
getListBySiteId
(
query
.
getSiteId
(),
query
.
getIsAdmin
());
model
.
put
(
"data"
,
result
);
Map
<
Integer
,
List
<
ModelEntity
>>
groupMap
=
result
.
stream
().
collect
(
Collectors
.
groupingBy
(
t
->
t
.
getType
()));
List
<
Map
<
String
,
List
<
ModelEntity
>>>
mapList
=
new
ArrayList
<>();
Map
<
String
,
List
<
ModelEntity
>>
jcMap
=
new
HashMap
<>();
jcMap
.
put
(
ModelTypeEnum
.
JC
.
getDesc
(),
groupMap
.
get
(
ModelTypeEnum
.
JC
.
getValue
()));
mapList
.
add
(
jcMap
);
Map
<
String
,
List
<
ModelEntity
>>
g2gMap
=
new
HashMap
<>();
g2gMap
.
put
(
ModelTypeEnum
.
G2G
.
getDesc
(),
groupMap
.
get
(
ModelTypeEnum
.
G2G
.
getValue
()));
mapList
.
add
(
g2gMap
);
Map
<
String
,
List
<
ModelEntity
>>
g2cMap
=
new
HashMap
<>();
g2cMap
.
put
(
ModelTypeEnum
.
G2C
.
getDesc
(),
groupMap
.
get
(
ModelTypeEnum
.
G2C
.
getValue
()));
mapList
.
add
(
g2cMap
);
model
.
put
(
"data"
,
mapList
);
model
.
put
(
"message_info"
,
busiDesc
+
"成功"
);
model
.
put
(
"message_info"
,
busiDesc
+
"成功"
);
this
.
recordSysLog
(
this
.
request
,
busiDesc
+
" 【成功】"
);
this
.
recordSysLog
(
this
.
request
,
busiDesc
+
" 【成功】"
);
}
catch
(
Exception
var9
)
{
}
catch
(
Exception
var9
)
{
...
...
base-manager/src/main/resources/sqlmap/module/model/ModelMapper.xml
View file @
12933106
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