master
cody 4 months ago
parent 7ff7fc89cd
commit c4dffd1163

@ -90,7 +90,7 @@ class OtherController extends CommonController
return $this->fail([ResponseCode::ERROR_PARAMETER, implode(',', $validator->errors()->all())]);
}
$YuanheRepository = new YuanheRepository();
$result = $YuanheRepository->companyInfo(['enterpriseName' => $all['company_name']]);
$result = $YuanheRepository->companyInfo(['keyword' => $all['company_name']]);
if (!$result) {
return $this->fail([ResponseCode::ERROR_PARAMETER, '获取失败']);
}

@ -174,13 +174,13 @@ class UserController extends CommonController
if (isset($all['name']) && !empty($all['name'])) {
$all['letter'] = strtoupper(Pinyin::abbr(mb_substr($all['name'], 0, 1))[0]);
}
$model->fill($all);
$model->save();
// 如果有公司信息,就更新一下公司
if (isset($all['company_name']) && !empty($all['company_name'])) {
if (!empty($all['company_name'] && $model->company_name != $all['company_name'])) {
// 调用命令行更新
Artisan::call("update_company --user_id={$model->id}");
}
$model->fill($all);
$model->save();
// 判断下,如果用户新加入车牌号,并且有未开始或者进行中的预约,则直接预约车牌号
$appointmentModel = Appointment::where('user_id', $this->getUserId())
->where('status', 1)
@ -229,7 +229,6 @@ class UserController extends CommonController
}])->find($this->getUserId());
$doorRepository = new DoorRepository();
$nowDate = date('Y-m-d H:i:s');
$door_appointments = Appointment::where('user_id', $this->getUserId())
->where('status', 1)
->orderBy('id', 'desc')
@ -245,6 +244,7 @@ class UserController extends CommonController
$query->where('start_date', '<=', $nowDate)->where('end_date', '>=', $nowDate);
})->first();
if ($course_signs) {
// todo::上线解开注释
//$course_signs->qrcode = $doorRepository->getEmpQrCodeByCourse($course_signs, $out);
$course_signs->qrcode = '';
}

Loading…
Cancel
Save