Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
邬吉朋
pipeline-network
Commits
96f70f44
Commit
96f70f44
authored
Nov 04, 2026
by
wujipeng
Browse files
优化
parent
1c76f2f3
Changes
1
Show whitespace changes
Inline
Side-by-side
src/main/java/com/example/pipelinenetwork/service/impl/BasicServiceImpl.java
View file @
96f70f44
...
...
@@ -65,6 +65,14 @@ public class BasicServiceImpl extends ServiceImpl<BasicMapper, BasicEntity> impl
List
<
BasicEntity
>
basicList
=
list
(
new
LambdaQueryWrapper
<>(
BasicEntity
.
class
).
eq
(
BasicEntity:
:
getRegion
,
region
));
Map
<
String
,
String
>
basicMap
=
new
HashMap
<>();
for
(
BasicEntity
basicEntity
:
basicList
)
{
/*
* roadName 在后续会被作为返回结果 Map 的 key,即 JSON 对象的字段名。
* Jackson 无法将 null key 序列化为 JSON,因此对道路名称为 null 的异常基础数据
* 不进行汇总输出,避免生成 result.put(null, ...)并导致整个接口返回失败。
*/
if
(
basicEntity
.
getRoadName
()
==
null
)
{
continue
;
}
basicMap
.
put
(
basicEntity
.
getRelId
(),
basicEntity
.
getRoadName
());
}
if
(
"检测"
.
equals
(
type
))
{
...
...
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