Browse Source

Pull request #14620: REPORT-130867 远程环境A切换到远程环境B,设计器目录树没有刷新 & REPORT-130404 fbp设计器远程82,已有用户、部门、角色都拿不到数据

Merge in DESIGN/design from ~DESTINY.LIN/design:fbp-1.0 to fbp-1.0

* commit 'e8390e47ecc1126dff72457efb328c2ec35f2fee':
  REPORT-130867 远程环境A切换到远程环境B,设计器目录树没有刷新
  REPORT-130404 fbp设计器远程82,已有用户、部门、角色都拿不到数据
fbp-1.0
Destiny.Lin-林锦龙 4 months ago
parent
commit
0352708cf7
  1. 7
      designer-base/src/main/java/com/fr/design/env/HttpWorkspaceConnector.java
  2. 4
      designer-base/src/main/java/com/fr/design/gui/controlpane/JControlUpdatePane.java

7
designer-base/src/main/java/com/fr/design/env/HttpWorkspaceConnector.java vendored

@ -1,7 +1,9 @@
package com.fr.design.env;
import com.fanruan.workplace.http.HttpConstants;
import com.fanruan.workplace.http.HttpServiceMap;
import com.fanruan.workplace.http.RepositoryManager;
import com.fanruan.workplace.http.info.Stub;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils;
import com.fr.workspace.server.repository.authority.RemoteAuthorityRepository;
@ -15,6 +17,7 @@ import com.fr.workspace.connect.WorkspaceConnectionInfo;
import com.fr.workspace.connect.WorkspaceConnector;
import java.net.InetAddress;
import java.util.Map;
import java.util.UUID;
/**
@ -52,6 +55,10 @@ public class HttpWorkspaceConnector implements WorkspaceConnector {
public WorkspaceClient connect(WorkspaceConnectionInfo connectionInfo) throws Exception {
FineWorkspaceHttpClient client = FineWorkspaceHttpClient.create("Http-Client", connectionInfo);
try {
for (Map.Entry<Class, Stub<?>> entry : HttpServiceMap.getInstance().entrySet()) {
Stub<?> stub = entry.getValue();
stub.clearProxy();
}
LoginResponseInfoBean bean = RemoteAuthorityRepository.getInstance().login(createLoginBean(connectionInfo));
// 服务器如果没返回token,肯定是出问题了,直接抛出异常
if (StringUtils.isEmpty(bean.getAccessToken())) {

4
designer-base/src/main/java/com/fr/design/gui/controlpane/JControlUpdatePane.java

@ -1,5 +1,6 @@
package com.fr.design.gui.controlpane;
import com.fr.data.impl.Connection;
import com.fr.design.DesignerEnvManager;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.data.tabledata.tabledatapane.GlobalMultiTDTableDataPane;
@ -81,6 +82,9 @@ class JControlUpdatePane extends JPanel {
if (ob2Populate instanceof Listener) {
listControlPane.wrapperListener((Listener) ob2Populate);
}
if (ob2Populate instanceof Connection) {
((Connection) ob2Populate).setConnectionName(elEditing.wrapper.getName());
}
updatePanes[i].populateBean(ob2Populate);
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);

Loading…
Cancel
Save