Commit 7e007d18 by jianan

出账检核-增加币种49

parent 58d0380b
package com.yd.csf.service.enums; package com.yd.csf.service.enums;
import org.apache.commons.lang3.StringUtils;
/** /**
* 项目类型码枚举 * 项目类型码枚举
* XS("销售佣金", "1") * XS("销售佣金", "1")
...@@ -47,11 +49,11 @@ public enum FortuneTypeEnum { ...@@ -47,11 +49,11 @@ public enum FortuneTypeEnum {
* @return 对应的枚举实例 * @return 对应的枚举实例
*/ */
public static FortuneTypeEnum getByItemValue(String itemValue) { public static FortuneTypeEnum getByItemValue(String itemValue) {
if (itemValue == null) { if (StringUtils.isBlank(itemValue)) {
return null; throw new IllegalArgumentException("itemValue is blank");
} }
for (FortuneTypeEnum type : FortuneTypeEnum.values()) { for (FortuneTypeEnum type : FortuneTypeEnum.values()) {
if (type.getItemValue().equals(itemValue)) { if (type.itemValue.equals(itemValue)) {
return type; return type;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment