From f9dae306e5b817b5965f027babd93039268902b5 Mon Sep 17 00:00:00 2001 From: icanci Date: Sun, 24 Sep 2023 17:06:20 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E8=87=AA=E6=B5=8Bbug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../icanci/loopstack/bic/biz/cache/GraphRepository.java | 9 ++++----- .../loopstack/bic/biz/service/impl/GraphServiceImpl.java | 8 ++++++++ .../loopstack/bic/biz/service/impl/NodeServiceImpl.java | 2 +- .../bic/biz/service/impl/SnapshotServiceImpl.java | 2 ++ .../bic/biz/service/impl/SystemServiceImpl.java | 2 +- .../bic/biz/service/impl/UnitViewTreeServiceImpl.java | 1 + 6 files changed, 17 insertions(+), 7 deletions(-) diff --git a/biz/src/main/java/cn/icanci/loopstack/bic/biz/cache/GraphRepository.java b/biz/src/main/java/cn/icanci/loopstack/bic/biz/cache/GraphRepository.java index 63ee3d2..bc047e7 100644 --- a/biz/src/main/java/cn/icanci/loopstack/bic/biz/cache/GraphRepository.java +++ b/biz/src/main/java/cn/icanci/loopstack/bic/biz/cache/GraphRepository.java @@ -5,9 +5,8 @@ import java.util.Map; import javax.annotation.Resource; -import org.springframework.beans.BeansException; -import org.springframework.context.ApplicationContext; -import org.springframework.context.ApplicationContextAware; +import org.springframework.boot.ApplicationArguments; +import org.springframework.boot.ApplicationRunner; import org.springframework.stereotype.Service; import com.google.common.collect.Maps; @@ -22,7 +21,7 @@ import cn.icanci.loopstack.bic.graph.Graph; * @since 1.0 Created in 2023/09/20 23:59 */ @Service -public final class GraphRepository implements ApplicationContextAware { +public final class GraphRepository implements ApplicationRunner { @Resource private SnapshotService snapshotService; @@ -30,7 +29,7 @@ public final class GraphRepository implements ApplicationContextAware { private static final Map REPOSITORY = Maps.newConcurrentMap(); @Override - public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { + public void run(ApplicationArguments args) throws Exception { doGraphRepositoryReload(); } diff --git a/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/impl/GraphServiceImpl.java b/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/impl/GraphServiceImpl.java index d8e26f1..b3691cd 100644 --- a/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/impl/GraphServiceImpl.java +++ b/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/impl/GraphServiceImpl.java @@ -81,6 +81,14 @@ public class GraphServiceImpl implements GraphService { edgeRelation.getSource().setPathPass(true); } } + + for (UnitViewNode node : unitViewGraph.getNodes()) { + if (node.hasPathPass()) { + continue; + } + String text = node.getAttrs().getLabel().getText(); + node.getAttrs().getLabel().setText(text + "(无数据)"); + } } private List buildBuryings(NodeDataModeEnum nodeDataMode, String nodeDataKey, Map> uniqueKeyMap) { diff --git a/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/impl/NodeServiceImpl.java b/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/impl/NodeServiceImpl.java index 3bed976..a6b8a90 100644 --- a/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/impl/NodeServiceImpl.java +++ b/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/impl/NodeServiceImpl.java @@ -44,7 +44,7 @@ public class NodeServiceImpl implements NodeService { if (doInsert(nodeVO)) { NodeDO insert = nodeMapper.vo2do(nodeVO); nodeDAO.insert(insert); - graphDtsServiceProxy.dtsUnitViewTree(nodeVO); + graphDtsServiceProxy.dtsUnitViewTree(nodeMapper.do2vo(insert)); } else { nodeDAO.update(nodeMapper.vo2do(nodeVO)); } diff --git a/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/impl/SnapshotServiceImpl.java b/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/impl/SnapshotServiceImpl.java index 2de5c7b..fee0236 100644 --- a/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/impl/SnapshotServiceImpl.java +++ b/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/impl/SnapshotServiceImpl.java @@ -6,6 +6,7 @@ import java.util.List; import javax.annotation.Resource; import org.apache.commons.collections4.CollectionUtils; +import org.springframework.core.annotation.Order; import org.springframework.stereotype.Service; import com.google.common.collect.Lists; @@ -25,6 +26,7 @@ import cn.icanci.loopstack.bic.graph.Graph; * @author icanci * @since 1.0 Created in 2023/09/21 00:09 */ +@Order(1) @Service public class SnapshotServiceImpl implements SnapshotService { @Resource diff --git a/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/impl/SystemServiceImpl.java b/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/impl/SystemServiceImpl.java index 76770f4..2759d89 100644 --- a/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/impl/SystemServiceImpl.java +++ b/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/impl/SystemServiceImpl.java @@ -42,7 +42,7 @@ public class SystemServiceImpl implements SystemService { if (doInsert(systemVO)) { SystemDO insert = systemMapper.vo2do(systemVO); systemDAO.insert(insert); - graphDtsServiceProxy.dtsUnitViewTree(systemVO); + graphDtsServiceProxy.dtsUnitViewTree(systemMapper.do2vo(insert)); } else { systemDAO.update(systemMapper.vo2do(systemVO)); } diff --git a/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/impl/UnitViewTreeServiceImpl.java b/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/impl/UnitViewTreeServiceImpl.java index 46d65d2..34b8368 100644 --- a/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/impl/UnitViewTreeServiceImpl.java +++ b/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/impl/UnitViewTreeServiceImpl.java @@ -39,6 +39,7 @@ public class UnitViewTreeServiceImpl implements UnitViewTreeService { if (doInsert(unitViewTreeVO)) { UnitViewTreeDO insert = unitViewTreeMapper.vo2do(unitViewTreeVO); unitViewTreeDAO.insert(insert); + unitViewTreeVO = unitViewTreeMapper.do2vo(insert); } else { unitViewTreeDAO.update(unitViewTreeMapper.vo2do(unitViewTreeVO)); } -- Gitee From 4cb4b74ef2d376f3e85885f2b59d718b876b68d6 Mon Sep 17 00:00:00 2001 From: icanci Date: Sun, 24 Sep 2023 17:38:14 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E8=87=AA=E6=B5=8Bbug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bic/biz/adapter/GraphAdapterService.java | 2 +- .../bic/biz/dts/impl/NodeDtsServiceImpl.java | 15 --------------- .../bic/biz/dts/impl/SystemDtsServiceImpl.java | 17 +++++++++++++++++ .../impl/UnitViewTreeGraphDtsServiceImpl.java | 2 +- .../bic/biz/service/impl/NodeServiceImpl.java | 2 +- 5 files changed, 20 insertions(+), 18 deletions(-) diff --git a/biz/src/main/java/cn/icanci/loopstack/bic/biz/adapter/GraphAdapterService.java b/biz/src/main/java/cn/icanci/loopstack/bic/biz/adapter/GraphAdapterService.java index 8998617..d8fb7b9 100644 --- a/biz/src/main/java/cn/icanci/loopstack/bic/biz/adapter/GraphAdapterService.java +++ b/biz/src/main/java/cn/icanci/loopstack/bic/biz/adapter/GraphAdapterService.java @@ -80,7 +80,7 @@ public class GraphAdapterService implements GraphAdapter { private Map buildNodeMap(NodeVO node) { HashMap nodeMap = Maps.newHashMap(); - nodeMap.put("id", node.getUuid()); + nodeMap.put("nodeId", node.getUuid()); nodeMap.put("nodeName", node.getNodeName()); return nodeMap; } diff --git a/biz/src/main/java/cn/icanci/loopstack/bic/biz/dts/impl/NodeDtsServiceImpl.java b/biz/src/main/java/cn/icanci/loopstack/bic/biz/dts/impl/NodeDtsServiceImpl.java index 0567852..73279c0 100644 --- a/biz/src/main/java/cn/icanci/loopstack/bic/biz/dts/impl/NodeDtsServiceImpl.java +++ b/biz/src/main/java/cn/icanci/loopstack/bic/biz/dts/impl/NodeDtsServiceImpl.java @@ -6,11 +6,9 @@ import org.springframework.stereotype.Service; import cn.icanci.loopstack.bic.biz.dts.DTS; import cn.icanci.loopstack.bic.biz.dts.GraphDtsService; -import cn.icanci.loopstack.bic.biz.service.NodeStyleService; import cn.icanci.loopstack.bic.biz.service.NodeVueService; import cn.icanci.loopstack.bic.biz.utils.TemplateFileUtils; import cn.icanci.loopstack.bic.common.enums.NodeVueTypeEnum; -import cn.icanci.loopstack.bic.common.model.base.NodeStyleVO; import cn.icanci.loopstack.bic.common.model.base.NodeVO; import cn.icanci.loopstack.bic.common.model.base.NodeVueVO; @@ -25,27 +23,14 @@ public class NodeDtsServiceImpl implements GraphDtsService { private static final String DEFAULT_KEY = "DEFAULT_KEY"; private static final String DEFAULT_PLUGIN_CONTEXT = "{}"; @Resource - private NodeStyleService nodeStyleService; - @Resource private NodeVueService nodeVueService; @Override public void dtsUnitViewTree(NodeVO node) { - // 插入样式信息 - nodeStyleService.save(buildNodeStyle(node)); // 插入组件信息 nodeVueService.save(buildNodeVue(node)); } - private NodeStyleVO buildNodeStyle(NodeVO node) { - NodeStyleVO nodeStyle = new NodeStyleVO(); - nodeStyle.setSystemUuid(node.getSystemUuid()); - nodeStyle.setNodeStyleName(DEFAULT_NAME); - nodeStyle.setNodeStyleKey(DEFAULT_KEY); - nodeStyle.setNodeStyle(TemplateFileUtils.queryDefaultNodeStyleTemplate()); - return nodeStyle; - } - private NodeVueVO buildNodeVue(NodeVO node) { NodeVueVO nodeVue = new NodeVueVO(); nodeVue.setSystemUuid(node.getSystemUuid()); diff --git a/biz/src/main/java/cn/icanci/loopstack/bic/biz/dts/impl/SystemDtsServiceImpl.java b/biz/src/main/java/cn/icanci/loopstack/bic/biz/dts/impl/SystemDtsServiceImpl.java index b4d0140..f0d5367 100644 --- a/biz/src/main/java/cn/icanci/loopstack/bic/biz/dts/impl/SystemDtsServiceImpl.java +++ b/biz/src/main/java/cn/icanci/loopstack/bic/biz/dts/impl/SystemDtsServiceImpl.java @@ -7,8 +7,10 @@ import org.springframework.stereotype.Service; import cn.icanci.loopstack.bic.biz.dts.DTS; import cn.icanci.loopstack.bic.biz.dts.GraphDtsService; import cn.icanci.loopstack.bic.biz.service.EdgeStyleService; +import cn.icanci.loopstack.bic.biz.service.NodeStyleService; import cn.icanci.loopstack.bic.biz.utils.TemplateFileUtils; import cn.icanci.loopstack.bic.common.model.base.EdgeStyleVO; +import cn.icanci.loopstack.bic.common.model.base.NodeStyleVO; import cn.icanci.loopstack.bic.common.model.base.SystemVO; /** @@ -20,12 +22,18 @@ import cn.icanci.loopstack.bic.common.model.base.SystemVO; public class SystemDtsServiceImpl implements GraphDtsService { @Resource private EdgeStyleService edgeStyleService; + @Resource + private NodeStyleService nodeStyleService; + private static final String DEFAULT_NAME = "系统默认"; private static final String DEFAULT_KEY = "DEFAULT_KEY"; @Override public void dtsUnitViewTree(SystemVO system) { + // 插入默认边样式 edgeStyleService.save(buildEdge(system)); + // 插入默认节点样式 + nodeStyleService.save(buildNodeStyle(system.getUuid())); } private EdgeStyleVO buildEdge(SystemVO system) { @@ -36,4 +44,13 @@ public class SystemDtsServiceImpl implements GraphDtsService { edge.setEdgeStyle(TemplateFileUtils.queryDefaultEdgeStyleTemplate()); return edge; } + + private NodeStyleVO buildNodeStyle(String systemUuid) { + NodeStyleVO nodeStyle = new NodeStyleVO(); + nodeStyle.setSystemUuid(systemUuid); + nodeStyle.setNodeStyleName(DEFAULT_NAME); + nodeStyle.setNodeStyleKey(DEFAULT_KEY); + nodeStyle.setNodeStyle(TemplateFileUtils.queryDefaultNodeStyleTemplate()); + return nodeStyle; + } } diff --git a/biz/src/main/java/cn/icanci/loopstack/bic/biz/dts/impl/UnitViewTreeGraphDtsServiceImpl.java b/biz/src/main/java/cn/icanci/loopstack/bic/biz/dts/impl/UnitViewTreeGraphDtsServiceImpl.java index 0fea346..8af0054 100644 --- a/biz/src/main/java/cn/icanci/loopstack/bic/biz/dts/impl/UnitViewTreeGraphDtsServiceImpl.java +++ b/biz/src/main/java/cn/icanci/loopstack/bic/biz/dts/impl/UnitViewTreeGraphDtsServiceImpl.java @@ -79,7 +79,7 @@ public class UnitViewTreeGraphDtsServiceImpl implements GraphDtsService, List> adapter2Pair(List relationModel) { List nodeVueList = nodeVueService.queryAll(); - Map nodeVueMap = nodeVueList.stream().collect(Collectors.toMap(NodeVueVO::getUuid, nodeVueVO -> nodeVueVO)); + Map nodeVueMap = nodeVueList.stream().collect(Collectors.toMap(NodeVueVO::getNodeUuid, nodeVueVO -> nodeVueVO)); List edges = Lists.newArrayList(); Set nodes = Sets.newHashSet(); diff --git a/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/impl/NodeServiceImpl.java b/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/impl/NodeServiceImpl.java index a6b8a90..d716659 100644 --- a/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/impl/NodeServiceImpl.java +++ b/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/impl/NodeServiceImpl.java @@ -44,7 +44,7 @@ public class NodeServiceImpl implements NodeService { if (doInsert(nodeVO)) { NodeDO insert = nodeMapper.vo2do(nodeVO); nodeDAO.insert(insert); - graphDtsServiceProxy.dtsUnitViewTree(nodeMapper.do2vo(insert)); + graphDtsServiceProxy.dtsUnitViewTree(nodeMapper.do2vo(insert)); } else { nodeDAO.update(nodeMapper.vo2do(nodeVO)); } -- Gitee From 739b475592ecc023515d7c36437b283729b275b6 Mon Sep 17 00:00:00 2001 From: icanci Date: Sun, 24 Sep 2023 18:50:30 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=9B=BE=E6=B8=B2=E6=9F=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../biz/service/impl/GraphServiceImpl.java | 7 +- .../main/resources/vueboot/src/api/graph.js | 9 + .../resources/vueboot/src/router/index.js | 12 +- .../src/views/bic-view/bic-singleton-view.vue | 310 +++++++- .../src/views/bic-view/bic-summary-view.vue | 2 +- .../vueboot/src/views/bic-view/vuep.css | 715 ++++++++++++++++++ 6 files changed, 1039 insertions(+), 16 deletions(-) create mode 100644 views/src/main/resources/vueboot/src/api/graph.js create mode 100644 views/src/main/resources/vueboot/src/views/bic-view/vuep.css diff --git a/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/impl/GraphServiceImpl.java b/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/impl/GraphServiceImpl.java index b3691cd..ff795c8 100644 --- a/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/impl/GraphServiceImpl.java +++ b/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/impl/GraphServiceImpl.java @@ -87,7 +87,12 @@ public class GraphServiceImpl implements GraphService { continue; } String text = node.getAttrs().getLabel().getText(); - node.getAttrs().getLabel().setText(text + "(无数据)"); + String noData = "(无数据)"; + + if (text.contains(noData)) { + continue; + } + node.getAttrs().getLabel().setText(text + noData); } } diff --git a/views/src/main/resources/vueboot/src/api/graph.js b/views/src/main/resources/vueboot/src/api/graph.js new file mode 100644 index 0000000..e27f96c --- /dev/null +++ b/views/src/main/resources/vueboot/src/api/graph.js @@ -0,0 +1,9 @@ +import request from '@/utils/request' + +export async function graphQuery(graph) { + return await request({ + url: '/bicAdmin/graph/load', + method: 'post', + data: graph + }) +} diff --git a/views/src/main/resources/vueboot/src/router/index.js b/views/src/main/resources/vueboot/src/router/index.js index acda0c8..50246a0 100644 --- a/views/src/main/resources/vueboot/src/router/index.js +++ b/views/src/main/resources/vueboot/src/router/index.js @@ -220,12 +220,12 @@ export const constantRoutes = [ name: 'bicSummaryView', meta: {title: '聚合视图'} }, - { - path: 'demo-view', - component: () => import('@/views/bic-view/demo-view'), - name: 'demoView', - meta: {title: 'demoView'} - }, + // { + // path: 'demo-view', + // component: () => import('@/views/bic-view/demo-view'), + // name: 'demoView', + // meta: {title: 'demoView'} + // }, ] }, { diff --git a/views/src/main/resources/vueboot/src/views/bic-view/bic-singleton-view.vue b/views/src/main/resources/vueboot/src/views/bic-view/bic-singleton-view.vue index 2b7f316..86db109 100644 --- a/views/src/main/resources/vueboot/src/views/bic-view/bic-singleton-view.vue +++ b/views/src/main/resources/vueboot/src/views/bic-view/bic-singleton-view.vue @@ -1,20 +1,314 @@ diff --git a/views/src/main/resources/vueboot/src/views/bic-view/bic-summary-view.vue b/views/src/main/resources/vueboot/src/views/bic-view/bic-summary-view.vue index 2afd280..773cb5c 100644 --- a/views/src/main/resources/vueboot/src/views/bic-view/bic-summary-view.vue +++ b/views/src/main/resources/vueboot/src/views/bic-view/bic-summary-view.vue @@ -1,7 +1,7 @@ diff --git a/views/src/main/resources/vueboot/src/views/bic-view/vuep.css b/views/src/main/resources/vueboot/src/views/bic-view/vuep.css new file mode 100644 index 0000000..d5e3dba --- /dev/null +++ b/views/src/main/resources/vueboot/src/views/bic-view/vuep.css @@ -0,0 +1,715 @@ +/* BASICS */ +.CodeMirror { + /* Set height, width, borders, and global font properties here */ + font-family: monospace; + height: 300px; + color: black; +} + +/* PADDING */ +.CodeMirror-lines { + padding: 4px 0; + /* Vertical padding around content */ +} + +.CodeMirror pre { + padding: 0 4px; + /* Horizontal padding of content */ +} + +.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { + background-color: white; + /* The little square between H and V scrollbars */ +} + +/* GUTTER */ +.CodeMirror-gutters { + border-right: 1px solid #ddd; + background-color: #f7f7f7; + white-space: nowrap; +} + +.CodeMirror-linenumbers { +} + +.CodeMirror-linenumber { + padding: 0 3px 0 5px; + min-width: 20px; + text-align: right; + color: #999; + white-space: nowrap; +} + +.CodeMirror-guttermarker { + color: black; +} + +.CodeMirror-guttermarker-subtle { + color: #999; +} + +/* CURSOR */ +.CodeMirror-cursor { + border-left: 1px solid black; + border-right: none; + width: 0; +} + +/* Shown when moving in bi-directional text */ +.CodeMirror div.CodeMirror-secondarycursor { + border-left: 1px solid silver; +} + +.cm-fat-cursor .CodeMirror-cursor { + width: auto; + border: 0 !important; + background: #7e7; +} + +.cm-fat-cursor div.CodeMirror-cursors { + z-index: 1; +} + +.cm-animate-fat-cursor { + width: auto; + border: 0; + -webkit-animation: blink 1.06s steps(1) infinite; + animation: blink 1.06s steps(1) infinite; + background-color: #7e7; +} + +@-webkit-keyframes blink { + 0% { + } + 50% { + background-color: transparent; + } + 100% { + } +} + +@keyframes blink { + 0% { + } + 50% { + background-color: transparent; + } + 100% { + } +} + +/* Can style cursor different in overwrite (non-insert) mode */ +.CodeMirror-overwrite .CodeMirror-cursor { +} + +.cm-tab { + display: inline-block; + text-decoration: inherit; +} + +.CodeMirror-rulers { + position: absolute; + left: 0; + right: 0; + top: -50px; + bottom: -20px; + overflow: hidden; +} + +.CodeMirror-ruler { + border-left: 1px solid #ccc; + top: 0; + bottom: 0; + position: absolute; +} + +/* DEFAULT THEME */ +.cm-s-default .cm-header { + color: blue; +} + +.cm-s-default .cm-quote { + color: #090; +} + +.cm-negative { + color: #d44; +} + +.cm-positive { + color: #292; +} + +.cm-header, .cm-strong { + font-weight: 700; +} + +.cm-em { + font-style: italic; +} + +.cm-link { + text-decoration: underline; +} + +.cm-strikethrough { + text-decoration: line-through; +} + +.cm-s-default .cm-keyword { + color: #708; +} + +.cm-s-default .cm-atom { + color: #219; +} + +.cm-s-default .cm-number { + color: #164; +} + +.cm-s-default .cm-def { + color: #00f; +} + +.cm-s-default .cm-variable, .cm-s-default .cm-punctuation, .cm-s-default .cm-property, .cm-s-default .cm-operator { +} + +.cm-s-default .cm-variable-2 { + color: #05a; +} + +.cm-s-default .cm-variable-3 { + color: #085; +} + +.cm-s-default .cm-comment { + color: #a50; +} + +.cm-s-default .cm-string { + color: #a11; +} + +.cm-s-default .cm-string-2 { + color: #f50; +} + +.cm-s-default .cm-meta { + color: #555; +} + +.cm-s-default .cm-qualifier { + color: #555; +} + +.cm-s-default .cm-builtin { + color: #30a; +} + +.cm-s-default .cm-bracket { + color: #997; +} + +.cm-s-default .cm-tag { + color: #170; +} + +.cm-s-default .cm-attribute { + color: #00c; +} + +.cm-s-default .cm-hr { + color: #999; +} + +.cm-s-default .cm-link { + color: #00c; +} + +.cm-s-default .cm-error { + color: #f00; +} + +.cm-invalidchar { + color: #f00; +} + +.CodeMirror-composing { + border-bottom: 2px solid; +} + +/* Default styles for common addons */ +div.CodeMirror span.CodeMirror-matchingbracket { + color: #0f0; +} + +div.CodeMirror span.CodeMirror-nonmatchingbracket { + color: #f22; +} + +.CodeMirror-matchingtag { + background: rgba(255, 150, 0, .3); +} + +.CodeMirror-activeline-background { + background: #e8f2ff; +} + +/* STOP */ +/* The rest of this file contains styles related to the mechanics of + the editor. You probably shouldn't touch them. */ +.CodeMirror { + position: relative; + overflow: hidden; + background: white; +} + +.CodeMirror-scroll { + overflow: scroll !important; + /* Things will break if this is overridden */ + /* 30px is the magic margin used to hide the element's real scrollbars */ + /* See overflow: hidden in .CodeMirror */ + margin-bottom: -30px; + margin-right: -30px; + padding-bottom: 30px; + height: 100%; + outline: none; + /* Prevent dragging from highlighting the element */ + position: relative; +} + +.CodeMirror-sizer { + position: relative; + border-right: 30px solid transparent; +} + +/* The fake, visible scrollbars. Used to force redraw during scrolling + before actual scrolling happens, thus preventing shaking and + flickering artifacts. */ +.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { + position: absolute; + z-index: 6; + display: none; +} + +.CodeMirror-vscrollbar { + right: 0; + top: 0; + overflow-x: hidden; + overflow-y: scroll; +} + +.CodeMirror-hscrollbar { + bottom: 0; + left: 0; + overflow-y: hidden; + overflow-x: scroll; +} + +.CodeMirror-scrollbar-filler { + right: 0; + bottom: 0; +} + +.CodeMirror-gutter-filler { + left: 0; + bottom: 0; +} + +.CodeMirror-gutters { + position: absolute; + left: 0; + top: 0; + min-height: 100%; + z-index: 3; +} + +.CodeMirror-gutter { + white-space: normal; + height: 100%; + display: inline-block; + vertical-align: top; + margin-bottom: -30px; +} + +.CodeMirror-gutter-wrapper { + position: absolute; + z-index: 4; + background: none !important; + border: none !important; +} + +.CodeMirror-gutter-background { + position: absolute; + top: 0; + bottom: 0; + z-index: 4; +} + +.CodeMirror-gutter-elt { + position: absolute; + cursor: default; + z-index: 4; +} + +.CodeMirror-gutter-wrapper { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.CodeMirror-lines { + cursor: text; + min-height: 1px; + /* prevents collapsing before first draw */ +} + +.CodeMirror pre { + /* Reset some styles that the rest of the page might have set */ + border-radius: 0; + border-width: 0; + background: transparent; + font-family: inherit; + font-size: inherit; + margin: 0; + white-space: pre; + word-wrap: normal; + line-height: inherit; + color: inherit; + z-index: 2; + position: relative; + overflow: visible; + -webkit-tap-highlight-color: transparent; + -webkit-font-variant-ligatures: contextual; + font-variant-ligatures: contextual; +} + +.CodeMirror-wrap pre { + word-wrap: break-word; + white-space: pre-wrap; + word-break: normal; +} + +.CodeMirror-linebackground { + position: absolute; + left: 0; + right: 0; + top: 0; + bottom: 0; + z-index: 0; +} + +.CodeMirror-linewidget { + position: relative; + z-index: 2; + overflow: auto; +} + +.CodeMirror-widget { +} + +.CodeMirror-code { + outline: none; +} + +/* Force content-box sizing for the elements where we expect it */ +.CodeMirror-scroll, .CodeMirror-sizer, .CodeMirror-gutter, .CodeMirror-gutters, .CodeMirror-linenumber { + box-sizing: content-box; +} + +.CodeMirror-measure { + position: absolute; + width: 100%; + height: 0; + overflow: hidden; + visibility: hidden; +} + +.CodeMirror-cursor { + position: absolute; + pointer-events: none; +} + +.CodeMirror-measure pre { + position: static; +} + +div.CodeMirror-cursors { + visibility: hidden; + position: relative; + z-index: 3; +} + +div.CodeMirror-dragcursors { + visibility: visible; +} + +.CodeMirror-focused div.CodeMirror-cursors { + visibility: visible; +} + +.CodeMirror-selected { + background: #d9d9d9; +} + +.CodeMirror-focused .CodeMirror-selected { + background: #d7d4f0; +} + +.CodeMirror-crosshair { + cursor: crosshair; +} + +.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { + background: #d7d4f0; +} + +.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { + background: #d7d4f0; +} + +.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { + background: #d7d4f0; +} + +.cm-searching { + background: #ffa; + background: rgba(255, 255, 0, .4); +} + +/* Used to force a border model for a node */ +.cm-force-border { + padding-right: .1px; +} + +@media print { + /* Hide the cursor when printing */ + .CodeMirror div.CodeMirror-cursors { + visibility: hidden; + } +} + +/* See issue #2901 */ +.cm-tab-wrap-hack:after { + content: ''; +} + +/* Help users use markselection to safely style text background */ +span.CodeMirror-selectedtext { + background: none; +} + +/* + + Name: material + Author: Michael Kaminsky (http://github.com/mkaminsky11) + + Original material color scheme by Mattia Astorino (https://github.com/equinusocio/material-theme) + +*/ +.cm-s-material.CodeMirror { + background-color: #263238; + color: rgba(233, 237, 237, 1); +} + +.cm-s-material .CodeMirror-gutters { + background: #263238; + color: rgb(83, 127, 126); + border: none; +} + +.cm-s-material .CodeMirror-guttermarker, .cm-s-material .CodeMirror-guttermarker-subtle, .cm-s-material .CodeMirror-linenumber { + color: rgb(83, 127, 126); +} + +.cm-s-material .CodeMirror-cursor { + border-left: 1px solid #f8f8f0; +} + +.cm-s-material div.CodeMirror-selected { + background: rgba(255, 255, 255, 0.15); +} + +.cm-s-material.CodeMirror-focused div.CodeMirror-selected { + background: rgba(255, 255, 255, 0.10); +} + +.cm-s-material .CodeMirror-line::-moz-selection, .cm-s-material .CodeMirror-line > span::-moz-selection, .cm-s-material .CodeMirror-line > span > span::-moz-selection { + background: rgba(255, 255, 255, 0.10); +} + +.cm-s-material .CodeMirror-line::selection, .cm-s-material .CodeMirror-line > span::selection, .cm-s-material .CodeMirror-line > span > span::selection { + background: rgba(255, 255, 255, 0.10); +} + +.cm-s-material .CodeMirror-line::-moz-selection, .cm-s-material .CodeMirror-line > span::-moz-selection, .cm-s-material .CodeMirror-line > span > span::-moz-selection { + background: rgba(255, 255, 255, 0.10); +} + +.cm-s-material .CodeMirror-activeline-background { + background: rgba(0, 0, 0, 0); +} + +.cm-s-material .cm-keyword { + color: rgba(199, 146, 234, 1); +} + +.cm-s-material .cm-operator { + color: rgba(233, 237, 237, 1); +} + +.cm-s-material .cm-variable-2 { + color: #80CBC4; +} + +.cm-s-material .cm-variable-3 { + color: #82B1FF; +} + +.cm-s-material .cm-builtin { + color: #DECB6B; +} + +.cm-s-material .cm-atom { + color: #F77669; +} + +.cm-s-material .cm-number { + color: #F77669; +} + +.cm-s-material .cm-def { + color: rgba(233, 237, 237, 1); +} + +.cm-s-material .cm-string { + color: #C3E88D; +} + +.cm-s-material .cm-string-2 { + color: #80CBC4; +} + +.cm-s-material .cm-comment { + color: #546E7A; +} + +.cm-s-material .cm-variable { + color: #82B1FF; +} + +.cm-s-material .cm-tag { + color: #80CBC4; +} + +.cm-s-material .cm-meta { + color: #80CBC4; +} + +.cm-s-material .cm-attribute { + color: #FFCB6B; +} + +.cm-s-material .cm-property { + color: #80CBAE; +} + +.cm-s-material .cm-qualifier { + color: #DECB6B; +} + +.cm-s-material .cm-variable-3 { + color: #DECB6B; +} + +.cm-s-material .cm-tag { + color: rgba(255, 83, 112, 1); +} + +.cm-s-material .cm-error { + color: rgba(255, 255, 255, 1.0); + background-color: #EC5F67; +} + +.cm-s-material .CodeMirror-matchingbracket { + text-decoration: underline; + color: white !important; +} + +.vuep { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + font-family: 'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif; + height: 400px; +} + +.vuep ::-webkit-scrollbar-track { + border-radius: 10px; + background-color: #F5F5F5; +} + +.vuep ::-webkit-scrollbar { + width: 8px; + height: 8px; + background-color: #F5F5F5; +} + +.vuep ::-webkit-scrollbar-thumb { + border-radius: 8px; + background-color: #bbb; + -webkit-transition: all 0.5s; + transition: all 0.5s; +} + +.vuep ::-webkit-scrollbar-thumb:hover { + border-radius: 8px; + background-color: #777; +} + +.vuep-editor, .vuep-preview, .vuep-error { + border-radius: 2px; + height: inherit; + margin-right: 10px; + /*overflow: auto;*/ + /*width: 50%;*/ +} + +.vuep-editor .CodeMirror, .vuep-preview .CodeMirror, .vuep-error .CodeMirror { + height: inherit; +} + +.vuep-editor:last-child, .vuep-preview:last-child, .vuep-error:last-child { + margin-right: 0; +} + +.vuep-editor { + line-height: 1.2em; +} + +.vuep-error { + color: #f66; +} + +.vuep-preview, .vuep-error { + border: 1px solid #eee; + box-sizing: border-box; + padding: 15px 25px; + width: 100%; + margin-left: -10px; +} + +@media (max-width: 600px) { + .vuep { + display: block; + height: auto; + } + + .vuep-editor, .vuep-preview, .vuep-error { + margin: 0 0 15px 0; + height: 400px; + width: 100%; + } +} -- Gitee From 6ea2850c16762957a82abefb238c0740164878d9 Mon Sep 17 00:00:00 2001 From: icanci Date: Sun, 24 Sep 2023 20:21:17 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=B5=81=E8=BD=AC?= =?UTF-8?q?=E5=88=B0=E9=A1=B5=E9=9D=A2=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bic/biz/service/SystemService.java | 2 ++ .../bic/biz/service/UseCaseService.java | 2 ++ .../biz/service/impl/BuryingServiceImpl.java | 17 ++++++++++++++--- .../bic/biz/service/impl/SystemServiceImpl.java | 5 +++++ .../biz/service/impl/UseCaseServiceImpl.java | 5 +++++ .../bic/dal/mongo/daointerface/BuryingDAO.java | 2 +- .../bic/dal/mongo/daointerface/SystemDAO.java | 2 ++ .../bic/dal/mongo/daointerface/UseCaseDAO.java | 2 ++ .../bic/dal/mongo/mongo/MongoBuryingDAO.java | 4 ++-- .../bic/dal/mongo/mongo/MongoSystemDAO.java | 7 +++++++ .../bic/dal/mongo/mongo/MongoUseCaseDAO.java | 8 ++++++++ 11 files changed, 50 insertions(+), 6 deletions(-) diff --git a/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/SystemService.java b/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/SystemService.java index 5491e23..b74df15 100644 --- a/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/SystemService.java +++ b/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/SystemService.java @@ -29,4 +29,6 @@ public interface SystemService extends BaseService { SystemVO queryByName(String name); SystemVO queryByKey(String key); + + SystemVO queryByUuid(String systemUuid); } diff --git a/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/UseCaseService.java b/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/UseCaseService.java index af27b46..9f2f773 100644 --- a/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/UseCaseService.java +++ b/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/UseCaseService.java @@ -30,4 +30,6 @@ public interface UseCaseService extends BaseService { List loadSelector(String systemUuid); List loadAllSelector(); + + UseCaseVO queryBySystemAndUseCase(String systemUuid, String useCaseUuid); } diff --git a/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/impl/BuryingServiceImpl.java b/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/impl/BuryingServiceImpl.java index 64f4e12..81c76b4 100644 --- a/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/impl/BuryingServiceImpl.java +++ b/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/impl/BuryingServiceImpl.java @@ -10,7 +10,11 @@ import org.springframework.stereotype.Service; import cn.icanci.loopstack.bic.biz.mapper.BuryingMapper; import cn.icanci.loopstack.bic.biz.service.BuryingService; +import cn.icanci.loopstack.bic.biz.service.SystemService; +import cn.icanci.loopstack.bic.biz.service.UseCaseService; import cn.icanci.loopstack.bic.common.model.BuryingVO; +import cn.icanci.loopstack.bic.common.model.base.SystemVO; +import cn.icanci.loopstack.bic.common.model.base.UseCaseVO; import cn.icanci.loopstack.bic.dal.mongo.common.PageList; import cn.icanci.loopstack.bic.dal.mongo.daointerface.BuryingDAO; import cn.icanci.loopstack.bic.dal.mongo.dateobject.BuryingDO; @@ -22,9 +26,13 @@ import cn.icanci.loopstack.bic.dal.mongo.dateobject.BuryingDO; @Service public class BuryingServiceImpl implements BuryingService { @Resource - private BuryingDAO buryingDAO; + private BuryingDAO buryingDAO; @Resource - private BuryingMapper buryingMapper; + private BuryingMapper buryingMapper; + @Resource + private SystemService systemService; + @Resource + private UseCaseService useCaseService; @Override public void batchInsert(List buryingList) { @@ -56,7 +64,10 @@ public class BuryingServiceImpl implements BuryingService { @Override public List queryBySystemAndUseCase(String systemUuid, String useCaseUuid, String traceId, String orderSerialNo) { - return buryingMapper.dos2vos(buryingDAO.queryBySystemAndUseCase(systemUuid, useCaseUuid, traceId, orderSerialNo)); + SystemVO systemVO = systemService.queryByUuid(systemUuid); + UseCaseVO useCaseVO = useCaseService.queryBySystemAndUseCase(systemUuid, useCaseUuid); + + return buryingMapper.dos2vos(buryingDAO.queryBySystemAndUseCase(systemVO.getSystemKey(), useCaseVO.getUseCaseKey(), traceId, orderSerialNo)); } private boolean doInsert(BuryingVO burying) { diff --git a/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/impl/SystemServiceImpl.java b/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/impl/SystemServiceImpl.java index 2759d89..a427ec9 100644 --- a/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/impl/SystemServiceImpl.java +++ b/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/impl/SystemServiceImpl.java @@ -85,4 +85,9 @@ public class SystemServiceImpl implements SystemService { public SystemVO queryByKey(String key) { return systemMapper.do2vo(systemDAO.queryByKey(key)); } + + @Override + public SystemVO queryByUuid(String systemUuid) { + return systemMapper.do2vo(systemDAO.queryByUuid(systemUuid)); + } } diff --git a/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/impl/UseCaseServiceImpl.java b/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/impl/UseCaseServiceImpl.java index f02a7a2..be0e7e3 100644 --- a/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/impl/UseCaseServiceImpl.java +++ b/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/impl/UseCaseServiceImpl.java @@ -105,4 +105,9 @@ public class UseCaseServiceImpl implements UseCaseService { } return textValues; } + + @Override + public UseCaseVO queryBySystemAndUseCase(String systemUuid, String useCaseUuid) { + return useCaseMapper.do2vo(useCaseDAO.queryBySystemAndUseCase(systemUuid, useCaseUuid)); + } } diff --git a/dal/src/main/java/cn/icanci/loopstack/bic/dal/mongo/daointerface/BuryingDAO.java b/dal/src/main/java/cn/icanci/loopstack/bic/dal/mongo/daointerface/BuryingDAO.java index b797f42..7ad93ae 100644 --- a/dal/src/main/java/cn/icanci/loopstack/bic/dal/mongo/daointerface/BuryingDAO.java +++ b/dal/src/main/java/cn/icanci/loopstack/bic/dal/mongo/daointerface/BuryingDAO.java @@ -21,7 +21,7 @@ public interface BuryingDAO extends BaseDAO { */ void batchInsert(List buryingList); - List queryBySystemAndUseCase(String systemUuid, String useCaseUuid, String traceId, String orderSerialNo); + List queryBySystemAndUseCase(String systemUuid, String useCaseKey, String traceId, String orderSerialNo); /** 列 */ interface BuryingColumn extends BaseColumn { diff --git a/dal/src/main/java/cn/icanci/loopstack/bic/dal/mongo/daointerface/SystemDAO.java b/dal/src/main/java/cn/icanci/loopstack/bic/dal/mongo/daointerface/SystemDAO.java index 7f695cb..63cbc89 100644 --- a/dal/src/main/java/cn/icanci/loopstack/bic/dal/mongo/daointerface/SystemDAO.java +++ b/dal/src/main/java/cn/icanci/loopstack/bic/dal/mongo/daointerface/SystemDAO.java @@ -16,6 +16,8 @@ public interface SystemDAO extends BaseDAO { SystemDO queryByKey(String key); + SystemDO queryByUuid(String systemUuid); + /** 列 */ interface SystemColumn extends BaseColumn { String SYSTEM_NAME = "systemName"; diff --git a/dal/src/main/java/cn/icanci/loopstack/bic/dal/mongo/daointerface/UseCaseDAO.java b/dal/src/main/java/cn/icanci/loopstack/bic/dal/mongo/daointerface/UseCaseDAO.java index 65af43c..3daf30f 100644 --- a/dal/src/main/java/cn/icanci/loopstack/bic/dal/mongo/daointerface/UseCaseDAO.java +++ b/dal/src/main/java/cn/icanci/loopstack/bic/dal/mongo/daointerface/UseCaseDAO.java @@ -16,6 +16,8 @@ public interface UseCaseDAO extends BaseDAO { UseCaseDO queryBySystemUuidAndKey(String systemUuid, String key); + UseCaseDO queryBySystemAndUseCase(String systemUuid, String useCaseUuid); + /** 列 */ interface UseCaseColumn extends BaseColumn { String USE_CASE_NAME = "useCaseName"; diff --git a/dal/src/main/java/cn/icanci/loopstack/bic/dal/mongo/mongo/MongoBuryingDAO.java b/dal/src/main/java/cn/icanci/loopstack/bic/dal/mongo/mongo/MongoBuryingDAO.java index 125d399..e34b58f 100644 --- a/dal/src/main/java/cn/icanci/loopstack/bic/dal/mongo/mongo/MongoBuryingDAO.java +++ b/dal/src/main/java/cn/icanci/loopstack/bic/dal/mongo/mongo/MongoBuryingDAO.java @@ -101,10 +101,10 @@ public class MongoBuryingDAO extends AbstractBaseDAO implements Buryi } @Override - public List queryBySystemAndUseCase(String systemUuid, String useCaseUuid, String traceId, String orderSerialNo) { + public List queryBySystemAndUseCase(String systemUuid, String useCaseKey, String traceId, String orderSerialNo) { Criteria criteria = Criteria.where(BuryingColumn.ENV).is(DEFAULT_ENV); criteria.and(BuryingColumn.SYSTEM_KEY).is(systemUuid); - criteria.and(BuryingColumn.USE_CASE).is(useCaseUuid); + criteria.and(BuryingColumn.USE_CASE).is(useCaseKey); if (StringUtils.isNotBlank(traceId)) { criteria.and(BuryingColumn.TRACE_ID).is(traceId); } diff --git a/dal/src/main/java/cn/icanci/loopstack/bic/dal/mongo/mongo/MongoSystemDAO.java b/dal/src/main/java/cn/icanci/loopstack/bic/dal/mongo/mongo/MongoSystemDAO.java index 93ec9fc..41d53e9 100644 --- a/dal/src/main/java/cn/icanci/loopstack/bic/dal/mongo/mongo/MongoSystemDAO.java +++ b/dal/src/main/java/cn/icanci/loopstack/bic/dal/mongo/mongo/MongoSystemDAO.java @@ -81,4 +81,11 @@ public class MongoSystemDAO extends AbstractBaseDAO implements SystemD Query query = new Query(criteria); return mongoTemplate.findOne(query, COLLECTION_CLASS, COLLECTION_NAME); } + + @Override public SystemDO queryByUuid(String systemUuid) { + Criteria criteria = Criteria.where(SystemColumn.UUID).is(systemUuid); + criteria.and(SystemColumn.ENV).is(DEFAULT_ENV); + Query query = new Query(criteria); + return mongoTemplate.findOne(query, COLLECTION_CLASS, COLLECTION_NAME); + } } diff --git a/dal/src/main/java/cn/icanci/loopstack/bic/dal/mongo/mongo/MongoUseCaseDAO.java b/dal/src/main/java/cn/icanci/loopstack/bic/dal/mongo/mongo/MongoUseCaseDAO.java index c507735..dc2ba93 100644 --- a/dal/src/main/java/cn/icanci/loopstack/bic/dal/mongo/mongo/MongoUseCaseDAO.java +++ b/dal/src/main/java/cn/icanci/loopstack/bic/dal/mongo/mongo/MongoUseCaseDAO.java @@ -86,4 +86,12 @@ public class MongoUseCaseDAO extends AbstractBaseDAO implements UseCa Query query = new Query(criteria); return mongoTemplate.findOne(query, COLLECTION_CLASS, COLLECTION_NAME); } + + @Override public UseCaseDO queryBySystemAndUseCase(String systemUuid, String useCaseUuid) { + Criteria criteria = Criteria.where(UseCaseColumn.UUID).is(useCaseUuid); + criteria.and(UseCaseColumn.ENV).is(DEFAULT_ENV); + criteria.and(UseCaseColumn.SYSTEM_UUID).is(systemUuid); + Query query = new Query(criteria); + return mongoTemplate.findOne(query, COLLECTION_CLASS, COLLECTION_NAME); + } } -- Gitee