update 用户邀请数据

This commit is contained in:
chenbo 2024-01-16 11:13:32 +08:00
parent 1c23965383
commit e068593846
2 changed files with 10 additions and 4 deletions

View File

@ -218,9 +218,7 @@ class TaskController extends BaseAdminController
{ {
$param = $this->request->param(); $param = $this->request->param();
[$page, $limit] = $this->getPage(); [$page, $limit] = $this->getPage();
$list = Task::where('company_id', $param['company_id']) $list = Task::with(['directorInfo'])
->with(['directorInfo'])
->page($page, $limit) ->page($page, $limit)
->order(['id' => 'desc']) ->order(['id' => 'desc'])
->select(); ->select();
@ -247,9 +245,10 @@ class TaskController extends BaseAdminController
'title' => $params['title'], 'title' => $params['title'],
'money' => 0, 'money' => 0,
'type' => 0, 'type' => 0,
'status' => $params['status'],
'content' => $params['content'], 'content' => $params['content'],
'start_time' => time(), 'start_time' => time(),
'end_time' => $params['end_time'], 'end_time' => strtotime($params['end_time']),
'director_uid' => $params['director_uid'], // 指派给负责人 'director_uid' => $params['director_uid'], // 指派给负责人
'create_time' => time(), 'create_time' => time(),
'update_time' => time(), 'update_time' => time(),

View File

@ -996,4 +996,11 @@ class TaskController extends BaseApiController
} }
} }
public function taskList()
{
$list = Task::where('director_uid', $this->userId)->with(['directorInfo'])
->order(['id' => 'desc'])
->select()->toArray();
return $this->success('ok', $list);
}
} }