diff --git a/src/main/java/neatlogic/framework/condition/dto/ConditionBaseVo.java b/src/main/java/neatlogic/framework/condition/dto/ConditionBaseVo.java new file mode 100644 index 0000000000000000000000000000000000000000..dfecbfdc470682a37c89c1c4cccd7ce4e7c08fb5 --- /dev/null +++ b/src/main/java/neatlogic/framework/condition/dto/ConditionBaseVo.java @@ -0,0 +1,59 @@ +/*Copyright (C) 2024 深圳极向量科技有限公司 All Rights Reserved. + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see .*/ + +package neatlogic.framework.condition.dto; + +import java.io.Serializable; + +public class ConditionBaseVo implements Serializable { + private static final long serialVersionUID = -776692828809703841L; + + protected String uuid; + protected String name; + protected String expression; + protected Object valueList; + + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getExpression() { + return expression; + } + + public void setExpression(String expression) { + this.expression = expression; + } + + public Object getValueList() { + return valueList; + } + + public void setValueList(Object valueList) { + this.valueList = valueList; + } +} diff --git a/src/main/java/neatlogic/framework/condition/dto/ConditionConfigBaseVo.java b/src/main/java/neatlogic/framework/condition/dto/ConditionConfigBaseVo.java new file mode 100644 index 0000000000000000000000000000000000000000..148dde6d0118aeb31f751be2bfcf21693e85a0b1 --- /dev/null +++ b/src/main/java/neatlogic/framework/condition/dto/ConditionConfigBaseVo.java @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2024 深圳极向量科技有限公司 All Rights Reserved. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package neatlogic.framework.condition.dto; + +import neatlogic.framework.common.dto.BaseEditorVo; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +public class ConditionConfigBaseVo> extends BaseEditorVo implements Serializable { + + private static final long serialVersionUID = 5439300427812355573L; + + protected List conditionGroupList = new ArrayList<>(); + + protected List conditionGroupRelList = new ArrayList<>(); + + public List getConditionGroupList() { + return conditionGroupList; + } + + public void setConditionGroupList(List conditionGroupList) { + this.conditionGroupList = conditionGroupList; + } + + public List getConditionGroupRelList() { + return conditionGroupRelList; + } + + public void setConditionGroupRelList(List conditionGroupRelList) { + this.conditionGroupRelList = conditionGroupRelList; + } + + protected T getConditionGroupByUuid(String uuid) { + for (T t : conditionGroupList) { + if (Objects.equals(t.getUuid(), uuid)) { + return t; + } + } + return null; + } +} diff --git a/src/main/java/neatlogic/framework/condition/dto/ConditionGroupBaseVo.java b/src/main/java/neatlogic/framework/condition/dto/ConditionGroupBaseVo.java new file mode 100644 index 0000000000000000000000000000000000000000..0cda0674577c42c4275b162acffd2aec1bd00a4d --- /dev/null +++ b/src/main/java/neatlogic/framework/condition/dto/ConditionGroupBaseVo.java @@ -0,0 +1,61 @@ +/*Copyright (C) 2024 深圳极向量科技有限公司 All Rights Reserved. + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see .*/ + +package neatlogic.framework.condition.dto; + +import java.io.Serializable; +import java.util.List; +import java.util.Objects; + +public class ConditionGroupBaseVo implements Serializable { + private static final long serialVersionUID = 8392325201425982471L; + + protected String uuid; + protected List conditionList; + protected List conditionRelList; + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public String getUuid() { + return uuid; + } + + public List getConditionList() { + return conditionList; + } + + public void setConditionList(List conditionList) { + this.conditionList = conditionList; + } + + public List getConditionRelList() { + return conditionRelList; + } + + public void setConditionRelList(List conditionRelList) { + this.conditionRelList = conditionRelList; + } + + protected T getConditionByUuid(String uuid) { + for (T t : conditionList) { + if (Objects.equals(t.getUuid(), uuid)) { + return t; + } + } + return null; + } +} diff --git a/src/main/java/neatlogic/framework/condition/dto/RelVo.java b/src/main/java/neatlogic/framework/condition/dto/RelVo.java new file mode 100644 index 0000000000000000000000000000000000000000..faddda734c5b4a31ce7c612725c7fca66d7185fb --- /dev/null +++ b/src/main/java/neatlogic/framework/condition/dto/RelVo.java @@ -0,0 +1,51 @@ +/* + * Copyright (C) 2024 深圳极向量科技有限公司 All Rights Reserved. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package neatlogic.framework.condition.dto; + +import java.io.Serializable; + +public class RelVo implements Serializable { + + private String from; + private String to; + private String joinType; + + public String getFrom() { + return from; + } + + public void setFrom(String from) { + this.from = from; + } + + public String getTo() { + return to; + } + + public void setTo(String to) { + this.to = to; + } + + public String getJoinType() { + return joinType; + } + + public void setJoinType(String joinType) { + this.joinType = joinType; + } +} diff --git a/src/main/java/neatlogic/framework/condition/dto/TestConditionConfigVo.java b/src/main/java/neatlogic/framework/condition/dto/TestConditionConfigVo.java new file mode 100644 index 0000000000000000000000000000000000000000..f5e8542bf2bdf0cc27233cb9ee43ef6773c17d99 --- /dev/null +++ b/src/main/java/neatlogic/framework/condition/dto/TestConditionConfigVo.java @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2024 深圳极向量科技有限公司 All Rights Reserved. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package neatlogic.framework.condition.dto; + +import java.util.List; + +public class TestConditionConfigVo extends ConditionConfigBaseVo> { + + public static void main(String[] args) { + TestConditionConfigVo testConditionConfigVo = new TestConditionConfigVo(); + List> conditionGroupList1 = testConditionConfigVo.getConditionGroupList(); + for (TestConditionGroupVo conditionGroupVo : conditionGroupList1) { + System.out.println("conditionGroupVo.getId() = " + conditionGroupVo.getId()); + List conditionList = conditionGroupVo.getConditionList(); + for (TestConditionVo conditionVo : conditionList) { + System.out.println("conditionVo.getUuid() = " + conditionVo.getUuid()); + System.out.println("conditionVo.getId() = " + conditionVo.getId()); + } + } + } + + public static class TestConditionVo extends ConditionBaseVo { + private String id; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + } + public static class TestConditionGroupVo extends ConditionGroupBaseVo { + private String id; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + } +}