From 913325cfa127c011bf0f5047cc73fe20c65e452f Mon Sep 17 00:00:00 2001 From: wangyu <727842003@qq.com> Date: Sun, 5 Sep 2021 00:42:09 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=8F=90=E4=BE=9B=E8=AF=B8=E5=A4=9A?= =?UTF-8?q?=E7=AE=80=E5=8C=96=E9=85=8D=E7=BD=AE=EF=BC=8C=E6=9B=B4=E8=BD=BB?= =?UTF-8?q?=E6=9D=BE=E5=AE=9E=E7=8E=B0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/flyfish/framework/beans/meta/BeanProperty.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 6010da2..d5e4d82 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 @@ -79,7 +79,7 @@ public class BeanProperty { property.setReadonly(true); return property; } - // 如果是qo或者vo,处于严格模式z + // 如果是qo或者vo,处于严格模式 boolean strict = Qo.class.isAssignableFrom(beanClass) || Vo.class.isAssignableFrom(beanClass); // 尝试获取field Field field = FieldUtils.getField(beanClass, descriptor.getName(), true); @@ -87,11 +87,13 @@ public class BeanProperty { if (null != field) { Property props = AnnotationUtils.findAnnotation(field, Property.class); if (null != props) { - String parentName = Optional.ofNullable(beanClass.getAnnotation(RestBean.class)).map(RestBean::name).orElse(""); + String parentName = Optional.ofNullable(beanClass.getAnnotation(RestBean.class)) + .map(RestBean::name).orElse(""); property.setTitle(props.inherited() ? parentName + props.title() : props.title()); property.setDescription(props.description()); property.setReadonly(props.readonly()); property.setGroup(props.group()); + // 优雅地设置排序 Order order = AnnotationUtils.findAnnotation(field, Order.class); if (null != order) { property.setOrder(order.value());