Ver Fonte

封装的报表类方法

gogs há 2 meses atrás
pai
commit
4654639447
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      app/Service/BIService.php

+ 1 - 1
app/Service/BIService.php

@@ -27,7 +27,7 @@ class BIService extends Service
             $data['month_end'] = date("Y-m-d", $end);
         }
 
-        if (!isset($data['month_start'])) $month_start = date('Y-01-01');
+        if (!isset($data['month_start'])) $month_start = date('Y-01-01', strtotime('-1 year'));
         else $month_start = date('Y-m-01', strtotime($data['month_start']));
         if (!isset($data['month_end'])) $month_end = date('Y-01-01', strtotime('+1 year', strtotime($month_start)));
         else {