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
251210db
Commit
251210db
authored
Jun 02, 2022
by
赵啸非
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
f37ce934
d98d3d6c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
6 deletions
+37
-6
portal-manager/src/main/java/com/mortals/xhx/module/system/service/impl/SystemServiceServiceImpl.java
.../module/system/service/impl/SystemServiceServiceImpl.java
+13
-1
portal-manager/src/main/java/com/mortals/xhx/module/system/web/SystemServiceController.java
...ortals/xhx/module/system/web/SystemServiceController.java
+24
-5
No files found.
portal-manager/src/main/java/com/mortals/xhx/module/system/service/impl/SystemServiceServiceImpl.java
View file @
251210db
package
com.mortals.xhx.module.system.service.impl
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.framework.util.StringUtils
;
import
org.springframework.stereotype.Service
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.xhx.module.system.dao.SystemServiceDao
;
...
...
@@ -13,5 +17,13 @@ import com.mortals.xhx.module.system.service.SystemServiceService;
*/
@Service
(
"systemServiceService"
)
public
class
SystemServiceServiceImpl
extends
AbstractCRUDServiceImpl
<
SystemServiceDao
,
SystemServiceEntity
,
Long
>
implements
SystemServiceService
{
@Override
protected
SystemServiceEntity
findBefore
(
SystemServiceEntity
entity
,
PageInfo
pageInfo
,
Context
context
)
throws
AppException
{
if
(
StringUtils
.
isNotEmpty
(
entity
.
getPackageName
())){
entity
.
setPackageName
(
"%"
+
entity
.
getPackageName
()+
"%"
);
}
pageInfo
.
setPrePageResult
(-
1
);
return
entity
;
}
}
\ No newline at end of file
portal-manager/src/main/java/com/mortals/xhx/module/system/web/SystemServiceController.java
View file @
251210db
package
com.mortals.xhx.module.system.web
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.xhx.module.param.service.ParamService
;
import
com.mortals.xhx.module.system.model.SystemServiceApiEntity
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
...
...
@@ -18,15 +21,11 @@ import com.mortals.xhx.module.system.service.SystemServiceService;
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.*
;
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
;
...
...
@@ -56,5 +55,25 @@ public class SystemServiceController extends BaseCRUDJsonBodyMappingController<S
super
.
init
(
model
,
context
);
}
@Override
protected
int
doListAfter
(
SystemServiceEntity
query
,
Map
<
String
,
Object
>
model
,
Context
context
)
throws
AppException
{
List
<
SystemServiceEntity
>
result
=
(
List
<
SystemServiceEntity
>)
model
.
get
(
"data"
);
if
(
CollectionUtils
.
isNotEmpty
(
result
)){
List
<
JSONObject
>
jsonObjectList
=
new
ArrayList
<>();
Map
<
String
,
List
<
SystemServiceEntity
>>
map
=
result
.
stream
().
collect
(
Collectors
.
groupingBy
(
SystemServiceEntity:
:
getSystemServiceCode
));
Iterator
<
Map
.
Entry
<
String
,
List
<
SystemServiceEntity
>>>
iterator
=
map
.
entrySet
().
iterator
();
while
(
iterator
.
hasNext
()){
Map
.
Entry
<
String
,
List
<
SystemServiceEntity
>>
item
=
iterator
.
next
();
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"serviceName"
,
item
.
getValue
().
get
(
0
).
getSystemServiceName
());
jsonObject
.
put
(
"serviceCode"
,
item
.
getValue
().
get
(
0
).
getSystemServiceCode
());
jsonObject
.
put
(
"count"
,
item
.
getValue
().
size
());
jsonObject
.
put
(
"serviceList"
,
item
.
getValue
());
jsonObjectList
.
add
(
jsonObject
);
}
model
.
put
(
"data"
,
jsonObjectList
);
}
return
1
;
}
}
\ No newline at end of file
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