mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
系统管理:通知公告来源枚举补充
This commit is contained in:
+38
@@ -0,0 +1,38 @@
|
||||
package com.cf.imes.module.system.enums.notice;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 通知公告来源
|
||||
*
|
||||
* @author Gqr
|
||||
* @since 2024/7/5 9:25
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum NoticeSourceEnum {
|
||||
/**
|
||||
* 内置
|
||||
*/
|
||||
SYSTEM(0),
|
||||
/**
|
||||
* 自定义
|
||||
*/
|
||||
CUSTOM(1);
|
||||
|
||||
@EnumValue
|
||||
private final Integer source;
|
||||
|
||||
@JsonCreator
|
||||
public static NoticeSourceEnum fromSource(Integer source) {
|
||||
for (NoticeSourceEnum value : values()) {
|
||||
if (value.getSource().equals(source)) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user