Commit 7ef7a334 by s_guodong

定制参数list 判空

parent 4e848cfb
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment