From 1bec15c1868f00368d8910223974a70f090d88d5 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Tue, 21 Jul 2020 16:58:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BF=81=E7=A7=BBbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/FinancePromoteController.class.php | 3 +++ Application/Base/Service/PromoteService.class.php | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Application/Admin/Controller/FinancePromoteController.class.php b/Application/Admin/Controller/FinancePromoteController.class.php index 2192aa350..7a616f3aa 100644 --- a/Application/Admin/Controller/FinancePromoteController.class.php +++ b/Application/Admin/Controller/FinancePromoteController.class.php @@ -275,6 +275,9 @@ class FinancePromoteController extends AdminController if($istimeselect){ $map['s.payed_time']=$istimeselect; } + if ($isMarketLeader) { + $map['s.market_admin_id'] = ['gt', 0]; + } if ($adminId > 0) { $map['s.market_admin_id'] = $adminId; } diff --git a/Application/Base/Service/PromoteService.class.php b/Application/Base/Service/PromoteService.class.php index 7da8cc031..3a81709b5 100644 --- a/Application/Base/Service/PromoteService.class.php +++ b/Application/Base/Service/PromoteService.class.php @@ -379,6 +379,9 @@ class PromoteService { 'promote_id' => $toPromote['id'], 'promote_account' => $toPromote['account'] ]; + $updateMarket = [ + 'market_admin_id' => $toPromote['admin_id'], + ]; $map = $otherMap = ['promote_id' => $fromPromote['id']]; if (count($shiftIds) > 0) { @@ -397,12 +400,12 @@ class PromoteService { $orderMap1 = $otherMap; $orderMap1['pay_time'] = ['egt', $orderTime]; - M('spend', 'tab_')->where($orderMap1)->where(['is_check' => ['in','1,2'], 'settle_check' => 0, 'selle_status' => 0])->save($updateData); // 只改未对账的数据 + M('spend', 'tab_')->where($orderMap1)->where(['is_check' => ['in','1,2'], 'settle_check' => 0, 'selle_status' => 0])->save(array_merge($updateData, $updateMarket)); // 只改未对账的数据 M('bind_spend', 'tab_')->where($orderMap1)->save($updateData); $orderMap2 = $otherMap; $orderMap2['create_time'] = ['egt', $orderTime]; - M('deposit', 'tab_')->where($orderMap2)->save($updateData); + M('deposit', 'tab_')->where($orderMap2)->save(array_merge($updateData, $updateMarket)); M('user_play_data_count', 'tab_')->where($orderMap2)->save(['promote_id' => $toPromote['id']]); $status = M('shift_task', 'sys_')->where('id=' . $task['id'])->save(['status' => 1, 'handle_time' => time()]);