Browse Source

修正前一天业绩统计

程旭源 9 months ago
parent
commit
85bd6d075b
1 changed files with 3 additions and 1 deletions
  1. 3 1
      application/api/controller/Index.php

+ 3 - 1
application/api/controller/Index.php

@@ -135,7 +135,9 @@ class Index extends Api
         }
         }
 
 
         Record::where('time', ">=", $beginYesterday)
         Record::where('time', ">=", $beginYesterday)
-            ->where("time", '<', $endYesterday)->delete();
+            ->where("time", '<', $endYesterday)
+            ->where('status', 1)
+            ->delete();
         Db::commit();
         Db::commit();
 //        $beginYesterday=mktime(0,0,0,date('m'),date('d')-1,date('Y'));
 //        $beginYesterday=mktime(0,0,0,date('m'),date('d')-1,date('Y'));
 //        $userlink = db('userlink')->select();
 //        $userlink = db('userlink')->select();