REQ-3502: 过滤流程按钮
This commit is contained in:
parent
cf9534c153
commit
33d74b754d
@ -13,7 +13,6 @@ import cn.axzo.workflow.common.model.request.bpmn.BpmnButtonMetaInfo;
|
||||
import cn.axzo.workflow.common.model.response.bpmn.task.BpmnTaskButtonVo;
|
||||
import cn.axzo.workflow.common.model.response.bpmn.task.BpmnTaskButtonVo.BpmnButtonMetaInfoWithVisibleScope;
|
||||
import com.google.common.collect.Sets;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@ -136,10 +135,6 @@ class WorkflowTodoCardButtonInterceptor implements CardButtonInterceptor {
|
||||
}
|
||||
|
||||
private Set<String> getWorkflowHideButtonKeys() {
|
||||
return getWorkflowHideButtonKeys(taskInfo);
|
||||
}
|
||||
|
||||
static Set<String> getWorkflowHideButtonKeys(BpmnTaskButtonVo taskInfo) {
|
||||
List<BpmnButtonMetaInfo> workflowHiddenButtons = taskInfo.getCustomHiddenButtons();
|
||||
if (workflowHiddenButtons == null)
|
||||
workflowHiddenButtons = Collections.emptyList();
|
||||
@ -148,19 +143,4 @@ class WorkflowTodoCardButtonInterceptor implements CardButtonInterceptor {
|
||||
.collect(toSet());
|
||||
}
|
||||
|
||||
static Set<WorkflowButtonInfo> getTaskInfo(BpmnTaskButtonVo taskInfo) {
|
||||
List<BpmnButtonMetaInfoWithVisibleScope> workflowHiddenButtons = taskInfo.getButtons();
|
||||
if (workflowHiddenButtons == null)
|
||||
workflowHiddenButtons = Collections.emptyList();
|
||||
return workflowHiddenButtons.stream()
|
||||
.map(btn -> new WorkflowButtonInfo(btn.getBtnKey(), btn.getVisibleScopes()))
|
||||
.collect(toSet());
|
||||
}
|
||||
|
||||
@Getter
|
||||
@RequiredArgsConstructor
|
||||
public static class WorkflowButtonInfo {
|
||||
private final String btnKey;
|
||||
private final List<ButtonVisibleScopeEnum> scopes;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user