房间营业时间
This commit is contained in:
@@ -236,7 +236,7 @@ class Room extends Model
|
||||
$currentTime = date('H:i:s');
|
||||
|
||||
$list = db::name('vs_room')
|
||||
->field('id as room_id,room_number,user_id,room_name,room_cover,room_password,today_hot_value as hot_value,label_id,is_show_room')
|
||||
->field('id as room_id,room_number,user_id,room_name,room_cover,room_password,today_hot_value as hot_value,label_id,is_show_room,start_time,end_time')
|
||||
->where($map)
|
||||
// 营业时间判断(允许全天营业的房间)
|
||||
->where(function($query) use ($currentTime) {
|
||||
@@ -299,7 +299,7 @@ class Room extends Model
|
||||
$currentTime = date('H:i:s');
|
||||
$roominfo = db::name('vs_room')->alias('a')
|
||||
->join('vs_room_visitor b', 'a.id = b.room_id AND b.is_online = 1', 'INNER')
|
||||
->field('a.id as room_id,a.user_id,a.room_name,a.room_cover,count(b.id) as count')
|
||||
->field('a.id as room_id,a.user_id,a.room_name,a.room_cover,count(b.id) as count,a.start_time,a.end_time')
|
||||
->where($map)
|
||||
// 营业时间判断(允许全天营业的房间)
|
||||
->where(function($query) use ($currentTime) {
|
||||
|
||||
Reference in New Issue
Block a user