Переглянути джерело

增加微信token获取接口,给宿迁用

hfxc226 4 місяців тому
батько
коміт
a69bc20ea8

+ 29 - 0
platform-rest/src/main/java/com/platform/rest/controller/wechat/TokenController.java

@@ -0,0 +1,29 @@
+package com.platform.rest.controller.wechat;
+
+import com.platform.common.util.R;
+import com.platform.service.wechat.service.WeChatConnectService;
+import lombok.AllArgsConstructor;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @Description 常用菜单库 控制器
+ * @Author lsq
+ * @Date 2023-12-25 14:06:26
+ * @Version Copyright (c) 2020,北京乾元坤和科技有限公司 All rights reserved.
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/common/wechat/token")
+public class TokenController {
+
+  /**
+   * 获取token
+   * @return R
+   */
+  @GetMapping("/sb")
+  public R<String> getToken(){
+      return new R<>(WeChatConnectService.getToken());
+  }
+}

+ 1 - 0
platform-rest/src/main/resources/application-dev.yml

@@ -89,6 +89,7 @@ ignore:
     - /repair/fees/**
     - /sb/infos/page
     - /upms/dicts/type
+    - /common/wechat/token/sb
 upload:
   root-dir: D://data//xian
 

+ 1 - 0
platform-rest/src/main/resources/application-prod.yml

@@ -68,6 +68,7 @@ ignore:
     - /wechat/**
     - /sb/infos/page
     - /upms/dicts/type
+    - /common/wechat/token/sb
 upload:
   root-dir: /home/data/sb-base/FileData
 

+ 1 - 0
platform-rest/src/main/resources/application-test.yml

@@ -62,6 +62,7 @@ ignore:
     - /wechat/**
     - /sb/infos/page
     - /upms/dicts/type
+    - /common/wechat/token/sb
 upload:
   root-dir: /home/data/XiAnConstructionAsset/FileData