Browse Source

debug-- 测试

gemercheung 3 năm trước cách đây
mục cha
commit
6d13c1ad0b
1 tập tin đã thay đổi với 12 bổ sung3 xóa
  1. 12 3
      src/controller/room/index.js

+ 12 - 3
src/controller/room/index.js

@@ -91,11 +91,20 @@ export class RoomController extends BasicController {
 
       const userObj = { ...this.user, onlineStatus: 1, isConnected: true, order };
       const assistantId = await this.roomAssistant.getRoomAssistant(this.roomId);
+      if (!this.isHoster(this.user.role)) {
+        console.log("assistantId", assistantId);
+        console.log("this.userId", this.userId);
+        this.logger.info("默认变更条件:" + (assistantId && Number(this.userId) !== Number(assistantId)));
 
-      if (assistantId && Number(this.userId) !== Number(assistantId) && !this.isHoster(this.user.role)) {
-        this.logger.info("已存在默认助手变更:" + "room助手ID: " + assistantId + "userId: " + this.userId);
-        userObj.role = "customer";
+        if (assistantId && Number(this.userId) !== Number(assistantId)) {
+          this.logger.info("已存在默认助手变更:" + "room助手ID: " + assistantId + " userId: " + this.userId);
+          userObj.role = "customer";
+        }
       }
+
+      // if (assistantId && Number(this.userId) !== Number(assistantId) && !this.isHoster(this.user.role)) {
+      //   userObj.role = "customer";
+      // }
       this.logger.info("update-user-info:", userObj);
       updateUser(this.userId, userObj);
       // this.sysUsers.push(this.user);