From 8c4f0d03071437459a9e96d8f6d470923f57fbd7 Mon Sep 17 00:00:00 2001 From: wangyu <727842003@qq.com> Date: Thu, 14 Oct 2021 16:22:41 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E5=A2=9E=E5=8A=A0=E6=9F=A5?= =?UTF-8?q?=E6=89=BE=E6=9B=BF=E6=8D=A2=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/flyfish/framework/beans/meta/BeanProperty.java | 7 +++++++ 1 file changed, 7 insertions(+) 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 cd7ced2..476af95 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 @@ -226,6 +226,13 @@ public class BeanProperty { property .prop("type", "range") .prop("placeholder", Arrays.asList("开始时间", "结束时间")); + } else if (annotations.isPresent(DBRefValue.class)) { + // 添加了数据库引用注解,自动注入类型给前端使用 + DBRefValue dbRefValue = annotations.get(DBRefValue.class).synthesize(); + processDbRef(dbRefValue.value()).ifPresent(ref -> { + property.setType(BeanPropertyType.DB_REF); + property.prop("uri", ref).prop("multiple", "true"); + }); } } break;