moonsflyer 5 mesi fa
parent
commit
1575984924
1 ha cambiato i file con 8 aggiunte e 0 eliminazioni
  1. 8 0
      app/shopapi/lists/AccountLogLists.php

+ 8 - 0
app/shopapi/lists/AccountLogLists.php

@@ -60,6 +60,14 @@ class AccountLogLists extends BaseShopDataLists
         if(isset($this->params['type']) && $this->params['type'] == 'integral') {
             $this->searchWhere[] = ['change_type', 'in', AccountLogEnum::getIntegralChangeType()];
         }
+
+        // 按日期查询
+        if(isset($this->params['search_date']) && $this->params['search_date'] <> '') {
+
+            $start_date = strtotime($this->params['search_date'].'-01 00:00:00');
+            $end_date = strtotime(date('Y-m-t 23:59:59', $start_date)); // 获取当月最后一天
+            $this->searchWhere[] = ['create_time', 'between', [$start_date,$end_date]];
+        }
     }
 
     /**