| 123456789101112131415161718192021222324252627282930313233 |
- <?php
- namespace app\workerapi\logic;
- use app\common\logic\BaseLogic;
- use app\common\model\works\ServiceWorkAllocateWorkerLog;
- /**
- * @author 林海涛
- * @date 2024/7/16 下午4:03
- */
- class ServiceWorkerAllocateWorkerLogic extends BaseLogic
- {
- /**
- * @notes 添加
- * @param array $params
- * @return bool
- * @throws
- * @author whitef
- * @date 2024/07/10 15:06
- */
- public static function add(array $params): bool
- {
- if(empty($params['work_id']) || empty($params['master_worker_id']) || empty($params['opera_log'])) {
- throw new \Exception('参数错误');
- }
- ServiceWorkAllocateWorkerLog::create([
- 'work_id' => $params['work_id'],
- 'master_worker_id' => $params['master_worker_id'],
- 'opera_log'=>$params['opera_log']
- ]);
- return true;
- }
- }
|