Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gjjs-bd-common
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
s_guodong
gjjs-bd-common
Commits
23e438b0
Commit
23e438b0
authored
Nov 21, 2023
by
s_guodong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化自定义返回vo赋值问题
parent
48a9eb4c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
ReflectUtil.java
...ness/src/main/java/com/ceb/gjjs/mda/util/ReflectUtil.java
+10
-8
No files found.
gjjs-bd-business/src/main/java/com/ceb/gjjs/mda/util/ReflectUtil.java
View file @
23e438b0
...
...
@@ -120,11 +120,9 @@ public class ReflectUtil {
}
else
if
(
"com.brilliance.mda.runtime.mda.impl.ModuleList"
.
equals
(
type
.
getName
()))
{
// 取总条数total
ModuleList
moduleList
=
(
ModuleList
)
o
;
log
.
info
(
"moduleList===="
+
moduleList
.
getFullSize
());
if
(
moduleList
.
getFullSize
()
>=
0
)
{
total
=
String
.
valueOf
(
moduleList
.
getFullSize
());
}
// list数据类型
Class
tType
=
ReflectUtil
.
getTType
(
f
);
if
(
ReflectUtil
.
isPrimate
(
tType
))
{
...
...
@@ -133,13 +131,17 @@ public class ReflectUtil {
}
else
{
// 泛型是对象
List
list
=
(
List
)
o
;
List
dataList
=
new
ArrayList
(
list
.
size
());
for
(
Object
data
:
list
)
{
Object
o1
=
tType
.
newInstance
();
setValue2RespondVo
(
o1
,
tType
,
data
,
ReflectUtil
.
getTType
(
declaredField
));
dataList
.
add
(
o1
);
if
(
tType
.
equals
(
ReflectUtil
.
getTType
(
declaredField
)))
{
f
.
set
(
respondVo
,
list
);
}
else
{
List
dataList
=
new
ArrayList
(
list
.
size
());
for
(
Object
data
:
list
)
{
Object
o1
=
tType
.
newInstance
();
setValue2RespondVo
(
o1
,
tType
,
data
,
ReflectUtil
.
getTType
(
declaredField
));
dataList
.
add
(
o1
);
}
f
.
set
(
respondVo
,
dataList
);
}
f
.
set
(
respondVo
,
dataList
);
}
}
else
if
(
"java.util.List"
.
equals
(
type
.
getName
()))
{
f
.
set
(
respondVo
,
o
);
...
...
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