16 | * 优化点 17 | * 函数调用缓存调用链路待完成(待完成) 18 | *
19 | * 函数返回值可以不确定,创建变量时指定 uncertain
20 | */
21 | public void init() {
22 |
23 | }
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/rule-engine-open-compute/src/main/java/cn/ruleengine/compute/function/GetTheDayOfTheWeekFunction.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.compute.function;
2 |
3 | import cn.hutool.core.date.DateUtil;
4 | import cn.ruleengine.core.annotation.Executor;
5 | import cn.ruleengine.core.annotation.Function;
6 |
7 |
8 | /**
9 | * 〈一句话功能简述〉
10 | * 〈〉
11 | *
12 | * @author dingqianwen
13 | * @date 2021/2/24
14 | * @since 1.0.0
15 | */
16 | @Function(name = "获取今天星期几")
17 | public class GetTheDayOfTheWeekFunction {
18 |
19 | @Executor
20 | public String executor() {
21 | return DateUtil.thisDayOfWeekEnum().toChinese();
22 | }
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/rule-engine-open-compute/src/main/java/cn/ruleengine/compute/function/GetUUIDFunction.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.compute.function;
2 |
3 | import cn.ruleengine.core.annotation.Executor;
4 | import cn.ruleengine.core.annotation.Function;
5 | import lombok.extern.slf4j.Slf4j;
6 |
7 | import java.util.UUID;
8 |
9 | /**
10 | * 〈一句话功能简述〉
11 | * 〈〉
12 | * 返回一个随机UUID字符串。
13 | *
14 | * @author dingqianwen
15 | * @date 2021/2/9
16 | * @since 1.0.0
17 | */
18 | @Function
19 | @Slf4j
20 | public class GetUUIDFunction {
21 |
22 | @Executor
23 | public String executor() {
24 | return UUID.randomUUID().toString();
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/rule-engine-open-compute/src/main/java/cn/ruleengine/compute/function/LetterToLowerCaseFunction.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.compute.function;
2 |
3 | import cn.ruleengine.core.annotation.Executor;
4 | import cn.ruleengine.core.annotation.Function;
5 | import cn.ruleengine.core.annotation.Param;
6 |
7 | /**
8 | * 〈一句话功能简述〉
9 | * 〈〉
10 | * 字母转小写
11 | *
12 | * @author 丁乾文
13 | * @date 2020/12/24
14 | * @since 1.0.0
15 | */
16 | @Function
17 | public class LetterToLowerCaseFunction {
18 |
19 | @Executor
20 | public String executor(@Param(value = "letter",required = false) String letter) {
21 | if (letter == null) {
22 | return null;
23 | }
24 | return letter.toLowerCase();
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/rule-engine-open-compute/src/main/java/cn/ruleengine/compute/function/LetterToUpperCaseFunction.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.compute.function;
2 |
3 | import cn.ruleengine.core.annotation.Executor;
4 | import cn.ruleengine.core.annotation.Function;
5 | import cn.ruleengine.core.annotation.Param;
6 |
7 | /**
8 | * 〈一句话功能简述〉
9 | * 〈〉
10 | * 字母转大写
11 | *
12 | * @author 丁乾文
13 | * @date 2020/12/24
14 | * @since 1.0.0
15 | */
16 | @Function
17 | public class LetterToUpperCaseFunction {
18 |
19 | @Executor
20 | public String executor(@Param(value = "letter",required = false) String letter) {
21 | if (letter == null) {
22 | return null;
23 | }
24 | return letter.toUpperCase();
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/rule-engine-open-compute/src/main/java/cn/ruleengine/compute/function/StringConcatFunction.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.compute.function;
2 |
3 | import cn.ruleengine.core.annotation.Executor;
4 | import cn.ruleengine.core.annotation.Function;
5 | import cn.ruleengine.core.annotation.Param;
6 | import lombok.extern.slf4j.Slf4j;
7 |
8 |
9 | /**
10 | * 〈一句话功能简述〉
11 | * 〈〉
12 | *
13 | * 字符串拼接
14 | *
15 | * @author dingqianwen
16 | * @date 2021/2/9
17 | * @since 1.0.0
18 | */
19 | @Slf4j
20 | @Function
21 | public class StringConcatFunction {
22 |
23 | @Executor
24 | public String executor(@Param(value = "source") String source,
25 | @Param(value = "target", required = false) String target) {
26 | return source.concat(target);
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/rule-engine-open-compute/src/main/java/cn/ruleengine/compute/function/StringReplaceFunction.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.compute.function;
2 |
3 | import cn.ruleengine.core.annotation.Executor;
4 | import cn.ruleengine.core.annotation.Function;
5 | import lombok.Data;
6 | import lombok.extern.slf4j.Slf4j;
7 |
8 | import javax.validation.Valid;
9 | import javax.validation.constraints.NotNull;
10 |
11 | /**
12 | * 〈一句话功能简述〉
13 | *
14 | *
13 | *
14 | *
9 | * 服务类
10 | *
9 | * 服务类
10 | *
9 | * 服务类
10 | *
8 | * 服务类
9 | *
9 | * 服务类
10 | *
9 | * 服务类
10 | *
8 | * 工作空间 服务类
9 | *
13 | * 服务实现类
14 | *
13 | * 服务实现类
14 | *
13 | * 服务实现类
14 | *
12 | * 服务实现类
13 | *
13 | * 服务实现类
14 | *
13 | * 服务实现类
14 | *
12 | * 工作空间 服务实现类
13 | *
8 | * Mapper 接口
9 | *
9 | * Mapper 接口
10 | *
9 | * Mapper 接口
10 | *
8 | * Mapper 接口
9 | *
8 | * Mapper 接口
9 | *
8 | * Mapper 接口
9 | *
9 | * 工作空间 Mapper 接口
10 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package cn.ruleengine.core;
17 |
18 |
19 |
20 | /**
21 | * 〈一句话功能简述〉
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package cn.ruleengine.core.event;
17 |
18 | /**
19 | * 〈一句话功能简述〉
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package cn.ruleengine.core.listener;
17 |
18 | import cn.ruleengine.core.DataSupport;
19 |
20 | /**
21 | * 〈一句话功能简述〉
18 | * 默认
19 | */
20 | SUM,
21 | /**
22 | * 平均分值
23 | */
24 | AVG,
25 | /**
26 | * 所有卡片中最大的那个分值
27 | */
28 | MIN,
29 | /**
30 | * 所有卡片中最小的那个分值
31 | */
32 | MAX;
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/rule-engine-open-core/src/main/java/cn/ruleengine/core/scorecard/strategy/AvgStrategy.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.core.scorecard.strategy;
2 |
3 | import cn.ruleengine.core.Input;
4 | import cn.ruleengine.core.RuleEngineConfiguration;
5 | import cn.ruleengine.core.scorecard.Card;
6 |
7 | import java.math.BigDecimal;
8 | import java.util.List;
9 |
10 | /**
11 | * 〈AvgStrategy〉
12 | *
13 | * @author 丁乾文
14 | * @date 2019/8/13
15 | * @since 1.0.0
16 | */
17 | public class AvgStrategy implements ScoreCardStrategy {
18 |
19 | private static final AvgStrategy INSTANCE = new AvgStrategy();
20 |
21 | public static AvgStrategy getInstance() {
22 | return INSTANCE;
23 | }
24 |
25 | @Override
26 | public BigDecimal compute(List
7 | * 赋值操作,结果中使用
8 | *
9 | * action = 10
10 | *
11 | * @author 丁乾文
12 | * @date 2021/7/22 10:07 上午
13 | * @since 1.0.0
14 | */
15 | public class Assignment {
16 |
17 | Assignment() {
18 | }
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/annotation/NoLogin.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2020 dingqianwen (761945125@qq.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package cn.ruleengine.web.annotation;
17 |
18 | import java.lang.annotation.ElementType;
19 | import java.lang.annotation.Retention;
20 | import java.lang.annotation.RetentionPolicy;
21 | import java.lang.annotation.Target;
22 |
23 | /**
24 | * 〈一句话功能简述〉
18 | * *.r 为规则文件
19 | * *.dt 为决策表文件
20 | * *.rs 为规则集文件
21 | *
22 | * @param exportRequest e
23 | * @return e
24 | */
25 | ExportResponse exportFile(ExportRequest exportRequest);
26 | }
27 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/service/OperationRecordService.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.service;
2 |
3 | import cn.ruleengine.common.vo.PageRequest;
4 | import cn.ruleengine.common.vo.PageResult;
5 | import cn.ruleengine.web.vo.operation.record.OperationRecordRequest;
6 | import cn.ruleengine.web.vo.operation.record.OperationRecordResponse;
7 |
8 | /**
9 | * 〈OperationRecordService〉
10 | *
11 | * @author 丁乾文
12 | * @date 2021/9/9 3:57 下午
13 | * @since 1.0.0
14 | */
15 | public interface OperationRecordService {
16 |
17 | /**
18 | * 保存操作记录
19 | *
20 | * @param description 描述
21 | * @param dataId id
22 | * @param dataType type
23 | */
24 | void save(String description, Integer dataId, Integer dataType);
25 |
26 | /**
27 | * 操作记录
28 | *
29 | * @param recordRequestPageRequest r
30 | * @return r
31 | */
32 | PageResult
13 | *
14 | *
13 | *
14 | *
13 | *
14 | *
13 | *
14 | *
14 | *
15 | *
9 | * 服务类
10 | *
9 | * 服务类
10 | *
9 | * 服务类
10 | *
8 | * 用户数据权限表 服务类
9 | *
8 | * 服务类
9 | *
9 | * 服务类
10 | *
9 | * 服务类
10 | *
9 | * 服务类
10 | *
8 | * 服务类
9 | *
8 | * 服务类
9 | *
9 | * 服务类
10 | *
8 | * 服务类
9 | *
8 | * 服务类
9 | *
9 | * 服务类
10 | *
8 | * 规则引擎用户表 服务类
9 | *
8 | * 用户工作空间 服务类
9 | *
9 | * 服务类
10 | *
8 | * 工作空间 服务类
9 | *
12 | * 服务实现类
13 | *
12 | * 服务实现类
13 | *
12 | * 服务实现类
13 | *
11 | * 用户数据权限表 服务实现类
12 | *
11 | * 服务实现类
12 | *
12 | * 服务实现类
13 | *
12 | * 服务实现类
13 | *
12 | * 服务实现类
13 | *
11 | * 服务实现类
12 | *
11 | * 服务实现类
12 | *
12 | * 服务实现类
13 | *
11 | * 服务实现类
12 | *
11 | * 服务实现类
12 | *
11 | * 服务实现类
12 | *
11 | * 规则引擎用户表 服务实现类
12 | *
11 | * 用户工作空间 服务实现类
12 | *
12 | * 服务实现类
13 | *
11 | * 工作空间 服务实现类
12 | *
8 | * Mapper 接口
9 | *
9 | * Mapper 接口
10 | *
9 | * 用户数据权限表 Mapper 接口
10 | *
9 | * Mapper 接口
10 | *
8 | * Mapper 接口
9 | *
9 | * Mapper 接口
10 | *
9 | * Mapper 接口
10 | *
8 | * Mapper 接口
9 | *
8 | * Mapper 接口
9 | *
8 | * Mapper 接口
9 | *
8 | * Mapper 接口
9 | *
9 | * Mapper 接口
10 | *
8 | * Mapper 接口
9 | *
8 | * 规则引擎用户表 Mapper 接口
9 | *
8 | * Mapper 接口
9 | *
13 | * 〈〉
14 | *
15 | * @author 丁乾文
16 | * @date 2020/11/18
17 | * @since 1.0.0
18 | */
19 | @Slf4j
20 | @Function
21 | public class StringReplaceFunction {
22 |
23 | @Executor
24 | public String executor(@Valid Params params) {
25 | String value = params.getValue();
26 | if (value == null) {
27 | return null;
28 | }
29 | String replacement = params.getReplacement();
30 | return value.replace(params.getTarget(), replacement);
31 | }
32 |
33 | @Data
34 | public static class Params {
35 |
36 | private String value;
37 |
38 | @NotNull
39 | private String target;
40 |
41 | @NotNull
42 | private String replacement;
43 |
44 | }
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/rule-engine-open-compute/src/main/java/cn/ruleengine/compute/function/TimeOfDayFunction.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.compute.function;
2 |
3 | import cn.ruleengine.core.annotation.Executor;
4 | import cn.ruleengine.core.annotation.Function;
5 |
6 | import java.text.SimpleDateFormat;
7 | import java.util.Date;
8 |
9 | /**
10 | * 〈一句话功能简述〉
11 | * 〈〉
12 | *
13 | * @author dingqianwen
14 | * @date 2021/2/24
15 | * @since 1.0.0
16 | */
17 | @Function(name = "当前时间段")
18 | public class TimeOfDayFunction {
19 |
20 | @Executor
21 | public String executor() {
22 | Date date = new Date();
23 | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("HH");
24 | int hour = Integer.parseInt(simpleDateFormat.format(date));
25 | if (hour >= 0 && hour < 6) {
26 | return "凌晨";
27 | }
28 | if (hour >= 6 && hour < 11) {
29 | return "上午";
30 | }
31 | // 中午是11时至13时。太阳在子午线上方时为正午,一般是12时左右
32 | if (hour >= 11 && hour < 13) {
33 | return "中午";
34 | }
35 | if (hour >= 13 && hour <= 18) {
36 | return "下午";
37 | }
38 | return "晚上";
39 | }
40 |
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/rule-engine-open-compute/src/main/java/cn/ruleengine/compute/function/json/ParseJsonStringFunction.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.compute.function.json;
2 |
3 |
4 | import cn.hutool.core.lang.Validator;
5 | import cn.ruleengine.core.annotation.Executor;
6 | import cn.ruleengine.core.annotation.Function;
7 | import cn.ruleengine.core.annotation.Param;
8 | import lombok.extern.slf4j.Slf4j;
9 |
10 |
11 | /**
12 | * 〈一句话功能简述〉
13 | * 〈〉
14 | * 获取JSON中指定的值返回STRING类型
15 | *
16 | * @author 丁乾文
17 | * @date 2020/12/13
18 | * @since 1.0.0
19 | */
20 | @Slf4j
21 | @Function
22 | public class ParseJsonStringFunction implements JsonEval {
23 |
24 | @Executor
25 | public String executor(@Param(value = "jsonString", required = false) String jsonString,
26 | @Param(value = "jsonValuePath", required = false) String jsonValuePath) {
27 | Object value = this.eval(jsonString, jsonValuePath);
28 | // 返回null 而不是String.valueOf后的null字符
29 | if (Validator.isEmpty(value)) {
30 | return null;
31 | }
32 | return String.valueOf(value);
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/rule-engine-open-compute/src/main/java/cn/ruleengine/compute/listener/body/GeneralRuleMessageBody.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.compute.listener.body;
2 |
3 | import lombok.Data;
4 |
5 | import java.io.Serializable;
6 |
7 | /**
8 | * 〈一句话功能简述〉
9 | * 〈〉
10 | *
11 | * @author dingqianwen
12 | * @date 2020/7/16
13 | * @since 1.0.0
14 | */
15 | @Data
16 | public class GeneralRuleMessageBody implements Serializable {
17 |
18 | private static final long serialVersionUID = 1L;
19 |
20 | private Type type;
21 |
22 | private String workspaceCode;
23 |
24 | private Integer workspaceId;
25 |
26 | private String ruleCode;
27 |
28 | public enum Type {
29 | /**
30 | * 规则加载,以及移除
31 | */
32 | LOAD, UPDATE, REMOVE
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/rule-engine-open-compute/src/main/java/cn/ruleengine/compute/listener/body/VariableMessageBody.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.compute.listener.body;
2 |
3 | import lombok.Data;
4 |
5 | import java.io.Serializable;
6 |
7 | /**
8 | * 〈一句话功能简述〉
9 | * 〈〉
10 | *
11 | * @author dingqianwen
12 | * @date 2020/7/17
13 | * @since 1.0.0
14 | */
15 | @Data
16 | public class VariableMessageBody implements Serializable {
17 |
18 | private static final long serialVersionUID = 1L;
19 |
20 | private Type type;
21 |
22 | private Integer id;
23 |
24 | public enum Type {
25 | /**
26 | * 规则加载,以及移除
27 | */
28 | LOAD, REMOVE, UPDATE
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/rule-engine-open-compute/src/main/java/cn/ruleengine/compute/service/FunctionService.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.compute.service;
2 |
3 | import cn.ruleengine.compute.vo.ExecuteFunctionRequest;
4 |
5 | /**
6 | * 〈FunctionService〉
7 | *
8 | * @author 丁乾文
9 | * @date 2021/6/17 10:18 下午
10 | * @since 1.0.0
11 | */
12 | public interface FunctionService {
13 |
14 | /**
15 | * 函数模拟测试
16 | *
17 | * @param executeTestRequest 函数入参值
18 | * @return result
19 | */
20 | Object run(ExecuteFunctionRequest executeTestRequest);
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/rule-engine-open-compute/src/main/java/cn/ruleengine/compute/service/GeneralRulePublishService.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.compute.service;
2 |
3 | import cn.ruleengine.core.rule.GeneralRule;
4 |
5 | import java.util.List;
6 |
7 | /**
8 | * 〈一句话功能简述〉
9 | * 〈〉
10 | *
11 | * @author dingqianwen
12 | * @date 2020/9/4
13 | * @since 1.0.0
14 | */
15 | public interface GeneralRulePublishService {
16 |
17 | /**
18 | * 获取所有的线上规则
19 | *
20 | * @return rule
21 | */
22 | List
8 | * 〈〉
9 | *
10 | * @author dingqianwen
11 | * @date 2020/8/26
12 | * @since 1.0.0
13 | */
14 | public interface RunTestService {
15 |
16 | /**
17 | * 模拟运行
18 | *
19 | * @param runTestRequest 参数信息
20 | * @return result
21 | */
22 | Object run(RunTestRequest runTestRequest);
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/rule-engine-open-compute/src/main/java/cn/ruleengine/compute/service/VariableResolveService.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.compute.service;
2 |
3 | import cn.ruleengine.core.value.Value;
4 |
5 | import java.util.Map;
6 |
7 | /**
8 | * 〈一句话功能简述〉
9 | * 〈〉
10 | *
11 | * @author dingqianwen
12 | * @date 2020/7/17
13 | * @since 1.0.0
14 | */
15 | public interface VariableResolveService {
16 |
17 | /**
18 | * 获取所有的变量/函数配置信息
19 | *
20 | * @return 变量
21 | */
22 | Map
8 | * 〈〉
9 | *
10 | * @author 丁乾文
11 | * @date 2020/11/21
12 | * @since 1.0.0
13 | */
14 | public interface WorkspaceService {
15 |
16 | /**
17 | * 当前工作空间AccessKey
18 | *
19 | * @param code 工作空间code
20 | * @return accessKey
21 | */
22 | AccessKey accessKey(String code);
23 |
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/rule-engine-open-compute/src/main/java/cn/ruleengine/compute/store/entity/RuleEngineFunction.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.compute.store.entity;
2 |
3 | import com.baomidou.mybatisplus.annotation.*;
4 | import lombok.Data;
5 | import lombok.EqualsAndHashCode;
6 | import lombok.experimental.Accessors;
7 |
8 | import java.io.Serializable;
9 | import java.util.Date;
10 |
11 | /**
12 | *
8 | * 〈〉
9 | *
10 | * @author 丁乾文
11 | * @date 2020/12/11
12 | * @since 1.0.0
13 | */
14 | @Data
15 | public class AccessKey {
16 |
17 | private Integer id;
18 | private String accessKeyId;
19 | private String accessKeySecret;
20 |
21 | /**
22 | * 对比AccessKey
23 | *
24 | * @param accessKeyId id
25 | * @param accessKeySecret Secret
26 | */
27 | public boolean equals(String accessKeyId, String accessKeySecret) {
28 | if (accessKeyId == null || accessKeySecret == null) {
29 | return false;
30 | }
31 | if (!this.accessKeyId.equals(accessKeyId)) {
32 | return false;
33 | }
34 | return this.accessKeySecret.equals(accessKeySecret);
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/rule-engine-open-compute/src/main/java/cn/ruleengine/compute/vo/BatchExecuteResponse.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.compute.vo;
2 |
3 | import lombok.Data;
4 | import org.springframework.lang.Nullable;
5 |
6 | /**
7 | * 〈一句话功能简述〉
8 | * 〈〉
9 | *
10 | * @author dingqianwen
11 | * @date 2020/8/22
12 | * @since 1.0.0
13 | */
14 | @Data
15 | public class BatchExecuteResponse {
16 |
17 |
18 | /**
19 | * 规则执行状态,是否执行成功,或者遇到了异常
20 | */
21 | private Boolean isDone = true;
22 | /**
23 | * isDone=false规则执行错误消息
24 | */
25 | private String message;
26 |
27 | /**
28 | * 标记规则使用,防止传入规则与规则输出结果顺序错误时
29 | * 通过此标记区分
30 | */
31 | @Nullable
32 | private String symbol;
33 |
34 | /**
35 | * 规则执行结果
36 | */
37 | private Object output;
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/rule-engine-open-compute/src/main/java/cn/ruleengine/compute/vo/ExecuteFunctionRequest.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.compute.vo;
2 |
3 | import lombok.Data;
4 |
5 | import javax.validation.constraints.NotNull;
6 | import java.util.ArrayList;
7 | import java.util.List;
8 |
9 | /**
10 | * 〈一句话功能简述〉
11 | * 〈〉
12 | *
13 | * @author 丁乾文
14 | * @date 2020/12/12
15 | * @since 1.0.0
16 | */
17 | @Data
18 | public class ExecuteFunctionRequest {
19 |
20 | @NotNull(message = "函数ID不能为空")
21 | private Integer id;
22 |
23 | /**
24 | * 运行入参
25 | */
26 | private List
11 | * 〈〉
12 | *
13 | * @author dingqianwen
14 | * @date 2020/7/16
15 | * @since 1.0.0
16 | */
17 | @Data
18 | public class ExecuteRequest {
19 |
20 | @NotEmpty(message = "工作空间编码不能为空")
21 | private String workspaceCode;
22 |
23 | @NotEmpty(message = "工作空间AccessKeyId不能为空")
24 | private String accessKeyId;
25 |
26 | @NotEmpty(message = "工作空间AccessKeySecret不能为空")
27 | private String accessKeySecret;
28 |
29 | @NotEmpty(message = "规则编码不能为空")
30 | private String code;
31 |
32 | private Map
9 | * 〈〉
10 | *
11 | * @author 丁乾文
12 | * @date 2020/12/13
13 | * @since 1.0.0
14 | */
15 | @Data
16 | public class IsExistsRequest {
17 |
18 | @NotBlank
19 | private String code;
20 | @NotBlank
21 | private String workspaceCode;
22 | @NotBlank
23 | private String accessKeyId;
24 | @NotBlank
25 | private String accessKeySecret;
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/rule-engine-open-compute/src/main/java/cn/ruleengine/compute/vo/ParamValue.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.compute.vo;
2 |
3 | import lombok.Data;
4 |
5 | import javax.validation.constraints.NotBlank;
6 | import javax.validation.constraints.NotNull;
7 |
8 | /**
9 | * 〈一句话功能简述〉
10 | * 〈〉
11 | *
12 | * @author dingqianwen
13 | * @date 2020/8/30
14 | * @since 1.0.0
15 | */
16 | @Data
17 | public class ParamValue {
18 |
19 | private String name;
20 |
21 | @NotBlank
22 | private String code;
23 |
24 | /**
25 | * 规则参数/变量/固定值
26 | */
27 | @NotNull
28 | private Integer type;
29 |
30 | @NotNull
31 | private String value;
32 |
33 | /**
34 | * STRING,BOOLEAN...
35 | */
36 | @NotBlank
37 | private String valueType;
38 |
39 | private String valueName;
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/rule-engine-open-compute/src/main/java/cn/ruleengine/compute/vo/RunTestRequest.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.compute.vo;
2 |
3 | import lombok.Data;
4 |
5 | import javax.validation.constraints.NotBlank;
6 | import javax.validation.constraints.NotEmpty;
7 | import javax.validation.constraints.NotNull;
8 | import java.util.HashMap;
9 | import java.util.Map;
10 |
11 | /**
12 | * 〈一句话功能简述〉
13 | * 〈〉
14 | *
15 | * @author dingqianwen
16 | * @date 2020/7/16
17 | * @since 1.0.0
18 | */
19 | @Data
20 | public class RunTestRequest {
21 |
22 | /**
23 | * 规则id
24 | */
25 | @NotNull
26 | private Integer id;
27 |
28 | @NotBlank
29 | private String version;
30 |
31 | @NotEmpty
32 | private String workspaceCode;
33 |
34 | @NotEmpty
35 | private String code;
36 |
37 | private Map
22 | * 〈〉
23 | *
24 | * @author dingqianwen
25 | * @date 2020/8/10
26 | * @since 1.0.0
27 | */
28 | public interface Output {
29 |
30 | /**
31 | * 输出的参数值
32 | *
33 | * @return 输出值
34 | */
35 | Object getValue();
36 |
37 | /**
38 | * 规则输出值的classType
39 | *
40 | * @return 数据类型
41 | */
42 | Class> getClassType();
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/rule-engine-open-core/src/main/java/cn/ruleengine/core/Parameter.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.core;
2 |
3 | import lombok.Data;
4 |
5 | /**
6 | * 〈一句话功能简述〉
7 | * 〈〉
8 | *
9 | * @author 丁乾文
10 | * @date 2020/12/28
11 | * @since 1.0.0
12 | */
13 | @Data
14 | public class Parameter {
15 |
16 | /**
17 | * 规则参数名称
18 | */
19 | private String name;
20 |
21 | /**
22 | * 规则参数code
23 | */
24 | private String code;
25 |
26 | /**
27 | * 规则参数类型
28 | */
29 | private String valueType;
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/rule-engine-open-core/src/main/java/cn/ruleengine/core/condition/ConditionCompare.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.core.condition;
2 |
3 | import cn.ruleengine.core.Input;
4 | import cn.ruleengine.core.RuleEngineConfiguration;
5 |
6 | /**
7 | * 〈一句话功能简述〉
8 | * 〈〉
9 | *
10 | * @author 丁乾文
11 | * @date 2020/12/13
12 | * @since 1.0.0
13 | */
14 | public interface ConditionCompare {
15 |
16 | /**
17 | * 条件比较
18 | *
19 | * @param input 入参
20 | * @param configuration 引擎配置信息
21 | * @return 比较结果
22 | */
23 | boolean compare(Input input, RuleEngineConfiguration configuration);
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/rule-engine-open-core/src/main/java/cn/ruleengine/core/event/Endurance.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2020 dingqianwen (761945125@qq.com)
3 | *
20 | * 〈〉
21 | *
22 | * @author 丁乾文
23 | * @date 2020/12/12
24 | * @since 1.0.0
25 | */
26 | public interface Endurance {
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/rule-engine-open-core/src/main/java/cn/ruleengine/core/exception/FormulaException.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.core.exception;
2 |
3 | import cn.hutool.core.text.StrFormatter;
4 |
5 | /**
6 | * 〈FormulaException〉
7 | *
8 | * @author 丁乾文
9 | * @date 2021/7/19 1:27 下午
10 | * @since 1.0.0
11 | */
12 | public class FormulaException extends ValueException {
13 |
14 | private static final long serialVersionUID = -8751437968246403242L;
15 |
16 | public FormulaException(String message) {
17 | super(message);
18 | }
19 |
20 | public FormulaException(String message, Object... args) {
21 | super(StrFormatter.format(message, args));
22 | }
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/rule-engine-open-core/src/main/java/cn/ruleengine/core/listener/DefaultExecuteListener.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2020 dingqianwen (761945125@qq.com)
3 | *
22 | * 〈〉
23 | *
24 | * @author dingqianwen
25 | * @date 2020/8/16
26 | * @since 1.0.0
27 | */
28 | public class DefaultExecuteListener
25 | * 〈〉
26 | *
27 | * @author 丁乾文
28 | * @date 2021/6/17
29 | * @since 1.0.0
30 | */
31 | @Target(ElementType.METHOD)
32 | @Retention(RetentionPolicy.RUNTIME)
33 | public @interface NoLogin {
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/config/MybatisPlusConfig.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.config;
2 |
3 | import com.baomidou.mybatisplus.annotation.DbType;
4 | import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
5 | import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
6 | import org.springframework.context.annotation.Bean;
7 | import org.springframework.stereotype.Component;
8 |
9 | /**
10 | * 〈MybatisPlusConfig〉
11 | *
12 | * @author 丁乾文
13 | * @date 2021/6/23 8:13 下午
14 | * @since 1.0.0
15 | */
16 | @Component
17 | public class MybatisPlusConfig {
18 |
19 | @Bean
20 | public MybatisPlusInterceptor mybatisPlusInterceptor() {
21 | MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
22 | interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
23 | return interceptor;
24 | }
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/config/rabbit/RabbitQueueConfig.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.config.rabbit;
2 |
3 | import org.springframework.amqp.core.Queue;
4 | import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
5 | import org.springframework.context.annotation.Bean;
6 | import org.springframework.stereotype.Component;
7 |
8 | /**
9 | * 〈一句话功能简述〉
10 | * 〈队列〉
11 | *
12 | * @author 丁乾文
13 | * @date 2021/6/17
14 | * @since 1.0.0
15 | */
16 | @ConditionalOnBean(RabbitConfig.class)
17 | @Component
18 | public class RabbitQueueConfig {
19 |
20 | /**
21 | * 用于日志的队列
22 | */
23 | public final static String SYSTEM_LOG_QUEUE = "boot_engine_system_log_queue";
24 |
25 | /**
26 | * 用于日志的队列
27 | *
28 | * @return Queue
29 | */
30 | @Bean
31 | public Queue systemLogQueue() {
32 | return new Queue(SYSTEM_LOG_QUEUE, true);
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/enums/DataStatus.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.enums;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Getter;
5 |
6 | /**
7 | * 〈一句话功能简述〉
8 | * 〈〉
9 | *
10 | * @author dingqianwen
11 | * @date 2020/8/26
12 | * @since 1.0.0
13 | */
14 | @AllArgsConstructor
15 | public enum DataStatus {
16 |
17 | /**
18 | * 规则/决策表的各种状态
19 | */
20 | DEV(0), TEST(1), PRD(2),
21 | /**
22 | * 历史的线上
23 | */
24 | HISTORY(3);
25 |
26 | @Getter
27 | private final Integer status;
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/enums/DeletedEnum.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.enums;
2 |
3 | import lombok.Getter;
4 |
5 | /**
6 | * 〈一句话功能简述〉
7 | * 〈〉
8 | *
9 | * @author dingqianwen
10 | * @date 2020/7/14
11 | * @since 1.0.0
12 | */
13 | public enum DeletedEnum {
14 |
15 | /**
16 | * ENABLE:未被删除
17 | */
18 | ENABLE(0), DISABLE(1);
19 |
20 | @Getter
21 | private final Integer status;
22 |
23 | DeletedEnum(Integer status) {
24 | this.status = status;
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/enums/EnableEnum.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.enums;
2 |
3 | import lombok.Getter;
4 |
5 | /**
6 | * 〈一句话功能简述〉
7 | * 〈〉
8 | *
9 | * @author dingqianwen
10 | * @date 2020/7/14
11 | * @since 1.0.0
12 | */
13 | public enum EnableEnum {
14 |
15 | /**
16 | * ENABLE
17 | */
18 | ENABLE(0), DISABLE(1);
19 |
20 | @Getter
21 | private final Integer status;
22 |
23 | EnableEnum(Integer status) {
24 | this.status = status;
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/enums/FtlTemplatesEnum.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.enums;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Getter;
5 |
6 | /**
7 | * 〈一句话功能简述〉
8 | * 〈〉
9 | *
10 | * @author 丁乾文
11 | * @date 2021/6/17
12 | * @since 1.0.0
13 | */
14 | @AllArgsConstructor
15 | public enum FtlTemplatesEnum {
16 | /**
17 | * 发送验证码的html模板
18 | */
19 | EMAIL("VerifyCode.ftl", "验证码"),
20 | /**
21 | * 发送异常警告的html模板
22 | */
23 | EXCEPTION("ExceptionMessage.ftl", "异常警告");
24 |
25 | @Getter
26 | String value;
27 | @Getter
28 | String msg;
29 | }
30 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/enums/FunctionSource.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.enums;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Getter;
5 |
6 | /**
7 | * 〈一句话功能简述〉
8 | * 〈〉
9 | *
10 | * @author dingqianwen
11 | * @date 2020/9/11
12 | * @since 1.0.0
13 | */
14 | @AllArgsConstructor
15 | public enum FunctionSource {
16 | /**
17 | *
18 | */
19 | SYSTEM(0), JAVA_CODE(1);
20 |
21 | @Getter
22 | private final Integer value;
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/enums/OperationType.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.enums;
2 |
3 | /**
4 | * 〈OperationType〉
5 | *
6 | * @author 丁乾文
7 | * @date 2021/6/24 11:00 上午
8 | * @since 1.0.0
9 | */
10 | public enum OperationType {
11 | /**
12 | * 权限操作类型
13 | */
14 | ADD, DELETE, UPDATE, SELECT,
15 | /**
16 | * 校验发布权限
17 | */
18 | PUBLISH,
19 | /**
20 | * 修改数据权权限
21 | */
22 | DATE_DATA_PERMISSION
23 | }
24 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/enums/RateLimitEnum.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.enums;
2 |
3 | /**
4 | * 〈一句话功能简述〉
5 | * 〈〉
6 | *
7 | * @author 丁乾文
8 | * @date 2021/6/17
9 | * @since 1.0.0
10 | */
11 | public enum RateLimitEnum {
12 |
13 | /**
14 | * 根据请求ip限流
15 | */
16 | IP,
17 | /**
18 | * 根据请求url限流
19 | */
20 | URL,
21 | /**
22 | * 根据用户限流,前提需要用户已经登录的情况下
23 | */
24 | USER,
25 | /**
26 | * 解决的问题是,如果用户访问url1导致根据ip地址限流了,但是访问url2也会无法访问
27 | */
28 | URL_IP
29 | }
30 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/enums/UserType.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.enums;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Getter;
5 |
6 | /**
7 | * 〈UserType〉
8 | *
9 | * @author 丁乾文
10 | * @date 2021/6/22 6:28 下午
11 | * @since 1.0.0
12 | */
13 | @AllArgsConstructor
14 | public enum UserType {
15 | /**
16 | * 超级管理
17 | */
18 | SUPER_ADMINISTRATOR(0),
19 | /**
20 | * 工作空间管理
21 | */
22 | WORKSPACE_ADMINISTRATOR(1),
23 | /**
24 | * 普通用户
25 | */
26 | GENERAL_USER(2);
27 |
28 | @Getter
29 | private final Integer type;
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/enums/VerifyCodeType.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.enums;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Getter;
5 |
6 | /**
7 | * 〈一句话功能简述〉
8 | * 〈〉
9 | *
10 | * @author dingqianwen
11 | * @date 2020/9/24
12 | * @since 1.0.0
13 | */
14 | @AllArgsConstructor
15 | public enum VerifyCodeType {
16 | /**
17 | * 忘记密码/注册 获取验证码
18 | */
19 | FORGOT(0), REGISTER(1);
20 |
21 | @Getter
22 | private final Integer value;
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/exception/DataPermissionException.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.exception;
2 |
3 | /**
4 | * 〈一句话功能简述〉
5 | * 〈〉
6 | *
7 | * @author dingqianwen
8 | * @date 2020/8/31
9 | * @since 1.0.0
10 | */
11 | public class DataPermissionException extends RuntimeException {
12 |
13 | private static final long serialVersionUID = -494678828864504957L;
14 |
15 | public DataPermissionException() {
16 | super();
17 | }
18 |
19 | public DataPermissionException(String message) {
20 | super(message);
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/exception/LoginException.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.exception;
2 |
3 | /**
4 | * 〈一句话功能简述〉
5 | * 〈〉
6 | *
7 | * @author 丁乾文
8 | * @date 2020/1/10
9 | * @since 1.0.0
10 | */
11 | public class LoginException extends RuntimeException {
12 |
13 | private static final long serialVersionUID = 6405345374923437770L;
14 |
15 | public LoginException(String message) {
16 | super(message);
17 | }
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/exception/ReSubmitException.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.exception;
2 |
3 | import cn.ruleengine.web.enums.ErrorCodeEnum;
4 | import lombok.Getter;
5 |
6 | /**
7 | * 〈一句话功能简述〉
8 | * 〈〉
9 | *
10 | * @author 丁乾文
11 | * @date 2020/1/10
12 | * @since 1.0.0
13 | */
14 | public class ReSubmitException extends RuntimeException {
15 |
16 | private static final long serialVersionUID = 6405345374923437770L;
17 |
18 | @Getter
19 | private final int code;
20 |
21 | public ReSubmitException() {
22 | super(ErrorCodeEnum.RULE10011038.getMsg());
23 | this.code = ErrorCodeEnum.RULE10011038.getCode();
24 | }
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/listener/body/GeneralRuleMessageBody.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.listener.body;
2 |
3 | import lombok.Data;
4 |
5 | import java.io.Serializable;
6 |
7 | /**
8 | * 〈一句话功能简述〉
9 | * 〈〉
10 | *
11 | * @author dingqianwen
12 | * @date 2020/7/16
13 | * @since 1.0.0
14 | */
15 | @Data
16 | public class GeneralRuleMessageBody implements Serializable {
17 |
18 | private static final long serialVersionUID = 1L;
19 |
20 | private GeneralRuleMessageBody.Type type;
21 |
22 | private String workspaceCode;
23 |
24 | private Integer workspaceId;
25 |
26 | private String ruleCode;
27 |
28 | public enum Type {
29 | /**
30 | * 规则加载,以及移除
31 | */
32 | LOAD, UPDATE, REMOVE
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/listener/body/VariableMessageBody.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.listener.body;
2 |
3 | import lombok.Data;
4 |
5 | import java.io.Serializable;
6 |
7 | /**
8 | * 〈一句话功能简述〉
9 | * 〈〉
10 | *
11 | * @author dingqianwen
12 | * @date 2020/7/17
13 | * @since 1.0.0
14 | */
15 | @Data
16 | public class VariableMessageBody implements Serializable {
17 |
18 | private static final long serialVersionUID = 1L;
19 |
20 | private VariableMessageBody.Type type;
21 |
22 | private Integer id;
23 |
24 | public enum Type {
25 | /**
26 | * 规则加载,以及移除
27 | */
28 | LOAD, REMOVE, UPDATE
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/listener/event/GeneralRuleEvent.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.listener.event;
2 |
3 | import cn.ruleengine.web.listener.body.GeneralRuleMessageBody;
4 | import lombok.Getter;
5 | import org.springframework.context.ApplicationEvent;
6 |
7 | /**
8 | * 〈一句话功能简述〉
9 | * 〈〉
10 | *
11 | * @author 丁乾文
12 | * @date 2020-12-23 17:55
13 | * @since 1.0.0
14 | */
15 | public class GeneralRuleEvent extends ApplicationEvent {
16 |
17 | private static final long serialVersionUID = 1628296277627810450L;
18 |
19 | @Getter
20 | private final GeneralRuleMessageBody ruleMessageBody;
21 |
22 | public GeneralRuleEvent(GeneralRuleMessageBody ruleMessageBody) {
23 | super(ruleMessageBody);
24 | this.ruleMessageBody = ruleMessageBody;
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/listener/event/SystemLogEvent.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.listener.event;
2 |
3 | import cn.ruleengine.web.store.entity.RuleEngineSystemLog;
4 | import lombok.Getter;
5 | import org.springframework.context.ApplicationEvent;
6 |
7 | /**
8 | * 〈一句话功能简述〉
9 | * 〈〉
10 | *
11 | * @author 丁乾文
12 | * @date 2020-12-23 17:55
13 | * @since 1.0.0
14 | */
15 | public class SystemLogEvent extends ApplicationEvent {
16 |
17 | private static final long serialVersionUID = 1628296277627810450L;
18 |
19 | @Getter
20 | private final RuleEngineSystemLog ruleEngineSystemLog;
21 |
22 | public SystemLogEvent(RuleEngineSystemLog log) {
23 | super(log);
24 | this.ruleEngineSystemLog = log;
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/listener/event/VariableEvent.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.listener.event;
2 |
3 | import cn.ruleengine.web.listener.body.VariableMessageBody;
4 | import lombok.Getter;
5 | import org.springframework.context.ApplicationEvent;
6 |
7 | /**
8 | * 〈一句话功能简述〉
9 | * 〈〉
10 | *
11 | * @author 丁乾文
12 | * @date 2020-12-23 18:07
13 | * @since 1.0.0
14 | */
15 | public class VariableEvent extends ApplicationEvent {
16 |
17 | private static final long serialVersionUID = 7277630131038817515L;
18 |
19 | @Getter
20 | private final VariableMessageBody variableMessageBody;
21 |
22 | public VariableEvent(VariableMessageBody variableMessageBody) {
23 | super(variableMessageBody);
24 | this.variableMessageBody = variableMessageBody;
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/service/ConditionSetService.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.service;
2 |
3 |
4 | import cn.ruleengine.core.condition.ConditionSet;
5 | import cn.ruleengine.web.vo.condition.ConditionGroupConfig;
6 |
7 | import java.util.List;
8 |
9 |
10 | /**
11 | * 〈一句话功能简述〉
12 | * 〈〉
13 | *
14 | * @author 丁乾文
15 | * @date 2021/1/17
16 | * @since 1.0.0
17 | */
18 | public interface ConditionSetService {
19 |
20 |
21 | /**
22 | * 获取规则配置条件集,懒得写的,待优化
23 | *
24 | * @param conditionGroup 条件组配置
25 | * @return 条件集
26 | */
27 | ConditionSet loadConditionSet(List
11 | * 〈〉
12 | *
13 | * @author dingqianwen
14 | * @date 2020/8/27
15 | * @since 1.0.0
16 | */
17 | public interface FunctionService {
18 |
19 | /**
20 | * 函数列表
21 | *
22 | * @param pageRequest param
23 | * @return list
24 | */
25 | PageResult
10 | * 〈〉
11 | *
12 | * @author dingqianwen
13 | * @date 2020/7/14
14 | * @since 1.0.0
15 | */
16 | public interface SymbolService {
17 |
18 | /**
19 | * 规则引擎运算符
20 | *
21 | * @param value 例如:CONTROLLER
22 | * @return >,<,=..
23 | */
24 | List
11 | * 〈〉
12 | *
13 | * @author dingqianwen
14 | * @date 2021/3/2
15 | * @since 1.0.0
16 | */
17 | public interface SystemLogService {
18 |
19 | /**
20 | * 查询日志列表
21 | *
22 | * @param pageRequest 分页参数
23 | * @return list
24 | */
25 | PageResult
9 | * 〈〉
10 | *
11 | * @author 丁乾文
12 | * @date 2021/1/30
13 | * @since 1.0.0
14 | */
15 | @Data
16 | public class ViewRequest {
17 |
18 | @NotNull
19 | private Integer id;
20 |
21 | /**
22 | * DataStatus
23 | */
24 | @NotNull
25 | private Integer status;
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/condition/AddConditionRequest.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.condition;
2 |
3 | import lombok.Data;
4 | import org.hibernate.validator.constraints.Length;
5 |
6 | import javax.validation.constraints.NotBlank;
7 | import javax.validation.constraints.NotNull;
8 |
9 | /**
10 | * 〈一句话功能简述〉
11 | * 〈〉
12 | *
13 | * @author dingqianwen
14 | * @date 2020/7/14
15 | * @since 1.0.0
16 | */
17 | @Data
18 | public class AddConditionRequest {
19 |
20 | @Length(min = 1, max = 25, message = "条件名称长度在 1 到 25 个字符")
21 | @NotBlank(message = "条件名称不能为空")
22 | private String name;
23 |
24 | private String description;
25 |
26 | @NotNull(message = "条件配置不能为空")
27 | private ConfigBean config;
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/condition/ConditionBody.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.condition;
2 |
3 | import lombok.Data;
4 |
5 | import javax.validation.Valid;
6 | import javax.validation.constraints.NotBlank;
7 |
8 | /**
9 | * 〈一句话功能简述〉
10 | * 〈〉
11 | *
12 | * @author dingqianwen
13 | * @date 2020/7/14
14 | * @since 1.0.0
15 | */
16 | @Data
17 | public class ConditionBody {
18 |
19 | private Integer id;
20 |
21 | @NotBlank
22 | private String name;
23 |
24 | private String description;
25 |
26 | @Valid
27 | private ConfigBean config;
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/condition/ConditionGroupCondition.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.condition;
2 |
3 | import lombok.Data;
4 |
5 | import javax.validation.Valid;
6 | import javax.validation.constraints.NotNull;
7 |
8 | /**
9 | * 〈一句话功能简述〉
10 | * 〈〉
11 | *
12 | * @author dingqianwen
13 | * @date 2020/9/7
14 | * @since 1.0.0
15 | */
16 | @Data
17 | public class ConditionGroupCondition {
18 |
19 | private Integer id;
20 |
21 | @NotNull
22 | private Integer orderNo;
23 |
24 | @Valid
25 | private ConditionBody condition;
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/condition/ConditionGroupConfig.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.condition;
2 |
3 | import lombok.Data;
4 |
5 | import javax.validation.Valid;
6 | import javax.validation.constraints.NotBlank;
7 | import javax.validation.constraints.NotNull;
8 | import java.util.ArrayList;
9 | import java.util.List;
10 |
11 | /**
12 | * 〈一句话功能简述〉
13 | * 〈〉
14 | *
15 | * @author dingqianwen
16 | * @date 2020/8/28
17 | * @since 1.0.0
18 | */
19 | @Data
20 | public class ConditionGroupConfig {
21 |
22 | private Integer id;
23 |
24 | @NotBlank(message = "条件组名称不能为空")
25 | private String name;
26 |
27 | @NotNull
28 | private Integer orderNo;
29 |
30 | /**
31 | * 条件组与条件关系
32 | */
33 | @Valid
34 | private List
10 | * 〈〉
11 | *
12 | * @author dingqianwen
13 | * @date 2020/7/14
14 | * @since 1.0.0
15 | */
16 | @Data
17 | public class ConfigBean {
18 |
19 | @Valid
20 | private ConfigValue leftValue;
21 |
22 | @NotBlank
23 | private String symbol;
24 |
25 | @Valid
26 | private ConfigValue rightValue;
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/condition/ConfigValue.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.condition;
2 |
3 | import lombok.Data;
4 |
5 | import javax.validation.constraints.NotBlank;
6 | import javax.validation.constraints.NotNull;
7 |
8 | /**
9 | * 〈一句话功能简述〉
10 | * 〈〉
11 | *
12 | * @author 丁乾文
13 | * @date 2021/1/1
14 | * @since 1.0.0
15 | */
16 | @Data
17 | public class ConfigValue {
18 |
19 | @NotNull
20 | private Integer type;
21 |
22 | @NotBlank
23 | private String value;
24 |
25 | private String valueName;
26 |
27 | /**
28 | * 固定值变量 值
29 | * value为变量的id
30 | */
31 | private String variableValue;
32 |
33 |
34 | /**
35 | * 变量的类型
36 | */
37 | private Integer variableType;
38 |
39 | @NotBlank
40 | private String valueType;
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/condition/ExecuteConditionRequest.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.condition;
2 |
3 | import lombok.Data;
4 |
5 | import javax.validation.constraints.NotNull;
6 | import java.util.HashMap;
7 | import java.util.Map;
8 |
9 | /**
10 | * 〈一句话功能简述〉
11 | * 〈〉
12 | *
13 | * @author 丁乾文
14 | * @date 2020/12/12
15 | * @since 1.0.0
16 | */
17 | @Data
18 | public class ExecuteConditionRequest {
19 |
20 | /**
21 | * 条件id
22 | */
23 | @NotNull(message = "条件ID不能为空")
24 | private Integer id;
25 |
26 | /**
27 | * 运行入参
28 | */
29 | private Map
7 | * 〈〉
8 | *
9 | * @author dingqianwen
10 | * @date 2020/7/14
11 | * @since 1.0.0
12 | */
13 | @Data
14 | public class ListConditionRequest {
15 | private String name;
16 | }
17 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/condition/ListConditionResponse.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.condition;
2 |
3 | import com.fasterxml.jackson.annotation.JsonFormat;
4 | import lombok.Data;
5 |
6 | import java.util.Date;
7 |
8 | /**
9 | * 〈一句话功能简述〉
10 | * 〈〉
11 | *
12 | * @author dingqianwen
13 | * @date 2020/7/14
14 | * @since 1.0.0
15 | */
16 | @Data
17 | public class ListConditionResponse {
18 |
19 | private Integer id;
20 |
21 | private String name;
22 |
23 | private String description;
24 |
25 | private String configInfo;
26 |
27 | private ConfigBean config;
28 |
29 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
30 | private Date createTime;
31 | }
32 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/condition/SwitchConditionOrderRequest.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.condition;
2 |
3 | import io.swagger.annotations.ApiModelProperty;
4 | import lombok.Data;
5 |
6 | import javax.validation.constraints.NotNull;
7 |
8 | /***
9 | * 交换条件顺序
10 | * @author niuxiangqian
11 | * @version 1.0
12 | * @since 2021/7/17 5:53 下午
13 | **/
14 | @Data
15 | public class SwitchConditionOrderRequest {
16 |
17 | public static final Integer TOP = 0;
18 |
19 | public static final Integer BOTTOM = 1;
20 |
21 | @NotNull
22 | @ApiModelProperty(value = "原来的id", required = true)
23 | private Integer fromId;
24 |
25 | @NotNull
26 | private Integer fromConditionGroupId;
27 |
28 | /**
29 | * 可以不传,只有当跨条件组拖拽时候 目前条件组没有任何条件时
30 | */
31 | @ApiModelProperty(value = "目标id", required = true)
32 | private Integer toId;
33 |
34 | /**
35 | * 0 是 toId的上面 1是toId的下面
36 | */
37 | private Integer toType = 1;
38 |
39 | @NotNull
40 | private Integer toConditionGroupId;
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/condition/UpdateConditionRequest.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.condition;
2 |
3 | import lombok.Data;
4 | import org.hibernate.validator.constraints.Length;
5 |
6 | import javax.validation.Valid;
7 | import javax.validation.constraints.NotBlank;
8 | import javax.validation.constraints.NotNull;
9 |
10 | /**
11 | * 〈一句话功能简述〉
12 | * 〈〉
13 | *
14 | * @author dingqianwen
15 | * @date 2020/8/25
16 | * @since 1.0.0
17 | */
18 | @Data
19 | public class UpdateConditionRequest {
20 | @NotNull
21 | private Integer id;
22 |
23 | @Length(min = 1, max = 25, message = "条件名称长度在 1 到 25 个字符")
24 | @NotBlank(message = "条件名称不能为空")
25 | private String name;
26 |
27 | private String description;
28 |
29 | @NotNull(message = "条件配置不能为空")
30 | @Valid
31 | private ConfigBean config;
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/condition/group/DeleteConditionGroupRequest.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.condition.group;
2 |
3 | import lombok.Data;
4 |
5 | /**
6 | * 〈DeleteConditionGroupRequest〉
7 | *
8 | * @author 丁乾文
9 | * @date 2021/9/9 4:49 下午
10 | * @since 1.0.0
11 | */
12 | @Data
13 | public class DeleteConditionGroupRequest {
14 |
15 | private Integer id;
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/condition/group/SaveOrUpdateConditionGroup.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.condition.group;
2 |
3 |
4 | import lombok.Data;
5 |
6 | import javax.validation.constraints.NotNull;
7 |
8 | /**
9 | * 〈一句话功能简述〉
10 | * 〈〉
11 | *
12 | * @author dingqianwen
13 | * @date 2020/8/28
14 | * @since 1.0.0
15 | */
16 | @Data
17 | public class SaveOrUpdateConditionGroup {
18 |
19 | private Integer id;
20 |
21 | private String name;
22 |
23 | @NotNull
24 | private Integer ruleId;
25 |
26 | private Integer orderNo;
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/condition/group/condition/DeleteConditionAndBindGroupRefRequest.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.condition.group.condition;
2 |
3 | import lombok.Data;
4 |
5 | import javax.validation.constraints.NotNull;
6 |
7 | /**
8 | * 〈SaveConditionAndBindGroupRequest〉
9 | *
10 | * @author 丁乾文
11 | * @date 2021/7/12 1:42 下午
12 | * @since 1.0.0
13 | */
14 | @Data
15 | public class DeleteConditionAndBindGroupRefRequest {
16 |
17 | /**
18 | * 属于哪一个规则,用来拦截器取参数
19 | */
20 | @NotNull
21 | private Integer conditionId;
22 |
23 | /**
24 | * 条件组关系id
25 | */
26 | @NotNull
27 | private Integer conditionGroupRefId;
28 |
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/condition/group/condition/SaveConditionAndBindGroupRequest.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.condition.group.condition;
2 |
3 | import cn.ruleengine.web.vo.condition.AddConditionRequest;
4 | import lombok.Data;
5 |
6 | import javax.validation.Valid;
7 | import javax.validation.constraints.NotNull;
8 |
9 | /**
10 | * 〈SaveConditionAndBindGroupRequest〉
11 | *
12 | * @author 丁乾文
13 | * @date 2021/7/12 1:42 下午
14 | * @since 1.0.0
15 | */
16 | @Data
17 | public class SaveConditionAndBindGroupRequest {
18 |
19 | /**
20 | * 与addConditionRequest绑定
21 | */
22 | @NotNull
23 | private Integer conditionGroupId;
24 |
25 | @NotNull
26 | private Integer orderNo;
27 |
28 | /**
29 | * 条件信息
30 | */
31 | @NotNull
32 | @Valid
33 | private AddConditionRequest addConditionRequest;
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/condition/group/condition/SaveConditionAndBindGroupResponse.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.condition.group.condition;
2 |
3 | import lombok.Data;
4 |
5 | /**
6 | * 〈SaveConditionAndBindGroupResponse〉
7 | *
8 | * @author 丁乾文
9 | * @date 2021/7/12 2:17 下午
10 | * @since 1.0.0
11 | */
12 | @Data
13 | public class SaveConditionAndBindGroupResponse {
14 |
15 | private Integer conditionId;
16 |
17 | private Integer conditionGroupConditionId;
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/condition/group/condition/SaveOrUpdateConditionGroupCondition.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.condition.group.condition;
2 |
3 | import lombok.Data;
4 |
5 | /**
6 | * 〈一句话功能简述〉
7 | * 〈〉
8 | *
9 | * @author dingqianwen
10 | * @date 2020/8/28
11 | * @since 1.0.0
12 | */
13 | @Data
14 | public class SaveOrUpdateConditionGroupCondition {
15 | private Integer id;
16 |
17 | private Integer conditionId;
18 |
19 | private Integer conditionGroupId;
20 |
21 | private Integer orderNo;
22 | }
23 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/data/file/ExportRequest.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.data.file;
2 |
3 | import lombok.Data;
4 |
5 | /**
6 | * 〈ExportRequest〉
7 | *
8 | * @author 丁乾文
9 | * @date 2021/7/13 5:55 下午
10 | * @since 1.0.0
11 | */
12 | @Data
13 | public class ExportRequest {
14 |
15 | private Integer dataType;
16 |
17 | /**
18 | * 数据库id
19 | * 如果data_type=0 则此data_id为规则的id
20 | */
21 | private Integer dataId;
22 |
23 | private String version;
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/data/file/ExportResponse.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.data.file;
2 |
3 | import lombok.Data;
4 |
5 | /**
6 | * 〈ExportResponse〉
7 | *
8 | * @author 丁乾文
9 | * @date 2021/7/13 5:35 下午
10 | * @since 1.0.0
11 | */
12 | @Data
13 | public class ExportResponse {
14 |
15 | private String data;
16 |
17 | private String code;
18 |
19 | private Integer id;
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/function/AddFunction.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.function;
2 |
3 | import lombok.Data;
4 |
5 | import javax.validation.constraints.NotBlank;
6 | import java.util.List;
7 |
8 | /**
9 | * 〈一句话功能简述〉
10 | * 〈〉
11 | *
12 | * @author dingqianwen
13 | * @date 2020/9/11
14 | * @since 1.0.0
15 | */
16 | @Data
17 | public class AddFunction {
18 |
19 | /**
20 | * 函数java代码
21 | */
22 | @NotBlank
23 | private String javaCode;
24 | /**
25 | * 类名称
26 | */
27 | @NotBlank
28 | private String className;
29 |
30 | @NotBlank
31 | private String name;
32 |
33 | private String description;
34 |
35 | private List
12 | * 〈〉
13 | *
14 | * @author 丁乾文
15 | * @date 2020/12/12
16 | * @since 1.0.0
17 | */
18 | @Data
19 | public class ExecuteFunctionRequest {
20 |
21 | @NotNull(message = "函数ID不能为空")
22 | private Integer id;
23 |
24 | /**
25 | * 运行入参
26 | */
27 | private List
7 | * 〈〉
8 | *
9 | * @author dingqianwen
10 | * @date 2020/8/27
11 | * @since 1.0.0
12 | */
13 | @Data
14 | public class FunctionParam {
15 | private String name;
16 |
17 | private String code;
18 |
19 | /**
20 | * STRING,BOOLEAN...
21 | */
22 | private String valueType;
23 | }
24 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/function/GetFunctionResponse.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.function;
2 |
3 | import lombok.Data;
4 |
5 | import java.util.List;
6 |
7 | /**
8 | * 〈一句话功能简述〉
9 | * 〈〉
10 | *
11 | * @author dingqianwen
12 | * @date 2020/8/27
13 | * @since 1.0.0
14 | */
15 | @Data
16 | public class GetFunctionResponse {
17 |
18 | private Integer id;
19 |
20 | private String name;
21 |
22 | private String executor;
23 |
24 | private String description;
25 |
26 | /**
27 | * 函数返回值
28 | */
29 | private String returnValueType;
30 |
31 | /**
32 | * 函数中所有的参数
33 | */
34 | private List
7 | * 〈〉
8 | *
9 | * @author dingqianwen
10 | * @date 2020/8/27
11 | * @since 1.0.0
12 | */
13 | @Data
14 | public class ListFunctionRequest {
15 |
16 | private String name;
17 |
18 | private String valueType;
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/function/ListFunctionResponse.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.function;
2 |
3 | import com.fasterxml.jackson.annotation.JsonFormat;
4 | import lombok.Data;
5 |
6 | import java.util.Date;
7 | import java.util.List;
8 |
9 | /**
10 | * 〈一句话功能简述〉
11 | * 〈〉
12 | *
13 | * @author dingqianwen
14 | * @date 2020/8/27
15 | * @since 1.0.0
16 | */
17 | @Data
18 | public class ListFunctionResponse {
19 |
20 | private Integer id;
21 |
22 | private String name;
23 |
24 | private String executor;
25 |
26 | private String returnValueType;
27 |
28 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
29 | private Date createTime;
30 |
31 | /**
32 | * 函数中所有的参数
33 | */
34 | private List
10 | * 〈〉
11 | *
12 | * @author dingqianwen
13 | * @date 2020/9/11
14 | * @since 1.0.0
15 | */
16 | @EqualsAndHashCode(callSuper = true)
17 | @Data
18 | public class UpdateFunction extends AddFunction{
19 |
20 | @NotNull
21 | private Integer id;
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/operation/record/OperationRecordBody.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.operation.record;
2 |
3 | import lombok.Data;
4 |
5 | import java.io.Serializable;
6 | import java.util.Date;
7 |
8 | /**
9 | * 〈OperationRecordBody〉
10 | *
11 | * @author 丁乾文
12 | * @date 2021/7/13 6:25 下午
13 | * @since 1.0.0
14 | */
15 | @Data
16 | public class OperationRecordBody implements Serializable {
17 |
18 | private static final long serialVersionUID = 376107396179241194L;
19 |
20 | /**
21 | * 修改人
22 | */
23 | private Integer userId;
24 |
25 | /**
26 | * 修改人头像
27 | */
28 | private String avatar;
29 |
30 |
31 | /**
32 | * 修改描述
33 | */
34 | private String description;
35 |
36 | /**
37 | * 操作时间
38 | */
39 | private Date operationTime;
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/operation/record/OperationRecordRequest.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.operation.record;
2 |
3 | /**
4 | * 〈OperationRecordRequest〉
5 | *
6 | * @author 丁乾文
7 | * @date 2021/9/9 5:26 下午
8 | * @since 1.0.0
9 | */
10 | public class OperationRecordRequest {
11 | }
12 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/operation/record/OperationRecordResponse.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.operation.record;
2 |
3 | import lombok.Data;
4 |
5 | import java.util.Date;
6 |
7 | /**
8 | * 〈OperationRecordResponse〉
9 | *
10 | * @author 丁乾文
11 | * @date 2021/9/9 5:26 下午
12 | * @since 1.0.0
13 | */
14 | @Data
15 | public class OperationRecordResponse {
16 | private Integer id;
17 |
18 | private Integer userId;
19 |
20 | private String username;
21 |
22 | private String userAvatar;
23 |
24 | private Integer workspaceId;
25 |
26 | private String workspaceCode;
27 |
28 | private String description;
29 |
30 | private Integer dataType;
31 |
32 | private Integer dataId;
33 |
34 | private Date operationTime;
35 | }
36 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/parameter/AddInputParameterRequest.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.parameter;
2 |
3 | import lombok.Data;
4 | import org.hibernate.validator.constraints.Length;
5 |
6 | import javax.validation.constraints.NotBlank;
7 | import javax.validation.constraints.Pattern;
8 |
9 | /**
10 | * 〈一句话功能简述〉
11 | * 〈〉
12 | *
13 | * @author dingqianwen
14 | * @date 2020/7/14
15 | * @since 1.0.0
16 | */
17 | @Data
18 | public class AddInputParameterRequest {
19 |
20 | @Length(min = 1, max = 25, message = "规则参数名称长度在 1 到 25 个字符")
21 | @NotBlank(message = "规则参数名称不能为空")
22 | private String name;
23 |
24 | @Length(min = 1, max = 25, message = "规则参数Code长度在 1 到 25 个字符")
25 | @Pattern(regexp = "^[a-zA-Z][a-zA-Z0-9_\\-]*$", message = "规则参数Code只能字母开头,以及字母数字_-组成")
26 | @NotBlank(message = "规则参数编码不能为空")
27 | private String code;
28 |
29 | @NotBlank(message = "规则参数类型不能为空")
30 | private String valueType;
31 |
32 | private String description;
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/parameter/GetInputParameterResponse.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.parameter;
2 |
3 | import lombok.Data;
4 |
5 | /**
6 | * 〈一句话功能简述〉
7 | * 〈〉
8 | *
9 | * @author dingqianwen
10 | * @date 2020/8/25
11 | * @since 1.0.0
12 | */
13 | @Data
14 | public class GetInputParameterResponse {
15 |
16 | private Integer id;
17 |
18 | private String name;
19 |
20 | private String code;
21 |
22 | private String valueType;
23 |
24 | private String description;
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/parameter/ListInputParameterRequest.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.parameter;
2 |
3 | import lombok.Data;
4 |
5 | import java.util.List;
6 |
7 | /**
8 | * 〈一句话功能简述〉
9 | * 〈〉
10 | *
11 | * @author dingqianwen
12 | * @date 2020/7/14
13 | * @since 1.0.0
14 | */
15 | @Data
16 | public class ListInputParameterRequest {
17 | private String name;
18 | private String code;
19 |
20 | private List
10 | * 〈〉
11 | *
12 | * @author dingqianwen
13 | * @date 2020/7/14
14 | * @since 1.0.0
15 | */
16 | @Data
17 | public class ListInputParameterResponse {
18 | private Integer id;
19 |
20 | private String name;
21 |
22 | private String code;
23 |
24 | private String valueType;
25 |
26 | private String description;
27 |
28 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
29 | private Date createTime;
30 | }
31 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/parameter/UpdateInputParameterRequest.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.parameter;
2 |
3 | import lombok.Data;
4 | import org.hibernate.validator.constraints.Length;
5 |
6 | import javax.validation.constraints.NotBlank;
7 | import javax.validation.constraints.NotNull;
8 |
9 | /**
10 | * 〈一句话功能简述〉
11 | * 〈〉
12 | *
13 | * @author dingqianwen
14 | * @date 2020/8/25
15 | * @since 1.0.0
16 | */
17 | @Data
18 | public class UpdateInputParameterRequest {
19 |
20 | @NotNull
21 | private Integer id;
22 |
23 | @NotBlank(message = "规则参数名称不能为空")
24 | @Length(min = 1, max = 25, message = "规则参数名称长度在 1 到 25 个字符")
25 | private String name;
26 |
27 | private String description;
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/parameter/VerifyInputParameterCodeRequest.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.parameter;
2 |
3 | import lombok.Data;
4 | import org.hibernate.validator.constraints.Length;
5 |
6 | import javax.validation.constraints.NotBlank;
7 | import javax.validation.constraints.Pattern;
8 |
9 | /***
10 | * 验证参数code
11 | * @author niuxiangqian
12 | * @version 1.0
13 | * @since 2021/7/15 4:11 下午
14 | **/
15 | @Data
16 | public class VerifyInputParameterCodeRequest {
17 |
18 | @Length(min = 1, max = 25, message = "规则参数Code长度在 1 到 25 个字符")
19 | @Pattern(regexp = "^[a-zA-Z][a-zA-Z0-9_\\-]*$", message = "规则参数Code只能字母开头,以及字母数字_-组成")
20 | @NotBlank(message = "规则参数编码不能为空")
21 | private String code;
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/permission/data/ListDataPermissionRequest.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.permission.data;
2 |
3 | import lombok.Data;
4 |
5 | /***
6 | * 数据权限请求参数
7 | * @author niuxiangqian
8 | * @version 1.0
9 | * @since 2021/6/25 7:55 下午
10 | **/
11 | @Data
12 | public class ListDataPermissionRequest {
13 |
14 | private Integer dataType;
15 |
16 | /**
17 | * 数据库id
18 | * 如果data_type=0 则此data_id为规则的id
19 | */
20 | private Integer dataId;
21 |
22 | private String username;
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/permission/data/ListDataPermissionResponse.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.permission.data;
2 |
3 | import lombok.Data;
4 |
5 | /***
6 | * 数据权限请求参数
7 | * @author niuxiangqian
8 | * @version 1.0
9 | * @since 2021/6/25 7:55 下午
10 | **/
11 | @Data
12 | public class ListDataPermissionResponse {
13 |
14 | private String username;
15 |
16 | private String email;
17 |
18 | private String avatar;
19 |
20 | private Integer userId;
21 |
22 |
23 | /**
24 | * 0有写权限
25 | */
26 | private Integer writeAuthority;
27 |
28 | /**
29 | * 0有发布规则权限
30 | */
31 | private Integer publishAuthority;
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/permission/data/UpdateDataPermissionRequest.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.permission.data;
2 |
3 | import lombok.Data;
4 |
5 | import javax.validation.constraints.NotNull;
6 |
7 | /***
8 | * 更新数据权限请求参数
9 | *
10 | * @author niuxiangqian
11 | * @version 1.0
12 | * @since 2021/6/26 4:11 下午
13 | **/
14 | @Data
15 | public class UpdateDataPermissionRequest {
16 |
17 | private Integer dataType;
18 |
19 | /**
20 | * 数据库id
21 | * 如果data_type=0 则此data_id为规则的id
22 | */
23 | private Integer dataId;
24 |
25 | /**
26 | * 0有写权限
27 | */
28 | @NotNull
29 | private Integer writeAuthority;
30 |
31 | /**
32 | * 0有发布规则权限
33 | */
34 | @NotNull
35 | private Integer publishAuthority;
36 |
37 | /**
38 | * 用户id
39 | */
40 | @NotNull
41 | private Integer userId;
42 | }
43 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/rule/RuleBody.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.rule;
2 |
3 | import cn.ruleengine.web.vo.condition.ConditionGroupConfig;
4 | import cn.ruleengine.web.vo.condition.ConfigValue;
5 | import lombok.Data;
6 |
7 | import javax.validation.Valid;
8 | import javax.validation.constraints.NotBlank;
9 | import java.util.ArrayList;
10 | import java.util.List;
11 |
12 | /**
13 | * 〈一句话功能简述〉
14 | * 〈〉
15 | *
16 | * @author liqian
17 | * @date 2021/1/15
18 | */
19 | @Data
20 | public class RuleBody {
21 | /**
22 | * 规则id
23 | */
24 | private Integer id;
25 | /**
26 | * 规则名称
27 | */
28 | @NotBlank
29 | private String name;
30 | /**
31 | * 规则集是有序的,默认循序执行规则集
32 | */
33 | private Integer orderNo;
34 |
35 | /**
36 | * 规则条件组
37 | */
38 | @Valid
39 | private List
12 | * 〈〉
13 | *
14 | * @author dingqianwen
15 | * @date 2020/9/3
16 | * @since 1.0.0
17 | */
18 | @EqualsAndHashCode(callSuper = true)
19 | @Data
20 | public class DefaultAction extends ConfigValue {
21 |
22 | public DefaultAction() {
23 |
24 | }
25 |
26 | public DefaultAction(ConfigValue configValue) {
27 | this.setValue(configValue.getValue());
28 | this.setType(configValue.getType());
29 | this.setValueName(configValue.getValueName());
30 | this.setVariableValue(configValue.getVariableValue());
31 | this.setValueType(configValue.getValueType());
32 | }
33 |
34 | /**
35 | * 0启用 1不启用
36 | */
37 | @NotNull
38 | private Integer enableDefaultAction;
39 |
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/rule/general/DefaultActionSwitchRequest.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.rule.general;
2 |
3 | import lombok.Data;
4 |
5 | import javax.validation.constraints.NotNull;
6 |
7 | /**
8 | * 〈DefaultActionSwitchRequest〉
9 | *
10 | * @author 丁乾文
11 | * @date 2021/7/15 11:16 下午
12 | * @since 1.0.0
13 | */
14 | @Data
15 | public class DefaultActionSwitchRequest {
16 |
17 | @NotNull
18 | private Integer generalRuleId;
19 |
20 | @NotNull
21 | private Integer enableDefaultAction;
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/rule/general/GeneralRuleBody.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.rule.general;
2 |
3 | import cn.ruleengine.web.vo.condition.ConditionGroupConfig;
4 | import cn.ruleengine.web.vo.condition.ConfigValue;
5 | import lombok.Data;
6 |
7 | import javax.validation.Valid;
8 | import javax.validation.constraints.NotNull;
9 | import java.util.ArrayList;
10 | import java.util.List;
11 |
12 | /**
13 | * 〈一句话功能简述〉
14 | * 〈〉
15 | *
16 | * @author 丁乾文
17 | * @date 2021/1/23
18 | * @since 1.0.0
19 | */
20 | @Data
21 | public class GeneralRuleBody {
22 |
23 | @NotNull
24 | private Integer id;
25 |
26 | @Valid
27 | private List
11 | * 〈〉
12 | *
13 | * @author dingqianwen
14 | * @date 2020/8/28
15 | * @since 1.0.0
16 | */
17 | @Data
18 | public class GeneralRuleDefinition {
19 |
20 | private Integer id;
21 |
22 | @NotBlank
23 | @Length(min = 1, max = 25, message = "规则名称长度在 1 到 25 个字符")
24 | private String name;
25 |
26 | @NotBlank
27 | @Length(min = 1, max = 25, message = "规则编码长度在 1 到 25 个字符")
28 | @Pattern(regexp = "^[a-zA-Z][a-zA-Z0-9_\\-]*$", message = "规则Code只能字母开头,以及字母数字_-组成")
29 | private String code;
30 |
31 | private String description;
32 |
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/rule/general/GetGeneralRuleResponse.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.rule.general;
2 |
3 | import cn.ruleengine.web.vo.condition.ConditionGroupConfig;
4 | import cn.ruleengine.web.vo.condition.ConfigValue;
5 | import lombok.Data;
6 |
7 | import java.util.List;
8 |
9 | /**
10 | * 〈一句话功能简述〉
11 | * 〈〉
12 | *
13 | * @author dingqianwen
14 | * @date 2020/8/24
15 | * @since 1.0.0
16 | */
17 | @Data
18 | public class GetGeneralRuleResponse {
19 |
20 | private Integer id;
21 |
22 | private String name;
23 |
24 | private String code;
25 |
26 | private String currentVersion;
27 |
28 | private String publishVersion;
29 |
30 | private String description;
31 |
32 | private Integer workspaceId;
33 |
34 | private String workspaceCode;
35 |
36 | private Integer ruleId;
37 |
38 | private List
7 | * 〈〉
8 | *
9 | * @author dingqianwen
10 | * @date 2020/8/24
11 | * @since 1.0.0
12 | */
13 | @Data
14 | public class ListGeneralRuleRequest {
15 | private String name;
16 | private String code;
17 | private Integer status;
18 | }
19 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/rule/general/ListGeneralRuleResponse.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.rule.general;
2 |
3 | import com.fasterxml.jackson.annotation.JsonFormat;
4 | import lombok.Data;
5 |
6 | import java.util.Date;
7 |
8 | /**
9 | * 〈一句话功能简述〉
10 | * 〈〉
11 | *
12 | * @author dingqianwen
13 | * @date 2020/8/24
14 | * @since 1.0.0
15 | */
16 | @Data
17 | public class ListGeneralRuleResponse {
18 |
19 | private Integer id;
20 |
21 | private String name;
22 |
23 | private String code;
24 |
25 | private Integer createUserId;
26 |
27 | private String createUserName;
28 |
29 | private String createUserAvatar;
30 |
31 | private String currentVersion;
32 |
33 | private String publishVersion;
34 |
35 | private Integer status;
36 |
37 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
38 | private Date createTime;
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/rule/general/PublishListRequest.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.rule.general;
2 |
3 | import lombok.Data;
4 |
5 | import java.util.List;
6 |
7 | /**
8 | * 〈PublishListRequest〉
9 | *
10 | * @author 丁乾文
11 | * @date 2021/7/28 9:04 下午
12 | * @since 1.0.0
13 | */
14 | @Data
15 | public class PublishListRequest{
16 |
17 | private String name;
18 | private String code;
19 |
20 | private List
12 | * 〈〉
13 | *
14 | * @author dingqianwen
15 | * @date 2020/7/16
16 | * @since 1.0.0
17 | */
18 | @Data
19 | public class RunTestRequest {
20 |
21 | /**
22 | * 规则id
23 | */
24 | @NotNull
25 | private Integer id;
26 |
27 | /**
28 | * DataStatus
29 | */
30 | @NotNull
31 | private Integer status;
32 |
33 | @NotEmpty
34 | private String workspaceCode;
35 |
36 | @NotEmpty
37 | private String code;
38 |
39 | private Map
12 | * 〈〉
13 | *
14 | * @author dingqianwen
15 | * @date 2020/8/24
16 | * @since 1.0.0
17 | */
18 | @EqualsAndHashCode(callSuper = true)
19 | @Data
20 | public class ViewGeneralRuleResponse extends GetGeneralRuleResponse {
21 |
22 | /**
23 | * 规则入参
24 | */
25 | private Collection
7 | * 〈〉
8 | *
9 | * @author dingqianwen
10 | * @date 2020/7/14
11 | * @since 1.0.0
12 | */
13 | @Data
14 | public class SymbolResponse {
15 |
16 | public String explanation;
17 | public String name;
18 | public String symbol;
19 | }
20 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/system/log/GetLogResponse.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.system.log;
2 |
3 | import com.fasterxml.jackson.annotation.JsonFormat;
4 | import lombok.Data;
5 |
6 | import java.util.Date;
7 |
8 | /**
9 | * 〈一句话功能简述〉
10 | * 〈〉
11 | *
12 | * @author dingqianwen
13 | * @date 2021/3/2
14 | * @since 1.0.0
15 | */
16 | @Data
17 | public class GetLogResponse {
18 |
19 | private Integer id;
20 |
21 | private Integer userId;
22 |
23 | private String username;
24 |
25 | private String tag;
26 |
27 | private String description;
28 |
29 | /**
30 | * 请求ip
31 | */
32 | private String ip;
33 |
34 | /**
35 | * 浏览器
36 | */
37 | private String browser;
38 |
39 | /**
40 | * 浏览器版本
41 | */
42 | private String browserVersion;
43 |
44 | /**
45 | * 请求者系统
46 | */
47 | private String system;
48 |
49 |
50 | /**
51 | * 请求url
52 | */
53 | private String requestUrl;
54 |
55 | /**
56 | * 请求id
57 | */
58 | private String requestId;
59 |
60 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
61 | private Date createTime;
62 |
63 |
64 | }
65 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/system/log/ListLogRequest.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.system.log;
2 |
3 | import lombok.Data;
4 |
5 | /**
6 | * 〈一句话功能简述〉
7 | * 〈〉
8 | *
9 | * @author dingqianwen
10 | * @date 2021/3/2
11 | * @since 1.0.0
12 | */
13 | @Data
14 | public class ListLogRequest {
15 |
16 |
17 | private String tag;
18 |
19 | /**
20 | * 精确
21 | */
22 | private String requestId;
23 |
24 | /**
25 | * 模糊
26 | */
27 | private String requestUrl;
28 |
29 | /**
30 | * 模糊
31 | */
32 | private String username;
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/template/ExceptionMessage.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.template;
2 |
3 | import cn.ruleengine.web.interceptor.TraceInterceptor;
4 | import lombok.Data;
5 |
6 | import java.time.LocalDateTime;
7 |
8 | /**
9 | * 〈一句话功能简述〉
10 | * 〈〉
11 | *
12 | * @author dingqianwen
13 | * @date 2024/9/18
14 | * @since 1.0.0
15 | */
16 | @Data
17 | public class ExceptionMessage {
18 |
19 | private String type;
20 |
21 | private LocalDateTime time = LocalDateTime.now();
22 |
23 | private String message;
24 |
25 | private String requestId = TraceInterceptor.getRequestId();
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/template/VerifyCode.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.template;
2 |
3 | import lombok.Data;
4 |
5 | /**
6 | * 〈一句话功能简述〉
7 | * 〈〉
8 | *
9 | * @author dingqianwen
10 | * @date 2024/9/18
11 | * @since 1.0.0
12 | */
13 | @Data
14 | public class VerifyCode {
15 | private String code;
16 | }
17 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/user/AddUserRequest.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.user;
2 |
3 | import lombok.Data;
4 |
5 | import javax.validation.constraints.Email;
6 | import javax.validation.constraints.NotBlank;
7 |
8 | /**
9 | * 〈AddUserRequest〉
10 | *
11 | * @author 丁乾文
12 | * @date 2021/6/23 3:53 下午
13 | * @since 1.0.0
14 | */
15 | @Data
16 | public class AddUserRequest {
17 |
18 | @NotBlank
19 | private String username;
20 |
21 | @NotBlank
22 | private String password;
23 |
24 | @Email
25 | private String email;
26 |
27 | private String phone;
28 |
29 | private String sex;
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/user/DeleteUserRequest.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.user;
2 |
3 | import io.swagger.annotations.ApiModelProperty;
4 | import lombok.Data;
5 |
6 | import javax.validation.constraints.NotNull;
7 |
8 | /**
9 | * 删除用户
10 | *
11 | * @author : zhj
12 | * @date : 2021/6/23 21:46
13 | **/
14 | @Data
15 | public class DeleteUserRequest {
16 |
17 | @ApiModelProperty("用户id")
18 | @NotNull
19 | private Integer id;
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/user/ForgotRequest.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.user;
2 |
3 | import io.swagger.annotations.ApiModel;
4 | import io.swagger.annotations.ApiModelProperty;
5 | import lombok.Data;
6 |
7 | import javax.validation.constraints.Email;
8 | import javax.validation.constraints.NotBlank;
9 | import javax.validation.constraints.NotNull;
10 | import javax.validation.constraints.Size;
11 |
12 | /**
13 | * 〈一句话功能简述〉
14 | * 〈〉
15 | *
16 | * @author 丁乾文
17 | * @date 2019/8/23
18 | * @since 1.0.0
19 | */
20 | @Data
21 | @ApiModel("用户修改密码请求参数")
22 | public class ForgotRequest {
23 |
24 | @Size(min = 6, max = 16, message = "密码需要6到16位")
25 | @NotBlank(message = "密码不能为空")
26 | @ApiModelProperty("密码")
27 | private String password;
28 |
29 | @NotBlank(message = "邮箱不能为空")
30 | @Email(message = "邮箱格式错误")
31 | @ApiModelProperty("邮箱")
32 | private String email;
33 |
34 | @NotNull(message = "邮箱验证码不能为空")
35 | @ApiModelProperty("邮箱验证码")
36 | private Integer code;
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/user/GetVerifyCodeByEmailRequest.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.user;
2 |
3 | import io.swagger.annotations.ApiModel;
4 | import io.swagger.annotations.ApiModelProperty;
5 | import lombok.Data;
6 |
7 | import javax.validation.constraints.Email;
8 | import javax.validation.constraints.NotBlank;
9 | import javax.validation.constraints.NotNull;
10 |
11 | /**
12 | * 〈一句话功能简述〉
13 | * 〈〉
14 | *
15 | * @author 丁乾文
16 | * @date 2019/8/23
17 | * @since 1.0.0
18 | */
19 | @Data
20 | @ApiModel("获取验证码请求参数")
21 | public class GetVerifyCodeByEmailRequest {
22 |
23 | @NotNull
24 | @ApiModelProperty("获取验证码用途类型")
25 | private Integer type;
26 |
27 | @NotBlank(message = "邮箱不能为空")
28 | @Email(message = "邮箱格式错误")
29 | @ApiModelProperty("邮箱")
30 | private String email;
31 | }
32 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/user/ListUserRequest.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.user;
2 |
3 | import lombok.Data;
4 |
5 | /**
6 | * 〈ListUserRequest〉
7 | *
8 | * @author 丁乾文
9 | * @date 2021/6/23 3:16 下午
10 | * @since 1.0.0
11 | */
12 | @Data
13 | public class ListUserRequest {
14 |
15 | private String username;
16 |
17 | private String email;
18 |
19 | private String sex;
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/user/ListUserResponse.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.user;
2 |
3 | import com.fasterxml.jackson.annotation.JsonFormat;
4 | import lombok.Data;
5 |
6 | import java.util.Date;
7 |
8 | /**
9 | * 〈ListUserRequest〉
10 | *
11 | * @author 丁乾文
12 | * @date 2021/6/23 3:16 下午
13 | * @since 1.0.0
14 | */
15 | @Data
16 | public class ListUserResponse {
17 |
18 | private Integer id;
19 |
20 | private String username;
21 |
22 | private String email;
23 |
24 | private String sex;
25 |
26 | private String avatar;
27 |
28 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
29 | private Date createTime;
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/user/LoginRequest.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.user;
2 |
3 | import lombok.Data;
4 |
5 | import javax.validation.constraints.NotBlank;
6 |
7 | /**
8 | * 〈一句话功能简述〉
9 | * 〈〉
10 | *
11 | * @author dingqianwen
12 | * @date 2020/8/31
13 | * @since 1.0.0
14 | */
15 | @Data
16 | public class LoginRequest {
17 |
18 | @NotBlank(message = "用户名不能为空")
19 | private String username;
20 |
21 | @NotBlank(message = "密码不能为空")
22 | private String password;
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/user/RegisterRequest.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.user;
2 |
3 | import io.swagger.annotations.ApiModelProperty;
4 | import lombok.Data;
5 |
6 | import javax.validation.constraints.Email;
7 | import javax.validation.constraints.NotBlank;
8 | import javax.validation.constraints.NotNull;
9 | import javax.validation.constraints.Size;
10 |
11 | /**
12 | * 〈一句话功能简述〉
13 | * 〈〉
14 | *
15 | * @author liqian
16 | * @date 2020/9/24
17 | */
18 | @Data
19 | public class RegisterRequest {
20 |
21 | @Size(min = 2, max = 10, message = "用户名需要2到10位")
22 | @NotBlank(message = "用户名不能为空")
23 | @ApiModelProperty("用户名")
24 | private String username;
25 |
26 | @Size(min = 6, max = 16, message = "密码需要6到16位")
27 | @NotBlank(message = "密码不能为空")
28 | @ApiModelProperty("密码")
29 | private String password;
30 |
31 | @NotBlank(message = "邮箱不能为空")
32 | @Email(message = "邮箱格式错误")
33 | @ApiModelProperty("邮箱")
34 | private String email;
35 |
36 | @NotNull(message = "邮箱验证码不能为空")
37 | @ApiModelProperty("邮箱验证码")
38 | private Integer code;
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/user/SelectUserRequest.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.user;
2 |
3 | import io.swagger.annotations.ApiModelProperty;
4 | import lombok.Data;
5 |
6 | import javax.validation.constraints.NotNull;
7 |
8 | /**
9 | * 删除用户
10 | *
11 | * @author : zhj
12 | * @date : 2021/6/23 21:46
13 | **/
14 | @Data
15 | public class SelectUserRequest {
16 |
17 | @ApiModelProperty("用户id")
18 | @NotNull
19 | private Integer id;
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/user/SelectUserResponse.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.user;
2 |
3 | import lombok.Data;
4 |
5 |
6 | /**
7 | * @author dqw
8 | */
9 | @Data
10 | public class SelectUserResponse {
11 |
12 | private Integer id;
13 |
14 | private String username;
15 |
16 | private String email;
17 |
18 | private Long phone;
19 |
20 | private String avatar;
21 |
22 | private String sex;
23 |
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/user/UpdateUserInfoRequest.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.user;
2 |
3 | import io.swagger.annotations.ApiModelProperty;
4 | import lombok.Data;
5 |
6 | import javax.validation.constraints.Email;
7 | import javax.validation.constraints.NotNull;
8 |
9 | /**
10 | * 〈一句话功能简述〉
11 | * 〈〉
12 | *
13 | * @author dingqianwen
14 | * @date 2020/4/5
15 | * @since 1.0.0
16 | */
17 | @Data
18 | public class UpdateUserInfoRequest {
19 |
20 | @NotNull
21 | @ApiModelProperty("用户id")
22 | private Integer id;
23 |
24 | @ApiModelProperty("用户性别")
25 | private String sex;
26 |
27 |
28 | @ApiModelProperty("用户头像")
29 | private String avatar;
30 |
31 | @ApiModelProperty("用户手机号")
32 | private Long phone;
33 |
34 | @Email
35 | @ApiModelProperty("用户邮箱")
36 | private String email;
37 |
38 | @ApiModelProperty("个人描述")
39 | private String description;
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/user/UserData.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.user;
2 |
3 | import lombok.Data;
4 |
5 | import java.io.Serializable;
6 |
7 | /**
8 | * 〈一句话功能简述〉
9 | * 〈〉
10 | *
11 | * @author 丁乾文
12 | * @date 2020/11/22
13 | * @since 1.0.0
14 | */
15 | @Data
16 | public class UserData implements Serializable {
17 |
18 | private static final long serialVersionUID = -5944149026431724373L;
19 | /**
20 | * admin = 0
21 | */
22 | public static final int ADMIN = 0;
23 |
24 | private Integer id;
25 |
26 | private String username;
27 |
28 | private String email;
29 |
30 | private Long phone;
31 |
32 | private String avatar;
33 |
34 | private String sex;
35 |
36 | private Integer isAdmin;
37 |
38 | private String description;
39 |
40 | public Boolean getIsAdmin() {
41 | if (this.isAdmin == null) {
42 | return false;
43 | }
44 | return this.isAdmin == 0;
45 | }
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/user/UserResponse.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.user;
2 |
3 | import lombok.Data;
4 |
5 | /**
6 | * 〈一句话功能简述〉
7 | * 〈〉
8 | *
9 | * @author liqian
10 | * @date 2020/9/24
11 | */
12 | @Data
13 | public class UserResponse {
14 |
15 | private Integer id;
16 |
17 | private String username;
18 |
19 | private String email;
20 |
21 | private Long phone;
22 |
23 | private String avatar;
24 |
25 | private String sex;
26 |
27 | private Boolean isAdmin;
28 |
29 | private String description;
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/user/VerifyEmailRequest.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.user;
2 |
3 | import io.swagger.annotations.ApiModel;
4 | import io.swagger.annotations.ApiModelProperty;
5 | import lombok.Data;
6 |
7 | import javax.validation.constraints.Email;
8 | import javax.validation.constraints.NotBlank;
9 |
10 | /**
11 | * 〈一句话功能简述〉
12 | * 〈〉
13 | *
14 | * @author 丁乾文
15 | * @date 2019/8/23
16 | * @since 1.0.0
17 | */
18 | @Data
19 | @ApiModel("验证邮箱是否重复请求参数")
20 | public class VerifyEmailRequest {
21 |
22 | @NotBlank(message = "邮箱不能为空")
23 | @Email(message = "邮箱格式错误")
24 | @ApiModelProperty("邮箱")
25 | private String email;
26 | }
27 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/user/VerifyNameRequest.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.user;
2 |
3 | import io.swagger.annotations.ApiModel;
4 | import io.swagger.annotations.ApiModelProperty;
5 | import lombok.Data;
6 |
7 | import javax.validation.constraints.NotBlank;
8 | import javax.validation.constraints.Size;
9 |
10 | /**
11 | * 〈一句话功能简述〉
12 | * 〈〉
13 | *
14 | * @author 丁乾文
15 | * @date 2019/8/23
16 | * @since 1.0.0
17 | */
18 | @Data
19 | @ApiModel("验证用户名是否重复请求参数")
20 | public class VerifyNameRequest {
21 |
22 | @Size(min = 2, max = 10, message = "用户名需要2到10位")
23 | @NotBlank(message = "用户名不能为空")
24 | @ApiModelProperty("用户名")
25 | private String username;
26 | }
27 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/user/VerifyUserEmailRequest.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.user;
2 |
3 | import io.swagger.annotations.ApiModelProperty;
4 | import lombok.Data;
5 |
6 | import javax.validation.constraints.Email;
7 | import javax.validation.constraints.NotBlank;
8 |
9 | /***
10 | * 注册邮箱检查
11 | * @author niuxiangqian
12 | * @version 1.0
13 | * @since 2021/7/14 3:08 下午
14 | **/
15 | @Data
16 | public class VerifyUserEmailRequest {
17 |
18 | @NotBlank(message = "邮箱不能为空")
19 | @Email(message = "邮箱格式错误")
20 | @ApiModelProperty(value = "邮箱",required = true)
21 | private String email;
22 | }
23 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/user/VerifyUserNameRequest.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.user;
2 |
3 | import io.swagger.annotations.ApiModelProperty;
4 | import lombok.Data;
5 |
6 | import javax.validation.constraints.NotBlank;
7 | import javax.validation.constraints.Size;
8 |
9 | /***
10 | * 验证用户是否可用request
11 | * @author niuxiangqian
12 | * @version 1.0
13 | * @since 2021/7/14 2:54 下午
14 | **/
15 | @Data
16 | public class VerifyUserNameRequest {
17 | @Size(min = 2, max = 10, message = "用户名需要2到10位")
18 | @NotBlank(message = "用户名不能为空")
19 | @ApiModelProperty(value = "用户名",required = true)
20 | private String username;
21 | }
22 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/variable/AddVariableRequest.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.variable;
2 |
3 | import lombok.Data;
4 | import lombok.EqualsAndHashCode;
5 | import org.hibernate.validator.constraints.Length;
6 |
7 | import javax.validation.constraints.NotBlank;
8 | import javax.validation.constraints.NotNull;
9 |
10 | /**
11 | * 〈一句话功能简述〉
12 | * 〈〉
13 | *
14 | * @author dingqianwen
15 | * @date 2020/7/14
16 | * @since 1.0.0
17 | */
18 | @Data
19 | public class AddVariableRequest {
20 |
21 | @NotBlank
22 | @Length(min = 1, max = 25, message = "变量名称长度在 1 到 25 个字符")
23 | private String name;
24 |
25 | @NotNull
26 | private Integer type;
27 |
28 | private String description;
29 |
30 | @NotBlank
31 | private String valueType;
32 |
33 | @NotNull
34 | private String value;
35 |
36 | /**
37 | * 函数
38 | */
39 | @NotNull
40 | private VariableFunction function;
41 |
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/variable/GetVariableResponse.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.variable;
2 |
3 | import lombok.Data;
4 |
5 |
6 | /**
7 | * 〈一句话功能简述〉
8 | * 〈〉
9 | *
10 | * @author dingqianwen
11 | * @date 2020/8/25
12 | * @since 1.0.0
13 | */
14 | @Data
15 | public class GetVariableResponse {
16 |
17 | private Integer id;
18 |
19 | private String name;
20 |
21 | private String description;
22 |
23 | private Integer type;
24 |
25 | private String valueType;
26 |
27 | private String value;
28 |
29 | private VariableFunction function;
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/variable/ListVariableRequest.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.variable;
2 |
3 | import lombok.Data;
4 | import lombok.EqualsAndHashCode;
5 |
6 | import java.util.List;
7 |
8 | /**
9 | * 〈一句话功能简述〉
10 | * 〈〉
11 | *
12 | * @author dingqianwen
13 | * @date 2020/7/14
14 | * @since 1.0.0
15 | */
16 | @Data
17 | public class ListVariableRequest {
18 |
19 | private String name;
20 | private List
10 | * 〈〉
11 | *
12 | * @author dingqianwen
13 | * @date 2020/7/14
14 | * @since 1.0.0
15 | */
16 | @Data
17 | public class ListVariableResponse {
18 | private Integer id;
19 |
20 | private String name;
21 |
22 | private String description;
23 |
24 | private String valueType;
25 |
26 | private String functionName;
27 |
28 | private Integer type;
29 |
30 | private String value;
31 |
32 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
33 | private Date createTime;
34 | }
35 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/variable/ParamValue.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.variable;
2 |
3 | import lombok.Data;
4 |
5 | import javax.validation.constraints.NotBlank;
6 | import javax.validation.constraints.NotNull;
7 |
8 | /**
9 | * 〈一句话功能简述〉
10 | * 〈〉
11 | *
12 | * @author dingqianwen
13 | * @date 2020/8/30
14 | * @since 1.0.0
15 | */
16 | @Data
17 | public class ParamValue {
18 |
19 | private String name;
20 |
21 | @NotBlank
22 | private String code;
23 |
24 | /**
25 | * 规则参数/变量/固定值
26 | */
27 | @NotNull
28 | private Integer type;
29 |
30 | @NotNull
31 | private String value;
32 |
33 | /**
34 | * STRING,BOOLEAN...
35 | */
36 | @NotBlank
37 | private String valueType;
38 |
39 | private String valueName;
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/variable/UpdateVariableRequest.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.variable;
2 |
3 | import lombok.Data;
4 | import org.hibernate.validator.constraints.Length;
5 |
6 | import javax.validation.constraints.NotBlank;
7 | import javax.validation.constraints.NotNull;
8 |
9 | /**
10 | * 〈一句话功能简述〉
11 | * 〈〉
12 | *
13 | * @author dingqianwen
14 | * @date 2020/8/25
15 | * @since 1.0.0
16 | */
17 | @Data
18 | public class UpdateVariableRequest {
19 |
20 | @NotNull
21 | private Integer id;
22 |
23 | @Length(min = 1, max = 25, message = "变量名称长度在 1 到 25 个字符")
24 | @NotBlank
25 | private String name;
26 |
27 | @NotNull
28 | private Integer type;
29 |
30 | private String description;
31 |
32 | @NotNull
33 | private String value;
34 |
35 | /**
36 | * 函数
37 | */
38 | @NotNull
39 | private VariableFunction function;
40 |
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/variable/VariableFunction.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.variable;
2 |
3 | import lombok.Data;
4 |
5 | import javax.validation.Valid;
6 | import javax.validation.constraints.NotNull;
7 | import java.util.List;
8 |
9 | /**
10 | * 〈VariableFunction〉
11 | *
12 | * @author 丁乾文
13 | * @date 2021/8/2 7:07 下午
14 | * @since 1.0.0
15 | */
16 | @Data
17 | public class VariableFunction {
18 |
19 | private Integer id;
20 |
21 | private String name;
22 | /**
23 | * 函数中所有的参数
24 | */
25 | @Valid
26 | @NotNull
27 | private List
8 | * 〈〉
9 | *
10 | * @author 丁乾文
11 | * @date 2020/12/11
12 | * @since 1.0.0
13 | */
14 | @Data
15 | public class AccessKey {
16 |
17 | private Integer id;
18 | private String accessKeyId;
19 | private String accessKeySecret;
20 |
21 | /**
22 | * 对比AccessKey
23 | *
24 | * @param accessKeyId id
25 | * @param accessKeySecret Secret
26 | */
27 | public boolean equals(String accessKeyId, String accessKeySecret) {
28 | if (accessKeyId == null || accessKeySecret == null) {
29 | return false;
30 | }
31 | if (!this.accessKeyId.equals(accessKeyId)) {
32 | return false;
33 | }
34 | return this.accessKeySecret.equals(accessKeySecret);
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/workspace/AddWorkspaceRequest.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.workspace;
2 |
3 | import lombok.Data;
4 |
5 | import javax.validation.constraints.NotBlank;
6 |
7 | /**
8 | * 〈AddWorkspaceRequest〉
9 | *
10 | * @author 丁乾文
11 | * @date 2021/6/23 5:58 下午
12 | * @since 1.0.0
13 | */
14 | @Data
15 | public class AddWorkspaceRequest {
16 |
17 | @NotBlank
18 | private String code;
19 |
20 | @NotBlank
21 | private String name;
22 |
23 | private String description;
24 |
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/workspace/CurrentWorkspaceInfoResponse.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.workspace;
2 |
3 | import lombok.Data;
4 | import lombok.EqualsAndHashCode;
5 |
6 | /**
7 | * @author Administrator
8 | */
9 | @EqualsAndHashCode(callSuper = true)
10 | @Data
11 | public class CurrentWorkspaceInfoResponse extends Workspace {
12 |
13 |
14 | private Boolean isAdmin;
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/workspace/EditWorkspaceRequest.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.workspace;
2 |
3 | import lombok.Data;
4 |
5 | import javax.validation.constraints.NotBlank;
6 | import javax.validation.constraints.NotNull;
7 |
8 | /**
9 | * 〈AddWorkspaceRequest〉
10 | *
11 | * @author 丁乾文
12 | * @date 2021/6/23 5:58 下午
13 | * @since 1.0.0
14 | */
15 | @Data
16 | public class EditWorkspaceRequest {
17 |
18 | @NotNull
19 | private Integer id;
20 | @NotBlank
21 | private String name;
22 |
23 | private String description;
24 |
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/workspace/ListWorkspaceRequest.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.workspace;
2 |
3 | import lombok.Data;
4 |
5 | /**
6 | * 〈一句话功能简述〉
7 | * 〈〉
8 | *
9 | * @author dingqianwen
10 | * @date 2020/12/19
11 | * @since 1.0.0
12 | */
13 | @Data
14 | public class ListWorkspaceRequest {
15 | private String name;
16 |
17 | private String code;
18 | }
19 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/workspace/ListWorkspaceResponse.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.workspace;
2 |
3 | import com.fasterxml.jackson.annotation.JsonFormat;
4 | import lombok.Data;
5 | import lombok.EqualsAndHashCode;
6 |
7 | import java.util.Date;
8 | import java.util.List;
9 |
10 | /**
11 | * 〈一句话功能简述〉
12 | * 〈〉
13 | *
14 | * @author dingqianwen
15 | * @date 2020/12/19
16 | * @since 1.0.0
17 | */
18 | @EqualsAndHashCode(callSuper = true)
19 | @Data
20 | public class ListWorkspaceResponse extends Workspace {
21 |
22 | private String description;
23 |
24 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
25 | private Date createTime;
26 |
27 | /**
28 | * 工作空间管理员列表
29 | */
30 | private List
9 | * 〈〉
10 | *
11 | * @author 丁乾文
12 | * @date 2020/11/21
13 | * @since 1.0.0
14 | */
15 | @Data
16 | public class Workspace implements Serializable {
17 |
18 | private static final long serialVersionUID = 8313752582019183771L;
19 |
20 | private Integer id;
21 |
22 | private String name;
23 |
24 | private String code;
25 |
26 | /**
27 | * 当前登陆用户是否为工作空间管理
28 | */
29 | private boolean isAdministration;
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/rule-engine-open-web/src/main/java/cn/ruleengine/web/vo/workspace/member/BindMemberRequest.java:
--------------------------------------------------------------------------------
1 | package cn.ruleengine.web.vo.workspace.member;
2 |
3 | import lombok.Data;
4 |
5 | import javax.validation.constraints.NotNull;
6 | import java.util.List;
7 |
8 | /**
9 | * 〈BindMemberRequest〉
10 | *
11 | * @author 丁乾文
12 | * @date 2021/6/23 4:30 下午
13 | * @since 1.0.0
14 | */
15 | @Data
16 | public class BindMemberRequest {
17 |
18 | /**
19 | * 绑定的用户列表
20 | */
21 | @NotNull
22 | private List