From d27f9efa8ca29c8713764b3cc3b5d75db14497b8 Mon Sep 17 00:00:00 2001 From: vilson <545522390@qq.com> Date: Fri, 8 Mar 2019 09:49:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=89=8D=E7=AB=AF=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E4=BB=BB=E5=8A=A1=E5=90=8E=E6=98=BE=E7=A4=BA=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E4=B8=8D=E5=85=A8=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: vilson <545522390@qq.com> --- application/common/Model/Task.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/application/common/Model/Task.php b/application/common/Model/Task.php index 8e4e1ca..afa482c 100644 --- a/application/common/Model/Task.php +++ b/application/common/Model/Task.php @@ -293,8 +293,7 @@ class Task extends CommonModel Db::rollback(); throw new \Exception($e->getMessage()); } - unset($result['id']); - return $result; + return $this->read($result['code']); } public function taskDone($taskCode, $done) @@ -591,7 +590,7 @@ class Task extends CommonModel { $done = 1; if (isset($data['code']) && isset($data['pcode']) && $data['pcode']) { - $task = self::where(['code' => $data['pcode']])->field('done')->find(); + $task = self::where(['code' => $data['pcode']])->field('done,deleted')->find(); if ($task && !$task['deleted'] && !$task['done']) { $done = 0; }