Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
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
项目统一框架
amos-boot-biz
Commits
1c5b85d8
Commit
1c5b85d8
authored
Dec 27, 2023
by
liufan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化:设备分类接口查询,返回空数组不为空,但内部字段都为空的问题
parent
f220d165
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+7
-5
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/CommonServiceImpl.java
View file @
1c5b85d8
...
...
@@ -27,13 +27,11 @@ import org.springframework.util.CollectionUtils;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.
restful.utils.ResponseMode
l
;
import
org.typroject.tyboot.core.
foundation.utils.ValidationUti
l
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.ByteArrayInputStream
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.InputStream
;
import
java.nio.file.Files
;
import
java.util.*
;
import
java.util.stream.Collectors
;
...
...
@@ -99,16 +97,20 @@ public class CommonServiceImpl implements ICommonService {
public
List
<
EquipmentCategory
>
getEquipmentCategoryList
(
String
code
,
String
type
)
{
List
<
EquipmentCategory
>
result
=
new
ArrayList
<>();
LambdaQueryWrapper
<
EquipmentCategory
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
EquipmentCategory:
:
getCode
,
code
);
EquipmentCategory
equipmentCategory
=
equipmentCategoryMapper
.
selectOne
(
wrapper
);
if
(
ObjectUtils
.
isEmpty
(
type
))
{
if
(!
ValidationUtil
.
isEmpty
(
equipmentCategory
)){
result
.
add
(
equipmentCategory
);
}
}
else
{
LambdaQueryWrapper
<
EquipmentCategory
>
wrapper2
=
new
LambdaQueryWrapper
<>();
wrapper2
.
eq
(
EquipmentCategory:
:
getParentId
,
equipmentCategory
.
getId
());
result
=
equipmentCategoryMapper
.
selectList
(
wrapper2
);
List
<
EquipmentCategory
>
equipmentCategories
=
equipmentCategoryMapper
.
selectList
(
wrapper2
);
if
(!
ValidationUtil
.
isEmpty
(
equipmentCategories
)){
result
=
equipmentCategories
;
}
}
return
result
;
}
...
...
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