Skip to content

Commit

Permalink
fix 字段类型匹配问题修复
Browse files Browse the repository at this point in the history
  • Loading branch information
ziiigzag committed Jan 31, 2023
1 parent 5c4aaac commit a95e68c
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

import cn.hutool.core.text.CharSequenceUtil;
import org.apache.commons.lang3.StringUtils;

/**
Expand Down Expand Up @@ -70,7 +72,8 @@ public static FieldTypeEnum getEnumByValue(String value) {
return null;
}
for (FieldTypeEnum mockTypeEnum : FieldTypeEnum.values()) {
if (mockTypeEnum.value.equals(value)) {
// 字段类型匹配时忽略长度
if (mockTypeEnum.value.equals(value.replaceFirst("[(]\\d+[)]", CharSequenceUtil.EMPTY))) {
return mockTypeEnum;
}
}
Expand Down

0 comments on commit a95e68c

Please sign in to comment.