From 3d46a5581107f414c59b2878f554ca99ed3fd21a Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Fri, 8 Nov 2019 18:10:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Base/Service/PromoteService.class.php | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/Application/Base/Service/PromoteService.class.php b/Application/Base/Service/PromoteService.class.php index ff4e5eb57..fba9976e0 100644 --- a/Application/Base/Service/PromoteService.class.php +++ b/Application/Base/Service/PromoteService.class.php @@ -198,17 +198,12 @@ class PromoteService { return ['status' => false, 'msg' => '系统异常,修改推广员上级失败[' . $lastSql . ']']; } - $status = M('promote', 'tab_')->where($secondMap)->save([ + M('promote', 'tab_')->where($secondMap)->save([ 'chain' => ['exp', 'REPLACE(chain, "/' . $fromPromote['id'] . '/","/' . $toPromote['id'] . '/")'], ]); - if (!$status) { - $lastSql = M()->getLastSql(); - $model->rollback(); - return ['status' => false, 'msg' => '系统异常,修改推广员CHAIN失败[' . $lastSql . ']']; - } - $status1 = M('ShiftTask')->where('id=' . $task['id'])->save(['status' => 1, 'handle_time' => time()]); - if (!$status1) { + $status = M('ShiftTask')->where('id=' . $task['id'])->save(['status' => 1, 'handle_time' => time()]); + if (!$status) { $model->rollback(); return ['status' => false, 'msg' => '系统异常,修改迁移任务状态失败']; }