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()]);