1
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package com.ruoyi.erp.domain;
|
||||
|
||||
import java.io.IOException; /**
|
||||
* 交易规则
|
||||
*/
|
||||
public enum TradeRule {
|
||||
YHB_ONLY, YHB_OPTIONAL;
|
||||
|
||||
public String toValue() {
|
||||
switch (this) {
|
||||
case YHB_ONLY: return "yhbOnly";
|
||||
case YHB_OPTIONAL: return "yhbOptional";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static TradeRule forValue(String value) throws IOException {
|
||||
if (value.equals("yhbOnly")) return YHB_ONLY;
|
||||
if (value.equals("yhbOptional")) return YHB_OPTIONAL;
|
||||
throw new IOException("Cannot deserialize TradeRule");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user