dongyukun
6 天以前 ed8fc5f674544d3af63c6f68093ffc038385c493
提交 | 用户 | 时间
bb2880 1 package com.iailab.module.bpm.framework.flowable.core.candidate.strategy.user;
e7c126 2
bb2880 3 import cn.hutool.core.text.StrPool;
e7c126 4 import com.iailab.framework.common.util.string.StrUtils;
H 5 import com.iailab.module.bpm.framework.flowable.core.candidate.BpmTaskCandidateStrategy;
6 import com.iailab.module.bpm.framework.flowable.core.enums.BpmTaskCandidateStrategyEnum;
7 import com.iailab.module.system.api.user.AdminUserApi;
8 import org.springframework.stereotype.Component;
9
10 import javax.annotation.Resource;
bb2880 11 import java.util.LinkedHashSet;
e7c126 12
H 13 /**
14  * 用户 {@link BpmTaskCandidateStrategy} 实现类
15  *
bb2880 16  * @author hou
e7c126 17  */
H 18 @Component
19 public class BpmTaskCandidateUserStrategy implements BpmTaskCandidateStrategy {
20
21     @Resource
22     private AdminUserApi adminUserApi;
23
24     @Override
25     public BpmTaskCandidateStrategyEnum getStrategy() {
26         return BpmTaskCandidateStrategyEnum.USER;
27     }
28
29     @Override
30     public void validateParam(String param) {
bb2880 31         adminUserApi.validateUserList(StrUtils.splitToLongSet(param)).checkError();
e7c126 32     }
H 33
34     @Override
bb2880 35     public LinkedHashSet<Long> calculateUsers(String param) {
H 36         return new LinkedHashSet<>(StrUtils.splitToLong(param, StrPool.COMMA));
e7c126 37     }
H 38
39 }