|
|
|
@ -1,7 +1,7 @@ |
|
|
|
|
package cn.iocoder.yudao.module.bpm.enums.definition; |
|
|
|
|
|
|
|
|
|
import cn.hutool.core.util.ArrayUtil; |
|
|
|
|
import cn.iocoder.yudao.framework.common.core.IntArrayValuable; |
|
|
|
|
import cn.iocoder.yudao.framework.common.core.ArrayValuable; |
|
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
|
import lombok.Getter; |
|
|
|
|
|
|
|
|
@ -14,7 +14,7 @@ import java.util.Arrays; |
|
|
|
|
*/ |
|
|
|
|
@Getter |
|
|
|
|
@AllArgsConstructor |
|
|
|
|
public enum BpmTriggerTypeEnum implements IntArrayValuable { |
|
|
|
|
public enum BpmTriggerTypeEnum implements ArrayValuable<Integer> { |
|
|
|
|
|
|
|
|
|
HTTP_REQUEST(1, "发起 HTTP 请求"); |
|
|
|
|
|
|
|
|
@ -28,14 +28,15 @@ public enum BpmTriggerTypeEnum implements IntArrayValuable { |
|
|
|
|
*/ |
|
|
|
|
private final String desc; |
|
|
|
|
|
|
|
|
|
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmTriggerTypeEnum::getType).toArray(); |
|
|
|
|
public static final Integer[] ARRAYS = Arrays.stream(values()).map(BpmTriggerTypeEnum::getType).toArray(Integer[]::new); |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public int[] array() { |
|
|
|
|
public Integer[] array() { |
|
|
|
|
return ARRAYS; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static BpmTriggerTypeEnum typeOf(Integer type) { |
|
|
|
|
return ArrayUtil.firstMatch(item -> item.getType().equals(type), values()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|