master
cody 11 months ago
parent 693550dd34
commit ea491c2656

@ -124,9 +124,9 @@ class GateController extends CommonController
return $this->fail([ResponseCode::ERROR_PARAMETER, implode(',', $validator->errors()->all())]); return $this->fail([ResponseCode::ERROR_PARAMETER, implode(',', $validator->errors()->all())]);
} }
$check = Visit::where(function ($query) use ($all) { $check = Visit::where(function ($query) use ($all) {
$query->where('person_no', "{$all['keyword']}") $query->where('person_no', "{$all['code']}")
->orWhere('idcard', "{$all['keyword']}") ->orWhere('idcard', "{$all['code']}")
->orWhere('code', "{$all['keyword']}"); ->orWhere('code', "{$all['code']}");
})->first(); })->first();
if (empty($check)) { if (empty($check)) {
return $this->fail([ResponseCode::ERROR_BUSINESS, '拜访记录不存在']); return $this->fail([ResponseCode::ERROR_BUSINESS, '拜访记录不存在']);

Loading…
Cancel
Save