|
|
@ -1,6 +1,6 @@ |
|
|
|
package com.epmet.commons.tools.enums; |
|
|
|
|
|
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
|
import java.util.Objects; |
|
|
|
|
|
|
|
/** |
|
|
|
* @author Administrator |
|
|
@ -22,11 +22,11 @@ public enum ChannelEnum { |
|
|
|
public static String getName(String code) { |
|
|
|
ChannelEnum[] houseTypeEnums = values(); |
|
|
|
for (ChannelEnum houseTypeEnum : houseTypeEnums) { |
|
|
|
if (houseTypeEnum.getCode() == code) { |
|
|
|
if (Objects.equals(houseTypeEnum.getCode(), code)) { |
|
|
|
return houseTypeEnum.getName(); |
|
|
|
} |
|
|
|
} |
|
|
|
return EpmetErrorCode.SERVER_ERROR.getMsg(); |
|
|
|
return null; |
|
|
|
} |
|
|
|
|
|
|
|
public static String getCode(String name) { |
|
|
|