Pārlūkot izejas kodu

提交评论管理接口

xuzuoyun 5 gadi atpakaļ
vecāks
revīzija
7f5e385eea

+ 7 - 3
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/graphql/controller/KuaishouWebController.java

@@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.UUID;
@@ -25,14 +26,17 @@ public class KuaishouWebController {
     private IKuaishouUserCookieService kuaishouUserCookieService;
 
     @PostMapping(value = "/login/qr")
-    public Result<String> getQrCode() {
-        Result<String> result = new Result<String>();
+    public Result<Map<String, Object>> getQrCode() {
+        Result<Map<String, Object>> result = new Result<Map<String, Object>>();
         try {
+            Map<String, Object> resultMap = new HashMap<>();
             String requestId = UUID.randomUUID().toString();
             String img = kuaishouWebInterfaceService.qrLogin(requestId);
+            resultMap.put("requestId", requestId);
+            resultMap.put("qrcode", "data:image/png;base64," + img);
             if (img != null) {
                 result.setSuccess(true);
-                result.setResult("data:image/png;base64," + img);
+                result.setResult(resultMap);
             } else {
                 result.setSuccess(false);
             }