Commit 32582570 by s_guodong

优化自定义vo赋值 和 校验

parent 18b36fb0
......@@ -69,12 +69,17 @@ public class ReflectUtil {
declaredField.set(baseVo, o);
} else {
// 对象类型
Object typeO = type.newInstance();
String s = setValue2RequestVo(o, f.getType(), typeO, type);
if (!StringUtils.isBlank(s)) {
return s;
if (type == f.getType()) {
// 相同的class 直接赋值
declaredField.set(baseVo, o);
} else {
Object typeO = type.newInstance();
String s = setValue2RequestVo(o, f.getType(), typeO, type);
if (!StringUtils.isBlank(s)) {
return s;
}
declaredField.set(baseVo, typeO);
}
declaredField.set(baseVo, typeO);
}
} catch (Exception e) {
// Class<?> superclass = baseVoClass.getSuperclass();
......
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