Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
haoban3.0
haoban-manage3.0
Commits
e030d109
Commit
e030d109
authored
Mar 19, 2020
by
huangZW
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
111
parent
5c294239
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
33 deletions
+33
-33
StoreController.java
...com/gic/haoban/manage/web/controller/StoreController.java
+33
-33
No files found.
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/StoreController.java
View file @
e030d109
...
@@ -8,6 +8,7 @@ import java.util.Date;
...
@@ -8,6 +8,7 @@ import java.util.Date;
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.Set
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
@@ -180,39 +181,38 @@ public class StoreController extends WebBaseController{
...
@@ -180,39 +181,38 @@ public class StoreController extends WebBaseController{
//获取首页销售数据
//获取首页销售数据
@IgnoreLogin
@IgnoreLogin
@RequestMapping
(
"/get-area-list"
)
@RequestMapping
(
"/get-area-list"
)
public
HaobanResponse
getArea
(
String
id
)
{
public
HaobanResponse
getArea
(
Integer
type
,
String
id
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
if
(
type
==
null
)
{
Map
<
String
,
ProvinceDTO
>
provinceMap
=
GlobalDictMap
.
provinceMap
;
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
Map
<
String
,
CityDTO
>
cityMap
=
GlobalDictMap
.
cityMap
;
}
Map
<
String
,
CountyDTO
>
countyMap
=
GlobalDictMap
.
countyMap
;
switch
(
type
)
{
List
<
ProvinceDTO
>
provinceList
=
new
ArrayList
<
ProvinceDTO
>();
// 省
List
<
CityDTO
>
cityList
=
new
ArrayList
<
CityDTO
>();
case
1
:
List
<
CountyDTO
>
countyList
=
new
ArrayList
<
CountyDTO
>();
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
GlobalDictMap
.
provinceMap
);
for
(
String
key
:
provinceMap
.
keySet
())
{
// 市
provinceList
.
add
(
provinceMap
.
get
(
key
));
case
2
:
}
Map
<
String
,
CityDTO
>
tabCityMap
=
GlobalDictMap
.
cityMap
;
for
(
String
key
:
cityMap
.
keySet
())
{
Map
<
String
,
CityDTO
>
cityMap
=
new
HashMap
<
String
,
CityDTO
>();
cityList
.
add
(
cityMap
.
get
(
key
));
Set
<
Map
.
Entry
<
String
,
CityDTO
>>
citySet
=
tabCityMap
.
entrySet
();
}
for
(
Map
.
Entry
<
String
,
CityDTO
>
entry
:
citySet
)
{
for
(
String
key
:
countyMap
.
keySet
())
{
if
(
entry
.
getValue
().
getProvinceId
().
equals
(
id
))
{
countyList
.
add
(
countyMap
.
get
(
key
));
cityMap
.
put
(
entry
.
getKey
(),
entry
.
getValue
());
}
}
if
(
StringUtils
.
isEmpty
(
id
)){
}
//省
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
cityMap
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
provinceList
);
case
3
:
}
else
{
Map
<
String
,
CountyDTO
>
tabCountyMap
=
GlobalDictMap
.
countyMap
;
if
(
cityMap
.
containsKey
(
id
)){
Map
<
String
,
CountyDTO
>
countyMap
=
new
HashMap
<
String
,
CountyDTO
>();
//市
Set
<
Map
.
Entry
<
String
,
CountyDTO
>>
tabSet
=
tabCountyMap
.
entrySet
();
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
cityList
);
for
(
Map
.
Entry
<
String
,
CountyDTO
>
entry
:
tabSet
)
{
}
else
if
(
countyMap
.
containsKey
(
id
)){
if
(
entry
.
getValue
().
getCityId
().
equals
(
id
))
{
//区
countyMap
.
put
(
entry
.
getKey
(),
entry
.
getValue
());
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
countyList
);
}
}
}
}
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
countyMap
);
map
.
put
(
"province"
,
provinceList
);
}
map
.
put
(
"city"
,
cityList
);
map
.
put
(
"country"
,
countyList
);
return
resultResponse
(
HaoBanErrCode
.
ERR_8
);
return
resultResponse
(
HaoBanErrCode
.
ERR_8
,
map
);
}
}
//获取首页销售数据
//获取首页销售数据
@RequestMapping
(
"/change-store-detail"
)
@RequestMapping
(
"/change-store-detail"
)
...
...
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