Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Litemall
Commits
16c6a2fa
Unverified
Commit
16c6a2fa
authored
Dec 29, 2019
by
linlinjava
Committed by
GitHub
Dec 29, 2019
Browse files
Merge pull request #312 from jessonxiang/dev
查询区域超时问题优化查询
parents
4c46da9b
324c8da3
Changes
1
Hide whitespace changes
Inline
Side-by-side
litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/web/AdminRegionController.java
View file @
16c6a2fa
...
...
@@ -15,6 +15,8 @@ import org.springframework.web.bind.annotation.RestController;
import
javax.validation.constraints.NotNull
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
@RestController
@RequestMapping
(
"/admin/region"
)
...
...
@@ -43,16 +45,16 @@ public class AdminRegionController {
provinceVO
.
setCode
(
province
.
getCode
());
provinceVO
.
setType
(
province
.
getType
());
List
<
LitemallRegion
>
cityList
=
regionService
.
queryByPid
(
province
.
getId
());
List
<
LitemallRegion
>
cityList
=
cityListMap
.
get
(
province
.
getId
());
List
<
RegionVo
>
cityVOList
=
new
ArrayList
<>();
for
(
LitemallRegion
city
:
cityList
)
{
RegionVo
cityVO
=
new
RegionVo
();
cityVO
.
setId
(
city
.
getId
());
cityVO
.
setName
(
city
.
getName
());
cityVO
.
setCode
(
city
.
getCode
());
cityVO
.
setType
(
city
.
getType
());
cityVO
.
setId
(
city
Vo
.
getId
());
cityVO
.
setName
(
city
Vo
.
getName
());
cityVO
.
setCode
(
city
Vo
.
getCode
());
cityVO
.
setType
(
city
Vo
.
getType
());
List
<
LitemallRegion
>
areaList
=
re
gionService
.
queryByPid
(
city
.
getId
());
List
<
LitemallRegion
>
areaList
=
a
re
aListMap
.
get
(
city
Vo
.
getId
());
List
<
RegionVo
>
areaVOList
=
new
ArrayList
<>();
for
(
LitemallRegion
area
:
areaList
)
{
RegionVo
areaVO
=
new
RegionVo
();
...
...
Write
Preview
Supports
Markdown
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