REQ-3201: 添加校验

This commit is contained in:
yanglin 2024-12-20 14:33:36 +08:00
parent 8058e3dac6
commit 9546484fc6

View File

@ -1,6 +1,7 @@
package cn.axzo.msg.center.service;
import cn.axzo.msg.center.service.enums.PresetButtonType;
import cn.axzo.msg.center.service.enums.RouterCategoryEnum;
/**
* @author yanglin
@ -19,6 +20,8 @@ public interface ButtonV3 {
Boolean getExecutorShow();
RouterCategoryEnum getCategory();
default boolean determineIsPendingShow() {
return getPendingShow() != null && getPendingShow();
}
@ -28,7 +31,7 @@ public interface ButtonV3 {
}
default boolean isPerformActionAvailable() {
return determineIsPendingShow();
return determineIsPendingShow() || getCategory() == RouterCategoryEnum.PRESET_BUTTON;
}
}