|
|
@ -130,7 +130,7 @@ class FinanceController extends BaseController
|
|
|
|
$map['pay_time'] = ['between', [$begTime, $endTime]];
|
|
|
|
$map['pay_time'] = ['between', [$begTime, $endTime]];
|
|
|
|
$dayList = $this->getDayList($begTime, $endTime);
|
|
|
|
$dayList = $this->getDayList($begTime, $endTime);
|
|
|
|
$data = $model->field('FROM_UNIXTIME(pay_time, "%Y-%m-%d") as day,
|
|
|
|
$data = $model->field('FROM_UNIXTIME(pay_time, "%Y-%m-%d") as day,
|
|
|
|
sum(if(selle_ratio > 0, pay_amount * selle_ratio, 0)) as income')
|
|
|
|
sum(if(selle_ratio > 0, pay_amount * selle_ratio, 0)) as income, selle_status')
|
|
|
|
->where($map)
|
|
|
|
->where($map)
|
|
|
|
->group('day')
|
|
|
|
->group('day')
|
|
|
|
->select();
|
|
|
|
->select();
|
|
|
@ -140,6 +140,7 @@ class FinanceController extends BaseController
|
|
|
|
$records[] = [
|
|
|
|
$records[] = [
|
|
|
|
'day' => $date,
|
|
|
|
'day' => $date,
|
|
|
|
'income' => bcdiv($data[$day], 100, 2),
|
|
|
|
'income' => bcdiv($data[$day], 100, 2),
|
|
|
|
|
|
|
|
// 'selle_status_text' => empty($data[$day]),
|
|
|
|
'url' => U('settlementDtl', array('begtime' => $day, 'endtime' => $day))
|
|
|
|
'url' => U('settlementDtl', array('begtime' => $day, 'endtime' => $day))
|
|
|
|
];
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|
|
|
|