...
|
...
|
@@ -44,8 +44,8 @@ class Index extends Api |
|
|
$user_id = $this->is_token($this->request->header());
|
|
|
$id = input('id');
|
|
|
$vip = Db::name('user')->where(['id' => $user_id])->value('vip');
|
|
|
//拦截预约当天
|
|
|
$this->is_day($id);
|
|
|
// //拦截预约当天
|
|
|
// $this->is_day($id);
|
|
|
//vip等级拦截
|
|
|
$this->is_vip($vip, $id);
|
|
|
//超过最大次数拦截
|
...
|
...
|
@@ -315,7 +315,7 @@ class Index extends Api |
|
|
}
|
|
|
})
|
|
|
*/
|
|
|
public function TableList()
|
|
|
public function TableList()
|
|
|
{
|
|
|
$date = input('date');
|
|
|
$day = strtotime(date($date));
|
...
|
...
|
@@ -328,7 +328,7 @@ class Index extends Api |
|
|
->where($map)
|
|
|
->where(['s.cloud_type' => 1])
|
|
|
->where(['s.plane_type' => 1])
|
|
|
->join('planename p','p.id=s.plane_type')
|
|
|
->join('planename p', 'p.id=s.plane_type')
|
|
|
->field('t.title,p.name,s.id,s.plane_type,s.status,s.user_id')
|
|
|
->select();
|
|
|
foreach ($shangwu1 as $k => $v) {
|
...
|
...
|
@@ -348,7 +348,7 @@ class Index extends Api |
|
|
->where($map)
|
|
|
->where(['s.cloud_type' => 1])
|
|
|
->where(['s.plane_type' => 2])
|
|
|
->join('planename p','p.id=s.plane_type')
|
|
|
->join('planename p', 'p.id=s.plane_type')
|
|
|
->field('s.id as fid,p.name as fname,s.plane_type as fplane_type,s.status as fstatus,s.user_id as fuser_id')
|
|
|
->select();
|
|
|
foreach ($shangwu2 as $k => $v) {
|
...
|
...
|
@@ -373,7 +373,7 @@ class Index extends Api |
|
|
->where($map)
|
|
|
->where(['s.cloud_type' => 2])
|
|
|
->where(['s.plane_type' => 1])
|
|
|
->join('planename p','p.id=s.plane_type')
|
|
|
->join('planename p', 'p.id=s.plane_type')
|
|
|
->field('t.title,p.name,s.id,s.plane_type,s.status,s.user_id')
|
|
|
->select();
|
|
|
foreach ($xiawu1 as $k => $v) {
|
...
|
...
|
@@ -393,7 +393,7 @@ class Index extends Api |
|
|
->where($map)
|
|
|
->where(['s.cloud_type' => 2])
|
|
|
->where(['s.plane_type' => 2])
|
|
|
->join('planename p','p.id=s.plane_type')
|
|
|
->join('planename p', 'p.id=s.plane_type')
|
|
|
->field('s.id as fid,p.name as fname,s.plane_type as fplane_type,s.status as fstatus,s.user_id as fuser_id')
|
|
|
->select();
|
|
|
foreach ($xiawu2 as $k => $v) {
|
...
|
...
|
@@ -461,7 +461,7 @@ class Index extends Api |
|
|
}
|
|
|
})
|
|
|
*/
|
|
|
public function Kill()
|
|
|
public function Kill()
|
|
|
{
|
|
|
$id = input('id');
|
|
|
$user_id = $this->is_token($this->request->header());
|
...
|
...
|
@@ -476,7 +476,7 @@ class Index extends Api |
|
|
'2' => $id + 1
|
|
|
];
|
|
|
$vip_level = DB::name('user')->where('id', $user_id)->value('vip');
|
|
|
if ($vip_level == 1 || $vip_level == 2) {
|
|
|
if ($vip_level == 1 || $vip_level == 2 || $vip_level == 3) {
|
|
|
foreach ($array as $k => $v) {
|
|
|
$kill = Db::name('yuyue')->where(['sun_id' => $v])->where('user_id', $user_id)->find();
|
|
|
if (!empty($kill)) {
|
...
|
...
|
|