|
|
@@ -71,14 +71,15 @@ class PledgeLogic
|
|
|
->where('a.status', '>', $model::Close)
|
|
|
->field('a.*,b.title')
|
|
|
->select();
|
|
|
- if(empty($list)) throw new Exception('暂无质押订单');
|
|
|
+ if(empty($list)) throw new Exception('暂无质押订单');
|
|
|
$day = 86400;
|
|
|
$total = 0; //当前累计收益
|
|
|
$growth= 0; //增长累计收益
|
|
|
$time = time();
|
|
|
- foreach ($list as $item) {
|
|
|
+ foreach ($list as &$item) {
|
|
|
if($item->status == $model::Remove) {
|
|
|
$total += $item->total_self;
|
|
|
+ unset($item);
|
|
|
}else{
|
|
|
$reta = bcdiv($item->day_num, $day, 6); //天
|
|
|
$inter = ($item->last_time == 0) ? $time - $item->create_time: $time - $item->last_time; //最后收取时间
|