diff --git a/app/Http/Controllers/Admin/GateController.php b/app/Http/Controllers/Admin/GateController.php index 6c24e50..4230056 100644 --- a/app/Http/Controllers/Admin/GateController.php +++ b/app/Http/Controllers/Admin/GateController.php @@ -124,9 +124,9 @@ class GateController extends CommonController return $this->fail([ResponseCode::ERROR_PARAMETER, implode(',', $validator->errors()->all())]); } $check = Visit::where(function ($query) use ($all) { - $query->where('person_no', "{$all['keyword']}") - ->orWhere('idcard', "{$all['keyword']}") - ->orWhere('code', "{$all['keyword']}"); + $query->where('person_no', "{$all['code']}") + ->orWhere('idcard', "{$all['code']}") + ->orWhere('code', "{$all['code']}"); })->first(); if (empty($check)) { return $this->fail([ResponseCode::ERROR_BUSINESS, '拜访记录不存在']);