Browse Source

分享二维码参数修改

lyhzzz 2 years ago
parent
commit
4f361ca8ea

+ 2 - 1
src/main/java/com/fdkankan/tk/common/WxSharCodePath.java

@@ -2,5 +2,6 @@ package com.fdkankan.tk.common;
 
 public class WxSharCodePath {
 
-    public  static  String sharCodePath = "roomId=%s&role=%s&isTour=0";
+    public  static  String hostCodePath = "roomId=%s&role=%s&phone=%s&isTour=0";
+    public  static  String shardCodePath = "roomId=%s&role=%s&isTour=0";
 }

+ 6 - 2
src/main/java/com/fdkankan/tk/service/impl/RoomServiceImpl.java

@@ -199,10 +199,14 @@ public class RoomServiceImpl extends ServiceImpl<IRoomMapper, Room> implements I
                 }
             }
         }
-
+        String path = null;
+        if(type.equals("leader")){
+            path = String.format(WxSharCodePath.hostCodePath,roomId,type,room.getRoomUserName());
+        }else {
+            path = String.format(WxSharCodePath.shardCodePath,roomId,"customer");
+        }
         String localPath = String.format(FilePath.LOCAL_QRCODE_PATH, type,roomId);
         String ossPath = String.format(FilePath.OSS_QRCODE_PATH,type, roomId);
-        String path = String.format(WxSharCodePath.sharCodePath,roomId,type);
         wxService.getWxQRCode(path,localPath,0);
         if(!new File(localPath).exists()){
             throw new BusinessException(ResultCode.QRCODE_MISS);