|
@@ -1,6 +1,7 @@
|
|
|
<?php
|
|
|
namespace App\Repositories\V2;
|
|
|
use App\Models\Floor;
|
|
|
+use Illuminate\Support\Facades\Log;
|
|
|
use Symfony\Component\HttpKernel\Exception\HttpException;
|
|
|
use Dingo\Api\Http\Response;
|
|
|
use Illuminate\Support\Facades\DB;
|
|
@@ -89,9 +90,10 @@ class FloorRepository
|
|
|
|
|
|
public function floorBind($request)
|
|
|
{
|
|
|
+ Log::debug(json_encode($request));
|
|
|
$banner_id = $request['banner_id'];
|
|
|
$floor_array = $this->floor->select('id','group_ids')->where('floor_type',0)->get();
|
|
|
-
|
|
|
+ Log::debug(json_encode($floor_array));
|
|
|
$floor_ids = [];
|
|
|
foreach ($floor_array->toArray() as $value){
|
|
|
if ($banner_id == $value['group_ids']){
|
|
@@ -99,6 +101,7 @@ class FloorRepository
|
|
|
}
|
|
|
}
|
|
|
if (count($floor_ids)>0){
|
|
|
+ Log::debug($floor_ids);
|
|
|
$edit_floor = $this->floor->whereIn('id',$floor_ids)->update(['is_open'=>0]);
|
|
|
if (!$edit_floor){
|
|
|
throw new HttpException(500, '该楼层关闭失败');
|