Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-store
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
base_platform_enterprise
gic-store
Commits
5ff11c4f
Commit
5ff11c4f
authored
Dec 09, 2019
by
陶光胜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
门店查询接口
parent
eb737701
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
0 deletions
+44
-0
ProvincesApiService.java
.../main/java/com/gic/store/service/ProvincesApiService.java
+17
-0
ProvincesApiServiceImpl.java
...gic/store/service/outer/impl/ProvincesApiServiceImpl.java
+27
-0
No files found.
gic-store-api/src/main/java/com/gic/store/service/ProvincesApiService.java
View file @
5ff11c4f
...
...
@@ -27,6 +27,14 @@ public interface ProvincesApiService {
* @return
*/
ServiceResponse
<
List
<
CityDTO
>>
selectAllCity
();
/** @Description: 通过城市id查询城市
* @author taogs
* @Date 11:10 2019/12/9
* @Param
* @return
*/
ServiceResponse
<
CityDTO
>
getCityByCityId
(
String
cityId
);
/** @Description: 通过省id查询城市
* @author taogs
...
...
@@ -43,6 +51,15 @@ public interface ProvincesApiService {
* @return
*/
ServiceResponse
<
List
<
CountyDTO
>>
selectAllCounty
();
/** @Description: 通过地区id查询
* @author taogs
* @Date 11:11 2019/12/9
* @Param
* @return
*/
ServiceResponse
<
CountyDTO
>
getCountyByCountyId
(
String
countyId
);
/** @Description: 通过城市id查询地区
* @author taogs
...
...
gic-store-service/src/main/java/com/gic/store/service/outer/impl/ProvincesApiServiceImpl.java
View file @
5ff11c4f
...
...
@@ -55,6 +55,20 @@ public class ProvincesApiServiceImpl implements ProvincesApiService {
}
@Override
public
ServiceResponse
<
CityDTO
>
getCityByCityId
(
String
cityId
)
{
ServiceResponse
<
List
<
CityDTO
>>
response
=
this
.
selectAllCity
();
if
(
response
.
isSuccess
()
&&
CollectionUtils
.
isNotEmpty
(
response
.
getResult
())){
List
<
CityDTO
>
list
=
response
.
getResult
();
for
(
CityDTO
dto
:
list
){
if
(
dto
.
getCityId
().
equals
(
cityId
)){
return
ServiceResponse
.
success
(
dto
);
}
}
}
return
ServiceResponse
.
success
();
}
@Override
public
ServiceResponse
<
List
<
CityDTO
>>
selectCityByProvinceId
(
String
provinceId
)
{
List
<
CityDTO
>
list
=
new
ArrayList
<>();
if
(
StringUtils
.
isBlank
(
provinceId
)){
...
...
@@ -83,6 +97,19 @@ public class ProvincesApiServiceImpl implements ProvincesApiService {
}
@Override
public
ServiceResponse
<
CountyDTO
>
getCountyByCountyId
(
String
countyId
)
{
ServiceResponse
<
List
<
CountyDTO
>>
response
=
this
.
selectAllCounty
();
if
(
response
.
isSuccess
()
&&
CollectionUtils
.
isNotEmpty
(
response
.
getResult
())){
for
(
CountyDTO
dto
:
response
.
getResult
()){
if
(
dto
.
getCountyId
().
equals
(
countyId
)){
return
ServiceResponse
.
success
(
dto
);
}
}
}
return
ServiceResponse
.
success
();
}
@Override
public
ServiceResponse
<
List
<
CountyDTO
>>
selectCountyByCityId
(
String
cityId
)
{
List
<
CountyDTO
>
list
=
new
ArrayList
<>();
if
(
StringUtils
.
isBlank
(
cityId
)){
...
...
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