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" - > - + /> - + /> - - + - + /> - + /> - + /> - + /> - + /> - + /> +
+