zyx 2 rokov pred
rodič
commit
7b13783ca8

+ 32 - 0
src/main/java/com/sxtvs/open/api/odata/OauthController.java

@@ -0,0 +1,32 @@
+package com.sxtvs.open.api.odata;
+
+import com.sxtvs.open.core.auth.LoginRequired;
+import com.sxtvs.open.core.sls.AliyunLogger;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+@Controller
+@RequestMapping("oauth")
+public class OauthController {
+
+    @Autowired
+    private AliyunLogger logger;
+
+    @RequestMapping("douyin/code")
+    @LoginRequired
+    public String douyinQrCode() {
+        logger.info("key", "douyinQrCode");
+        return "redirect:https://open.douyin.com/platform/oauth/connect/?" +
+                "client_key=awfrca76s1petwh0&response_type=code&" +
+                "scope=video.data%2Cfans.list%2Cdata.external.item%2Cdata.external.user%2Cfans.data%2Cvideo.list%2Crenew_refresh_token%2Cuser_info&" +
+                "redirect_uri=http%3A%2F%2Fopen.smcic.net%2Fdouyin%2Fcallback";
+    }
+
+    @RequestMapping("douyin/callback")
+    public String douyinCallback(String code) {
+        logger.info("key", "douyinCallback", "code", code);
+        return "redirect:https://www.baidu.com";
+    }
+
+}

+ 0 - 1
src/main/java/com/sxtvs/open/api/youmei/service/YoumeiAccountServiceImpl.java

@@ -1,6 +1,5 @@
 package com.sxtvs.open.api.youmei.service;
 
-import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.github.benmanes.caffeine.cache.Cache;