Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-api-boot-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
lanbaoming
jiedao-api-boot-master
Commits
1cd555ef
Commit
1cd555ef
authored
Jul 29, 2024
by
zhaobiyan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获取城市信息接口
parent
14f0ca3e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
1 deletion
+25
-1
RegionController.java
.../module/ecw/controller/admin/region/RegionController.java
+9
-0
RegionMapper.java
...coder/yudao/module/ecw/dal/mysql/region/RegionMapper.java
+1
-0
RegionService.java
...ocoder/yudao/module/ecw/service/region/RegionService.java
+1
-1
RegionServiceImpl.java
...er/yudao/module/ecw/service/region/RegionServiceImpl.java
+5
-0
RegionMapper.xml
...cw-impl/src/main/resources/mapper/region/RegionMapper.xml
+9
-0
No files found.
yudao-module-ecw/yudao-module-ecw-impl/src/main/java/cn/iocoder/yudao/module/ecw/controller/admin/region/RegionController.java
View file @
1cd555ef
...
...
@@ -208,4 +208,13 @@ public class RegionController {
return
pNode
;
}
@GetMapping
(
"/getCityListByParent"
)
@ApiOperation
(
"根据父节点获取城市列表"
)
public
CommonResult
<
List
<
RegionRespVO
>>
getCityListByParent
(
@RequestParam
(
"id"
)
Long
parentId
)
{
if
(
parentId
==
null
)
{
return
CommonResult
.
success
(
Collections
.
emptyList
());
}
List
<
RegionDO
>
cityList
=
regionService
.
getCityListByParentId
(
parentId
);
return
success
(
RegionConvert
.
INSTANCE
.
convertList
(
cityList
));
}
}
yudao-module-ecw/yudao-module-ecw-impl/src/main/java/cn/iocoder/yudao/module/ecw/dal/mysql/region/RegionMapper.java
View file @
1cd555ef
...
...
@@ -102,4 +102,5 @@ public interface RegionMapper extends BaseMapperX<RegionDO> {
List
<
RegionDO
>
getImportExportCountryList
();
List
<
RegionDO
>
getCityListByParentId
(
@Param
(
"parentId"
)
Long
parentId
);
}
yudao-module-ecw/yudao-module-ecw-impl/src/main/java/cn/iocoder/yudao/module/ecw/service/region/RegionService.java
View file @
1cd555ef
...
...
@@ -90,5 +90,5 @@ public interface RegionService {
List
<
RegionDO
>
getImportExportCountryList
();
List
<
RegionDO
>
getCityListByParentId
(
Long
parentId
);
}
yudao-module-ecw/yudao-module-ecw-impl/src/main/java/cn/iocoder/yudao/module/ecw/service/region/RegionServiceImpl.java
View file @
1cd555ef
...
...
@@ -144,4 +144,9 @@ public class RegionServiceImpl implements RegionService {
public
List
<
RegionDO
>
getImportExportCountryList
()
{
return
regionMapper
.
getImportExportCountryList
();
}
@Override
public
List
<
RegionDO
>
getCityListByParentId
(
Long
parentId
)
{
return
regionMapper
.
getCityListByParentId
(
parentId
);
}
}
yudao-module-ecw/yudao-module-ecw-impl/src/main/resources/mapper/region/RegionMapper.xml
View file @
1cd555ef
...
...
@@ -68,4 +68,13 @@
and b.status = 0
and b.type in (1, 3)
</select>
<select
id=
"getCityListByParentId"
resultType=
"cn.iocoder.yudao.module.ecw.dal.dataobject.region.RegionDO"
>
select b.* from ecw_region a
left join ecw_region b on a.id = b.parent_id
where a.parent_id = #{parentId}
AND a.deleted = 0
and b.deleted = 0
and a.status = 0
and b.status = 0
</select>
</mapper>
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