更新时间戳
This commit is contained in:
parent
8baaf16b88
commit
c3a3a52eb1
|
@ -165,7 +165,7 @@ class ProjectTask extends ApiController
|
||||||
$param = get_params();
|
$param = get_params();
|
||||||
$tid = isset($param['tid']) ? $param['tid'] : 0;
|
$tid = isset($param['tid']) ? $param['tid'] : 0;
|
||||||
$where = [];
|
$where = [];
|
||||||
if ($tid>0) {
|
if ($tid > 0) {
|
||||||
$task_ids = Db::name('ProjectTask')->where(['delete_time' => 0, 'project_id' => $param['tid']])->column('id');
|
$task_ids = Db::name('ProjectTask')->where(['delete_time' => 0, 'project_id' => $param['tid']])->column('id');
|
||||||
$where[] = ['a.tid', 'in', $task_ids];
|
$where[] = ['a.tid', 'in', $task_ids];
|
||||||
}
|
}
|
||||||
|
@ -201,7 +201,7 @@ class ProjectTask extends ApiController
|
||||||
}
|
}
|
||||||
if($item->tid > 0){
|
if($item->tid > 0){
|
||||||
$task = Db::name('ProjectTask')->where(['id' => $item->tid])->find();
|
$task = Db::name('ProjectTask')->where(['id' => $item->tid])->find();
|
||||||
$item->task = $task['title'];
|
$item->task = $task['title'] ?? '';
|
||||||
$item->project = Db::name('Project')->where(['id' => $task['project_id']])->value('name');
|
$item->project = Db::name('Project')->where(['id' => $task['project_id']])->value('name');
|
||||||
}
|
}
|
||||||
$item->start_time_a = empty($item->start_time) ? '' : date('Y-m-d', $item->start_time);
|
$item->start_time_a = empty($item->start_time) ? '' : date('Y-m-d', $item->start_time);
|
||||||
|
|
Loading…
Reference in New Issue