feat:chef

This commit is contained in:
LAPTOP-7SGDREK0\shiweijun
2025-01-07 18:04:43 +08:00
parent 98f765e797
commit ce9d16eeda
5 changed files with 333 additions and 0 deletions

View File

@@ -17,6 +17,7 @@ use App\Extend\StringUtil;
use App\Lib\Crypto\CryptoFactory;
use App\Model\AdminRole;
use App\Model\AdminUser;
use App\Model\Chef;
use App\Model\DriverSequence;
use App\Service\Admin\BaseService;
use Exception;
@@ -109,6 +110,8 @@ class EmployeeService extends BaseService
(new DriverSequence)->insert([
'driver_id' => $model->id,
]),
RoleCode::CHEF =>
$this->addChef($model->id),
default => true,
};
@@ -117,6 +120,13 @@ class EmployeeService extends BaseService
return $this->return->success();
}
public function addChef($id): bool
{
$chef = new Chef();
$chef->user_id = $id;
return $chef->save();
}
/**
* 修改
* @return array