Skip to content

Commit

Permalink
【同步】BOOT 和 CLOUD 的功能
Browse files Browse the repository at this point in the history
  • Loading branch information
YunaiV committed Nov 23, 2024
1 parent 2031f42 commit 18b63f4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate;

import cn.hutool.core.collection.ListUtil;
import cn.hutool.core.map.MapUtil;
import cn.hutool.extra.spring.SpringUtil;
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
Expand Down Expand Up @@ -64,7 +65,7 @@ public class BpmTaskCandidateInvokerTest extends BaseMockitoUnitTest {
public void setUp() {
userStrategy = new BpmTaskCandidateUserStrategy(); // 创建 strategy 实例
when(emptyStrategy.getStrategy()).thenReturn(BpmTaskCandidateStrategyEnum.ASSIGN_EMPTY);
strategyList = List.of(userStrategy, emptyStrategy); // 创建 strategyList
strategyList = ListUtil.of(userStrategy, emptyStrategy); // 创建 strategyList
taskCandidateInvoker = new BpmTaskCandidateInvoker(strategyList, adminUserApi);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.strategy.dept;

import cn.hutool.core.collection.ListUtil;
import cn.hutool.core.map.MapUtil;
import cn.iocoder.yudao.framework.test.core.ut.BaseMockitoUnitTest;
import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnVariableConstants;
Expand Down Expand Up @@ -41,7 +42,7 @@ public void testCalculateUsersByTask() {
// mock 方法(FlowableUtils)
Map<String, Object> processVariables = new HashMap<>();
processVariables.put(BpmnVariableConstants.PROCESS_INSTANCE_VARIABLE_START_USER_SELECT_ASSIGNEES,
MapUtil.of("activity_001", List.of(1L, 2L)));
MapUtil.of("activity_001", ListUtil.of(1L, 2L)));
when(processInstance.getProcessVariables()).thenReturn(processVariables);

// 调用
Expand All @@ -56,7 +57,7 @@ public void testCalculateUsersByActivity() {
String activityId = "activity_001";
Map<String, Object> processVariables = new HashMap<>();
processVariables.put(BpmnVariableConstants.PROCESS_INSTANCE_VARIABLE_START_USER_SELECT_ASSIGNEES,
MapUtil.of("activity_001", List.of(1L, 2L)));
MapUtil.of("activity_001", ListUtil.of(1L, 2L)));

// 调用
Set<Long> userIds = strategy.calculateUsersByActivity(null, activityId, null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import jakarta.validation.constraints.AssertTrue;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import javax.validation.constraints.AssertTrue;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
Expand Down

0 comments on commit 18b63f4

Please sign in to comment.