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())]);
}
$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, '拜访记录不存在']);

Loading…
Cancel
Save