Explorar el Código

[智价云] 月度统计展示信息日期顺序更新

tangyuanwang hace 2 meses
padre
commit
6af0ccab22
Se han modificado 1 ficheros con 4 adiciones y 4 borrados
  1. 4 4
      app/Http/Controllers/Manager/Statistics/OverviewPanel.php

+ 4 - 4
app/Http/Controllers/Manager/Statistics/OverviewPanel.php

@@ -565,7 +565,7 @@ class OverviewPanel extends Controller
             ->get()->keyBy('date')->toarray();
         $moth_list = [];
         $key_index = 0;
-        for ($i = $end_time; $i >= $start_time; $i -= 86400) {
+        for ($i = $start_time; $i <= $end_time; $i += 86400) {
             $key_day = Carbon::createFromTimestamp($i)->format('Y-m-d');
             $moth_list[$key_index]['date'] = $key_day;
             $moth_list[$key_index]['low_price_totle'] = 0;
@@ -727,7 +727,7 @@ class OverviewPanel extends Controller
             ->get()->keyBy('date')->toarray();
         $moth_list = [];
         $key_index = 0;
-        for ($i = $end_time; $i >= $start_time; $i -= 86400) {
+        for ($i = $start_time; $i <= $end_time; $i += 86400) {
             $key_day = Carbon::createFromTimestamp($i)->format('Y-m-d');
             $moth_list[$key_index]['date'] = $key_day;
             $moth_list[$key_index]['low_price_totle'] = 0;
@@ -949,7 +949,7 @@ class OverviewPanel extends Controller
             ->get()->keyBy('date')->toarray();
         $moth_list = [];
         $key_index = 0;
-        for ($i = $end_time; $i >= $start_time; $i -= 86400) {
+        for ($i = $start_time; $i <= $end_time; $i += 86400) {
             $key_day = Carbon::createFromTimestamp($i)->format('Y-m-d');
             $moth_list[$key_index]['date'] = $key_day;
             $moth_list[$key_index]['low_price_store_totle'] = 0;
@@ -1111,7 +1111,7 @@ class OverviewPanel extends Controller
             ->get()->keyBy('date')->toarray();
         $moth_list = [];
         $key_index = 0;
-        for ($i = $end_time; $i >= $start_time; $i -= 86400) {
+        for ($i = $start_time; $i <= $end_time; $i += 86400) {
             $key_day = Carbon::createFromTimestamp($i)->format('Y-m-d');
             $moth_list[$key_index]['date'] = $key_day;
             $moth_list[$key_index]['low_price_store_totle'] = 0;