* [task#135726] add count of daily delete rows in user metric.

This commit is contained in:
liyang
2025-01-06 16:59:04 +08:00
committed by 曹延义
parent cd434d3292
commit 7ebd83bee8
@@ -106,3 +106,19 @@ class count_of_daily_delete_rows_in_user extends baseCalc
*/
public function getResult($options = array())
{
if(empty($options))
{
$begin = date('Y-m-d', strtotime('-3 month'));
$end = date('Y-m-d');
}
else
{
$year = (int)$options['year'];
$month = (int)$options['month'];
$day = $options['day'];
$begin = $end = $day;
if(strpos($day, ',') !== false) list($end, $begin) = explode(',', $day);
$begin = "{$year}-{$month}-{$begin}";
$end = "{$year}-{$month}-{$end}";
}