mirror of https://gitee.com/stylefeng/roses
【api】更新字段名称
parent
e8bd583068
commit
61e8e5d104
|
@ -47,7 +47,7 @@ public class FieldMetadata {
|
|||
* 例如:
|
||||
* key = add, value = [不能为空,最大多少位,邮箱类型]
|
||||
*/
|
||||
private Map<String, Set<String>> groupAnnotations;
|
||||
private Map<String, Set<String>> groupValidationMessage;
|
||||
|
||||
/**
|
||||
* 校验信息的提示信息
|
||||
|
|
|
@ -86,7 +86,7 @@ public class ClassReflectUtil {
|
|||
}
|
||||
}
|
||||
// 设置分组注解
|
||||
fieldDescription.setGroupAnnotations(groupAnnotations);
|
||||
fieldDescription.setGroupValidationMessage(groupAnnotations);
|
||||
|
||||
// 填充字段的中文名称
|
||||
ChineseDescription chineseDescription = declaredField.getAnnotation(ChineseDescription.class);
|
||||
|
|
|
@ -148,7 +148,7 @@ public class ResourceFactory {
|
|||
}
|
||||
for (FieldMetadata fieldMetadata : fieldMetadataSet) {
|
||||
StringBuilder finalValidateMessages = new StringBuilder();
|
||||
Map<String, Set<String>> groupAnnotations = fieldMetadata.getGroupAnnotations();
|
||||
Map<String, Set<String>> groupAnnotations = fieldMetadata.getGroupValidationMessage();
|
||||
if (groupAnnotations != null) {
|
||||
for (String validateGroup : validateGroups) {
|
||||
Set<String> validateMessage = groupAnnotations.get(validateGroup);
|
||||
|
|
Loading…
Reference in New Issue