From de12b94158c01895627b3210d281451b7753345c Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Thu, 1 Sep 2022 17:13:38 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E7=B3=BB=E7=BB=9F=E7=AE=A1=E7=90=86-?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E5=8F=82=E6=95=B0):=20=E4=BC=81=E4=B8=9A?= =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dataease/plugins/server/XWecomServer.java | 41 +++++++++ frontend/src/views/system/SysParam/index.vue | 86 ++++++++++--------- 2 files changed, 85 insertions(+), 42 deletions(-) create mode 100644 backend/src/main/java/io/dataease/plugins/server/XWecomServer.java diff --git a/backend/src/main/java/io/dataease/plugins/server/XWecomServer.java b/backend/src/main/java/io/dataease/plugins/server/XWecomServer.java new file mode 100644 index 0000000000..c72141c13a --- /dev/null +++ b/backend/src/main/java/io/dataease/plugins/server/XWecomServer.java @@ -0,0 +1,41 @@ +package io.dataease.plugins.server; + + +import io.dataease.plugins.config.SpringContextUtil; +import io.dataease.plugins.xpack.display.dto.response.SysSettingDto; +import io.dataease.plugins.xpack.wecom.dto.response.WecomInfo; +import io.dataease.plugins.xpack.wecom.service.WecomXpackService; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.List; + +@ApiIgnore +@RequestMapping("/plugin/wecom") +@RestController +public class XWecomServer { + + @GetMapping("/info") + public WecomInfo getWecomInfo() { + WecomXpackService wecomXpackService = SpringContextUtil.getBean(WecomXpackService.class); + return wecomXpackService.info(); + } + + @RequiresPermissions("sysparam:read") + @PostMapping("/save") + public void save(@RequestBody List settings) { + WecomXpackService wecomXpackService = SpringContextUtil.getBean(WecomXpackService.class); + wecomXpackService.save(settings); + } + + @PostMapping("/testConn") + public void testConn(@RequestBody WecomInfo wecomInfo) { + WecomXpackService wecomXpackService = SpringContextUtil.getBean(WecomXpackService.class); + try { + wecomXpackService.testConn(wecomInfo); + }catch(Exception e) { + throw new RuntimeException(e); + } + } +} diff --git a/frontend/src/views/system/SysParam/index.vue b/frontend/src/views/system/SysParam/index.vue index 955a68f654..042ea63dda 100644 --- a/frontend/src/views/system/SysParam/index.vue +++ b/frontend/src/views/system/SysParam/index.vue @@ -8,66 +8,63 @@ :lazy="true" :label="$t('system_parameter_setting.basic_setting')" name="zero" - > - + /> - + /> - - + - + /> - + /> - + /> - + /> - + /> - + /> +
+