|
|
@@ -421,36 +421,36 @@ class ChannelAnalysisLogic extends BaseLogic
|
|
|
}
|
|
|
|
|
|
// 注册成本
|
|
|
- $total['reg_cost'] = ToolLogic::getRound($total['cost'], $total['reg_total'] ?? 0);
|
|
|
+ $total['reg_cost'] = ToolLogic::getRound($total['cost']??0, $total['reg_total'] ?? 0);
|
|
|
// 汇总创角率
|
|
|
- $total['role_per'] = ToolLogic::getRound($total['role_total'], $total['reg_total'] ?? 0);
|
|
|
+ $total['role_per'] = ToolLogic::getRound($total['role_total']??0, $total['reg_total'] ?? 0);
|
|
|
// 次留率
|
|
|
- $total['a_per'] = ToolLogic::getPercent($total['active'], $total['reg_total'], 1);
|
|
|
+ $total['a_per'] = ToolLogic::getPercent($total['active']??0, $total['reg_total']??0, 1);
|
|
|
// 次留成本
|
|
|
- $total['a_cost'] = ToolLogic::getRound($total['cost'], $total['active'], 1);
|
|
|
+ $total['a_cost'] = ToolLogic::getRound($total['cost']??0, $total['active']??0, 1);
|
|
|
// 付费率
|
|
|
- $total['p_per'] = ToolLogic::getPercent($total['reg_pay_num'], $total['reg_total'], 1);
|
|
|
+ $total['p_per'] = ToolLogic::getPercent($total['reg_pay_num']??0, $total['reg_total']??0, 1);
|
|
|
// 当天回本率
|
|
|
- $total['da_per'] = ToolLogic::getPercent($total['reg_pay_total_da'], $total['cost'], 1);
|
|
|
+ $total['da_per'] = ToolLogic::getPercent($total['reg_pay_total_da']??0, $total['cost']??0, 1);
|
|
|
// 累计回本率
|
|
|
- $total['re_per'] = (float)trim(ToolLogic::getPercent($total['reg_pay_total'], $total['cost']), "%");
|
|
|
+ $total['re_per'] = (float)trim(ToolLogic::getPercent($total['reg_pay_total']??0, $total['cost']??0), "%");
|
|
|
// 实际回本率
|
|
|
- $total['re_amount_per'] = ToolLogic::getPercent($total['reg_pay_amount'], $total['cost'], 1);
|
|
|
+ $total['re_amount_per'] = ToolLogic::getPercent($total['reg_pay_amount']??0, $total['cost']??0, 1);
|
|
|
//ARPU
|
|
|
- $total['arpu'] = ToolLogic::getRound($total['reg_pay_total'], $total['reg_pay_num']);
|
|
|
+ $total['arpu'] = ToolLogic::getRound($total['reg_pay_total']??0, $total['reg_pay_num']??0);
|
|
|
//注册ARPU
|
|
|
- $total['r_arpu'] = ToolLogic::getRound($total['reg_pay_total'], $total['reg_total']);
|
|
|
+ $total['r_arpu'] = ToolLogic::getRound($total['reg_pay_total']??0, $total['reg_total']??0);
|
|
|
// 7天回本率
|
|
|
- $total['re_amount_per_7'] = ToolLogic::getPercent($hb7dayDataSum, $total['cost'], 1);
|
|
|
+ $total['re_amount_per_7'] = ToolLogic::getPercent($hb7dayDataSum??0, $total['cost']??0, 1);
|
|
|
//付费成本
|
|
|
- $total['p_cost'] = ToolLogic::getRound($total['reg_pay_num'], $total['cost'], 1);
|
|
|
+ $total['p_cost'] = ToolLogic::getRound($total['reg_pay_num']??0, $total['cost']??0, 1);
|
|
|
|
|
|
$totalData = $this->agentTotal($where);
|
|
|
|
|
|
// 汇总数据
|
|
|
return [
|
|
|
- 'data' => array_merge($baseData, [$total]),
|
|
|
- 'totalData' => $totalData
|
|
|
+ 'data' => array_merge($baseData),
|
|
|
+ 'totalRow' => $total,
|
|
|
];
|
|
|
}
|
|
|
|