diff --git a/Application/Home/Controller/FinanceController.class.php b/Application/Home/Controller/FinanceController.class.php index 06e4ca0f5..2ca1ae51a 100644 --- a/Application/Home/Controller/FinanceController.class.php +++ b/Application/Home/Controller/FinanceController.class.php @@ -125,16 +125,17 @@ class FinanceController extends BaseController ->where($map) ->find(); - foreach ($income as &$value) { - $value = bcdiv($value, 100, 2); - } - $withdrawMap['promote_id'] = $this->loginPromote['id']; $withdrawMap['status'] = ['neq', 2]; //已提现总额 $income['withdrawn_amount'] = M('withdraw', 'tab_')->field('sum(sum_money) as withdrawn_amount')->where($withdrawMap)->find()['withdrawn_amount']; + foreach ($income as &$value) { + $value = bcdiv($value, 100, 2); + } + + $withdrawMap['status'] = ['not in', [-2, -1]]; $withdrawns = M('withdraw', 'tab_')->field('settlement_begin_time, settlement_end_time') ->where($withdrawMap) ->select(); diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php index 2fab1180c..ca4062e65 100644 --- a/Application/Home/Controller/QueryController.class.php +++ b/Application/Home/Controller/QueryController.class.php @@ -2326,7 +2326,7 @@ class QueryController extends BaseController $promoteRepository = new PromoteRepository(); $createRoleCountList = $promoteRepository->getCreateRoleCountByIds($ids, $params); - if (I('p', 1) == 1) { + if (I('p', 1) == 1 && empty($promoteId)) { $selfParams = $params; $selfParams['isContainSubs'] = false; $selfCreateRoleCountList = $promoteRepository->getCreateRoleCountByIds([$parent['id']], $selfParams);