This commit is contained in:
邓皓元 2019-04-10 09:51:27 +08:00
parent 86cd7c742f
commit 7b44fad071

View File

@ -111,7 +111,7 @@ class PackageService extends Service
$attributes['guide_price'] = intval($attributes['guide_price'] * 100);
if (!$attributes['id']) {
$maxId = Package::withTrashed()->where('type', $attributes['type'])->max('id');
$maxId = Package::withTrashed()->max('id');
$attributes['id'] = $maxId ? $maxId + 1 : 1;
$node = $this->packageRepository->create($attributes);
}