Browse Source

显示结算处理进度

程旭源 8 months ago
parent
commit
b9d474764c
1 changed files with 4 additions and 1 deletions
  1. 4 1
      application/api/controller/Index.php

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

@@ -158,7 +158,10 @@ class Index extends Api
 
 
         $date = date("Y-m-d", $beginYesterday);
         $date = date("Y-m-d", $beginYesterday);
         Db::startTrans();
         Db::startTrans();
-        foreach ($total as $item) {
+        $totalRecord = count($total);
+        echo "总共{$totalRecord}条记录\n";
+        foreach ($total as $key=>$item) {
+            echo "正在处理第{$key}条\n";
             DayRecord::create([
             DayRecord::create([
                 "uid" => $item->id,
                 "uid" => $item->id,
                 "addtime" => $date,
                 "addtime" => $date,