Browse Source

统计所有月统计

afa 5 months ago
parent
commit
59bf581d26
1 changed files with 3 additions and 3 deletions
  1. 3 3
      app/common/model/MoneyLog.php

+ 3 - 3
app/common/model/MoneyLog.php

@@ -103,7 +103,7 @@ class MoneyLog Extends Model
         if($type == 2 && !empty($time)) $list = $list->whereYear('create_date', $time);
         if($type == 3 && !empty($time)){
             $expTime = explode(',', $time);
-            $list = $list->whereTime('create_date', [$expTime[0], $expTime[1]]);
+            $list = $list->whereTime('create_date', 'between',[$expTime[0], $expTime[1]]);
         }
         if(count($user_ids) > 0) $list = $list->whereIn('user_id', $user_ids);
         $list = $list
@@ -123,7 +123,7 @@ class MoneyLog Extends Model
         if($type == 2 && !empty($time)) $list = $list->whereYear('create_date', $time);
         if($type == 3 && !empty($time)){
             $expTime = explode(',', $time);
-            $list = $list->whereTime('create_date', [$expTime[0], $expTime[1]]);
+            $list = $list->whereTime('create_date', 'between',[$expTime[0], $expTime[1]]);
         }
         if(count($user_ids) >0) $list = $list->whereIn('user_id', $user_ids);
         $list = $list
@@ -144,7 +144,7 @@ class MoneyLog Extends Model
         //自定义
         if($type == 3 && !empty($time)){
             $expTime = explode(',', $time);
-            $list = $list->whereTime('create_date', [$expTime[0], $expTime[1]]);
+            $list = $list->whereTime('create_date','between', [$expTime[0], $expTime[1]]);
         }
         if(count($user_ids)> 0) $list = $list->whereIn('user_id', $user_ids);
         //月