feat:修正字典入库逻辑
This commit is contained in:
parent
e09b5efbfe
commit
273484b62e
@ -56,6 +56,7 @@ public class DictionaryProcessor implements InitializingBean {
|
||||
.map(field -> field.getAnnotation(DictValue.class))
|
||||
.filter(annotation -> null != annotation && StringUtils.isNotBlank(annotation.value()) &&
|
||||
BlankEnum.class != annotation.enumType())
|
||||
.distinct(DictValue::enumType)
|
||||
// 查找是否存在,不存在插入,存在无视
|
||||
.flatMap(annotation -> dictionaryService
|
||||
.getByCode(annotation.value())
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.flyfish.framework.file.domain;
|
||||
|
||||
import com.flyfish.framework.annotations.Property;
|
||||
import com.flyfish.framework.domain.base.AuditDomain;
|
||||
import lombok.*;
|
||||
import org.springframework.data.mongodb.core.mapping.Document;
|
||||
@ -10,6 +11,7 @@ import org.springframework.data.mongodb.core.mapping.Document;
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Property(key = "name", value = "附件名称")
|
||||
public class Attachment extends AuditDomain {
|
||||
|
||||
/**
|
||||
|
@ -222,6 +222,7 @@ public class BeanProperty {
|
||||
Class<?> elementClass = ReflectionUtils.getGenericType(field).orElse(Object.class);
|
||||
if (property.isAttachment(elementClass)) {
|
||||
property.prop("attachment", true);
|
||||
break;
|
||||
}
|
||||
annotations
|
||||
.as(SubBean.class)
|
||||
|
Loading…
Reference in New Issue
Block a user