This commit is contained in:
小鱼开发
2024-07-12 21:34:30 +08:00
parent 2558bb9cb4
commit 0f274b276c
@@ -452,9 +452,8 @@ class GroupsStatistics extends BaseController
while ($start_Time < $end_Time) {
$start = date('Y-m-d H:i:s', $start_Time);
$ii > 0 && $start = date('Y-m-d H:i:s', $start_Time + 86400);
$name_start = date('Y-m-d', $start_Time);
$name = date('Y-m-d', $start_Time);
$start_Time = strtotime($add_time, $start_Time);
$name = $name_start . '-' . date('Y-m-d', $start_Time);
$end = date('Y-m-d H:i:s', $end_Time);
$times[] = ['name' => $name, 'start' => $start, 'end' => $end];
$xAxisData[] = $name;
@@ -468,11 +467,11 @@ class GroupsStatistics extends BaseController
$end = strtotime($v2['end']);
$where = ['createTime >=' => $start, 'createTime <=' => $end, 'activityId' => $activityId];
if ($v['value'] == 'order') {
$where['itemId>'] = 0;
$counts[] = $this->mdSyliveOrder->count(['activityId' => $activityId, 'itemId>' => 0, 'itemPrice >' => 0 , 'status' => 1, 'createTime >=' => $v2['start'], 'createTime <=' => $v2['end'],]);
} else {
$where['kpi'] = $v['value'];
$counts[] = $this->mdSyliveActivityKpidata->count($where);
}
$counts[] = $this->mdSyliveActivityKpidata->count($where);
}
$yAxisSeries[] = ['name' => $v['name'], 'type' => 'line', 'data' => $counts];
}