master
cody 9 months ago
parent 13e5ac994b
commit 8d32e60c88

@ -207,10 +207,9 @@ class VisitController extends CommonController
} }
$model->fill($all); $model->fill($all);
$model->save(); $model->save();
dd($model);
VisitLog::add($this->getUser(), '', $model->id, isset($all['id']) ? '更新拜访记录' : '新增拜访记录'); VisitLog::add($this->getUser(), '', $model->id, isset($all['id']) ? '更新拜访记录' : '新增拜访记录');
DB::commit(); DB::commit();
return $this->success('更新成功'); return $this->success($model);
} catch (\Exception $exception) { } catch (\Exception $exception) {
DB::rollBack(); DB::rollBack();
return $this->fail([$exception->getCode(), $exception->getMessage()]); return $this->fail([$exception->getCode(), $exception->getMessage()]);

Loading…
Cancel
Save