|
|
|
@ -34,29 +34,29 @@ public enum ChannelType {
|
|
|
|
|
/**
|
|
|
|
|
* 编码值
|
|
|
|
|
*/
|
|
|
|
|
private Integer code;
|
|
|
|
|
private final Integer code;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 描述
|
|
|
|
|
*/
|
|
|
|
|
private String description;
|
|
|
|
|
private final String description;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 内容模型Class
|
|
|
|
|
*/
|
|
|
|
|
private Class contentModelClass;
|
|
|
|
|
private final Class<? extends ContentModel> contentModelClass;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 英文标识
|
|
|
|
|
*/
|
|
|
|
|
private String codeEn;
|
|
|
|
|
private final String codeEn;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 通过code获取class
|
|
|
|
|
* @param code
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public static Class getChanelModelClassByCode(Integer code) {
|
|
|
|
|
public static Class<? extends ContentModel> getChanelModelClassByCode(Integer code) {
|
|
|
|
|
ChannelType[] values = values();
|
|
|
|
|
for (ChannelType value : values) {
|
|
|
|
|
if (value.getCode().equals(code)) {
|
|
|
|
|