From 161edfd2a50595021d9bfe303ed7f1b26893b862 Mon Sep 17 00:00:00 2001
From: wangting <675591594@qq.com>
Date: 星期五, 29 十一月 2024 12:12:15 +0800
Subject: [PATCH] 数据授权
---
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIEngineServiceImpl.java | 20 +++++++++++++++++---
1 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIEngineServiceImpl.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIEngineServiceImpl.java
index f2b6086..2d19927 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIEngineServiceImpl.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIEngineServiceImpl.java
@@ -16,6 +16,7 @@
import com.vci.web.enumpck.UIComponentTypeEnum;
import com.vci.web.enumpck.UIFieldTypeEnum;
import com.vci.web.enumpck.UILayoutAreaTypeEnum;
+import com.vci.web.other.AllActionThreadLocal;
import com.vci.web.service.OsAttributeServiceI;
import com.vci.web.service.OsBtmServiceI;
import com.vci.web.service.UIEngineServiceI;
@@ -1080,6 +1081,11 @@
Map<String, OsAttributeVO> attributeVOMap;
if(pages != null && pages.size() > 0){
attributeVOMap = attrService.selectAllAttributeMap();
+ Map<String, UIActionVO> actionVOMap = AllActionThreadLocal.get();
+ if(actionVOMap == null || actionVOMap.isEmpty()){
+ actionVOMap = selectAllActionMap();
+ AllActionThreadLocal.set(actionVOMap);
+ }
}else{
attributeVOMap = null;
}
@@ -1097,6 +1103,7 @@
}
});
}
+ AllActionThreadLocal.remove();
return contentVOS;
}
@@ -1364,7 +1371,8 @@
treeDefineVO.setBtmType(componentDefineXO.getShowType());
treeDefineVO.setLinkType(componentDefineXO.getLinkType());
treeDefineVO.setLoadType("1".equalsIgnoreCase(componentDefineXO.getExpandMode())?"node":"all");
- treeDefineVO.setOrientation("positive".equalsIgnoreCase(componentDefineXO.getOrientation())?false:true);
+ //TODO:杩欎釜灞炴�х幇鍦ㄧ敱閾炬帴绫诲瀷鏌ヨ鎺у埗锛屼笉鐢遍〉闈㈠畾涔夋帶鍒朵簡
+ //treeDefineVO.setOrientation("positive".equalsIgnoreCase(componentDefineXO.getOrientation())?false:true);
treeDefineVO.setShowImage("1".equalsIgnoreCase(componentDefineXO.getIsShowImage())?true:false);
treeDefineVO.setRootContent(componentDefineXO.getRootContent());
treeDefineVO.setFieldSep(StringUtils.isBlank(componentDefineXO.getSeparator())?",":componentDefineXO.getSeparator());
@@ -1456,9 +1464,15 @@
public List<UIButtonDefineVO> buttonDO2VOs(Collection<com.vci.corba.portal.data.PLTabButton> buttons){
List<UIButtonDefineVO> buttonDefineVOS = new ArrayList<>();
if(buttons != null && buttons.size() > 0){
- Map<String, UIActionVO> actionVOMap = self.selectAllActionMap();
+// Map<String, UIActionVO> actionVOMap = self.selectAllActionMap();
+ Map<String, UIActionVO> actionVOMap = null;
+ actionVOMap = AllActionThreadLocal.get();
+ if(actionVOMap == null ){
+ actionVOMap = self.selectAllActionMap();
+ }
+ Map<String, UIActionVO> finalActionVOMap = actionVOMap;
Optional.ofNullable(buttons).orElseGet(()->new ArrayList<>()).stream().forEach(button->{
- buttonDefineVOS.add(buttonDO2VO(button, actionVOMap));
+ buttonDefineVOS.add(buttonDO2VO(button, finalActionVOMap));
});
}
--
Gitblit v1.9.3