Skip to content

Commit ba1a34e

Browse files
author
hewei
committed
EnumTypeStatusPlugin 增加说明文档
1 parent de412a7 commit ba1a34e

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed

README.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1561,6 +1561,26 @@ public class Tb {
15611561
public String getName() {
15621562
return this.name;
15631563
}
1564+
public Field2 parseValue(Short value) {
1565+
if (value != null) {
1566+
for (Field2 item : values()) {
1567+
if (item.value.equals(value)) {
1568+
return item;
1569+
}
1570+
}
1571+
}
1572+
return null;
1573+
}
1574+
public Field2 parseName(String name) {
1575+
if (name != null) {
1576+
for (Field2 item : values()) {
1577+
if (item.name.equals(name)) {
1578+
return item;
1579+
}
1580+
}
1581+
}
1582+
return null;
1583+
}
15641584
}
15651585

15661586
public enum Status {
@@ -1583,6 +1603,26 @@ public class Tb {
15831603
public String getName() {
15841604
return this.name;
15851605
}
1606+
public Status parseValue(Short value) {
1607+
if (value != null) {
1608+
for (Status item : values()) {
1609+
if (item.value.equals(value)) {
1610+
return item;
1611+
}
1612+
}
1613+
}
1614+
return null;
1615+
}
1616+
public Status parseName(String name) {
1617+
if (name != null) {
1618+
for (Status item : values()) {
1619+
if (item.name.equals(name)) {
1620+
return item;
1621+
}
1622+
}
1623+
}
1624+
return null;
1625+
}
15861626
}
15871627

15881628
public enum UserType {
@@ -1605,6 +1645,26 @@ public class Tb {
16051645
public String getName() {
16061646
return this.name;
16071647
}
1648+
public UserType parseValue(Short value) {
1649+
if (value != null) {
1650+
for (UserType item : values()) {
1651+
if (item.value.equals(value)) {
1652+
return item;
1653+
}
1654+
}
1655+
}
1656+
return null;
1657+
}
1658+
public UserType parseName(String name) {
1659+
if (name != null) {
1660+
for (UserType item : values()) {
1661+
if (item.name.equals(name)) {
1662+
return item;
1663+
}
1664+
}
1665+
}
1666+
return null;
1667+
}
16081668
}
16091669
}
16101670
```

0 commit comments

Comments
 (0)