From b18a8c4de837323044ffdf9bdb8766a1ba098ea8 Mon Sep 17 00:00:00 2001 From: wangyu <727842003@qq.com> Date: Sat, 15 Jan 2022 22:29:13 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E5=AE=9E=E7=8E=B0=E5=8A=A8?= =?UTF-8?q?=E6=80=81=E5=93=8D=E5=BA=94=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../framework/beans/meta/BeanProperty.java | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/flyfish-web/src/main/java/com/flyfish/framework/beans/meta/BeanProperty.java b/flyfish-web/src/main/java/com/flyfish/framework/beans/meta/BeanProperty.java index bc43247..cc1e8be 100644 --- a/flyfish-web/src/main/java/com/flyfish/framework/beans/meta/BeanProperty.java +++ b/flyfish-web/src/main/java/com/flyfish/framework/beans/meta/BeanProperty.java @@ -421,7 +421,7 @@ public class BeanProperty { } if (ArrayUtils.isNotEmpty(item.props())) { for (FormItem.Prop prop : item.props()) { - property.prop(prop.key(), prop.value()); + property.prop(prop.key(), propValue(prop.value())); } } } @@ -502,6 +502,22 @@ public class BeanProperty { } } + /** + * 细化解析属性值 + * + * @param value 值 + * @return 结果 + */ + private static Object propValue(String value) { + if ("true".equals(value)) { + return true; + } + if ("false".equals(value)) { + return false; + } + return value; + } + /** * 设置当前对象的键值属性 *