master
yulingwei 4 years ago
parent 25dec010be
commit deac7da5ff

@ -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

@ -84,6 +84,7 @@
<div class="input-list input-list-promote search_label_rehab">
<select id="status" name="status" class="select_gallery" style="width:120px;">
<option value="">押金状态</option>
<option value="-1">市场待确认</option>
<?php foreach($statusList as $key => $name):?>
<option value="<?=$key?>"><?=$name?></option>
<?php endforeach;?>

Loading…
Cancel
Save