diff --git a/Application/Admin/Controller/PresidentDepositController.class.php b/Application/Admin/Controller/PresidentDepositController.class.php index 341eff12d..7f4cbe245 100644 --- a/Application/Admin/Controller/PresidentDepositController.class.php +++ b/Application/Admin/Controller/PresidentDepositController.class.php @@ -31,11 +31,18 @@ class PresidentDepositController extends ThinkController $promoteIds = []; if ($status !== '') { - $tempPromoteIds = M('president_deposit', 'tab_')->where(['status' => $status])->getField('promote_id', true); - if (count($tempPromoteIds) > 0) { - $idStrWhere[] = 'id in (' . implode(',', $tempPromoteIds) . ')'; + if ($status == '-1') { // 市场待审核 + $tempPromoteIds = M('president_deposit', 'tab_')->getField('promote_id', true); + if (count($tempPromoteIds) > 0) { + $idStrWhere[] = 'id not in (' . implode(',', $tempPromoteIds) . ')'; + } } else { - $idStrWhere[] = '1<>1'; + $tempPromoteIds = M('president_deposit', 'tab_')->where(['status' => $status])->getField('promote_id', true); + if (count($tempPromoteIds) > 0) { + $idStrWhere[] = 'id in (' . implode(',', $tempPromoteIds) . ')'; + } else { + $idStrWhere[] = '1<>1'; + } } } @@ -158,6 +165,9 @@ class PresidentDepositController extends ThinkController // 汇总金额 if (count($promotes) > 0 || (isset($count) && $count > 0)) { $total = M('president_deposit', 'tab_')->where(['promote_id'=>['in', $totalQuery->getField('id', true)]])->field('sum(amount) as totalAmount, sum(if(status = 1, amount, 0)) as confirmedAmount, sum(if(status = 2, amount, 0)) as refundedAmount')->find(); + $total = [ + 'totalamount' => $total['totalamount'] ?? 0, 'confirmedamount' => $total['confirmedamount'] ?? 0, 'refundedamount' => $total['refundedamount'] ?? 0 + ]; } else { $total = [ 'totalamount' => 0, 'confirmedamount' => 0, 'refundedamount' => 0 diff --git a/Application/Admin/View/PresidentDeposit/records.html b/Application/Admin/View/PresidentDeposit/records.html index c2952569c..6b18e5c54 100644 --- a/Application/Admin/View/PresidentDeposit/records.html +++ b/Application/Admin/View/PresidentDeposit/records.html @@ -84,6 +84,7 @@