Merge branch 'feature/promote' of 47.111.118.107:/srv/git/platform into feature/promote

master
ELF 5 years ago
commit d9419ae64e

@ -569,3 +569,12 @@ function getTopPromote($promote_id)
return M('promote', 'tab_')->where(['id' => $topPromoteId])->find(); return M('promote', 'tab_')->where(['id' => $topPromoteId])->find();
} }
} }
function arrayPromoteWithdrawStatus($status, $param, $array = array()) {
foreach ($array as $key => $value) {
if($value[$status] == -1){
unset($array[$key]);
}
}
return $array;
}

@ -682,16 +682,15 @@ class QueryController extends ThinkController
'title' => '渠道提现', 'title' => '渠道提现',
'template_list' => 'withdraw', 'template_list' => 'withdraw',
); );
$map1 = array('status' => 1); $map1 = array('status' => ['neq', -1]);
$total = null_to_0(D('withdraw')->where($map1)->sum('sum_money')); $total = null_to_0(D('withdraw')->where($map1)->sum('sum_money'));
$ttotal = null_to_0(D('withdraw')->where('end_time' . total(1))->where($map1)->sum('sum_money')); $ttotal = null_to_0(D('withdraw')->where('create_time' . total(1))->where($map1)->sum('sum_money'));
$ytotal = null_to_0(D('withdraw')->where('end_time' . total(5))->where($map1)->sum('sum_money')); $ytotal = null_to_0(D('withdraw')->where('create_time' . total(5))->where($map1)->sum('sum_money'));
$this->assign('total', $total); $this->assign('total', $total);
$this->assign('ttotal', $ttotal); $this->assign('ttotal', $ttotal);
$this->assign('ytotal', $ytotal); $this->assign('ytotal', $ytotal);
$user = A('Bill', 'Event'); $user = A('Bill', 'Event');
$this->m_title = '推广提现'; $this->m_title = '推广提现';
$this->assign('commonset', M('Kuaijieicon')->where(['url' => 'Query/withdraw', 'status' => 1])->find()); $this->assign('commonset', M('Kuaijieicon')->where(['url' => 'Query/withdraw', 'status' => 1])->find());

@ -155,7 +155,7 @@
</empty> </empty>
<tr class="data_summary"> <tr class="data_summary">
<td>汇总</td> <td>汇总</td>
<td colspan="11">当页提现:{:null_to_0(array_sum(array_column(array_status2value('status','',$list_data),'sum_money')))}元 今日提现:{:null_to_0(floor($ttotal*100)/100)}元 昨日提现:{:null_to_0(floor($ytotal*100)/100)}元 累计提现:{:null_to_0(floor($total*100)/100)}元</td> <td colspan="11">当页提现:{:null_to_0(array_sum(array_column(arrayPromoteWithdrawStatus('status','',$list_data),'sum_money')))}元 今日提现:{:null_to_0(floor($ttotal*100)/100)}元 昨日提现:{:null_to_0(floor($ytotal*100)/100)}元 累计提现:{:null_to_0(floor($total*100)/100)}元</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>

Loading…
Cancel
Save