Jelajahi Sumber

创建房间调整

zhangxiaobin 1 tahun lalu
induk
melakukan
fd968defff
1 mengubah file dengan 1 tambahan dan 2 penghapusan
  1. 1 2
      application/api/controller/Party.php

+ 1 - 2
application/api/controller/Party.php

@@ -90,12 +90,11 @@ class Party extends Common
         $where = [];
         $where["user_id"] = $user_id;
         $where["room_type"] = $room_type;
-        $where["is_close"] = 0;
         $sqlPartyInfo = $partyModel->where($where)->find();
 
         if(!$sqlPartyInfo) { // sql中不存在派对信息
             $partylimit = config("site.roomLimit");
-            $partycount = $partyModel->count("id");
+            $partycount = $partyModel->where(['is_close'=>0])->count("id");
             if($partycount >= $partylimit && $partylimit != -1) {
                 $this->error("房间数量已达上线,请联系客服!");
             }