ソースを参照

增加pc端分享链接

chenw 7 年 前
コミット
4be9df12e2

+ 16 - 0
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/controller/ShareController.java

@@ -66,6 +66,22 @@ public class ShareController {
         }
         }
     }
     }
 
 
+    /**
+     * 生成分享链接
+     * @param basePath
+     * @param companyName
+     * @param delay
+     * @return
+     */
+    @GetMapping("/pc")
+    public String getPcUrl(String basePath, String companyName, @RequestParam(value = "delay", defaultValue = "1")Long delay){
+        Long companyId = BaseContextHolder.getCompanyId();
+        String username = BaseContextHolder.getUserName();
+        String params = "username=" + username + "&companyId=" + companyId + "&timestamp=" + new Date().getTime() + "&delay=" + delay + "&companyName=" + companyName;
+        String encodeParams = new String(UrlBase64.encode(params.getBytes()));
+        return basePath + "/#/invitation" + "?param=" + encodeParams;
+    }
+
     /**
     /**
      * 将前台传入的encode参数decode并校验,返回给前端
      * 将前台传入的encode参数decode并校验,返回给前端
      * @param param
      * @param param