Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-zx-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
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
Jobs
Commits
Open sidebar
项目统一框架
一体化_户用光伏项目代码
amos-boot-zx-biz
Commits
389dd2b5
Commit
389dd2b5
authored
Oct 28, 2024
by
朱晨阳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查询省市区接口
parent
80283fda
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
1 deletion
+27
-1
FinancingInfoMapper.java
...amos/boot/module/hygf/api/mapper/FinancingInfoMapper.java
+3
-0
FinancingInfoMapper.xml
...i/src/main/resources/mapper/mysql/FinancingInfoMapper.xml
+11
-0
CommonController.java
...mos/boot/module/hygf/biz/controller/CommonController.java
+8
-1
FinancingInfoServiceImpl.java
...odule/hygf/biz/service/impl/FinancingInfoServiceImpl.java
+5
-0
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/mapper/FinancingInfoMapper.java
View file @
389dd2b5
...
...
@@ -6,6 +6,7 @@ import com.yeejoin.amos.boot.module.hygf.api.entity.FinancingInfo;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.math.BigInteger
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -32,4 +33,6 @@ public interface FinancingInfoMapper extends BaseMapper<FinancingInfo> {
List
<
Map
<
String
,
Object
>>
selectRegion
();
List
<
Map
<
String
,
Object
>>
selectRegionByParentCode
(
String
parentCode
,
String
level
);
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/FinancingInfoMapper.xml
View file @
389dd2b5
...
...
@@ -118,4 +118,15 @@
PARENT_ID = '0'
</select>
<select
id=
"selectRegionByParentCode"
resultType=
"java.util.Map"
>
select
REGION_NAME regionName,
REGION_CODE regionCode
from
systemctl_region
where
PARENT_REGION_CODE = #{parentCode} and LEVEL = #{level}
</select>
</mapper>
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/CommonController.java
View file @
389dd2b5
...
...
@@ -11,6 +11,7 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.math.BigInteger
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -29,7 +30,13 @@ public class CommonController {
return
ResponseHelper
.
buildResponse
(
financingInfoService
.
selectRegion
());
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/selectRegionByParentCode"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询省市区"
,
notes
=
"查询省市区"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
selectRegionByParentCode
(
@RequestParam
(
value
=
"parentCode"
,
defaultValue
=
"0"
)
String
parentCode
,
@RequestParam
(
value
=
"level"
,
defaultValue
=
"1"
)
String
level
)
{
return
ResponseHelper
.
buildResponse
(
financingInfoService
.
selectRegionByParentCode
(
parentCode
,
level
));
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/FinancingInfoServiceImpl.java
View file @
389dd2b5
...
...
@@ -42,6 +42,7 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
javax.annotation.Resource
;
import
java.math.BigInteger
;
import
java.util.*
;
import
java.util.stream.Collectors
;
...
...
@@ -130,11 +131,15 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto, Fina
return
page
;
}
public
List
<
Map
<
String
,
Object
>>
selectRegion
(){
return
financingInfoMapper
.
selectRegion
();
}
public
List
<
Map
<
String
,
Object
>>
selectRegionByParentCode
(
String
parentCode
,
String
level
){
return
financingInfoMapper
.
selectRegionByParentCode
(
parentCode
,
level
);
}
/**
* 列表查询 示例
...
...
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