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
7ef7a334
Commit
7ef7a334
authored
Oct 26, 2023
by
s_guodong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
定制参数list 判空
parent
4e848cfb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
ReflectUtil.java
...ness/src/main/java/com/ceb/gjjs/mda/util/ReflectUtil.java
+10
-7
No files found.
gjjs-bd-business/src/main/java/com/ceb/gjjs/mda/util/ReflectUtil.java
View file @
7ef7a334
...
...
@@ -2,6 +2,7 @@ package com.ceb.gjjs.mda.util;
import
com.brilliance.mda.runtime.annotation.RelPath
;
import
com.brilliance.mda.runtime.mda.impl.ModuleList
;
import
com.brilliance.mda.runtime.mda.util.MdaUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -48,15 +49,17 @@ public class ReflectUtil {
List
list
=
(
List
)
o
;
ModuleList
moduleList
=
new
ModuleList
();
for
(
Object
data
:
list
)
{
Object
dataObj
=
moduleT
.
newInstance
();
String
s
=
setValue2RequestVo
(
data
,
listT
,
dataObj
,
moduleT
);
if
(!
StringUtils
.
isBlank
(
s
))
{
return
s
;
if
(!
MdaUtils
.
isEmpty
(
list
))
{
for
(
Object
data
:
list
)
{
Object
dataObj
=
moduleT
.
newInstance
();
String
s
=
setValue2RequestVo
(
data
,
listT
,
dataObj
,
moduleT
);
if
(!
StringUtils
.
isBlank
(
s
))
{
return
s
;
}
moduleList
.
add
(
dataObj
);
}
moduleList
.
add
(
dataObj
);
declaredField
.
set
(
baseVo
,
moduleList
);
}
declaredField
.
set
(
baseVo
,
moduleList
);
}
else
if
(
"java.util.List"
.
equals
(
type
.
getName
()))
{
// list数据类型
declaredField
.
set
(
baseVo
,
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