门禁开门计费逻辑调整
This commit is contained in:
42
entity/src/main/java/com/enums/PayStyleEnum.java
Normal file
42
entity/src/main/java/com/enums/PayStyleEnum.java
Normal file
@@ -0,0 +1,42 @@
|
||||
package com.enums;
|
||||
|
||||
/**
|
||||
* Enum - 篮球场结算方式
|
||||
*
|
||||
*/
|
||||
public enum PayStyleEnum {
|
||||
TIME(0, "按次"),
|
||||
HOUR(1, "按时");
|
||||
public Integer value;
|
||||
public String name;
|
||||
|
||||
PayStyleEnum(Integer value, String name) {
|
||||
this.value = value;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Integer getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(Integer value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public static PayStyleEnum getByValue(Integer value) {
|
||||
for (PayStyleEnum type : PayStyleEnum.values()) {
|
||||
if (type.value.equals(value)) {
|
||||
return type;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user