1
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package com.ruoyi.erp.domain;
|
||||
|
||||
import java.io.IOException; /**
|
||||
* 验货费规则
|
||||
*/
|
||||
public enum AssumeRule {
|
||||
BUYER, SELLER;
|
||||
|
||||
public String toValue() {
|
||||
switch (this) {
|
||||
case BUYER: return "buyer";
|
||||
case SELLER: return "seller";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static AssumeRule forValue(String value) throws IOException {
|
||||
if (value.equals("buyer")) return BUYER;
|
||||
if (value.equals("seller")) return SELLER;
|
||||
throw new IOException("Cannot deserialize AssumeRule");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user