# ServiceRequestCenterNotifyEnum.java

    package cloud.wconnect.it.cons.servicerequestcenter;

    import lombok.AllArgsConstructor;
    import lombok.Getter;
    import org.apache.logging.log4j.util.Strings;

    import java.util.Arrays;

    @Getter
    @AllArgsConstructor
    public enum ServiceRequestCenterNotifyEnum {

        // 1.添加备注，2.open，3.in progress，4.resolve，6.reopen，7.变更责任人，8.变更类型，9.待分配通知，10.系统自动关闭
        OPERATION_COMMENT(1, "service-request-center.notify.comment"),
        OPERATION_OPEN(2, "service-request-center.notify.open"),
        OPERATION_IN_PROGRESS(3, "service-request-center.notify.in-progress"),
        OPERATION_RESOLVE(4, "service-request-center.notify.resolve"),
        OPERATION_REOPEN(6, "service-request-center.notify.reopen"),
        OPERATION_CHANGE_DUTY_USER(7, "service-request-center.notify.change-duty-user"),
        OPERATION_CHANGE_TYPE(8, "service-request-center.notify.change-type"),
        TO_BE_ASSIGNED(9, "service-request-center.notify.to-be-assigned"),
        AUTO_CLOSED(10, "service-request-center.notify.auto-closed");

        private final int code;

        private final String i18nCode;

        public static String getI18nCode(int code) {
            return Arrays.stream(ServiceRequestCenterNotifyEnum.values())
                    .filter(item -> item.getCode() == code)
                    .findFirst()
                    .map(ServiceRequestCenterNotifyEnum::getI18nCode)
                    .orElse(Strings.EMPTY);
        }

    }