From f25969484719f6f61232ee146c0a4c4aab8b5eb1 Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Thu, 29 Aug 2024 18:08:31 +0800 Subject: [PATCH 1/2] =?UTF-8?q?REPORT-132662=20=E9=80=82=E9=85=8D=E9=80=9A?= =?UTF-8?q?=E7=9F=A5=E4=B8=AD=E5=BF=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/javascript/EmailPane.java | 5 +++-- .../javascript/JavaScriptActionPane.java | 1 + .../fanruan/boot/env/DesignEnvComponent.java | 7 ++++++- .../com/fanruan/config/LocalConfigSource.java | 19 +++++++++++++++++++ 4 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 designer-realize/src/main/java/com/fanruan/config/LocalConfigSource.java diff --git a/designer-base/src/main/java/com/fr/design/javascript/EmailPane.java b/designer-base/src/main/java/com/fr/design/javascript/EmailPane.java index da780298f5..22a1e3378c 100644 --- a/designer-base/src/main/java/com/fr/design/javascript/EmailPane.java +++ b/designer-base/src/main/java/com/fr/design/javascript/EmailPane.java @@ -13,6 +13,7 @@ import com.fr.design.layout.TableLayout; import com.fr.js.EmailJavaScript; import com.fr.stable.StringUtils; +import com.fr.workspace.server.repository.config.ConfigRepository; import javax.swing.BorderFactory; import javax.swing.JComponent; @@ -64,7 +65,7 @@ public class EmailPane extends FurtherBasicBeanPane { initCenterPane(mainTextLabel, scrollPane, fill, preferred); this.add(centerPane, BorderLayout.CENTER); mainTextEditor.setAutoscrolls(true); - checkEmailConfig(EmailCenter.isEmailConfigValid()); + checkEmailConfig(ConfigRepository.getInstance().isEmailConfigValid()); } /** @@ -128,7 +129,7 @@ public class EmailPane extends FurtherBasicBeanPane { if (showTplContent != null) { showTplContent.setSelected(ob ==null ? false: ob.isShowTplContent()); } - checkEmailConfig(EmailCenter.isEmailConfigValid()); + checkEmailConfig(ConfigRepository.getInstance().isEmailConfigValid()); } @Override diff --git a/designer-base/src/main/java/com/fr/design/javascript/JavaScriptActionPane.java b/designer-base/src/main/java/com/fr/design/javascript/JavaScriptActionPane.java index b72a451fa4..f32fbe9d23 100644 --- a/designer-base/src/main/java/com/fr/design/javascript/JavaScriptActionPane.java +++ b/designer-base/src/main/java/com/fr/design/javascript/JavaScriptActionPane.java @@ -48,6 +48,7 @@ public abstract class JavaScriptActionPane extends UIComboBoxPane { contentDBManiPane = new ArrayList(); contentDBManiPane.add(createDBManipulationPane()); paneList.add(new Commit2DBJavaScriptPane(this, contentDBManiPane)); + paneList.add(initEmaiPane()); if (isWorkBookValid()) { paneList.add(new ExportJavaScriptPane()); } diff --git a/designer-realize/src/main/java/com/fanruan/boot/env/DesignEnvComponent.java b/designer-realize/src/main/java/com/fanruan/boot/env/DesignEnvComponent.java index 7c9350430a..0ed7554075 100644 --- a/designer-realize/src/main/java/com/fanruan/boot/env/DesignEnvComponent.java +++ b/designer-realize/src/main/java/com/fanruan/boot/env/DesignEnvComponent.java @@ -100,6 +100,8 @@ import com.fr.transaction.HibernateTransactor; import com.fr.transaction.RemoteTransactor; import com.fr.transaction.TransactorFactory; import com.fr.workspace.WorkContext; +import com.fanruan.config.LocalConfigSource; +import com.fr.workspace.server.repository.config.LocalConfigSourceShell; import java.net.URI; import java.sql.Connection; @@ -121,7 +123,9 @@ import java.util.Properties; "com.fr.decision.workflow.bean", "com.fr.report.entity", "com.fr.cons.entity", - "com.fr.report.write.entity" + "com.fr.report.write.entity", + "com.fanruan.messenger.ums.entity", + "com.fanruan.messenger.oa.basic.db.entity" }) public class DesignEnvComponent { @@ -146,6 +150,7 @@ public class DesignEnvComponent { .method(ElementMatchers.isAnnotatedWith(FaultTolerance.class)) .intercept(MethodDelegation.to(FaultToleranceInterceptor.class)))); Carina.getApplicationContext().group(CurrentTenantKey.class).add(ScheduleThreadCurrentTenantProvider.INSTANCE); + Carina.getApplicationContext().singleton(LocalConfigSourceShell.class).set(new LocalConfigSource()); } @Start diff --git a/designer-realize/src/main/java/com/fanruan/config/LocalConfigSource.java b/designer-realize/src/main/java/com/fanruan/config/LocalConfigSource.java new file mode 100644 index 0000000000..633bde7c6e --- /dev/null +++ b/designer-realize/src/main/java/com/fanruan/config/LocalConfigSource.java @@ -0,0 +1,19 @@ +package com.fanruan.config; + +import com.fr.base.email.EmailCenter; +import com.fr.workspace.server.repository.config.CommonConfigSource; + +/** + * 本地配置资源 + * + * @author Destiny.Lin + * @since 11.0 + * Created on 2024/8/29 + */ +public class LocalConfigSource extends CommonConfigSource { + + @Override + public boolean isEmailConfigValid() { + return EmailCenter.isEmailConfigValid(); + } +} From f8d345af49dd90841c3b985d43cf616fbf08fcc8 Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Fri, 30 Aug 2024 11:08:28 +0800 Subject: [PATCH 2/2] =?UTF-8?q?REPORT-132662=20=E9=80=82=E9=85=8D=E9=80=9A?= =?UTF-8?q?=E7=9F=A5=E4=B8=AD=E5=BF=83=20=E4=BB=A3=E7=A0=81=E8=A7=84?= =?UTF-8?q?=E8=8C=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fanruan/config/LocalConfigSource.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer-realize/src/main/java/com/fanruan/config/LocalConfigSource.java b/designer-realize/src/main/java/com/fanruan/config/LocalConfigSource.java index 633bde7c6e..11301e93c1 100644 --- a/designer-realize/src/main/java/com/fanruan/config/LocalConfigSource.java +++ b/designer-realize/src/main/java/com/fanruan/config/LocalConfigSource.java @@ -1,7 +1,7 @@ package com.fanruan.config; import com.fr.base.email.EmailCenter; -import com.fr.workspace.server.repository.config.CommonConfigSource; +import com.fr.workspace.server.repository.config.BaseConfigSource; /** * 本地配置资源 @@ -10,7 +10,7 @@ import com.fr.workspace.server.repository.config.CommonConfigSource; * @since 11.0 * Created on 2024/8/29 */ -public class LocalConfigSource extends CommonConfigSource { +public class LocalConfigSource extends BaseConfigSource { @Override public boolean isEmailConfigValid() {